diff --git a/283.a96038e1f6201dba.js b/283.8d97d764e5cd9c37.js similarity index 98% rename from 283.a96038e1f6201dba.js rename to 283.8d97d764e5cd9c37.js index 54262c251..f260ce681 100644 --- a/283.a96038e1f6201dba.js +++ b/283.8d97d764e5cd9c37.js @@ -1 +1 @@ -"use strict";(self.webpackChunkangular=self.webpackChunkangular||[]).push([[283],{36953:(Ie,H,j)=>{j.d(H,{t0:()=>V,zv:()=>v,uA:()=>fe,uc:()=>Te,jb:()=>Ve,zb:()=>C,AV:()=>ne,Ic:()=>ze,Vs:()=>He});var L=j(49671);Symbol();const x=Symbol();const Y=Object.getPrototypeOf,q=new WeakMap,ee=e=>e&&(q.has(e)?q.get(e):Y(e)===Object.prototype||Y(e)===Array.prototype),ue=(e,t=!0)=>{q.set(e,t)},se=e=>"object"==typeof e&&null!==e,_=new WeakMap,B=new WeakSet,[je]=((e=Object.is,t=((r,f)=>new Proxy(r,f)),s=(r=>se(r)&&!B.has(r)&&(Array.isArray(r)||!(Symbol.iterator in r))&&!(r instanceof WeakMap)&&!(r instanceof WeakSet)&&!(r instanceof Error)&&!(r instanceof Number)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof RegExp)&&!(r instanceof ArrayBuffer)),n=(r=>{switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:throw r}}),a=new WeakMap,o=((r,f,y=n)=>{const p=a.get(r);if(p?.[0]===f)return p[1];const m=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r));return ue(m,!0),a.set(r,[f,m]),Reflect.ownKeys(r).forEach(w=>{if(Object.getOwnPropertyDescriptor(m,w))return;const h=Reflect.get(r,w),E={value:h,enumerable:!0,configurable:!0};if(B.has(h))ue(h,!1);else if(h instanceof Promise)delete E.value,E.get=()=>y(h);else if(_.has(h)){const[I,le]=_.get(h);E.value=o(I,le(),y)}Object.defineProperty(m,w,E)}),Object.preventExtensions(m)}),i=new WeakMap,l=[1,1],g=(r=>{if(!se(r))throw new Error("object required");const f=i.get(r);if(f)return f;let y=l[0];const p=new Set,m=(u,d=++l[0])=>{y!==d&&(y=d,p.forEach(c=>c(u,d)))};let w=l[1];const E=u=>(d,c)=>{const W=[...d];W[1]=[u,...W[1]],m(W,c)},I=new Map,ve=u=>{var d;const c=I.get(u);c&&(I.delete(u),null==(d=c[1])||d.call(c))},ce=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),Q=t(ce,{deleteProperty(u,d){const c=Reflect.get(u,d);ve(d);const W=Reflect.deleteProperty(u,d);return W&&m(["delete",[d],c]),W},set(u,d,c,W){const K=Reflect.has(u,d),z=Reflect.get(u,d,W);if(K&&(e(z,c)||i.has(c)&&e(z,i.get(c))))return!0;ve(d),se(c)&&(c=(e=>ee(e)&&e[x]||null)(c)||c);let X=c;if(c instanceof Promise)c.then(S=>{c.status="fulfilled",c.value=S,m(["resolve",[d],S])}).catch(S=>{c.status="rejected",c.reason=S,m(["reject",[d],S])});else{!_.has(c)&&s(c)&&(X=g(c));const S=!B.has(X)&&_.get(X);S&&((u,d)=>{if(I.has(u))throw new Error("prop listener already exists");if(p.size){const c=d[3](E(u));I.set(u,[d,c])}else I.set(u,[d])})(d,S)}return Reflect.set(u,d,X,W),m(["set",[d],c,z]),!0}});i.set(r,Q);const Ge=[ce,(u=++l[1])=>(w!==u&&!p.size&&(w=u,I.forEach(([d])=>{const c=d[1](u);c>y&&(y=c)})),y),o,u=>(p.add(u),1===p.size&&I.forEach(([c,W],K)=>{if(W)throw new Error("remove already exists");const z=c[3](E(K));I.set(K,[c,z])}),()=>{p.delete(u),0===p.size&&I.forEach(([c,W],K)=>{W&&(W(),I.set(K,[c]))})})];return _.set(Q,Ge),Reflect.ownKeys(r).forEach(u=>{const d=Object.getOwnPropertyDescriptor(r,u);"value"in d&&(Q[u]=r[u],delete d.value,delete d.writable),Object.defineProperty(ce,u,d)}),Q}))=>[g,_,B,e,t,s,n,a,o,i,l])();function U(e={}){return je(e)}function k(e,t,s){const n=_.get(e);let a;n||console.warn("Please use proxy object");const o=[],i=n[3];let l=!1;const r=i(f=>{o.push(f),s?t(o.splice(0)):a||(a=Promise.resolve().then(()=>{a=void 0,l&&t(o.splice(0))}))});return l=!0,()=>{l=!1,r()}}const b=U({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ne={state:b,subscribe:e=>k(b,()=>e(b)),push(e,t){e!==b.view&&(b.view=e,t&&(b.data=t),b.history.push(e))},reset(e){b.view=e,b.history=[e]},replace(e){b.history.length>1&&(b.history[b.history.length-1]=e,b.view=e)},goBack(){if(b.history.length>1){b.history.pop();const[e]=b.history.slice(-1);b.view=e}},setData(e){b.data=e}},v={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>v.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return v.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,s){if(v.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);return`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,s){if(!v.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);return`${n}wc?uri=${encodeURIComponent(t)}`},wait:e=>(0,L.Z)(function*(){return new Promise(t=>{setTimeout(t,e)})})(),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(v.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(v.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(v.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(v.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=ne.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},O=U({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),fe={state:O,subscribe:e=>k(O.events,()=>e(function Ae(e,t){const s=_.get(e);s||console.warn("Please use proxy object");const[n,a,o]=s;return o(n,a(),t)}(O.events[O.events.length-1]))),initialize(){O.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(O.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){O.connectedWalletId=e},click(e){if(O.enabled){const t={type:"CLICK",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}},track(e){if(O.enabled){const t={type:"TRACK",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}},view(e){if(O.enabled){const t={type:"VIEW",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}}},D=U({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),C={state:D,subscribe:e=>k(D,()=>e(D)),setChains(e){D.chains=e},setWalletConnectUri(e){D.walletConnectUri=e},setIsCustomDesktop(e){D.isCustomDesktop=e},setIsCustomMobile(e){D.isCustomMobile=e},setIsDataLoaded(e){D.isDataLoaded=e},setIsUiLoaded(e){D.isUiLoaded=e},setIsAuth(e){D.isAuth=e}},G=U({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),V={state:G,subscribe:e=>k(G,()=>e(G)),setConfig(e){var t,s;fe.initialize(),C.setChains(e.chains),C.setIsAuth(Boolean(e.enableAuthMode)),C.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),C.setIsCustomDesktop(Boolean(null==(s=e.desktopWallets)?void 0:s.length)),v.setModalVersionInStorage(),Object.assign(G,e)}};var De=Object.defineProperty,pe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,ge=(e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))Me.call(t,s)&&ge(e,s,t[s]);if(pe)for(var s of pe(t))_e.call(t,s)&&ge(e,s,t[s]);return e};const re="https://explorer-api.walletconnect.com",oe="wcm",ie="js-2.6.2";function J(e,t){return ae.apply(this,arguments)}function ae(){return(ae=(0,L.Z)(function*(e,t){const s=Ue({sdkType:oe,sdkVersion:ie},t),n=new URL(e,re);return n.searchParams.append("projectId",V.state.projectId),Object.entries(s).forEach(([a,o])=>{o&&n.searchParams.append(a,String(o))}),(yield fetch(n)).json()})).apply(this,arguments)}const R={getDesktopListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getDesktopListings",e)})(),getMobileListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getMobileListings",e)})(),getInjectedListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getInjectedListings",e)})(),getAllListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getAllListings",e)})(),getWalletImageUrl:e=>`${re}/w3m/v1/getWalletImage/${e}?projectId=${V.state.projectId}&sdkType=${oe}&sdkVersion=${ie}`,getAssetImageUrl:e=>`${re}/w3m/v1/getAssetImage/${e}?projectId=${V.state.projectId}&sdkType=${oe}&sdkVersion=${ie}`};var Se=Object.defineProperty,he=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,me=(e,t,s)=>t in e?Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;const be=v.isMobile(),M=U({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Te={state:M,getRecomendedWallets:()=>(0,L.Z)(function*(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=V.state;if("NONE"===e||"ALL"===t&&!e)return M.recomendedWallets;if(v.isArray(e)){const s={recommendedIds:e.join(",")},{listings:n}=yield R.getAllListings(s),a=Object.values(n);a.sort((o,i)=>e.indexOf(o.id)-e.indexOf(i.id)),M.recomendedWallets=a}else{const{chains:s,isAuth:n}=C.state,a=s?.join(","),o=v.isArray(t),i={page:1,sdks:n?"auth_v1":void 0,entries:v.RECOMMENDED_WALLET_AMOUNT,chains:a,version:2,excludedIds:o?t.join(","):void 0},{listings:l}=be?yield R.getMobileListings(i):yield R.getDesktopListings(i);M.recomendedWallets=Object.values(l)}return M.recomendedWallets})(),getWallets:e=>(0,L.Z)(function*(){const t=((e,t)=>{for(var s in t||(t={}))ke.call(t,s)&&me(e,s,t[s]);if(he)for(var s of he(t))Re.call(t,s)&&me(e,s,t[s]);return e})({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=V.state,{recomendedWallets:a}=M;if("ALL"===n)return M.wallets;a.length?t.excludedIds=a.map(y=>y.id).join(","):v.isArray(s)&&(t.excludedIds=s.join(",")),v.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),C.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:i}=e,{listings:l,total:g}=be?yield R.getMobileListings(t):yield R.getDesktopListings(t),r=Object.values(l),f=i?"search":"wallets";return M[f]={listings:[...M[f].listings,...r],total:g,page:o??1},{listings:r,total:g}})(),getWalletImageUrl:e=>R.getWalletImageUrl(e),getAssetImageUrl:e=>R.getAssetImageUrl(e),resetSearch(){M.search={listings:[],total:0,page:1}}},$=U({open:!1}),Ve={state:$,subscribe:e=>k($,()=>e($)),open:e=>(0,L.Z)(function*(){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=C.state;if(v.removeWalletConnectDeepLink(),C.setWalletConnectUri(e?.uri),C.setChains(e?.chains),ne.reset("ConnectWallet"),s&&n)$.open=!0,t();else{const a=setInterval(()=>{const o=C.state;o.isUiLoaded&&o.isDataLoaded&&(clearInterval(a),$.open=!0,t())},200)}})})(),close(){$.open=!1}};var $e=Object.defineProperty,ye=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,we=(e,t,s)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;const Z=U({themeMode:function Ze(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}()?"dark":"light"}),ze={state:Z,subscribe:e=>k(Z,()=>e(Z)),setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(Z.themeMode=t),s&&(Z.themeVariables=((e,t)=>{for(var s in t||(t={}))Ke.call(t,s)&&we(e,s,t[s]);if(ye)for(var s of ye(t))xe.call(t,s)&&we(e,s,t[s]);return e})({},s))}},N=U({open:!1,message:"",variant:"success"}),He={state:N,subscribe:e=>k(N,()=>e(N)),openToast(e,t){N.open=!0,N.message=e,N.variant=t},closeToast(){N.open=!1}}},41283:(Ie,H,j)=>{j.r(H),j.d(H,{WalletConnectModal:()=>x});var L=j(49671),A=j(36953);class x{constructor(P){this.openModal=A.jb.open,this.closeModal=A.jb.close,this.subscribeModal=A.jb.subscribe,this.setTheme=A.Ic.setThemeConfig,A.Ic.setThemeConfig(P),A.t0.setConfig(P),this.initUi()}initUi(){return(0,L.Z)(function*(){if(typeof window<"u"){yield j.e(390).then(j.bind(j,52390));const P=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",P),A.zb.setIsUiLoaded(!0)}})()}}}}]); \ No newline at end of file +"use strict";(self.webpackChunkangular=self.webpackChunkangular||[]).push([[283],{36953:(Ie,H,j)=>{j.d(H,{t0:()=>V,zv:()=>v,uA:()=>fe,uc:()=>Te,jb:()=>Ve,zb:()=>C,AV:()=>ne,Ic:()=>ze,Vs:()=>He});var L=j(49671);Symbol();const x=Symbol();const Y=Object.getPrototypeOf,q=new WeakMap,ee=e=>e&&(q.has(e)?q.get(e):Y(e)===Object.prototype||Y(e)===Array.prototype),ue=(e,t=!0)=>{q.set(e,t)},se=e=>"object"==typeof e&&null!==e,_=new WeakMap,B=new WeakSet,[je]=((e=Object.is,t=((r,f)=>new Proxy(r,f)),s=(r=>se(r)&&!B.has(r)&&(Array.isArray(r)||!(Symbol.iterator in r))&&!(r instanceof WeakMap)&&!(r instanceof WeakSet)&&!(r instanceof Error)&&!(r instanceof Number)&&!(r instanceof Date)&&!(r instanceof String)&&!(r instanceof RegExp)&&!(r instanceof ArrayBuffer)),n=(r=>{switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:throw r}}),a=new WeakMap,o=((r,f,y=n)=>{const p=a.get(r);if(p?.[0]===f)return p[1];const m=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r));return ue(m,!0),a.set(r,[f,m]),Reflect.ownKeys(r).forEach(w=>{if(Object.getOwnPropertyDescriptor(m,w))return;const h=Reflect.get(r,w),E={value:h,enumerable:!0,configurable:!0};if(B.has(h))ue(h,!1);else if(h instanceof Promise)delete E.value,E.get=()=>y(h);else if(_.has(h)){const[I,le]=_.get(h);E.value=o(I,le(),y)}Object.defineProperty(m,w,E)}),Object.preventExtensions(m)}),i=new WeakMap,l=[1,1],g=(r=>{if(!se(r))throw new Error("object required");const f=i.get(r);if(f)return f;let y=l[0];const p=new Set,m=(u,d=++l[0])=>{y!==d&&(y=d,p.forEach(c=>c(u,d)))};let w=l[1];const E=u=>(d,c)=>{const W=[...d];W[1]=[u,...W[1]],m(W,c)},I=new Map,ve=u=>{var d;const c=I.get(u);c&&(I.delete(u),null==(d=c[1])||d.call(c))},ce=Array.isArray(r)?[]:Object.create(Object.getPrototypeOf(r)),Q=t(ce,{deleteProperty(u,d){const c=Reflect.get(u,d);ve(d);const W=Reflect.deleteProperty(u,d);return W&&m(["delete",[d],c]),W},set(u,d,c,W){const K=Reflect.has(u,d),z=Reflect.get(u,d,W);if(K&&(e(z,c)||i.has(c)&&e(z,i.get(c))))return!0;ve(d),se(c)&&(c=(e=>ee(e)&&e[x]||null)(c)||c);let X=c;if(c instanceof Promise)c.then(S=>{c.status="fulfilled",c.value=S,m(["resolve",[d],S])}).catch(S=>{c.status="rejected",c.reason=S,m(["reject",[d],S])});else{!_.has(c)&&s(c)&&(X=g(c));const S=!B.has(X)&&_.get(X);S&&((u,d)=>{if(I.has(u))throw new Error("prop listener already exists");if(p.size){const c=d[3](E(u));I.set(u,[d,c])}else I.set(u,[d])})(d,S)}return Reflect.set(u,d,X,W),m(["set",[d],c,z]),!0}});i.set(r,Q);const Ge=[ce,(u=++l[1])=>(w!==u&&!p.size&&(w=u,I.forEach(([d])=>{const c=d[1](u);c>y&&(y=c)})),y),o,u=>(p.add(u),1===p.size&&I.forEach(([c,W],K)=>{if(W)throw new Error("remove already exists");const z=c[3](E(K));I.set(K,[c,z])}),()=>{p.delete(u),0===p.size&&I.forEach(([c,W],K)=>{W&&(W(),I.set(K,[c]))})})];return _.set(Q,Ge),Reflect.ownKeys(r).forEach(u=>{const d=Object.getOwnPropertyDescriptor(r,u);"value"in d&&(Q[u]=r[u],delete d.value,delete d.writable),Object.defineProperty(ce,u,d)}),Q}))=>[g,_,B,e,t,s,n,a,o,i,l])();function U(e={}){return je(e)}function k(e,t,s){const n=_.get(e);let a;n||console.warn("Please use proxy object");const o=[],i=n[3];let l=!1;const r=i(f=>{o.push(f),s?t(o.splice(0)):a||(a=Promise.resolve().then(()=>{a=void 0,l&&t(o.splice(0))}))});return l=!0,()=>{l=!1,r()}}const b=U({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ne={state:b,subscribe:e=>k(b,()=>e(b)),push(e,t){e!==b.view&&(b.view=e,t&&(b.data=t),b.history.push(e))},reset(e){b.view=e,b.history=[e]},replace(e){b.history.length>1&&(b.history[b.history.length-1]=e,b.view=e)},goBack(){if(b.history.length>1){b.history.pop();const[e]=b.history.slice(-1);b.view=e}},setData(e){b.data=e}},v={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile:()=>typeof window<"u"&&Boolean(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)),isAndroid:()=>v.isMobile()&&navigator.userAgent.toLowerCase().includes("android"),isIos(){const e=navigator.userAgent.toLowerCase();return v.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),isArray:e=>Array.isArray(e)&&e.length>0,formatNativeUrl(e,t,s){if(v.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);return`${n}wc?uri=${encodeURIComponent(t)}`},formatUniversalUrl(e,t,s){if(!v.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);return`${n}wc?uri=${encodeURIComponent(t)}`},wait:e=>(0,L.Z)(function*(){return new Promise(t=>{setTimeout(t,e)})})(),openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(v.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(v.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(v.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(v.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=null==(e=ne.state.data)?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},O=U({enabled:typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),userSessionId:"",events:[],connectedWalletId:void 0}),fe={state:O,subscribe:e=>k(O.events,()=>e(function Ae(e,t){const s=_.get(e);s||console.warn("Please use proxy object");const[n,a,o]=s;return o(n,a(),t)}(O.events[O.events.length-1]))),initialize(){O.enabled&&typeof(null==crypto?void 0:crypto.randomUUID)<"u"&&(O.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){O.connectedWalletId=e},click(e){if(O.enabled){const t={type:"CLICK",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}},track(e){if(O.enabled){const t={type:"TRACK",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}},view(e){if(O.enabled){const t={type:"VIEW",name:e.name,userSessionId:O.userSessionId,timestamp:Date.now(),data:e};O.events.push(t)}}},D=U({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),C={state:D,subscribe:e=>k(D,()=>e(D)),setChains(e){D.chains=e},setWalletConnectUri(e){D.walletConnectUri=e},setIsCustomDesktop(e){D.isCustomDesktop=e},setIsCustomMobile(e){D.isCustomMobile=e},setIsDataLoaded(e){D.isDataLoaded=e},setIsUiLoaded(e){D.isUiLoaded=e},setIsAuth(e){D.isAuth=e}},G=U({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),V={state:G,subscribe:e=>k(G,()=>e(G)),setConfig(e){var t,s;fe.initialize(),C.setChains(e.chains),C.setIsAuth(Boolean(e.enableAuthMode)),C.setIsCustomMobile(Boolean(null==(t=e.mobileWallets)?void 0:t.length)),C.setIsCustomDesktop(Boolean(null==(s=e.desktopWallets)?void 0:s.length)),v.setModalVersionInStorage(),Object.assign(G,e)}};var De=Object.defineProperty,pe=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,ge=(e,t,s)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))Me.call(t,s)&&ge(e,s,t[s]);if(pe)for(var s of pe(t))_e.call(t,s)&&ge(e,s,t[s]);return e};const re="https://explorer-api.walletconnect.com",oe="wcm",ie="js-2.6.2";function J(e,t){return ae.apply(this,arguments)}function ae(){return(ae=(0,L.Z)(function*(e,t){const s=Ue({sdkType:oe,sdkVersion:ie},t),n=new URL(e,re);return n.searchParams.append("projectId",V.state.projectId),Object.entries(s).forEach(([a,o])=>{o&&n.searchParams.append(a,String(o))}),(yield fetch(n)).json()})).apply(this,arguments)}const R={getDesktopListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getDesktopListings",e)})(),getMobileListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getMobileListings",e)})(),getInjectedListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getInjectedListings",e)})(),getAllListings:e=>(0,L.Z)(function*(){return J("/w3m/v1/getAllListings",e)})(),getWalletImageUrl:e=>`${re}/w3m/v1/getWalletImage/${e}?projectId=${V.state.projectId}&sdkType=${oe}&sdkVersion=${ie}`,getAssetImageUrl:e=>`${re}/w3m/v1/getAssetImage/${e}?projectId=${V.state.projectId}&sdkType=${oe}&sdkVersion=${ie}`};var Se=Object.defineProperty,he=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Re=Object.prototype.propertyIsEnumerable,me=(e,t,s)=>t in e?Se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;const be=v.isMobile(),M=U({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Te={state:M,getRecomendedWallets:()=>(0,L.Z)(function*(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=V.state;if("NONE"===e||"ALL"===t&&!e)return M.recomendedWallets;if(v.isArray(e)){const s={recommendedIds:e.join(",")},{listings:n}=yield R.getAllListings(s),a=Object.values(n);a.sort((o,i)=>e.indexOf(o.id)-e.indexOf(i.id)),M.recomendedWallets=a}else{const{chains:s,isAuth:n}=C.state,a=s?.join(","),o=v.isArray(t),i={page:1,sdks:n?"auth_v1":void 0,entries:v.RECOMMENDED_WALLET_AMOUNT,chains:a,version:2,excludedIds:o?t.join(","):void 0},{listings:l}=be?yield R.getMobileListings(i):yield R.getDesktopListings(i);M.recomendedWallets=Object.values(l)}return M.recomendedWallets})(),getWallets:e=>(0,L.Z)(function*(){const t=((e,t)=>{for(var s in t||(t={}))ke.call(t,s)&&me(e,s,t[s]);if(he)for(var s of he(t))Re.call(t,s)&&me(e,s,t[s]);return e})({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=V.state,{recomendedWallets:a}=M;if("ALL"===n)return M.wallets;a.length?t.excludedIds=a.map(y=>y.id).join(","):v.isArray(s)&&(t.excludedIds=s.join(",")),v.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),C.state.isAuth&&(t.sdks="auth_v1");const{page:o,search:i}=e,{listings:l,total:g}=be?yield R.getMobileListings(t):yield R.getDesktopListings(t),r=Object.values(l),f=i?"search":"wallets";return M[f]={listings:[...M[f].listings,...r],total:g,page:o??1},{listings:r,total:g}})(),getWalletImageUrl:e=>R.getWalletImageUrl(e),getAssetImageUrl:e=>R.getAssetImageUrl(e),resetSearch(){M.search={listings:[],total:0,page:1}}},$=U({open:!1}),Ve={state:$,subscribe:e=>k($,()=>e($)),open:e=>(0,L.Z)(function*(){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=C.state;if(v.removeWalletConnectDeepLink(),C.setWalletConnectUri(e?.uri),C.setChains(e?.chains),ne.reset("ConnectWallet"),s&&n)$.open=!0,t();else{const a=setInterval(()=>{const o=C.state;o.isUiLoaded&&o.isDataLoaded&&(clearInterval(a),$.open=!0,t())},200)}})})(),close(){$.open=!1}};var $e=Object.defineProperty,ye=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,we=(e,t,s)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;const Z=U({themeMode:function Ze(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}()?"dark":"light"}),ze={state:Z,subscribe:e=>k(Z,()=>e(Z)),setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(Z.themeMode=t),s&&(Z.themeVariables=((e,t)=>{for(var s in t||(t={}))Ke.call(t,s)&&we(e,s,t[s]);if(ye)for(var s of ye(t))xe.call(t,s)&&we(e,s,t[s]);return e})({},s))}},N=U({open:!1,message:"",variant:"success"}),He={state:N,subscribe:e=>k(N,()=>e(N)),openToast(e,t){N.open=!0,N.message=e,N.variant=t},closeToast(){N.open=!1}}},41283:(Ie,H,j)=>{j.r(H),j.d(H,{WalletConnectModal:()=>x});var L=j(49671),A=j(36953);class x{constructor(P){this.openModal=A.jb.open,this.closeModal=A.jb.close,this.subscribeModal=A.jb.subscribe,this.setTheme=A.Ic.setThemeConfig,A.Ic.setThemeConfig(P),A.t0.setConfig(P),this.initUi()}initUi(){return(0,L.Z)(function*(){if(typeof window<"u"){yield j.e(652).then(j.bind(j,45652));const P=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",P),A.zb.setIsUiLoaded(!0)}})()}}}}]); \ No newline at end of file diff --git a/390.466975e8770a6f7a.js b/390.466975e8770a6f7a.js deleted file mode 100644 index b657d6ee5..000000000 --- a/390.466975e8770a6f7a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkangular=self.webpackChunkangular||[]).push([[390],{52390:(Vl,ar,Tt)=>{Tt.r(ar),Tt.d(ar,{WcmModal:()=>kt,WcmQrCode:()=>q});var H=Tt(49671);const Yt=window,we=Yt.ShadowRoot&&(void 0===Yt.ShadyCSS||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,fe=Symbol(),cr=new WeakMap;class dr{constructor(r,n,s){if(this._$cssResult$=!0,s!==fe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=n}get styleSheet(){let r=this.o;const n=this.t;if(we&&void 0===r){const s=void 0!==n&&1===n.length;s&&(r=cr.get(n)),void 0===r&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),s&&cr.set(n,r))}return r}toString(){return this.cssText}}const C=(i,...r)=>{const n=1===i.length?i[0]:r.reduce((s,l,a)=>s+(c=>{if(!0===c._$cssResult$)return c.cssText;if("number"==typeof c)return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(l)+i[a+1],i[0]);return new dr(n,i,fe)},hr=we?i=>i:i=>i instanceof CSSStyleSheet?(r=>{let n="";for(const s of r.cssRules)n+=s.cssText;return(i=>new dr("string"==typeof i?i:i+"",void 0,fe))(n)})(i):i;var be;const Xt=window,mr=Xt.trustedTypes,Mo=mr?mr.emptyScript:"",ur=Xt.reactiveElementPolyfillSupport,ye={toAttribute(i,r){switch(r){case Boolean:i=i?Mo:null;break;case Object:case Array:i=null==i?i:JSON.stringify(i)}return i},fromAttribute(i,r){let n=i;switch(r){case Boolean:n=null!==i;break;case Number:n=null===i?null:Number(i);break;case Object:case Array:try{n=JSON.parse(i)}catch{n=null}}return n}},pr=(i,r)=>r!==i&&(r==r||i==i),xe={attribute:!0,type:String,converter:ye,reflect:!1,hasChanged:pr},_e="finalized";class ut extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(r){var n;this.finalize(),(null!==(n=this.h)&&void 0!==n?n:this.h=[]).push(r)}static get observedAttributes(){this.finalize();const r=[];return this.elementProperties.forEach((n,s)=>{const l=this._$Ep(s,n);void 0!==l&&(this._$Ev.set(l,s),r.push(l))}),r}static createProperty(r,n=xe){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(r,n),!n.noAccessor&&!this.prototype.hasOwnProperty(r)){const s="symbol"==typeof r?Symbol():"__"+r,l=this.getPropertyDescriptor(r,s,n);void 0!==l&&Object.defineProperty(this.prototype,r,l)}}static getPropertyDescriptor(r,n,s){return{get(){return this[n]},set(l){const a=this[r];this[n]=l,this.requestUpdate(r,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)||xe}static finalize(){if(this.hasOwnProperty(_e))return!1;this[_e]=!0;const r=Object.getPrototypeOf(this);if(r.finalize(),void 0!==r.h&&(this.h=[...r.h]),this.elementProperties=new Map(r.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const n=this.properties,s=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const l of s)this.createProperty(l,n[l])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(r){const n=[];if(Array.isArray(r)){const s=new Set(r.flat(1/0).reverse());for(const l of s)n.unshift(hr(l))}else void 0!==r&&n.push(hr(r));return n}static _$Ep(r,n){const s=n.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof r?r.toLowerCase():void 0}u(){var r;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(r=this.constructor.h)||void 0===r||r.forEach(n=>n(this))}addController(r){var n,s;(null!==(n=this._$ES)&&void 0!==n?n:this._$ES=[]).push(r),void 0!==this.renderRoot&&this.isConnected&&(null===(s=r.hostConnected)||void 0===s||s.call(r))}removeController(r){var n;null===(n=this._$ES)||void 0===n||n.splice(this._$ES.indexOf(r)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((r,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var r;const n=null!==(r=this.shadowRoot)&&void 0!==r?r:this.attachShadow(this.constructor.shadowRootOptions);return((i,r)=>{we?i.adoptedStyleSheets=r.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):r.forEach(n=>{const s=document.createElement("style"),l=Yt.litNonce;void 0!==l&&s.setAttribute("nonce",l),s.textContent=n.cssText,i.appendChild(s)})})(n,this.constructor.elementStyles),n}connectedCallback(){var r;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(r=this._$ES)||void 0===r||r.forEach(n=>{var s;return null===(s=n.hostConnected)||void 0===s?void 0:s.call(n)})}enableUpdating(r){}disconnectedCallback(){var r;null===(r=this._$ES)||void 0===r||r.forEach(n=>{var s;return null===(s=n.hostDisconnected)||void 0===s?void 0:s.call(n)})}attributeChangedCallback(r,n,s){this._$AK(r,s)}_$EO(r,n,s=xe){var l;const a=this.constructor._$Ep(r,s);if(void 0!==a&&!0===s.reflect){const c=(void 0!==(null===(l=s.converter)||void 0===l?void 0:l.toAttribute)?s.converter:ye).toAttribute(n,s.type);this._$El=r,null==c?this.removeAttribute(a):this.setAttribute(a,c),this._$El=null}}_$AK(r,n){var s;const l=this.constructor,a=l._$Ev.get(r);if(void 0!==a&&this._$El!==a){const c=l.getPropertyOptions(a),d="function"==typeof c.converter?{fromAttribute:c.converter}:void 0!==(null===(s=c.converter)||void 0===s?void 0:s.fromAttribute)?c.converter:ye;this._$El=a,this[a]=d.fromAttribute(n,c.type),this._$El=null}}requestUpdate(r,n,s){let l=!0;void 0!==r&&(((s=s||this.constructor.getPropertyOptions(r)).hasChanged||pr)(this[r],n)?(this._$AL.has(r)||this._$AL.set(r,n),!0===s.reflect&&this._$El!==r&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(r,s))):l=!1),!this.isUpdatePending&&l&&(this._$E_=this._$Ej())}_$Ej(){var r=this;return(0,H.Z)(function*(){r.isUpdatePending=!0;try{yield r._$E_}catch(s){Promise.reject(s)}const n=r.scheduleUpdate();return null!=n&&(yield n),!r.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((l,a)=>this[a]=l),this._$Ei=void 0);let n=!1;const s=this._$AL;try{n=this.shouldUpdate(s),n?(this.willUpdate(s),null===(r=this._$ES)||void 0===r||r.forEach(l=>{var a;return null===(a=l.hostUpdate)||void 0===a?void 0:a.call(l)}),this.update(s)):this._$Ek()}catch(l){throw n=!1,this._$Ek(),l}n&&this._$AE(s)}willUpdate(r){}_$AE(r){var n;null===(n=this._$ES)||void 0===n||n.forEach(s=>{var l;return null===(l=s.hostUpdated)||void 0===l?void 0:l.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(r){return!0}update(r){void 0!==this._$EC&&(this._$EC.forEach((n,s)=>this._$EO(s,this[s],n)),this._$EC=void 0),this._$Ek()}updated(r){}firstUpdated(r){}}var $e;ut[_e]=!0,ut.elementProperties=new Map,ut.elementStyles=[],ut.shadowRootOptions={mode:"open"},ur?.({ReactiveElement:ut}),(null!==(be=Xt.reactiveElementVersions)&&void 0!==be?be:Xt.reactiveElementVersions=[]).push("1.6.2");const Jt=window,pt=Jt.trustedTypes,gr=pt?pt.createPolicy("lit-html",{createHTML:i=>i}):void 0,te="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,Ae="?"+Z,So=`<${Ae}>`,tt=document,Mt=()=>tt.createComment(""),St=i=>null===i||"object"!=typeof i&&"function"!=typeof i,vr=Array.isArray,wr=i=>vr(i)||"function"==typeof i?.[Symbol.iterator],Ce="[ \t\n\f\r]",Pt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,fr=/-->/g,br=/>/g,et=RegExp(`>|${Ce}(?:([^\\s"'>=/]+)(${Ce}*=${Ce}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),yr=/'/g,xr=/"/g,_r=/^(?:script|style|textarea|title)$/i,$r=i=>(r,...n)=>({_$litType$:i,strings:r,values:n}),R=($r(1),$r(2)),gt=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),Ar=new WeakMap,rt=tt.createTreeWalker(tt,129,null,!1);function Cr(i,r){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==gr?gr.createHTML(r):r}const Er=(i,r)=>{const n=i.length-1,s=[];let l,a=2===r?"":"",c=Pt;for(let d=0;d"===v[0]?(c=l??Pt,g=-1):void 0===v[1]?g=-2:(g=c.lastIndex-v[2].length,u=v[1],c=void 0===v[3]?et:'"'===v[3]?xr:yr):c===xr||c===yr?c=et:c===fr||c===br?c=Pt:(c=et,l=void 0);const x=c===et&&i[d+1].startsWith("/>")?" ":"";a+=c===Pt?h+So:g>=0?(s.push(u),h.slice(0,g)+te+h.slice(g)+Z+x):h+Z+(-2===g?(s.push(void 0),d):x)}return[Cr(i,a+(i[n]||"")+(2===r?"":"")),s]};class Rt{constructor({strings:r,_$litType$:n},s){let l;this.parts=[];let a=0,c=0;const d=r.length-1,h=this.parts,[u,v]=Er(r,n);if(this.el=Rt.createElement(u,s),rt.currentNode=this.el.content,2===n){const g=this.el.content,w=g.firstChild;w.remove(),g.append(...w.childNodes)}for(;null!==(l=rt.nextNode())&&h.length0){l.textContent=pt?pt.emptyScript:"";for(let x=0;x2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=M}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(r,n=this,s,l){const a=this.strings;let c=!1;if(void 0===a)r=ot(this,r,n,0),c=!St(r)||r!==this._$AH&&r!==gt,c&&(this._$AH=r);else{const d=r;let h,u;for(r=a[0],h=0;hi}):void 0,re="$lit$",B=`lit$${(Math.random()+"").slice(9)}$`,Oe="?"+B,Ro=`<${Oe}>`,it=document,Nt=()=>it.createComment(""),Wt=i=>null===i||"object"!=typeof i&&"function"!=typeof i,Rr=Array.isArray,Lr=i=>Rr(i)||"function"==typeof i?.[Symbol.iterator],ke="[ \t\n\f\r]",jt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Nr=/-->/g,Wr=/>/g,nt=RegExp(`>|${ke}(?:([^\\s"'>=/]+)(${ke}*=${ke}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),jr=/'/g,Dr=/"/g,Hr=/^(?:script|style|textarea|title)$/i,zr=i=>(r,...n)=>({_$litType$:i,strings:r,values:n}),p=zr(1),oe=zr(2),ft=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),Ur=new WeakMap,lt=it.createTreeWalker(it,129,null,!1);function Zr(i,r){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Pr?Pr.createHTML(r):r}const Br=(i,r)=>{const n=i.length-1,s=[];let l,a=2===r?"":"",c=jt;for(let d=0;d"===v[0]?(c=l??jt,g=-1):void 0===v[1]?g=-2:(g=c.lastIndex-v[2].length,u=v[1],c=void 0===v[3]?nt:'"'===v[3]?Dr:jr):c===Dr||c===jr?c=nt:c===Nr||c===Wr?c=jt:(c=nt,l=void 0);const x=c===nt&&i[d+1].startsWith("/>")?" ":"";a+=c===jt?h+Ro:g>=0?(s.push(u),h.slice(0,g)+re+h.slice(g)+B+x):h+B+(-2===g?(s.push(void 0),d):x)}return[Zr(i,a+(i[n]||"")+(2===r?"":"")),s]};class Dt{constructor({strings:r,_$litType$:n},s){let l;this.parts=[];let a=0,c=0;const d=r.length-1,h=this.parts,[u,v]=Br(r,n);if(this.el=Dt.createElement(u,s),lt.currentNode=this.el.content,2===n){const g=this.el.content,w=g.firstChild;w.remove(),g.append(...w.childNodes)}for(;null!==(l=lt.nextNode())&&h.length0){l.textContent=wt?wt.emptyScript:"";for(let x=0;x2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(r,n=this,s,l){const a=this.strings;let c=!1;if(void 0===a)r=st(this,r,n,0),c=!Wt(r)||r!==this._$AH&&r!==ft,c&&(this._$AH=r);else{const d=r;let h,u;for(r=a[0],h=0;h{var s,l;const a=null!==(s=n?.renderBefore)&&void 0!==s?s:r;let c=a._$litPart$;if(void 0===c){const d=null!==(l=n?.renderBefore)&&void 0!==l?l:null;a._$litPart$=c=new bt(r.insertBefore(Nt(),d),d,void 0,n??{})}return c._$AI(i),c})(n,this.renderRoot,this.renderOptions)}connectedCallback(){var r;super.connectedCallback(),null===(r=this._$Do)||void 0===r||r.setConnected(!0)}disconnectedCallback(){var r;super.disconnectedCallback(),null===(r=this._$Do)||void 0===r||r.setConnected(!1)}render(){return ft}}_.finalized=!0,_._$litElement$=!0,null===(Ie=globalThis.litElementHydrateSupport)||void 0===Ie||Ie.call(globalThis,{LitElement:_});(0,globalThis.litElementPolyfillSupport)?.({LitElement:_});(null!==(Te=globalThis.litElementVersions)&&void 0!==Te?Te:globalThis.litElementVersions=[]).push("3.3.2");const A=i=>r=>{return"function"==typeof r?(n=i,s=r,customElements.define(n,s),s):((n,s)=>{const{kind:l,elements:a}=s;return{kind:l,elements:a,finisher(c){customElements.define(n,c)}}})(i,r);var n,s},Wo=(i,r)=>"method"===r.kind&&r.descriptor&&!("value"in r.descriptor)?{...r,finisher(n){n.createProperty(r.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:r.key,initializer(){"function"==typeof r.initializer&&(this[r.key]=r.initializer.call(this))},finisher(n){n.createProperty(r.key,i)}},jo=(i,r,n)=>{r.constructor.createProperty(n,i)};function y(i){return(r,n)=>void 0!==n?jo(i,r,n):Wo(i,r)}function D(i){return y({...i,state:!0})}var Me;null===(Me=window.HTMLSlotElement)||void 0===Me||Me.prototype.assignedElements;const Ho_ATTRIBUTE=1;class Uo{constructor(r){}get _$AU(){return this._$AM._$AU}_$AT(r,n,s){this._$Ct=r,this._$AM=n,this._$Ci=s}_$AS(r,n){return this.update(r,n)}update(r,n){return this.render(...n)}}const V=(i=class extends Uo{constructor(i){var r;if(super(i),i.type!==Ho_ATTRIBUTE||"class"!==i.name||(null===(r=i.strings)||void 0===r?void 0:r.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(r=>i[r]).join(" ")+" "}update(i,[r]){var n,s;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(a=>""!==a)));for(const a in r)r[a]&&(null===(n=this.nt)||void 0===n||!n.has(a))&&this.it.add(a);return this.render(r)}const l=i.element.classList;this.it.forEach(a=>{a in r||(l.remove(a),this.it.delete(a))});for(const a in r){const c=!!r[a];c===this.it.has(a)||null!==(s=this.nt)&&void 0!==s&&s.has(a)||(c?(l.add(a),this.it.add(a)):(l.remove(a),this.it.delete(a)))}return gt}},(...r)=>({_$litDirective$:i,values:r}));var i,m=Tt(36953);const z={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},zt={ms:i=>1e3*i,s:i=>i/1e3},Xr=()=>{},K=i=>i;function Jr(i,r=!0){if(i&&"finished"!==i.playState)try{i.stop?i.stop():(r&&i.commitStyles(),i.cancel())}catch{}}const Zo=i=>i(),to=(i,r,n=z.duration)=>new Proxy({animations:i.map(Zo).filter(Boolean),duration:n,options:r},Vo),Vo={get:(i,r)=>{const n=(i=>i.animations[0])(i);switch(r){case"duration":return i.duration;case"currentTime":return zt.s(n?.[r]||0);case"playbackRate":case"playState":return n?.[r];case"finished":return i.finished||(i.finished=Promise.all(i.animations.map(Fo)).catch(Xr)),i.finished;case"stop":return()=>{i.animations.forEach(s=>Jr(s))};case"forEachNative":return s=>{i.animations.forEach(l=>s(l,i))};default:return typeof n?.[r]>"u"?void 0:()=>i.animations.forEach(s=>s[r]())}},set:(i,r,n)=>{switch(r){case"currentTime":n=zt.ms(n);case"currentTime":case"playbackRate":for(let s=0;si.finished,Se=i=>"object"==typeof i&&Boolean(i.createAnimation),ie=i=>"number"==typeof i,yt=i=>Array.isArray(i)&&!ie(i[0]),eo=(i,r,n)=>-n*i+n*r+i,Pe=(i,r,n)=>r-i==0?1:(n-i)/(r-i);function ro(i,r){const n=i[i.length-1];for(let s=1;s<=r;s++){const l=Pe(0,r,s);i.push(eo(n,1,l))}}const Ko=(i,r,n)=>{const s=r-i;return((n-i)%s+s)%s+i};const oo=(i,r,n)=>Math.min(Math.max(n,i),r);function Go(i,r=function qo(i){const r=[0];return ro(r,i-1),r}(i.length),n=K){const s=i.length,l=s-r.length;return l>0&&ro(r,l),a=>{let c=0;for(;c(((1-3*n+3*r)*i+(3*n-6*r))*i+3*r)*i,Yo=1e-7,Xo=12;function Ut(i,r,n,s){if(i===r&&n===s)return K;const l=a=>function Jo(i,r,n,s,l){let a,c,d=0;do{c=r+(n-r)/2,a=io(c,s,l)-i,a>0?n=c:r=c}while(Math.abs(a)>Yo&&++d0===a||1===a?a:io(l(a),r,s)}const ti=(i,r="end")=>n=>{const s=(n="end"===r?Math.min(n,.999):Math.max(n,.001))*i,l="end"===r?Math.floor(s):Math.ceil(s);return oo(0,1,l/i)},xt=i=>"function"==typeof i,no=i=>Array.isArray(i)&&ie(i[0]),lo={ease:Ut(.25,.1,.25,1),"ease-in":Ut(.42,0,1,1),"ease-in-out":Ut(.42,0,.58,1),"ease-out":Ut(0,0,.58,1)},ei=/\((.*?)\)/;function so(i){if(xt(i))return i;if(no(i))return Ut(...i);if(lo[i])return lo[i];if(i.startsWith("steps")){const r=ei.exec(i);if(r){const n=r[1].split(",");return ti(parseFloat(n[0]),n[1].trim())}}return K}class ao{constructor(r,n=[0,1],{easing:s,duration:l=z.duration,delay:a=z.delay,endDelay:c=z.endDelay,repeat:d=z.repeat,offset:h,direction:u="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=K,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((g,w)=>{this.resolve=g,this.reject=w}),s=s||z.easing,Se(s)){const g=s.createAnimation(n);s=g.easing,n=g.keyframes||n,l=g.duration||l}this.repeat=d,this.easing=yt(s)?K:so(s),this.updateDuration(l);const v=Go(n,h,yt(s)?s.map(so):K);this.tick=g=>{var w;let x=0;x=void 0!==this.pauseTime?this.pauseTime:(g-this.startTime)*this.rate,this.t=x,x/=1e3,x=Math.max(x-a,0),"finished"===this.playState&&void 0===this.pauseTime&&(x=this.totalDuration);const k=x/this.duration;let b=Math.floor(k),I=k%1;!I&&k>=1&&(I=1),1===I&&b--;const O=b%2;("reverse"===u||"alternate"===u&&O||"alternate-reverse"===u&&!O)&&(I=1-I);const S=x>=this.totalDuration?1:Math.min(I,1),W=v(this.easing(S));r(W),void 0===this.pauseTime&&("finished"===this.playState||x>=this.totalDuration+c)?(this.playState="finished",null===(w=this.resolve)||void 0===w||w.call(this,W)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const r=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=r-this.pauseTime:this.startTime||(this.startTime=r),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var r;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(r=this.reject)||void 0===r||r.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(r){this.duration=r,this.totalDuration=r*(this.repeat+1)}get currentTime(){return this.t}set currentTime(r){void 0!==this.pauseTime||0===this.rate?this.pauseTime=r:this.startTime=performance.now()-r/this.rate}get playbackRate(){return this.rate}set playbackRate(r){this.rate=r}}var co=function(){};class ri{setAnimation(r){this.animation=r,r?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Re=new WeakMap;function ho(i){return Re.has(i)||Re.set(i,{transforms:[],values:new Map}),Re.get(i)}const ni=["","X","Y","Z"],ne={x:"translateX",y:"translateY",z:"translateZ"},mo={syntax:"",initialValue:"0deg",toDefaultUnit:i=>i+"deg"},si={translate:{syntax:"",initialValue:"0px",toDefaultUnit:i=>i+"px"},rotate:mo,scale:{syntax:"",initialValue:1,toDefaultUnit:K},skew:mo},Zt=new Map,Le=i=>`--motion-${i}`,le=["x","y","z"];["translate","scale","rotate","skew"].forEach(i=>{ni.forEach(r=>{le.push(i+r),Zt.set(Le(i+r),si[i])})});const ai=(i,r)=>le.indexOf(i)-le.indexOf(r),ci=new Set(le),uo=i=>ci.has(i),di=(i,r)=>{ne[r]&&(r=ne[r]);const{transforms:n}=ho(i);(function ii(i,r){-1===i.indexOf(r)&&i.push(r)})(n,r),i.style.transform=hi(n)},hi=i=>i.sort(ai).reduce(mi,"").trim(),mi=(i,r)=>`${i} ${r}(var(${Le(r)}))`,Ne=i=>i.startsWith("--"),po=new Set;const We=(i,r)=>document.createElement("div").animate(i,r),go={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{We({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(We({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{We({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},je={},_t={};for(const i in go)_t[i]=()=>(void 0===je[i]&&(je[i]=go[i]()),je[i]);const vo=(i,r)=>xt(i)?_t.linearEasing()?`linear(${((i,r)=>{let n="";const s=Math.round(r/.015);for(let l=0;l`cubic-bezier(${i}, ${r}, ${n}, ${s})`;const fi=i=>Array.isArray(i)?i:[i];function De(i){return ne[i]&&(i=ne[i]),uo(i)?Le(i):i}const se={get:(i,r)=>{r=De(r);let n=Ne(r)?i.style.getPropertyValue(r):getComputedStyle(i)[r];if(!n&&0!==n){const s=Zt.get(r);s&&(n=s.initialValue)}return n},set:(i,r,n)=>{r=De(r),Ne(r)?i.style.setProperty(r,n):i.style[r]=n}},bi=i=>"string"==typeof i;function _i(i,r,n,s={},l){const a=function xi(){return window.__MOTION_DEV_TOOLS_RECORD}(),c=!1!==s.record&&a;let d,{duration:h=z.duration,delay:u=z.delay,endDelay:v=z.endDelay,repeat:g=z.repeat,easing:w=z.easing,persist:x=!1,direction:k,offset:b,allowWebkitAcceleration:I=!1}=s;const O=ho(i),S=uo(r);let W=_t.waapi();S&&di(i,r);const N=De(r),ge=function oi(i,r){return i.has(r)||i.set(r,new ri),i.get(r)}(O.values,N),J=Zt.get(N);return Jr(ge.animation,!(Se(w)&&ge.generator)&&!1!==s.record),()=>{const ve=()=>{var T,Gt;return null!==(Gt=null!==(T=se.get(i,N))&&void 0!==T?T:J?.initialValue)&&void 0!==Gt?Gt:0};let P=function wi(i,r){for(let n=0;nc+a)}return s}(P,J);if(Se(w)){const T=w.createAnimation(P,"opacity"!==r,ve,N,ge);w=T.easing,P=T.keyframes||P,h=T.duration||h}if(Ne(N)&&(_t.cssRegisterProperty()?function ui(i){if(!po.has(i)){po.add(i);try{const{syntax:r,initialValue:n}=Zt.has(i)?Zt.get(i):{};CSS.registerProperty({name:i,inherits:!1,syntax:r,initialValue:n})}catch{}}}(N):W=!1),S&&!_t.linearEasing()&&(xt(w)||yt(w)&&w.some(xt))&&(W=!1),W){J&&(P=P.map(mt=>ie(mt)?J.toDefaultUnit(mt):mt)),1===P.length&&(!_t.partialKeyframes()||c)&&P.unshift(ve());const T={delay:zt.ms(u),duration:zt.ms(h),endDelay:zt.ms(v),easing:yt(w)?void 0:vo(w,h),direction:k,iterations:g+1,fill:"both"};d=i.animate({[N]:P,offset:b,easing:yt(w)?w.map(mt=>vo(mt,h)):void 0},T),d.finished||(d.finished=new Promise((mt,Bl)=>{d.onfinish=mt,d.oncancel=Bl}));const Gt=P[P.length-1];d.finished.then(()=>{x||(se.set(i,N,Gt),d.cancel())}).catch(Xr),I||(d.playbackRate=1.000001)}else if(l&&S)P=P.map(T=>"string"==typeof T?parseFloat(T):T),1===P.length&&P.unshift(parseFloat(ve())),d=new l(T=>{se.set(i,N,ko?ko(T):T)},P,Object.assign(Object.assign({},s),{duration:h,easing:w}));else{const T=P[P.length-1];se.set(i,N,J&&ie(T)?J.toDefaultUnit(T):T)}return c&&a(i,r,P,{duration:h,delay:u,easing:w,repeat:g,offset:b},"motion-one"),ge.setAnimation(d),d}}const $i=(i,r)=>i[r]?Object.assign(Object.assign({},i),i[r]):Object.assign({},i);function Ei(i,r,n){return xt(i)?i(r,n):i}const ki=function Oi(i){return function(n,s,l={}){n=function Ai(i,r){var n;return"string"==typeof i?r?(null!==(n=r[i])&&void 0!==n||(r[i]=document.querySelectorAll(i)),i=r[i]):i=document.querySelectorAll(i):i instanceof Element&&(i=[i]),Array.from(i||[])}(n);const a=n.length;co(Boolean(a),"No valid element provided."),co(Boolean(s),"No keyframes defined.");const c=[];for(let d=0;d{const n=new ao(i,[0,1],r);return n.finished.catch(()=>{}),n}],r,r.duration)}function at(i,r,n){return(xt(i)?Ii:ki)(i,r,n)}const j=i=>i??M;var Ti=Tt(3259),Mi=Object.defineProperty,wo=Object.getOwnPropertySymbols,Si=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable,fo=(i,r,n)=>r in i?Mi(i,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[r]=n,He=(i,r)=>{for(var n in r||(r={}))Si.call(r,n)&&fo(i,n,r[n]);if(wo)for(var n of wo(r))Pi.call(r,n)&&fo(i,n,r[n]);return i};const $={getPreset:i=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[i]),setTheme(){const i=document.querySelector(":root"),{themeVariables:r}=m.Ic.state;if(i){const n=He(He(He({},function Ri(){var i;const n={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(i=m.Ic.state.themeMode)?i:"dark"];return{"--wcm-color-fg-1":n.foreground[1],"--wcm-color-fg-2":n.foreground[2],"--wcm-color-fg-3":n.foreground[3],"--wcm-color-bg-1":n.background[1],"--wcm-color-bg-2":n.background[2],"--wcm-color-bg-3":n.background[3],"--wcm-color-overlay":n.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),r);Object.entries(n).forEach(([s,l])=>i.style.setProperty(s,l))}},globalCss:C`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Li=C`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Ni=Object.defineProperty,Wi=Object.getOwnPropertyDescriptor,$t=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Wi(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Ni(r,n,l),l};let Q=class extends _{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const i={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let r="inverse";return"ghost"===this.variant&&(r="secondary"),"outline"===this.variant&&(r="accent"),p``}};Q.styles=[$.globalCss,Li],$t([y({type:Boolean})],Q.prototype,"disabled",2),$t([y()],Q.prototype,"iconLeft",2),$t([y()],Q.prototype,"iconRight",2),$t([y()],Q.prototype,"onClick",2),$t([y()],Q.prototype,"variant",2),Q=$t([A("wcm-button")],Q);const ji=C`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var Di=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,ze=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Hi(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Di(r,n,l),l};let Bt=class extends _{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const i={"wcm-secondary":"secondary"===this.variant};return p``}};Bt.styles=[$.globalCss,ji],ze([y({type:Boolean})],Bt.prototype,"disabled",2),ze([y()],Bt.prototype,"variant",2),Bt=ze([A("wcm-button-big")],Bt);const zi=C`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var Ui=Object.defineProperty,Zi=Object.getOwnPropertyDescriptor;let Ue=class extends _{render(){return p`
`}};Ue.styles=[$.globalCss,zi],Ue=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Zi(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Ui(r,n,l),l})([A("wcm-info-footer")],Ue);const E={CROSS_ICON:R``,WALLET_CONNECT_LOGO:R``,WALLET_CONNECT_ICON:R``,WALLET_CONNECT_ICON_COLORED:R``,BACK_ICON:R``,COPY_ICON:R``,RETRY_ICON:R``,DESKTOP_ICON:R``,MOBILE_ICON:R``,ARROW_DOWN_ICON:R``,ARROW_UP_RIGHT_ICON:R``,ARROW_RIGHT_ICON:R``,QRCODE_ICON:R``,SCAN_ICON:R``,CHECKMARK_ICON:R``,SEARCH_ICON:R``,WALLET_PLACEHOLDER:R``,GLOBE_ICON:R``},Vi=C`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var Fi=Object.defineProperty,qi=Object.getOwnPropertyDescriptor;let Ze=class extends _{render(){return p`
${E.WALLET_CONNECT_LOGO}
`}};Ze.styles=[$.globalCss,Vi],Ze=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?qi(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Fi(r,n,l),l})([A("wcm-modal-backcard")],Ze);const Qi=C`main{padding:20px;padding-top:0;width:100%}`;var Gi=Object.defineProperty,Yi=Object.getOwnPropertyDescriptor;let Be=class extends _{render(){return p`
`}};Be.styles=[$.globalCss,Qi],Be=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Yi(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Gi(r,n,l),l})([A("wcm-modal-content")],Be);const Ji=C`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var tn=Object.defineProperty,en=Object.getOwnPropertyDescriptor;let Ve=class extends _{render(){return p`
`}};Ve.styles=[$.globalCss,Ji],Ve=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?en(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&tn(r,n,l),l})([A("wcm-modal-footer")],Ve);const on=C`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var nn=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,Vt=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?ln(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&nn(r,n,l),l};let ct=class extends _{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return p``}actionBtnTemplate(){return p``}render(){const i={"wcm-border":this.border},r=m.AV.state.history.length>1,n=this.title?p`${this.title}`:p``;return p`
${r?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}
`}};ct.styles=[$.globalCss,on],Vt([y()],ct.prototype,"title",2),Vt([y()],ct.prototype,"onAction",2),Vt([y()],ct.prototype,"actionIcon",2),Vt([y({type:Boolean})],ct.prototype,"border",2),ct=Vt([A("wcm-modal-header")],ct);const f={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(i,r){const n=i.renderRoot.querySelector(r);if(!n)throw new Error(`${r} not found`);return n},getWalletIcon({id:i,image_id:r}){const{walletImages:n}=m.t0.state;return null!=n&&n[i]?n[i]:r?m.uc.getWalletImageUrl(r):""},getWalletName:(i,r=!1)=>r&&i.length>8?`${i.substring(0,8)}..`:i,isMobileAnimation:()=>window.innerWidth<=f.MOBILE_BREAKPOINT,preloadImage:i=>(0,H.Z)(function*(){const r=new Promise((n,s)=>{const l=new Image;l.onload=n,l.onerror=s,l.crossOrigin="anonymous",l.src=i});return Promise.race([r,m.zv.wait(3e3)])})(),getErrorMessage:i=>i instanceof Error?i.message:"Unknown Error",debounce(i,r=500){let n;return(...s)=>{n&&clearTimeout(n),n=setTimeout(function l(){i(...s)},r)}},handleMobileLinking(i){const{walletConnectUri:r}=m.zb.state,{mobile:n,name:s}=i,l=n?.native,a=n?.universal;f.setRecentWallet(i),r&&function c(d){let h="";l?h=m.zv.formatUniversalUrl(l,d,s):a&&(h=m.zv.formatNativeUrl(a,d,s)),m.zv.openHref(h,"_self")}(r)},handleAndroidLinking(){const{walletConnectUri:i}=m.zb.state;i&&(m.zv.setWalletConnectAndroidDeepLink(i),m.zv.openHref(i,"_self"))},handleUriCopy:()=>(0,H.Z)(function*(){const{walletConnectUri:i}=m.zb.state;if(i)try{yield navigator.clipboard.writeText(i),m.Vs.openToast("Link copied","success")}catch{m.Vs.openToast("Failed to copy","error")}})(),getCustomImageUrls(){const{walletImages:i}=m.t0.state,r=Object.values(i??{});return Object.values(r)},truncate:(i,r=8)=>i.length<=r?i:`${i.substring(0,4)}...${i.substring(i.length-4)}`,setRecentWallet(i){try{localStorage.setItem(f.WCM_RECENT_WALLET_DATA,JSON.stringify(i))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const i=localStorage.getItem(f.WCM_RECENT_WALLET_DATA);return i?JSON.parse(i):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(i,r)=>i.toUpperCase().includes(r.toUpperCase()),openWalletExplorerUrl(){m.zv.openHref(f.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:i,mobile:r}=m.zv.getWalletRouterData(),n=Boolean(i?.native),s=Boolean(i?.universal);return{isDesktop:n,isMobile:Boolean(r?.native)||Boolean(r?.universal),isWeb:s}},goToConnectingView(i){m.AV.setData({Wallet:i});const r=m.zv.isMobile(),{isDesktop:n,isWeb:s,isMobile:l}=f.getCachedRouterWalletPlatforms();r?l?m.AV.push("MobileConnecting"):s?m.AV.push("WebConnecting"):m.AV.push("InstallWallet"):n?m.AV.push("DesktopConnecting"):s?m.AV.push("WebConnecting"):l?m.AV.push("MobileQrcodeConnecting"):m.AV.push("InstallWallet")}},sn=C`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var an=Object.defineProperty,cn=Object.getOwnPropertyDescriptor,Fe=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?cn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&an(r,n,l),l};let Ft=class extends _{constructor(){super(),this.view=m.AV.state.view,this.prevView=m.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=m.AV.subscribe(i=>{this.view!==i.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([i])=>{const r=`${i.contentRect.height}px`;"0px"!==this.oldHeight&&at(this.routerEl,{height:[this.oldHeight,r]},{duration:.2}),this.oldHeight=r}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var i,r;null==(i=this.unsubscribe)||i.call(this),null==(r=this.resizeObserver)||r.disconnect()}get routerEl(){return f.getShadowRootElement(this,".wcm-router")}get contentEl(){return f.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return p``;case"DesktopConnecting":return p``;case"MobileConnecting":return p``;case"WebConnecting":return p``;case"MobileQrcodeConnecting":return p``;case"WalletExplorer":return p``;case"Qrcode":return p``;case"InstallWallet":return p``;default:return p`
Not Found
`}}onChangeRoute(){var i=this;return(0,H.Z)(function*(){yield at(i.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,i.view=m.AV.state.view,at(i.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})})()}render(){return p`
${this.viewTemplate()}
`}};Ft.styles=[$.globalCss,sn],Fe([D()],Ft.prototype,"view",2),Fe([D()],Ft.prototype,"prevView",2),Ft=Fe([A("wcm-modal-router")],Ft);const dn=C`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var hn=Object.defineProperty,mn=Object.getOwnPropertyDescriptor,yo=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?mn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&hn(r,n,l),l};let ae=class extends _{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=m.Vs.subscribe(i=>{i.open?(this.open=!0,this.timeout=setTimeout(()=>m.Vs.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var i;null==(i=this.unsubscribe)||i.call(this),clearTimeout(this.timeout),m.Vs.closeToast()}render(){const{message:i,variant:r}=m.Vs.state,n={"wcm-success":"success"===r,"wcm-error":"error"===r};return this.open?p`
${"success"===r?E.CHECKMARK_ICON:null} ${"error"===r?E.CROSS_ICON:null}${i}
`:null}};ae.styles=[$.globalCss,dn],yo([D()],ae.prototype,"open",2),ae=yo([A("wcm-modal-toast")],ae);const un=.1;function qe(i,r,n){return i!==r&&(i-r<0?r-i:i-r)<=n+un}const gn={generate(i,r,n){const s="#141414",a=[],c=function pn(i,r){const n=Array.prototype.slice.call(Ti.create(i,{errorCorrectionLevel:r}).modules.data,0),s=Math.sqrt(n.length);return n.reduce((l,a,c)=>(c%s==0?l.push([a]):l[l.length-1].push(a))&&l,[])}(i,"Q"),d=r/c.length,h=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];h.forEach(({x:k,y:b})=>{const I=(c.length-7)*d*k,O=(c.length-7)*d*b;for(let W=0;W`)}});const u=Math.floor((n+25)/d),v=c.length/2-u/2,g=c.length/2+u/2-1,w=[];c.forEach((k,b)=>{k.forEach((I,O)=>{if(c[b][O]&&!(b<7&&O<7||b>c.length-8&&O<7||b<7&&O>c.length-8)&&!(b>v&&bv&&O{x[k]?x[k].push(b):x[k]=[b]}),Object.entries(x).map(([k,b])=>{const I=b.filter(O=>b.every(S=>!qe(O,S,d)));return[Number(k),I]}).forEach(([k,b])=>{b.forEach(I=>{a.push(oe``)})}),Object.entries(x).filter(([k,b])=>b.length>1).map(([k,b])=>{const I=b.filter(O=>b.some(S=>qe(O,S,d)));return[Number(k),I]}).map(([k,b])=>{b.sort((O,S)=>OW.some(N=>qe(O,N,d)));S?S.push(O):I.push([O])}return[k,I.map(O=>[O[0],O[O.length-1]])]}).forEach(([k,b])=>{b.forEach(([I,O])=>{a.push(oe``)})}),a}},vn=C`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var wn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,At=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?fn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&wn(r,n,l),l};let q=class extends _{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const i="light"===m.Ic.state.themeMode?this.size:this.size-36;return oe`${gn.generate(this.uri,i,i/4)}`}render(){const i={"wcm-dark":"dark"===m.Ic.state.themeMode};return p`
${this.walletId||this.imageUrl?p``:E.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};q.styles=[$.globalCss,vn],At([y()],q.prototype,"uri",2),At([y({type:Number})],q.prototype,"size",2),At([y()],q.prototype,"imageId",2),At([y()],q.prototype,"walletId",2),At([y()],q.prototype,"imageUrl",2),q=At([A("wcm-qrcode")],q);const bn=C`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var yn=Object.defineProperty,xn=Object.getOwnPropertyDescriptor,_o=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?xn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&yn(r,n,l),l};let ce=class extends _{constructor(){super(...arguments),this.onChange=()=>null}render(){return p` ${E.SEARCH_ICON}`}};ce.styles=[$.globalCss,bn],_o([y()],ce.prototype,"onChange",2),ce=_o([A("wcm-search-input")],ce);const _n=C`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var $n=Object.defineProperty,An=Object.getOwnPropertyDescriptor;let Ke=class extends _{render(){return p``}};Ke.styles=[$.globalCss,_n],Ke=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?An(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&$n(r,n,l),l})([A("wcm-spinner")],Ke);const En=C`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var On=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,Qe=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?kn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&On(r,n,l),l};let qt=class extends _{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const i={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return p``}};qt.styles=[$.globalCss,En],Qe([y()],qt.prototype,"variant",2),Qe([y()],qt.prototype,"color",2),qt=Qe([A("wcm-text")],qt);const In=C`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Tn=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,G=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Mn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Tn(r,n,l),l};let U=class extends _{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?p`RECENT`:this.installed?p`INSTALLED`:null}handleClick(){m.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var i;return p``}};U.styles=[$.globalCss,In],G([y()],U.prototype,"onClick",2),G([y()],U.prototype,"name",2),G([y()],U.prototype,"walletId",2),G([y()],U.prototype,"label",2),G([y()],U.prototype,"imageId",2),G([y({type:Boolean})],U.prototype,"installed",2),G([y({type:Boolean})],U.prototype,"recent",2),U=G([A("wcm-wallet-button")],U);const Sn=C`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var Pn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,de=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Rn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Pn(r,n,l),l};let Ct=class extends _{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var i;const r=null!=(i=this.imageUrl)&&i.length?this.imageUrl:f.getWalletIcon({id:this.walletId,image_id:this.imageId});return p`${r.length?p`
${this.id}
`:E.WALLET_PLACEHOLDER}`}};Ct.styles=[$.globalCss,Sn],de([y()],Ct.prototype,"walletId",2),de([y()],Ct.prototype,"imageId",2),de([y()],Ct.prototype,"imageUrl",2),Ct=de([A("wcm-wallet-image")],Ct);var Ln=Object.defineProperty,Nn=Object.getOwnPropertyDescriptor,$o=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Nn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Ln(r,n,l),l};let Ge=class extends _{constructor(){super(),this.preload=!0,this.preloadData()}loadImages(i){return(0,H.Z)(function*(){try{null!=i&&i.length&&(yield Promise.all(i.map(function(){var r=(0,H.Z)(function*(n){return f.preloadImage(n)});return function(n){return r.apply(this,arguments)}}())))}catch{console.info("Unsuccessful attempt at preloading some images",i)}})()}preloadListings(){var i=this;return(0,H.Z)(function*(){if(m.t0.state.enableExplorer){yield m.uc.getRecomendedWallets(),m.zb.setIsDataLoaded(!0);const{recomendedWallets:r}=m.uc.state,n=r.map(s=>f.getWalletIcon(s));yield i.loadImages(n)}else m.zb.setIsDataLoaded(!0)})()}preloadCustomImages(){var i=this;return(0,H.Z)(function*(){const r=f.getCustomImageUrls();yield i.loadImages(r)})()}preloadData(){var i=this;return(0,H.Z)(function*(){try{i.preload&&(i.preload=!1,yield Promise.all([i.preloadListings(),i.preloadCustomImages()]))}catch(r){console.error(r),m.Vs.openToast("Failed preloading","error")}})()}};$o([D()],Ge.prototype,"preload",2),Ge=$o([A("wcm-explorer-context")],Ge);var Wn=Object.defineProperty,jn=Object.getOwnPropertyDescriptor;let Ao=class extends _{constructor(){super(),this.unsubscribeTheme=void 0,$.setTheme(),this.unsubscribeTheme=m.Ic.subscribe($.setTheme)}disconnectedCallback(){var i;null==(i=this.unsubscribeTheme)||i.call(this)}};Ao=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?jn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Wn(r,n,l),l})([A("wcm-theme-context")],Ao);const Hn=C`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var zn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor;let Ye=class extends _{onGoToQrcode(){m.AV.push("Qrcode")}render(){const{recomendedWallets:i}=m.uc.state,r=[...i,...i],n=2*m.zv.RECOMMENDED_WALLET_AMOUNT;return p`
${E.MOBILE_ICON}WalletConnect
${[...Array(n)].map((s,l)=>{const a=r[l%r.length];return a?p``:E.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Ye.styles=[$.globalCss,Hn],Ye=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Un(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&zn(r,n,l),l})([A("wcm-android-wallet-selection")],Ye);const Bn=C`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var Vn=Object.defineProperty,Fn=Object.getOwnPropertyDescriptor,Et=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Fn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Vn(r,n,l),l};let Y=class extends _{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var i,r;const n=null!=(r=null==(i=m.Ic.state.themeVariables)?void 0:i["--wcm-wallet-icon-large-border-radius"])?r:$.getPreset("--wcm-wallet-icon-large-border-radius");let s=0;s=n.includes("%")?.88*parseInt(n,10):parseInt(n,10),s*=1.17;return p``}render(){const i={"wcm-error":this.isError,"wcm-stale":this.isStale};return p`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};Y.styles=[$.globalCss,Bn],Et([y()],Y.prototype,"walletId",2),Et([y()],Y.prototype,"imageId",2),Et([y({type:Boolean})],Y.prototype,"isError",2),Et([y({type:Boolean})],Y.prototype,"isStale",2),Et([y()],Y.prototype,"label",2),Y=Et([A("wcm-connector-waiting")],Y);const Ot={manualWallets(){var i,r;const{mobileWallets:n,desktopWallets:s}=m.t0.state,l=null==(i=Ot.recentWallet())?void 0:i.id,c=(m.zv.isMobile()?n:s)?.filter(d=>l!==d.id);return null!=(r=m.zv.isMobile()?c?.map(({id:d,name:h,links:u})=>({id:d,name:h,mobile:u,links:u})):c?.map(({id:d,name:h,links:u})=>({id:d,name:h,desktop:u,links:u})))?r:[]},recentWallet:()=>f.getRecentWallet(),recomendedWallets(i=!1){var r;const n=i||null==(r=Ot.recentWallet())?void 0:r.id,{recomendedWallets:s}=m.uc.state;return s.filter(l=>n!==l.id)}},X={onConnecting(i){f.goToConnectingView(i)},manualWalletsTemplate(){return Ot.manualWallets().map(i=>p``)},recomendedWalletsTemplate(i=!1){return Ot.recomendedWallets(i).map(r=>p``)},recentWalletTemplate(){const i=Ot.recentWallet();if(i)return p``}},qn=C`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var Kn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;let Xe=class extends _{render(){const{explorerExcludedWalletIds:i,enableExplorer:r}=m.t0.state,n="ALL"!==i&&r,s=X.manualWalletsTemplate(),l=X.recomendedWalletsTemplate();let a=[X.recentWalletTemplate(),...s,...l];a=a.filter(Boolean);const c=a.length>4||n;let d=[];d=c?a.slice(0,3):a;const h=Boolean(d.length);return p`
${E.MOBILE_ICON}Mobile
${E.SCAN_ICON}Scan with your wallet
${h?p`
${E.DESKTOP_ICON}Desktop
${d} ${c?p``:null}
`:null}`}};Xe.styles=[$.globalCss,qn],Xe=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Qn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Kn(r,n,l),l})([A("wcm-desktop-wallet-selection")],Xe);const Yn=C`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var Xn=Object.defineProperty,Jn=Object.getOwnPropertyDescriptor;let Je=class extends _{render(){const{termsOfServiceUrl:i,privacyPolicyUrl:r}=m.t0.state;return i??r?p`
By connecting your wallet to this app, you agree to the app's ${i?p`Terms of Service`:null} ${i&&r?"and":null} ${r?p`Privacy Policy`:null}
`:null}};Je.styles=[$.globalCss,Yn],Je=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Jn(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Xn(r,n,l),l})([A("wcm-legal-notice")],Je);const el=C`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var rl=Object.defineProperty,ol=Object.getOwnPropertyDescriptor;let tr=class extends _{onQrcode(){m.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:i,enableExplorer:r}=m.t0.state,n="ALL"!==i&&r,s=X.manualWalletsTemplate(),l=X.recomendedWalletsTemplate();let a=[X.recentWalletTemplate(),...s,...l];a=a.filter(Boolean);const c=a.length>8||n;let d=[];d=c?a.slice(0,7):a;const h=Boolean(d.length);return p`${h?p`
${d} ${c?p``:null}
`:null}`}};tr.styles=[$.globalCss,el],tr=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?ol(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&rl(r,n,l),l})([A("wcm-mobile-wallet-selection")],tr);const nl=C`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var ll=Object.defineProperty,sl=Object.getOwnPropertyDescriptor,er=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?sl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&ll(r,n,l),l};let kt=class extends _{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=m.jb.subscribe(i=>{i.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var i;null==(i=this.unsubscribeModal)||i.call(this)}get overlayEl(){return f.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return f.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(i){document.querySelector("body")&&(i?document.getElementById("wcm-styles")?.remove():document.head.insertAdjacentHTML("beforeend",''))}onCloseModal(i){i.target===i.currentTarget&&m.jb.close()}onOpenModalEvent(){var i=this;this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((0,H.Z)(function*(){const r=f.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};yield Promise.all([at(i.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,at(i.containerEl,r,{delay:.1,duration:.2}).finished]),i.active=!0}),0)}onCloseModalEvent(){var i=this;return(0,H.Z)(function*(){i.toggleBodyScroll(!0),i.removeKeyboardEvents();const r=f.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};yield Promise.all([at(i.overlayEl,{opacity:[1,0]},{duration:.2}).finished,at(i.containerEl,r,{duration:.2}).finished]),i.containerEl.removeAttribute("style"),i.active=!1,i.open=!1})()}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",i=>{var r;"Escape"===i.key?m.jb.close():"Tab"===i.key&&(null!=(r=i.target)&&r.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var i;null==(i=this.abortController)||i.abort(),this.abortController=void 0}render(){const i={"wcm-overlay":!0,"wcm-active":this.active};return p`
${this.open?p`
`:null}
`}};kt.styles=[$.globalCss,nl],er([D()],kt.prototype,"open",2),er([D()],kt.prototype,"active",2),kt=er([A("wcm-modal")],kt);const al=C`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var cl=Object.defineProperty,dl=Object.getOwnPropertyDescriptor,Kt=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?dl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&cl(r,n,l),l};let dt=class extends _{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){m.zv.isMobile()?m.AV.replace("MobileConnecting"):m.AV.replace("MobileQrcodeConnecting")}onDesktop(){m.AV.replace("DesktopConnecting")}onWeb(){m.AV.replace("WebConnecting")}render(){return p`
${this.isRetry?p``:null} ${this.isMobile?p`Mobile`:null} ${this.isDesktop?p`Desktop`:null} ${this.isWeb?p`Web`:null}
`}};dt.styles=[$.globalCss,al],Kt([y({type:Boolean})],dt.prototype,"isMobile",2),Kt([y({type:Boolean})],dt.prototype,"isDesktop",2),Kt([y({type:Boolean})],dt.prototype,"isWeb",2),Kt([y({type:Boolean})],dt.prototype,"isRetry",2),dt=Kt([A("wcm-platform-selection")],dt);const hl=C`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var ml=Object.defineProperty,ul=Object.getOwnPropertyDescriptor;let rr=class extends _{onClick(){m.AV.push("WalletExplorer")}render(){const{recomendedWallets:i}=m.uc.state,n=[...i,...Ot.manualWallets()].reverse().slice(0,4);return p``}};rr.styles=[$.globalCss,hl],rr=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?ul(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&ml(r,n,l),l})([A("wcm-view-all-wallets-button")],rr);const gl=C`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var vl=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,he=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?wl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&vl(r,n,l),l};let It=class extends _{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:i}=m.zb.state;this.uri=i},0)}get overlayEl(){return f.getShadowRootElement(this,".wcm-qr-container")}render(){return p`
${this.uri?p``:p``}
`}};It.styles=[$.globalCss,gl],he([y()],It.prototype,"walletId",2),he([y()],It.prototype,"imageId",2),he([D()],It.prototype,"uri",2),It=he([A("wcm-walletconnect-qr")],It);var fl=Object.defineProperty,bl=Object.getOwnPropertyDescriptor;let or=class extends _{viewTemplate(){return m.zv.isAndroid()?p``:m.zv.isMobile()?p``:p``}render(){return p`${this.viewTemplate()}`}};or.styles=[$.globalCss],or=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?bl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&fl(r,n,l),l})([A("wcm-connect-wallet-view")],or);const xl=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var _l=Object.defineProperty,$l=Object.getOwnPropertyDescriptor,Co=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?$l(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&_l(r,n,l),l};let me=class extends _{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(i){const{desktop:r,name:n}=m.zv.getWalletRouterData(),s=r?.native;if(s){const l=m.zv.formatNativeUrl(s,i,n);m.zv.openHref(l,"_self")}}openDesktopApp(){const{walletConnectUri:i}=m.zb.state,r=m.zv.getWalletRouterData();f.setRecentWallet(r),i&&this.onFormatAndRedirect(i)}render(){const{name:i,id:r,image_id:n}=m.zv.getWalletRouterData(),{isMobile:s,isWeb:l}=f.getCachedRouterWalletPlatforms();return p`${`Connection can continue loading if ${i} is not installed on your device`}Retry`}};me.styles=[$.globalCss,xl],Co([D()],me.prototype,"isError",2),me=Co([A("wcm-desktop-connecting-view")],me);const Al=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var Cl=Object.defineProperty,El=Object.getOwnPropertyDescriptor;let ir=class extends _{onInstall(i){i&&m.zv.openHref(i,"_blank")}render(){const{name:i,id:r,image_id:n,homepage:s}=m.zv.getWalletRouterData();return p`${`Download ${i} to continue. If multiple browser extensions are installed, disable non ${i} ones and try again`}Download`}};ir.styles=[$.globalCss,Al],ir=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?El(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Cl(r,n,l),l})([A("wcm-install-wallet-view")],ir);const kl=C`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Il=Object.defineProperty,Tl=Object.getOwnPropertyDescriptor,Eo=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Tl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Il(r,n,l),l};let ue=class extends _{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(i,r=!1){const{mobile:n,name:s}=m.zv.getWalletRouterData(),l=n?.native,a=n?.universal;if(l&&!r){const c=m.zv.formatNativeUrl(l,i,s);m.zv.openHref(c,"_self")}else if(a){const c=m.zv.formatUniversalUrl(a,i,s);m.zv.openHref(c,"_self")}}openMobileApp(i=!1){const{walletConnectUri:r}=m.zb.state,n=m.zv.getWalletRouterData();f.setRecentWallet(n),r&&this.onFormatAndRedirect(r,i)}onGoToAppStore(i){i&&m.zv.openHref(i,"_blank")}render(){const{name:i,id:r,image_id:n,app:s,mobile:l}=m.zv.getWalletRouterData(),{isWeb:a}=f.getCachedRouterWalletPlatforms(),c=s?.ios,d=l?.universal;return p`Retry${d?p`Still doesn't work? Try this alternate link`:null}
${`Get ${i}`}
App Store
`}};ue.styles=[$.globalCss,kl],Eo([D()],ue.prototype,"isError",2),ue=Eo([A("wcm-mobile-connecting-view")],ue);const Ml=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Sl=Object.defineProperty,Pl=Object.getOwnPropertyDescriptor;let nr=class extends _{render(){const{name:i,id:r,image_id:n}=m.zv.getWalletRouterData(),{isDesktop:s,isWeb:l}=f.getCachedRouterWalletPlatforms();return p`${`Scan this QR Code with your phone's camera or inside ${i} app`}`}};nr.styles=[$.globalCss,Ml],nr=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Pl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Sl(r,n,l),l})([A("wcm-mobile-qr-connecting-view")],nr);var Ll=Object.defineProperty,Nl=Object.getOwnPropertyDescriptor;let lr=class extends _{render(){return p``}};lr.styles=[$.globalCss],lr=((i,r,n,s)=>{for(var c,l=s>1?void 0:s?Nl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Ll(r,n,l),l})([A("wcm-qrcode-view")],lr);const jl=C`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var Dl=Object.defineProperty,Hl=Object.getOwnPropertyDescriptor,Qt=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Hl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Dl(r,n,l),l};let ht=class extends _{constructor(){super(...arguments),this.loading=!m.uc.state.wallets.listings.length,this.firstFetch=!m.uc.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=f.debounce(i=>{i.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=i,m.uc.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),m.uc.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var i;null==(i=this.intersectionObserver)||i.disconnect()}get placeholderEl(){return f.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([i])=>{i.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:i,search:r}=m.uc.state,{listings:n,total:s}=this.search?r:i;return s<=40||n.length>=s}fetchWallets(){var i=this;return(0,H.Z)(function*(){var r;const{wallets:n,search:s}=m.uc.state,{listings:l,total:a,page:c}=i.search?s:n;if(!i.endReached&&(i.firstFetch||a>40&&l.lengthf.getWalletIcon(v));yield Promise.all([...u.map(function(){var v=(0,H.Z)(function*(g){return f.preloadImage(g)});return function(g){return v.apply(this,arguments)}}()),m.zv.wait(300)]),i.endReached=i.isLastPage()}catch(d){console.error(d),m.Vs.openToast(f.getErrorMessage(d),"error")}finally{i.loading=!1,i.firstFetch=!1}})()}onConnect(i){m.zv.isAndroid()?f.handleMobileLinking(i):f.goToConnectingView(i)}onSearchChange(i){const{value:r}=i.target;this.searchDebounce(r)}render(){const{wallets:i,search:r}=m.uc.state,{listings:n}=this.search?r:i,s=this.loading&&!n.length,l=this.search.length>=3;let a=X.manualWalletsTemplate(),c=X.recomendedWalletsTemplate(!0);l&&(a=a.filter(({values:u})=>f.caseSafeIncludes(u[0],this.search)),c=c.filter(({values:u})=>f.caseSafeIncludes(u[0],this.search)));const d=!this.loading&&!n.length&&!c.length,h={"wcm-loading":s,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":d};return p`
${s?null:a} ${s?null:c} ${s?null:n.map(u=>p`${u?p``:null}`)}
${d?p`No results found`:null} ${!d&&this.loading?p``:null}
`}};ht.styles=[$.globalCss,jl],Qt([D()],ht.prototype,"loading",2),Qt([D()],ht.prototype,"firstFetch",2),Qt([D()],ht.prototype,"search",2),Qt([D()],ht.prototype,"endReached",2),ht=Qt([A("wcm-wallet-explorer-view")],ht);const zl=C`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var Ul=Object.defineProperty,Zl=Object.getOwnPropertyDescriptor,Oo=(i,r,n,s)=>{for(var c,l=s>1?void 0:s?Zl(r,n):r,a=i.length-1;a>=0;a--)(c=i[a])&&(l=(s?c(r,n,l):c(l))||l);return s&&l&&Ul(r,n,l),l};let pe=class extends _{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(i){const{desktop:r,name:n}=m.zv.getWalletRouterData(),s=r?.universal;if(s){const l=m.zv.formatUniversalUrl(s,i,n);m.zv.openHref(l,"_blank")}}openWebWallet(){const{walletConnectUri:i}=m.zb.state,r=m.zv.getWalletRouterData();f.setRecentWallet(r),i&&this.onFormatAndRedirect(i)}render(){const{name:i,id:r,image_id:n}=m.zv.getWalletRouterData(),{isMobile:s,isDesktop:l}=f.getCachedRouterWalletPlatforms(),a=m.zv.isMobile();return p`${`${i} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};pe.styles=[$.globalCss,zl],Oo([D()],pe.prototype,"isError",2),pe=Oo([A("wcm-web-connecting-view")],pe)}}]); \ No newline at end of file diff --git a/3rdpartylicenses.txt b/3rdpartylicenses.txt index 47f0f7ff0..74b3b2fe4 100644 --- a/3rdpartylicenses.txt +++ b/3rdpartylicenses.txt @@ -36,6 +36,31 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/abi +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/abstract-provider MIT MIT License @@ -271,6 +296,56 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/hdnode +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +@ethersproject/json-wallets +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/keccak256 MIT MIT License @@ -324,6 +399,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/pbkdf2 +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/properties MIT MIT License @@ -374,6 +474,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/random +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/rlp MIT MIT License @@ -449,6 +574,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/solidity +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/strings MIT MIT License @@ -499,6 +649,56 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/units +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +@ethersproject/wallet +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @ethersproject/web MIT MIT License @@ -524,6 +724,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +@ethersproject/wordlists +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + @here-wallet/core ISC @@ -1135,6 +1360,8 @@ DEALINGS IN THE SOFTWARE. @near-wallet-selector/bitget-wallet +@near-wallet-selector/bitte-wallet + @near-wallet-selector/coin98-wallet @near-wallet-selector/core @@ -1179,6 +1406,31 @@ DEALINGS IN THE SOFTWARE. @near-wallet-selector/xdefi +@noble/ciphers +MIT +The MIT License (MIT) + +Copyright (c) 2022 Paul Miller (https://paulmillr.com) +Copyright (c) 2016 Thomas Pornin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + @noble/curves MIT The MIT License (MIT) @@ -2946,11 +3198,11 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -ajv +aes-js MIT The MIT License (MIT) -Copyright (c) 2015-2021 Evgeny Poberezkin +Copyright (c) 2015 Richard Moore Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2959,24 +3211,24 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -ajv-formats +ajv MIT -MIT License +The MIT License (MIT) -Copyright (c) 2020 Evgeny Poberezkin +Copyright (c) 2015-2021 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -2997,11 +3249,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -asn1.js + +ajv-formats MIT MIT License -Copyright (c) 2017 Fedor Indutny +Copyright (c) 2020 Evgeny Poberezkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -3022,6 +3275,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +asn1.js +MIT + available-typed-arrays MIT MIT License @@ -3128,7 +3384,7 @@ MIT The MIT License (MIT) ===================== -Copyright © `<2022>` `Michael Mclaughlin` +Copyright © `<2021>` `Michael Mclaughlin` Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -4016,6 +4272,31 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI deferred-leveldown MIT +define-data-property +MIT +MIT License + +Copyright (c) 2023 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + depd MIT (The MIT License) @@ -4174,6 +4455,81 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +es-define-property +MIT +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +es-errors +MIT +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +ethers +MIT +MIT License + +Copyright (c) 2019 Richard Moore + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + events MIT MIT @@ -4355,6 +4711,54 @@ THE SOFTWARE. fwd-stream +generate-function +MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +generate-object-property +MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + get-intrinsic MIT MIT License @@ -4405,30 +4809,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -has +has-property-descriptors MIT -Copyright (c) 2013 Thiago de Arruda +MIT License -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: +Copyright (c) 2022 Inspect JS -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. has-proto @@ -4534,6 +4937,31 @@ THE SOFTWARE. hash.js MIT +hasown +MIT +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + hey-listen MIT MIT License @@ -4789,6 +5217,81 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. is-mobile MIT +is-my-ip-valid +MIT +The MIT License (MIT) + +Copyright (c) 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +is-my-json-valid +MIT +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +is-property +MIT + +The MIT License (MIT) + +Copyright (c) 2013 Mikola Lysenko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + is-typed-array MIT The MIT License (MIT) @@ -4899,6 +5402,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +jsonpointer +MIT +The MIT License (MIT) + +Copyright (c) 2011-2015 Jan Lehnardt & Marc Bachmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + level-blobs The MIT License (MIT) @@ -5210,25 +5738,6 @@ licenses; we recommend you read them, as their terms may differ from the terms above. -lru-cache -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - lru_map MIT @@ -5636,6 +6145,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +possible-typed-array-names +MIT +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + process-nextick-args MIT # Copyright (c) 2015 Calvin Metcalf @@ -6228,11 +6762,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -safer-buffer +scheduler MIT MIT License -Copyright (c) 2018 Nikita Skovoroda +Copyright (c) Facebook, Inc. and its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6253,11 +6787,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -scheduler +scrypt-js MIT -MIT License +The MIT License (MIT) -Copyright (c) Facebook, Inc. and its affiliates. +Copyright (c) 2016 Richard Moore Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -6266,16 +6800,17 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + semver @@ -6297,6 +6832,31 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +set-function-length +MIT +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + setprototypeof ISC Copyright (c) 2015, Wes Todd @@ -6695,34 +7255,6 @@ OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to -tweetnacl-util -Unlicense -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to - - typedarray MIT /* @@ -7059,7 +7591,7 @@ SOFTWARE. xtend MIT -Copyright (c) 2012 Raynos. +Copyright (c) 2012-2014 Raynos. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -7079,24 +7611,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -yallist -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - zone.js MIT diff --git a/652.8ac23b511cb4abaa.js b/652.8ac23b511cb4abaa.js new file mode 100644 index 000000000..ff47d4203 --- /dev/null +++ b/652.8ac23b511cb4abaa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkangular=self.webpackChunkangular||[]).push([[652],{45652:(aa,Zt,$e)=>{$e.r(Zt),$e.d(Zt,{WcmModal:()=>ye,WcmQrCode:()=>F});var D=$e(49671);const De=window,tt=De.ShadowRoot&&(void 0===De.ShadyCSS||De.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,rt=Symbol(),Bt=new WeakMap;class Vt{constructor(r,n,l){if(this._$cssResult$=!0,l!==rt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=r,this.t=n}get styleSheet(){let r=this.o;const n=this.t;if(tt&&void 0===r){const l=void 0!==n&&1===n.length;l&&(r=Bt.get(n)),void 0===r&&((this.o=r=new CSSStyleSheet).replaceSync(this.cssText),l&&Bt.set(n,r))}return r}toString(){return this.cssText}}const E=(i,...r)=>{const n=1===i.length?i[0]:r.reduce((l,a,s)=>l+(c=>{if(!0===c._$cssResult$)return c.cssText;if("number"==typeof c)return c;throw Error("Value passed to 'css' function must be a 'css' function result: "+c+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+i[s+1],i[0]);return new Vt(n,i,rt)},Ft=tt?i=>i:i=>i instanceof CSSStyleSheet?(r=>{let n="";for(const l of r.cssRules)n+=l.cssText;return(i=>new Vt("string"==typeof i?i:i+"",void 0,rt))(n)})(i):i;var ot;const Ne=window,qt=Ne.trustedTypes,Fr=qt?qt.emptyScript:"",Kt=Ne.reactiveElementPolyfillSupport,it={toAttribute(i,r){switch(r){case Boolean:i=i?Fr:null;break;case Object:case Array:i=null==i?i:JSON.stringify(i)}return i},fromAttribute(i,r){let n=i;switch(r){case Boolean:n=null!==i;break;case Number:n=null===i?null:Number(i);break;case Object:case Array:try{n=JSON.parse(i)}catch{n=null}}return n}},Qt=(i,r)=>r!==i&&(r==r||i==i),nt={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:Qt},at="finalized";class ce extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(r){var n;this.finalize(),(null!==(n=this.h)&&void 0!==n?n:this.h=[]).push(r)}static get observedAttributes(){this.finalize();const r=[];return this.elementProperties.forEach((n,l)=>{const a=this._$Ep(l,n);void 0!==a&&(this._$Ev.set(a,l),r.push(a))}),r}static createProperty(r,n=nt){if(n.state&&(n.attribute=!1),this.finalize(),this.elementProperties.set(r,n),!n.noAccessor&&!this.prototype.hasOwnProperty(r)){const l="symbol"==typeof r?Symbol():"__"+r,a=this.getPropertyDescriptor(r,l,n);void 0!==a&&Object.defineProperty(this.prototype,r,a)}}static getPropertyDescriptor(r,n,l){return{get(){return this[n]},set(a){const s=this[r];this[n]=a,this.requestUpdate(r,s,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(r){return this.elementProperties.get(r)||nt}static finalize(){if(this.hasOwnProperty(at))return!1;this[at]=!0;const r=Object.getPrototypeOf(this);if(r.finalize(),void 0!==r.h&&(this.h=[...r.h]),this.elementProperties=new Map(r.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const n=this.properties,l=[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)];for(const a of l)this.createProperty(a,n[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(r){const n=[];if(Array.isArray(r)){const l=new Set(r.flat(1/0).reverse());for(const a of l)n.unshift(Ft(a))}else void 0!==r&&n.push(Ft(r));return n}static _$Ep(r,n){const l=n.attribute;return!1===l?void 0:"string"==typeof l?l:"string"==typeof r?r.toLowerCase():void 0}_$Eu(){var r;this._$E_=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(r=this.constructor.h)||void 0===r||r.forEach(n=>n(this))}addController(r){var n,l;(null!==(n=this._$ES)&&void 0!==n?n:this._$ES=[]).push(r),void 0!==this.renderRoot&&this.isConnected&&(null===(l=r.hostConnected)||void 0===l||l.call(r))}removeController(r){var n;null===(n=this._$ES)||void 0===n||n.splice(this._$ES.indexOf(r)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((r,n)=>{this.hasOwnProperty(n)&&(this._$Ei.set(n,this[n]),delete this[n])})}createRenderRoot(){var r;const n=null!==(r=this.shadowRoot)&&void 0!==r?r:this.attachShadow(this.constructor.shadowRootOptions);return((i,r)=>{tt?i.adoptedStyleSheets=r.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet):r.forEach(n=>{const l=document.createElement("style"),a=De.litNonce;void 0!==a&&l.setAttribute("nonce",a),l.textContent=n.cssText,i.appendChild(l)})})(n,this.constructor.elementStyles),n}connectedCallback(){var r;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(r=this._$ES)||void 0===r||r.forEach(n=>{var l;return null===(l=n.hostConnected)||void 0===l?void 0:l.call(n)})}enableUpdating(r){}disconnectedCallback(){var r;null===(r=this._$ES)||void 0===r||r.forEach(n=>{var l;return null===(l=n.hostDisconnected)||void 0===l?void 0:l.call(n)})}attributeChangedCallback(r,n,l){this._$AK(r,l)}_$EO(r,n,l=nt){var a;const s=this.constructor._$Ep(r,l);if(void 0!==s&&!0===l.reflect){const c=(void 0!==(null===(a=l.converter)||void 0===a?void 0:a.toAttribute)?l.converter:it).toAttribute(n,l.type);this._$El=r,null==c?this.removeAttribute(s):this.setAttribute(s,c),this._$El=null}}_$AK(r,n){var l;const a=this.constructor,s=a._$Ev.get(r);if(void 0!==s&&this._$El!==s){const c=a.getPropertyOptions(s),h="function"==typeof c.converter?{fromAttribute:c.converter}:void 0!==(null===(l=c.converter)||void 0===l?void 0:l.fromAttribute)?c.converter:it;this._$El=s,this[s]=h.fromAttribute(n,c.type),this._$El=null}}requestUpdate(r,n,l){let a=!0;void 0!==r&&(((l=l||this.constructor.getPropertyOptions(r)).hasChanged||Qt)(this[r],n)?(this._$AL.has(r)||this._$AL.set(r,n),!0===l.reflect&&this._$El!==r&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(r,l))):a=!1),!this.isUpdatePending&&a&&(this._$E_=this._$Ej())}_$Ej(){var r=this;return(0,D.Z)(function*(){r.isUpdatePending=!0;try{yield r._$E_}catch(l){Promise.reject(l)}const n=r.scheduleUpdate();return null!=n&&(yield n),!r.isUpdatePending})()}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((a,s)=>this[s]=a),this._$Ei=void 0);let n=!1;const l=this._$AL;try{n=this.shouldUpdate(l),n?(this.willUpdate(l),null===(r=this._$ES)||void 0===r||r.forEach(a=>{var s;return null===(s=a.hostUpdate)||void 0===s?void 0:s.call(a)}),this.update(l)):this._$Ek()}catch(a){throw n=!1,this._$Ek(),a}n&&this._$AE(l)}willUpdate(r){}_$AE(r){var n;null===(n=this._$ES)||void 0===n||n.forEach(l=>{var a;return null===(a=l.hostUpdated)||void 0===a?void 0:a.call(l)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(r)),this.updated(r)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(r){return!0}update(r){void 0!==this._$EC&&(this._$EC.forEach((n,l)=>this._$EO(l,this[l],n)),this._$EC=void 0),this._$Ek()}updated(r){}firstUpdated(r){}}var lt;ce[at]=!0,ce.elementProperties=new Map,ce.elementStyles=[],ce.shadowRootOptions={mode:"open"},Kt?.({ReactiveElement:ce}),(null!==(ot=Ne.reactiveElementVersions)&&void 0!==ot?ot:Ne.reactiveElementVersions=[]).push("1.6.3");const ze=window,de=ze.trustedTypes,Gt=de?de.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ue="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,st="?"+Z,qr=`<${st}>`,J=document,_e=()=>J.createComment(""),Ce=i=>null===i||"object"!=typeof i&&"function"!=typeof i,Yt=Array.isArray,Xt=i=>Yt(i)||"function"==typeof i?.[Symbol.iterator],ct="[ \t\n\f\r]",Ae=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Jt=/-->/g,er=/>/g,ee=RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),tr=/'/g,rr=/"/g,or=/^(?:script|style|textarea|title)$/i,ir=i=>(r,...n)=>({_$litType$:i,strings:r,values:n}),u=ir(1),I=ir(2),te=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),nr=new WeakMap,re=J.createTreeWalker(J,129,null,!1);function ar(i,r){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Gt?Gt.createHTML(r):r}const lr=(i,r)=>{const n=i.length-1,l=[];let a,s=2===r?"":"",c=Ae;for(let h=0;h"===y[0]?(c=a??Ae,_=-1):void 0===y[1]?_=-2:(_=c.lastIndex-y[2].length,p=y[1],c=void 0===y[3]?ee:'"'===y[3]?rr:tr):c===rr||c===tr?c=ee:c===Jt||c===er?c=Ae:(c=ee,a=void 0);const k=c===ee&&i[h+1].startsWith("/>")?" ":"";s+=c===Ae?m+qr:_>=0?(l.push(p),m.slice(0,_)+Ue+m.slice(_)+Z+k):m+Z+(-2===_?(l.push(void 0),h):k)}return[ar(i,s+(i[n]||"")+(2===r?"":"")),l]};class Ee{constructor({strings:r,_$litType$:n},l){let a;this.parts=[];let s=0,c=0;const h=r.length-1,m=this.parts,[p,y]=lr(r,n);if(this.el=Ee.createElement(p,l),re.currentNode=this.el.content,2===n){const _=this.el.content,v=_.firstChild;v.remove(),_.append(...v.childNodes)}for(;null!==(a=re.nextNode())&&m.length0){a.textContent=de?de.emptyScript:"";for(let k=0;k2||""!==l[0]||""!==l[1]?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=P}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(r,n=this,l,a){const s=this.strings;let c=!1;if(void 0===s)r=oe(this,r,n,0),c=!Ce(r)||r!==this._$AH&&r!==te,c&&(this._$AH=r);else{const h=r;let m,p;for(r=s[0],m=0;m{var l,a;const s=null!==(l=n?.renderBefore)&&void 0!==l?l:r;let c=s._$litPart$;if(void 0===c){const h=null!==(a=n?.renderBefore)&&void 0!==a?a:null;s._$litPart$=c=new he(r.insertBefore(_e(),h),h,void 0,n??{})}return c._$AI(i),c})(n,this.renderRoot,this.renderOptions)}connectedCallback(){var r;super.connectedCallback(),null===(r=this._$Do)||void 0===r||r.setConnected(!0)}disconnectedCallback(){var r;super.disconnectedCallback(),null===(r=this._$Do)||void 0===r||r.setConnected(!1)}render(){return te}}b.finalized=!0,b._$litElement$=!0,null===(dt=globalThis.litElementHydrateSupport)||void 0===dt||dt.call(globalThis,{LitElement:b});(0,globalThis.litElementPolyfillSupport)?.({LitElement:b});(null!==(ht=globalThis.litElementVersions)&&void 0!==ht?ht:globalThis.litElementVersions=[]).push("3.3.3");const $=i=>r=>{return"function"==typeof r?(n=i,l=r,customElements.define(n,l),l):((n,l)=>{const{kind:a,elements:s}=l;return{kind:a,elements:s,finisher(c){customElements.define(n,c)}}})(i,r);var n,l},Gr=(i,r)=>"method"===r.kind&&r.descriptor&&!("value"in r.descriptor)?{...r,finisher(n){n.createProperty(r.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:r.key,initializer(){"function"==typeof r.initializer&&(this[r.key]=r.initializer.call(this))},finisher(n){n.createProperty(r.key,i)}},Yr=(i,r,n)=>{r.constructor.createProperty(n,i)};function w(i){return(r,n)=>void 0!==n?Yr(i,r,n):Gr(i,r)}function j(i){return w({...i,state:!0})}var mt;null===(mt=window.HTMLSlotElement)||void 0===mt||mt.prototype.assignedElements;const Jr_ATTRIBUTE=1;class to{constructor(r){}get _$AU(){return this._$AM._$AU}_$AT(r,n,l){this._$Ct=r,this._$AM=n,this._$Ci=l}_$AS(r,n){return this.update(r,n)}update(r,n){return this.render(...n)}}const B=(i=class extends to{constructor(i){var r;if(super(i),i.type!==Jr_ATTRIBUTE||"class"!==i.name||(null===(r=i.strings)||void 0===r?void 0:r.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(r=>i[r]).join(" ")+" "}update(i,[r]){var n,l;if(void 0===this.it){this.it=new Set,void 0!==i.strings&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(s=>""!==s)));for(const s in r)r[s]&&(null===(n=this.nt)||void 0===n||!n.has(s))&&this.it.add(s);return this.render(r)}const a=i.element.classList;this.it.forEach(s=>{s in r||(a.remove(s),this.it.delete(s))});for(const s in r){const c=!!r[s];c===this.it.has(s)||null!==(l=this.nt)&&void 0!==l&&l.has(s)||(c?(a.add(s),this.it.add(s)):(a.remove(s),this.it.delete(s)))}return te}},(...r)=>({_$litDirective$:i,values:r}));var i,d=$e(36953);const z={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},ke={ms:i=>1e3*i,s:i=>i/1e3},gr=()=>{},q=i=>i;function wr(i,r=!0){if(i&&"finished"!==i.playState)try{i.stop?i.stop():(r&&i.commitStyles(),i.cancel())}catch{}}const ro=i=>i(),vr=(i,r,n=z.duration)=>new Proxy({animations:i.map(ro).filter(Boolean),duration:n,options:r},io),io={get:(i,r)=>{const n=(i=>i.animations[0])(i);switch(r){case"duration":return i.duration;case"currentTime":return ke.s(n?.[r]||0);case"playbackRate":case"playState":return n?.[r];case"finished":return i.finished||(i.finished=Promise.all(i.animations.map(no)).catch(gr)),i.finished;case"stop":return()=>{i.animations.forEach(l=>wr(l))};case"forEachNative":return l=>{i.animations.forEach(a=>l(a,i))};default:return typeof n?.[r]>"u"?void 0:()=>i.animations.forEach(l=>l[r]())}},set:(i,r,n)=>{switch(r){case"currentTime":n=ke.ms(n);case"playbackRate":for(let l=0;li.finished,ut=i=>"object"==typeof i&&Boolean(i.createAnimation),He=i=>"number"==typeof i,me=i=>Array.isArray(i)&&!He(i[0]),fr=(i,r,n)=>-n*i+n*r+i,pt=(i,r,n)=>r-i==0?1:(n-i)/(r-i);function br(i,r){const n=i[i.length-1];for(let l=1;l<=r;l++){const a=pt(0,r,l);i.push(fr(n,1,a))}}const lo=(i,r,n)=>{const l=r-i;return((n-i)%l+l)%l+i};const yr=(i,r,n)=>Math.min(Math.max(n,i),r);function co(i,r=function ao(i){const r=[0];return br(r,i-1),r}(i.length),n=q){const l=i.length,a=l-r.length;return a>0&&br(r,a),s=>{let c=0;for(;c(((1-3*n+3*r)*i+(3*n-6*r))*i+3*r)*i,ho=1e-7,mo=12;function Ie(i,r,n,l){if(i===r&&n===l)return q;const a=s=>function uo(i,r,n,l,a){let s,c,h=0;do{c=r+(n-r)/2,s=xr(c,l,a)-i,s>0?n=c:r=c}while(Math.abs(s)>ho&&++h0===s||1===s?s:xr(a(s),r,l)}const po=(i,r="end")=>n=>{const l=(n="end"===r?Math.min(n,.999):Math.max(n,.001))*i,a="end"===r?Math.floor(l):Math.ceil(l);return yr(0,1,a/i)},ue=i=>"function"==typeof i,$r=i=>Array.isArray(i)&&He(i[0]),go={ease:Ie(.25,.1,.25,1),"ease-in":Ie(.42,0,1,1),"ease-in-out":Ie(.42,0,.58,1),"ease-out":Ie(0,0,.58,1)},wo=/\((.*?)\)/;function _r(i){if(ue(i))return i;if($r(i))return Ie(...i);const r=go[i];if(r)return r;if(i.startsWith("steps")){const n=wo.exec(i);if(n){const l=n[1].split(",");return po(parseFloat(l[0]),l[1].trim())}}return q}class Cr{constructor(r,n=[0,1],{easing:l,duration:a=z.duration,delay:s=z.delay,endDelay:c=z.endDelay,repeat:h=z.repeat,offset:m,direction:p="normal",autoplay:y=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=q,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,k)=>{this.resolve=v,this.reject=k}),l=l||z.easing,ut(l)){const v=l.createAnimation(n);l=v.easing,n=v.keyframes||n,a=v.duration||a}this.repeat=h,this.easing=me(l)?q:_r(l),this.updateDuration(a);const _=co(n,m,me(l)?l.map(_r):q);this.tick=v=>{var k;let C=0;C=void 0!==this.pauseTime?this.pauseTime:(v-this.startTime)*this.rate,this.t=C,C/=1e3,C=Math.max(C-s,0),"finished"===this.playState&&void 0===this.pauseTime&&(C=this.totalDuration);const f=C/this.duration;let M=Math.floor(f),A=f%1;!A&&f>=1&&(A=1),1===A&&M--;const R=M%2;("reverse"===p||"alternate"===p&&R||"alternate-reverse"===p&&!R)&&(A=1-A);const L=C>=this.totalDuration?1:Math.min(A,1),N=_(this.easing(L));r(N),void 0===this.pauseTime&&("finished"===this.playState||C>=this.totalDuration+c)?(this.playState="finished",null===(k=this.resolve)||void 0===k||k.call(this,N)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},y&&this.play()}play(){const r=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=r-this.pauseTime:this.startTime||(this.startTime=r),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var r;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(r=this.reject)||void 0===r||r.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(r){this.duration=r,this.totalDuration=r*(this.repeat+1)}get currentTime(){return this.t}set currentTime(r){void 0!==this.pauseTime||0===this.rate?this.pauseTime=r:this.startTime=performance.now()-r/this.rate}get playbackRate(){return this.rate}set playbackRate(r){this.rate=r}}var Ar=function(){};class vo{setAnimation(r){this.animation=r,r?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const gt=new WeakMap;function Er(i){return gt.has(i)||gt.set(i,{transforms:[],values:new Map}),gt.get(i)}const yo=["","X","Y","Z"],Ze={x:"translateX",y:"translateY",z:"translateZ"},Or={syntax:"",initialValue:"0deg",toDefaultUnit:i=>i+"deg"},$o={translate:{syntax:"",initialValue:"0px",toDefaultUnit:i=>i+"px"},rotate:Or,scale:{syntax:"",initialValue:1,toDefaultUnit:q},skew:Or},Te=new Map,wt=i=>`--motion-${i}`,Be=["x","y","z"];["translate","scale","rotate","skew"].forEach(i=>{yo.forEach(r=>{Be.push(i+r),Te.set(wt(i+r),$o[i])})});const _o=(i,r)=>Be.indexOf(i)-Be.indexOf(r),Co=new Set(Be),kr=i=>Co.has(i),Ao=(i,r)=>{Ze[r]&&(r=Ze[r]);const{transforms:n}=Er(i);(function bo(i,r){-1===i.indexOf(r)&&i.push(r)})(n,r),i.style.transform=Eo(n)},Eo=i=>i.sort(_o).reduce(Oo,"").trim(),Oo=(i,r)=>`${i} ${r}(var(${wt(r)}))`,vt=i=>i.startsWith("--"),Ir=new Set;const ft=(i,r)=>document.createElement("div").animate(i,r),Tr={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{ft({opacity:[1]})}catch{return!1}return!0},finished:()=>Boolean(ft({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{ft({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},bt={},pe={};for(const i in Tr)pe[i]=()=>(void 0===bt[i]&&(bt[i]=Tr[i]()),bt[i]);const Pr=(i,r)=>ue(i)?pe.linearEasing()?`linear(${((i,r)=>{let n="";const l=Math.round(r/.015);for(let a=0;a`cubic-bezier(${i}, ${r}, ${n}, ${l})`;const So=i=>Array.isArray(i)?i:[i];function yt(i){return Ze[i]&&(i=Ze[i]),kr(i)?wt(i):i}const Ve={get:(i,r)=>{r=yt(r);let n=vt(r)?i.style.getPropertyValue(r):getComputedStyle(i)[r];if(!n&&0!==n){const l=Te.get(r);l&&(n=l.initialValue)}return n},set:(i,r,n)=>{r=yt(r),vt(r)?i.style.setProperty(r,n):i.style[r]=n}},Ro=i=>"string"==typeof i;function jo(i,r,n,l={},a){const s=function Wo(){return window.__MOTION_DEV_TOOLS_RECORD}(),c=!1!==l.record&&s;let h,{duration:m=z.duration,delay:p=z.delay,endDelay:y=z.endDelay,repeat:_=z.repeat,easing:v=z.easing,persist:k=!1,direction:C,offset:f,allowWebkitAcceleration:M=!1,autoplay:A=!0}=l;const R=Er(i),L=kr(r);let N=pe.waapi();L&&Ao(i,r);const U=yt(r),Je=function fo(i,r){return i.has(r)||i.set(r,new vo),i.get(r)}(R.values,U),X=Te.get(U);return wr(Je.animation,!(ut(v)&&Je.generator)&&!1!==l.record),()=>{const et=()=>{var T,je;return null!==(je=null!==(T=Ve.get(i,U))&&void 0!==T?T:X?.initialValue)&&void 0!==je?je:0};let S=function Mo(i,r){for(let n=0;nc+s)}return l}(S,X);if(ut(v)){const T=v.createAnimation(S,"opacity"!==r,et,U,Je);v=T.easing,S=T.keyframes||S,m=T.duration||m}if(vt(U)&&(pe.cssRegisterProperty()?function ko(i){if(!Ir.has(i)){Ir.add(i);try{const{syntax:r,initialValue:n}=Te.has(i)?Te.get(i):{};CSS.registerProperty({name:i,inherits:!1,syntax:r,initialValue:n})}catch{}}}(U):N=!1),L&&!pe.linearEasing()&&(ue(v)||me(v)&&v.some(ue))&&(N=!1),N){X&&(S=S.map(se=>He(se)?X.toDefaultUnit(se):se)),1===S.length&&(!pe.partialKeyframes()||c)&&S.unshift(et());const T={delay:ke.ms(p),duration:ke.ms(m),endDelay:ke.ms(y),easing:me(v)?void 0:Pr(v,m),direction:C,iterations:_+1,fill:"both"};h=i.animate({[U]:S,offset:f,easing:me(v)?v.map(se=>Pr(se,m)):void 0},T),h.finished||(h.finished=new Promise((se,na)=>{h.onfinish=se,h.oncancel=na}));const je=S[S.length-1];h.finished.then(()=>{k||(Ve.set(i,U,je),h.cancel())}).catch(gr),M||(h.playbackRate=1.000001)}else if(a&&L)S=S.map(T=>"string"==typeof T?parseFloat(T):T),1===S.length&&S.unshift(parseFloat(et())),h=new a(T=>{Ve.set(i,U,Zr?Zr(T):T)},S,Object.assign(Object.assign({},l),{duration:m,easing:v}));else{const T=S[S.length-1];Ve.set(i,U,X&&He(T)?X.toDefaultUnit(T):T)}return c&&s(i,r,S,{duration:m,delay:p,easing:v,repeat:_,offset:f},"motion-one"),Je.setAnimation(h),h&&!A&&h.pause(),h}}const Do=(i,r)=>i[r]?Object.assign(Object.assign({},i),i[r]):Object.assign({},i);function Uo(i,r,n){return ue(i)?i(r,n):i}const Zo=function Ho(i){return function(n,l,a={}){n=function No(i,r){var n;return"string"==typeof i?r?(null!==(n=r[i])&&void 0!==n||(r[i]=document.querySelectorAll(i)),i=r[i]):i=document.querySelectorAll(i):i instanceof Element&&(i=[i]),Array.from(i||[])}(n);const s=n.length;Ar(Boolean(s),"No valid element provided."),Ar(Boolean(l),"No keyframes defined.");const c=[];for(let h=0;h{const n=new Cr(i,[0,1],r);return n.finished.catch(()=>{}),n}],r,r.duration)}function ie(i,r,n){return(ue(i)?Bo:Zo)(i,r,n)}const W=i=>i??P;var Vo=$e(3259),Fo=Object.defineProperty,Mr=Object.getOwnPropertySymbols,qo=Object.prototype.hasOwnProperty,Ko=Object.prototype.propertyIsEnumerable,Sr=(i,r,n)=>r in i?Fo(i,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[r]=n,xt=(i,r)=>{for(var n in r||(r={}))qo.call(r,n)&&Sr(i,n,r[n]);if(Mr)for(var n of Mr(r))Ko.call(r,n)&&Sr(i,n,r[n]);return i};const x={getPreset:i=>({"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}[i]),setTheme(){const i=document.querySelector(":root"),{themeVariables:r}=d.Ic.state;if(i){const n=xt(xt(xt({},function Qo(){var i;const n={light:{foreground:{1:"rgb(20,20,20)",2:"rgb(121,134,134)",3:"rgb(158,169,169)"},background:{1:"rgb(255,255,255)",2:"rgb(241,243,243)",3:"rgb(228,231,231)"},overlay:"rgba(0,0,0,0.1)"},dark:{foreground:{1:"rgb(228,231,231)",2:"rgb(148,158,158)",3:"rgb(110,119,119)"},background:{1:"rgb(20,20,20)",2:"rgb(39,42,42)",3:"rgb(59,64,64)"},overlay:"rgba(255,255,255,0.1)"}}[null!=(i=d.Ic.state.themeMode)?i:"dark"];return{"--wcm-color-fg-1":n.foreground[1],"--wcm-color-fg-2":n.foreground[2],"--wcm-color-fg-3":n.foreground[3],"--wcm-color-bg-1":n.background[1],"--wcm-color-bg-2":n.background[2],"--wcm-color-bg-3":n.background[3],"--wcm-color-overlay":n.overlay}}()),{"--wcm-accent-color":"#3396FF","--wcm-accent-fill-color":"#FFFFFF","--wcm-z-index":"89","--wcm-background-color":"#3396FF","--wcm-background-border-radius":"8px","--wcm-container-border-radius":"30px","--wcm-wallet-icon-border-radius":"15px","--wcm-wallet-icon-large-border-radius":"30px","--wcm-wallet-icon-small-border-radius":"7px","--wcm-input-border-radius":"28px","--wcm-button-border-radius":"10px","--wcm-notification-border-radius":"36px","--wcm-secondary-button-border-radius":"28px","--wcm-icon-button-border-radius":"50%","--wcm-button-hover-highlight-border-radius":"10px","--wcm-text-big-bold-size":"20px","--wcm-text-big-bold-weight":"600","--wcm-text-big-bold-line-height":"24px","--wcm-text-big-bold-letter-spacing":"-0.03em","--wcm-text-big-bold-text-transform":"none","--wcm-text-xsmall-bold-size":"10px","--wcm-text-xsmall-bold-weight":"700","--wcm-text-xsmall-bold-line-height":"12px","--wcm-text-xsmall-bold-letter-spacing":"0.02em","--wcm-text-xsmall-bold-text-transform":"uppercase","--wcm-text-xsmall-regular-size":"12px","--wcm-text-xsmall-regular-weight":"600","--wcm-text-xsmall-regular-line-height":"14px","--wcm-text-xsmall-regular-letter-spacing":"-0.03em","--wcm-text-xsmall-regular-text-transform":"none","--wcm-text-small-thin-size":"14px","--wcm-text-small-thin-weight":"500","--wcm-text-small-thin-line-height":"16px","--wcm-text-small-thin-letter-spacing":"-0.03em","--wcm-text-small-thin-text-transform":"none","--wcm-text-small-regular-size":"14px","--wcm-text-small-regular-weight":"600","--wcm-text-small-regular-line-height":"16px","--wcm-text-small-regular-letter-spacing":"-0.03em","--wcm-text-small-regular-text-transform":"none","--wcm-text-medium-regular-size":"16px","--wcm-text-medium-regular-weight":"600","--wcm-text-medium-regular-line-height":"20px","--wcm-text-medium-regular-letter-spacing":"-0.03em","--wcm-text-medium-regular-text-transform":"none","--wcm-font-family":"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif","--wcm-font-feature-settings":"'tnum' on, 'lnum' on, 'case' on","--wcm-success-color":"rgb(38,181,98)","--wcm-error-color":"rgb(242, 90, 103)","--wcm-overlay-background-color":"rgba(0, 0, 0, 0.3)","--wcm-overlay-backdrop-filter":"none"}),r);Object.entries(n).forEach(([l,a])=>i.style.setProperty(l,a))}},globalCss:E`*,::after,::before{margin:0;padding:0;box-sizing:border-box;font-style:normal;text-rendering:optimizeSpeed;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent;backface-visibility:hidden}button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:relative;border:none;background-color:transparent;transition:all .2s ease}@media (hover:hover) and (pointer:fine){button:active{transition:all .1s ease;transform:scale(.93)}}button::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;transition:background-color,.2s ease}button:disabled{cursor:not-allowed}button svg,button wcm-text{position:relative;z-index:1}input{border:none;outline:0;appearance:none}img{display:block}::selection{color:var(--wcm-accent-fill-color);background:var(--wcm-accent-color)}`},Go=E`button{border-radius:var(--wcm-secondary-button-border-radius);height:28px;padding:0 10px;background-color:var(--wcm-accent-color)}button path{fill:var(--wcm-accent-fill-color)}button::after{border-radius:inherit;border:1px solid var(--wcm-color-overlay)}button:disabled::after{background-color:transparent}.wcm-icon-left svg{margin-right:5px}.wcm-icon-right svg{margin-left:5px}button:active::after{background-color:var(--wcm-color-overlay)}.wcm-ghost,.wcm-ghost:active::after,.wcm-outline{background-color:transparent}.wcm-ghost:active{opacity:.5}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}.wcm-ghost:hover::after{background-color:transparent}.wcm-ghost:hover{opacity:.5}}button:disabled{background-color:var(--wcm-color-bg-3);pointer-events:none}.wcm-ghost::after{border-color:transparent}.wcm-ghost path{fill:var(--wcm-color-fg-2)}.wcm-outline path{fill:var(--wcm-accent-color)}.wcm-outline:disabled{background-color:transparent;opacity:.5}`;var Yo=Object.defineProperty,Xo=Object.getOwnPropertyDescriptor,ge=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Xo(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Yo(r,n,a),a};let K=class extends b{constructor(){super(...arguments),this.disabled=!1,this.iconLeft=void 0,this.iconRight=void 0,this.onClick=()=>null,this.variant="default"}render(){const i={"wcm-icon-left":void 0!==this.iconLeft,"wcm-icon-right":void 0!==this.iconRight,"wcm-ghost":"ghost"===this.variant,"wcm-outline":"outline"===this.variant};let r="inverse";return"ghost"===this.variant&&(r="secondary"),"outline"===this.variant&&(r="accent"),u``}};K.styles=[x.globalCss,Go],ge([w({type:Boolean})],K.prototype,"disabled",2),ge([w()],K.prototype,"iconLeft",2),ge([w()],K.prototype,"iconRight",2),ge([w()],K.prototype,"onClick",2),ge([w()],K.prototype,"variant",2),K=ge([$("wcm-button")],K);const Jo=E`:host{display:inline-block}button{padding:0 15px 1px;height:40px;border-radius:var(--wcm-button-border-radius);color:var(--wcm-accent-fill-color);background-color:var(--wcm-accent-color)}button::after{content:'';top:0;bottom:0;left:0;right:0;position:absolute;background-color:transparent;border-radius:inherit;transition:background-color .2s ease;border:1px solid var(--wcm-color-overlay)}button:active::after{background-color:var(--wcm-color-overlay)}button:disabled{padding-bottom:0;background-color:var(--wcm-color-bg-3);color:var(--wcm-color-fg-3)}.wcm-secondary{color:var(--wcm-accent-color);background-color:transparent}.wcm-secondary::after{display:none}@media(hover:hover){button:hover::after{background-color:var(--wcm-color-overlay)}}`;var ei=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,$t=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?ti(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&ei(r,n,a),a};let Pe=class extends b{constructor(){super(...arguments),this.disabled=!1,this.variant="primary"}render(){const i={"wcm-secondary":"secondary"===this.variant};return u``}};Pe.styles=[x.globalCss,Jo],$t([w({type:Boolean})],Pe.prototype,"disabled",2),$t([w()],Pe.prototype,"variant",2),Pe=$t([$("wcm-button-big")],Pe);const ri=E`:host{background-color:var(--wcm-color-bg-2);border-top:1px solid var(--wcm-color-bg-3)}div{padding:10px 20px;display:inherit;flex-direction:inherit;align-items:inherit;width:inherit;justify-content:inherit}`;var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor;let _t=class extends b{render(){return u`
`}};_t.styles=[x.globalCss,ri],_t=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?ii(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&oi(r,n,a),a})([$("wcm-info-footer")],_t);const O={CROSS_ICON:I``,WALLET_CONNECT_LOGO:I``,WALLET_CONNECT_ICON:I``,WALLET_CONNECT_ICON_COLORED:I``,BACK_ICON:I``,COPY_ICON:I``,RETRY_ICON:I``,DESKTOP_ICON:I``,MOBILE_ICON:I``,ARROW_DOWN_ICON:I``,ARROW_UP_RIGHT_ICON:I``,ARROW_RIGHT_ICON:I``,QRCODE_ICON:I``,SCAN_ICON:I``,CHECKMARK_ICON:I``,SEARCH_ICON:I``,WALLET_PLACEHOLDER:I``,GLOBE_ICON:I``},ai=E`.wcm-toolbar-placeholder{top:0;bottom:0;left:0;right:0;width:100%;position:absolute;display:block;pointer-events:none;height:100px;border-radius:calc(var(--wcm-background-border-radius) * .9);background-color:var(--wcm-background-color);background-position:center;background-size:cover}.wcm-toolbar{height:38px;display:flex;position:relative;margin:5px 15px 5px 5px;justify-content:space-between;align-items:center}.wcm-toolbar img,.wcm-toolbar svg{height:28px;object-position:left center;object-fit:contain}#wcm-wc-logo path{fill:var(--wcm-accent-fill-color)}button{width:28px;height:28px;border-radius:var(--wcm-icon-button-border-radius);border:0;display:flex;justify-content:center;align-items:center;cursor:pointer;background-color:var(--wcm-color-bg-1);box-shadow:0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-bg-2)}button svg{display:block;object-position:center}button path{fill:var(--wcm-color-fg-1)}.wcm-toolbar div{display:flex}@media(hover:hover){button:hover{background-color:var(--wcm-color-bg-2)}}`;var li=Object.defineProperty,si=Object.getOwnPropertyDescriptor;let Ct=class extends b{render(){return u`
${O.WALLET_CONNECT_LOGO}
`}};Ct.styles=[x.globalCss,ai],Ct=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?si(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&li(r,n,a),a})([$("wcm-modal-backcard")],Ct);const di=E`main{padding:20px;padding-top:0;width:100%}`;var hi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor;let At=class extends b{render(){return u`
`}};At.styles=[x.globalCss,di],At=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?mi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&hi(r,n,a),a})([$("wcm-modal-content")],At);const pi=E`footer{padding:10px;display:flex;flex-direction:column;align-items:inherit;justify-content:inherit;border-top:1px solid var(--wcm-color-bg-2)}`;var gi=Object.defineProperty,wi=Object.getOwnPropertyDescriptor;let Et=class extends b{render(){return u`
`}};Et.styles=[x.globalCss,pi],Et=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?wi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&gi(r,n,a),a})([$("wcm-modal-footer")],Et);const fi=E`header{display:flex;justify-content:center;align-items:center;padding:20px;position:relative}.wcm-border{border-bottom:1px solid var(--wcm-color-bg-2);margin-bottom:20px}header button{padding:15px 20px}header button:active{opacity:.5}@media(hover:hover){header button:hover{opacity:.5}}.wcm-back-btn{position:absolute;left:0}.wcm-action-btn{position:absolute;right:0}path{fill:var(--wcm-accent-color)}`;var bi=Object.defineProperty,yi=Object.getOwnPropertyDescriptor,Me=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?yi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&bi(r,n,a),a};let ne=class extends b{constructor(){super(...arguments),this.title="",this.onAction=void 0,this.actionIcon=void 0,this.border=!1}backBtnTemplate(){return u``}actionBtnTemplate(){return u``}render(){const i={"wcm-border":this.border},r=d.AV.state.history.length>1,n=this.title?u`${this.title}`:u``;return u`
${r?this.backBtnTemplate():null} ${n} ${this.onAction?this.actionBtnTemplate():null}
`}};ne.styles=[x.globalCss,fi],Me([w()],ne.prototype,"title",2),Me([w()],ne.prototype,"onAction",2),Me([w()],ne.prototype,"actionIcon",2),Me([w({type:Boolean})],ne.prototype,"border",2),ne=Me([$("wcm-modal-header")],ne);const g={MOBILE_BREAKPOINT:600,WCM_RECENT_WALLET_DATA:"WCM_RECENT_WALLET_DATA",EXPLORER_WALLET_URL:"https://explorer.walletconnect.com/?type=wallet",getShadowRootElement(i,r){const n=i.renderRoot.querySelector(r);if(!n)throw new Error(`${r} not found`);return n},getWalletIcon({id:i,image_id:r}){const{walletImages:n}=d.t0.state;return null!=n&&n[i]?n[i]:r?d.uc.getWalletImageUrl(r):""},getWalletName:(i,r=!1)=>r&&i.length>8?`${i.substring(0,8)}..`:i,isMobileAnimation:()=>window.innerWidth<=g.MOBILE_BREAKPOINT,preloadImage:i=>(0,D.Z)(function*(){const r=new Promise((n,l)=>{const a=new Image;a.onload=n,a.onerror=l,a.crossOrigin="anonymous",a.src=i});return Promise.race([r,d.zv.wait(3e3)])})(),getErrorMessage:i=>i instanceof Error?i.message:"Unknown Error",debounce(i,r=500){let n;return(...l)=>{n&&clearTimeout(n),n=setTimeout(function a(){i(...l)},r)}},handleMobileLinking(i){const{walletConnectUri:r}=d.zb.state,{mobile:n,name:l}=i,a=n?.native,s=n?.universal;g.setRecentWallet(i),r&&function c(h){let m="";a?m=d.zv.formatUniversalUrl(a,h,l):s&&(m=d.zv.formatNativeUrl(s,h,l)),d.zv.openHref(m,"_self")}(r)},handleAndroidLinking(){const{walletConnectUri:i}=d.zb.state;i&&(d.zv.setWalletConnectAndroidDeepLink(i),d.zv.openHref(i,"_self"))},handleUriCopy:()=>(0,D.Z)(function*(){const{walletConnectUri:i}=d.zb.state;if(i)try{yield navigator.clipboard.writeText(i),d.Vs.openToast("Link copied","success")}catch{d.Vs.openToast("Failed to copy","error")}})(),getCustomImageUrls(){const{walletImages:i}=d.t0.state,r=Object.values(i??{});return Object.values(r)},truncate:(i,r=8)=>i.length<=r?i:`${i.substring(0,4)}...${i.substring(i.length-4)}`,setRecentWallet(i){try{localStorage.setItem(g.WCM_RECENT_WALLET_DATA,JSON.stringify(i))}catch{console.info("Unable to set recent wallet")}},getRecentWallet(){try{const i=localStorage.getItem(g.WCM_RECENT_WALLET_DATA);return i?JSON.parse(i):void 0}catch{console.info("Unable to get recent wallet")}},caseSafeIncludes:(i,r)=>i.toUpperCase().includes(r.toUpperCase()),openWalletExplorerUrl(){d.zv.openHref(g.EXPLORER_WALLET_URL,"_blank")},getCachedRouterWalletPlatforms(){const{desktop:i,mobile:r}=d.zv.getWalletRouterData(),n=Boolean(i?.native),l=Boolean(i?.universal);return{isDesktop:n,isMobile:Boolean(r?.native)||Boolean(r?.universal),isWeb:l}},goToConnectingView(i){d.AV.setData({Wallet:i});const r=d.zv.isMobile(),{isDesktop:n,isWeb:l,isMobile:a}=g.getCachedRouterWalletPlatforms();r?a?d.AV.push("MobileConnecting"):l?d.AV.push("WebConnecting"):d.AV.push("InstallWallet"):n?d.AV.push("DesktopConnecting"):l?d.AV.push("WebConnecting"):a?d.AV.push("MobileQrcodeConnecting"):d.AV.push("InstallWallet")}},xi=E`.wcm-router{overflow:hidden;will-change:transform}.wcm-content{display:flex;flex-direction:column}`;var $i=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,Ot=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?_i(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&$i(r,n,a),a};let Se=class extends b{constructor(){super(),this.view=d.AV.state.view,this.prevView=d.AV.state.view,this.unsubscribe=void 0,this.oldHeight="0px",this.resizeObserver=void 0,this.unsubscribe=d.AV.subscribe(i=>{this.view!==i.view&&this.onChangeRoute()})}firstUpdated(){this.resizeObserver=new ResizeObserver(([i])=>{const r=`${i.contentRect.height}px`;"0px"!==this.oldHeight&&ie(this.routerEl,{height:[this.oldHeight,r]},{duration:.2}),this.oldHeight=r}),this.resizeObserver.observe(this.contentEl)}disconnectedCallback(){var i,r;null==(i=this.unsubscribe)||i.call(this),null==(r=this.resizeObserver)||r.disconnect()}get routerEl(){return g.getShadowRootElement(this,".wcm-router")}get contentEl(){return g.getShadowRootElement(this,".wcm-content")}viewTemplate(){switch(this.view){case"ConnectWallet":return u``;case"DesktopConnecting":return u``;case"MobileConnecting":return u``;case"WebConnecting":return u``;case"MobileQrcodeConnecting":return u``;case"WalletExplorer":return u``;case"Qrcode":return u``;case"InstallWallet":return u``;default:return u`
Not Found
`}}onChangeRoute(){var i=this;return(0,D.Z)(function*(){yield ie(i.routerEl,{opacity:[1,0],scale:[1,1.02]},{duration:.15,delay:.1}).finished,i.view=d.AV.state.view,ie(i.routerEl,{opacity:[0,1],scale:[.99,1]},{duration:.37,delay:.05})})()}render(){return u`
${this.viewTemplate()}
`}};Se.styles=[x.globalCss,xi],Ot([j()],Se.prototype,"view",2),Ot([j()],Se.prototype,"prevView",2),Se=Ot([$("wcm-modal-router")],Se);const Ci=E`div{height:36px;width:max-content;display:flex;justify-content:center;align-items:center;padding:9px 15px 11px;position:absolute;top:12px;box-shadow:0 6px 14px -6px rgba(10,16,31,.3),0 10px 32px -4px rgba(10,16,31,.15);z-index:2;left:50%;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(20px) saturate(1.8);-webkit-backdrop-filter:blur(20px) saturate(1.8);border-radius:var(--wcm-notification-border-radius);border:1px solid var(--wcm-color-overlay);background-color:var(--wcm-color-overlay)}svg{margin-right:5px}@-moz-document url-prefix(){div{background-color:var(--wcm-color-bg-3)}}.wcm-success path{fill:var(--wcm-accent-color)}.wcm-error path{fill:var(--wcm-error-color)}`;var Ai=Object.defineProperty,Ei=Object.getOwnPropertyDescriptor,Lr=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Ei(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Ai(r,n,a),a};let Fe=class extends b{constructor(){super(),this.open=!1,this.unsubscribe=void 0,this.timeout=void 0,this.unsubscribe=d.Vs.subscribe(i=>{i.open?(this.open=!0,this.timeout=setTimeout(()=>d.Vs.closeToast(),2200)):(this.open=!1,clearTimeout(this.timeout))})}disconnectedCallback(){var i;null==(i=this.unsubscribe)||i.call(this),clearTimeout(this.timeout),d.Vs.closeToast()}render(){const{message:i,variant:r}=d.Vs.state,n={"wcm-success":"success"===r,"wcm-error":"error"===r};return this.open?u`
${"success"===r?O.CHECKMARK_ICON:null} ${"error"===r?O.CROSS_ICON:null}${i}
`:null}};Fe.styles=[x.globalCss,Ci],Lr([j()],Fe.prototype,"open",2),Fe=Lr([$("wcm-modal-toast")],Fe);const Oi=.1;function kt(i,r,n){return i!==r&&(i-r<0?r-i:i-r)<=n+Oi}const Ii={generate(i,r,n){const l="#141414",s=[],c=function ki(i,r){const n=Array.prototype.slice.call(Vo.create(i,{errorCorrectionLevel:r}).modules.data,0),l=Math.sqrt(n.length);return n.reduce((a,s,c)=>(c%l==0?a.push([s]):a[a.length-1].push(s))&&a,[])}(i,"Q"),h=r/c.length,m=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];m.forEach(({x:C,y:f})=>{const M=(c.length-7)*h*C,A=(c.length-7)*h*f;for(let L=0;L`)}});const p=Math.floor((n+25)/h),y=c.length/2-p/2,_=c.length/2+p/2-1,v=[];c.forEach((C,f)=>{C.forEach((M,A)=>{if(c[f][A]&&!(f<7&&A<7||f>c.length-8&&A<7||f<7&&A>c.length-8)&&!(f>y&&f<_&&A>y&&A<_)){const R=f*h+h/2,L=A*h+h/2;v.push([R,L])}})});const k={};return v.forEach(([C,f])=>{k[C]?k[C].push(f):k[C]=[f]}),Object.entries(k).map(([C,f])=>{const M=f.filter(A=>f.every(R=>!kt(A,R,h)));return[Number(C),M]}).forEach(([C,f])=>{f.forEach(M=>{s.push(I``)})}),Object.entries(k).filter(([C,f])=>f.length>1).map(([C,f])=>{const M=f.filter(A=>f.some(R=>kt(A,R,h)));return[Number(C),M]}).map(([C,f])=>{f.sort((A,R)=>AL.some(N=>kt(A,N,h)));R?R.push(A):M.push([A])}return[C,M.map(A=>[A[0],A[A.length-1]])]}).forEach(([C,f])=>{f.forEach(([M,A])=>{s.push(I``)})}),s}},Ti=E`@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}div{position:relative;user-select:none;display:block;overflow:hidden;aspect-ratio:1/1;animation:fadeIn ease .2s}.wcm-dark{background-color:#fff;border-radius:var(--wcm-container-border-radius);padding:18px;box-shadow:0 2px 5px #000}svg:first-child,wcm-wallet-image{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{transform:translateY(-50%) translateX(-50%)}wcm-wallet-image{width:25%;height:25%;border-radius:var(--wcm-wallet-icon-border-radius)}svg:first-child{transform:translateY(-50%) translateX(-50%) scale(.9)}svg:first-child path:first-child{fill:var(--wcm-accent-color)}svg:first-child path:last-child{stroke:var(--wcm-color-overlay)}`;var Pi=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,we=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Mi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Pi(r,n,a),a};let F=class extends b{constructor(){super(...arguments),this.uri="",this.size=0,this.imageId=void 0,this.walletId=void 0,this.imageUrl=void 0}svgTemplate(){const i="light"===d.Ic.state.themeMode?this.size:this.size-36;return I`${Ii.generate(this.uri,i,i/4)}`}render(){const i={"wcm-dark":"dark"===d.Ic.state.themeMode};return u`
${this.walletId||this.imageUrl?u``:O.WALLET_CONNECT_ICON_COLORED} ${this.svgTemplate()}
`}};F.styles=[x.globalCss,Ti],we([w()],F.prototype,"uri",2),we([w({type:Number})],F.prototype,"size",2),we([w()],F.prototype,"imageId",2),we([w()],F.prototype,"walletId",2),we([w()],F.prototype,"imageUrl",2),F=we([$("wcm-qrcode")],F);const Si=E`:host{position:relative;height:28px;width:80%}input{width:100%;height:100%;line-height:28px!important;border-radius:var(--wcm-input-border-radius);font-style:normal;font-family:-apple-system,system-ui,BlinkMacSystemFont,'Segoe UI',Roboto,Ubuntu,'Helvetica Neue',sans-serif;font-feature-settings:'case' on;font-weight:500;font-size:16px;letter-spacing:-.03em;padding:0 10px 0 34px;transition:.2s all ease;color:var(--wcm-color-fg-1);background-color:var(--wcm-color-bg-3);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay);caret-color:var(--wcm-accent-color)}input::placeholder{color:var(--wcm-color-fg-2)}svg{left:10px;top:4px;pointer-events:none;position:absolute;width:20px;height:20px}input:focus-within{box-shadow:inset 0 0 0 1px var(--wcm-accent-color)}path{fill:var(--wcm-color-fg-2)}`;var Ri=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,jr=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Li(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Ri(r,n,a),a};let qe=class extends b{constructor(){super(...arguments),this.onChange=()=>null}render(){return u` ${O.SEARCH_ICON}`}};qe.styles=[x.globalCss,Si],jr([w()],qe.prototype,"onChange",2),qe=jr([$("wcm-search-input")],qe);const Wi=E`@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}100%{stroke-dasharray:90,150;stroke-dashoffset:-124}}svg{animation:rotate 2s linear infinite;display:flex;justify-content:center;align-items:center}svg circle{stroke-linecap:round;animation:dash 1.5s ease infinite;stroke:var(--wcm-accent-color)}`;var ji=Object.defineProperty,Di=Object.getOwnPropertyDescriptor;let It=class extends b{render(){return u``}};It.styles=[x.globalCss,Wi],It=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Di(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&ji(r,n,a),a})([$("wcm-spinner")],It);const zi=E`span{font-style:normal;font-family:var(--wcm-font-family);font-feature-settings:var(--wcm-font-feature-settings)}.wcm-xsmall-bold{font-family:var(--wcm-text-xsmall-bold-font-family);font-weight:var(--wcm-text-xsmall-bold-weight);font-size:var(--wcm-text-xsmall-bold-size);line-height:var(--wcm-text-xsmall-bold-line-height);letter-spacing:var(--wcm-text-xsmall-bold-letter-spacing);text-transform:var(--wcm-text-xsmall-bold-text-transform)}.wcm-xsmall-regular{font-family:var(--wcm-text-xsmall-regular-font-family);font-weight:var(--wcm-text-xsmall-regular-weight);font-size:var(--wcm-text-xsmall-regular-size);line-height:var(--wcm-text-xsmall-regular-line-height);letter-spacing:var(--wcm-text-xsmall-regular-letter-spacing);text-transform:var(--wcm-text-xsmall-regular-text-transform)}.wcm-small-thin{font-family:var(--wcm-text-small-thin-font-family);font-weight:var(--wcm-text-small-thin-weight);font-size:var(--wcm-text-small-thin-size);line-height:var(--wcm-text-small-thin-line-height);letter-spacing:var(--wcm-text-small-thin-letter-spacing);text-transform:var(--wcm-text-small-thin-text-transform)}.wcm-small-regular{font-family:var(--wcm-text-small-regular-font-family);font-weight:var(--wcm-text-small-regular-weight);font-size:var(--wcm-text-small-regular-size);line-height:var(--wcm-text-small-regular-line-height);letter-spacing:var(--wcm-text-small-regular-letter-spacing);text-transform:var(--wcm-text-small-regular-text-transform)}.wcm-medium-regular{font-family:var(--wcm-text-medium-regular-font-family);font-weight:var(--wcm-text-medium-regular-weight);font-size:var(--wcm-text-medium-regular-size);line-height:var(--wcm-text-medium-regular-line-height);letter-spacing:var(--wcm-text-medium-regular-letter-spacing);text-transform:var(--wcm-text-medium-regular-text-transform)}.wcm-big-bold{font-family:var(--wcm-text-big-bold-font-family);font-weight:var(--wcm-text-big-bold-weight);font-size:var(--wcm-text-big-bold-size);line-height:var(--wcm-text-big-bold-line-height);letter-spacing:var(--wcm-text-big-bold-letter-spacing);text-transform:var(--wcm-text-big-bold-text-transform)}:host(*){color:var(--wcm-color-fg-1)}.wcm-color-primary{color:var(--wcm-color-fg-1)}.wcm-color-secondary{color:var(--wcm-color-fg-2)}.wcm-color-tertiary{color:var(--wcm-color-fg-3)}.wcm-color-inverse{color:var(--wcm-accent-fill-color)}.wcm-color-accnt{color:var(--wcm-accent-color)}.wcm-color-error{color:var(--wcm-error-color)}`;var Ui=Object.defineProperty,Hi=Object.getOwnPropertyDescriptor,Tt=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Hi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Ui(r,n,a),a};let Re=class extends b{constructor(){super(...arguments),this.variant="medium-regular",this.color="primary"}render(){const i={"wcm-big-bold":"big-bold"===this.variant,"wcm-medium-regular":"medium-regular"===this.variant,"wcm-small-regular":"small-regular"===this.variant,"wcm-small-thin":"small-thin"===this.variant,"wcm-xsmall-regular":"xsmall-regular"===this.variant,"wcm-xsmall-bold":"xsmall-bold"===this.variant,"wcm-color-primary":"primary"===this.color,"wcm-color-secondary":"secondary"===this.color,"wcm-color-tertiary":"tertiary"===this.color,"wcm-color-inverse":"inverse"===this.color,"wcm-color-accnt":"accent"===this.color,"wcm-color-error":"error"===this.color};return u``}};Re.styles=[x.globalCss,zi],Tt([w()],Re.prototype,"variant",2),Tt([w()],Re.prototype,"color",2),Re=Tt([$("wcm-text")],Re);const Zi=E`button{width:100%;height:100%;border-radius:var(--wcm-button-hover-highlight-border-radius);display:flex;align-items:flex-start}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}button>div{width:80px;padding:5px 0;display:flex;flex-direction:column;align-items:center}wcm-text{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}wcm-wallet-image{height:60px;width:60px;transition:all .2s ease;border-radius:var(--wcm-wallet-icon-border-radius);margin-bottom:5px}.wcm-sublabel{margin-top:2px}`;var Bi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,Q=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Vi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Bi(r,n,a),a};let H=class extends b{constructor(){super(...arguments),this.onClick=()=>null,this.name="",this.walletId="",this.label=void 0,this.imageId=void 0,this.installed=!1,this.recent=!1}sublabelTemplate(){return this.recent?u`RECENT`:this.installed?u`INSTALLED`:null}handleClick(){d.uA.click({name:"WALLET_BUTTON",walletId:this.walletId}),this.onClick()}render(){var i;return u``}};H.styles=[x.globalCss,Zi],Q([w()],H.prototype,"onClick",2),Q([w()],H.prototype,"name",2),Q([w()],H.prototype,"walletId",2),Q([w()],H.prototype,"label",2),Q([w()],H.prototype,"imageId",2),Q([w({type:Boolean})],H.prototype,"installed",2),Q([w({type:Boolean})],H.prototype,"recent",2),H=Q([$("wcm-wallet-button")],H);const Fi=E`:host{display:block}div{overflow:hidden;position:relative;border-radius:inherit;width:100%;height:100%;background-color:var(--wcm-color-overlay)}svg{position:relative;width:100%;height:100%}div::after{content:'';position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px solid var(--wcm-color-overlay)}div img{width:100%;height:100%;object-fit:cover;object-position:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var qi=Object.defineProperty,Ki=Object.getOwnPropertyDescriptor,Ke=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Ki(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&qi(r,n,a),a};let ve=class extends b{constructor(){super(...arguments),this.walletId="",this.imageId=void 0,this.imageUrl=void 0}render(){var i;const r=null!=(i=this.imageUrl)&&i.length?this.imageUrl:g.getWalletIcon({id:this.walletId,image_id:this.imageId});return u`${r.length?u`
${this.id}
`:O.WALLET_PLACEHOLDER}`}};ve.styles=[x.globalCss,Fi],Ke([w()],ve.prototype,"walletId",2),Ke([w()],ve.prototype,"imageId",2),Ke([w()],ve.prototype,"imageUrl",2),ve=Ke([$("wcm-wallet-image")],ve);var Qi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Dr=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Gi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Qi(r,n,a),a};let Pt=class extends b{constructor(){super(),this.preload=!0,this.preloadData()}loadImages(i){return(0,D.Z)(function*(){try{null!=i&&i.length&&(yield Promise.all(i.map(function(){var r=(0,D.Z)(function*(n){return g.preloadImage(n)});return function(n){return r.apply(this,arguments)}}())))}catch{console.info("Unsuccessful attempt at preloading some images",i)}})()}preloadListings(){var i=this;return(0,D.Z)(function*(){if(d.t0.state.enableExplorer){yield d.uc.getRecomendedWallets(),d.zb.setIsDataLoaded(!0);const{recomendedWallets:r}=d.uc.state,n=r.map(l=>g.getWalletIcon(l));yield i.loadImages(n)}else d.zb.setIsDataLoaded(!0)})()}preloadCustomImages(){var i=this;return(0,D.Z)(function*(){const r=g.getCustomImageUrls();yield i.loadImages(r)})()}preloadData(){var i=this;return(0,D.Z)(function*(){try{i.preload&&(i.preload=!1,yield Promise.all([i.preloadListings(),i.preloadCustomImages()]))}catch(r){console.error(r),d.Vs.openToast("Failed preloading","error")}})()}};Dr([j()],Pt.prototype,"preload",2),Pt=Dr([$("wcm-explorer-context")],Pt);var Yi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor;let Nr=class extends b{constructor(){super(),this.unsubscribeTheme=void 0,x.setTheme(),this.unsubscribeTheme=d.Ic.subscribe(x.setTheme)}disconnectedCallback(){var i;null==(i=this.unsubscribeTheme)||i.call(this)}};Nr=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Xi(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Yi(r,n,a),a})([$("wcm-theme-context")],Nr);const en=E`@keyframes scroll{0%{transform:translate3d(0,0,0)}100%{transform:translate3d(calc(-70px * 9),0,0)}}.wcm-slider{position:relative;overflow-x:hidden;padding:10px 0;margin:0 -20px;width:calc(100% + 40px)}.wcm-track{display:flex;width:calc(70px * 18);animation:scroll 20s linear infinite;opacity:.7}.wcm-track svg{margin:0 5px}wcm-wallet-image{width:60px;height:60px;margin:0 5px;border-radius:var(--wcm-wallet-icon-border-radius)}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-title{display:flex;align-items:center;margin-bottom:10px}.wcm-title svg{margin-right:6px}.wcm-title path{fill:var(--wcm-accent-color)}wcm-modal-footer .wcm-title{padding:0 10px}wcm-button-big{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);filter:drop-shadow(0 0 17px var(--wcm-color-bg-1))}wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-info-footer wcm-text{text-align:center;margin-bottom:15px}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var tn=Object.defineProperty,rn=Object.getOwnPropertyDescriptor;let Mt=class extends b{onGoToQrcode(){d.AV.push("Qrcode")}render(){const{recomendedWallets:i}=d.uc.state,r=[...i,...i],n=2*d.zv.RECOMMENDED_WALLET_AMOUNT;return u`
${O.MOBILE_ICON}WalletConnect
${[...Array(n)].map((l,a)=>{const s=r[a%r.length];return s?u``:O.WALLET_PLACEHOLDER})}
Select Wallet
Choose WalletConnect to see supported apps on your device`}};Mt.styles=[x.globalCss,en],Mt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?rn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&tn(r,n,a),a})([$("wcm-android-wallet-selection")],Mt);const nn=E`@keyframes loading{to{stroke-dashoffset:0}}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(1px,0,0)}30%,50%,70%{transform:translate3d(-2px,0,0)}40%,60%{transform:translate3d(2px,0,0)}}:host{display:flex;flex-direction:column;align-items:center}div{position:relative;width:110px;height:110px;display:flex;justify-content:center;align-items:center;margin:40px 0 20px 0;transform:translate3d(0,0,0)}svg{position:absolute;width:110px;height:110px;fill:none;stroke:transparent;stroke-linecap:round;stroke-width:2px;top:0;left:0}use{stroke:var(--wcm-accent-color);animation:loading 1s linear infinite}wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:90px;height:90px}wcm-text{margin-bottom:40px}.wcm-error svg{stroke:var(--wcm-error-color)}.wcm-error use{display:none}.wcm-error{animation:shake .4s cubic-bezier(.36,.07,.19,.97) both}.wcm-stale svg,.wcm-stale use{display:none}`;var an=Object.defineProperty,ln=Object.getOwnPropertyDescriptor,fe=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?ln(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&an(r,n,a),a};let G=class extends b{constructor(){super(...arguments),this.walletId=void 0,this.imageId=void 0,this.isError=!1,this.isStale=!1,this.label=""}svgLoaderTemplate(){var i,r;const n=null!=(r=null==(i=d.Ic.state.themeVariables)?void 0:i["--wcm-wallet-icon-large-border-radius"])?r:x.getPreset("--wcm-wallet-icon-large-border-radius");let l=0;l=n.includes("%")?.88*parseInt(n,10):parseInt(n,10),l*=1.17;return u``}render(){const i={"wcm-error":this.isError,"wcm-stale":this.isStale};return u`
${this.svgLoaderTemplate()}
${this.isError?"Connection declined":this.label}`}};G.styles=[x.globalCss,nn],fe([w()],G.prototype,"walletId",2),fe([w()],G.prototype,"imageId",2),fe([w({type:Boolean})],G.prototype,"isError",2),fe([w({type:Boolean})],G.prototype,"isStale",2),fe([w()],G.prototype,"label",2),G=fe([$("wcm-connector-waiting")],G);const be={manualWallets(){var i,r;const{mobileWallets:n,desktopWallets:l}=d.t0.state,a=null==(i=be.recentWallet())?void 0:i.id,c=(d.zv.isMobile()?n:l)?.filter(h=>a!==h.id);return null!=(r=d.zv.isMobile()?c?.map(({id:h,name:m,links:p})=>({id:h,name:m,mobile:p,links:p})):c?.map(({id:h,name:m,links:p})=>({id:h,name:m,desktop:p,links:p})))?r:[]},recentWallet:()=>g.getRecentWallet(),recomendedWallets(i=!1){var r;const n=i||null==(r=be.recentWallet())?void 0:r.id,{recomendedWallets:l}=d.uc.state;return l.filter(a=>n!==a.id)}},Y={onConnecting(i){g.goToConnectingView(i)},manualWalletsTemplate(){return be.manualWallets().map(i=>u``)},recomendedWalletsTemplate(i=!1){return be.recomendedWallets(i).map(r=>u``)},recentWalletTemplate(){const i=be.recentWallet();if(i)return u``}},sn=E`.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between}.wcm-desktop-title,.wcm-mobile-title{display:flex;align-items:center}.wcm-mobile-title{justify-content:space-between;margin-bottom:20px;margin-top:-10px}.wcm-desktop-title{margin-bottom:10px;padding:0 10px}.wcm-subtitle{display:flex;align-items:center}.wcm-subtitle:last-child path{fill:var(--wcm-color-fg-3)}.wcm-desktop-title svg,.wcm-mobile-title svg{margin-right:6px}.wcm-desktop-title path,.wcm-mobile-title path{fill:var(--wcm-accent-color)}`;var cn=Object.defineProperty,dn=Object.getOwnPropertyDescriptor;let St=class extends b{render(){const{explorerExcludedWalletIds:i,enableExplorer:r}=d.t0.state,n="ALL"!==i&&r,l=Y.manualWalletsTemplate(),a=Y.recomendedWalletsTemplate();let s=[Y.recentWalletTemplate(),...l,...a];s=s.filter(Boolean);const c=s.length>4||n;let h=[];h=c?s.slice(0,3):s;const m=Boolean(h.length);return u`
${O.MOBILE_ICON}Mobile
${O.SCAN_ICON}Scan with your wallet
${m?u`
${O.DESKTOP_ICON}Desktop
${h} ${c?u``:null}
`:null}`}};St.styles=[x.globalCss,sn],St=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?dn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&cn(r,n,a),a})([$("wcm-desktop-wallet-selection")],St);const mn=E`div{background-color:var(--wcm-color-bg-2);padding:10px 20px 15px 20px;border-top:1px solid var(--wcm-color-bg-3);text-align:center}a{color:var(--wcm-accent-color);text-decoration:none;transition:opacity .2s ease-in-out;display:inline}a:active{opacity:.8}@media(hover:hover){a:hover{opacity:.8}}`;var un=Object.defineProperty,pn=Object.getOwnPropertyDescriptor;let Rt=class extends b{render(){const{termsOfServiceUrl:i,privacyPolicyUrl:r}=d.t0.state;return i??r?u`
By connecting your wallet to this app, you agree to the app's ${i?u`Terms of Service`:null} ${i&&r?"and":null} ${r?u`Privacy Policy`:null}
`:null}};Rt.styles=[x.globalCss,mn],Rt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?pn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&un(r,n,a),a})([$("wcm-legal-notice")],Rt);const wn=E`div{display:grid;grid-template-columns:repeat(4,80px);margin:0 -10px;justify-content:space-between;row-gap:10px}`;var vn=Object.defineProperty,fn=Object.getOwnPropertyDescriptor;let Lt=class extends b{onQrcode(){d.AV.push("Qrcode")}render(){const{explorerExcludedWalletIds:i,enableExplorer:r}=d.t0.state,n="ALL"!==i&&r,l=Y.manualWalletsTemplate(),a=Y.recomendedWalletsTemplate();let s=[Y.recentWalletTemplate(),...l,...a];s=s.filter(Boolean);const c=s.length>8||n;let h=[];h=c?s.slice(0,7):s;const m=Boolean(h.length);return u`${m?u`
${h} ${c?u``:null}
`:null}`}};Lt.styles=[x.globalCss,wn],Lt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?fn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&vn(r,n,a),a})([$("wcm-mobile-wallet-selection")],Lt);const yn=E`:host{all:initial}.wcm-overlay{top:0;bottom:0;left:0;right:0;position:fixed;z-index:var(--wcm-z-index);overflow:hidden;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;background-color:var(--wcm-overlay-background-color);backdrop-filter:var(--wcm-overlay-backdrop-filter)}@media(max-height:720px) and (orientation:landscape){.wcm-overlay{overflow:scroll;align-items:flex-start;padding:20px 0}}.wcm-active{pointer-events:auto}.wcm-container{position:relative;max-width:360px;width:100%;outline:0;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) var(--wcm-container-border-radius) var(--wcm-container-border-radius);border:1px solid var(--wcm-color-overlay);overflow:hidden}.wcm-card{width:100%;position:relative;border-radius:var(--wcm-container-border-radius);overflow:hidden;box-shadow:0 6px 14px -6px rgba(10,16,31,.12),0 10px 32px -4px rgba(10,16,31,.1),0 0 0 1px var(--wcm-color-overlay);background-color:var(--wcm-color-bg-1);color:var(--wcm-color-fg-1)}@media(max-width:600px){.wcm-container{max-width:440px;border-radius:var(--wcm-background-border-radius) var(--wcm-background-border-radius) 0 0}.wcm-card{border-radius:var(--wcm-container-border-radius) var(--wcm-container-border-radius) 0 0}.wcm-overlay{align-items:flex-end}}@media(max-width:440px){.wcm-container{border:0}}`;var xn=Object.defineProperty,$n=Object.getOwnPropertyDescriptor,Wt=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?$n(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&xn(r,n,a),a};let ye=class extends b{constructor(){super(),this.open=!1,this.active=!1,this.unsubscribeModal=void 0,this.abortController=void 0,this.unsubscribeModal=d.jb.subscribe(i=>{i.open?this.onOpenModalEvent():this.onCloseModalEvent()})}disconnectedCallback(){var i;null==(i=this.unsubscribeModal)||i.call(this)}get overlayEl(){return g.getShadowRootElement(this,".wcm-overlay")}get containerEl(){return g.getShadowRootElement(this,".wcm-container")}toggleBodyScroll(i){document.querySelector("body")&&(i?document.getElementById("wcm-styles")?.remove():document.head.insertAdjacentHTML("beforeend",''))}onCloseModal(i){i.target===i.currentTarget&&d.jb.close()}onOpenModalEvent(){var i=this;this.toggleBodyScroll(!1),this.addKeyboardEvents(),this.open=!0,setTimeout((0,D.Z)(function*(){const r=g.isMobileAnimation()?{y:["50vh","0vh"]}:{scale:[.98,1]};yield Promise.all([ie(i.overlayEl,{opacity:[0,1]},{delay:.1,duration:.2}).finished,ie(i.containerEl,r,{delay:.1,duration:.2}).finished]),i.active=!0}),0)}onCloseModalEvent(){var i=this;return(0,D.Z)(function*(){i.toggleBodyScroll(!0),i.removeKeyboardEvents();const r=g.isMobileAnimation()?{y:["0vh","50vh"]}:{scale:[1,.98]};yield Promise.all([ie(i.overlayEl,{opacity:[1,0]},{duration:.2}).finished,ie(i.containerEl,r,{duration:.2}).finished]),i.containerEl.removeAttribute("style"),i.active=!1,i.open=!1})()}addKeyboardEvents(){this.abortController=new AbortController,window.addEventListener("keydown",i=>{var r;"Escape"===i.key?d.jb.close():"Tab"===i.key&&(null!=(r=i.target)&&r.tagName.includes("wcm-")||this.containerEl.focus())},this.abortController),this.containerEl.focus()}removeKeyboardEvents(){var i;null==(i=this.abortController)||i.abort(),this.abortController=void 0}render(){const i={"wcm-overlay":!0,"wcm-active":this.active};return u`
${this.open?u`
`:null}
`}};ye.styles=[x.globalCss,yn],Wt([j()],ye.prototype,"open",2),Wt([j()],ye.prototype,"active",2),ye=Wt([$("wcm-modal")],ye);const _n=E`div{display:flex;margin-top:15px}slot{display:inline-block;margin:0 5px}wcm-button{margin:0 5px}`;var Cn=Object.defineProperty,An=Object.getOwnPropertyDescriptor,Le=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?An(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Cn(r,n,a),a};let ae=class extends b{constructor(){super(...arguments),this.isMobile=!1,this.isDesktop=!1,this.isWeb=!1,this.isRetry=!1}onMobile(){d.zv.isMobile()?d.AV.replace("MobileConnecting"):d.AV.replace("MobileQrcodeConnecting")}onDesktop(){d.AV.replace("DesktopConnecting")}onWeb(){d.AV.replace("WebConnecting")}render(){return u`
${this.isRetry?u``:null} ${this.isMobile?u`Mobile`:null} ${this.isDesktop?u`Desktop`:null} ${this.isWeb?u`Web`:null}
`}};ae.styles=[x.globalCss,_n],Le([w({type:Boolean})],ae.prototype,"isMobile",2),Le([w({type:Boolean})],ae.prototype,"isDesktop",2),Le([w({type:Boolean})],ae.prototype,"isWeb",2),Le([w({type:Boolean})],ae.prototype,"isRetry",2),ae=Le([$("wcm-platform-selection")],ae);const En=E`button{display:flex;flex-direction:column;padding:5px 10px;border-radius:var(--wcm-button-hover-highlight-border-radius);height:100%;justify-content:flex-start}.wcm-icons{width:60px;height:60px;display:flex;flex-wrap:wrap;padding:7px;border-radius:var(--wcm-wallet-icon-border-radius);justify-content:space-between;align-items:center;margin-bottom:5px;background-color:var(--wcm-color-bg-2);box-shadow:inset 0 0 0 1px var(--wcm-color-overlay)}button:active{background-color:var(--wcm-color-overlay)}@media(hover:hover){button:hover{background-color:var(--wcm-color-overlay)}}.wcm-icons img{width:21px;height:21px;object-fit:cover;object-position:center;border-radius:calc(var(--wcm-wallet-icon-border-radius)/ 2);border:1px solid var(--wcm-color-overlay)}.wcm-icons svg{width:21px;height:21px}.wcm-icons img:nth-child(1),.wcm-icons img:nth-child(2),.wcm-icons svg:nth-child(1),.wcm-icons svg:nth-child(2){margin-bottom:4px}wcm-text{width:100%;text-align:center}#wallet-placeholder-fill{fill:var(--wcm-color-bg-3)}#wallet-placeholder-dash{stroke:var(--wcm-color-overlay)}`;var On=Object.defineProperty,kn=Object.getOwnPropertyDescriptor;let jt=class extends b{onClick(){d.AV.push("WalletExplorer")}render(){const{recomendedWallets:i}=d.uc.state,n=[...i,...be.manualWallets()].reverse().slice(0,4);return u``}};jt.styles=[x.globalCss,En],jt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?kn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&On(r,n,a),a})([$("wcm-view-all-wallets-button")],jt);const Tn=E`.wcm-qr-container{width:100%;display:flex;justify-content:center;align-items:center;aspect-ratio:1/1}`;var Pn=Object.defineProperty,Mn=Object.getOwnPropertyDescriptor,Qe=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Mn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Pn(r,n,a),a};let xe=class extends b{constructor(){super(),this.walletId="",this.imageId="",this.uri="",setTimeout(()=>{const{walletConnectUri:i}=d.zb.state;this.uri=i},0)}get overlayEl(){return g.getShadowRootElement(this,".wcm-qr-container")}render(){return u`
${this.uri?u``:u``}
`}};xe.styles=[x.globalCss,Tn],Qe([w()],xe.prototype,"walletId",2),Qe([w()],xe.prototype,"imageId",2),Qe([j()],xe.prototype,"uri",2),xe=Qe([$("wcm-walletconnect-qr")],xe);var Sn=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor;let Dt=class extends b{viewTemplate(){return d.zv.isAndroid()?u``:d.zv.isMobile()?u``:u``}render(){return u`${this.viewTemplate()}`}};Dt.styles=[x.globalCss],Dt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Rn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Sn(r,n,a),a})([$("wcm-connect-wallet-view")],Dt);const Wn=E`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var jn=Object.defineProperty,Dn=Object.getOwnPropertyDescriptor,zr=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Dn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&jn(r,n,a),a};let Ge=class extends b{constructor(){super(),this.isError=!1,this.openDesktopApp()}onFormatAndRedirect(i){const{desktop:r,name:n}=d.zv.getWalletRouterData(),l=r?.native;if(l){const a=d.zv.formatNativeUrl(l,i,n);d.zv.openHref(a,"_self")}}openDesktopApp(){const{walletConnectUri:i}=d.zb.state,r=d.zv.getWalletRouterData();g.setRecentWallet(r),i&&this.onFormatAndRedirect(i)}render(){const{name:i,id:r,image_id:n}=d.zv.getWalletRouterData(),{isMobile:l,isWeb:a}=g.getCachedRouterWalletPlatforms();return u`${`Connection can continue loading if ${i} is not installed on your device`}Retry`}};Ge.styles=[x.globalCss,Wn],zr([j()],Ge.prototype,"isError",2),Ge=zr([$("wcm-desktop-connecting-view")],Ge);const Nn=E`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}wcm-button{margin-top:15px}`;var zn=Object.defineProperty,Un=Object.getOwnPropertyDescriptor;let Nt=class extends b{onInstall(i){i&&d.zv.openHref(i,"_blank")}render(){const{name:i,id:r,image_id:n,homepage:l}=d.zv.getWalletRouterData();return u`${`Download ${i} to continue. If multiple browser extensions are installed, disable non ${i} ones and try again`}Download`}};Nt.styles=[x.globalCss,Nn],Nt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Un(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&zn(r,n,a),a})([$("wcm-install-wallet-view")],Nt);const Zn=E`wcm-wallet-image{border-radius:var(--wcm-wallet-icon-large-border-radius);width:96px;height:96px;margin-bottom:20px}wcm-info-footer{display:flex;width:100%}.wcm-app-store{justify-content:space-between}.wcm-app-store wcm-wallet-image{margin-right:10px;margin-bottom:0;width:28px;height:28px;border-radius:var(--wcm-wallet-icon-small-border-radius)}.wcm-app-store div{display:flex;align-items:center}.wcm-app-store wcm-button{margin-right:-10px}.wcm-note{flex-direction:column;align-items:center;padding:5px 0}.wcm-note wcm-text{text-align:center}wcm-platform-selection{margin-top:-15px}.wcm-note wcm-text{margin-top:15px}.wcm-note wcm-text span{color:var(--wcm-accent-color)}`;var Bn=Object.defineProperty,Vn=Object.getOwnPropertyDescriptor,Ur=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?Vn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Bn(r,n,a),a};let Ye=class extends b{constructor(){super(),this.isError=!1,this.openMobileApp()}onFormatAndRedirect(i,r=!1){const{mobile:n,name:l}=d.zv.getWalletRouterData(),a=n?.native,s=n?.universal;if(a&&!r){const c=d.zv.formatNativeUrl(a,i,l);d.zv.openHref(c,"_self")}else if(s){const c=d.zv.formatUniversalUrl(s,i,l);d.zv.openHref(c,"_self")}}openMobileApp(i=!1){const{walletConnectUri:r}=d.zb.state,n=d.zv.getWalletRouterData();g.setRecentWallet(n),r&&this.onFormatAndRedirect(r,i)}onGoToAppStore(i){i&&d.zv.openHref(i,"_blank")}render(){const{name:i,id:r,image_id:n,app:l,mobile:a}=d.zv.getWalletRouterData(),{isWeb:s}=g.getCachedRouterWalletPlatforms(),c=l?.ios,h=a?.universal;return u`Retry${h?u`Still doesn't work? Try this alternate link`:null}
${`Get ${i}`}
App Store
`}};Ye.styles=[x.globalCss,Zn],Ur([j()],Ye.prototype,"isError",2),Ye=Ur([$("wcm-mobile-connecting-view")],Ye);const Fn=E`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var qn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor;let zt=class extends b{render(){const{name:i,id:r,image_id:n}=d.zv.getWalletRouterData(),{isDesktop:l,isWeb:a}=g.getCachedRouterWalletPlatforms();return u`${`Scan this QR Code with your phone's camera or inside ${i} app`}`}};zt.styles=[x.globalCss,Fn],zt=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Kn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&qn(r,n,a),a})([$("wcm-mobile-qr-connecting-view")],zt);var Gn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor;let Ut=class extends b{render(){return u``}};Ut.styles=[x.globalCss],Ut=((i,r,n,l)=>{for(var c,a=l>1?void 0:l?Yn(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&Gn(r,n,a),a})([$("wcm-qrcode-view")],Ut);const Jn=E`wcm-modal-content{height:clamp(200px,60vh,600px);display:block;overflow:scroll;scrollbar-width:none;position:relative;margin-top:1px}.wcm-grid{display:grid;grid-template-columns:repeat(4,80px);justify-content:space-between;margin:-15px -10px;padding-top:20px}wcm-modal-content::after,wcm-modal-content::before{content:'';position:fixed;pointer-events:none;z-index:1;width:100%;height:20px;opacity:1}wcm-modal-content::before{box-shadow:0 -1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(var(--wcm-color-bg-1),rgba(255,255,255,0))}wcm-modal-content::after{box-shadow:0 1px 0 0 var(--wcm-color-bg-1);background:linear-gradient(rgba(255,255,255,0),var(--wcm-color-bg-1));top:calc(100% - 20px)}wcm-modal-content::-webkit-scrollbar{display:none}.wcm-placeholder-block{display:flex;justify-content:center;align-items:center;height:100px;overflow:hidden}.wcm-empty,.wcm-loading{display:flex}.wcm-loading .wcm-placeholder-block{height:100%}.wcm-end-reached .wcm-placeholder-block{height:0;opacity:0}.wcm-empty .wcm-placeholder-block{opacity:1;height:100%}wcm-wallet-button{margin:calc((100% - 60px)/ 3) 0}`;var ea=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,We=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?ta(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&ea(r,n,a),a};let le=class extends b{constructor(){super(...arguments),this.loading=!d.uc.state.wallets.listings.length,this.firstFetch=!d.uc.state.wallets.listings.length,this.search="",this.endReached=!1,this.intersectionObserver=void 0,this.searchDebounce=g.debounce(i=>{i.length>=1?(this.firstFetch=!0,this.endReached=!1,this.search=i,d.uc.resetSearch(),this.fetchWallets()):this.search&&(this.search="",this.endReached=this.isLastPage(),d.uc.resetSearch())})}firstUpdated(){this.createPaginationObserver()}disconnectedCallback(){var i;null==(i=this.intersectionObserver)||i.disconnect()}get placeholderEl(){return g.getShadowRootElement(this,".wcm-placeholder-block")}createPaginationObserver(){this.intersectionObserver=new IntersectionObserver(([i])=>{i.isIntersecting&&(!this.search||!this.firstFetch)&&this.fetchWallets()}),this.intersectionObserver.observe(this.placeholderEl)}isLastPage(){const{wallets:i,search:r}=d.uc.state,{listings:n,total:l}=this.search?r:i;return l<=40||n.length>=l}fetchWallets(){var i=this;return(0,D.Z)(function*(){var r;const{wallets:n,search:l}=d.uc.state,{listings:a,total:s,page:c}=i.search?l:n;if(!i.endReached&&(i.firstFetch||s>40&&a.lengthg.getWalletIcon(y));yield Promise.all([...p.map(function(){var y=(0,D.Z)(function*(_){return g.preloadImage(_)});return function(_){return y.apply(this,arguments)}}()),d.zv.wait(300)]),i.endReached=i.isLastPage()}catch(h){console.error(h),d.Vs.openToast(g.getErrorMessage(h),"error")}finally{i.loading=!1,i.firstFetch=!1}})()}onConnect(i){d.zv.isAndroid()?g.handleMobileLinking(i):g.goToConnectingView(i)}onSearchChange(i){const{value:r}=i.target;this.searchDebounce(r)}render(){const{wallets:i,search:r}=d.uc.state,{listings:n}=this.search?r:i,l=this.loading&&!n.length,a=this.search.length>=3;let s=Y.manualWalletsTemplate(),c=Y.recomendedWalletsTemplate(!0);a&&(s=s.filter(({values:p})=>g.caseSafeIncludes(p[0],this.search)),c=c.filter(({values:p})=>g.caseSafeIncludes(p[0],this.search)));const h=!this.loading&&!n.length&&!c.length,m={"wcm-loading":l,"wcm-end-reached":this.endReached||!this.loading,"wcm-empty":h};return u`
${l?null:s} ${l?null:c} ${l?null:n.map(p=>u`${p?u``:null}`)}
${h?u`No results found`:null} ${!h&&this.loading?u``:null}
`}};le.styles=[x.globalCss,Jn],We([j()],le.prototype,"loading",2),We([j()],le.prototype,"firstFetch",2),We([j()],le.prototype,"search",2),We([j()],le.prototype,"endReached",2),le=We([$("wcm-wallet-explorer-view")],le);const ra=E`wcm-info-footer{flex-direction:column;align-items:center;display:flex;width:100%;padding:5px 0}wcm-text{text-align:center}`;var oa=Object.defineProperty,ia=Object.getOwnPropertyDescriptor,Hr=(i,r,n,l)=>{for(var c,a=l>1?void 0:l?ia(r,n):r,s=i.length-1;s>=0;s--)(c=i[s])&&(a=(l?c(r,n,a):c(a))||a);return l&&a&&oa(r,n,a),a};let Xe=class extends b{constructor(){super(),this.isError=!1,this.openWebWallet()}onFormatAndRedirect(i){const{desktop:r,name:n}=d.zv.getWalletRouterData(),l=r?.universal;if(l){const a=d.zv.formatUniversalUrl(l,i,n);d.zv.openHref(a,"_blank")}}openWebWallet(){const{walletConnectUri:i}=d.zb.state,r=d.zv.getWalletRouterData();g.setRecentWallet(r),i&&this.onFormatAndRedirect(i)}render(){const{name:i,id:r,image_id:n}=d.zv.getWalletRouterData(),{isMobile:l,isDesktop:a}=g.getCachedRouterWalletPlatforms(),s=d.zv.isMobile();return u`${`${i} web app has opened in a new tab. Go there, accept the connection, and come back`}Retry`}};Xe.styles=[x.globalCss,ra],Hr([j()],Xe.prototype,"isError",2),Xe=Hr([$("wcm-web-connecting-view")],Xe)}}]); \ No newline at end of file diff --git a/index.html b/index.html index c815cf5f5..2be51fa39 100644 --- a/index.html +++ b/index.html @@ -8,10 +8,10 @@ - + - + \ No newline at end of file diff --git a/main.245ad499817ca8fc.js b/main.245ad499817ca8fc.js new file mode 100644 index 000000000..48dd8e42d --- /dev/null +++ b/main.245ad499817ca8fc.js @@ -0,0 +1,13 @@ +(self.webpackChunkangular=self.webpackChunkangular||[]).push([[179],{13912:(q,n,u)=>{"use strict";var l={};u.r(l),u.d(l,{identity:()=>sG});var v={};u.r(v),u.d(v,{base2:()=>aG});var E={};u.r(E),u.d(E,{base8:()=>cG});var M={};u.r(M),u.d(M,{base10:()=>uG});var s={};u.r(s),u.d(s,{base16:()=>lG,base16upper:()=>fG});var g={};u.r(g),u.d(g,{base32:()=>dG,base32hex:()=>yG,base32hexpad:()=>vG,base32hexpadupper:()=>bG,base32hexupper:()=>mG,base32pad:()=>pG,base32padupper:()=>gG,base32upper:()=>hG,base32z:()=>wG});var y={};u.r(y),u.d(y,{base36:()=>EG,base36upper:()=>AG});var f={};u.r(f),u.d(f,{base58btc:()=>_G,base58flickr:()=>SG});var d={};u.r(d),u.d(d,{base64:()=>xG,base64pad:()=>MG,base64url:()=>IG,base64urlpad:()=>CG});var p={};u.r(p),u.d(p,{base256emoji:()=>PG});var m={};u.r(m),u.d(m,{sha256:()=>qG,sha512:()=>eZ});var S={};u.r(S),u.d(S,{identity:()=>nZ});var _={};u.r(_),u.d(_,{code:()=>iZ,decode:()=>sZ,encode:()=>oZ,name:()=>rZ});var D={};u.r(D),u.d(D,{code:()=>lZ,decode:()=>dZ,encode:()=>fZ,name:()=>uZ});var P={};u.r(P),u.d(P,{identity:()=>XZ});var x={};u.r(x),u.d(x,{base2:()=>qZ});var C={};u.r(C),u.d(C,{base8:()=>eJ});var N={};u.r(N),u.d(N,{base10:()=>tJ});var k={};u.r(k),u.d(k,{base16:()=>nJ,base16upper:()=>rJ});var U={};u.r(U),u.d(U,{base32:()=>iJ,base32hex:()=>cJ,base32hexpad:()=>lJ,base32hexpadupper:()=>fJ,base32hexupper:()=>uJ,base32pad:()=>sJ,base32padupper:()=>aJ,base32upper:()=>oJ,base32z:()=>dJ});var z={};u.r(z),u.d(z,{base36:()=>hJ,base36upper:()=>pJ});var Y={};u.r(Y),u.d(Y,{base58btc:()=>gJ,base58flickr:()=>yJ});var G={};u.r(G),u.d(G,{base64:()=>mJ,base64pad:()=>vJ,base64url:()=>bJ,base64urlpad:()=>wJ});var F={};u.r(F),u.d(F,{base256emoji:()=>xJ});var j={};u.r(j),u.d(j,{sha256:()=>WJ,sha512:()=>GJ});var Z={};u.r(Z),u.d(Z,{identity:()=>JJ});var T={};u.r(T),u.d(T,{code:()=>$J,decode:()=>XJ,encode:()=>QJ,name:()=>YJ});var o={};u.r(o),u.d(o,{code:()=>nY,decode:()=>iY,encode:()=>rY,name:()=>tY});var h={};u.r(h),u.d(h,{identity:()=>aee});var w={};u.r(w),u.d(w,{base2:()=>cee});var I={};u.r(I),u.d(I,{base8:()=>uee});var R={};u.r(R),u.d(R,{base10:()=>lee});var V={};u.r(V),u.d(V,{base16:()=>fee,base16upper:()=>dee});var H={};u.r(H),u.d(H,{base32:()=>hee,base32hex:()=>mee,base32hexpad:()=>bee,base32hexpadupper:()=>wee,base32hexupper:()=>vee,base32pad:()=>gee,base32padupper:()=>yee,base32upper:()=>pee,base32z:()=>Eee});var L={};u.r(L),u.d(L,{base36:()=>Aee,base36upper:()=>_ee});var b={};u.r(b),u.d(b,{base58btc:()=>See,base58flickr:()=>xee});var B={};u.r(B),u.d(B,{base64:()=>Mee,base64pad:()=>Iee,base64url:()=>Cee,base64urlpad:()=>Dee});var re={};u.r(re),u.d(re,{base256emoji:()=>Ree});var ne={};u.r(ne),u.d(ne,{sha256:()=>ete,sha512:()=>tte});var te={};u.r(te),u.d(te,{identity:()=>rte});var ae={};u.r(ae),u.d(ae,{code:()=>ote,decode:()=>ate,encode:()=>ste,name:()=>ite});var ge={};function pe(t){return"function"==typeof t}function we(t){const r=t(a=>{Error.call(a),a.stack=(new Error).stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}u.r(ge),u.d(ge,{code:()=>fte,decode:()=>hte,encode:()=>dte,name:()=>lte});const ce=we(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription:\n${r.map((a,A)=>`${A+1}) ${a.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=r});function le(t,e){if(t){const r=t.indexOf(e);0<=r&&t.splice(r,1)}}class ue{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(const O of r)O.remove(this);else r.remove(this);const{initialTeardown:a}=this;if(pe(a))try{a()}catch(O){e=O instanceof ce?O.errors:[O]}const{_finalizers:A}=this;if(A){this._finalizers=null;for(const O of A)try{Ae(O)}catch(J){e=e??[],J instanceof ce?e=[...e,...J.errors]:e.push(J)}}if(e)throw new ce(e)}}add(e){var r;if(e&&e!==this)if(this.closed)Ae(e);else{if(e instanceof ue){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}}_hasParent(e){const{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){const{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){const{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&le(r,e)}remove(e){const{_finalizers:r}=this;r&&le(r,e),e instanceof ue&&e._removeParent(this)}}ue.EMPTY=(()=>{const t=new ue;return t.closed=!0,t})();const fe=ue.EMPTY;function he(t){return t instanceof ue||t&&"closed"in t&&pe(t.remove)&&pe(t.add)&&pe(t.unsubscribe)}function Ae(t){pe(t)?t():t.unsubscribe()}const Pe={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Re={setTimeout(t,e,...r){const{delegate:a}=Re;return a?.setTimeout?a.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){const{delegate:e}=Re;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function ot(t){Re.setTimeout(()=>{const{onUnhandledError:e}=Pe;if(!e)throw t;e(t)})}function nt(){}const Ye=He("C",void 0,void 0);function He(t,e,r){return{kind:t,value:e,error:r}}let ze=null;function Be(t){if(Pe.useDeprecatedSynchronousErrorHandling){const e=!ze;if(e&&(ze={errorThrown:!1,error:null}),t(),e){const{errorThrown:r,error:a}=ze;if(ze=null,r)throw a}}else t()}class ut extends ue{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,he(e)&&e.add(this)):this.destination=ke}static create(e,r,a){return new je(e,r,a)}next(e){this.isStopped?ye(function st(t){return He("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?ye(function It(t){return He("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?ye(Ye,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Me=Function.prototype.bind;function ve(t,e){return Me.call(t,e)}class xe{constructor(e){this.partialObserver=e}next(e){const{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(a){Ge(a)}}error(e){const{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(a){Ge(a)}else Ge(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){Ge(r)}}}class je extends ut{constructor(e,r,a){let A;if(super(),pe(e)||!e)A={next:e??void 0,error:r??void 0,complete:a??void 0};else{let O;this&&Pe.useDeprecatedNextContext?(O=Object.create(e),O.unsubscribe=()=>this.unsubscribe(),A={next:e.next&&ve(e.next,O),error:e.error&&ve(e.error,O),complete:e.complete&&ve(e.complete,O)}):A=e}this.destination=new xe(A)}}function Ge(t){Pe.useDeprecatedSynchronousErrorHandling?function Ze(t){Pe.useDeprecatedSynchronousErrorHandling&&ze&&(ze.errorThrown=!0,ze.error=t)}(t):ot(t)}function ye(t,e){const{onStoppedNotification:r}=Pe;r&&Re.setTimeout(()=>r(t,e))}const ke={closed:!0,next:nt,error:function Qe(t){throw t},complete:nt},et="function"==typeof Symbol&&Symbol.observable||"@@observable";function qe(t){return t}function bt(t){return 0===t.length?qe:1===t.length?t[0]:function(r){return t.reduce((a,A)=>A(a),r)}}class pt{constructor(e){e&&(this._subscribe=e)}lift(e){const r=new pt;return r.source=this,r.operator=e,r}subscribe(e,r,a){const A=function Nt(t){return t&&t instanceof ut||function kn(t){return t&&pe(t.next)&&pe(t.error)&&pe(t.complete)}(t)&&he(t)}(e)?e:new je(e,r,a);return Be(()=>{const{operator:O,source:J}=this;A.add(O?O.call(A,J):J?this._subscribe(A):this._trySubscribe(A))}),A}_trySubscribe(e){try{return this._subscribe(e)}catch(r){e.error(r)}}forEach(e,r){return new(r=xt(r))((a,A)=>{const O=new je({next:J=>{try{e(J)}catch(ee){A(ee),O.unsubscribe()}},error:A,complete:a});this.subscribe(O)})}_subscribe(e){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(e)}[et](){return this}pipe(...e){return bt(e)(this)}toPromise(e){return new(e=xt(e))((r,a)=>{let A;this.subscribe(O=>A=O,O=>a(O),()=>r(A))})}}function xt(t){var e;return null!==(e=t??Pe.Promise)&&void 0!==e?e:Promise}pt.create=t=>new pt(t);const Ot=we(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class Mn extends pt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const r=new Tt(this,this);return r.operator=e,r}_throwIfClosed(){if(this.closed)throw new Ot}next(e){Be(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(e)}})}error(e){Be(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:r}=this;for(;r.length;)r.shift().error(e)}})}complete(){Be(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:r,isStopped:a,observers:A}=this;return r||a?fe:(this.currentObservers=null,A.push(e),new ue(()=>{this.currentObservers=null,le(A,e)}))}_checkFinalizedStatuses(e){const{hasError:r,thrownError:a,isStopped:A}=this;r?e.error(a):A&&e.complete()}asObservable(){const e=new pt;return e.source=this,e}}Mn.create=(t,e)=>new Tt(t,e);class Tt extends Mn{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,a;null===(a=null===(r=this.destination)||void 0===r?void 0:r.next)||void 0===a||a.call(r,e)}error(e){var r,a;null===(a=null===(r=this.destination)||void 0===r?void 0:r.error)||void 0===a||a.call(r,e)}complete(){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===r||r.call(e)}_subscribe(e){var r,a;return null!==(a=null===(r=this.source)||void 0===r?void 0:r.subscribe(e))&&void 0!==a?a:fe}}function Hn(t){return e=>{if(function Pt(t){return pe(t?.lift)}(e))return e.lift(function(r){try{return t(r,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function Bt(t,e,r,a,A){return new Kt(t,e,r,a,A)}class Kt extends ut{constructor(e,r,a,A,O,J){super(e),this.onFinalize=O,this.shouldUnsubscribe=J,this._next=r?function(ee){try{r(ee)}catch(ie){e.error(ie)}}:super._next,this._error=A?function(ee){try{A(ee)}catch(ie){e.error(ie)}finally{this.unsubscribe()}}:super._error,this._complete=a?function(){try{a()}catch(ee){e.error(ee)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:r}=this;super.unsubscribe(),!r&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function dr(t,e){return Hn((r,a)=>{let A=0;r.subscribe(Bt(a,O=>{a.next(t.call(e,O,A++))}))})}function nn(t,e,r,a){return new(r||(r=Promise))(function(O,J){function ee(de){try{oe(a.next(de))}catch(be){J(be)}}function ie(de){try{oe(a.throw(de))}catch(be){J(be)}}function oe(de){de.done?O(de.value):function A(O){return O instanceof r?O:new r(function(J){J(O)})}(de.value).then(ee,ie)}oe((a=a.apply(t,e||[])).next())})}Object.create;function gn(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],a=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Cn(t){return this instanceof Cn?(this.v=t,this):new Cn(t)}function yn(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A,a=r.apply(t,e||[]),O=[];return A={},ee("next"),ee("throw"),ee("return",function J(Ce){return function(Ie){return Promise.resolve(Ie).then(Ce,be)}}),A[Symbol.asyncIterator]=function(){return this},A;function ee(Ce,Ie){a[Ce]&&(A[Ce]=function(Ue){return new Promise(function(We,$e){O.push([Ce,Ue,We,$e])>1||ie(Ce,Ue)})},Ie&&(A[Ce]=Ie(A[Ce])))}function ie(Ce,Ie){try{!function oe(Ce){Ce.value instanceof Cn?Promise.resolve(Ce.value.v).then(de,be):Ee(O[0][2],Ce)}(a[Ce](Ie))}catch(Ue){Ee(O[0][3],Ue)}}function de(Ce){ie("next",Ce)}function be(Ce){ie("throw",Ce)}function Ee(Ce,Ie){Ce(Ie),O.shift(),O.length&&ie(O[0][0],O[0][1])}}function wn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,e=t[Symbol.asyncIterator];return e?e.call(t):(t=gn(t),r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r);function a(O){r[O]=t[O]&&function(J){return new Promise(function(ee,ie){(function A(O,J,ee,ie){Promise.resolve(ie).then(function(oe){O({value:oe,done:ee})},J)})(ee,ie,(J=t[O](J)).done,J.value)})}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const hr=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function ur(t){return pe(t?.then)}function yr(t){return pe(t[et])}function _t(t){return Symbol.asyncIterator&&pe(t?.[Symbol.asyncIterator])}function _r(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Sr=function Br(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function wr(t){return pe(t?.[Sr])}function xr(t){return yn(this,arguments,function*(){const r=t.getReader();try{for(;;){const{value:a,done:A}=yield Cn(r.read());if(A)return yield Cn(void 0);yield yield Cn(a)}}finally{r.releaseLock()}})}function Dr(t){return pe(t?.getReader)}function Jr(t){if(t instanceof pt)return t;if(null!=t){if(yr(t))return function Kr(t){return new pt(e=>{const r=t[et]();if(pe(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(hr(t))return function nr(t){return new pt(e=>{for(let r=0;r{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,ot)})}(t);if(_t(t))return li(t);if(wr(t))return function Qr(t){return new pt(e=>{for(const r of t)if(e.next(r),e.closed)return;e.complete()})}(t);if(Dr(t))return function vi(t){return li(xr(t))}(t)}throw _r(t)}function li(t){return new pt(e=>{(function mo(t,e){var r,a,A,O;return nn(this,void 0,void 0,function*(){try{for(r=wn(t);!(a=yield r.next()).done;){const J=a.value;if(e.next(J),e.closed)return}}catch(J){A={error:J}}finally{try{a&&!a.done&&(O=r.return)&&(yield O.call(r))}finally{if(A)throw A.error}}e.complete()})})(t,e).catch(r=>e.error(r))})}function ei(t,e,r,a=0,A=!1){const O=e.schedule(function(){r(),A?t.add(this.schedule(null,a)):this.unsubscribe()},a);if(t.add(O),!A)return O}function us(t,e,r=1/0){return pe(e)?us((a,A)=>dr((O,J)=>e(a,O,A,J))(Jr(t(a,A))),r):("number"==typeof e&&(r=e),Hn((a,A)=>function Wa(t,e,r,a,A,O,J,ee){const ie=[];let oe=0,de=0,be=!1;const Ee=()=>{be&&!ie.length&&!oe&&e.complete()},Ce=Ue=>oe{O&&e.next(Ue),oe++;let We=!1;Jr(r(Ue,de++)).subscribe(Bt(e,$e=>{A?.($e),O?Ce($e):e.next($e)},()=>{We=!0},void 0,()=>{if(We)try{for(oe--;ie.length&&oeIe($e)):Ie($e)}Ee()}catch($e){e.error($e)}}))};return t.subscribe(Bt(e,Ce,()=>{be=!0,Ee()})),()=>{ee?.()}}(a,A,t,r)))}const qs=new pt(t=>t.complete());function ea(t){return t[t.length-1]}function Ef(t){return function pc(t){return t&&pe(t.schedule)}(ea(t))?t.pop():void 0}function $c(t,e=0){return Hn((r,a)=>{r.subscribe(Bt(a,A=>ei(a,t,()=>a.next(A),e),()=>ei(a,t,()=>a.complete(),e),A=>ei(a,t,()=>a.error(A),e)))})}function Af(t,e=0){return Hn((r,a)=>{a.add(t.schedule(()=>r.subscribe(a),e))})}function Lt(t,e){if(!t)throw new Error("Iterable cannot be null");return new pt(r=>{ei(r,e,()=>{const a=t[Symbol.asyncIterator]();ei(r,e,()=>{a.next().then(A=>{A.done?r.complete():r.next(A.value)})},0,!0)})})}function Wn(t,e){if(null!=t){if(yr(t))return function _f(t,e){return Jr(t).pipe(Af(e),$c(e))}(t,e);if(hr(t))return function ly(t,e){return new pt(r=>{let a=0;return e.schedule(function(){a===t.length?r.complete():(r.next(t[a++]),r.closed||this.schedule())})})}(t,e);if(ur(t))return function D0(t,e){return Jr(t).pipe(Af(e),$c(e))}(t,e);if(_t(t))return Lt(t,e);if(wr(t))return function mt(t,e){return new pt(r=>{let a;return ei(r,e,()=>{a=t[Sr](),ei(r,e,()=>{let A,O;try{({value:A,done:O}=a.next())}catch(J){return void r.error(J)}O?r.complete():r.next(A)},0,!0)}),()=>pe(a?.return)&&a.return()})}(t,e);if(Dr(t))return function pn(t,e){return Lt(xr(t),e)}(t,e)}throw _r(t)}function bi(t,e){return e?Wn(t,e):Jr(t)}function jr(...t){const e=Ef(t),r=function Yc(t,e){return"number"==typeof ea(t)?t.pop():e}(t,1/0),a=t;return a.length?1===a.length?Jr(a[0]):function Xs(t=1/0){return us(qe,t)}(r)(bi(a,e)):qs}function Pi(t,e,...r){if(!0===e)return void t();if(!1===e)return;const a=new je({next:()=>{a.unsubscribe(),t()}});return Jr(e(...r)).subscribe(a)}function Mr(t){for(let e in t)if(t[e]===Mr)return e;throw Error("Could not find renamed property on target object.")}function wi(t,e){for(const r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Ir(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Ir).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const r=e.indexOf("\n");return-1===r?e:e.substring(0,r)}function ns(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const xo=Mr({__forward_ref__:Mr});function Zr(t){return t.__forward_ref__=Zr,t.toString=function(){return Ir(this())},t}function Qn(t){return As(t)?t():t}function As(t){return"function"==typeof t&&t.hasOwnProperty(xo)&&t.__forward_ref__===Zr}function Ls(t){return t&&!!t.\u0275providers}const Sa="https://g.co/ng/security#xss";class Tn extends Error{constructor(e,r){super(vo(e,r)),this.code=e}}function vo(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function Lr(t){return"string"==typeof t?t:null==t?"":String(t)}function ci(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Lr(t)}function Ud(t,e){throw new Tn(-201,!1)}function Ou(t,e,r){t!=e&&ui(r,t,e,"==")}function xa(t,e){null==t&&ui(e,t,null,"!=")}function ui(t,e,r,a){throw new Error(`ASSERTION ERROR: ${t}`+(null==a?"":` [Expected=> ${r} ${a} ${e} <=Actual]`))}function Tr(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ma(t){return{providers:t.providers||[],imports:t.imports||[]}}function N0(t){return g1(t,Sf)||g1(t,m1)}function g1(t,e){return t.hasOwnProperty(e)?t[e]:null}function y1(t){return t&&(t.hasOwnProperty(hl)||t.hasOwnProperty(v1))?t[hl]:null}const Sf=Mr({\u0275prov:Mr}),hl=Mr({\u0275inj:Mr}),m1=Mr({ngInjectableDef:Mr}),v1=Mr({ngInjectorDef:Mr});var Xr,t;let P0;function na(t){const e=P0;return P0=t,e}function pl(t,e,r){const a=N0(t);return a&&"root"==a.providedIn?void 0===a.value?a.value=a.factory():a.value:r&Xr.Optional?null:void 0!==e?e:void Ud(Ir(t))}(t=Xr||(Xr={}))[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional";const Ri=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Ia={},gl="__NG_DI_FLAG__",R0="ngTempTokenPath",k0="ngTokenPath",W2=/\n/gm,w1="\u0275",L0="__source";let yl;function ml(t){const e=yl;return yl=t,e}function E1(t,e=Xr.Default){if(void 0===yl)throw new Tn(-203,!1);return null===yl?pl(t,void 0,e):yl.get(t,e&Xr.Optional?null:void 0,e)}function mr(t,e=Xr.Default){return(function b1(){return P0}()||E1)(Qn(t),e)}function A1(t){throw new Tn(202,!1)}function jo(t,e=Xr.Default){return mr(t,B0(e))}function B0(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function dy(t){const e=[];for(let r=0;r ");else if("object"==typeof e){let O=[];for(let J in e)if(e.hasOwnProperty(J)){let ee=e[J];O.push(J+":"+("string"==typeof ee?JSON.stringify(ee):Ir(ee)))}A=`{${O.join(", ")}}`}return`${r}${a?"("+a+")":""}[${A}]: ${t.replace(W2,"\n ")}`}("\n"+t.message,A,r,a),t[k0]=A,t[R0]=null,t}function gc(t){return{toString:t}.toString()}var vl,yc;!function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(vl||(vl={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(yc||(yc={}));const Za={},fi=[],j0=Mr({\u0275cmp:Mr}),Nu=Mr({\u0275dir:Mr}),Vd=Mr({\u0275pipe:Mr}),xf=Mr({\u0275mod:Mr}),Ja=Mr({\u0275fac:Mr}),Mf=Mr({__NG_ELEMENT_ID__:Mr});let F0=0;function Bs(t){return gc(()=>{const e=M1(t),r={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===vl.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||yc.Emulated,id:"c"+F0++,styles:t.styles||fi,_:null,schemas:t.schemas||null,tView:null};If(r);const a=t.dependencies;return r.directiveDefs=K0(a,!1),r.pipeDefs=K0(a,!0),r})}function hy(t,e,r){const a=t.\u0275cmp;a.directiveDefs=K0(e,!1),a.pipeDefs=K0(r,!0)}function S1(t){return di(t)||Ji(t)}function U0(t){return null!==t}function Ca(t){return gc(()=>({type:t.type,bootstrap:t.bootstrap||fi,declarations:t.declarations||fi,imports:t.imports||fi,exports:t.exports||fi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function x1(t,e){return gc(()=>{const r=ra(t,!0);r.declarations=e.declarations||fi,r.imports=e.imports||fi,r.exports=e.exports||fi})}function py(t,e){if(null==t)return Za;const r={};for(const a in t)if(t.hasOwnProperty(a)){let A=t[a],O=A;Array.isArray(A)&&(O=A[1],A=A[0]),r[A]=a,e&&(e[A]=O)}return r}function Or(t){return gc(()=>{const e=M1(t);return If(e),e})}function _s(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function di(t){return t[j0]||null}function Ji(t){return t[Nu]||null}function ls(t){return t[Vd]||null}function bl(t){const e=di(t)||Ji(t)||ls(t);return null!==e&&e.standalone}function ra(t,e){const r=t[xf]||null;if(!r&&!0===e)throw new Error(`Type ${Ir(t)} does not have '\u0275mod' property.`);return r}function M1(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||fi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:py(t.inputs,e),outputs:py(t.outputs)}}function If(t){t.features?.forEach(e=>e(t))}function K0(t,e){if(!t)return null;const r=e?ls:S1;return()=>("function"==typeof t?t():t).map(a=>r(a)).filter(U0)}const mc=0,Zn=1,tr=2,Ki=3,js=4,Ya=5,rs=6,Pu=7,ki=8,wl=9,Qc=10,Hr=11,gy=12,Hd=13,yy=14,Xc=15,Fo=16,El=17,Ru=18,Da=19,Al=20,I1=21,Mi=22,my=1,z0=2,$a=7,Wd=8,Qa=9,zi=10;function Mo(t){return Array.isArray(t)&&"object"==typeof t[my]}function ia(t){return Array.isArray(t)&&!0===t[my]}function vy(t){return 0!=(4&t.flags)}function Gd(t){return t.componentOffset>-1}function vc(t){return 1==(1&t.flags)}function Ss(t){return!!t.template}function Cf(t){return 0!=(256&t[tr])}function Lu(t,e){return t.hasOwnProperty(Ja)?t[Ja]:null}class J2{constructor(e,r,a){this.previousValue=e,this.currentValue=r,this.firstChange=a}isFirstChange(){return this.firstChange}}function is(){return xl}function xl(t){return t.type.prototype.ngOnChanges&&(t.setInput=H0),Of}function Of(){const t=aa(this),e=t?.current;if(e){const r=t.previous;if(r===Za)t.previous=e;else for(let a in e)r[a]=e[a];t.current=null,this.ngOnChanges(e)}}function H0(t,e,r,a){const A=this.declaredInputs[r],O=aa(t)||function Ta(t,e){return t[Yd]=e}(t,{previous:Za,current:null}),J=O.current||(O.current={}),ee=O.previous,ie=ee[A];J[A]=new J2(ie&&ie.currentValue,e,ee===Za),t[a]=e}is.ngInherit=!0;const Yd="__ngSimpleChanges__";function aa(t){return t[Yd]||null}let qc=null;const No=function(t,e,r){qc?.(t,e,r)},Bu="svg",Sy="math";function Uo(t){for(;Array.isArray(t);)t=t[mc];return t}function fs(t,e){return Uo(e[t])}function Bi(t,e){return Uo(e[t.index])}function Oa(t,e){return t.data[e]}function Ml(t,e){return t[e]}function Ms(t,e){const r=e[t];return Mo(r)?r:r[mc]}function Nf(t){return 64==(64&t[tr])}function Xa(t,e){return null==e?null:t[e]}function Iy(t){t[Ru]=0}function ju(t,e){t[Ya]+=e;let r=t,a=t[Ki];for(;null!==a&&(1===e&&1===r[Ya]||-1===e&&0===r[Ya]);)a[Ya]+=e,r=a,a=a[Ki]}const Nr={lFrame:ec(null),bindingsEnabled:!0};function Z0(){return Nr.bindingsEnabled}function Cy(){Nr.bindingsEnabled=!0}function Dy(){Nr.bindingsEnabled=!1}function bn(){return Nr.lFrame.lView}function Yr(){return Nr.lFrame.tView}function Po(t){return Nr.lFrame.contextLView=t,t[ki]}function Is(t){return Nr.lFrame.contextLView=null,t}function Ko(){let t=Ty();for(;null!==t&&64===t.type;)t=t.parent;return t}function Ty(){return Nr.lFrame.currentTNode}function ca(){const t=Nr.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function os(t,e){const r=Nr.lFrame;r.currentTNode=t,r.isParent=e}function $d(){return Nr.lFrame.isParent}function J0(){Nr.lFrame.isParent=!1}function ds(){const t=Nr.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Na(){return Nr.lFrame.bindingIndex}function Oy(t){return Nr.lFrame.bindingIndex=t}function Cl(){return Nr.lFrame.bindingIndex++}function qa(t){const e=Nr.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function Ny(t){Nr.lFrame.inI18n=t}function O1(t,e){const r=Nr.lFrame;r.bindingIndex=r.bindingRootIndex=t,Xd(e)}function Xd(t){Nr.lFrame.currentDirectiveIndex=t}function Dl(t){const e=Nr.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function qd(){return Nr.lFrame.currentQueryIndex}function $0(t){Nr.lFrame.currentQueryIndex=t}function P1(t){const e=t[Zn];return 2===e.type?e.declTNode:1===e.type?t[rs]:null}function Tl(t,e,r){if(r&Xr.SkipSelf){let A=e,O=t;for(;(A=A.parent,null===A&&!(r&Xr.Host))&&(A=P1(O),!(null===A||(O=O[Xc],10&A.type))););if(null===A)return!1;e=A,t=O}const a=Nr.lFrame=Rf();return a.currentTNode=e,a.lView=t,!0}function Q0(t){const e=Rf(),r=t[Zn];Nr.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function Rf(){const t=Nr.lFrame,e=null===t?null:t.child;return null===e?ec(t):e}function ec(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function kf(){const t=Nr.lFrame;return Nr.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Lf=kf;function nu(){const t=kf();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Py(t){return(Nr.lFrame.contextLView=function Bf(t,e){for(;t>0;)e=e[Xc],t--;return e}(t,Nr.lFrame.contextLView))[ki]}function hs(){return Nr.lFrame.selectedIndex}function ru(t){Nr.lFrame.selectedIndex=t}function Pr(){const t=Nr.lFrame;return Oa(t.tView,t.selectedIndex)}function X0(){Nr.lFrame.currentNamespace=Bu}function Ry(){Nr.lFrame.currentNamespace=Sy}function ky(){!function q0(){Nr.lFrame.currentNamespace=null}()}function Ii(t,e){for(let r=e.directiveStart,a=e.directiveEnd;r=a)break}else e[ie]<0&&(t[Ru]+=65536),(ee>11>16&&(3&t[tr])===e){t[tr]+=2048,No(4,ee,O);try{O.call(ee)}finally{No(5,ee,O)}}}else{No(4,ee,O);try{O.call(ee)}finally{No(5,ee,O)}}}const Uf=-1;class Ro{constructor(e,r,a){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=a}}function ep(t,e,r){let a=0;for(;ae){J=O-1;break}}}for(;O>16}(t),a=e;for(;r>0;)a=a[Xc],r--;return a}let tp=!0;function Nl(t){const e=tp;return tp=t,e}const Vy=255,np=5;let j1=0;const tc={};function ih(t,e){const r=Hy(t,e);if(-1!==r)return r;const a=e[Zn];a.firstCreatePass&&(t.injectorIndex=e.length,oh(a.data,t),oh(e,null),oh(a.blueprint,null));const A=rp(t,e),O=t.injectorIndex;if(Ky(A)){const J=rh(A),ee=Fu(A,e),ie=ee[Zn].data;for(let oe=0;oe<8;oe++)e[O+oe]=ee[J+oe]|ie[J+oe]}return e[O+8]=A,O}function oh(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Hy(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function rp(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let r=0,a=null,A=e;for(;null!==A;){if(a=Yy(A),null===a)return Uf;if(r++,A=A[Xc],-1!==a.injectorIndex)return a.injectorIndex|r<<16}return Uf}function ip(t,e,r){!function F1(t,e,r){let a;"string"==typeof r?a=r.charCodeAt(0)||0:r.hasOwnProperty(Mf)&&(a=r[Mf]),null==a&&(a=r[Mf]=j1++);const A=a&Vy,O=1<>np)]|=O}(t,e,r)}function Wy(t,e,r){if(r&Xr.Optional||void 0!==t)return t;Ud()}function U1(t,e,r,a){if(r&Xr.Optional&&void 0===a&&(a=null),!(r&(Xr.Self|Xr.Host))){const A=t[wl],O=na(void 0);try{return A?A.get(e,a,r&Xr.Optional):pl(e,a,r&Xr.Optional)}finally{na(O)}}return Wy(a,0,r)}function K1(t,e,r,a=Xr.Default,A){if(null!==t){if(1024&e[tr]){const J=function W1(t,e,r,a,A){let O=t,J=e;for(;null!==O&&null!==J&&1024&J[tr]&&!(256&J[tr]);){const ee=Gy(O,J,r,a|Xr.Self,tc);if(ee!==tc)return ee;let ie=O.parent;if(!ie){const oe=J[I1];if(oe){const de=oe.get(r,tc,a);if(de!==tc)return de}ie=Yy(J),J=J[Xc]}O=ie}return A}(t,e,r,a,tc);if(J!==tc)return J}const O=Gy(t,e,r,a,tc);if(O!==tc)return O}return U1(e,r,a,A)}function Gy(t,e,r,a,A){const O=function $2(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(Mf)?t[Mf]:void 0;return"number"==typeof e?e>=0?e&Vy:Zy:e}(r);if("function"==typeof O){if(!Tl(e,t,a))return a&Xr.Host?Wy(A,0,a):U1(e,r,a,A);try{const J=O(a);if(null!=J||a&Xr.Optional)return J;Ud()}finally{Lf()}}else if("number"==typeof O){let J=null,ee=Hy(t,e),ie=Uf,oe=a&Xr.Host?e[Fo][rs]:null;for((-1===ee||a&Xr.SkipSelf)&&(ie=-1===ee?rp(t,e):e[ee+8],ie!==Uf&&H1(a,!1)?(J=e[Zn],ee=rh(ie),e=Fu(ie,e)):ee=-1);-1!==ee;){const de=e[Zn];if(V1(O,ee,de.data)){const be=z1(ee,e,r,J,a,oe);if(be!==tc)return be}ie=e[ee+8],ie!==Uf&&H1(a,e[Zn].data[ee+8]===oe)&&V1(O,ee,e)?(J=de,ee=rh(ie),e=Fu(ie,e)):ee=-1}}return A}function z1(t,e,r,a,A,O){const J=e[Zn],ee=J.data[t+8],de=sh(ee,J,r,null==a?Gd(ee)&&tp:a!=J&&0!=(3&ee.type),A&Xr.Host&&O===ee);return null!==de?wc(e,J,de,ee):tc}function sh(t,e,r,a,A){const O=t.providerIndexes,J=e.data,ee=1048575&O,ie=t.directiveStart,oe=t.directiveEnd,de=O>>20,Ee=A?ee+de:oe;for(let Ce=a?ee:ee+de;Ce=ie&&Ie.type===r)return Ce}if(A){const Ce=J[ie];if(Ce&&Ss(Ce)&&Ce.type===r)return ie}return null}function wc(t,e,r,a){let A=t[r];const O=e.data;if(function By(t){return t instanceof Ro}(A)){const J=A;J.resolving&&function fy(t,e){const r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new Tn(-200,`Circular dependency in DI detected for ${t}${r}`)}(ci(O[r]));const ee=Nl(J.canSeeViewProviders);J.resolving=!0;const ie=J.injectImpl?na(J.injectImpl):null;Tl(t,a,Xr.Default);try{A=t[r]=J.factory(void 0,O,t,a),e.firstCreatePass&&r>=a.directiveStart&&function Ol(t,e,r){const{ngOnChanges:a,ngOnInit:A,ngDoCheck:O}=e.type.prototype;if(a){const J=xl(e);(r.preOrderHooks??(r.preOrderHooks=[])).push(t,J),(r.preOrderCheckHooks??(r.preOrderCheckHooks=[])).push(t,J)}A&&(r.preOrderHooks??(r.preOrderHooks=[])).push(0-t,A),O&&((r.preOrderHooks??(r.preOrderHooks=[])).push(t,O),(r.preOrderCheckHooks??(r.preOrderCheckHooks=[])).push(t,O))}(r,O[r],e)}finally{null!==ie&&na(ie),Nl(ee),J.resolving=!1,Lf()}}return A}function V1(t,e,r){const a=1<>np)]&a)}function H1(t,e){return!(t&Xr.Self||t&Xr.Host&&e)}class nc{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,a){return K1(this._tNode,this._lView,e,B0(a),r)}}function Zy(){return new nc(Ko(),bn())}function zo(t){return gc(()=>{const e=t.prototype.constructor,r=e[Ja]||Jy(e),a=Object.prototype;let A=Object.getPrototypeOf(t.prototype).constructor;for(;A&&A!==a;){const O=A[Ja]||Jy(A);if(O&&O!==r)return O;A=Object.getPrototypeOf(A)}return O=>new O})}function Jy(t){return As(t)?()=>{const e=Jy(Qn(t));return e&&e()}:Lu(t)}function Yy(t){const e=t[Zn],r=e.type;return 2===r?e.declTNode:1===r?t[rs]:null}function op(t){return function Y2(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const r=t.attrs;if(r){const a=r.length;let A=0;for(;A{const O=ss(e);function J(...ee){if(this instanceof J)return O.call(this,...ee),this;const ie=new J(...ee);return function(de){return A&&A(de,...ee),(de.hasOwnProperty(Pl)?de[Pl]:Object.defineProperty(de,Pl,{value:[]})[Pl]).push(ie),a&&a(de),de}}return r&&(J.prototype=Object.create(r.prototype)),J.prototype.ngMetadataName=t,J.annotationCls=J,J})}function ss(t){return function(...r){if(t){const a=t(...r);for(const A in a)this[A]=a[A]}}}function kl(t,e,r){return gc(()=>{const a=ss(e);function A(...O){if(this instanceof A)return a.apply(this,O),this;const J=new A(...O);return ee.annotation=J,ee;function ee(ie,oe,de){const be=ie.hasOwnProperty(Rl)?ie[Rl]:Object.defineProperty(ie,Rl,{value:[]})[Rl];for(;be.length<=de;)be.push(null);return(be[de]=be[de]||[]).push(J),ie}}return r&&(A.prototype=Object.create(r.prototype)),A.prototype.ngMetadataName=t,A.annotationCls=A,A})}function ou(t,e,r,a){return gc(()=>{const A=ss(e);function O(...J){if(this instanceof O)return A.apply(this,J),this;const ee=new O(...J);return function ie(oe,de){const be=oe.constructor,Ee=be.hasOwnProperty(zf)?be[zf]:Object.defineProperty(be,zf,{value:{}})[zf];Ee[de]=Ee.hasOwnProperty(de)&&Ee[de]||[],Ee[de].unshift(ee),a&&a(oe,de,...J)}}return r&&(O.prototype=Object.create(r.prototype)),O.prototype.ngMetadataName=t,O.annotationCls=O,O})}const G1=kl("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>op(t)}));class Cr{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof r?this.__NG_ELEMENT_ID__=r:void 0!==r&&(this.\u0275prov=Tr({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new Cr("AnalyzeForEntryComponents");class ah{}ou("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),ah),ou("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),ah),ou("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),ah),ou("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),ah);var su,$y,ap;function wo(t){const e=Ri.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(su||(su={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}($y||($y={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(ap||(ap={}));const Qy=Function;function Vf(t){return"function"==typeof t}function ua(t){return t.flat(Number.POSITIVE_INFINITY)}function Ec(t,e){t.forEach(r=>Array.isArray(r)?Ec(r,e):e(r))}function Ac(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function cp(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Hf(t,e){const r=[];for(let a=0;a=0?t[1|a]=r:(a=~a,function Y1(t,e,r,a){let A=t.length;if(A==e)t.push(r,a);else if(1===A)t.push(a,t[0]),t[0]=r;else{for(A--,t.push(t[A-1],t[A]);A>e;){const O=A-2;t[A]=t[O],A--}t[e]=r,t[e+1]=a}}(t,a,e,r)),a}function em(t,e){const r=Wf(t,e);if(r>=0)return t[1|r]}function Wf(t,e){return as(t,e,1)}function as(t,e,r){let a=0,A=t.length>>r;for(;A!==a;){const O=a+(A-a>>1),J=t[O<e?A=O:a=O+1}return~(A<new e(...r)}_zipTypesAndAnnotations(e,r){let a;a=Hf(typeof e>"u"?r.length:e.length);for(let A=0;A"u"?a[A]=[]:e[A]&&e[A]!=Object?a[A]=[e[A]]:a[A]=[],r&&null!=r[A]&&(a[A]=a[A].concat(r[A]));return a}_ownParameters(e,r){if(function $1(t){return tE.test(t)||nm.test(t)||Xn.test(t)&&!Gf.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==r.parameters)return e.parameters;const A=e.ctorParameters;if(A&&A!==r.ctorParameters){const ee="function"==typeof A?A():A,ie=ee.map(de=>de&&de.type),oe=ee.map(de=>de&&Ll(de.decorators));return this._zipTypesAndAnnotations(ie,oe)}const O=e.hasOwnProperty(Rl)&&e[Rl],J=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return J||O?this._zipTypesAndAnnotations(J,O):Hf(e.length)}parameters(e){if(!Vf(e))return[];const r=Bl(e);let a=this._ownParameters(e,r);return!a&&r!==Object&&(a=this.parameters(r)),a||[]}_ownAnnotations(e,r){if(e.annotations&&e.annotations!==r.annotations){let a=e.annotations;return"function"==typeof a&&a.annotations&&(a=a.annotations),a}return e.decorators&&e.decorators!==r.decorators?Ll(e.decorators):e.hasOwnProperty(Pl)?e[Pl]:null}annotations(e){if(!Vf(e))return[];const r=Bl(e),a=this._ownAnnotations(e,r)||[];return(r!==Object?this.annotations(r):[]).concat(a)}_ownPropMetadata(e,r){if(e.propMetadata&&e.propMetadata!==r.propMetadata){let a=e.propMetadata;return"function"==typeof a&&a.propMetadata&&(a=a.propMetadata),a}if(e.propDecorators&&e.propDecorators!==r.propDecorators){const a=e.propDecorators,A={};return Object.keys(a).forEach(O=>{A[O]=Ll(a[O])}),A}return e.hasOwnProperty(zf)?e[zf]:null}propMetadata(e){if(!Vf(e))return{};const r=Bl(e),a={};if(r!==Object){const O=this.propMetadata(r);Object.keys(O).forEach(J=>{a[J]=O[J]})}const A=this._ownPropMetadata(e,r);return A&&Object.keys(A).forEach(O=>{const J=[];a.hasOwnProperty(O)&&J.push(...a[O]),J.push(...A[O]),a[O]=J}),a}ownPropMetadata(e){return Vf(e)&&this._ownPropMetadata(e,Bl(e))||{}}hasLifecycleHook(e,r){return e instanceof Qy&&r in e.prototype}}function Ll(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function Bl(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const ch=Kd(kl("Inject",t=>({token:t})),-1),Zf=Kd(kl("Optional"),8),lp=Kd(kl("Self"),2),Jf=Kd(kl("SkipSelf"),4),rm=Kd(kl("Host"),1);let fp=null;function Co(){return fp=fp||new nE}function Fs(t){return au(Co().parameters(t))}function au(t){return t.map(e=>function Q1(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let r=0;r|^->||--!>|)/,mp="\u200b$1\u200b";function gs(t){return t.replace(sm,e=>e.replace(yp,mp))}const xc=new Map;let rc=0;const uu="__ngContext__";function Xo(t,e){Mo(e)?(t[uu]=e[Al],function nb(t){xc.set(t[Al],t)}(e)):t[uu]=e}let Ku;function Ep(t,e){return Ku(t,e)}function ph(t){const e=t[Ki];return ia(e)?e[Ki]:e}function dm(t){return hm(t[Hd])}function Ap(t){return hm(t[js])}function hm(t){for(;null!==t&&!ia(t);)t=t[js];return t}function qf(t,e,r,a,A){if(null!=a){let O,J=!1;ia(a)?O=a:Mo(a)&&(J=!0,a=a[mc]);const ee=Uo(a);0===t&&null!==r?null==A?bm(e,r,ee):Kl(e,r,ee,A||null,!0):1===t&&null!==r?Kl(e,r,ee,A||null,!0):2===t?me(e,ee,J):3===t&&e.destroyNode(ee),null!=O&&function Dt(t,e,r,a,A){const O=r[$a],J=Uo(r);O!==J&&qf(e,t,a,O,A);for(let ee=zi;ee0&&(r[A-1][js]=e),a0&&(t[r-1][js]=a[js]);const O=cp(t,zi+e);!function Sp(t,e){Fe(t,e,e[Hr],2,null,null),e[mc]=null,e[rs]=null}(a[Zn],a);const J=O[Da];null!==J&&J.detachView(O[Zn]),a[Ki]=null,a[js]=null,a[tr]&=-65}return a}function mm(t,e){if(!(128&e[tr])){const r=e[Hr];r.destroyNode&&Fe(t,e,r,3,null,null),function pm(t){let e=t[Hd];if(!e)return Ip(t[Zn],t);for(;e;){let r=null;if(Mo(e))r=e[Hd];else{const a=e[zi];a&&(r=a)}if(!r){for(;e&&!e[js]&&e!==t;)Mo(e)&&Ip(e[Zn],e),e=e[Ki];null===e&&(e=t),Mo(e)&&Ip(e[Zn],e),r=e&&e[js]}e=r}}(e)}}function Ip(t,e){if(!(128&e[tr])){e[tr]&=-65,e[tr]|=128,function Dp(t,e){let r;if(null!=t&&null!=(r=t.destroyHooks))for(let a=0;a=0?a[A=J]():a[A=-J].unsubscribe(),O+=2}else{const J=a[A=r[O+1]];r[O].call(J)}if(null!==a){for(let O=A+1;O-1){const{encapsulation:O}=t.data[a.directiveStart+A];if(O===yc.None||O===yc.Emulated)return null}return Bi(a,r)}}function Kl(t,e,r,a,A){t.insertBefore(e,r,a,A)}function bm(t,e,r){t.appendChild(e,r)}function Op(t,e,r,a,A){null!==a?Kl(t,e,r,a,A):bm(t,e,r)}function zl(t,e){return t.parentNode(e)}function cb(t,e,r){return ub(t,e,r)}function gh(t,e,r){return 40&t.type?Bi(t,r):null}let Vl,Kn,Nn,pr,ub=gh;function lb(t,e){ub=t,Vl=e}function Hl(t,e,r,a){const A=vm(t,a,e),O=e[Hr],ee=cb(a.parent||e[rs],a,e);if(null!=A)if(Array.isArray(r))for(let ie=0;iet,createScript:t=>t,createScriptURL:t=>t})}catch{}return Kn}function Yn(t){return qn()?.createHTML(t)||t}function Gt(t,e,r){const a=bn(),A=Pr(),O=Bi(A,a);if(2===A.type&&"iframe"===e.toLowerCase()){const J=O;J.src="",J.srcdoc=Yn(""),me(a[Hr],J);throw new Tn(-910,!1)}return t}function vr(){return void 0!==Nn?Nn:typeof document<"u"?document:void 0}function Er(){if(void 0===pr&&(pr=null,Ri.trustedTypes))try{pr=Ri.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return pr}function Go(t){return Er()?.createHTML(t)||t}function ai(t){return Er()?.createScript(t)||t}function lu(t){return Er()?.createScriptURL(t)||t}class Wl{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Sa})`}}class YO extends Wl{getTypeName(){return"HTML"}}class $O extends Wl{getTypeName(){return"Style"}}class QO extends Wl{getTypeName(){return"Script"}}class XO extends Wl{getTypeName(){return"URL"}}class qO extends Wl{getTypeName(){return"ResourceURL"}}function oc(t){return t instanceof Wl?t.changingThisBreaksApplicationSecurity:t}function zu(t,e){const r=function eN(t){return t instanceof Wl&&t.getTypeName()||null}(t);if(null!=r&&r!==e){if("ResourceURL"===r&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${Sa})`)}return r===e}function kS(t){const e=new aN(t);return function cN(){try{return!!(new window.DOMParser).parseFromString(Yn(""),"text/html")}catch{return!1}}()?new sN(e):e}class sN{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const r=(new window.DOMParser).parseFromString(Yn(e),"text/html").body;return null===r?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}}class aN{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const r=this.inertDocument.createElement("template");return r.innerHTML=Yn(e),r}}const uN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function fb(t){return(t=String(t)).match(uN)?t:"unsafe:"+t}function Gl(t){const e={};for(const r of t.split(","))e[r]=!0;return e}function wm(...t){const e={};for(const r of t)for(const a in r)r.hasOwnProperty(a)&&(e[a]=!0);return e}const LS=Gl("area,br,col,hr,img,wbr"),BS=Gl("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),jS=Gl("rp,rt"),lN=wm(jS,BS),fN=wm(BS,Gl("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),dN=wm(jS,Gl("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),fE=wm(LS,fN,dN,lN),dE=Gl("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hN=Gl("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),pN=Gl("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),FS=wm(dE,hN,pN),gN=Gl("script,style,template");class yN{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,a=!0;for(;r;)if(r.nodeType===Node.ELEMENT_NODE?a=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,a&&r.firstChild)r=r.firstChild;else for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let A=this.checkClobberedElement(r,r.nextSibling);if(A){r=A;break}r=this.checkClobberedElement(r,r.parentNode)}return this.buf.join("")}startElement(e){const r=e.nodeName.toLowerCase();if(!fE.hasOwnProperty(r))return this.sanitizedSomething=!0,!gN.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);const a=e.attributes;for(let A=0;A"),!0}endElement(e){const r=e.nodeName.toLowerCase();fE.hasOwnProperty(r)&&!LS.hasOwnProperty(r)&&(this.buf.push(""))}chars(e){this.buf.push(US(e))}checkClobberedElement(e,r){if(r&&(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return r}}const mN=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,vN=/([^\#-~ |!])/g;function US(t){return t.replace(/&/g,"&").replace(mN,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(vN,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let hb;function KS(t,e){let r=null;try{hb=hb||kS(t);let a=e?String(e):"";r=hb.getInertBodyElement(a);let A=5,O=a;do{if(0===A)throw new Error("Failed to sanitize html because the input is unstable");A--,a=O,O=r.innerHTML,r=hb.getInertBodyElement(a)}while(a!==O);return Yn((new yN).sanitizeChildren(hE(r)||r))}finally{if(r){const a=hE(r)||r;for(;a.firstChild;)a.removeChild(a.firstChild)}}}function hE(t){return"content"in t&&function bN(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var sc;function wN(t){const e=Em();return e?Go(e.sanitize(sc.HTML,t)||""):zu(t,"HTML")?Go(oc(t)):KS(vr(),Lr(t))}function EN(t){const e=Em();return e?e.sanitize(sc.STYLE,t)||"":zu(t,"Style")?oc(t):Lr(t)}function zS(t){const e=Em();return e?e.sanitize(sc.URL,t)||"":zu(t,"URL")?oc(t):fb(Lr(t))}function VS(t){const e=Em();if(e)return lu(e.sanitize(sc.RESOURCE_URL,t)||"");if(zu(t,"ResourceURL"))return lu(oc(t));throw new Tn(904,!1)}function AN(t){const e=Em();if(e)return ai(e.sanitize(sc.SCRIPT,t)||"");if(zu(t,"Script"))return ai(oc(t));throw new Tn(905,!1)}function _N(t){return Yn(t[0])}function SN(t){return function Vt(t){return qn()?.createScriptURL(t)||t}(t[0])}function MN(t,e,r){return function xN(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?VS:zS}(e,r)(t)}function Em(){const t=bn();return t&&t[gy]}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(sc||(sc={}));const HS=new Cr("ENVIRONMENT_INITIALIZER"),WS=new Cr("INJECTOR",-1),GS=new Cr("INJECTOR_DEF_TYPES");class ZS{get(e,r=Ia){if(r===Ia){const a=new Error(`NullInjectorError: No provider for ${Ir(e)}!`);throw a.name="NullInjectorError",a}return r}}function IN(...t){return{\u0275providers:JS(!0,t),\u0275fromNgModule:!0}}function JS(t,...e){const r=[],a=new Set;let A;return Ec(e,O=>{const J=O;pE(J,r,[],a)&&(A||(A=[]),A.push(J))}),void 0!==A&&YS(A,r),r}function YS(t,e){for(let r=0;r{e.push(O)})}}function pE(t,e,r,a){if(!(t=Qn(t)))return!1;let A=null,O=y1(t);const J=!O&&di(t);if(O||J){if(J&&!J.standalone)return!1;A=t}else{const ie=t.ngModule;if(O=y1(ie),!O)return!1;A=ie}const ee=a.has(A);if(J){if(ee)return!1;if(a.add(A),J.dependencies){const ie="function"==typeof J.dependencies?J.dependencies():J.dependencies;for(const oe of ie)pE(oe,e,r,a)}}else{if(!O)return!1;{if(null!=O.imports&&!ee){let oe;a.add(A);try{Ec(O.imports,de=>{pE(de,e,r,a)&&(oe||(oe=[]),oe.push(de))})}finally{}void 0!==oe&&YS(oe,e)}if(!ee){const oe=Lu(A)||(()=>new A);e.push({provide:A,useFactory:oe,deps:fi},{provide:GS,useValue:A,multi:!0},{provide:HS,useValue:()=>mr(A),multi:!0})}const ie=O.providers;if(null!=ie&&!ee){gE(ie,de=>{e.push(de)})}}}return A!==t&&void 0!==t.providers}function gE(t,e){for(let r of t)Ls(r)&&(r=r.\u0275providers),Array.isArray(r)?gE(r,e):e(r)}const CN=Mr({provide:String,useValue:Mr});function yE(t){return null!==t&&"object"==typeof t&&CN in t}function $S(t){return!(!t||!t.useExisting)}function QS(t){return!(!t||!t.useFactory)}function yh(t){return"function"==typeof t}const mE=new Cr("Set Injector scope."),pb={},TN={};let vE;function gb(){return void 0===vE&&(vE=new ZS),vE}class Pp{}class XS extends Pp{get destroyed(){return this._destroyed}constructor(e,r,a,A){super(),this.parent=r,this.source=a,this.scopes=A,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,wE(e,J=>this.processProvider(J)),this.records.set(WS,Rp(void 0,this)),A.has("environment")&&this.records.set(Pp,Rp(void 0,this));const O=this.records.get(mE);null!=O&&"string"==typeof O.value&&this.scopes.add(O.value),this.injectorDefTypes=new Set(this.get(GS.multi,fi,Xr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const r=ml(this),a=na(void 0);try{return e()}finally{ml(r),na(a)}}get(e,r=Ia,a=Xr.Default){this.assertNotDestroyed(),a=B0(a);const A=ml(this),O=na(void 0);try{if(!(a&Xr.SkipSelf)){let ee=this.records.get(e);if(void 0===ee){const ie=function kN(t){return"function"==typeof t||"object"==typeof t&&t instanceof Cr}(e)&&N0(e);ee=ie&&this.injectableDefInScope(ie)?Rp(bE(e),pb):null,this.records.set(e,ee)}if(null!=ee)return this.hydrate(e,ee)}const J=a&Xr.Self?gb():this.parent;return r=a&Xr.Optional&&r===Ia?null:r,J.get(e,r)}catch(J){if("NullInjectorError"===J.name){if((J[R0]=J[R0]||[]).unshift(Ir(e)),A)throw J;return zd(J,e,"R3InjectorError",this.source)}throw J}finally{na(O),ml(A)}}resolveInjectorInitializers(){const e=ml(this),r=na(void 0);try{const a=this.get(HS.multi,fi,Xr.Self);for(const A of a)A()}finally{ml(e),na(r)}}toString(){const e=[],r=this.records;for(const a of r.keys())e.push(Ir(a));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Tn(205,!1)}processProvider(e){let r=yh(e=Qn(e))?e:Qn(e&&e.provide);const a=function NN(t){if(yE(t))return Rp(void 0,t.useValue);return Rp(qS(t),pb)}(e);if(yh(e)||!0!==e.multi){this.records.get(r)}else{let A=this.records.get(r);A||(A=Rp(void 0,pb,!0),A.factory=()=>dy(A.multi),this.records.set(r,A)),r=e,A.multi.push(e)}this.records.set(r,a)}hydrate(e,r){return r.value===pb&&(r.value=TN,r.value=r.factory()),"object"==typeof r.value&&r.value&&function RN(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}injectableDefInScope(e){if(!e.providedIn)return!1;const r=Qn(e.providedIn);return"string"==typeof r?"any"===r||this.scopes.has(r):this.injectorDefTypes.has(r)}}function bE(t){const e=N0(t),r=null!==e?e.factory:Lu(t);if(null!==r)return r;if(t instanceof Cr)throw new Tn(204,!1);if(t instanceof Function)return function ON(t){const e=t.length;if(e>0){Hf(e,"?");throw new Tn(204,!1)}const r=function z2(t){return t&&(t[Sf]||t[m1])||null}(t);return null!==r?()=>r.factory(t):()=>new t}(t);throw new Tn(204,!1)}function qS(t,e,r){let a;if(yh(t)){const A=Qn(t);return Lu(A)||bE(A)}if(yE(t))a=()=>Qn(t.useValue);else if(QS(t))a=()=>t.useFactory(...dy(t.deps||[]));else if($S(t))a=()=>mr(Qn(t.useExisting));else{const A=Qn(t&&(t.useClass||t.provide));if(!function PN(t){return!!t.deps}(t))return Lu(A)||bE(A);a=()=>new A(...dy(t.deps))}return a}function Rp(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function wE(t,e){for(const r of t)Array.isArray(r)?wE(r,e):r&&Ls(r)?wE(r.\u0275providers,e):e(r)}class LN{}class e8{}const t8="ngComponent";class jN{resolveComponentFactory(e){throw function BN(t){const e=Error(`No component factory found for ${Ir(t)}. Did you add it to @NgModule.entryComponents?`);return e[t8]=t,e}(e)}}class Am{}function kp(t,e){return new ac(Bi(t,e))}Am.NULL=new jN;class ac{constructor(e){this.nativeElement=e}}function UN(t){return t instanceof ac?t.nativeElement:t}ac.__NG_ELEMENT_ID__=function FN(){return kp(Ko(),bn())};class n8{}class Zl{}Zl.__NG_ELEMENT_ID__=()=>function KN(){const t=bn(),r=Ms(Ko().index,t);return(Mo(r)?r:t)[Hr]}();class EE{}EE.\u0275prov=Tr({token:EE,providedIn:"root",factory:()=>null});class yb{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const zN=new yb("15.2.9"),AE={},_E="ngOriginalError";function SE(t){return t[_E]}class Lp{constructor(){this._console=console}handleError(e){const r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&SE(e);for(;r&&SE(r);)r=SE(r);return r||null}}function JN(t){return t.ownerDocument.defaultView}function YN(t){return t.ownerDocument}function $N(t){return t.ownerDocument.body}function Jl(t){return t instanceof Function?t():t}function i8(t,e,r){let a=t.length;for(;;){const A=t.indexOf(e,r);if(-1===A)return A;if(0===A||t.charCodeAt(A-1)<=32){const O=e.length;if(A+O===a||t.charCodeAt(A+O)<=32)return A}r=A+1}}const o8="ng-template";function qN(t,e,r){let a=0,A=!0;for(;aO?"":A[be+1].toLowerCase();const Ce=8&a?Ee:null;if(Ce&&-1!==i8(Ce,oe,0)||2&a&&oe!==Ee){if(fu(a))return!1;J=!0}}}}else{if(!J&&!fu(a)&&!fu(ie))return!1;if(J&&fu(ie))continue;J=!1,a=ie|1&a}}return fu(a)||J}function fu(t){return 0==(1&t)}function nP(t,e,r,a){if(null===e)return-1;let A=0;if(a||!r){let O=!1;for(;A-1)for(r++;r0?'="'+ee+'"':"")+"]"}else 8&a?A+="."+J:4&a&&(A+=" "+J);else""!==A&&!fu(J)&&(e+=c8(O,A),A=""),a=J,O=O||!fu(a);r++}return""!==A&&(e+=c8(O,A)),e}const zr={};function zs(t){u8(Yr(),bn(),hs()+t,!1)}function u8(t,e,r,a){if(!a)if(3==(3&e[tr])){const O=t.preOrderCheckHooks;null!==O&&bo(e,O,r)}else{const O=t.preOrderHooks;null!==O&&Io(e,O,0,r)}ru(r)}const l8={\u0275\u0275defineInjectable:Tr,\u0275\u0275defineInjector:Ma,\u0275\u0275inject:mr,\u0275\u0275invalidFactoryDep:A1,resolveForwardRef:Qn};function lP(t,e){let r=null,a=null;t.hasOwnProperty(Sf)||Object.defineProperty(t,Sf,{get:()=>(null===r&&(r=wo().compileInjectable(l8,`ng:///${t.name}/\u0275prov.js`,function pP(t,e){const r=e||{providedIn:null},a={name:t.name,type:t,typeArgumentCount:0,providedIn:r.providedIn};return(f8(r)||d8(r))&&void 0!==r.deps&&(a.deps=au(r.deps)),f8(r)?a.useClass=r.useClass:function dP(t){return fP in t}(r)?a.useValue=r.useValue:d8(r)?a.useFactory=r.useFactory:function hP(t){return void 0!==t.useExisting}(r)&&(a.useExisting=r.useExisting),a}(t,e))),r)}),t.hasOwnProperty(Ja)||Object.defineProperty(t,Ja,{get:()=>{if(null===a){const A=wo();a=A.compileFactory(l8,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Fs(t),target:A.FactoryTarget.Injectable})}return a},configurable:!0})}const fP=Mr({provide:String,useValue:Mr});function f8(t){return void 0!==t.useClass}function d8(t){return void 0!==t.useFactory}$o("Injectable",void 0,void 0,void 0,(t,e)=>lP(t,e));function h8(t,e=null,r=null,a){const A=p8(t,e,r,a);return A.resolveInjectorInitializers(),A}function p8(t,e=null,r=null,a,A=new Set){const O=[r||fi,IN(t)];return a=a||("object"==typeof t?void 0:Ir(t)),new XS(O,e||gb(),a||null,A)}class Vs{static create(e,r){if(Array.isArray(e))return h8({name:""},r,e,"");{const a=e.name??"";return h8({name:a},e.parent,e.providers,a)}}}function xE(t){return t.length>1?" ("+function gP(t){const e=[];for(let r=0;r-1)return e.push(t[r]),e;e.push(t[r])}return e}(t.slice().reverse()).map(a=>Ir(a.token)).join(" -> ")+")":""}function ME(t,e,r,a){const A=[e],O=r(A),J=a?function VN(t,e){const r=`${t} caused by: ${e instanceof Error?e.message:e}`,a=Error(r);return a[_E]=e,a}(O,a):Error(O);return J.addKey=yP,J.keys=A,J.injectors=[t],J.constructResolvingMessage=r,J[_E]=a,J}function yP(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function g8(t,e){const r=[];for(let a=0,A=e.length;amr(WS)}),Vs.__NG_ELEMENT_ID__=-1;class ed{constructor(e,r){if(this.token=e,this.id=r,!e)throw new Tn(208,!1);this.displayName=Ir(this.token)}static get(e){return y8.get(Qn(e))}static get numberOfKeys(){return y8.numberOfKeys}}const y8=new class _P{constructor(){this._allKeys=new Map}get(e){if(e instanceof ed)return e;if(this._allKeys.has(e))return this._allKeys.get(e);const r=new ed(e,ed.numberOfKeys);return this._allKeys.set(e,r),r}get numberOfKeys(){return this._allKeys.size}};class mb{constructor(e,r,a){this.key=e,this.optional=r,this.visibility=a}static fromKey(e){return new mb(e,!1,null)}}const SP=[];class m8{constructor(e,r,a){this.key=e,this.resolvedFactories=r,this.multiProvider=a,this.resolvedFactory=this.resolvedFactories[0]}}class xP{constructor(e,r){this.factory=e,this.dependencies=r}}function MP(t){let e,r;if(t.useClass){const a=Qn(t.useClass);e=Co().factory(a),r=b8(a)}else t.useExisting?(e=a=>a,r=[mb.fromKey(ed.get(t.useExisting))]):t.useFactory?(e=t.useFactory,r=function TP(t,e){if(e){const r=e.map(a=>[a]);return e.map(a=>w8(t,a,r))}return b8(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,r=SP);return new xP(e,r)}function IP(t){return new m8(ed.get(t.provide),[MP(t)],t.multi||!1)}function CP(t){const a=function DP(t,e){for(let r=0;r{if(r instanceof Qy)e.push({provide:r,useClass:r});else if(r&&"object"==typeof r&&void 0!==r.provide)e.push(r);else{if(!Array.isArray(r))throw function wP(t){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`)}(r);v8(r,e)}}),e}function b8(t){const e=Co().parameters(t);if(!e)return[];if(e.some(r=>null==r))throw g8(t,e);return e.map(r=>w8(t,r,e))}function w8(t,e,r){let a=null,A=!1;if(!Array.isArray(e))return IE(e instanceof ch?e.token:e,A,null);let O=null;for(let J=0;J=this._providers.length)throw function EP(t){return Error(`Index ${t} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function vP(t,e){return ME(t,e,function(r){return`Cannot instantiate cyclic dependency!${xE(r)}`})}(this,e.key);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const r=[];for(let a=0;athis._getByReflectiveDependency(J))}catch(J){throw J.addKey&&J.addKey(this,e.key),J}try{O=a(...A)}catch(J){throw function bP(t,e,r,a){return ME(t,a,function(A){const O=Ir(A[0].token);return`${e.message}: Error during instantiation of ${O}!${xE(A)}.`},e)}(this,J,J.stack,e.key)}return O}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:Ia)}_getByKey(e,r,a){return e===jp.INJECTOR_KEY?this:r instanceof lp?this._getByKeySelf(e,a):this._getByKeyDefault(e,a,r)}_getObjByKeyId(e){for(let r=0;r' "'+r.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function Rn(t,e=Xr.Default){const r=bn();if(null===r)return mr(t,e);return K1(Ko(),r,Qn(t),e)}function NP(){throw new Error("invalid")}function E8(t,e){const r=t.contentQueries;if(null!==r)for(let a=0;aMi&&u8(t,e,Mi,!1),No(J?2:0,A),r(a,A)}finally{ru(O),No(J?3:1,A)}}function TE(t,e,r){if(vy(e)){const a=e.directiveStart,A=e.directiveEnd;for(let O=a;O0;){const r=t[--e];if("number"==typeof r&&r<0)return r}return 0})(J)!=ee&&J.push(ee),J.push(r,a,O)}}(t,e,a,xm(t,r,A.hostVars,zr),A)}function Vu(t,e,r,a,A,O){const J=Bi(t,e);LE(e[Hr],J,O,t.value,r,a,A)}function LE(t,e,r,a,A,O,J){if(null==O)t.removeAttribute(e,A,r);else{const ee=null==J?Lr(O):J(O,a||"",A);t.setAttribute(e,A,ee,r)}}function qP(t,e,r,a,A,O){const J=O[e];if(null!==J){const ee=a.setInput;for(let ie=0;ie0&&BE(r)}}function BE(t){for(let a=dm(t);null!==a;a=Ap(a))for(let A=zi;A0&&BE(O)}const r=t[Zn].components;if(null!==r)for(let a=0;a0&&BE(A)}}function iR(t,e){const r=Ms(e,t),a=r[Zn];(function oR(t,e){for(let r=e.length;r-1&&(ym(e,a),cp(r,a))}this._attachedToViewContainer=!1}mm(this._lView[Zn],this._lView)}onDestroy(e){S8(this._lView[Zn],this._lView,null,e)}markForCheck(){Eb(this._cdRefInjectingView||this._lView)}detach(){this._lView[tr]&=-65}reattach(){this._lView[tr]|=64}detectChanges(){Ab(this._lView[Zn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Tn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function xp(t,e){Fe(t,e,e[Hr],2,null,null)}(this._lView[Zn],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Tn(902,!1);this._appRef=e}}class sR extends Mm{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;Ab(e[Zn],e,e[ki],!1)}checkNoChanges(){}get context(){return null}}class R8 extends Am{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const r=di(e);return new Im(r,this.ngModule)}}function k8(t){const e=[];for(let r in t)if(t.hasOwnProperty(r)){const a=t[r];e.push({propName:a,templateName:r})}return e}class cR{constructor(e,r){this.injector=e,this.parentInjector=r}get(e,r,a){a=B0(a);const A=this.injector.get(e,AE,a);return A!==AE||r===AE?A:this.parentInjector.get(e,r,a)}}class Im extends e8{get inputs(){return k8(this.componentDef.inputs)}get outputs(){return k8(this.componentDef.outputs)}constructor(e,r){super(),this.componentDef=e,this.ngModule=r,this.componentType=e.type,this.selector=function cP(t){return t.map(aP).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!r}create(e,r,a,A){let O=(A=A||this.ngModule)instanceof Pp?A:A?.injector;O&&null!==this.componentDef.getStandaloneInjector&&(O=this.componentDef.getStandaloneInjector(O)||O);const J=O?new cR(e,O):e,ee=J.get(n8,null);if(null===ee)throw new Tn(407,!1);const ie=J.get(EE,null),oe=ee.createRenderer(null,this.componentDef),de=this.componentDef.selectors[0][0]||"div",be=a?function BP(t,e,r){const a=r===yc.ShadowDom;return t.selectRootElement(e,a)}(oe,a,this.componentDef.encapsulation):Mc(oe,de,function aR(t){const e=t.toLowerCase();return"svg"===e?Bu:"math"===e?Sy:null}(de)),Ee=this.componentDef.onPush?288:272,Ce=PE(0,null,null,1,0,null,null,null,null,null),Ie=vb(null,Ce,null,Ee,null,null,ee,oe,ie,J,null);let Ue,We;Q0(Ie);try{const $e=this.componentDef;let ht,ct=null;$e.findHostDirectiveDefs?(ht=[],ct=new Map,$e.findHostDirectiveDefs($e,ht,ct),ht.push($e)):ht=[$e];const wt=function lR(t,e){const r=t[Zn],a=Mi;return t[a]=e,Fp(r,a,2,"#host",null)}(Ie,be),zt=function fR(t,e,r,a,A,O,J,ee){const ie=A[Zn];!function dR(t,e,r,a){for(const A of t)e.mergedAttrs=Kf(e.mergedAttrs,A.hostAttrs);null!==e.mergedAttrs&&(_b(e,e.mergedAttrs,!0),null!==r&&_n(a,r,e))}(a,t,e,J);const oe=O.createRenderer(e,r),de=vb(A,_8(r),null,r.onPush?32:16,A[t.index],t,O,oe,ee||null,null,null);return ie.firstCreatePass&&kE(ie,t,a.length-1),wb(A,de),A[t.index]=de}(wt,be,$e,ht,Ie,ee,oe);We=Oa(Ce,Mi),be&&function pR(t,e,r,a){if(a)ep(t,r,["ng-version",zN.full]);else{const{attrs:A,classes:O}=function uP(t){const e=[],r=[];let a=1,A=2;for(;a0&&Dn(t,r,O.join(" "))}}(oe,$e,be,a),void 0!==r&&function gR(t,e,r){const a=t.projection=[];for(let A=0;A=0;a--){const A=t[a];A.hostVars=e+=A.hostVars,A.hostAttrs=Kf(A.hostAttrs,r=Kf(r,A.hostAttrs))}}(a)}function UE(t){return t===Za?{}:t===fi?[]:t}function vR(t,e){const r=t.viewQuery;t.viewQuery=r?(a,A)=>{e(a,A),r(a,A)}:e}function bR(t,e){const r=t.contentQueries;t.contentQueries=r?(a,A,O)=>{e(a,A,O),r(a,A,O)}:e}function wR(t,e){const r=t.hostBindings;t.hostBindings=r?(a,A)=>{e(a,A),r(a,A)}:e}const ER=["providersResolver"],AR=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function _R(t){let r,e=L8(t.type);r=Ss(t)?e.\u0275cmp:e.\u0275dir;const a=t;for(const A of ER)a[A]=r[A];if(Ss(r))for(const A of AR)a[A]=r[A]}function SR(t){return e=>{e.findHostDirectiveDefs=B8,e.hostDirectives=(Array.isArray(t)?t:t()).map(r=>"function"==typeof r?{directive:Qn(r),inputs:Za,outputs:Za}:{directive:Qn(r.directive),inputs:j8(r.inputs),outputs:j8(r.outputs)})}}function B8(t,e,r){if(null!==t.hostDirectives)for(const a of t.hostDirectives){const A=Ji(a.directive);xR(A.declaredInputs,a.inputs),B8(A,e,r),r.set(A,a),e.push(A)}}function j8(t){if(void 0===t||0===t.length)return Za;const e={};for(let r=0;rJ(Uo(wt[a.index])):a.index;let ct=null;if(!J&&ee&&(ct=function kR(t,e,r,a){const A=t.cleanup;if(null!=A)for(let O=0;Oie?ee[ie]:null}"string"==typeof J&&(O+=2)}return null}(t,e,A,a.index)),null!==ct){(ct.__ngLastListenerFn__||ct).__ngNextListenerFn__=O,ct.__ngLastListenerFn__=O,Ee=!1}else{O=t5(a,e,de,O,!1);const wt=r.listen(We,A,O);be.push(O,wt),oe&&oe.push(A,ht,$e,$e+1)}}else O=t5(a,e,de,O,!1);const Ce=a.outputs;let Ie;if(Ee&&null!==Ce&&(Ie=Ce[A])){const Ue=Ie.length;if(Ue)for(let We=0;We-1?Ms(t.index,e):e);let ie=e5(e,r,a,J),oe=O.__ngNextListenerFn__;for(;oe;)ie=e5(e,r,oe,J)&&ie,oe=oe.__ngNextListenerFn__;return A&&!1===ie&&(J.preventDefault(),J.returnValue=!1),ie}}function Dc(t=1){return Py(t)}function LR(t,e){let r=null;const a=function rP(t){const e=t.attrs;if(null!=e){const r=e.indexOf(5);if(!(1&r))return e[r+1]}return null}(t);for(let A=0;A>17&32767}function WE(t){return 2|t}function vh(t){return(131068&t)>>2}function GE(t,e){return-131069&t|e<<2}function ZE(t){return 1|t}function zR(t,e,r,a,A,O){let J=O?e.classBindings:e.styleBindings,ee=td(J),ie=vh(J);t[a]=r;let de,oe=!1;if(Array.isArray(r)){const be=r;de=be[1],(null===de||Wf(be,de)>0)&&(oe=!0)}else de=r;if(A)if(0!==ie){const Ee=td(t[ee+1]);t[a+1]=Cb(Ee,ee),0!==Ee&&(t[Ee+1]=GE(t[Ee+1],a)),t[ee+1]=function UR(t,e){return 131071&t|e<<17}(t[ee+1],a)}else t[a+1]=Cb(ee,0),0!==ee&&(t[ee+1]=GE(t[ee+1],a)),ee=a;else t[a+1]=Cb(ie,0),0===ee?ee=a:t[ie+1]=GE(t[ie+1],a),ie=a;oe&&(t[a+1]=WE(t[a+1])),l5(t,de,a,!0,O),l5(t,de,a,!1,O),function VR(t,e,r,a,A){const O=A?t.residualClasses:t.residualStyles;null!=O&&"string"==typeof e&&Wf(O,e)>=0&&(r[a+1]=ZE(r[a+1]))}(e,de,t,a,O),J=Cb(ee,ie),O?e.classBindings=J:e.styleBindings=J}function l5(t,e,r,a,A){const O=t[r+1],J=null===e;let ee=a?td(O):vh(O),ie=!1;for(;0!==ee&&(!1===ie||J);){const oe=t[ee],de=t[ee+1];HR(oe,e)&&(ie=!0,t[ee+1]=a?ZE(de):WE(de)),ee=a?td(de):vh(de)}ie&&(t[r+1]=a?WE(O):ZE(O))}function HR(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&Wf(t,e)>=0}const cs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function f5(t){return t.substring(cs.key,cs.keyEnd)}function WR(t){return t.substring(cs.value,cs.valueEnd)}function d5(t,e){const r=cs.textEnd;return r===e?-1:(e=cs.keyEnd=function JR(t,e,r){for(;e32;)e++;return e}(t,cs.key=e,r),Yp(t,e,r))}function h5(t,e){const r=cs.textEnd;let a=cs.key=Yp(t,e,r);return r===a?-1:(a=cs.keyEnd=function YR(t,e,r){let a;for(;e=65&&(-33&a)<=90||a>=48&&a<=57);)e++;return e}(t,a,r),a=g5(t,a,r,58),a=cs.value=Yp(t,a,r),a=cs.valueEnd=function $R(t,e,r){let a=-1,A=-1,O=-1,J=e,ee=J;for(;J32&&(ee=J),O=A,A=a,a=-33&ie}return ee}(t,a,r),g5(t,a,r,59))}function p5(t){cs.key=0,cs.keyEnd=0,cs.value=0,cs.valueEnd=0,cs.textEnd=t.length}function Yp(t,e,r){for(;e=0;r=h5(e,r))b5(t,f5(e),WR(e))}function XR(t){hu(ik,Gu,t,!0)}function Gu(t,e){for(let r=function GR(t){return p5(t),d5(t,Yp(t,0,cs.textEnd))}(e);r>=0;r=d5(e,r))Ei(t,f5(e),!0)}function du(t,e,r,a){const A=bn(),O=Yr(),J=qa(2);if(O.firstUpdatePass&&v5(O,t,J,a),e!==zr&&Hs(A,J,e)){w5(O,O.data[hs()],A,A[Hr],t,A[J+1]=function sk(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=Ir(oc(t)))),t}(e,r),a,J)}}function hu(t,e,r,a){const A=Yr(),O=qa(2);A.firstUpdatePass&&v5(A,null,O,a);const J=bn();if(r!==zr&&Hs(J,O,r)){const ee=A.data[hs()];if(A5(ee,a)&&!m5(A,O)){let ie=a?ee.classesWithoutHost:ee.stylesWithoutHost;null!==ie&&(r=ns(ie,r||"")),zE(A,ee,J,r,a)}else!function ok(t,e,r,a,A,O,J,ee){A===zr&&(A=fi);let ie=0,oe=0,de=0=t.expandoStartIndex}function v5(t,e,r,a){const A=t.data;if(null===A[r+1]){const O=A[hs()],J=m5(t,r);A5(O,a)&&null===e&&!J&&(e=!1),e=function qR(t,e,r,a){const A=Dl(t);let O=a?e.residualClasses:e.residualStyles;if(null===A)0===(a?e.classBindings:e.styleBindings)&&(r=YE(null,t,e,r,a),r=Nm(r,e.attrs,a),O=null);else{const J=e.directiveStylingLast;if(-1===J||t[J]!==A)if(r=YE(A,t,e,r,a),null===O){let ie=function ek(t,e,r){const a=r?e.classBindings:e.styleBindings;if(0!==vh(a))return t[td(a)]}(t,e,a);void 0!==ie&&Array.isArray(ie)&&(ie=YE(null,t,e,ie[1],a),ie=Nm(ie,e.attrs,a),function tk(t,e,r,a){const A=r?e.classBindings:e.styleBindings;t[td(A)]=a}(t,e,a,ie))}else O=function nk(t,e,r){let a;const A=e.directiveEnd;for(let O=1+e.directiveStylingLast;O0;){const ie=t[A],oe=Array.isArray(ie),de=oe?ie[1]:ie,be=null===de;let Ee=r[A+1];Ee===zr&&(Ee=be?fi:void 0);let Ce=be?em(Ee,a):de===a?Ee:void 0;if(oe&&!Tb(Ce)&&(Ce=em(ie,a)),Tb(Ce)&&(ee=Ce,J))return ee;const Ie=t[A+1];A=J?td(Ie):vh(Ie)}if(null!==e){let ie=O?e.residualClasses:e.residualStyles;null!=ie&&(ee=em(ie,a))}return ee}function Tb(t){return void 0!==t}function A5(t,e){return 0!=(t.flags&(e?8:16))}function Ao(t,e=""){const r=bn(),a=Yr(),A=t+Mi,O=a.firstCreatePass?Fp(a,A,1,e,null):a.data[A],J=r[A]=Ks(r[Hr],e);Hl(a,r,J,O),os(O,!1)}function Ob(t){return $p("",t,""),Ob}function $p(t,e,r){const a=bn(),A=Kp(a,t,e,r);return A!==zr&&Yl(a,hs(),A),$p}function _5(t,e,r,a,A){const O=bn(),J=zp(O,t,e,r,a,A);return J!==zr&&Yl(O,hs(),J),_5}function S5(t,e,r,a,A,O,J){const ee=bn(),ie=Vp(ee,t,e,r,a,A,O,J);return ie!==zr&&Yl(ee,hs(),ie),S5}function x5(t,e,r,a,A,O,J,ee,ie){const oe=bn(),de=Hp(oe,t,e,r,a,A,O,J,ee,ie);return de!==zr&&Yl(oe,hs(),de),x5}function M5(t,e,r,a,A,O,J,ee,ie,oe,de){const be=bn(),Ee=Wp(be,t,e,r,a,A,O,J,ee,ie,oe,de);return Ee!==zr&&Yl(be,hs(),Ee),M5}function I5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee){const Ce=bn(),Ie=Gp(Ce,t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee);return Ie!==zr&&Yl(Ce,hs(),Ie),I5}function C5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie){const Ue=bn(),We=Zp(Ue,t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie);return We!==zr&&Yl(Ue,hs(),We),C5}function D5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We){const $e=bn(),ht=Jp($e,t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We);return ht!==zr&&Yl($e,hs(),ht),D5}function T5(t){const e=bn(),r=Up(e,t);return r!==zr&&Yl(e,hs(),r),T5}function ak(t,e,r){hu(Ei,Gu,Kp(bn(),t,e,r),!0)}function ck(t,e,r,a,A){hu(Ei,Gu,zp(bn(),t,e,r,a,A),!0)}function uk(t,e,r,a,A,O,J){hu(Ei,Gu,Vp(bn(),t,e,r,a,A,O,J),!0)}function lk(t,e,r,a,A,O,J,ee,ie){hu(Ei,Gu,Hp(bn(),t,e,r,a,A,O,J,ee,ie),!0)}function fk(t,e,r,a,A,O,J,ee,ie,oe,de){hu(Ei,Gu,Wp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de),!0)}function dk(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee){hu(Ei,Gu,Gp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee),!0)}function hk(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie){hu(Ei,Gu,Zp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie),!0)}function pk(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We){hu(Ei,Gu,Jp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We),!0)}function gk(t){hu(Ei,Gu,Up(bn(),t),!0)}function yk(t,e,r){Wu(Kp(bn(),t,e,r))}function mk(t,e,r,a,A){Wu(zp(bn(),t,e,r,a,A))}function vk(t,e,r,a,A,O,J){Wu(Vp(bn(),t,e,r,a,A,O,J))}function bk(t,e,r,a,A,O,J,ee,ie){Wu(Hp(bn(),t,e,r,a,A,O,J,ee,ie))}function wk(t,e,r,a,A,O,J,ee,ie,oe,de){Wu(Wp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de))}function Ek(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee){Wu(Gp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee))}function Ak(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie){Wu(Zp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie))}function _k(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We){Wu(Jp(bn(),t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We))}function Sk(t){Wu(Up(bn(),t))}function O5(t,e,r,a,A){return du(t,Kp(bn(),e,r,a),A,!1),O5}function N5(t,e,r,a,A,O,J){return du(t,zp(bn(),e,r,a,A,O),J,!1),N5}function P5(t,e,r,a,A,O,J,ee,ie){return du(t,Vp(bn(),e,r,a,A,O,J,ee),ie,!1),P5}function R5(t,e,r,a,A,O,J,ee,ie,oe,de){return du(t,Hp(bn(),e,r,a,A,O,J,ee,ie,oe),de,!1),R5}function k5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee){return du(t,Wp(bn(),e,r,a,A,O,J,ee,ie,oe,de,be),Ee,!1),k5}function L5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie){return du(t,Gp(bn(),e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce),Ie,!1),L5}function B5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We){return du(t,Zp(bn(),e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue),We,!1),B5}function j5(t,e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We,$e,ht){return du(t,Jp(bn(),e,r,a,A,O,J,ee,ie,oe,de,be,Ee,Ce,Ie,Ue,We,$e),ht,!1),j5}function F5(t,e,r){return du(t,Up(bn(),e),r,!1),F5}function U5(t,e,r){const a=bn();if(Hs(a,Cl(),e)){cc(Yr(),Pr(),a,t,e,a[Hr],r,!0)}return U5}function K5(t,e,r){const a=bn();if(Hs(a,Cl(),e)){const O=Yr(),J=Pr();cc(O,J,a,t,e,N8(Dl(O.data),J,a),r,!0)}return K5}const bh=void 0;var Mk=["en",[["a","p"],["AM","PM"],bh],[["AM","PM"],bh,bh],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],bh,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],bh,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",bh,"{1} 'at' {0}",bh],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function xk(t){const r=Math.floor(Math.abs(t)),a=t.toString().replace(/^[^.]*\.?/,"").length;return 1===r&&0===a?1:5}];let Qp={};function ha(t){const e=function Ik(t){return t.toLowerCase().replace(/_/g,"-")}(t);let r=V5(e);if(r)return r;const a=e.split("-")[0];if(r=V5(a),r)return r;if("en"===a)return Mk;throw new Tn(701,!1)}function z5(t){return ha(t)[Fi.PluralCase]}function V5(t){return t in Qp||(Qp[t]=Ri.ng&&Ri.ng.common&&Ri.ng.common.locales&&Ri.ng.common.locales[t]),Qp[t]}var Fi;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(Fi||(Fi={}));const Ck=["zero","one","two","few","many"];const Xp="en-US",Nb={marker:"element"},Pb={marker:"ICU"};var pa;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(pa||(pa={}));let H5=Xp;function W5(t){xa(t,"Expected localeId to be defined"),"string"==typeof t&&(H5=t.toLowerCase().replace(/_/g,"-"))}function G5(t,e,r){const a=e.insertBeforeIndex,A=Array.isArray(a)?a[0]:a;return null===A?gh(t,0,r):Uo(r[A])}function Z5(t,e,r,a,A){const O=e.insertBeforeIndex;if(Array.isArray(O)){let J=a,ee=null;if(3&e.type||(ee=J,J=A),null!==J&&-1===e.componentOffset)for(let ie=1;ie1)for(let r=t.length-2;r>=0;r--){const a=t[r];Y5(a)||Nk(a,e)&&null===Pk(a)&&Rk(a,e.index)}}function Y5(t){return!(64&t.type)}function Nk(t,e){return Y5(e)||t.index>e.index}function Pk(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function Rk(t,e){const r=t.insertBeforeIndex;Array.isArray(r)?r[0]=e:(lb(G5,Z5),t.insertBeforeIndex=e)}function Pm(t,e){const r=t.data[e];return null===r||"string"==typeof r?null:r.hasOwnProperty("currentCaseLViewIndex")?r:r.value}function Bk(t,e,r){const a=CE(t,r,64,null,null);return J5(e,a),a}function Rb(t,e){const r=e[t.currentCaseLViewIndex];return null===r?r:r<0?~r:r}function $5(t){return t>>>17}function Q5(t){return(131070&t)>>>1}let Rm=0,km=0;function q5(t,e,r,a){const A=r[Hr];let J,O=null;for(let ee=0;ee>>1,Ce=e[++ee],Ie=e[++ee];LE(A,fs(Ee,r),null,null,Ce,Ie,null)}else switch(ie){case Pb:const oe=e[++ee],de=e[++ee];if(null===r[de]){Xo(r[de]=uE(A,oe),r)}break;case Nb:const be=e[++ee],Ee=e[++ee];if(null===r[Ee]){Xo(r[Ee]=Mc(A,be,null),r)}}}}function e4(t,e,r,a,A){for(let O=0;O>>2;switch(3&de){case 1:const Ee=r[++oe],Ce=r[++oe],Ie=t.data[be];"string"==typeof Ie?LE(e[Hr],e[be],null,Ie,Ee,ie,Ce):cc(t,Ie,e,Ee,ie,e[Hr],Ce,!1);break;case 0:const Ue=e[be];null!==Ue&&_p(e[Hr],Ue,ie);break;case 2:zk(t,Pm(t,be),e,ie);break;case 3:t4(t,Pm(t,be),a,e)}}}}else{const ie=r[O+1];if(ie>0&&3==(3&ie)){const de=Pm(t,ie>>>2);e[de.currentCaseLViewIndex]<0&&t4(t,de,a,e)}}O+=ee}}function t4(t,e,r,a){let A=a[e.currentCaseLViewIndex];if(null!==A){let O=Rm;A<0&&(A=a[e.currentCaseLViewIndex]=~A,O=-1),e4(t,a,e.update[A],r,O)}}function zk(t,e,r,a){const A=function Vk(t,e){let r=t.cases.indexOf(e);if(-1===r)switch(t.type){case 1:{const a=function Dk(t,e){const r=z5(e)(parseInt(t,10)),a=Ck[r];return void 0!==a?a:"other"}(e,function Ok(){return H5}());r=t.cases.indexOf(a),-1===r&&"other"!==a&&(r=t.cases.indexOf("other"));break}case 0:r=t.cases.indexOf("other")}return-1===r?null:r}(e,a);if(Rb(e,r)!==A&&(n4(t,e,r),r[e.currentCaseLViewIndex]=null===A?null:~A,null!==A)){const J=r[e.anchorIdx];J&&q5(t,e.create[A],r,J)}}function n4(t,e,r){let a=Rb(e,r);if(null!==a){const A=e.remove[a];for(let O=0;O0){const ee=fs(J,r);null!==ee&&me(r[Hr],ee)}else n4(t,Pm(t,~J),r)}}}function Hk(){const t=[];let r,a,e=-1;function O(ee,ie){e=0;const oe=Rb(ee,ie);a=null!==oe?ee.remove[oe]:fi}function J(){if(e0)return r[ee];{t.push(e,a);const ie=~ee;return O(r[Zn].data[ie],r),J()}}return 0===t.length?null:(a=t.pop(),e=t.pop(),J())}return function A(ee,ie){for(r=ie;t.length;)t.pop();return O(ee.value,ie),J}}const kb=/\ufffd(\d+):?\d*\ufffd/gi,Wk=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,Gk=/\ufffd(\d+)\ufffd/,i4=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Lm="\ufffd",Zk=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,Jk=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Yk=/\uE500/g;function Qk(t,e,r,a,A,O){const J=ca(),ee=[],ie=[],oe=[[]];A=function nL(t,e){if(function tL(t){return-1===t}(e))return a4(t);{const r=t.indexOf(`:${e}${Lm}`)+2+e.toString().length,a=t.search(new RegExp(`${Lm}\\/\\*\\d+:${e}${Lm}`));return a4(t.substring(r,a))}}(A,O);const de=function $k(t){return t.replace(Yk," ")}(A).split(Jk);for(let be=0;ber.length&&r.push(ie)}return{type:a,mainBinding:A,cases:e,values:r}}function $E(t){if(!t)return[];let e=0;const r=[],a=[],A=/[{}]/g;let O;for(A.lastIndex=0;O=A.exec(t);){const ee=O.index;if("}"==O[0]){if(r.pop(),0==r.length){const ie=t.substring(e,ee);i4.test(ie)?a.push(rL(ie)):a.push(ie),e=ee+1}}else{if(0==r.length){const ie=t.substring(e,ee);a.push(ie),e=ee+1}r.push("{")}}const J=t.substring(e);return a.push(J),a}function iL(t,e,r,a,A,O,J,ee){const ie=[],oe=[],de=[];e.cases.push(O),e.create.push(ie),e.remove.push(oe),e.update.push(de);const Ee=kS(vr()).getInertBodyElement(J),Ce=hE(Ee)||Ee;return Ce?u4(t,e,r,a,ie,oe,de,Ce,A,ee,0):0}function u4(t,e,r,a,A,O,J,ee,ie,oe,de){let be=0,Ee=ee.firstChild;for(;Ee;){const Ce=xm(t,r,1,null);switch(Ee.nodeType){case Node.ELEMENT_NODE:const Ie=Ee,Ue=Ie.tagName.toLowerCase();if(fE.hasOwnProperty(Ue)){QE(A,Nb,Ue,ie,Ce),t.data[Ce]=Ue;const ct=Ie.attributes;for(let wt=0;wt>>pa.SHIFT;let be=t[de];null===be&&(be=t[de]=ie?A.createComment(ee):Ks(A,ee)),oe&&null!==r&&Kl(A,r,be,a,!1)}})(A,ie.create,de,be),Ny(!0)}function h4(){Ny(!1)}function mL(t,e,r){d4(t,e,r),h4()}function vL(t,e){const r=Yr(),a=Xa(r.consts,e);!function qk(t,e,r){const A=Ko().index,O=[];if(t.firstCreatePass&&null===t.data[e]){for(let J=0;J0){const a=t.data[r];e4(t,e,Array.isArray(a)?a:a.update,Na()-km-1,Rm)}Rm=0,km=0}(Yr(),bn(),t+Mi)}function wL(t,e={}){return function yL(t,e={}){let r=t;if(uL.test(t)){const a={},A=[f4];r=r.replace(lL,(O,J,ee)=>{const ie=J||ee,oe=a[ie]||[];if(oe.length||(ie.split("|").forEach(Ue=>{const We=Ue.match(gL),$e=We?parseInt(We[1],10):f4,ht=pL.test(Ue);oe.push([$e,ht,Ue])}),a[ie]=oe),!oe.length)throw new Error(`i18n postprocess: unmatched placeholder - ${ie}`);const de=A[A.length-1];let be=0;for(let Ue=0;Uee.hasOwnProperty(O)?`${A}${e[O]}${ie}`:a),r=r.replace(dL,(a,A)=>e.hasOwnProperty(A)?e[A]:a),r=r.replace(hL,(a,A)=>{if(e.hasOwnProperty(A)){const O=e[A];if(!O.length)throw new Error(`i18n postprocess: unmatched ICU - ${a} with key: ${A}`);return O.shift()}return a})),r}(t,e)}function XE(t,e,r,a,A){if(t=Qn(t),Array.isArray(t))for(let O=0;O>20;if(yh(t)||!t.multi){const Ce=new Ro(ie,A,Rn),Ie=eA(ee,e,A?de:de+Ee,be);-1===Ie?(ip(ih(oe,J),O,ee),qE(O,t,e.length),e.push(ee),oe.directiveStart++,oe.directiveEnd++,A&&(oe.providerIndexes+=1048576),r.push(Ce),J.push(Ce)):(r[Ie]=Ce,J[Ie]=Ce)}else{const Ce=eA(ee,e,de+Ee,be),Ie=eA(ee,e,de,de+Ee),Ue=Ce>=0&&r[Ce],We=Ie>=0&&r[Ie];if(A&&!We||!A&&!Ue){ip(ih(oe,J),O,ee);const $e=function SL(t,e,r,a,A){const O=new Ro(t,r,Rn);return O.multi=[],O.index=e,O.componentProviders=0,g4(O,A,a&&!r),O}(A?_L:AL,r.length,A,a,ie);!A&&We&&(r[Ie].providerFactory=$e),qE(O,t,e.length,0),e.push(ee),oe.directiveStart++,oe.directiveEnd++,A&&(oe.providerIndexes+=1048576),r.push($e),J.push($e)}else{qE(O,t,Ce>-1?Ce:Ie,g4(r[A?Ie:Ce],ie,!A&&a))}!A&&a&&We&&r[Ie].componentProviders++}}}function qE(t,e,r,a){const A=yh(e),O=function DN(t){return!!t.useClass}(e);if(A||O){const ie=(O?Qn(e.useClass):e).prototype.ngOnDestroy;if(ie){const oe=t.destroyHooks||(t.destroyHooks=[]);if(!A&&e.multi){const de=oe.indexOf(r);-1===de?oe.push(r,[a,ie]):oe[de+1].push(a,ie)}else oe.push(r,ie)}}}function g4(t,e,r){return r&&t.componentProviders++,t.multi.push(e)-1}function eA(t,e,r,a){for(let A=r;A{r.providersResolver=(a,A)=>function EL(t,e,r){const a=Yr();if(a.firstCreatePass){const A=Ss(t);XE(r,a.data,a.blueprint,A,!0),XE(e,a.data,a.blueprint,A,!1)}}(a,A?A(t):t,e)}}class qp{}class xL{}class y4 extends qp{constructor(e,r){super(),this._parent=r,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new R8(this);const a=ra(e);this._bootstrapComponents=Jl(a.bootstrap),this._r3Injector=p8(e,r,[{provide:qp,useValue:this},{provide:Am,useValue:this.componentFactoryResolver}],Ir(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(r=>r()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class nA extends xL{constructor(e){super(),this.moduleType=e}create(e){return new y4(this.moduleType,e)}}class IL extends qp{constructor(e,r,a){super(),this.componentFactoryResolver=new R8(this),this.instance=null;const A=new XS([...e,{provide:qp,useValue:this},{provide:Am,useValue:this.componentFactoryResolver}],r||gb(),a,new Set(["environment"]));this.injector=A,A.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function m4(t,e,r=null){return new IL(t,e,r).injector}class Lb{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const r=JS(0,e.type),a=r.length>0?m4([r],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,a)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}function CL(t){t.getStandaloneInjector=e=>e.get(Lb).getOrCreateStandaloneInjector(t)}function BL(t,e,r){const a=ds()+t,A=bn();return A[a]===zr?Hu(A,a,r?e.call(r):e()):Cm(A,a)}function S4(t,e,r,a){return x4(bn(),ds(),t,e,r,a)}function jL(t,e,r,a,A){return M4(bn(),ds(),t,e,r,a,A)}function FL(t,e,r,a,A,O){return I4(bn(),ds(),t,e,r,a,A,O)}function UL(t,e,r,a,A,O,J){return C4(bn(),ds(),t,e,r,a,A,O,J)}function KL(t,e,r,a,A,O,J,ee){const ie=ds()+t,oe=bn(),de=Ic(oe,ie,r,a,A,O);return Hs(oe,ie+4,J)||de?Hu(oe,ie+5,ee?e.call(ee,r,a,A,O,J):e(r,a,A,O,J)):Cm(oe,ie+5)}function zL(t,e,r,a,A,O,J,ee,ie){const oe=ds()+t,de=bn(),be=Ic(de,oe,r,a,A,O);return mh(de,oe+4,J,ee)||be?Hu(de,oe+6,ie?e.call(ie,r,a,A,O,J,ee):e(r,a,A,O,J,ee)):Cm(de,oe+6)}function VL(t,e,r,a,A,O,J,ee,ie,oe){const de=ds()+t,be=bn();let Ee=Ic(be,de,r,a,A,O);return Mb(be,de+4,J,ee,ie)||Ee?Hu(be,de+7,oe?e.call(oe,r,a,A,O,J,ee,ie):e(r,a,A,O,J,ee,ie)):Cm(be,de+7)}function HL(t,e,r,a,A,O,J,ee,ie,oe,de){const be=ds()+t,Ee=bn(),Ce=Ic(Ee,be,r,a,A,O);return Ic(Ee,be+4,J,ee,ie,oe)||Ce?Hu(Ee,be+8,de?e.call(de,r,a,A,O,J,ee,ie,oe):e(r,a,A,O,J,ee,ie,oe)):Cm(Ee,be+8)}function WL(t,e,r,a){return D4(bn(),ds(),t,e,r,a)}function jm(t,e){const r=t[e];return r===zr?void 0:r}function x4(t,e,r,a,A,O){const J=e+r;return Hs(t,J,A)?Hu(t,J+1,O?a.call(O,A):a(A)):jm(t,J+1)}function M4(t,e,r,a,A,O,J){const ee=e+r;return mh(t,ee,A,O)?Hu(t,ee+2,J?a.call(J,A,O):a(A,O)):jm(t,ee+2)}function I4(t,e,r,a,A,O,J,ee){const ie=e+r;return Mb(t,ie,A,O,J)?Hu(t,ie+3,ee?a.call(ee,A,O,J):a(A,O,J)):jm(t,ie+3)}function C4(t,e,r,a,A,O,J,ee,ie){const oe=e+r;return Ic(t,oe,A,O,J,ee)?Hu(t,oe+4,ie?a.call(ie,A,O,J,ee):a(A,O,J,ee)):jm(t,oe+4)}function D4(t,e,r,a,A,O){let J=e+r,ee=!1;for(let ie=0;ie=0;r--){const a=e[r];if(t===a.name)return a}}(e,r.pipeRegistry),r.data[A]=a,a.onDestroy&&(r.destroyHooks??(r.destroyHooks=[])).push(A,a.onDestroy)):a=r.data[A];const O=a.factory||(a.factory=Lu(a.type)),J=na(Rn);try{const ee=Nl(!1),ie=O();return Nl(ee),function OR(t,e,r,a){r>=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=a}(r,bn(),A,ie),ie}finally{na(J)}}function JL(t,e,r){const a=t+Mi,A=bn(),O=Ml(A,a);return Fm(A,a)?x4(A,ds(),e,O.transform,r,O):O.transform(r)}function YL(t,e,r,a){const A=t+Mi,O=bn(),J=Ml(O,A);return Fm(O,A)?M4(O,ds(),e,J.transform,r,a,J):J.transform(r,a)}function $L(t,e,r,a,A){const O=t+Mi,J=bn(),ee=Ml(J,O);return Fm(J,O)?I4(J,ds(),e,ee.transform,r,a,A,ee):ee.transform(r,a,A)}function QL(t,e,r,a,A,O){const J=t+Mi,ee=bn(),ie=Ml(ee,J);return Fm(ee,J)?C4(ee,ds(),e,ie.transform,r,a,A,O,ie):ie.transform(r,a,A,O)}function XL(t,e,r){const a=t+Mi,A=bn(),O=Ml(A,a);return Fm(A,a)?D4(A,ds(),e,O.transform,r,O):O.transform.apply(O,r)}function Fm(t,e){return t[Zn].data[e].pure}Lb.\u0275prov=Tr({token:Lb,providedIn:"environment",factory:()=>new Lb(mr(Pp))});function iA(t){return e=>{setTimeout(t,void 0,e)}}const ms=class qL extends Mn{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,r,a){let A=e,O=r||(()=>null),J=a;if(e&&"object"==typeof e){const ie=e;A=ie.next?.bind(ie),O=ie.error?.bind(ie),J=ie.complete?.bind(ie)}this.__isAsync&&(O=iA(O),A&&(A=iA(A)),J&&(J=iA(J)));const ee=super.subscribe({next:A,error:O,complete:J});return e instanceof ue&&e.add(ee),ee}};function eB(){return this._results[Symbol.iterator]()}class oA{get changes(){return this._changes||(this._changes=new ms)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const r=oA.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=eB)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,r){return this._results.reduce(e,r)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,r){const a=this;a.dirty=!1;const A=ua(e);(this._changesDetected=!function Xy(t,e,r){if(t.length!==e.length)return!1;for(let a=0;a0;)this.remove(this.length-1)}get(e){const r=O4(this._lContainer);return null!==r&&r[e]||null}get length(){return this._lContainer.length-zi}createEmbeddedView(e,r,a){let A,O;"number"==typeof a?A=a:null!=a&&(A=a.index,O=a.injector);const J=e.createEmbeddedView(r||{},O);return this.insert(J,A),J}createComponent(e,r,a,A,O){const J=e&&!Vf(e);let ee;if(J)ee=r;else{const be=r||{};ee=be.index,a=be.injector,A=be.projectableNodes,O=be.environmentInjector||be.ngModuleRef}const ie=J?e:new Im(di(e)),oe=a||this.parentInjector;if(!O&&null==ie.ngModule){const Ee=(J?oe:this.parentInjector).get(Pp,null);Ee&&(O=Ee)}const de=ie.create(oe,A,void 0,O);return this.insert(de.hostView,ee),de}insert(e,r){const a=e._lView,A=a[Zn];if(function D1(t){return ia(t[Ki])}(a)){const de=this.indexOf(e);if(-1!==de)this.detach(de);else{const be=a[Ki],Ee=new T4(be,be[rs],be[Ki]);Ee.detach(Ee.indexOf(e))}}const O=this._adjustIndex(r),J=this._lContainer;gm(A,a,J,O);const ee=se(O,J),ie=a[Hr],oe=zl(ie,J[$a]);return null!==oe&&function Ul(t,e,r,a,A,O){a[mc]=A,a[rs]=e,Fe(t,a,r,1,A,O)}(A,J[rs],ie,a,oe,ee),e.attachToViewContainerRef(),Ac(sA(J),O,e),e}move(e,r){return this.insert(e,r)}indexOf(e){const r=O4(this._lContainer);return null!==r?r.indexOf(e):-1}remove(e){const r=this._adjustIndex(e,-1),a=ym(this._lContainer,r);a&&(cp(sA(this._lContainer),r),mm(a[Zn],a))}detach(e){const r=this._adjustIndex(e,-1),a=ym(this._lContainer,r);return a&&null!=cp(sA(this._lContainer),r)?new Mm(a):null}_adjustIndex(e,r=0){return e??this.length+r}};function O4(t){return t[Wd]}function sA(t){return t[Wd]||(t[Wd]=[])}function N4(t,e){let r;const a=e[t.index];if(ia(a))r=a;else{let A;if(8&t.type)A=Uo(a);else{const O=e[Hr];A=O.createComment("");const J=Bi(t,e);Kl(O,zl(O,J),A,function ab(t,e){return t.nextSibling(e)}(O,J),!1)}e[t.index]=r=D8(a,e,A,t),wb(e,r)}return new T4(r,t,e)}class aA{constructor(e){this.queryList=e,this.matches=null}clone(){return new aA(this.queryList)}setDirty(){this.queryList.setDirty()}}class cA{constructor(e=[]){this.queries=e}createEmbeddedView(e){const r=e.queries;if(null!==r){const a=null!==e.contentQueries?e.contentQueries[0]:r.length,A=[];for(let O=0;O0)a.push(J[ee/2]);else{const oe=O[ee+1],de=e[-ie];for(let be=zi;be(null===A&&(A=wo().compileNgModule(ga,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:ua(e.bootstrap||fi).map(Qn),declarations:a.map(Qn),imports:ua(e.imports||fi).map(Qn).map(W4),exports:ua(e.exports||fi).map(Qn).map(W4),schemas:e.schemas?ua(e.schemas):null,id:e.id||null}),A.schemas||(A.schemas=[])),A)});let O=null;Object.defineProperty(t,Ja,{get:()=>{if(null===O){const ee=wo();O=ee.compileFactory(ga,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:Fs(t),target:ee.FactoryTarget.NgModule,typeArgumentCount:0})}return O},configurable:!1});let J=null;Object.defineProperty(t,hl,{get:()=>{if(null===J){const ee={name:t.name,type:t,providers:e.providers||fi,imports:[(e.imports||fi).map(Qn),(e.exports||fi).map(Qn)]};J=wo().compileInjector(ga,`ng:///${t.name}/\u0275inj.js`,ee)}return J},configurable:!1})})(t,e),void 0!==e.id&&Vo(t,e.id),function bB(t,e){Um.push({moduleType:t,ngModule:e})}(t,e)}function SB(t,e){const r=ua(e.declarations||fi),a=tg(t);r.forEach(A=>{if((A=Qn(A)).hasOwnProperty(j0)){H4(di(A),a)}else!A.hasOwnProperty(Nu)&&!A.hasOwnProperty(Vd)&&(A.ngSelectorScope=t)})}function H4(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(r=>r.hasOwnProperty(j0)?di(r):Ji(r)).filter(r=>!!r),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(r=>ls(r)),t.schemas=e.schemas,t.tView=null}function tg(t){if(F4(t))return function xB(t){const e=ra(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const r={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return Jl(e.imports).forEach(a=>{const A=tg(a);A.exported.directives.forEach(O=>r.compilation.directives.add(O)),A.exported.pipes.forEach(O=>r.compilation.pipes.add(O))}),Jl(e.declarations).forEach(a=>{ls(a)?r.compilation.pipes.add(a):r.compilation.directives.add(a)}),Jl(e.exports).forEach(a=>{const A=a;if(F4(A)){const O=tg(A);O.exported.directives.forEach(J=>{r.compilation.directives.add(J),r.exported.directives.add(J)}),O.exported.pipes.forEach(J=>{r.compilation.pipes.add(J),r.exported.pipes.add(J)})}else ls(A)?r.exported.pipes.add(A):r.exported.directives.add(A)}),e.transitiveCompileScopes=r,r}(t);if(bl(t)){if(null!==(di(t)||Ji(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==ls(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function W4(t){return j4(t)?t.ngModule:t}let gA=0;function MB(t,e){let r=null;(function _c(t,e){im(e)&&(ps.set(t,e),Yf.add(t))})(t,e),J4(t,e),Object.defineProperty(t,j0,{get:()=>{if(null===r){const a=wo();if(im(e)){const oe=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&oe.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&oe.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),oe.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(oe.join("\n"))}const A=function vB(){return eg}();let O=e.preserveWhitespaces;void 0===O&&(O=null!==A&&void 0!==A.preserveWhitespaces&&A.preserveWhitespaces);let J=e.encapsulation;void 0===J&&(J=null!==A&&void 0!==A.defaultEncapsulation?A.defaultEncapsulation:yc.Emulated);const ee=e.templateUrl||`ng:///${t.name}/template.html`,ie={...Y4(t,e),typeSourceSpan:a.createParseSourceSpan("Component",t.name,ee),template:e.template||"",preserveWhitespaces:O,styles:e.styles||fi,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:J,interpolation:e.interpolation,viewProviders:e.viewProviders||null};gA++;try{if(ie.usesInheritance&&$4(t),r=a.compileComponent(ga,ee,ie),e.standalone){const oe=ua(e.imports||fi),{directiveDefs:de,pipeDefs:be}=function CB(t,e){let r=null,a=null;return{directiveDefs:()=>{if(null===r){r=[di(t)];const J=new Set;for(const ee of e){const ie=Qn(ee);if(!J.has(ie))if(J.add(ie),ra(ie)){const oe=tg(ie);for(const de of oe.exported.directives){const be=di(de)||Ji(de);be&&!J.has(de)&&(J.add(de),r.push(be))}}else{const oe=di(ie)||Ji(ie);oe&&r.push(oe)}}}return r},pipeDefs:()=>{if(null===a){a=[];const J=new Set;for(const ee of e){const ie=Qn(ee);if(!J.has(ie))if(J.add(ie),ra(ie)){const oe=tg(ie);for(const de of oe.exported.pipes){const be=ls(de);be&&!J.has(de)&&(J.add(de),a.push(be))}}else{const oe=ls(ie);oe&&a.push(oe)}}}return a}}}(t,oe);r.directiveDefs=de,r.pipeDefs=be,r.dependencies=()=>oe.map(Qn)}}finally{gA--}if(0===gA&&function wB(){if(!dA){dA=!0;try{for(let t=Um.length-1;t>=0;t--){const{moduleType:e,ngModule:r}=Um[t];r.declarations&&r.declarations.every(U4)&&(Um.splice(t,1),SB(e,r))}}finally{dA=!1}}}(),function DB(t){return void 0!==t.ngSelectorScope}(t)){const oe=tg(t.ngSelectorScope);H4(r,oe)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${ci(t)} but is only valid on a component that is standalone.`);r.schemas=e.schemas}else e.standalone&&(r.schemas=[])}return r},configurable:!1})}function G4(t,e){let r=null;J4(t,e||{}),Object.defineProperty(t,Nu,{get:()=>{if(null===r){const a=Z4(t,e||{});r=wo().compileDirective(ga,a.sourceMapUrl,a.metadata)}return r},configurable:!1})}function Z4(t,e){const r=t&&t.name,a=`ng:///${r}/\u0275dir.js`,A=wo(),O=Y4(t,e);return O.typeSourceSpan=A.createParseSourceSpan("Directive",r,a),O.usesInheritance&&$4(t),{metadata:O,sourceMapUrl:a}}function J4(t,e){let r=null;Object.defineProperty(t,Ja,{get:()=>{if(null===r){const a=Z4(t,e),A=wo();r=A.compileFactory(ga,`ng:///${t.name}/\u0275fac.js`,{name:a.metadata.name,type:a.metadata.type,typeArgumentCount:0,deps:Fs(t),target:A.FactoryTarget.Directive})}return r},configurable:!1})}function TB(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function Y4(t,e){const r=Co(),a=r.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||Za,propMetadata:a,inputs:e.inputs||fi,outputs:e.outputs||fi,queries:Q4(t,a,X4),lifecycle:{usesOnChanges:r.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!TB(t),exportAs:PB(e.exportAs),providers:e.providers||null,viewQueries:Q4(t,a,q4),isStandalone:!!e.standalone,hostDirectives:e.hostDirectives?.map(A=>"function"==typeof A?{directive:A}:A)||null}}function $4(t){const e=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==e;)!Ji(r)&&!di(r)&&kB(r)&&G4(r,null),r=Object.getPrototypeOf(r)}function OB(t){return"string"==typeof t?tx(t):Qn(t)}function NB(t,e){return{propertyName:t,predicate:OB(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly}}function Q4(t,e,r){const a=[];for(const A in e)if(e.hasOwnProperty(A)){const O=e[A];O.forEach(J=>{if(r(J)){if(!J.selector)throw new Error(`Can't construct a query for the property "${A}" of "${ci(t)}" since the query selector wasn't defined.`);if(O.some(ex))throw new Error("Cannot combine @Input decorators with query decorators");a.push(NB(A,J))}})}return a}function PB(t){return void 0===t?null:tx(t)}function X4(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function q4(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function ex(t){return"Input"===t.ngMetadataName}function tx(t){return t.split(",").map(e=>e.trim())}const RB=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function kB(t){const e=Co();if(RB.some(a=>e.hasLifecycleHook(t,a)))return!0;const r=e.propMetadata(t);for(const a in r){const A=r[a];for(let O=0;Ot,void 0,void 0,(t,e)=>G4(t,e));$o("Component",(t={})=>({changeDetection:vl.Default,...t}),BB,void 0,(t,e)=>MB(t,e)),$o("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function LB(t,e){let r=null,a=null;Object.defineProperty(t,Ja,{get:()=>{if(null===a){const A=nx(t,e),O=wo(A.type);a=O.compileFactory(ga,`ng:///${A.name}/\u0275fac.js`,{name:A.name,type:A.type,typeArgumentCount:0,deps:Fs(t),target:O.FactoryTarget.Pipe})}return a},configurable:!1}),Object.defineProperty(t,Vd,{get:()=>{if(null===r){const A=nx(t,e);r=wo(A.type).compilePipe(ga,`ng:///${A.name}/\u0275pipe.js`,A)}return r},configurable:!1})}(t,e)),ou("Input",t=>({bindingPropertyName:t})),ou("Output",t=>({bindingPropertyName:t})),ou("HostBinding",t=>({hostPropertyName:t})),ou("HostListener",(t,e)=>({eventName:t,args:e})),$o("NgModule",t=>t,void 0,void 0,(t,e)=>EB(t,e));function Fb(...t){}const rx=new Cr("Application Initializer");class Ql{constructor(e){this.appInits=e,this.resolve=Fb,this.reject=Fb,this.initialized=!1,this.done=!1,this.donePromise=new Promise((r,a)=>{this.resolve=r,this.reject=a})}runInitializers(){if(this.initialized)return;const e=[],r=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let a=0;a{A.subscribe({complete:J,error:ee})});e.push(O)}}Promise.all(e).then(()=>{r()}).catch(a=>{this.reject(a)}),0===e.length&&r(),this.initialized=!0}}Ql.\u0275fac=function(e){return new(e||Ql)(mr(rx,8))},Ql.\u0275prov=Tr({token:Ql,factory:Ql.\u0275fac,providedIn:"root"});const ng=new Cr("AppId",{providedIn:"root",factory:ix});function ix(){return`${yA()}${yA()}${yA()}`}function yA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const ox=new Cr("Platform Initializer"),mA=new Cr("Platform ID",{providedIn:"platform",factory:()=>"unknown"});new Cr("Application Packages Root URL"),new Cr("AnimationModuleType");class wh{log(e){console.log(e)}warn(e){console.warn(e)}}wh.\u0275fac=function(e){return new(e||wh)},wh.\u0275prov=Tr({token:wh,factory:wh.\u0275fac,providedIn:"platform"});const Xl=new Cr("LocaleId",{providedIn:"root",factory:()=>jo(Xl,Xr.Optional|Xr.SkipSelf)||function jB(){return typeof $localize<"u"&&$localize.locale||Xp}()}),FB=new Cr("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new Cr("Translations"),new Cr("TranslationsFormat");var sx;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(sx||(sx={}));class UB{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}}class Km{compileModuleSync(e){return new nA(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const r=this.compileModuleSync(e),A=Jl(ra(e).declarations).reduce((O,J)=>{const ee=di(J);return ee&&O.push(new Im(ee)),O},[]);return new UB(r,A)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}Km.\u0275fac=function(e){return new(e||Km)},Km.\u0275prov=Tr({token:Km,factory:Km.\u0275fac,providedIn:"root"});new Cr("compilerOptions");const VB=Promise.resolve(0);function vA(t){typeof Zone>"u"?VB.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Ws{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:a=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new ms(!1),this.onMicrotaskEmpty=new ms(!1),this.onStable=new ms(!1),this.onError=new ms(!1),typeof Zone>"u")throw new Tn(908,!1);Zone.assertZonePatched();const A=this;A._nesting=0,A._outer=A._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(A._inner=A._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(A._inner=A._inner.fork(Zone.longStackTraceZoneSpec)),A.shouldCoalesceEventChangeDetection=!a&&r,A.shouldCoalesceRunChangeDetection=a,A.lastRequestAnimationFrameId=-1,A.nativeRequestAnimationFrame=function HB(){let t=Ri.requestAnimationFrame,e=Ri.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);const a=e[Zone.__symbol__("OriginalDelegate")];a&&(e=a)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function ZB(t){const e=()=>{!function GB(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Ri,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,wA(t),t.isCheckStableRunning=!0,bA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),wA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,a,A,O,J,ee)=>{try{return ux(t),r.invokeTask(A,O,J,ee)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===O.type||t.shouldCoalesceRunChangeDetection)&&e(),lx(t)}},onInvoke:(r,a,A,O,J,ee,ie)=>{try{return ux(t),r.invoke(A,O,J,ee,ie)}finally{t.shouldCoalesceRunChangeDetection&&e(),lx(t)}},onHasTask:(r,a,A,O)=>{r.hasTask(A,O),a===A&&("microTask"==O.change?(t._hasPendingMicrotasks=O.microTask,wA(t),bA(t)):"macroTask"==O.change&&(t.hasPendingMacrotasks=O.macroTask))},onHandleError:(r,a,A,O)=>(r.handleError(A,O),t.runOutsideAngular(()=>t.onError.emit(O)),!1)})}(A)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Ws.isInAngularZone())throw new Tn(909,!1)}static assertNotInAngularZone(){if(Ws.isInAngularZone())throw new Tn(909,!1)}run(e,r,a){return this._inner.run(e,r,a)}runTask(e,r,a,A){const O=this._inner,J=O.scheduleEventTask("NgZoneEvent: "+A,e,WB,Fb,Fb);try{return O.runTask(J,r,a)}finally{O.cancelTask(J)}}runGuarded(e,r,a){return this._inner.runGuarded(e,r,a)}runOutsideAngular(e){return this._outer.run(e)}}const WB={};function bA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function wA(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function ux(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function lx(t){t._nesting--,bA(t)}class JB{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new ms,this.onMicrotaskEmpty=new ms,this.onStable=new ms,this.onError=new ms}run(e,r,a){return e.apply(r,a)}runGuarded(e,r,a){return e.apply(r,a)}runOutsideAngular(e){return e()}runTask(e,r,a,A){return e.apply(r,a)}}const fx=new Cr(""),Ub=new Cr("");class nd{constructor(e,r,a){this._ngZone=e,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,EA||(function YB(t){EA=t}(a),a.addToWindow(r)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Ws.assertNotInAngularZone(),vA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())vA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(e)||(clearTimeout(r.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,r,a){let A=-1;r&&r>0&&(A=setTimeout(()=>{this._callbacks=this._callbacks.filter(O=>O.timeoutId!==A),e(this._didWork,this.getPendingTasks())},r)),this._callbacks.push({doneCb:e,timeoutId:A,updateCb:a})}whenStable(e,r,a){if(a&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,r,a),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,r,a){return[]}}nd.\u0275fac=function(e){return new(e||nd)(mr(Ws),mr(rd),mr(Ub))},nd.\u0275prov=Tr({token:nd,factory:nd.\u0275fac});class rd{constructor(){this._applications=new Map}registerApplication(e,r){this._applications.set(e,r)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,r=!0){return EA?.findTestabilityInTree(this,e,r)??null}}let EA;rd.\u0275fac=function(e){return new(e||rd)},rd.\u0275prov=Tr({token:rd,factory:rd.\u0275fac,providedIn:"platform"});const ql=!1;let id=null;const dx=new Cr("AllowMultipleToken"),AA=new Cr("PlatformDestroyListeners"),$B=new Cr("appBootstrapListener");function hx(t){const e=t.get(ox,null);e&&e.forEach(r=>r())}function px(t,e,r=[]){const a=`Platform: ${e}`,A=new Cr(a);return(O=[])=>{let J=_A();if(!J||J.injector.get(dx,!1)){const ee=[...r,...O,{provide:A,useValue:!0}];t?t(ee):function qB(t){if(id&&!id.get(dx,!1))throw new Tn(400,!1);id=t;const e=t.get(Eh);return hx(t),e}(gx(ee,a))}return function tj(t){const e=_A();if(!e)throw new Tn(401,!1);return e}()}}function gx(t=[],e){return Vs.create({name:e,providers:[{provide:mE,useValue:"platform"},{provide:AA,useValue:new Set([()=>id=null])},...t]})}function _A(){return id?.get(Eh)??null}class Eh{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,r){const a=mx(r?.ngZone,yx(r)),A=[{provide:Ws,useValue:a}];return a.run(()=>{const O=Vs.create({providers:A,parent:this.injector,name:e.moduleType.name}),J=e.create(O),ee=J.injector.get(Lp,null);if(!ee)throw new Tn(402,!1);return a.runOutsideAngular(()=>{const ie=a.onError.subscribe({next:oe=>{ee.handleError(oe)}});J.onDestroy(()=>{Kb(this._modules,J),ie.unsubscribe()})}),vx(ee,a,()=>{const ie=J.injector.get(Ql);return ie.runInitializers(),ie.donePromise.then(()=>(W5(J.injector.get(Xl,Xp)||Xp),this._moduleDoBootstrap(J),J))})})}bootstrapModule(e,r=[]){const a=bx({},r);return function QB(t,e,r){const a=new nA(r);return Promise.resolve(a)}(this.injector,0,e).then(A=>this.bootstrapModuleFactory(A,a))}_moduleDoBootstrap(e){const r=e.injector.get(od);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(a=>r.bootstrap(a));else{if(!e.instance.ngDoBootstrap)throw new Tn(-403,!1);e.instance.ngDoBootstrap(r)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Tn(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const e=this._injector.get(AA,null);e&&(e.forEach(r=>r()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function yx(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}function mx(t,e){let r;return r="noop"===t?new JB:("zone.js"===t?void 0:t)||new Ws(e),r}function vx(t,e,r){try{const a=r();return Ib(a)?a.catch(A=>{throw e.runOutsideAngular(()=>t.handleError(A)),A}):a}catch(a){throw e.runOutsideAngular(()=>t.handleError(a)),a}}function bx(t,e){return t=Array.isArray(e)?e.reduce(bx,t):{...t,...e}}Eh.\u0275fac=function(e){return new(e||Eh)(mr(Vs))},Eh.\u0275prov=Tr({token:Eh,factory:Eh.\u0275fac,providedIn:"platform"});class od{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,r,a){this._zone=e,this._injector=r,this._exceptionHandler=a,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const A=new pt(J=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{J.next(this._stable),J.complete()})}),O=new pt(J=>{let ee;this._zone.runOutsideAngular(()=>{ee=this._zone.onStable.subscribe(()=>{Ws.assertNotInAngularZone(),vA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,J.next(!0))})})});const ie=this._zone.onUnstable.subscribe(()=>{Ws.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{J.next(!1)}))});return()=>{ee.unsubscribe(),ie.unsubscribe()}});this.isStable=jr(A,O.pipe(function xi(t={}){const{connector:e=(()=>new Mn),resetOnError:r=!0,resetOnComplete:a=!0,resetOnRefCountZero:A=!0}=t;return O=>{let J,ee,ie,oe=0,de=!1,be=!1;const Ee=()=>{ee?.unsubscribe(),ee=void 0},Ce=()=>{Ee(),J=ie=void 0,de=be=!1},Ie=()=>{const Ue=J;Ce(),Ue?.unsubscribe()};return Hn((Ue,We)=>{oe++,!be&&!de&&Ee();const $e=ie=ie??e();We.add(()=>{oe--,0===oe&&!be&&!de&&(ee=Pi(Ie,A))}),$e.subscribe(We),!J&&oe>0&&(J=new je({next:ht=>$e.next(ht),error:ht=>{be=!0,Ee(),ee=Pi(Ce,r,ht),$e.error(ht)},complete:()=>{de=!0,Ee(),ee=Pi(Ce,a),$e.complete()}}),Jr(Ue).subscribe(J))})(O)}}()))}bootstrap(e,r){ql&&this.warnIfDestroyed();const a=e instanceof e8;if(!this._injector.get(Ql).done){const Ee="Cannot bootstrap as there are still asynchronous initializers running."+(!a&&bl(e)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new Tn(405,ql&&Ee)}let O;O=a?e:this._injector.get(Am).resolveComponentFactory(e),this.componentTypes.push(O.componentType);const J=function XB(t){return t.isBoundToModule}(O)?void 0:this._injector.get(qp),ee=r||O.selector,ie=O.create(Vs.NULL,[],ee,J),oe=ie.location.nativeElement,de=ie.injector.get(fx,null);return de?.registerApplication(oe),ie.onDestroy(()=>{this.detachView(ie.hostView),Kb(this.components,ie),de?.unregisterApplication(oe)}),this._loadComponent(ie),ie}tick(){if(ql&&this.warnIfDestroyed(),this._runningTick)throw new Tn(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){ql&&this.warnIfDestroyed();const r=e;this._views.push(r),r.attachToAppRef(this)}detachView(e){ql&&this.warnIfDestroyed();const r=e;Kb(this._views,r),r.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const r=this._injector.get($B,[]);r.push(...this._bootstrapListeners),r.forEach(a=>a(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return ql&&this.warnIfDestroyed(),this._destroyListeners.push(e),()=>Kb(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Tn(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){ql&&this._destroyed&&console.warn(vo(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function Kb(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}od.\u0275fac=function(e){return new(e||od)(mr(Ws),mr(Pp),mr(Lp))},od.\u0275prov=Tr({token:od,factory:od.\u0275fac,providedIn:"root"});class SA{}SA.__NG_ELEMENT_ID__=function rj(t){return function ij(t,e,r){if(Gd(t)&&!r){const a=Ms(t.index,e);return new Mm(a,a)}if(47&t.type){const a=e[Fo];return new Mm(a,e)}return null}(Ko(),bn(),16==(16&t))};class Sx{constructor(){}supports(e){return xb(e)}create(e){return new lj(e)}}const uj=(t,e)=>e;class lj{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||uj}forEachItem(e){let r;for(r=this._itHead;null!==r;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,a=this._removalsHead,A=0,O=null;for(;r||a;){const J=!a||r&&r.currentIndex{J=this._trackByFn(A,ee),null!==r&&Object.is(r.trackById,J)?(a&&(r=this._verifyReinsertion(r,ee,J,A)),Object.is(r.item,ee)||this._addIdentityChange(r,ee)):(r=this._mismatch(r,ee,J,A),a=!0),r=r._next,A++}),this.length=A;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,a,A){let O;return null===e?O=this._itTail:(O=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(a,null))?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,O,A)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(a,A))?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,O,A)):e=this._addAfter(new fj(r,a),O,A),e}_verifyReinsertion(e,r,a,A){let O=null===this._unlinkedRecords?null:this._unlinkedRecords.get(a,null);return null!==O?e=this._reinsertAfter(O,e._prev,A):e.currentIndex!=A&&(e.currentIndex=A,this._addToMoves(e,A)),e}_truncate(e){for(;null!==e;){const r=e._next;this._addToRemovals(this._unlink(e)),e=r}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,a){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const A=e._prevRemoved,O=e._nextRemoved;return null===A?this._removalsHead=O:A._nextRemoved=O,null===O?this._removalsTail=A:O._prevRemoved=A,this._insertAfter(e,r,a),this._addToMoves(e,a),e}_moveAfter(e,r,a){return this._unlink(e),this._insertAfter(e,r,a),this._addToMoves(e,a),e}_addAfter(e,r,a){return this._insertAfter(e,r,a),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,a){const A=null===r?this._itHead:r._next;return e._next=A,e._prev=r,null===A?this._itTail=e:A._prev=e,null===r?this._itHead=e:r._next=e,null===this._linkedRecords&&(this._linkedRecords=new xx),this._linkedRecords.put(e),e.currentIndex=a,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const r=e._prev,a=e._next;return null===r?this._itHead=a:r._next=a,null===a?this._itTail=r:a._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new xx),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class fj{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dj{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let a;for(a=this._head;null!==a;a=a._nextDup)if((null===r||r<=a.currentIndex)&&Object.is(a.trackById,e))return a;return null}remove(e){const r=e._prevDup,a=e._nextDup;return null===r?this._head=a:r._nextDup=a,null===a?this._tail=r:a._prevDup=r,null===this._head}}class xx{constructor(){this.map=new Map}put(e){const r=e.trackById;let a=this.map.get(r);a||(a=new dj,this.map.set(r,a)),a.add(e)}get(e,r){const a=e,A=this.map.get(a);return A?A.get(e,r):null}remove(e){const r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Mx(t,e,r){const a=t.previousIndex;if(null===a)return a;let A=0;return r&&a{if(r&&r.key===A)this._maybeAddToChanges(r,a),this._appendAfter=r,r=r._next;else{const O=this._getOrCreateRecordForKey(A,a);r=this._insertBeforeOrAppend(r,O)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let a=r;null!==a;a=a._nextRemoved)a===this._mapHead&&(this._mapHead=null),this._records.delete(a.key),a._nextRemoved=a._next,a.previousValue=a.currentValue,a.currentValue=null,a._prev=null,a._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){const a=e._prev;return r._next=e,r._prev=a,e._prev=r,a&&(a._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){const A=this._records.get(e);this._maybeAddToChanges(A,r);const O=A._prev,J=A._next;return O&&(O._next=J),J&&(J._prev=O),A._next=null,A._prev=null,A}const a=new pj(e);return this._records.set(e,a),a.currentValue=r,this._addToAdditions(a),a}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(a=>r(e[a],a))}}class pj{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function Cx(){return new yu([new Sx])}class yu{constructor(e){this.factories=e}static create(e,r){if(null!=r){const a=r.factories.slice();e=e.concat(a)}return new yu(e)}static extend(e){return{provide:yu,useFactory:r=>yu.create(e,r||Cx()),deps:[[yu,new Jf,new Zf]]}}find(e){const r=this.factories.find(a=>a.supports(e));if(null!=r)return r;throw new Tn(901,!1)}}function Dx(){return new Tc([new Ix])}yu.\u0275prov=Tr({token:yu,providedIn:"root",factory:Cx});class Tc{constructor(e){this.factories=e}static create(e,r){if(r){const a=r.factories.slice();e=e.concat(a)}return new Tc(e)}static extend(e){return{provide:Tc,useFactory:r=>Tc.create(e,r||Dx()),deps:[[Tc,new Jf,new Zf]]}}find(e){const r=this.factories.find(a=>a.supports(e));if(r)return r;throw new Tn(901,!1)}}Tc.\u0275prov=Tr({token:Tc,providedIn:"root",factory:Dx});const gj=[new Ix],yj=[new Sx],mj=(new yu(yj),new Tc(gj),px(null,"core",[]));class rg{constructor(e){}}function DA(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}rg.\u0275fac=function(e){return new(e||rg)(mr(od))},rg.\u0275mod=Ca({type:rg}),rg.\u0275inj=Ma({});let TA=null;function Ju(){return TA}class wj{}const So=new Cr("DocumentToken");class _h{historyGo(e){throw new Error("Not implemented")}}_h.\u0275fac=function(e){return new(e||_h)},_h.\u0275prov=Tr({token:_h,factory:function(){return function Ej(){return mr(ig)}()},providedIn:"platform"});new Cr("Location Initialized");class ig extends _h{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Ju().getBaseHref(this._doc)}onPopState(e){const r=Ju().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",e,!1),()=>r.removeEventListener("popstate",e)}onHashChange(e){const r=Ju().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",e,!1),()=>r.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,r,a){Tx()?this._history.pushState(e,r,a):this._location.hash=a}replaceState(e,r,a){Tx()?this._history.replaceState(e,r,a):this._location.hash=a}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}function Tx(){return!!window.history.pushState}function OA(t,e){if(0==t.length)return e;if(0==e.length)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,2==r?t+e.substring(1):1==r?t+e:t+"/"+e}function Ox(t){const e=t.match(/#|\?|$/),r=e&&e.index||t.length,a=r-("/"===t[r-1]?1:0);return t.slice(0,a)+t.slice(r)}function ef(t){return t&&"?"!==t[0]?"?"+t:t}ig.\u0275fac=function(e){return new(e||ig)(mr(So))},ig.\u0275prov=Tr({token:ig,factory:function(){return function Aj(){return new ig(mr(So))}()},providedIn:"platform"});class sd{historyGo(e){throw new Error("Not implemented")}}sd.\u0275fac=function(e){return new(e||sd)},sd.\u0275prov=Tr({token:sd,factory:function(){return jo(og)},providedIn:"root"});const Nx=new Cr("appBaseHref");class og extends sd{constructor(e,r){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??jo(So).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return OA(this._baseHref,e)}path(e=!1){const r=this._platformLocation.pathname+ef(this._platformLocation.search),a=this._platformLocation.hash;return a&&e?`${r}${a}`:r}pushState(e,r,a,A){const O=this.prepareExternalUrl(a+ef(A));this._platformLocation.pushState(e,r,O)}replaceState(e,r,a,A){const O=this.prepareExternalUrl(a+ef(A));this._platformLocation.replaceState(e,r,O)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}og.\u0275fac=function(e){return new(e||og)(mr(_h),mr(Nx,8))},og.\u0275prov=Tr({token:og,factory:og.\u0275fac,providedIn:"root"});class zm extends sd{constructor(e,r){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=r&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let r=this._platformLocation.hash;return null==r&&(r="#"),r.length>0?r.substring(1):r}prepareExternalUrl(e){const r=OA(this._baseHref,e);return r.length>0?"#"+r:r}pushState(e,r,a,A){let O=this.prepareExternalUrl(a+ef(A));0==O.length&&(O=this._platformLocation.pathname),this._platformLocation.pushState(e,r,O)}replaceState(e,r,a,A){let O=this.prepareExternalUrl(a+ef(A));0==O.length&&(O=this._platformLocation.pathname),this._platformLocation.replaceState(e,r,O)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}zm.\u0275fac=function(e){return new(e||zm)(mr(_h),mr(Nx,8))},zm.\u0275prov=Tr({token:zm,factory:zm.\u0275fac});class Yu{constructor(e){this._subject=new ms,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const r=this._locationStrategy.getBaseHref();this._basePath=function xj(t){if(new RegExp("^(https?:)?//").test(t)){const[,r]=t.split(/\/\/[^\/]+/);return r}return t}(Ox(Px(r))),this._locationStrategy.onPopState(a=>{this._subject.emit({url:this.path(!0),pop:!0,state:a.state,type:a.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,r=""){return this.path()==this.normalize(e+ef(r))}normalize(e){return Yu.stripTrailingSlash(function Sj(t,e){if(!t||!e.startsWith(t))return e;const r=e.substring(t.length);return""===r||["/",";","?","#"].includes(r[0])?r:e}(this._basePath,Px(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,r="",a=null){this._locationStrategy.pushState(a,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ef(r)),a)}replaceState(e,r="",a=null){this._locationStrategy.replaceState(a,"",e,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+ef(r)),a)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)})),()=>{const r=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(r,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",r){this._urlChangeListeners.forEach(a=>a(e,r))}subscribe(e,r,a){return this._subject.subscribe({next:e,error:r,complete:a})}}function Px(t){return t.replace(/\/index.html$/,"")}Yu.normalizeQueryParams=ef,Yu.joinWithSlash=OA,Yu.stripTrailingSlash=Ox,Yu.\u0275fac=function(e){return new(e||Yu)(mr(sd))},Yu.\u0275prov=Tr({token:Yu,factory:function(){return function _j(){return new Yu(mr(sd))}()},providedIn:"root"});const Rx={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var Vm,Sh,Gs,Ci,La,ko,kx;function Hb(t,e){return Nc(ha(t)[Fi.DateFormat],e)}function Wb(t,e){return Nc(ha(t)[Fi.TimeFormat],e)}function Gb(t,e){return Nc(ha(t)[Fi.DateTimeFormat],e)}function Oc(t,e){const r=ha(t),a=r[Fi.NumberSymbols][e];if(typeof a>"u"){if(e===ko.CurrencyDecimal)return r[Fi.NumberSymbols][ko.Decimal];if(e===ko.CurrencyGroup)return r[Fi.NumberSymbols][ko.Group]}return a}function NA(t,e){return ha(t)[Fi.NumberFormats][e]}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(Vm||(Vm={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(Sh||(Sh={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}(Gs||(Gs={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(Ci||(Ci={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(La||(La={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(ko||(ko={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(kx||(kx={}));const Nj=z5;function Lx(t){if(!t[Fi.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Fi.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Nc(t,e){for(let r=e;r>-1;r--)if(typeof t[r]<"u")return t[r];throw new Error("Locale data API: locale data undefined")}function PA(t){const[e,r]=t.split(":");return{hours:+e,minutes:+r}}function kj(t,e,r="en"){const a=function Oj(t){return ha(t)[Fi.Currencies]}(r)[t]||Rx[t]||[],A=a[1];return"narrow"===e&&"string"==typeof A?A:a[0]||t}const Lj=2;const jj=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Hm={},Fj=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var $u,hi,pi;function Uj(t,e,r,a){let A=function Yj(t){if(Fx(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[A,O=1,J=1]=t.split("-").map(ee=>+ee);return Zb(A,O-1,J)}const r=parseFloat(t);if(!isNaN(t-r))return new Date(r);let a;if(a=t.match(jj))return function $j(t){const e=new Date(0);let r=0,a=0;const A=t[8]?e.setUTCFullYear:e.setFullYear,O=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=Number(t[9]+t[10]),a=Number(t[9]+t[11])),A.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const J=Number(t[4]||0)-r,ee=Number(t[5]||0)-a,ie=Number(t[6]||0),oe=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return O.call(e,J,ee,ie,oe),e}(a)}const e=new Date(t);if(!Fx(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=tf(r,e)||e;let ee,J=[];for(;e;){if(ee=Fj.exec(e),!ee){J.push(e);break}{J=J.concat(ee.slice(1));const de=J.pop();if(!de)break;e=de}}let ie=A.getTimezoneOffset();a&&(ie=jx(a,ie),A=function Jj(t,e,r){const a=r?-1:1,A=t.getTimezoneOffset(),O=jx(e,A);return function Zj(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,a*(O-A))}(A,a,!0));let oe="";return J.forEach(de=>{const be=function Gj(t){if(kA[t])return kA[t];let e;switch(t){case"G":case"GG":case"GGG":e=Wi(pi.Eras,Ci.Abbreviated);break;case"GGGG":e=Wi(pi.Eras,Ci.Wide);break;case"GGGGG":e=Wi(pi.Eras,Ci.Narrow);break;case"y":e=qo(hi.FullYear,1,0,!1,!0);break;case"yy":e=qo(hi.FullYear,2,0,!0,!0);break;case"yyy":e=qo(hi.FullYear,3,0,!1,!0);break;case"yyyy":e=qo(hi.FullYear,4,0,!1,!0);break;case"Y":e=Qb(1);break;case"YY":e=Qb(2,!0);break;case"YYY":e=Qb(3);break;case"YYYY":e=Qb(4);break;case"M":case"L":e=qo(hi.Month,1,1);break;case"MM":case"LL":e=qo(hi.Month,2,1);break;case"MMM":e=Wi(pi.Months,Ci.Abbreviated);break;case"MMMM":e=Wi(pi.Months,Ci.Wide);break;case"MMMMM":e=Wi(pi.Months,Ci.Narrow);break;case"LLL":e=Wi(pi.Months,Ci.Abbreviated,Gs.Standalone);break;case"LLLL":e=Wi(pi.Months,Ci.Wide,Gs.Standalone);break;case"LLLLL":e=Wi(pi.Months,Ci.Narrow,Gs.Standalone);break;case"w":e=RA(1);break;case"ww":e=RA(2);break;case"W":e=RA(1,!0);break;case"d":e=qo(hi.Date,1);break;case"dd":e=qo(hi.Date,2);break;case"c":case"cc":e=qo(hi.Day,1);break;case"ccc":e=Wi(pi.Days,Ci.Abbreviated,Gs.Standalone);break;case"cccc":e=Wi(pi.Days,Ci.Wide,Gs.Standalone);break;case"ccccc":e=Wi(pi.Days,Ci.Narrow,Gs.Standalone);break;case"cccccc":e=Wi(pi.Days,Ci.Short,Gs.Standalone);break;case"E":case"EE":case"EEE":e=Wi(pi.Days,Ci.Abbreviated);break;case"EEEE":e=Wi(pi.Days,Ci.Wide);break;case"EEEEE":e=Wi(pi.Days,Ci.Narrow);break;case"EEEEEE":e=Wi(pi.Days,Ci.Short);break;case"a":case"aa":case"aaa":e=Wi(pi.DayPeriods,Ci.Abbreviated);break;case"aaaa":e=Wi(pi.DayPeriods,Ci.Wide);break;case"aaaaa":e=Wi(pi.DayPeriods,Ci.Narrow);break;case"b":case"bb":case"bbb":e=Wi(pi.DayPeriods,Ci.Abbreviated,Gs.Standalone,!0);break;case"bbbb":e=Wi(pi.DayPeriods,Ci.Wide,Gs.Standalone,!0);break;case"bbbbb":e=Wi(pi.DayPeriods,Ci.Narrow,Gs.Standalone,!0);break;case"B":case"BB":case"BBB":e=Wi(pi.DayPeriods,Ci.Abbreviated,Gs.Format,!0);break;case"BBBB":e=Wi(pi.DayPeriods,Ci.Wide,Gs.Format,!0);break;case"BBBBB":e=Wi(pi.DayPeriods,Ci.Narrow,Gs.Format,!0);break;case"h":e=qo(hi.Hours,1,-12);break;case"hh":e=qo(hi.Hours,2,-12);break;case"H":e=qo(hi.Hours,1);break;case"HH":e=qo(hi.Hours,2);break;case"m":e=qo(hi.Minutes,1);break;case"mm":e=qo(hi.Minutes,2);break;case"s":e=qo(hi.Seconds,1);break;case"ss":e=qo(hi.Seconds,2);break;case"S":e=qo(hi.FractionalSeconds,1);break;case"SS":e=qo(hi.FractionalSeconds,2);break;case"SSS":e=qo(hi.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Yb($u.Short);break;case"ZZZZZ":e=Yb($u.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Yb($u.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Yb($u.Long);break;default:return null}return kA[t]=e,e}(de);oe+=be?be(A,r,ie):"''"===de?"'":de.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),oe}function Zb(t,e,r){const a=new Date(0);return a.setFullYear(t,e,r),a.setHours(0,0,0),a}function tf(t,e){const r=function Mj(t){return ha(t)[Fi.LocaleId]}(t);if(Hm[r]=Hm[r]||{},Hm[r][e])return Hm[r][e];let a="";switch(e){case"shortDate":a=Hb(t,La.Short);break;case"mediumDate":a=Hb(t,La.Medium);break;case"longDate":a=Hb(t,La.Long);break;case"fullDate":a=Hb(t,La.Full);break;case"shortTime":a=Wb(t,La.Short);break;case"mediumTime":a=Wb(t,La.Medium);break;case"longTime":a=Wb(t,La.Long);break;case"fullTime":a=Wb(t,La.Full);break;case"short":const A=tf(t,"shortTime"),O=tf(t,"shortDate");a=Jb(Gb(t,La.Short),[A,O]);break;case"medium":const J=tf(t,"mediumTime"),ee=tf(t,"mediumDate");a=Jb(Gb(t,La.Medium),[J,ee]);break;case"long":const ie=tf(t,"longTime"),oe=tf(t,"longDate");a=Jb(Gb(t,La.Long),[ie,oe]);break;case"full":const de=tf(t,"fullTime"),be=tf(t,"fullDate");a=Jb(Gb(t,La.Full),[de,be])}return a&&(Hm[r][e]=a),a}function Jb(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(r,a){return null!=e&&a in e?e[a]:r})),t}function mu(t,e,r="-",a,A){let O="";(t<0||A&&t<=0)&&(A?t=1-t:(t=-t,O=r));let J=String(t);for(;J.length0||ee>-r)&&(ee+=r),t===hi.Hours)0===ee&&-12===r&&(ee=12);else if(t===hi.FractionalSeconds)return function Kj(t,e){return mu(t,3).substring(0,e)}(ee,e);const ie=Oc(J,ko.MinusSign);return mu(ee,e,ie,a,A)}}function Wi(t,e,r=Gs.Format,a=!1){return function(A,O){return function Vj(t,e,r,a,A,O){switch(r){case pi.Months:return function Dj(t,e,r){const a=ha(t),O=Nc([a[Fi.MonthsFormat],a[Fi.MonthsStandalone]],e);return Nc(O,r)}(e,A,a)[t.getMonth()];case pi.Days:return function Cj(t,e,r){const a=ha(t),O=Nc([a[Fi.DaysFormat],a[Fi.DaysStandalone]],e);return Nc(O,r)}(e,A,a)[t.getDay()];case pi.DayPeriods:const J=t.getHours(),ee=t.getMinutes();if(O){const oe=function Pj(t){const e=ha(t);return Lx(e),(e[Fi.ExtraData][2]||[]).map(a=>"string"==typeof a?PA(a):[PA(a[0]),PA(a[1])])}(e),de=function Rj(t,e,r){const a=ha(t);Lx(a);const O=Nc([a[Fi.ExtraData][0],a[Fi.ExtraData][1]],e)||[];return Nc(O,r)||[]}(e,A,a),be=oe.findIndex(Ee=>{if(Array.isArray(Ee)){const[Ce,Ie]=Ee,Ue=J>=Ce.hours&&ee>=Ce.minutes,We=J0?Math.floor(A/60):Math.ceil(A/60);switch(t){case $u.Short:return(A>=0?"+":"")+mu(J,2,O)+mu(Math.abs(A%60),2,O);case $u.ShortGMT:return"GMT"+(A>=0?"+":"")+mu(J,1,O);case $u.Long:return"GMT"+(A>=0?"+":"")+mu(J,2,O)+":"+mu(Math.abs(A%60),2,O);case $u.Extended:return 0===a?"Z":(A>=0?"+":"")+mu(J,2,O)+":"+mu(Math.abs(A%60),2,O);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}($u||($u={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(hi||(hi={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(pi||(pi={}));const Hj=0,$b=4;function Bx(t){return Zb(t.getFullYear(),t.getMonth(),t.getDate()+($b-t.getDay()))}function RA(t,e=!1){return function(r,a){let A;if(e){const O=new Date(r.getFullYear(),r.getMonth(),1).getDay()-1,J=r.getDate();A=1+Math.floor((J+O)/7)}else{const O=Bx(r),J=function Wj(t){const e=Zb(t,Hj,1).getDay();return Zb(t,0,1+(e<=$b?$b:$b+7)-e)}(O.getFullYear()),ee=O.getTime()-J.getTime();A=1+Math.round(ee/6048e5)}return mu(A,t,Oc(a,ko.MinusSign))}}function Qb(t,e=!1){return function(r,a){return mu(Bx(r).getFullYear(),t,Oc(a,ko.MinusSign),e)}}const kA={};function jx(t,e){t=t.replace(/:/g,"");const r=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(r)?e:r}function Fx(t){return t instanceof Date&&!isNaN(t.valueOf())}const Qj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Ux=22,Xb=".",Wm="0",Xj=";",qj=",",LA="#",Kx="\xa4",eF="%";function BA(t,e,r,a,A,O,J=!1){let ee="",ie=!1;if(isFinite(t)){let oe=function oF(t){let a,A,O,J,ee,e=Math.abs(t)+"",r=0;for((A=e.indexOf(Xb))>-1&&(e=e.replace(Xb,"")),(O=e.search(/e/i))>0?(A<0&&(A=O),A+=+e.slice(O+1),e=e.substring(0,O)):A<0&&(A=e.length),O=0;e.charAt(O)===Wm;O++);if(O===(ee=e.length))a=[0],A=1;else{for(ee--;e.charAt(ee)===Wm;)ee--;for(A-=O,a=[],J=0;O<=ee;O++,J++)a[J]=Number(e.charAt(O))}return A>Ux&&(a=a.splice(0,Ux-1),r=A-1,A=1),{digits:a,exponent:r,integerLen:A}}(t);J&&(oe=function iF(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(oe));let de=e.minInt,be=e.minFrac,Ee=e.maxFrac;if(O){const ht=O.match(Qj);if(null===ht)throw new Error(`${O} is not a valid digit info`);const ct=ht[1],wt=ht[3],zt=ht[5];null!=ct&&(de=FA(ct)),null!=wt&&(be=FA(wt)),null!=zt?Ee=FA(zt):null!=wt&&be>Ee&&(Ee=be)}!function sF(t,e,r){if(e>r)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${r}).`);let a=t.digits,A=a.length-t.integerLen;const O=Math.min(Math.max(e,A),r);let J=O+t.integerLen,ee=a[J];if(J>0){a.splice(Math.max(t.integerLen,J));for(let be=J;be=5)if(J-1<0){for(let be=0;be>J;be--)a.unshift(0),t.integerLen++;a.unshift(1),t.integerLen++}else a[J-1]++;for(;A=oe?Ie.pop():ie=!1),Ee>=10?1:0},0);de&&(a.unshift(de),t.integerLen++)}(oe,be,Ee);let Ce=oe.digits,Ie=oe.integerLen;const Ue=oe.exponent;let We=[];for(ie=Ce.every(ht=>!ht);Ie0?We=Ce.splice(Ie,Ce.length):(We=Ce,Ce=[0]);const $e=[];for(Ce.length>=e.lgSize&&$e.unshift(Ce.splice(-e.lgSize,Ce.length).join(""));Ce.length>e.gSize;)$e.unshift(Ce.splice(-e.gSize,Ce.length).join(""));Ce.length&&$e.unshift(Ce.join("")),ee=$e.join(Oc(r,a)),We.length&&(ee+=Oc(r,A)+We.join("")),Ue&&(ee+=Oc(r,ko.Exponential)+"+"+Ue)}else ee=Oc(r,ko.Infinity);return ee=t<0&&!ie?e.negPre+ee+e.negSuf:e.posPre+ee+e.posSuf,ee}function tF(t,e,r,a,A){const J=jA(NA(e,Vm.Currency),Oc(e,ko.MinusSign));return J.minFrac=function Bj(t){let e;const r=Rx[t];return r&&(e=r[2]),"number"==typeof e?e:Lj}(a),J.maxFrac=J.minFrac,BA(t,J,e,ko.CurrencyGroup,ko.CurrencyDecimal,A).replace(Kx,r).replace(Kx,"").trim()}function jA(t,e="-"){const r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},a=t.split(Xj),A=a[0],O=a[1],J=-1!==A.indexOf(Xb)?A.split(Xb):[A.substring(0,A.lastIndexOf(Wm)+1),A.substring(A.lastIndexOf(Wm)+1)],ee=J[0],ie=J[1]||"";r.posPre=ee.substring(0,ee.indexOf(LA));for(let de=0;de-1||(A=r.getPluralCategory(t,a),e.indexOf(A)>-1))return A;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}xh.\u0275fac=function(e){return new(e||xh)},xh.\u0275prov=Tr({token:xh,factory:function(e){let r=null;return e?r=new e:(a=mr(Xl),r=new sg(a)),r;var a},providedIn:"root"});class sg extends xh{constructor(e){super(),this.locale=e}getPluralCategory(e,r){switch(Nj(r||this.locale)(e)){case Sh.Zero:return"zero";case Sh.One:return"one";case Sh.Two:return"two";case Sh.Few:return"few";case Sh.Many:return"many";default:return"other"}}}sg.\u0275fac=function(e){return new(e||sg)(mr(Xl))},sg.\u0275prov=Tr({token:sg,factory:sg.\u0275fac});const UA=/\s+/,Vx=[];class ag{constructor(e,r,a,A){this._iterableDiffers=e,this._keyValueDiffers=r,this._ngEl=a,this._renderer=A,this.initialClasses=Vx,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(UA):Vx}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(UA):e}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const r of e)this._updateState(r,!0);else if(null!=e)for(const r of Object.keys(e))this._updateState(r,Boolean(e[r]));this._applyStateDiff()}_updateState(e,r){const a=this.stateMap.get(e);void 0!==a?(a.enabled!==r&&(a.changed=!0,a.enabled=r),a.touched=!0):this.stateMap.set(e,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const r=e[0],a=e[1];a.changed?(this._toggleClass(r,a.enabled),a.changed=!1):a.touched||(a.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),a.touched=!1}}_toggleClass(e,r){(e=e.trim()).length>0&&e.split(UA).forEach(a=>{r?this._renderer.addClass(this._ngEl.nativeElement,a):this._renderer.removeClass(this._ngEl.nativeElement,a)})}}ag.\u0275fac=function(e){return new(e||ag)(Rn(yu),Rn(Tc),Rn(ac),Rn(Zl))},ag.\u0275dir=Or({type:ag,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class Gm{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null}ngOnChanges(e){const{_viewContainerRef:r,ngComponentOutletNgModule:a,ngComponentOutletNgModuleFactory:A}=this;if(r.clear(),this._componentRef=void 0,this.ngComponentOutlet){const O=this.ngComponentOutletInjector||r.parentInjector;(e.ngComponentOutletNgModule||e.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=a?function ML(t,e){return new y4(t,e??null)}(a,Hx(O)):A?A.create(Hx(O)):void 0),this._componentRef=r.createComponent(this.ngComponentOutlet,{index:r.length,injector:O,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function Hx(t){return t.get(qp).injector}Gm.\u0275fac=function(e){return new(e||Gm)(Rn(pu))},Gm.\u0275dir=Or({type:Gm,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[is]});class cF{constructor(e,r,a,A){this.$implicit=e,this.ngForOf=r,this.index=a,this.count=A}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class cg{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,r,a){this._viewContainer=e,this._template=r,this._differs=a,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const r=this._viewContainer;e.forEachOperation((a,A,O)=>{if(null==a.previousIndex)r.createEmbeddedView(this._template,new cF(a.item,this._ngForOf,-1,-1),null===O?void 0:O);else if(null==O)r.remove(null===A?void 0:A);else if(null!==A){const J=r.get(A);r.move(J,O),Gx(J,a)}});for(let a=0,A=r.length;a{Gx(r.get(a.currentIndex),a)})}static ngTemplateContextGuard(e,r){return!0}}function Gx(t,e){t.context.$implicit=e.item}cg.\u0275fac=function(e){return new(e||cg)(Rn(pu),Rn(Zu),Rn(yu))},cg.\u0275dir=Or({type:cg,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class nf{constructor(e,r){this._viewContainer=e,this._context=new lF,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Zx("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Zx("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,r){return!0}}nf.\u0275fac=function(e){return new(e||nf)(Rn(pu),Rn(Zu))},nf.\u0275dir=Or({type:nf,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class lF{constructor(){this.$implicit=null,this.ngIf=null}}function Zx(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Ir(e)}'.`)}class KA{constructor(e,r){this._viewContainerRef=e,this._templateRef=r,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class Mh{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const r=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||r,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),r}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const r of this._defaultViews)r.enforceState(e)}}}Mh.\u0275fac=function(e){return new(e||Mh)},Mh.\u0275dir=Or({type:Mh,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class Zm{constructor(e,r,a){this.ngSwitch=a,a._addCase(),this._view=new KA(e,r)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}Zm.\u0275fac=function(e){return new(e||Zm)(Rn(pu),Rn(Zu),Rn(Mh,9))},Zm.\u0275dir=Or({type:Zm,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class Jm{constructor(e,r,a){a._addDefault(new KA(e,r))}}Jm.\u0275fac=function(e){return new(e||Jm)(Rn(pu),Rn(Zu),Rn(Mh,9))},Jm.\u0275dir=Or({type:Jm,selectors:[["","ngSwitchDefault",""]],standalone:!0});class ug{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,r){this._caseViews[e]=r}_updateView(e){this._clearViews();const a=zx(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[a])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}}ug.\u0275fac=function(e){return new(e||ug)(Rn(xh))},ug.\u0275dir=Or({type:ug,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class Ym{constructor(e,r,a,A){this.value=e;const O=!isNaN(Number(e));A.addCase(O?`=${e}`:e,new KA(a,r))}}Ym.\u0275fac=function(e){return new(e||Ym)(op("ngPluralCase"),Rn(Zu),Rn(pu),Rn(ug,1))},Ym.\u0275dir=Or({type:Ym,selectors:[["","ngPluralCase",""]],standalone:!0});class $m{constructor(e,r,a){this._ngEl=e,this._differs=r,this._renderer=a,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,r){const[a,A]=e.split("."),O=-1===a.indexOf("-")?void 0:da.DashCase;null!=r?this._renderer.setStyle(this._ngEl.nativeElement,a,A?`${r}${A}`:r,O):this._renderer.removeStyle(this._ngEl.nativeElement,a,O)}_applyChanges(e){e.forEachRemovedItem(r=>this._setStyle(r.key,null)),e.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),e.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}}$m.\u0275fac=function(e){return new(e||$m)(Rn(ac),Rn(Tc),Rn(Zl))},$m.\u0275dir=Or({type:$m,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class Qm{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:a,ngTemplateOutletContext:A,ngTemplateOutletInjector:O}=this;this._viewRef=r.createEmbeddedView(a,A,O?{injector:O}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}Qm.\u0275fac=function(e){return new(e||Qm)(Rn(pu))},Qm.\u0275dir=Or({type:Qm,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[is]});function vu(t,e){return new Tn(2100,!1)}const hF=new class dF{createSubscription(e,r){return e.then(r,a=>{throw a})}dispose(e){}},pF=new class fF{createSubscription(e,r){return e.subscribe({next:r,error:a=>{throw a}})}dispose(e){e.unsubscribe()}};class Ih{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,r=>this._updateLatestValue(e,r))}_selectStrategy(e){if(Ib(e))return hF;if($8(e))return pF;throw vu()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,r){e===this._obj&&(this._latestValue=r,this._ref.markForCheck())}}Ih.\u0275fac=function(e){return new(e||Ih)(Rn(SA,16))},Ih.\u0275pipe=_s({name:"async",type:Ih,pure:!1,standalone:!0});class Ch{transform(e){if(null==e)return null;if("string"!=typeof e)throw vu();return e.toLowerCase()}}Ch.\u0275fac=function(e){return new(e||Ch)},Ch.\u0275pipe=_s({name:"lowercase",type:Ch,pure:!0,standalone:!0});const gF=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Dh{transform(e){if(null==e)return null;if("string"!=typeof e)throw vu();return e.replace(gF,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}}Dh.\u0275fac=function(e){return new(e||Dh)},Dh.\u0275pipe=_s({name:"titlecase",type:Dh,pure:!0,standalone:!0});class Th{transform(e){if(null==e)return null;if("string"!=typeof e)throw vu();return e.toUpperCase()}}Th.\u0275fac=function(e){return new(e||Th)},Th.\u0275pipe=_s({name:"uppercase",type:Th,pure:!0,standalone:!0});const mF=new Cr("DATE_PIPE_DEFAULT_TIMEZONE"),vF=new Cr("DATE_PIPE_DEFAULT_OPTIONS");class Oh{constructor(e,r,a){this.locale=e,this.defaultTimezone=r,this.defaultOptions=a}transform(e,r,a,A){if(null==e||""===e||e!=e)return null;try{const O=r??this.defaultOptions?.dateFormat??"mediumDate",J=a??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return Uj(e,O,A||this.locale,J)}catch(O){throw vu(0,O.message)}}}Oh.\u0275fac=function(e){return new(e||Oh)(Rn(Xl,16),Rn(mF,24),Rn(vF,24))},Oh.\u0275pipe=_s({name:"date",type:Oh,pure:!0,standalone:!0});const bF=/#/g;class Nh{constructor(e){this._localization=e}transform(e,r,a){if(null==e)return"";if("object"!=typeof r||null===r)throw vu();return r[zx(e,Object.keys(r),this._localization,a)].replace(bF,e.toString())}}Nh.\u0275fac=function(e){return new(e||Nh)(Rn(xh,16))},Nh.\u0275pipe=_s({name:"i18nPlural",type:Nh,pure:!0,standalone:!0});class Ph{transform(e,r){if(null==e)return"";if("object"!=typeof r||"string"!=typeof e)throw vu();return r.hasOwnProperty(e)?r[e]:r.hasOwnProperty("other")?r.other:""}}Ph.\u0275fac=function(e){return new(e||Ph)},Ph.\u0275pipe=_s({name:"i18nSelect",type:Ph,pure:!0,standalone:!0});class Xm{transform(e){return JSON.stringify(e,null,2)}}Xm.\u0275fac=function(e){return new(e||Xm)},Xm.\u0275pipe=_s({name:"json",type:Xm,pure:!1,standalone:!0});class qm{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=Jx}transform(e,r=Jx){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const a=this.differ.diff(e),A=r!==this.compareFn;return a&&(this.keyValues=[],a.forEachItem(O=>{this.keyValues.push(function wF(t,e){return{key:t,value:e}}(O.key,O.currentValue))})),(a||A)&&(this.keyValues.sort(r),this.compareFn=r),this.keyValues}}function Jx(t,e){const r=t.key,a=e.key;if(r===a)return 0;if(void 0===r)return 1;if(void 0===a)return-1;if(null===r)return 1;if(null===a)return-1;if("string"==typeof r&&"string"==typeof a)return rnew xF(mr(So),window)});class xF{constructor(e,r){this.document=e,this.window=r,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const r=function MF(t,e){const r=t.getElementById(e)||t.getElementsByName(e)[0];if(r)return r;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const a=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let A=a.currentNode;for(;A;){const O=A.shadowRoot;if(O){const J=O.getElementById(e)||O.querySelector(`[name="${e}"]`);if(J)return J}A=a.nextNode()}}return null}(this.document,e);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const r=this.window.history;r&&r.scrollRestoration&&(r.scrollRestoration=e)}}scrollToElement(e){const r=e.getBoundingClientRect(),a=r.left+this.window.pageXOffset,A=r.top+this.window.pageYOffset,O=this.offset();this.window.scrollTo(a-O[0],A-O[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=Qx(this.window.history)||Qx(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function Qx(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}function qb(t,e){return HA(t)?new URL(t):new URL(t,e.location.href)}function HA(t){return/^https?:\/\//.test(t)}function Xx(t){return HA(t)?new URL(t).hostname:t}function TF(t){return t.startsWith("/")?t.slice(1):t}const ev=t=>t.src,qx=new Cr("ImageLoader",{providedIn:"root",factory:()=>ev});function ew(t,e){return function(a){return function CF(t){if("string"!=typeof t||""===t.trim())return!1;try{return new URL(t),!0}catch{return!1}}(a)||function OF(t,e){throw new Tn(2959,!1)}(),a=function DF(t){return t.endsWith("/")?t.slice(0,-1):t}(a),[{provide:qx,useValue:J=>(HA(J.src)&&function NF(t,e){throw new Tn(2959,!1)}(0,J.src),t(a,{...J,src:TF(J.src)}))}]}}ew(function PF(t,e){let r="format=auto";return e.width&&(r+=`,width=${e.width}`),`${t}/cdn-cgi/image/${r}/${e.src}`});ew(function BF(t,e){let r="f_auto,q_auto";return e.width&&(r+=`,w_${e.width}`),`${t}/image/upload/${r}/${e.src}`});ew(function KF(t,e){const{src:r,width:a}=e;let A;if(a){A=[t,`tr:w-${a}`,r]}else A=[t,r];return A.join("/")});ew(function WF(t,e){const r=new URL(`${t}/${e.src}`);return r.searchParams.set("auto","format"),e.width&&r.searchParams.set("w",e.width.toString()),r.href});function Lo(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function eM(t){throw new Tn(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class tv{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,eM("LCP checker");const e=jo(So).defaultView;typeof e<"u"&&typeof PerformanceObserver<"u"&&(this.window=e,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(r=>{const a=r.getEntries();if(0===a.length)return;const O=a[a.length-1].element?.src??"";O.startsWith("data:")||O.startsWith("blob:")||this.images.get(O)&&!this.alreadyWarned.has(O)&&(this.alreadyWarned.add(O),function GF(t){const e=Lo(t);console.warn(vo(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(O))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,r){this.observer&&this.images.set(qb(e,this.window).href,r)}unregisterImage(e){this.observer&&this.images.delete(qb(e,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}tv.\u0275fac=function(e){return new(e||tv)},tv.\u0275prov=Tr({token:tv,factory:tv.\u0275fac,providedIn:"root"});const ZF=new Set(["localhost","127.0.0.1","0.0.0.0"]),JF=new Cr("PRECONNECT_CHECK_BLOCKLIST");class nv{constructor(){this.document=jo(So),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(ZF),eM("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const r=jo(JF,{optional:!0});r&&this.populateBlocklist(r)}populateBlocklist(e){Array.isArray(e)?tM(e,r=>{this.blocklist.add(Xx(r))}):this.blocklist.add(Xx(e))}assertPreconnect(e,r){if(!this.window)return;const a=qb(e,this.window);this.blocklist.has(a.hostname)||this.alreadySeen.has(a.origin)||(this.alreadySeen.add(a.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(a.origin)||console.warn(vo(2956,`${Lo(r)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,a=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let A of a){const O=qb(A.href,this.window);e.add(O.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function tM(t,e){for(let r of t)Array.isArray(r)?tM(r,e):e(r)}nv.\u0275fac=function(e){return new(e||nv)},nv.\u0275prov=Tr({token:nv,factory:nv.\u0275fac,providedIn:"root"});const YF=new Cr("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class fg{constructor(){this.preloadedImages=jo(YF),this.document=jo(So)}createPreloadLinkTag(e,r,a,A){if(this.preloadedImages.has(r))return;this.preloadedImages.add(r);const O=e.createElement("link");e.setAttribute(O,"as","image"),e.setAttribute(O,"href",r),e.setAttribute(O,"rel","preload"),e.setAttribute(O,"fetchpriority","high"),A&&e.setAttribute(O,"imageSizes",A),a&&e.setAttribute(O,"imageSrcset",a),e.appendChild(this.document.head,O)}}fg.\u0275fac=function(e){return new(e||fg)},fg.\u0275prov=Tr({token:fg,factory:fg.\u0275fac,providedIn:"root"});const rM=/^((\s*\d+w\s*(,|$)){1,})$/,QF=[1,2],sM={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},nU=new Cr("ImageConfig",{providedIn:"root",factory:()=>sM});class tw{constructor(){this.imageLoader=jo(qx),this.config=function rU(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((r,a)=>r-a)),Object.assign({},sM,t,e)}(jo(nU)),this.renderer=jo(Zl),this.imgElement=jo(ac).nativeElement,this.injector=jo(Vs),this.isServer=function SF(t){return t===EF}(jo(mA)),this.preloadLinkChecker=jo(fg),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(e){this._width=aM(e)}get width(){return this._width}set height(e){this._height=aM(e)}get height(){return this._height}set priority(e){this._priority=GA(e)}get priority(){return this._priority}set disableOptimizedSrcset(e){this._disableOptimizedSrcset=GA(e)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(e){this._fill=GA(e)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.getRewrittenSrc();let r;this.setHostAttribute("src",e),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?r=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(r=this.getAutomaticSrcset()),r&&this.setHostAttribute("srcset",r),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,e,r,this.sizes)}ngOnChanges(e){}callImageLoader(e){let r=e;return this.loaderParams&&(r.loaderParams=this.loaderParams),this.imageLoader(r)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=rM.test(this.ngSrcset);return this.ngSrcset.split(",").filter(a=>""!==a).map(a=>{a=a.trim();const A=e?parseFloat(a):parseFloat(a)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:A})} ${a}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let r=e;return"100vw"===this.sizes?.trim()&&(r=e.filter(A=>A>=640)),r.map(A=>`${this.callImageLoader({src:this.ngSrc,width:A})} ${A}w`).join(", ")}getFixedSrcset(){return QF.map(r=>`${this.callImageLoader({src:this.ngSrc,width:this.width*r})} ${r}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==ev&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(e,r){this.renderer.setAttribute(this.imgElement,e,r)}}function aM(t){return"string"==typeof t?parseInt(t,10):t}function GA(t){return null!=t&&"false"!=`${t}`}tw.\u0275fac=function(e){return new(e||tw)},tw.\u0275dir=Or({type:tw,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(e,r){2&e&&JE("position",r.fill?"absolute":null)("width",r.fill?"100%":null)("height",r.fill?"100%":null)("inset",r.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[is]});class aU extends wj{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class ZA extends aU{static makeCurrent(){!function bj(t){TA||(TA=t)}(new ZA)}onAndCancel(e,r,a){return e.addEventListener(r,a,!1),()=>{e.removeEventListener(r,a,!1)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return(r=r||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,r){return"window"===r?window:"document"===r?e:"body"===r?e.body:null}getBaseHref(e){const r=function cU(){return iv=iv||document.querySelector("base"),iv?iv.getAttribute("href"):null}();return null==r?null:function uU(t){nw=nw||document.createElement("a"),nw.setAttribute("href",t);const e=nw.pathname;return"/"===e.charAt(0)?e:`/${e}`}(r)}resetBaseElement(){iv=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function aF(t,e){e=encodeURIComponent(e);for(const r of t.split(";")){const a=r.indexOf("="),[A,O]=-1==a?[r,""]:[r.slice(0,a),r.slice(a+1)];if(A.trim()===e)return decodeURIComponent(O)}return null}(document.cookie,e)}}let nw,iv=null;const cM=new Cr("TRANSITION_ID");const fU=[{provide:rx,useFactory:function lU(t,e,r){return()=>{r.get(Ql).donePromise.then(()=>{const a=Ju(),A=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let O=0;O{a.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,a){return this._findPluginFor(r).addEventListener(e,r,a)}addGlobalEventListener(e,r,a){return this._findPluginFor(r).addGlobalEventListener(e,r,a)}getZone(){return this._zone}_findPluginFor(e){const r=this._eventNameToPlugin.get(e);if(r)return r;const a=this._plugins;for(let A=0;A0?a.set(e,A):a.delete(e),A}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}jh.\u0275fac=function(e){return new(e||jh)},jh.\u0275prov=Tr({token:jh,factory:jh.\u0275fac});class Qu extends jh{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const r of this.hostNodes)this.addStyleToHost(r,e)}onStyleRemoved(e){const r=this.styleRef;r.get(e)?.forEach(A=>A.remove()),r.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const r of this.getAllStyles())this.addStyleToHost(e,r)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,r){const a=this.doc.createElement("style");a.textContent=r,e.appendChild(a);const A=this.styleRef.get(r);A?A.push(a):this.styleRef.set(r,[a])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}Qu.\u0275fac=function(e){return new(e||Qu)(mr(So))},Qu.\u0275prov=Tr({token:Qu,factory:Qu.\u0275fac});const YA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},$A=/%COMP%/g,hU="_nghost-%COMP%",pU="_ngcontent-%COMP%",fM=new Cr("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function dM(t,e){return e.flat(100).map(r=>r.replace($A,t))}function hM(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class ad{constructor(e,r,a,A){this.eventManager=e,this.sharedStylesHost=r,this.appId=a,this.removeStylesOnCompDestory=A,this.rendererByCompId=new Map,this.defaultRenderer=new QA(e)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;const a=this.getOrCreateRenderer(e,r);return a instanceof yM?a.applyToHost(e):a instanceof XA&&a.applyStyles(),a}getOrCreateRenderer(e,r){const a=this.rendererByCompId;let A=a.get(r.id);if(!A){const O=this.eventManager,J=this.sharedStylesHost,ee=this.removeStylesOnCompDestory;switch(r.encapsulation){case yc.Emulated:A=new yM(O,J,r,this.appId,ee);break;case yc.ShadowDom:return new bU(O,J,e,r);default:A=new XA(O,J,r,ee)}A.onDestroy=()=>a.delete(r.id),a.set(r.id,A)}return A}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}ad.\u0275fac=function(e){return new(e||ad)(mr(rf),mr(Qu),mr(ng),mr(fM))},ad.\u0275prov=Tr({token:ad,factory:ad.\u0275fac});class QA{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,r){return r?document.createElementNS(YA[r]||r,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,r){(gM(e)?e.content:e).appendChild(r)}insertBefore(e,r,a){e&&(gM(e)?e.content:e).insertBefore(r,a)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error(`The selector "${e}" did not match any elements`);return r||(a.textContent=""),a}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,a,A){if(A){r=A+":"+r;const O=YA[A];O?e.setAttributeNS(O,r,a):e.setAttribute(r,a)}else e.setAttribute(r,a)}removeAttribute(e,r,a){if(a){const A=YA[a];A?e.removeAttributeNS(A,r):e.removeAttribute(`${a}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,a,A){A&(da.DashCase|da.Important)?e.style.setProperty(r,a,A&da.Important?"important":""):e.style[r]=a}removeStyle(e,r,a){a&da.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,a){e[r]=a}setValue(e,r){e.nodeValue=r}listen(e,r,a){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,r,hM(a)):this.eventManager.addEventListener(e,r,hM(a))}}"@".charCodeAt(0);function gM(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class bU extends QA{constructor(e,r,a,A){super(e),this.sharedStylesHost=r,this.hostEl=a,this.shadowRoot=a.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const O=dM(A.id,A.styles);for(const J of O){const ee=document.createElement("style");ee.textContent=J,this.shadowRoot.appendChild(ee)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,a){return super.insertBefore(this.nodeOrShadowRoot(e),r,a)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class XA extends QA{constructor(e,r,a,A,O=a.id){super(e),this.sharedStylesHost=r,this.removeStylesOnCompDestory=A,this.rendererUsageCount=0,this.styles=dM(O,a.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class yM extends XA{constructor(e,r,a,A,O){const J=A+"-"+a.id;super(e,r,a,O,J),this.contentAttr=function yU(t){return pU.replace($A,t)}(J),this.hostAttr=function mU(t){return hU.replace($A,t)}(J)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){const a=super.createElement(e,r);return super.setAttribute(a,this.contentAttr,""),a}}class hg extends JA{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,a){return e.addEventListener(r,a,!1),()=>this.removeEventListener(e,r,a)}removeEventListener(e,r,a){return e.removeEventListener(r,a)}}hg.\u0275fac=function(e){return new(e||hg)(mr(So))},hg.\u0275prov=Tr({token:hg,factory:hg.\u0275fac});const mM=["alt","control","meta","shift"],wU={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},EU={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Pc extends JA{constructor(e){super(e)}supports(e){return null!=Pc.parseEventName(e)}addEventListener(e,r,a){const A=Pc.parseEventName(r),O=Pc.eventCallback(A.fullKey,a,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Ju().onAndCancel(e,A.domEventName,O))}static parseEventName(e){const r=e.toLowerCase().split("."),a=r.shift();if(0===r.length||"keydown"!==a&&"keyup"!==a)return null;const A=Pc._normalizeKey(r.pop());let O="",J=r.indexOf("code");if(J>-1&&(r.splice(J,1),O="code."),mM.forEach(ie=>{const oe=r.indexOf(ie);oe>-1&&(r.splice(oe,1),O+=ie+".")}),O+=A,0!=r.length||0===A.length)return null;const ee={};return ee.domEventName=a,ee.fullKey=O,ee}static matchEventFullKeyCode(e,r){let a=wU[e.key]||e.key,A="";return r.indexOf("code.")>-1&&(a=e.code,A="code."),!(null==a||!a)&&(a=a.toLowerCase()," "===a?a="space":"."===a&&(a="dot"),mM.forEach(O=>{if(O!==a){(0,EU[O])(e)&&(A+=O+".")}}),A+=a,A===r)}static eventCallback(e,r,a){return A=>{Pc.matchEventFullKeyCode(A,e)&&a.runGuarded(()=>r(A))}}static _normalizeKey(e){return"esc"===e?"escape":e}}Pc.\u0275fac=function(e){return new(e||Pc)(mr(So))},Pc.\u0275prov=Tr({token:Pc,factory:Pc.\u0275fac});const bM=[{provide:mA,useValue:Yx},{provide:ox,useValue:function AU(){ZA.makeCurrent()},multi:!0},{provide:So,useFactory:function SU(){return function ar(t){Nn=t}(document),document},deps:[]}],xU=px(mj,"browser",bM),wM=new Cr(""),EM=[{provide:Ub,useClass:class dU{addToWindow(e){Ri.getAngularTestability=(a,A=!0)=>{const O=e.findTestabilityInTree(a,A);if(null==O)throw new Error("Could not find testability for element.");return O},Ri.getAllAngularTestabilities=()=>e.getAllTestabilities(),Ri.getAllAngularRootElements=()=>e.getAllRootElements();Ri.frameworkStabilizers||(Ri.frameworkStabilizers=[]),Ri.frameworkStabilizers.push(a=>{const A=Ri.getAllAngularTestabilities();let O=A.length,J=!1;const ee=function(ie){J=J||ie,O--,0==O&&a(J)};A.forEach(function(ie){ie.whenStable(ee)})})}findTestabilityInTree(e,r,a){if(null==r)return null;return e.getTestability(r)??(a?Ju().isShadowRoot(r)?this.findTestabilityInTree(e,r.host,!0):this.findTestabilityInTree(e,r.parentElement,!0):null)}},deps:[]},{provide:fx,useClass:nd,deps:[Ws,rd,Ub]},{provide:nd,useClass:nd,deps:[Ws,rd,Ub]}],AM=[{provide:mE,useValue:"root"},{provide:Lp,useFactory:function _U(){return new Lp},deps:[]},{provide:ov,useClass:hg,multi:!0,deps:[So,Ws,mA]},{provide:ov,useClass:Pc,multi:!0,deps:[So]},{provide:ad,useClass:ad,deps:[rf,Qu,ng,fM]},{provide:n8,useExisting:ad},{provide:jh,useExisting:Qu},{provide:Qu,useClass:Qu,deps:[So]},{provide:rf,useClass:rf,deps:[ov,Ws]},{provide:class IF{},useClass:dg,deps:[]},[]];class cd{constructor(e){false}static withServerTransition(e){return{ngModule:cd,providers:[{provide:ng,useValue:e.appId},{provide:cM,useExisting:ng},fU]}}}cd.\u0275fac=function(e){return new(e||cd)(mr(wM,12))},cd.\u0275mod=Ca({type:cd}),cd.\u0275inj=Ma({providers:[...AM,...EM],imports:[lg,rg]});class sv{constructor(e){this._doc=e,this._dom=Ju()}addTag(e,r=!1){return e?this._getOrCreateElement(e,r):null}addTags(e,r=!1){return e?e.reduce((a,A)=>(A&&a.push(this._getOrCreateElement(A,r)),a),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const r=this._doc.querySelectorAll(`meta[${e}]`);return r?[].slice.call(r):[]}updateTag(e,r){if(!e)return null;r=r||this._parseSelector(e);const a=this.getTag(r);return a?this._setMetaElementAttributes(e,a):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,r=!1){if(!r){const O=this._parseSelector(e),J=this.getTags(O).filter(ee=>this._containsAttributes(e,ee))[0];if(void 0!==J)return J}const a=this._dom.createElement("meta");return this._setMetaElementAttributes(e,a),this._doc.getElementsByTagName("head")[0].appendChild(a),a}_setMetaElementAttributes(e,r){return Object.keys(e).forEach(a=>r.setAttribute(this._getMetaKeyMap(a),e[a])),r}_parseSelector(e){const r=e.name?"name":"property";return`${r}="${e[r]}"`}_containsAttributes(e,r){return Object.keys(e).every(a=>r.getAttribute(this._getMetaKeyMap(a))===e[a])}_getMetaKeyMap(e){return IU[e]||e}}sv.\u0275fac=function(e){return new(e||sv)(mr(So))},sv.\u0275prov=Tr({token:sv,factory:function(e){let r=null;return r=e?new e:function MU(){return new sv(mr(So))}(),r},providedIn:"root"});const IU={httpEquiv:"http-equiv"};class av{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}av.\u0275fac=function(e){return new(e||av)(mr(So))},av.\u0275prov=Tr({token:av,factory:function(e){let r=null;return r=e?new e:function CU(){return new av(mr(So))}(),r},providedIn:"root"});typeof window<"u"&&window;class cv{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function NU(t,e){const r=t.getElementById(e+"-state");let a={};if(r&&r.textContent)try{a=JSON.parse(function OU(t){const e={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return t.replace(/&[^;]+;/g,r=>e[r])}(r.textContent))}catch(A){console.warn("Exception while restoring TransferState for app "+e,A)}return a}(jo(So),jo(ng))}get(e,r){return void 0!==this.store[e]?this.store[e]:r}set(e,r){this.store[e]=r}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,r){this.onSerializeCallbacks[e]=r}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(r){console.warn("Exception in onSerialize callback: ",r)}return JSON.stringify(this.store)}}cv.\u0275fac=function(e){return new(e||cv)},cv.\u0275prov=Tr({token:cv,factory:cv.\u0275fac,providedIn:"root"});class uv{}uv.\u0275fac=function(e){return new(e||uv)},uv.\u0275mod=Ca({type:uv}),uv.\u0275inj=Ma({});const RU={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},t3=new Cr("HammerGestureConfig"),xM=new Cr("HammerLoader");class pg{constructor(){this.events=[],this.overrides={}}buildHammer(e){const r=new Hammer(e,this.options);r.get("pinch").set({enable:!0}),r.get("rotate").set({enable:!0});for(const a in this.overrides)r.get(a).set(this.overrides[a]);return r}}pg.\u0275fac=function(e){return new(e||pg)},pg.\u0275prov=Tr({token:pg,factory:pg.\u0275fac});class gg extends JA{constructor(e,r,a,A){super(e),this._config=r,this.console=a,this.loader=A,this._loaderPromise=null}supports(e){return!(!RU.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,r,a){const A=this.manager.getZone();if(r=r.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||A.runOutsideAngular(()=>this.loader());let O=!1,J=()=>{O=!0};return A.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?O||(J=this.addEventListener(e,r,a)):J=()=>{}}).catch(()=>{J=()=>{}})),()=>{J()}}return A.runOutsideAngular(()=>{const O=this._config.buildHammer(e),J=function(ee){A.runGuarded(function(){a(ee)})};return O.on(r,J),()=>{O.off(r,J),"function"==typeof O.destroy&&O.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}gg.\u0275fac=function(e){return new(e||gg)(mr(So),mr(t3),mr(wh),mr(xM,8))},gg.\u0275prov=Tr({token:gg,factory:gg.\u0275fac});class lv{}lv.\u0275fac=function(e){return new(e||lv)},lv.\u0275mod=Ca({type:lv}),lv.\u0275inj=Ma({providers:[{provide:ov,useClass:gg,multi:!0,deps:[So,t3,wh,[new Zf,xM]]},{provide:t3,useClass:pg,deps:[]}]});class yg{}yg.\u0275fac=function(e){return new(e||yg)},yg.\u0275prov=Tr({token:yg,factory:function(e){let r=null;return r=e?new(e||yg):mr(mg),r},providedIn:"root"});class mg extends yg{constructor(e){super(),this._doc=e}sanitize(e,r){if(null==r)return null;switch(e){case sc.NONE:return r;case sc.HTML:return zu(r,"HTML")?oc(r):KS(this._doc,String(r)).toString();case sc.STYLE:return zu(r,"Style")?oc(r):r;case sc.SCRIPT:if(zu(r,"Script"))return oc(r);throw new Error("unsafe value used in a script context");case sc.URL:return zu(r,"URL")?oc(r):fb(String(r));case sc.RESOURCE_URL:if(zu(r,"ResourceURL"))return oc(r);throw new Error(`unsafe value used in a resource URL context (see ${Sa})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Sa})`)}}bypassSecurityTrustHtml(e){return function tN(t){return new YO(t)}(e)}bypassSecurityTrustStyle(e){return function nN(t){return new $O(t)}(e)}bypassSecurityTrustScript(e){return function rN(t){return new QO(t)}(e)}bypassSecurityTrustUrl(e){return function iN(t){return new XO(t)}(e)}bypassSecurityTrustResourceUrl(e){return function oN(t){return new qO(t)}(e)}}mg.\u0275fac=function(e){return new(e||mg)(mr(So))},mg.\u0275prov=Tr({token:mg,factory:function(e){let r=null;return r=e?new e:function kU(t){return new mg(t.get(So))}(mr(Vs)),r},providedIn:"root"});new yb("15.2.9");const{isArray:LU}=Array,{getPrototypeOf:BU,prototype:jU,keys:FU}=Object;function UU(t){if(1===t.length){const e=t[0];if(LU(e))return{args:e,keys:null};if(function KU(t){return t&&"object"==typeof t&&BU(t)===jU}(e)){const r=FU(e);return{args:r.map(a=>e[a]),keys:r}}}return{args:t,keys:null}}const{isArray:zU}=Array;function HU(t){return dr(e=>function VU(t,e){return zU(e)?t(...e):t(e)}(t,e))}function WU(t,e){return t.reduce((r,a,A)=>(r[a]=e[A],r),{})}function GU(...t){const e=function Fd(t){return pe(ea(t))?t.pop():void 0}(t),{args:r,keys:a}=UU(t),A=new pt(O=>{const{length:J}=r;if(!J)return void O.complete();const ee=new Array(J);let ie=J,oe=J;for(let de=0;de{be||(be=!0,oe--),ee[de]=Ee},()=>ie--,void 0,()=>{(!ie||!be)&&(oe||O.next(a?WU(a,ee):ee),O.complete())}))}});return e?A.pipe(HU(e)):A}class vg{constructor(e,r){this._renderer=e,this._elementRef=r,this.onChange=a=>{},this.onTouched=()=>{}}setProperty(e,r){this._renderer.setProperty(this._elementRef.nativeElement,e,r)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}vg.\u0275fac=function(e){return new(e||vg)(Rn(Zl),Rn(ac))},vg.\u0275dir=Or({type:vg});class Rc extends vg{}Rc.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Rc)))(r||Rc)}}(),Rc.\u0275dir=Or({type:Rc,features:[_i]});const Xu=new Cr("NgValueAccessor"),ZU={provide:Xu,useExisting:Zr(()=>Fh),multi:!0};class Fh extends Rc{writeValue(e){this.setProperty("checked",e)}}Fh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Fh)))(r||Fh)}}(),Fh.\u0275dir=Or({type:Fh,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,r){1&e&&Zo("change",function(A){return r.onChange(A.target.checked)})("blur",function(){return r.onTouched()})},features:[_o([ZU]),_i]});const JU={provide:Xu,useExisting:Zr(()=>Uh),multi:!0};const $U=new Cr("CompositionEventMode");class Uh extends vg{constructor(e,r,a){super(e,r),this._compositionMode=a,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function YU(){const t=Ju()?Ju().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const r=e??"";this.setProperty("value",r)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}Uh.\u0275fac=function(e){return new(e||Uh)(Rn(Zl),Rn(ac),Rn($U,8))},Uh.\u0275dir=Or({type:Uh,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,r){1&e&&Zo("input",function(A){return r._handleInput(A.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(A){return r._compositionEnd(A.target.value)})},features:[_o([JU]),_i]});const QU=!1;function ld(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function MM(t){return null!=t&&"number"==typeof t.length}const Zs=new Cr("NgValidators"),fd=new Cr("NgAsyncValidators"),XU=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function IM(t){return e=>{if(ld(e.value)||ld(t))return null;const r=parseFloat(e.value);return!isNaN(r)&&r{if(ld(e.value)||ld(t))return null;const r=parseFloat(e.value);return!isNaN(r)&&r>t?{max:{max:t,actual:e.value}}:null}}function DM(t){return ld(t.value)?{required:!0}:null}function TM(t){return!0===t.value?null:{required:!0}}function OM(t){return ld(t.value)||XU.test(t.value)?null:{email:!0}}function NM(t){return e=>ld(e.value)||!MM(e.value)?null:e.value.lengthMM(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function RM(t){if(!t)return rw;let e,r;return"string"==typeof t?(r="","^"!==t.charAt(0)&&(r+="^"),r+=t,"$"!==t.charAt(t.length-1)&&(r+="$"),e=new RegExp(r)):(r=t.toString(),e=t),a=>{if(ld(a.value))return null;const A=a.value;return e.test(A)?null:{pattern:{requiredPattern:r,actualValue:A}}}}function rw(t){return null}function kM(t){return null!=t}function LM(t){const e=Ib(t)?bi(t):t;if(QU&&!Q8(e)){let r="Expected async validator to return Promise or Observable.";throw"object"==typeof t&&(r+=" Are you using a synchronous validator where an async validator is expected?"),new Tn(-1101,r)}return e}function BM(t){let e={};return t.forEach(r=>{e=null!=r?{...e,...r}:e}),0===Object.keys(e).length?null:e}function jM(t,e){return e.map(r=>r(t))}function FM(t){return t.map(e=>function qU(t){return!t.validate}(e)?e:r=>e.validate(r))}function UM(t){if(!t)return null;const e=t.filter(kM);return 0==e.length?null:function(r){return BM(jM(r,e))}}function n3(t){return null!=t?UM(FM(t)):null}function KM(t){if(!t)return null;const e=t.filter(kM);return 0==e.length?null:function(r){return GU(jM(r,e).map(LM)).pipe(dr(BM))}}function r3(t){return null!=t?KM(FM(t)):null}function zM(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function VM(t){return t._rawValidators}function HM(t){return t._rawAsyncValidators}function i3(t){return t?Array.isArray(t)?t:[t]:[]}function iw(t,e){return Array.isArray(t)?t.includes(e):t===e}function WM(t,e){const r=i3(e);return i3(t).forEach(A=>{iw(r,A)||r.push(A)}),r}function GM(t,e){return i3(e).filter(r=>!iw(t,r))}class ZM{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=n3(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=r3(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,r){return!!this.control&&this.control.hasError(e,r)}getError(e,r){return this.control?this.control.getError(e,r):null}}class ya extends ZM{get formDirective(){return null}get path(){return null}}class dd extends ZM{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class JM{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class fv extends JM{constructor(e){super(e)}}fv.\u0275fac=function(e){return new(e||fv)(Rn(dd,2))},fv.\u0275dir=Or({type:fv,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,r){2&e&&Db("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[_i]});class bg extends JM{constructor(e){super(e)}}bg.\u0275fac=function(e){return new(e||bg)(Rn(ya,10))},bg.\u0275dir=Or({type:bg,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,r){2&e&&Db("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[_i]});function YM(t,e){return t?`with name: '${e}'`:`at index: ${e}`}const a3=!1,dv="VALID",sw="INVALID",wg="PENDING",hv="DISABLED";function c3(t){return(aw(t)?t.validators:t)||null}function u3(t,e){return(aw(e)?e.asyncValidators:t)||null}function aw(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function $M(t,e,r){const a=t.controls;if(!(e?Object.keys(a):a).length)throw new Tn(1e3,a3?function rK(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!a[r])throw new Tn(1001,a3?function iK(t,e){return`Cannot find form control ${YM(t,e)}`}(e,r):"")}function QM(t,e,r){t._forEachChild((a,A)=>{if(void 0===r[A])throw new Tn(1002,a3?function oK(t,e){return`Must supply a value for form control ${YM(t,e)}`}(e,A):"")})}class cw{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===dv}get invalid(){return this.status===sw}get pending(){return this.status==wg}get disabled(){return this.status===hv}get enabled(){return this.status!==hv}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(WM(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(WM(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(GM(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(GM(e,this._rawAsyncValidators))}hasValidator(e){return iw(this._rawValidators,e)}hasAsyncValidator(e){return iw(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(r=>{r.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=wg,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const r=this._parentMarkedDirty(e.onlySelf);this.status=hv,this.errors=null,this._forEachChild(a=>{a.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:r}),this._onDisabledChange.forEach(a=>a(!0))}enable(e={}){const r=this._parentMarkedDirty(e.onlySelf);this.status=dv,this._forEachChild(a=>{a.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:r}),this._onDisabledChange.forEach(a=>a(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===dv||this.status===wg)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?hv:dv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=wg,this._hasOwnPendingAsyncValidator=!0;const r=LM(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(a=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(a,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(!1!==r.emitEvent)}get(e){let r=e;return null==r||(Array.isArray(r)||(r=r.split(".")),0===r.length)?null:r.reduce((a,A)=>a&&a._find(A),this)}getError(e,r){const a=r?this.get(r):this;return a&&a.errors?a.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new ms,this.statusChanges=new ms}_calculateStatus(){return this._allControlsDisabled()?hv:this.errors?sw:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(wg)?wg:this._anyControlsHaveStatus(sw)?sw:dv}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){aw(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function sK(t){return Array.isArray(t)?n3(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function aK(t){return Array.isArray(t)?r3(t):t||null}(this._rawAsyncValidators)}}class pv extends cw{constructor(e,r,a){super(c3(r),u3(a,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,a={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:a.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,a={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:a.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){QM(this,!0,e),Object.keys(e).forEach(a=>{$M(this,!0,a),this.controls[a].setValue(e[a],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){null!=e&&(Object.keys(e).forEach(a=>{const A=this.controls[a];A&&A.patchValue(e[a],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((a,A)=>{a.reset(e[A],{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,a)=>(e[a]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,a)=>!!a._syncPendingControls()||r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{const a=this.controls[r];a&&e(a,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[r,a]of Object.entries(this.controls))if(this.contains(r)&&e(a))return!0;return!1}_reduceValue(){return this._reduceChildren({},(r,a,A)=>((a.enabled||this.disabled)&&(r[A]=a.value),r))}_reduceChildren(e,r){let a=e;return this._forEachChild((A,O)=>{a=r(a,A,O)}),a}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class XM extends pv{}const Kh=new Cr("CallSetDisabledState",{providedIn:"root",factory:()=>gv}),gv="always";function uw(t,e){return[...e.path,t]}function yv(t,e,r=gv){l3(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===r)&&e.valueAccessor.setDisabledState?.(t.disabled),function uK(t,e){e.valueAccessor.registerOnChange(r=>{t._pendingValue=r,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&qM(t,e)})}(t,e),function fK(t,e){const r=(a,A)=>{e.valueAccessor.writeValue(a),A&&e.viewToModelUpdate(a)};t.registerOnChange(r),e._registerOnDestroy(()=>{t._unregisterOnChange(r)})}(t,e),function lK(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&qM(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function cK(t,e){if(e.valueAccessor.setDisabledState){const r=a=>{e.valueAccessor.setDisabledState(a)};t.registerOnDisabledChange(r),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(r)})}}(t,e)}function lw(t,e,r=!0){const a=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(a),e.valueAccessor.registerOnTouched(a)),dw(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function fw(t,e){t.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function l3(t,e){const r=VM(t);null!==e.validator?t.setValidators(zM(r,e.validator)):"function"==typeof r&&t.setValidators([r]);const a=HM(t);null!==e.asyncValidator?t.setAsyncValidators(zM(a,e.asyncValidator)):"function"==typeof a&&t.setAsyncValidators([a]);const A=()=>t.updateValueAndValidity();fw(e._rawValidators,A),fw(e._rawAsyncValidators,A)}function dw(t,e){let r=!1;if(null!==t){if(null!==e.validator){const A=VM(t);if(Array.isArray(A)&&A.length>0){const O=A.filter(J=>J!==e.validator);O.length!==A.length&&(r=!0,t.setValidators(O))}}if(null!==e.asyncValidator){const A=HM(t);if(Array.isArray(A)&&A.length>0){const O=A.filter(J=>J!==e.asyncValidator);O.length!==A.length&&(r=!0,t.setAsyncValidators(O))}}}const a=()=>{};return fw(e._rawValidators,a),fw(e._rawAsyncValidators,a),r}function qM(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function eI(t,e){l3(t,e)}function d3(t,e){if(!t.hasOwnProperty("model"))return!1;const r=t.model;return!!r.isFirstChange()||!Object.is(e,r.currentValue)}function tI(t,e){t._syncPendingControls(),e.forEach(r=>{const a=r.control;"submit"===a.updateOn&&a._pendingChange&&(r.viewToModelUpdate(a._pendingValue),a._pendingChange=!1)})}function h3(t,e){if(!e)return null;let r,a,A;return Array.isArray(e),e.forEach(O=>{O.constructor===Uh?r=O:function pK(t){return Object.getPrototypeOf(t.constructor)===Rc}(O)?a=O:A=O}),A||a||r||null}const yK={provide:ya,useExisting:Zr(()=>hd)},mv=Promise.resolve();class hd extends ya{constructor(e,r,a){super(),this.callSetDisabledState=a,this.submitted=!1,this._directives=new Set,this.ngSubmit=new ms,this.form=new pv({},n3(e),r3(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){mv.then(()=>{const r=this._findContainer(e.path);e.control=r.registerControl(e.name,e.control),yv(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){mv.then(()=>{const r=this._findContainer(e.path);r&&r.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){mv.then(()=>{const r=this._findContainer(e.path),a=new pv({});eI(a,e),r.registerControl(e.name,a),a.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){mv.then(()=>{const r=this._findContainer(e.path);r&&r.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,r){mv.then(()=>{this.form.get(e.path).setValue(r)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,tI(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}function nI(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}function rI(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}hd.\u0275fac=function(e){return new(e||hd)(Rn(Zs,10),Rn(fd,10),Rn(Kh,8))},hd.\u0275dir=Or({type:hd,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,r){1&e&&Zo("submit",function(A){return r.onSubmit(A)})("reset",function(){return r.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_o([yK]),_i]});const vv=class extends cw{constructor(e=null,r,a){super(c3(r),u3(a,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),aw(r)&&(r.nonNullable||r.initialValueIsDefault)&&(rI(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==r.emitModelToViewChange&&this._onChange.forEach(a=>a(this.value,!1!==r.emitViewToModelChange)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){nI(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){nI(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){rI(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class zh extends ya{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return uw(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}zh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(zh)))(r||zh)}}(),zh.\u0275dir=Or({type:zh,features:[_i]});const vK={provide:ya,useExisting:Zr(()=>pd)};class pd extends zh{constructor(e,r,a){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(a)}_checkParentType(){!(this._parent instanceof pd)&&this._parent}}pd.\u0275fac=function(e){return new(e||pd)(Rn(ya,5),Rn(Zs,10),Rn(fd,10))},pd.\u0275dir=Or({type:pd,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[_o([vK]),_i]});const bK={provide:dd,useExisting:Zr(()=>Eg)},iI=Promise.resolve();class Eg extends dd{constructor(e,r,a,A,O,J){super(),this._changeDetectorRef=O,this.callSetDisabledState=J,this.control=new vv,this._registered=!1,this.update=new ms,this._parent=e,this._setValidators(r),this._setAsyncValidators(a),this.valueAccessor=h3(0,A)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const r=e.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),d3(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){yv(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){iI.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const r=e.isDisabled.currentValue,a=0!==r&&DA(r);iI.then(()=>{a&&!this.control.disabled?this.control.disable():!a&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?uw(e,this._parent):[e]}}Eg.\u0275fac=function(e){return new(e||Eg)(Rn(ya,9),Rn(Zs,10),Rn(fd,10),Rn(Xu,10),Rn(SA,8),Rn(Kh,8))},Eg.\u0275dir=Or({type:Eg,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[_o([bK]),_i,is]});class Ag{}Ag.\u0275fac=function(e){return new(e||Ag)},Ag.\u0275dir=Or({type:Ag,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const wK={provide:Xu,useExisting:Zr(()=>Vh),multi:!0};class Vh extends Rc{writeValue(e){const r=e??"";this.setProperty("value",r)}registerOnChange(e){this.onChange=r=>{e(""==r?null:parseFloat(r))}}}Vh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Vh)))(r||Vh)}}(),Vh.\u0275dir=Or({type:Vh,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,r){1&e&&Zo("input",function(A){return r.onChange(A.target.value)})("blur",function(){return r.onTouched()})},features:[_o([wK]),_i]});const EK={provide:Xu,useExisting:Zr(()=>Sg),multi:!0};class Hh{}Hh.\u0275fac=function(e){return new(e||Hh)},Hh.\u0275mod=Ca({type:Hh}),Hh.\u0275inj=Ma({});class _g{constructor(){this._accessors=[]}add(e,r){this._accessors.push([e,r])}remove(e){for(let r=this._accessors.length-1;r>=0;--r)if(this._accessors[r][1]===e)return void this._accessors.splice(r,1)}select(e){this._accessors.forEach(r=>{this._isSameGroup(r,e)&&r[1]!==e&&r[1].fireUncheck(e.value)})}_isSameGroup(e,r){return!!e[0].control&&(e[0]._parent===r._control._parent&&e[1].name===r.name)}}_g.\u0275fac=function(e){return new(e||_g)},_g.\u0275prov=Tr({token:_g,factory:_g.\u0275fac,providedIn:Hh});class Sg extends Rc{constructor(e,r,a,A){super(e,r),this._registry=a,this._injector=A,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=jo(Kh,{optional:!0})??gv}ngOnInit(){this._control=this._injector.get(dd),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}Sg.\u0275fac=function(e){return new(e||Sg)(Rn(Zl),Rn(ac),Rn(_g),Rn(Vs))},Sg.\u0275dir=Or({type:Sg,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,r){1&e&&Zo("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[_o([EK]),_i]});const AK={provide:Xu,useExisting:Zr(()=>Wh),multi:!0};class Wh extends Rc{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=r=>{e(""==r?null:parseFloat(r))}}}Wh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Wh)))(r||Wh)}}(),Wh.\u0275dir=Or({type:Wh,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,r){1&e&&Zo("change",function(A){return r.onChange(A.target.value)})("input",function(A){return r.onChange(A.target.value)})("blur",function(){return r.onTouched()})},features:[_o([AK]),_i]});const p3=new Cr("NgModelWithFormControlWarning"),_K={provide:dd,useExisting:Zr(()=>Gh)};class Gh extends dd{set isDisabled(e){}constructor(e,r,a,A,O){super(),this._ngModelWarningConfig=A,this.callSetDisabledState=O,this.update=new ms,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(r),this.valueAccessor=h3(0,a)}ngOnChanges(e){if(this._isControlChanged(e)){const r=e.form.previousValue;r&&lw(r,this,!1),yv(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}d3(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&lw(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}Gh._ngModelWarningSentOnce=!1,Gh.\u0275fac=function(e){return new(e||Gh)(Rn(Zs,10),Rn(fd,10),Rn(Xu,10),Rn(p3,8),Rn(Kh,8))},Gh.\u0275dir=Or({type:Gh,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[_o([_K]),_i,is]});const SK={provide:ya,useExisting:Zr(()=>Zh)};class Zh extends ya{constructor(e,r,a){super(),this.callSetDisabledState=a,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new ms,this._setValidators(e),this._setAsyncValidators(r)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(dw(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const r=this.form.get(e.path);return yv(r,e,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),r}getControl(e){return this.form.get(e.path)}removeControl(e){lw(e.control||null,e,!1),function gK(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,r){this.form.get(e.path).setValue(r)}onSubmit(e){return this.submitted=!0,tI(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const r=e.control,a=this.form.get(e.path);r!==a&&(lw(r||null,e),(t=>t instanceof vv)(a)&&(yv(a,e,this.callSetDisabledState),e.control=a))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const r=this.form.get(e.path);eI(r,e),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const r=this.form.get(e.path);r&&function dK(t,e){return dw(t,e)}(r,e)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){l3(this.form,this),this._oldForm&&dw(this._oldForm,this)}_checkFormPresent(){this.form}}Zh.\u0275fac=function(e){return new(e||Zh)(Rn(Zs,10),Rn(fd,10),Rn(Kh,8))},Zh.\u0275dir=Or({type:Zh,selectors:[["","formGroup",""]],hostBindings:function(e,r){1&e&&Zo("submit",function(A){return r.onSubmit(A)})("reset",function(){return r.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[_o([SK]),_i,is]});const xK={provide:ya,useExisting:Zr(()=>Jh)};class Jh extends zh{constructor(e,r,a){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(a)}_checkParentType(){oI(this._parent)}}Jh.\u0275fac=function(e){return new(e||Jh)(Rn(ya,13),Rn(Zs,10),Rn(fd,10))},Jh.\u0275dir=Or({type:Jh,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[_o([xK]),_i]});const MK={provide:ya,useExisting:Zr(()=>Yh)};class Yh extends ya{constructor(e,r,a){super(),this._parent=e,this._setValidators(r),this._setAsyncValidators(a)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return uw(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){oI(this._parent)}}function oI(t){return!(t instanceof Jh||t instanceof Zh||t instanceof Yh)}Yh.\u0275fac=function(e){return new(e||Yh)(Rn(ya,13),Rn(Zs,10),Rn(fd,10))},Yh.\u0275dir=Or({type:Yh,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[_o([MK]),_i]});const IK={provide:dd,useExisting:Zr(()=>$h)};class $h extends dd{set isDisabled(e){}constructor(e,r,a,A,O){super(),this._ngModelWarningConfig=O,this._added=!1,this.update=new ms,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(r),this._setAsyncValidators(a),this.valueAccessor=h3(0,A)}ngOnChanges(e){this._added||this._setUpControl(),d3(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return uw(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}$h._ngModelWarningSentOnce=!1,$h.\u0275fac=function(e){return new(e||$h)(Rn(ya,13),Rn(Zs,10),Rn(fd,10),Rn(Xu,10),Rn(p3,8))},$h.\u0275dir=Or({type:$h,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[_o([IK]),_i,is]});const CK={provide:Xu,useExisting:Zr(()=>gd),multi:!0};function sI(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class gd extends Rc{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const a=sI(this._getOptionId(e),e);this.setProperty("value",a)}registerOnChange(e){this.onChange=r=>{this.value=this._getOptionValue(r),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const r of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(r),e))return r;return null}_getOptionValue(e){const r=function DK(t){return t.split(":")[0]}(e);return this._optionMap.has(r)?this._optionMap.get(r):e}}gd.\u0275fac=function(){let t;return function(r){return(t||(t=zo(gd)))(r||gd)}}(),gd.\u0275dir=Or({type:gd,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,r){1&e&&Zo("change",function(A){return r.onChange(A.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},features:[_o([CK]),_i]});class bv{constructor(e,r,a){this._element=e,this._renderer=r,this._select=a,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(sI(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}bv.\u0275fac=function(e){return new(e||bv)(Rn(ac),Rn(Zl),Rn(gd,9))},bv.\u0275dir=Or({type:bv,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const TK={provide:Xu,useExisting:Zr(()=>yd),multi:!0};function aI(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class yd extends Rc{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let r;if(this.value=e,Array.isArray(e)){const a=e.map(A=>this._getOptionId(A));r=(A,O)=>{A._setSelected(a.indexOf(O.toString())>-1)}}else r=(a,A)=>{a._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(e){this.onChange=r=>{const a=[],A=r.selectedOptions;if(void 0!==A){const O=A;for(let J=0;JQh),multi:!0};class Qh extends bu{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>uI(e),this.createValidator=e=>CM(e)}}Qh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Qh)))(r||Qh)}}(),Qh.\u0275dir=Or({type:Qh,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("max",r._enabled?r.max:null)},inputs:{max:"max"},features:[_o([NK]),_i]});const PK={provide:Zs,useExisting:Zr(()=>Xh),multi:!0};class Xh extends bu{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>uI(e),this.createValidator=e=>IM(e)}}Xh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(Xh)))(r||Xh)}}(),Xh.\u0275dir=Or({type:Xh,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("min",r._enabled?r.min:null)},inputs:{min:"min"},features:[_o([PK]),_i]});const RK={provide:Zs,useExisting:Zr(()=>md),multi:!0},kK={provide:Zs,useExisting:Zr(()=>qh),multi:!0};class md extends bu{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=DA,this.createValidator=e=>DM}enabled(e){return e}}md.\u0275fac=function(){let t;return function(r){return(t||(t=zo(md)))(r||md)}}(),md.\u0275dir=Or({type:md,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,r){2&e&&$l("required",r._enabled?"":null)},inputs:{required:"required"},features:[_o([RK]),_i]});class qh extends md{constructor(){super(...arguments),this.createValidator=e=>TM}}qh.\u0275fac=function(){let t;return function(r){return(t||(t=zo(qh)))(r||qh)}}(),qh.\u0275dir=Or({type:qh,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("required",r._enabled?"":null)},features:[_o([kK]),_i]});const LK={provide:Zs,useExisting:Zr(()=>e0),multi:!0};class e0 extends bu{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=DA,this.createValidator=e=>OM}enabled(e){return e}}e0.\u0275fac=function(){let t;return function(r){return(t||(t=zo(e0)))(r||e0)}}(),e0.\u0275dir=Or({type:e0,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[_o([LK]),_i]});const BK={provide:Zs,useExisting:Zr(()=>t0),multi:!0};class t0 extends bu{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>cI(e),this.createValidator=e=>NM(e)}}t0.\u0275fac=function(){let t;return function(r){return(t||(t=zo(t0)))(r||t0)}}(),t0.\u0275dir=Or({type:t0,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("minlength",r._enabled?r.minlength:null)},inputs:{minlength:"minlength"},features:[_o([BK]),_i]});const jK={provide:Zs,useExisting:Zr(()=>n0),multi:!0};class n0 extends bu{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>cI(e),this.createValidator=e=>PM(e)}}n0.\u0275fac=function(){let t;return function(r){return(t||(t=zo(n0)))(r||n0)}}(),n0.\u0275dir=Or({type:n0,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},features:[_o([jK]),_i]});const FK={provide:Zs,useExisting:Zr(()=>r0),multi:!0};class r0 extends bu{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>RM(e)}}r0.\u0275fac=function(){let t;return function(r){return(t||(t=zo(r0)))(r||r0)}}(),r0.\u0275dir=Or({type:r0,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,r){2&e&&$l("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[_o([FK]),_i]});class i0{}i0.\u0275fac=function(e){return new(e||i0)},i0.\u0275mod=Ca({type:i0}),i0.\u0275inj=Ma({imports:[Hh]});class lI extends cw{constructor(e,r,a){super(c3(r),u3(a,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,r={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}insert(e,r,a={}){this.controls.splice(e,0,r),this._registerControl(r),this.updateValueAndValidity({emitEvent:a.emitEvent})}removeAt(e,r={}){let a=this._adjustIndex(e);a<0&&(a=0),this.controls[a]&&this.controls[a]._registerOnCollectionChange(()=>{}),this.controls.splice(a,1),this.updateValueAndValidity({emitEvent:r.emitEvent})}setControl(e,r,a={}){let A=this._adjustIndex(e);A<0&&(A=0),this.controls[A]&&this.controls[A]._registerOnCollectionChange(()=>{}),this.controls.splice(A,1),r&&(this.controls.splice(A,0,r),this._registerControl(r)),this.updateValueAndValidity({emitEvent:a.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,r={}){QM(this,!1,e),e.forEach((a,A)=>{$M(this,!1,A),this.at(A).setValue(a,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){null!=e&&(e.forEach((a,A)=>{this.at(A)&&this.at(A).patchValue(a,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e=[],r={}){this._forEachChild((a,A)=>{a.reset(e[A],{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r),this._updateTouched(r),this.updateValueAndValidity(r)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(r=>r._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((r,a)=>!!a._syncPendingControls()||r,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((r,a)=>{e(r,a)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(r=>r.enabled&&e(r))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function fI(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class of{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new of;return e.useNonNullable=!0,e}group(e,r=null){const a=this._reduceControls(e);let A={};return fI(r)?A=r:null!==r&&(A.validators=r.validator,A.asyncValidators=r.asyncValidator),new pv(a,A)}record(e,r=null){const a=this._reduceControls(e);return new XM(a,r)}control(e,r,a){let A={};return this.useNonNullable?(fI(r)?A=r:(A.validators=r,A.asyncValidators=a),new vv(e,{...A,nonNullable:!0})):new vv(e,r,a)}array(e,r,a){const A=e.map(O=>this._createControl(O));return new lI(A,r,a)}_reduceControls(e){const r={};return Object.keys(e).forEach(a=>{r[a]=this._createControl(e[a])}),r}_createControl(e){if(e instanceof vv)return e;if(e instanceof cw)return e;if(Array.isArray(e)){const r=e[0],a=e.length>1?e[1]:null,A=e.length>2?e[2]:null;return this.control(r,a,A)}return this.control(e)}}of.\u0275fac=function(e){return new(e||of)},of.\u0275prov=Tr({token:of,factory:of.\u0275fac,providedIn:"root"});class hw{}hw.\u0275fac=function(e){return new(e||hw)},hw.\u0275prov=Tr({token:hw,factory:function(){return jo(of).nonNullable},providedIn:"root"});class xg extends of{group(e,r=null){return super.group(e,r)}control(e,r,a){return super.control(e,r,a)}array(e,r,a){return super.array(e,r,a)}}xg.\u0275fac=function(){let t;return function(r){return(t||(t=zo(xg)))(r||xg)}}(),xg.\u0275prov=Tr({token:xg,factory:xg.\u0275fac,providedIn:"root"});new yb("15.2.9");class vd{static withConfig(e){return{ngModule:vd,providers:[{provide:Kh,useValue:e.callSetDisabledState??gv}]}}}vd.\u0275fac=function(e){return new(e||vd)},vd.\u0275mod=Ca({type:vd}),vd.\u0275inj=Ma({imports:[i0]});class o0{static withConfig(e){return{ngModule:o0,providers:[{provide:p3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Kh,useValue:e.callSetDisabledState??gv}]}}}o0.\u0275fac=function(e){return new(e||o0)},o0.\u0275mod=Ca({type:o0}),o0.\u0275inj=Ma({imports:[i0]});var Ke=u(49671),Fr=u(71836);class UK{constructor(e){this.provider=new Fr.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:r}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:r})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class Ev{constructor(e,r){this.storage=e,this.namespace=Array.isArray(r)?r.join(":"):r}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(r=>"string"==typeof r?JSON.parse(r):null)}setItem(e,r){return this.storage.setItem(this.resolveKey(e),JSON.stringify(r))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}class KK{getItem(e){return new Promise(r=>{r(localStorage.getItem(e))})}setItem(e,r){return new Promise(a=>{localStorage.setItem(e,r),a()})}removeItem(e){return new Promise(r=>{localStorage.removeItem(e),r()})}}class Av{static#e=this.debug=!1;constructor(e){this.namespace=e}emit(e,...r){if(Av.debug){if(this.namespace&&"error"!==e)return void console[e](this.namespace,...r);console[e](...r)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}const qu=new Av;var wu=u(59069),g3=u.n(wu);class y3{constructor(){this.emitter=new wu.EventEmitter}on(e,r){return this.emitter.on(e,r),{remove:()=>this.emitter.off(e,r)}}off(e,r){this.emitter.off(e,r)}emit(e,r){this.emitter.emit(e,r)}}const _v="near-wallet-selector",Sv="recentlySignedInWallets",hI="contract",m3="contract:pending",pI="selectedWalletId",v3="selectedWalletId:pending";class zK{constructor({factories:e,storage:r,options:a,store:A,emitter:O,provider:J}){this.factories=e,this.storage=r,this.options=a,this.store=A,this.emitter=O,this.provider=J,this.modules=[],this.instances={}}validateWallet(e){var r=this;return(0,Ke.Z)(function*(){let a=[];const A=yield r.getWallet(e);return A&&(a=yield A.getAccounts().catch(O=>(qu.log(`Failed to validate ${A.id} during setup`),qu.error(O),[]))),a})()}resolveStorageState(){var e=this;return(0,Ke.Z)(function*(){const r=new Ev(e.storage,_v),a=yield r.getItem(v3),A=yield r.getItem(m3);if(a&&A){const oe=yield e.validateWallet(a);if(yield r.removeItem(v3),yield r.removeItem(m3),oe.length){const{selectedWalletId:de}=e.store.getState(),be=yield e.getWallet(de);be&&a!==de&&(yield be.signOut().catch(Ce=>{qu.log("Failed to sign out existing wallet"),qu.error(Ce)}));return{accounts:oe,contract:A,selectedWalletId:a,recentlySignedInWallets:yield e.setWalletAsRecentlySignedIn(a)}}}const{contract:O,selectedWalletId:J}=e.store.getState(),ee=yield e.validateWallet(J),ie=yield r.getItem(Sv);return ee.length?{accounts:ee,contract:O,selectedWalletId:J,recentlySignedInWallets:ie||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:ie||[]}})()}setWalletAsRecentlySignedIn(e){var r=this;return(0,Ke.Z)(function*(){const a=new Ev(r.storage,_v);let A=yield a.getItem(Sv);return A||(A=[]),A.includes(e)||(A.unshift(e),A=A.slice(0,5),yield a.setItem(Sv,A)),A})()}signOutWallet(e){var r=this;return(0,Ke.Z)(function*(){const a=yield r.getWallet(e);yield a.signOut().catch(A=>{qu.log(`Failed to sign out ${a.id}`),qu.error(A),r.onWalletSignedOut(a.id)})})()}onWalletSignedIn(e,{accounts:r,contractId:a,methodNames:A}){var O=this;return(0,Ke.Z)(function*(){const{selectedWalletId:J}=O.store.getState(),ee=new Ev(O.storage,_v),ie={contractId:a,methodNames:A};if(!r.length)return void("browser"===O.getModule(e).type&&(yield ee.setItem(v3,e),yield ee.setItem(m3,ie)));J&&J!==e&&(yield O.signOutWallet(J));const oe=yield O.setWalletAsRecentlySignedIn(e);O.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:ie,accounts:r,recentlySignedInWallets:oe}}),O.emitter.emit("signedIn",{walletId:e,contractId:a,methodNames:A,accounts:r})})()}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){var r=this;const a=new y3;return a.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),a.on("signedIn",A=>{this.onWalletSignedIn(e.id,A)}),a.on("accountsChanged",function(){var A=(0,Ke.Z)(function*({accounts:O}){if(r.emitter.emit("accountsChanged",{walletId:e.id,accounts:O}),!O.length)return r.signOutWallet(e.id);r.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:O}})});return function(O){return A.apply(this,arguments)}}()),a.on("networkChanged",({networkId:A})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:A})}),a.on("uriChanged",({uri:A})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:A})}),a}validateSignMessageParams({message:e,nonce:r,recipient:a}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(r)||32!==r.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!a||""===a.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){var r=this;const a=e.signIn,A=e.signOut,O=e.signMessage;return e.signIn=function(){var J=(0,Ke.Z)(function*(ee){const ie=yield a(ee),{contractId:oe,methodNames:de=[]}=ee;return yield r.onWalletSignedIn(e.id,{accounts:ie,contractId:oe,methodNames:de}),ie});return function(ee){return J.apply(this,arguments)}}(),e.signOut=(0,Ke.Z)(function*(){yield A(),r.onWalletSignedOut(e.id)}),e.signMessage=function(){var J=(0,Ke.Z)(function*(ee){if(void 0===O)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return r.validateSignMessageParams(ee),yield O(ee)});return function(ee){return J.apply(this,arguments)}}(),e}setupInstance(e){var r=this;return(0,Ke.Z)(function*(){if(!e.metadata.available){const A="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${A}`)}const a={id:e.id,type:e.type,metadata:e.metadata,...yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:r.options,store:r.store.toReadOnly(),provider:r.provider,emitter:r.setupWalletEmitter(e),logger:new Av(e.id),storage:new Ev(r.storage,[_v,e.id])})};return r.decorateWallet(a)})()}getModule(e){return this.modules.find(r=>r.id===e)}getWallet(e){var r=this;return(0,Ke.Z)(function*(){const a=r.getModule(e);if(!a)return null;const{selectedWalletId:A}=r.store.getState();return!a.metadata.available&&A?(r.onWalletSignedOut(A),null):yield a.wallet()})()}setup(){var e=this;return(0,Ke.Z)(function*(){const r=[];for(let ee=0;ee(qu.log("Failed to setup module"),qu.error(oe),null));ie&&(r.some(oe=>oe.id===ie.id)||r.push({id:ie.id,type:ie.type,metadata:ie.metadata,wallet:function(){var oe=(0,Ke.Z)(function*(){let de=e.instances[ie.id];return de||(de=yield e.setupInstance(ie),e.instances[ie.id]=de,de)});return function(){return oe.apply(this,arguments)}}()}))}e.modules=r;const{accounts:a,contract:A,selectedWalletId:O,recentlySignedInWallets:J}=yield e.resolveStorageState();e.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:r,accounts:a,contract:A,selectedWalletId:O,recentlySignedInWallets:J}});for(let ee=0;ee"string"==typeof t?(t=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:t,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${t}'`)}})(t):t;class GK extends Mn{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){const{hasError:e,thrownError:r,_value:a}=this;if(e)throw r;return this._throwIfClosed(),a}next(e){super.next(this._value=e)}}function JK(t,e){return Hn(function ZK(t,e,r,a,A){return(O,J)=>{let ee=r,ie=e,oe=0;O.subscribe(Bt(J,de=>{const be=oe++;ie=ee?t(ie,de,be):(ee=!0,de),a&&J.next(ie)},A&&(()=>{ee&&J.next(ie),J.complete()})))}}(t,e,arguments.length>=2,!0))}const YK=(t,e)=>{switch(qu.log("Store Action",e),e.type){case"SETUP_WALLET_MODULES":{const{modules:r,accounts:a,contract:A,selectedWalletId:O,recentlySignedInWallets:J}=e.payload,ee=a.map((ie,oe)=>({...ie,active:0===oe}));return{...t,modules:r,accounts:ee,contract:A,selectedWalletId:O,recentlySignedInWallets:J}}case"WALLET_CONNECTED":{const{walletId:r,contract:a,accounts:A,recentlySignedInWallets:O}=e.payload;if(!A.length)return t;const J=t.accounts.findIndex(ie=>ie.active),ee=A.map((ie,oe)=>({...ie,active:oe===(J>-1?J:0)}));return{...t,contract:a,accounts:ee,selectedWalletId:r,recentlySignedInWallets:O}}case"WALLET_DISCONNECTED":{const{walletId:r}=e.payload;return r!==t.selectedWalletId?t:{...t,contract:null,accounts:[],selectedWalletId:null}}case"ACCOUNTS_CHANGED":{const{walletId:r,accounts:a}=e.payload;if(r!==t.selectedWalletId)return t;const A=t.accounts.find(ee=>ee.active),O=!a.some(ee=>ee.accountId===A?.accountId),J=a.map((ee,ie)=>({...ee,active:O?0===ie:ee.accountId===A?.accountId}));return{...t,accounts:J}}case"SET_ACTIVE_ACCOUNT":{const{accountId:r}=e.payload,a=t.accounts.map(A=>({...A,active:A.accountId===r}));return{...t,accounts:a}}default:return t}},$K=function(){var t=(0,Ke.Z)(function*(e){const r=new Ev(e,_v),a={modules:[],accounts:[],contract:yield r.getItem(hI),selectedWalletId:yield r.getItem(pI),recentlySignedInWallets:(yield r.getItem(Sv))||[]},A=new GK(a),O=new Mn;O.pipe(JK(YK,a)).subscribe(A);const J=function(){var ie=(0,Ke.Z)(function*(oe,de,be,Ee){if(de[Ee]!==oe[Ee]){if(de[Ee])return void(yield r.setItem(be,de[Ee]));yield r.removeItem(be)}});return function(de,be,Ee,Ce){return ie.apply(this,arguments)}}();let ee=A.getValue();return A.subscribe(ie=>{J(ee,ie,pI,"selectedWalletId"),J(ee,ie,hI,"contract"),J(ee,ie,Sv,"recentlySignedInWallets"),ee=ie}),{observable:A,getState:()=>A.getValue(),dispatch:ie=>O.next(ie),toReadOnly:()=>({getState:()=>A.getValue(),observable:A.asObservable()})}});return function(r){return t.apply(this,arguments)}}();let b3=null;const gI=(t,e,r,a)=>{return{options:t,store:e.toReadOnly(),wallet:(A=(0,Ke.Z)(function*(O){const{selectedWalletId:J}=e.getState(),ee=yield r.getWallet(O||J);if(!ee)throw O?new Error("Invalid wallet id"):new Error("No wallet selected");return ee}),function(J){return A.apply(this,arguments)}),setActiveAccount:A=>{const{accounts:O}=e.getState();if(!O.some(J=>J.accountId===A))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:A}})},isSignedIn(){const{accounts:A}=e.getState();return Boolean(A.length)},on:(A,O)=>a.on(A,O),off:(A,O)=>{a.off(A,O)}};var A},yI=function(){var t=(0,Ke.Z)(function*(e){const{options:r,storage:a}=(t=>({options:{languageCode:t.languageCode||void 0,network:HK(t.network),debug:t.debug||!1,optimizeWalletOrder:!1!==t.optimizeWalletOrder,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0},storage:t.storage||new KK}))(e);Av.debug=r.debug;const A=new y3,O=yield $K(a),J=new zK({factories:e.modules,storage:a,options:r,store:O,emitter:A,provider:new UK(r.network.nodeUrl)});return yield J.setup(),e.allowMultipleSelectors?gI(r,O,J,A):(b3||(b3=gI(r,O,J,A)),b3)});return function(r){return t.apply(this,arguments)}}(),mI=t=>new Promise(e=>setTimeout(e,t)),vI=function(){var t=(0,Ke.Z)(function*(e,r,a){const A=e();if(A)return A;if(!a)throw new Error("Exceeded timeout");return mI(r).then(()=>vI(e,r,a-1))});return function(r,a,A){return t.apply(this,arguments)}}(),kc=function(){var t=(0,Ke.Z)(function*(e,r={}){const{timeout:a=100,interval:A=50}=r;return Promise.race([mI(a).then(()=>{throw new Error("Exceeded timeout")}),vI(e,A,Math.floor(a/A))])});return function(r){return t.apply(this,arguments)}}(),bd=t=>t.accounts.find(e=>e.active)||null,QK=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],w3=t=>{if(typeof navigator>"u")return!1;const e=(t=>""!==t&&QK.reduce((e,[r,a])=>{if(e)return e;const A=a.exec(t);return!!A&&[r,A]},!1))(navigator.userAgent);if(!e)return!1;const[r]=e;return"searchbot"!==r&&!!t.find(a=>a===r)};var bI=u(21531),qK=u(1520);class E3{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}}const wI=new Map([[E3,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),nz=function(){var t=(0,Ke.Z)(function*({accountId:e,network:r,publicKey:a}){return yield new Fr.providers.JsonRpcProvider({url:r.nodeUrl}).query({request_type:"view_access_key",account_id:e,finality:"final",public_key:a})});return function(r){return t.apply(this,arguments)}}(),rz=function(){var t=(0,Ke.Z)(function*({publicKey:e,accountId:r,network:a}){const{permission:A}=yield nz({accountId:r,network:a,publicKey:e});return"FullAccess"===A});return function(r){return t.apply(this,arguments)}}(),EI=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Connect Your Wallet","whatIsAWallet":"What is a Wallet?","secureAndManage":"Secure & Manage Your Digital Assets","safelyStore":"Safely store and transfer your crypto and NFTs.","logInToAny":"Log In to Any NEAR App","noNeedToCreate":"No need to create new accounts or credentials. Connect your wallet and you are good to go!","getAWallet":"Get a Wallet","useAWallet":"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.","connectionFailed":"Connection Failed","connectionSuccessful":"Connection Successful","connected":"Connected","connectingTo":"Connecting to","connectingMessage":{"injected":"Confirm the connection in the extension window","browser":"Confirm the connection in the wallet after redirect","hardware":"Confirm the connection in the ledger device","bridge":"Confirm the connection in the wallet"}},"ledger":{"connectWithLedger":"Connect with Ledger","makeSureYourLedger":"Make sure your Ledger is connected securely, and that the NEAR app is open on your device","continue":"Continue","specifyHDPath":"Specify HD Path","enterYourPreferredHDPath":"Enter your preferred HD path, then scan for any active accounts.","scan":"Scan","retry":"Retry","ledgerIsNotAvailable":"Ledger is not available","accessDeniedToUseLedgerDevice":"Access denied to use Ledger device","noAccountsFound":"No Accounts Found","selectYourAccounts":"Select Your Accounts","connecting1Account":"Connecting 1 Account","cantFindAnyAccount":"Can\'t find any account associated with this Ledger. Please create a new NEAR account on","orConnectAnAnotherLedger":"or connect an another Ledger.","connecting":"Connecting","ofAccounts":"of Accounts","failedToAutomatically":"Failed to automatically find account id. Provide it manually:","overviewTheListOfAuthorized":"Overview the list of authorized account(s), complete sign in by clicking the button below.","finish":"Finish"},"install":{"youllNeedToInstall":"You\'ll need to install","toContinueAfterInstalling":"to continue. After installing","refreshThePage":"refresh the page.","open":"Open"},"qr":{"copiedToClipboard":"Copied to clipboard","failedToCopy":"Failed to copy to clipboard","scanWithYourMobile":"Scan with Your Mobile Device","copyToClipboard":" Copy to clipboard","preferTheOfficial":"Prefer the official dialogue of","open":"Open"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Choose a Wallet","transferYourAccounts":"Transfer Your Accounts","selectAWallet":"Select a wallet that fits your needs and supports your connected accounts.","selectYourAccounts":"Select Your Accounts","afterDecide":"After you decide on a wallet, you can select which accounts you want to transfer.","disclaimer":"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.","warning":"does not support account export at this time. Please select another wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Select Accounts to Transfer","button":"Continue","deselectAll":"Deselect All","selectAll":"Select All","unavailable":"Transfer Unavailable","error":"Account does not exist","warningLedger":"Ledger support required","noBalance":"Account not funded"},"getPassphrase":{"title":"Copy Temporary Password","desc":"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.","button":"Continue","transferButton":"Transfer Accounts","label":"Click to Copy","checkLabel":"I copied or wrote down the password"},"complete":{"title":"Complete the Transfer","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Once import part of process is completed from selected wallet, press button to complete the transfer process.","startOverButton":"Start Over","button":"Complete"}}},"component":{"clickToCopy":{"label":"Copied","tooltip":"Click to copy"}}}'),iz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Conecta Tu Billetera","whatIsAWallet":"\xbfQue es una Billetera?","secureAndManage":"Resguarda y Administrar Tus Activos Digitales","safelyStore":"Almacena de forma segura y transfiere tus cryptos y NFT\'s","logInToAny":"Inicie sesi\xf3n en Cualquier Aplicacion NEAR","noNeedToCreate":"No es necesario crear nuevas cuentas o credenciales, \xa1Conecta tu billetera y listo!","getAWallet":"Obten una Billetera","useAWallet":"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xf3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xf1as","connectionFailed":"Conexi\xf3n Fallida","connectionSuccessful":"Conexi\xf3n Existosa","connected":"Conectado","connectingTo":"Conectando a ","connectingMessage":{"injected":"Confirme la conexi\xf3n en la ventana de extensi\xf3n","browser":"Confirme la conexi\xf3n en la billetera despu\xe9s de la redirecci\xf3n","hardware":"Confirme la conexi\xf3n en el dispositivo de libro mayor","bridge":"Confirmar la conexi\xf3n en la billetera"}},"ledger":{"connectWithLedger":"Conectar con Ledger","makeSureYourLedger":"Aseg\xfarese de que su ledger est\xe1 conectada de forma segura y que la aplicacion NEAR est\xe9 abierta en su dispositivo","continue":"Continuar","specifyHDPath":"Especifique la ruta HD","enterYourPreferredHDPath":"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.","scan":"Escanear","retry":"Reintentar","ledgerIsNotAvailable":"El Ledger no est\xe1 disponible","accessDeniedToUseLedgerDevice":"Acceso denegado para usar el dispositivo ledger","noAccountsFound":"No se encontraron cuentas","selectYourAccounts":"Selecciona tus cuentas","connecting1Account":"Conectando a 1 cuenta","cantFindAnyAccount":"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR","orConnectAnAnotherLedger":"o conecta otro ledger","connecting":"Conectando","ofAccounts":"de Cuentas","failedToAutomatically":"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:","overviewTheListOfAuthorized":"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xf3n haciedo click a countinuacion.","finish":"Finalizar"},"install":{"youllNeedToInstall":"Tendr\xe1s que instalar","toContinueAfterInstalling":"Para continuar, Despues de instalar","refreshThePage":"Recarga la pagina","open":"Abrir"},"qr":{"copiedToClipboard":"Copiado al Portapapeles","failedToCopy":"Fall\xf3 la copia al Portapapeles","scanWithYourMobile":"Busca con tu dispositivo movil","copyToClipboard":" Copiar al Portapapeles","preferTheOfficial":"\xbfPrefires el di\xe1logo oficial de","open":"Abrir"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),oz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u8fde\u63a5\u4f60\u7684\u94b1\u5305","whatIsAWallet":"\u4ec0\u4e48\u662f\u94b1\u5305\uff1f","secureAndManage":"\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684\u6570\u5b57\u8d44\u4ea7","safelyStore":"\u5b89\u5168\u5b58\u50a8\u548c\u8f6c\u79fb\u4f60\u7684\u52a0\u5bc6\u8d27\u5e01\u548cNFT","logInToAny":"\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","noNeedToCreate":"\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u8d26\u6237\u6216\u5bc6\u7801\u3002\u8fde\u63a5\u4f60\u7684\u94b1\u5305\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff01","getAWallet":"\u83b7\u53d6\u65b0\u8d26\u6237","useAWallet":"\u4f7f\u7528\u94b1\u5305\u6765\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684 NEAR \u8d44\u4ea7\uff0c\u65e0\u9700\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","connectionFailed":"\u8fde\u63a5\u5931\u8d25","connectionSuccessful":"\u8fde\u63a5\u6210\u529f","connected":"\u5df2\u8fde\u63a5","connectingTo":"\u6b63\u5728\u8fde\u63a5"},"ledger":{"connectWithLedger":"\u8fde\u63a5 Ledger","makeSureYourLedger":"\u786e\u4fdd\u4f60\u7684 Ledger \u5df2\u7ecf\u5b89\u5168\u8fde\u63a5\uff0c\u5e76\u4e14 NEAR \u5e94\u7528\u5df2\u7ecf\u5728\u4f60\u8bbe\u5907\u4e0a\u6253\u5f00","continue":"\u7ee7\u7eed","specifyHDPath":"\u6307\u5b9a HD \u8def\u5f84","enterYourPreferredHDPath":"\u8f93\u5165\u4f60\u504f\u597d\u7684 HD \u8def\u5f84\uff0c\u7136\u540e\u4e3a\u4efb\u610f\u6d3b\u8dc3\u8d26\u6237\u626b\u7801","scan":"\u626b\u7801","retry":"\u91cd\u8bd5","ledgerIsNotAvailable":"Ledger \u4e0d\u53ef\u7528","accessDeniedToUseLedgerDevice":"\u8bbf\u95ee Ledger \u8bbe\u5907\u88ab\u62d2\u7edd","noAccountsFound":"\u6ca1\u6709\u627e\u5230\u8d26\u6237","selectYourAccounts":"\u9009\u62e9\u4f60\u7684\u8d26\u6237","connecting1Account":"\u6b63\u5728\u8fde\u63a51\u4e2a\u8d26\u6237","cantFindAnyAccount":"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u4e0e\u8fd9\u4e2a Ledger \u76f8\u5173\u8054\u7684\u8d26\u6237\u3002\u8bf7\u521b\u5efa\u65b0\u8d26\u6237\u4e8e","orConnectAnAnotherLedger.":"\u6216\u8fde\u63a5\u53e6\u4e00\u4e2a Ledger","connecting":"\u6b63\u5728\u8fde\u63a5","ofAccounts":"\u4e2a\u8d26\u6237","failedToAutomatically":"\u65e0\u6cd5\u81ea\u52a8\u627e\u5230\u8d26\u6237ID\uff0c\u8bf7\u4e3b\u52a8\u63d0\u4f9b\uff1a","overviewTheListOfAuthorized":"\u8bf7\u67e5\u770b\u5df2\u6388\u6743\u7684\u8d26\u6237\u5217\u8868\uff0c\u70b9\u51fb\u4ee5\u4e0b\u6309\u94ae\u5b8c\u6210\u767b\u5f55","finish":"\u5b8c\u6210"},"install":{"youllNeedToInstall":"\u4f60\u5c06\u9700\u8981\u5b89\u88c5","toContinueAfterInstalling":"\u4ee5\u7ee7\u7eed\u3002\u5b89\u88c5\u5b8c","refreshThePage":"\u8bf7\u5237\u65b0\u9875\u9762","open":"\u6253\u5f00"},"qr":{"copiedToClipboard":"\u590d\u5236\u5230\u4e86\u526a\u8d34\u677f","failedToCopy":"\u590d\u5236\u5230\u526a\u8d34\u677f\u5931\u8d25","scanWithYourMobile":"\u7528\u4f60\u7684\u79fb\u52a8\u8bbe\u5907\u626b\u7801","copyToClipboard":" \u590d\u5236\u5230\u526a\u8d34\u677f","preferTheOfficial":"\u5e0c\u671b\u4f7f\u7528\u5b98\u65b9\u5bf9\u8bdd\u6846\u4e8e","open":"\u6253\u5f00"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),sz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044f \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","whatIsAWallet":"\u041a\u0430\u043a\u0432\u043e \u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b?","secureAndManage":"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438\u0442\u0435 \u0441\u0438 \u0430\u043a\u0442\u0438\u0432\u0438","safelyStore":"\u0421\u044a\u0445\u0440\u0430\u043d\u044f\u0432\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0435\u0445\u0432\u044a\u0440\u043b\u044f\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR","noNeedToCreate":"\u041d\u044f\u043c\u0430 \u043d\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438. \u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u0438!","getAWallet":"\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","useAWallet":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043d\u0430 NEAR \u043a\u0430\u043a\u0442\u043e \u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u0430 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0438 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.","connectionFailed":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e","connectionSuccessful":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e","connected":"\u0421\u0432\u044a\u0440\u0437\u0430\u043d","connectingTo":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043a\u044a\u043c","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430 \u043d\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u0442\u043e","browser":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u043b\u0435\u0434 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435\u0442\u043e","hardware":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","bridge":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430"}},"ledger":{"connectWithLedger":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 Ledger \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0438 \u0447\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e NEAR \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043da \u043d\u0435\u0433\u043e.","continue":"\u041f\u0440\u043e\u0434\u044a\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041f\u043e\u0441\u043e\u0447\u0435\u0442\u0435 HD \u043f\u044a\u0442","enterYourPreferredHDPath":"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d\u0438\u044f HD \u043f\u044a\u0442, \u0441\u043b\u0435\u0434 \u043a\u043e\u0435\u0442\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u043a\u0430\u0443\u043d\u0442\u0438.","scan":"\u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435","retry":"\u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e","accessDeniedToUseLedgerDevice":"\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 Ledger \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d","noAccountsFound":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","connecting1Account":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 1 \u043f\u0440\u043e\u0444\u0438\u043b","cantFindAnyAccount":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0441\u044a\u0432\u0440\u0437\u0430\u043d\u0438 \u0441 \u0442\u043e\u0437\u0438 Ledger. \u041c\u043e\u043b\u044f, \u0441\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432 NEAR \u043f\u0440\u043e\u0444\u0438\u043b \u043d\u0430","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u0441\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.","connecting":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435","ofAccounts":"\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","failedToAutomatically":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0442\u043e \u043d\u0430\u043c\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430 \u043d\u0435 \u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043e \u0440\u044a\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u0443\u043f\u044a\u043b\u043d\u043e\u043c\u043e\u0449\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0437\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435 \u0432\u043b\u0438\u0437\u0430\u043d\u0435\u0442\u043e, \u043a\u0430\u0442\u043e \u0449\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u0431\u0443\u0442\u043e\u043d\u0430 \u043f\u043e-\u0434\u043e\u043b\u0443..","finish":"\u0417\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435. \u0421\u043b\u0435\u0434 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435","refreshThePage":"\u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u043d\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","scanWithYourMobile":" \u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0442\u043e \u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","preferTheOfficial":"\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d \u0435\u0437\u0438\u043a \u0437\u0430 \u043a\u043e\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0446\u0438\u044f","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),az=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\uc9c0\uac11 \uc5f0\uacb0\ud558\uae30","whatIsAWallet":"\uc9c0\uac11\uc740 \ubb34\uc2a8 \uc5ed\ud560\uc744 \ud558\ub098\uc694?","secureAndManage":"\ub2f9\uc2e0\uc758 \ub514\uc9c0\ud138 \uc790\uc0b0\uc744 \ubcf4\ud638\ud558\uace0 \uad00\ub9ac\ud569\ub2c8\ub2e4.","safelyStore":"\uc554\ud638\ud654\ud3d0\uc640 NFT\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uace0 \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","logInToAny":"NEAR App\uc5d0 \ub85c\uadf8\uc778\ud569\ub2c8\ub2e4.","noNeedToCreate":"\uc0c8\ub85c\uc6b4 \uacc4\uc815\uc774\ub098 \ube44\ubc00\ubc88\ud638\ub97c \ub9cc\ub4e4 \ud544\uc694 \uc5c6\uc774 \uc9c0\uac11\uc744 \uc5f0\uacb0\ud55c \ud6c4 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","getAWallet":"\uc9c0\uac11 \uac00\uc838\uc624\uae30","useAWallet":"\uc9c0\uac11\uc744 \uc0ac\uc6a9\ud558\uc5ec NEAR \uc790\uc0b0\uc744 \ubcf4\ud638\xb7\uad00\ub9ac\ud558\uace0, \uc544\uc774\ub514\uc640 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 NEAR \uc571\uc5d0 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","connectionFailed":"\uc5f0\uacb0 \uc2e4\ud328","connectionSuccessful":"\uc5f0\uacb0 \uc131\uacf5","connected":"Connected","connectingTo":"\uc5f0\uacb0 \uc911: ","connectingMessage":{"injected":"\uc775\uc2a4\ud150\uc158 \ucc3d\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","browser":"\ub9ac\ub2e4\uc774\ub809\ud2b8 \ub41c \uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","hardware":"Ledger \uae30\uae30\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","bridge":"\uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0 \ud655\uc778"}},"ledger":{"connectWithLedger":"Ledger \uc5f0\uacb0\ud558\uae30","makeSureYourLedger":"Ledger\uac00 \uc548\uc804\ud558\uac8c \uc5f0\uacb0\ub418\uc5b4 \uc788\uace0, NEAR \uc571\uc774 \uc5f4\ub824 \uc788\ub294 \uc9c0 \ud655\uc778\ud558\uc138\uc694","continue":"\uacc4\uc18d\ud558\uae30","specifyHDPath":"HD Path \uc9c0\uc815\ud558\uae30","enterYourPreferredHDPath":"\uc6d0\ud558\ub294 HD Path\ub97c \uc120\ud0dd\ud558\uace0, \ud65c\uc131\ud654\ub41c \uacc4\uc815\uc774 \uc788\ub294 \uc9c0 \uac80\uc0c9\ud558\uc138\uc694","scan":"\uac80\uc0c9","retry":"\ub2e4\uc2dc \uc2dc\ub3c4","ledgerIsNotAvailable":"Ledger\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","accessDeniedToUseLedgerDevice":"Ledger \uae30\uae30 \uc811\uadfc \uad8c\ud55c\uc774 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4","noAccountsFound":"\uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","selectYourAccounts":"\uacc4\uc815 \uc120\ud0dd\ud558\uae30","connecting1Account":"\ud558\ub098\uc758 \uacc4\uc815\uc5d0 \uc5f0\uacb0","cantFindAnyAccount":"Ledger\uc640 \uc5f0\uacb0\ub41c \uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uac70\ub098 ","orConnectAnAnotherLedger":"\ub2e4\ub978 Ledger\ub97c \uc5f0\uacb0\ud558\uc138\uc694","connecting":"\uacc4\uc815 \uc5f0\uacb0\ud558\uae30: ","ofAccounts":"\uac1c \uacc4\uc815\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4","failedToAutomatically":"\uacc4\uc815 ID\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc218\ub3d9\uc73c\ub85c \uc785\ub825\ud574\uc8fc\uc138\uc694.","overviewTheListOfAuthorized":"\uc778\uc99d\ub41c \uacc4\uc815 \ubaa9\ub85d\uc744 \ud655\uc778\ud55c \ud6c4 \uc544\ub798 \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uc5ec \ub85c\uadf8\uc778\uc744 \uc644\ub8cc\ud558\uc138\uc694","finish":"\uc644\ub8cc"},"walletTypes":{"hardware":"\ud558\ub4dc\uc6e8\uc5b4 \uc9c0\uac11","browser":"\ube0c\ub77c\uc6b0\uc800 \uc9c0\uac11","injected":"\uc9c0\uac11 \ud655\uc7a5","bridge":"\ube0c\ub9ac\uc9c0 \uc9c0\uac11","mobile":"\ubaa8\ubc14\uc77c \uc9c0\uac11","instant-link":"\uc778\uc2a4\ud134\ud2b8 \uc9c0\uac11"},"install":{"youllNeedToInstall":"\ub2e4\uc74c \ud655\uc7a5 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uce58\ud574\uc8fc\uc138\uc694:","toContinueAfterInstalling":". \uc124\uce58 \uc644\ub8cc \ud6c4 \ud398\uc774\uc9c0 \uc0c8\ub85c \uace0\uce68\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. ","refreshThePage":"\uc0c8\ub85c \uace0\uce68","open":"Open"},"qr":{"copiedToClipboard":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc644\ub8cc","failedToCopy":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc2e4\ud328","scanWithYourMobile":"\ubaa8\ubc14\uc77c \uc7a5\uce58\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\uce94\ud574\uc8fc\uc138\uc694","copyToClipboard":" \ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ud558\uae30","preferTheOfficial":"\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uacf5\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc120\ud638\ud558\uc2ed\ub2c8\uae4c: ","open":"Open"}}}'),cz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n","whatIsAWallet":"V\xed l\xe0 g\xec?","secureAndManage":"B\u1ea3o m\u1eadt & Qu\u1ea3n l\xfd t\xe0i s\u1ea3n s\u1ed1 c\u1ee7a b\u1ea1n","safelyStore":"L\u01b0u tr\u1eef v\xe0 chuy\u1ec3n ti\u1ec1n \u0111i\u1ec7n t\u1eed v\xe0 NFT c\u1ee7a b\u1ea1n m\u1ed9t c\xe1ch an to\xe0n.","logInToAny":"\u0110\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng tr\xean NEAR","noNeedToCreate":"Kh\xf4ng c\u1ea7n t\u1ea1o t\xe0i kho\u1ea3n ho\u1eb7c th\xf4ng tin \u0111\u0103ng nh\u1eadp m\u1edbi. K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n v\xe0 b\u1eaft \u0111\u1ea7u!","getAWallet":"T\u1ea1o V\xed","useAWallet":"S\u1eed d\u1ee5ng v\xed \u0111\u1ec3 b\u1ea3o m\u1eadt v\xe0 qu\u1ea3n l\xfd t\xe0i s\u1ea3n tr\xean NEAR c\u1ee7a b\u1ea1n v\xe0 \u0111\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng NEAR n\xe0o, kh\xf4ng c\u1ea7n t\xean ng\u01b0\u1eddi d\xf9ng v\xe0 m\u1eadt kh\u1ea9u.","connectionFailed":"K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i","connectionSuccessful":"K\u1ebft n\u1ed1i th\xe0nh c\xf4ng","connected":"\u0110\xe3 k\u1ebft n\u1ed1i","connectingTo":"\u0110ang k\u1ebft n\u1ed1i t\u1edbi","connectingMessage":{"injected":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong c\u1eeda s\u1ed5 ti\u1ec7n \xedch m\u1edf r\u1ed9ng","browser":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed sau khi \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng","hardware":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i v\u1edbi v\xed l\u1ea1nh","bridge":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed"}},"ledger":{"connectWithLedger":"K\u1ebft n\u1ed1i v\xed Ledger","makeSureYourLedger":"\u0110\u1ea3m b\u1ea3o Ledger c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i an to\xe0n v\xe0 \u1ee9ng d\u1ee5ng NEAR \u0111ang m\u1edf s\u1eb5n tr\xean thi\u1ebft b\u1ecb","continue":"Ti\u1ebfp t\u1ee5c","specifyHDPath":"Ch\u1ec9 \u0111\u1ecbnh HD Path","enterYourPreferredHDPath":"Nh\u1eadp HD Path c\u1ee7a b\u1ea1n, sau \u0111\xf3 qu\xe9t t\xecm c\xe1c t\xe0i kho\u1ea3n ho\u1ea1t \u0111\u1ed9ng","scan":"Qu\xe9t","retry":"Th\u1eed l\u1ea1i","ledgerIsNotAvailable":"Ledger kh\xf4ng kh\u1ea3 d\u1ee5ng","accessDeniedToUseLedgerDevice":"Truy c\u1eadp Ledger b\u1ecb t\u1eeb ch\u1ed1i","noAccountsFound":"Kh\xf4ng t\xecm th\u1ea5y t\xe0i kho\u1ea3n","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n c\u1ee7a b\u1ea1n","connecting1Account":"\u0110ang k\u1ebft n\u1ed1i 1 t\xe0i kho\u1ea3n","cantFindAnyAccount":"Kh\xf4ng th\u1ec3 t\xecm th\u1ea5y b\u1ea5t k\u1ef3 t\xe0i kho\u1ea3n n\xe0o \u0111\u01b0\u1ee3c li\xean k\u1ebft v\u1edbi Ledger n\xe0y. Vui l\xf2ng t\u1ea1o m\u1ed9t t\xe0i kho\u1ea3n NEAR m\u1edbi","orConnectAnAnotherLedger":"ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi v\xed Ledger kh\xe1c.","connecting":"\u0110ang k\u1ebft n\u1ed1i","ofAccounts":"c\u1ee7a t\xe0i kho\u1ea3n","failedToAutomatically":"Kh\xf4ng th\u1ec3 t\u1ef1 \u0111\u1ed9ng t\xecm id t\xe0i kho\u1ea3n. Nh\u1eadp th\u1ee7 c\xf4ng:","overviewTheListOfAuthorized":"T\u1ed5ng quan danh s\xe1ch c\xe1c t\xe0i kho\u1ea3n \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n, ho\xe0n t\u1ea5t \u0111\u0103ng nh\u1eadp b\u1eb1ng c\xe1ch b\u1ea5m v\xe0o n\xfat b\xean d\u01b0\u1edbi.","finish":"Ho\xe0n th\xe0nh"},"install":{"youllNeedToInstall":"B\u1ea1n s\u1ebd c\u1ea7n c\xe0i \u0111\u1eb7t","toContinueAfterInstalling":"\u0111\u1ec3 b\u1eaft \u0111\u1ea7u. Sau khi c\xe0i \u0111\u1eb7t xong","refreshThePage":"T\u1ea3i l\u1ea1i trang.","open":"M\u1edf"},"qr":{"copiedToClipboard":"\u0110\xe3 sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","failedToCopy":"Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m th\u1ea5t b\u1ea1i","scanWithYourMobile":"Qu\xe9t v\u1edbi \u0111i\u1ec7n tho\u1ea1i c\u1ee7a b\u1ea1n","copyToClipboard":" Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","preferTheOfficial":"Dialogue ch\xednh th\u1ee9c c\u1ee7a","open":"M\u1edf"},"walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile","instant-link":"V\xed t\u1ee9c th\xec"},"exportAccounts":{"chooseAWallet":"Ch\u1ecdn v\xed","transferYourAccounts":"Chuy\u1ec3n t\xe0i kho\u1ea3n","selectAWallet":"Ch\u1ecdn v\xed ph\xf9 h\u1ee3p v\u1edbi nhu c\u1ea7u c\u1ee7a b\u1ea1n, v\xed \u0111\u01b0\u1ee3c ch\u1ecdn c\u1ea7n h\u1ed7 tr\u1ee3 c\xe1c t\xe0i kho\u1ea3n \u0111ang s\u1eed d\u1ee5ng.","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n","afterDecide":"Sau khi ch\u1ecdn \u0111\u01b0\u1ee3c t\xe0i kho\u1ea3n b\u1ea1n c\xf3 chuy\u1ec3n.","disclaimer":"B\u1ea1n kh\xf4ng th\u1ec3 chuy\u1ec3n t\xe0i kho\u1ea3n n\u1ebfu t\xe0i kho\u1ea3n \u0111\xf3 ch\u01b0a \u0111\u01b0\u1ee3c nh\u1eadn ti\u1ec1n ho\u1eb7c ch\u01b0a ph\xe1t sinh giao d\u1ecbch tr\xean NEAR.","warning":"kh\xf4ng h\u1ed7 tr\u1ee3 xu\u1ea5t t\xe0i kho\u1ea3n. Vui l\xf2ng ch\u1ecdn v\xed kh\xe1c.","walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile"},"selectAccounts":{"title":"Ch\u1ecdn t\xe0i kho\u1ea3n \u0111\u1ec3 chuy\u1ec3n","button":"L\u1ea5y c\u1ee5m m\u1eadt kh\u1ea9u","deselectAll":"B\u1ecf ch\u1ecdn t\u1ea5t c\u1ea3","selectAll":"Ch\u1ecdn t\u1ea5t c\u1ea3","unavailable":"Chuy\u1ec3n kh\xf4ng kh\u1ea3 d\u1ee5ng","error":"T\xe0i kho\u1ea3n kh\xf4ng t\u1ed3n t\u1ea1i","warningLedger":"Y\xeau c\u1ea7u h\u1ed7 tr\u1ee3 Ledger","noBalance":"T\xe0i kho\u1ea3n tr\u1ed1ng"},"getPassphrase":{"title":"Sao ch\xe9p m\u1eadt kh\u1ea9u t\u1ea1m th\u1eddi","desc":"B\u1ea1n s\u1ebd c\u1ea7n nh\u1eadp m\u1eadt kh\u1ea9u khi b\u1eaft \u0111\u1ea7u xu\u1ea5t c\xe1c kho\u1ea3n t\u1edbi v\xed kh\xe1c.","button":"Ti\u1ebfp t\u1ee5c","label":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p","checkLabel":"T\xf4i \u0111\xe3 ch\xe9p ho\u1eb7c ghi l\u1ea1i m\u1eadt kh\u1ea9u"},"complete":{"title":"Ho\xe0n th\xe0nh chuy\u1ec3n","descOne":"B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng t\u1edbi t\xe0i kho\u1ea3n \u0111\xe3 ch\u1ecdn \u0111\u1ec3 ho\xe0n t\u1ea5t qu\xe1 tr\xecnh.","descTwo":"Sau khi nh\u1eadp, nh\u1ea5n n\xfat \u0111\u1ec3 ho\xe0n t\u1ea5t quy tr\xecnh chuy\u1ec3n.","button":"Ho\xe0n th\xe0nh"}}},"component":{"clickToCopy":{"label":"\u0110\xe3 sao ch\xe9p","tooltip":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p"}}}'),uz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f (Wallet) \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","whatIsAWallet":"\u0935\u0949\u0932\u0947\u091f \u0915\u094d\u092f\u093e \u0939\u0948?","secureAndManage":"\u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0947\u0902\u0964","safelyStore":"\u0905\u092a\u0928\u0940 \u0915\u094d\u0930\u093f\u092a\u094d\u091f\u094b\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090f\u0928\u090f\u092b\u091f\u0940 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u094d\u091f\u094b\u0930 \u0914\u0930 \u091f\u094d\u0930\u093e\u0902\u0938\u092b\u0930 \u0915\u0930\u0947\u0902\u0964","logInToAny":"NEAR \u092a\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0910\u092a \u092e\u0947\u0902 \u0938\u093e\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964","noNeedToCreate":"\u0928\u090f \u0916\u093e\u0924\u0947 \u092f\u093e \u0932\u0949\u0917\u093f\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f(NEAR Wallet)\u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092d \u0915\u0930\u0947\u0902\u0964","getAWallet":"\u090f\u0915 \u0935\u0949\u0932\u0947\u091f \u092c\u0928\u093e\u090f\u0901\u0964","useAWallet":"\u0905\u092a\u0928\u0940 NEAR \u0938\u0902\u092a\u0924\u094d\u0924\u093f\u092f\u094b\u0902 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0935\u0949\u0932\u0947\u091f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 NEAR \u0910\u092a (app) \u092e\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093f\u0938\u0940 \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e (user) \u0928\u093e\u092e \u0914\u0930 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964","connectionFailed":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0935\u093f\u092b\u0932|","connectionSuccessful":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0938\u092b\u0932|","connected":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0917\u092f\u093e|","connectingTo":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","connectingMessage":{"injected":"\u090f\u0915\u094d\u0938\u091f\u0947\u0902\u0936\u0928 \u0935\u093f\u0902\u0921\u094b \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","browser":"\u0930\u0940\u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u0939\u094b\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0935\u0949\u0932\u0947\u091f \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","hardware":"\u0915\u094b\u0932\u094d\u0921 \u0935\u0949\u0932\u0947\u091f \u0915\u0947 \u0938\u093e\u0925 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|"}},"ledger":{"connectWithLedger":"\u0932\u0947\u091c\u0930(Ledger)\u0935\u0949\u0932\u0947\u091f \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902|","makeSureYourLedger":"\u0938\u0941\u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0915\u0930\u0947\u0902 \u0915\u093f \u0906\u092a\u0915\u093e \u0932\u0947\u091c\u0930 \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092a \u0906\u092a\u0915\u0947 \u0921\u093f\u0935\u093e\u0907\u0938 (Device)\u092a\u0930 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093e \u0939\u0948|","continue":"\u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","specifyHDPath":"\u0939\u093e\u0930\u094d\u0921 \u0921\u093f\u0938\u094d\u0915(Hard Disk)\u092a\u0925(Path)\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0915\u0930\u0947|","enterYourPreferredHDPath":"\u0905\u092a\u0928\u093e \u090f\u091a\u0921\u0940 \u092a\u0925 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 \u0938\u0915\u094d\u0930\u093f\u092f \u0916\u093e\u0924\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","scan":"\u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947|","retry":"\u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947|","ledgerIsNotAvailable":"\u0932\u0947\u091c\u0930 \u0909\u092a\u0932\u092c\u094d\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|","accessDeniedToUseLedgerDevice":"\u0932\u0947\u091c\u0930 \u0921\u093f\u0935\u093e\u0907\u0938 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092a\u094d\u0930\u0935\u0947\u0936 \u0928\u093f\u0937\u0947\u0927|","noAccountsFound":"\u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e|","selectYourAccounts":"\u0905\u092a\u0928\u0947 \u0916\u093e\u0924\u0947 \u091a\u0941\u0928\u0947\u0902|","connecting1Account":"\u090f\u0915 \u0916\u093e\u0924\u093e \u0915\u0928\u0947\u0915\u094d\u091f \u0939\u094b \u0930\u0939\u093e \u0939\u0948|","cantFindAnyAccount":"\u0907\u0938 \u0932\u0947\u091c\u0930 \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0915\u094b\u0908 \u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e\u0964 \u0915\u0943\u092a\u092f\u093e \u090f\u0915 \u0928\u092f\u093e NEAR \u0916\u093e\u0924\u093e \u092c\u0928\u093e\u090f\u0901|","orConnectAnAnotherLedger":"\u0905\u0925\u0935\u093e \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091c\u0930 \u0935\u0949\u0932\u0947\u091f \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","connecting":"\u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","ofAccounts":"\u0916\u093e\u0924\u093e \u0905\u092c \u091c\u0941\u095c\u093e \u0928\u0939\u0940\u0902 \u0939\u0947|","failedToAutomatically":"\u0916\u093e\u0924\u093e \u0906\u0908\u0921\u0940 \u0938\u094d\u0935\u091a\u093e\u0932\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0916\u094b\u091c\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092a \u0938\u0947 \u0915\u094b\u0936\u093f\u0936 \u0915\u0930\u0947\u0902|","overviewTheListOfAuthorized":"\u0905\u0935\u0932\u094b\u0915\u0928 \u0905\u0927\u093f\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091a\u0940, \u0928\u0940\u091a\u0947 \u0926\u093f\u090f \u0917\u090f \u092c\u091f\u0928 \u092a\u0930 \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093f\u0928 \u092a\u0942\u0930\u093e \u0915\u0930\u0947\u0902\u0964","finish":"\u0938\u092e\u093e\u092a\u094d\u0924|"},"install":{"youllNeedToInstall":"\u0906\u092a\u0915\u094b \u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e|","toContinueAfterInstalling":"\u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","refreshThePage":"\u092a\u0941\u0928: \u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964","open":"\u0916\u094b\u0932\u0947|"},"qr":{"copiedToClipboard":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921(Clipboard)\u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u093f\u092f\u093e \u0917\u092f\u093e|","failedToCopy":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0928\u093e \u0935\u093f\u092b\u0932 \u0930\u0939\u093e|","scanWithYourMobile":"\u0905\u092a\u0928\u0947 \u092b\u094b\u0928 (Mobile)\u0938\u0947 \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","copyToClipboard":" \u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0947\u0902|","preferTheOfficial":"\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 \u0938\u0902\u0935\u093e\u0926 \u0915\u094b \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e \u0926\u0947\u0902|","open":"\u0916\u094b\u0932\u0947|"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),lz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0635\u0644 \u0645\u062d\u0641\u0638\u062a\u0643","whatIsAWallet":"\u0645\u0627 \u0647\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629\u061f","secureAndManage":"\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062a\u0644\u0643\u0627\u062a \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643","safelyStore":"\u0642\u0645 \u0628\u062a\u062e\u0632\u064a\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062a\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0628\u0623\u0645\u0627\u0646","logInToAny":"\u0633\u062c\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0625\u0644\u0649 \u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631","noNeedToCreate":".\u0644\u0627 \u062f\u0627\u0639\u064a \u0644\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062a\u0648\u0635\u064a\u0644 \u0645\u062d\u0641\u0638\u062a\u0643 \u0648\u0627\u0646\u0637\u0644\u0642","getAWallet":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0645\u062d\u0641\u0638\u0629","useAWallet":"\u0627\u0633\u062a\u062e\u062f\u0645 \u0645\u062d\u0641\u0638\u0629 \u0644\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064a\u0631 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643\u060c \u0648\u0627\u062f\u062e\u0644 \u0644\u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631 \u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631","connectionFailed":"\u0627\u062a\u0635\u0627\u0644 \u0641\u0627\u0634\u0644","connectionSuccessful":"\u0627\u062a\u0635\u0627\u0644 \u0646\u0627\u062c\u062d","connected":"\u0645\u062a\u0635\u0644","connectingTo":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628","connectingMessage":{"injected":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629","browser":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629 \u0628\u0639\u062f \u0625\u0639\u0627\u062f\u0629 \u062a\u0648\u062c\u064a\u0647","hardware":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631","bridge":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629"}},"ledger":{"connectWithLedger":"\u0627\u062a\u0635\u0644 \u0645\u0639 \u0644\u064a\u062f\u062c\u0631","makeSureYourLedger":"\u062a\u0623\u0643\u062f \u0623\u0646 \u0644\u064a\u062f\u062c\u0631 \u0645\u062a\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062a\u0637\u0628\u064a\u0642 \u0646\u064a\u0631 \u0645\u0641\u062a\u0648\u062d \u0641\u064a \u062c\u0647\u0627\u0632\u0643","continue":"\u062a\u0627\u0628\u0639","specifyHDPath":"\u062d\u062f\u062f \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628","enterYourPreferredHDPath":"\u0623\u062f\u062e\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060c \u062b\u0645 \u0627\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0646\u0634\u0637\u0629","scan":"\u0645\u0633\u062d","retry":"\u0623\u0639\u062f \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629","ledgerIsNotAvailable":"\u0644\u064a\u062f\u062c\u0631 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631","accessDeniedToUseLedgerDevice":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0644\u064a\u062f\u062c\u0631","noAccountsFound":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628\u0627\u062a","selectYourAccounts":"\u062d\u062f\u062f \u062d\u0633\u0627\u0628\u0627\u062a\u0643","connecting1Account":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062d\u0633\u0627\u0628 \u0648\u0627\u062d\u062f","cantFindAnyAccount":"\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628 \u0645\u0631\u062a\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064a\u062f\u062c\u0631 \u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u0646\u064a\u0631 \u062c\u062f\u064a\u062f \u0639\u0644\u0649","orConnectAnAnotherLedger":"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631 \u0622\u062e\u0631","connecting":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644","ofAccounts":"\u0645\u0646 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a","failedToAutomatically":"\u0641\u0634\u0644 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u062a\u0644\u0642\u0627\u0626\u064a\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u064a\u062f\u0648\u064a\u0627","overviewTheListOfAuthorized":"\u0644\u0627\u0626\u062d\u0629 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0645\u0635\u0631\u062d \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062f\u0646\u0627\u0647","finish":"\u0625\u0646\u0647\u0627\u0621"},"install":{"youllNeedToInstall":"\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u062b\u0628\u064a\u062a","toContinueAfterInstalling":"\u0644\u0644\u0627\u0633\u062a\u0643\u0645\u0627\u0644. \u0628\u0639\u062f \u0627\u0644\u062a\u062b\u0628\u064a\u062a","refreshThePage":"\u0642\u0645 \u0628\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u062d\u0629","open":"\u0627\u0641\u062a\u062d"},"qr":{"copiedToClipboard":"\u062a\u0645 \u0627\u0644\u0646\u0633\u062e","failedToCopy":"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062e","scanWithYourMobile":"\u0627\u0645\u0633\u062d \u0628\u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062d\u0645\u0648\u0644","copyToClipboard":"\u0646\u0633\u062e","preferTheOfficial":"\u062a\u0641\u0636\u0644 \u0627\u0644\u062d\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064a \u0644","open":"\u0641\u062a\u062d"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),fz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Spojite crypto nov\u010danik!","whatIsAWallet":"\u0160to je to crypto nov\u010danik?","secureAndManage":"Osigurajte i upravljajte svojom digitalnom imovinom.","safelyStore":"Sigurno pohranite i prebacite svoj crypto i NFT-eve.","logInToAny":" Prijavite se u bilo koju NEAR aplikaciju","noNeedToCreate":"Nema potrebe za stvaranjem novih naloga ili korisni\u010dkih podataka. Spojite svoj crypto nov\u010danik i spremni ste!","getAWallet":"Otvorite crypto nov\u010danik","useAWallet":"Koristite crypto nov\u010danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010dkog imena i lozinke.","connectionFailed":"Neuspje\u0161no povezivanje.","connectionSuccessful":"Uspje\u0161no povezivanje.","connected":"Povezano.","connectingTo":"Povezivanje u tijeku","connectingMessage":{"injected":"Potvrdite vezu u eksternom prozoru","browser":"Nakon redirekcije, potvrdite vezu u nov\u010daniku","hardware":"Potvrdite vezu sa nov\u010danikom","bridge":"Potvrdite vezu u nov\u010daniku"}},"ledger":{"connectWithLedger":"Pove\u017eite se hardverskim nov\u010danikom","makeSureYourLedger":"Osigurajte sigurnu vezu s hardverskim nov\u010danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju","continue":"Nastavite","specifyHDPath":"Specificirajte HD putanju","enterYourPreferredHDPath":"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge","scan":"Skenirajte","retry":"Poku\u0161ajte ponovno","ledgerIsNotAvailable":"Hardverski nov\u010danik nije dostupan.","accessDeniedToUseLedgerDevice":"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010danika","noAccountsFound":"Nalozi nisu prona\u0111eni","selectYourAccounts":"Odaberite svoje naloge","connecting1Account":"Povezivanje 1 naloga","cantFindAnyAccount":"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010danikom. Molimo vas, kreirajte novi NEAR nalog","orConnectAnAnotherLedger":"Ili pove\u017eite drugi hardverski nov\u010danik.","connecting":"Povezivanje","ofAccounts":"naloga","failedToAutomatically":"Neuspje\u0161no automatsko pronala\u017eenje ID naloga. Unesite ru\u010dno:","overviewTheListOfAuthorized":"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017ee prikazani gumb.","finish":"Zavr\u0161ite"},"install":{"youllNeedToInstall":" Potrebno je instalirati modal","toContinueAfterInstalling":"za nastavak. Nakon instalacije","refreshThePage":"osvje\u017eite stranicu.","open":"Otvorite QR modal"},"qr":{"copiedToClipboard":"Kopirano u me\u0111uspremnik","failedToCopy":"Neupsje\u0161no kopiranje u me\u0111uspremnik","scanWithYourMobile":"Skenirajte svojim mobilnim ure\u0111ajem","copyToClipboard":" Kopirajte u me\u0111uspremnik","preferTheOfficial":"Odaberite slu\u017ebeni dijalog","open":"Otvorite"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Odaberi Wallet","transferYourAccounts":"Prenesi svoje naloge","selectAWallet":"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017eava va\u0161e povezane naloge.","selectYourAccounts":"Odaberi svoje naloge","afterDecide":"Nakon \u0161to odlu\u010dite koji wallet koristite, mo\u017eete odabrati koje ra\u010dune \u017eelite prebaciti.","disclaimer":"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.","warning":"ne podr\u017eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Odaberi naloge za prijenos","button":"Generiraj lozinku","deselectAll":"Makni odabir sa svih","selectAll":"Odaberi sve","unavailable":"Prijenos nije dostupan","error":"Nalog ne postoji","warningLedger":"Potrebna ledger podr\u0161ka","noBalance":"Nalog nema sredstava"},"getPassphrase":{"title":"Kopiraj privremenu lozinku","desc":"Bit \u0107e potrebno unijeti ovu lozinku na po\u010detku izvoza naloga na drugi wallet.","button":"Nastavi","label":"Klikni za kopiju","checkLabel":"Kopirao sam ili zapisao lozinku"},"complete":{"title":"Zavr\u0161i prijenos","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.","button":"Zavr\u0161i"}}}}'),dz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u043e \u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0438 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u041d\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0438\u043d\u0433\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0438 \u0441\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0432\u0435\u043d\u0438!","getAWallet":"\u041d\u0430\u043f\u0440\u0430\u0432\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u043e\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0438\u043c\u0438\u045a\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0438.","connectionFailed":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043d\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.","connectionSuccessful":"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435.","connected":"\u041f\u043e\u0432\u0440\u0437\u0430\u043d\u043e.","connectingTo":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u0441\u043e","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0432\u043e \u0435\u043a\u0441\u0442\u0435\u0440\u043d\u0438\u043e\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","browser":"\u041f\u043e \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0443\u0432\u0430\u045a\u0435\u0442\u043e, \u043f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043e\u0434 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043e\u043a\u0442","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0441\u043e \u043b\u0430\u0434\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043a\u0430\u0442\u0430 \u0432\u043e \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u0442"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043e \u041b\u0435\u045f\u0435\u0440","makeSureYourLedger":"\u041e\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043a\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u041b\u0435\u045f\u0435\u0440 \u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e, \u0438 \u0434\u0435\u043a\u0430 NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u0443\u0440\u0435\u0434","continue":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430","enterYourPreferredHDPath":"\u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0430 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430, \u0430 \u043f\u043e\u0442\u043e\u0430 \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043d\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041e\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e","ledgerIsNotAvailable":"\u041b\u0435\u045f\u0435\u0440\u043e\u0442 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0430\u043f\u043e\u0442 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u045a\u0435 \u043d\u0430 \u041b\u0435\u045f\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043e\u0434\u0431\u0438\u0435\u043d","noAccountsFound":"\u041d\u0435\u043c\u0430 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438","connecting1Account":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u0435\u0434\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","cantFindAnyAccount":"\u041d\u0435 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u0441\u043e \u043e\u0432\u043e\u0458 \u041b\u0435\u045f\u0435\u0440. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u043a\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u043e\u0432\u0430 NEAR \u0441\u043c\u0435\u0442\u043a\u0430 ","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041b\u0435\u045f\u0435\u0440.","connecting":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0438","failedToAutomatically":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u0431\u0430\u0440\u0430\u045a\u0435 \u043d\u0430 \u0418\u0414 \u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430. \u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0433\u043e \u0440\u0430\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043b\u0438\u0441\u0442\u0430\u0442\u0430 \u043d\u0430 \u043e\u0432\u043b\u0430\u0441\u0442\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u043f\u043e\u0434\u043e\u043b\u0443.","finish":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435. \u041f\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0435\u0442\u043e","refreshThePage":"\u041e\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043d\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u043e\u0442","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0441\u043a\u0438 \u0443\u0440\u0435\u0434","copyToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0458\u0430\u043b\u0435\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u041e\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u0444\u0440\u043b\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectAWallet":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458 \u0433\u0438 \u0437\u0430\u0434\u043e\u0432\u043e\u043b\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043d\u045a\u0430 \u0438 \u0433\u0438 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438.","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","afterDecide":"\u041e\u0434\u043a\u0430\u043a\u043e \u045c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0441\u0430\u043a\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","disclaimer":"\u041d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u0444\u0440\u043b\u0430\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0438\u043a\u043e\u0433\u0430\u0448 \u043d\u0435 \u0431\u0438\u043b\u0435 \u043d\u0430\u0434\u043e\u043f\u043e\u043b\u043d\u0430\u0442\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u043d\u0435 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0432\u043e \u043e\u0432\u043e\u0458 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","deselectAll":"\u041e\u0442\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435","selectAll":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043e\u0442 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d","error":"\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0430\u0442\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u0435 \u043f\u043e\u0434\u0434\u0440\u0448\u043a\u0430 \u043e\u0434 \u041b\u0435\u045f\u0435\u0440","noBalance":"\u0421\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0430"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0430\u0442\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","desc":"\u040c\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0430\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430 \u043a\u043e\u0433\u0430 \u045c\u0435 \u0437\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0442\u0435","checkLabel":"\u0408\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0448\u0430\u0432 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u0442\u0430"},"complete":{"title":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043e \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442","descOne":"\u0421\u0435\u0433\u0430 \u045c\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","descTwo":"\u041e\u0442\u043a\u0430\u043a\u043e \u045c\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043e\u0437\u043e\u0442 \u043e\u0434 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0433\u043e \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u0437\u0430 \u0434\u0430 \u0433\u043e \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","button":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}}}'),hz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Pove\u017eite svojo denarnico!","whatIsAWallet":"Kaj je denarnica?","secureAndManage":"Zavarujte in upravljajte svoja digitalna sredstva.","safelyStore":"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.","logInToAny":"Prijavite se v katero koli aplikacijo na NEAR","noNeedToCreate":"Ni vam treba ustvarjati novih ra\u010dunov. Pove\u017eite svojo denarnico in za\u010dnite!","getAWallet":"Ustvarite denarnico","useAWallet":"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR","connectionFailed":"Povezava ni bila uspe\u0161na.","connectionSuccessful":"Povezava je bila uspe\u0161na.","connected":"Va\u0161a denarnica je povezana.","connectingTo":"Povezovanje z","connectingMessage":{"injected":"Potrdite povezavo v oknu raz\u0161iritve","browser":"Po preusmeritvi potrdite povezavo v denarnici","hardware":"Potrdite povezavo s hladno denarnico","bridge":"Potrdite povezavo v denarnici"}},"ledger":{"connectWithLedger":"Pove\u017eite se z Ledger","makeSureYourLedger":"Prepri\u010dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi","continue":"Nadaljuj","specifyHDPath":"Dolo\u010dite HD pot","enterYourPreferredHDPath":"Vnesite \u017eeleno HD pot, nato poi\u0161\u010dite vse aktivne ra\u010dune.","scan":"Skenirajte","retry":"Poskusite znova","ledgerIsNotAvailable":"Ledger ni na voljo","accessDeniedToUseLedgerDevice":"Dostop za uporabo naprave Ledger zavrnjen","noAccountsFound":"Ni najdenih ra\u010dunov","selectYourAccounts":"Izberite Va\u0161i ra\u010duni","connecting1Account":"Povezovanje enega ra\u010duna","cantFindAnyAccount":"Ni mogo\u010de najti nobenega ra\u010duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010dun ","orConnectAnAnotherLedger":"ali pove\u017eite drug Ledger..","connecting":"Povezovanje","ofAccounts":"ra\u010dunov","failedToAutomatically":"ID-ja ra\u010duna ni bilo mogo\u010de samodejno najti. Zagotovite ga ro\u010dno:","overviewTheListOfAuthorized":"Oglejte si seznam poobla\u0161\u010denih ra\u010dunov, dokon\u010dajte prijavo s klikom na spodnji gumb.","finish":"Kon\u010dajte"},"install":{"youllNeedToInstall":"Morali ga boste namestiti","toContinueAfterInstalling":"nadaljevati. Po namestitvi","refreshThePage":"Osve\u017eite stran.","open":"Odprite"},"qr":{"copiedToClipboard":"Kopirano v podlo\u017eni mapi","failedToCopy":"Kopiranje v podlo\u017eni mapi ni uspelo","scanWithYourMobile":"Skenirajte s svojo mobilno napravo","copyToClipboard":" Kopirajte v podlo\u017eni mapi","preferTheOfficial":"Preferirajte uradno pogovorno okno","open":"Odprite"},"walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},"exportAccounts":{"chooseAWallet":"Izberite denarnico","transferYourAccounts":"Prenesite svoje ra\u010dune","selectAWallet":"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010dune.","selectYourAccounts":"Izberite va\u0161i ra\u010duni","afterDecide":"Ko se odlo\u010dite za denarnico, lahko izberete, katere ra\u010dune \u017eelite prenesti.","disclaimer":"Ne boste mogli prenesti Ra\u010dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.","warning":"trenutno ne podpira izvoza ra\u010duna. Izberite drugo denarnico","walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica"},"selectAccounts":{"title":"Izberite ra\u010duni za prenos.","button":"Pridobite geslo","deselectAll":"Prekli\u010di izbiro vseh","selectAll":"Izberi vse","unavailable":"Prenos ni na voljo","error":"Ra\u010dun ne obstaja","warningLedger":"Potrebna je podpora za Ledger","noBalance":"Ra\u010dun ni financiran"},"getPassphrase":{"title":"Kopiraj za\u010dasno geslo","desc":"To geslo boste morali vnesti, ko boste za\u010deli izva\u017eati svoje ra\u010dune v drugo denarnico.","button":"Nadaljujte","label":"Kliknite za kopiranje","checkLabel":"Geslo sem kopiral ali zapisal"},"complete":{"title":"Dokon\u010dajte prenos","descOne":"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010danje prenosa.","descTwo":"Ko je uvozni del postopka kon\u010dan iz izbrane denarnice, pritisnite gumb za dokon\u010danje postopka prenosa.","button":"Kon\u010dajte"}}}}'),pz=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0458 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u0430 \u0458\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u041e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043e\u0458\u043e\u043c \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u043e\u043c \u0438\u043c\u043e\u0432\u0438\u043d\u043e\u043c.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043f\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u0443\u0442\u0435 \u0438 NFT.","logInToAny":"\u041f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0438\u043b\u0438 \u0430\u043a\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0438 \u0441\u043f\u0440\u0435\u043c\u043d\u0438 \u0441\u0442e!","getAWallet":"\u041d\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0434\u0430 \u043e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043e\u0458\u0438\u043c NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043c\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u043c\u0430.","connectionFailed":"\u0412\u0435\u0437\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u043e\u0441\u0442\u0430\u0432\u0459\u0435\u043d\u0430.","connectionSuccessful":"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u0430.","connected":"\u041f\u043e\u0432\u0435\u0437\u0430\u043d.","connectingTo":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u043d\u0430","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043f\u043e\u0459\u043d\u043e\u043c \u043f\u0440\u043e\u0437\u043e\u0440\u0443","browser":"\u041d\u0430\u043a\u043e\u043d \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0430\u0432\u0430\u045a\u0430, \u043f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0443","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043b\u0430\u0434\u043d\u0438\u043c \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 NEAR \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0440\u0435\u0452\u0430\u0458\u0443","continue":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443","enterYourPreferredHDPath":"\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043d\u0443 \u0436\u0435\u0459\u0435\u043d\u0443 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443, \u0430 \u0437\u0430\u0442\u0438\u043c \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041f\u043e\u043a\u0443\u0448\u0430\u0458 \u043f\u043e\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0443\u043f \u0458\u0435 \u043e\u0434\u0431\u0438\u0458\u0435\u043d \u0437\u0430 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u045a\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430","noAccountsFound":"\u041d\u0430l\u043e\u0437\u0438 \u043d\u0438\u0441\u0443 \u043f\u0440\u043e\u043d\u0430\u0452\u0435\u043d\u0438","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043d\u0430l\u043e\u0433","connecting1Account":"\u041f\u043e\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043d\u0430l\u043e\u0433","cantFindAnyAccount":"\u041d\u0438\u0458\u0435 \u043c\u043e\u0433\u0443\u045b\u0435 \u043f\u0440\u043e\u043d\u0430\u045b\u0438 \u043d\u0438\u0458\u0435\u0434\u0430\u043d \u043d\u0430l\u043e\u0433 \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0441\u0430 \u043e\u0432\u0438\u043c Ledger-\u043e\u043c. \u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0438 NEAR \u043d\u0430l\u043e\u0433","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.","connecting":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430l\u043e\u0433\u0430","failedToAutomatically":"\u0410\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u043f\u0440\u043e\u043d\u0430\u043b\u0430\u0436\u0435\u045a\u0435 ID-a \u043d\u0430l\u043e\u0433\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e. \u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0458\u0442\u0435 \u043b\u0438\u0441\u0442\u0443 \u043e\u0432\u043b\u0430\u0448\u045b\u0435\u043d\u0438\u0445 \u0440\u0430\u0447\u0443\u043d\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0443 \u043a\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u0434\u0443\u0433\u043c\u0435 \u0438\u0441\u043f\u043e\u0434.","finish":"\u0417\u0430\u0432\u0440\u0448\u0438"},"install":{"youllNeedToInstall":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u0430\u043a. \u041d\u0430\u043a\u043e\u043d \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0430","refreshThePage":"\u043f\u043e\u043d\u043e\u0432\u043e \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","failedToCopy":"\u041a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u043f\u043e\u043c\u043e\u045b\u0443 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043d\u0438\u0447\u043d\u0438 \u0434\u0438\u0458\u0430\u043b\u043e\u0433 \u043e\u0434","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","selectAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u043e\u0434\u0433\u043e\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0430\u043c\u0430 \u0438 \u043a\u043e\u0458\u0438 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0437\u0430\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","afterDecide":"\u041d\u0430\u043a\u043e\u043d \u0448\u0442\u043e \u0441\u0435 \u043e\u0434\u043b\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435.","disclaimer":"\u041d\u0435\u045b\u0435\u0442\u0435 \u043c\u043e\u045b\u0438 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0458\u0438 \u043d\u0438\u043a\u0430\u0434\u0430 \u043d\u0438\u0441\u0443 \u0431\u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u0442\u0440\u0435\u043d\u0443\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043e\u0437 \u043d\u0430\u043b\u043e\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0437\u0430 \u043f\u0440\u0435\u043d\u043e\u0441.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043d\u0443 \u0444\u0440\u0430\u0437\u0443","deselectAll":"\u041f\u043e\u043d\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043e\u0440","selectAll":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d","error":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u043f\u043e\u0434\u0440\u0448\u043a\u0430 \u0437\u0430 Ledger","noBalance":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0438\u0458\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443","desc":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0443\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443 \u043a\u0430\u0434\u0430 \u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043e\u0437\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u0430\u043b\u0438","checkLabel":"\u041a\u043e\u043f\u0438\u0440\u0430\u043e \u0441\u0430\u043c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043e \u043b\u043e\u0437\u0438\u043d\u043a\u0443"},"complete":{"title":"\u0414\u043e\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440","descOne":"\u0421\u0430\u0434\u0430 \u045b\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0435\u043d\u0438 \u043d\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440.","descTwo":"\u041a\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u0443\u0432\u043e\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u0434\u0443\u0433\u043c\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u0440\u0435\u043d\u043e\u0441\u0430.","button":"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}}}');let AI;const _I=(t,e)=>{if(!t)return"";const r=e.indexOf(".");if(r>-1){const a=e.substring(0,r),A=e.substring(r+1);return _I(t[a],A)}return t[e]},zn=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;const r=(t=>-1!==t.indexOf("-")?t.split("-")[0]:t.split("_")[0])(AI||e),a=(t=>{switch(t){case"en":default:return EI;case"es":return iz;case"zh":return oz;case"bg":return sz;case"ko":return az;case"vi":return cz;case"hi":return uz;case"ar":return lz;case"hr":return fz;case"mk":return dz;case"sl":return hz;case"sr":return pz}})(r),A=_I(a,t);return A&&"string"==typeof A?A:t},Mg='\n\n \n \n',Lc='\n\n \n \n \n';function A3(t,e){return _3.apply(this,arguments)}function _3(){return _3=(0,Ke.Z)(function*(t,e){if(jn){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${zn("modal.ledger.selectYourAccounts")}

\n \n
\n
\n
\n \n
\n `;for(let r=0;r
\n `);document.getElementById("change-derivation-path-button")?.addEventListener("click",()=>{MI(t)}),document.getElementById("connect-button")?.addEventListener("click",r=>{r.preventDefault();const a=Array.from(document.querySelectorAll("input[name='account']")).map(O=>O.checked),A=e.filter((O,J)=>a[J]);A.length<1||x3(t,e,A)})}}),_3.apply(this,arguments)}const vz='\n\n \n \n \n';function pw(t,e){return S3.apply(this,arguments)}function S3(){return S3=(0,Ke.Z)(function*(t,e){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
${t.metadata.name}
\n

${t.metadata.name}

\n
\n
\n
\n
\n ${vz}\n ${zn("modal.wallet.connectionFailed")}\n
\n

${e&&e.message?e.message:""}

\n ${!t?.metadata.deprecated&&t?.metadata.available?``:""}\n
\n
\n
\n
\n
\n
\n `,document.getElementById("retry-button")?.addEventListener("click",()=>{xv(t,!1)})}),S3.apply(this,arguments)}function x3(t,e,r){return M3.apply(this,arguments)}function M3(){return M3=(0,Ke.Z)(function*(t,e,r){document.querySelector(".modal-right").innerHTML=`\n
\n
\n \n
\n

\n ${zn("modal.ledger.connecting")} ${r.length} ${zn("modal.ledger.ofAccounts")}\n

\n \n
\n
\n
\n
\n

\n ${zn("modal.ledger.overviewTheListOfAuthorized")}\n

\n
\n
\n \n
\n
\n
\n
\n `;for(let a=0;a\n \n \n `);document.getElementById("back-button")?.addEventListener("click",()=>{A3(t,e)}),document.getElementById("finish-button")?.addEventListener("click",(0,Ke.Z)(function*(){try{if(!jn)return;(yield t.wallet()).signIn({contractId:jn.options.contractId,methodNames:jn.options.methodNames,accounts:r}),jn.container.children[0].classList.remove("open"),jn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(a){yield pw(t,a)}}))}),M3.apply(this,arguments)}function SI(t){return I3.apply(this,arguments)}function I3(){return I3=(0,Ke.Z)(function*(t){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${zn("modal.ledger.noAccountsFound")}\n

\n \n
\n
\n
\n
\n

\n ${zn("modal.ledger.cantFindAnyAccount")}\n MyNearWallet\n ${zn("modal.ledger.orConnectAnAnotherLedger")}\n

\n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{D3(t)})}),I3.apply(this,arguments)}function xI(){return C3.apply(this,arguments)}function C3(){return C3=(0,Ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n
\n \n ${zn("modal.wallet.connectingTo")} ${t?.metadata.name}...\n \n
\n
\n \n ${zn("modal.wallet.connectingMessage."+t?.type)}\n \n
\n
\n
\n
\n `}),C3.apply(this,arguments)}const bz='\n\n \n',wz='\n\n \n';function MI(t){if(!jn)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${zn("modal.ledger.specifyHDPath")}\n

\n \n
\n
\n
\n
\n
\n
44'/397'/0'/0'/
\n
\n
\n
\n \n \n
\n
\n
\n

\n ${zn("modal.ledger.enterYourPreferredHDPath")}\n

\n \n
\n \n
\n
\n
\n
\n `;const e=document.getElementById("derivation-path-index");e.innerText=jn.derivationPath.slice(-2,-1),document.getElementById("increase-index-button")?.addEventListener("click",()=>{if(!jn)return;const r=parseInt(e.innerText)+1;jn.derivationPath=jn.derivationPath.slice(0,-2)+r.toString()+"'",e.innerText=r.toString()}),document.getElementById("decrease-index-button")?.addEventListener("click",()=>{if(!jn)return;const r=parseInt(e.innerText)-1;jn.derivationPath=jn.derivationPath.slice(0,-2)+r.toString()+"'",r>=0&&(e.innerText=r.toString())}),document.getElementById("back-button")?.addEventListener("click",()=>{D3(t)}),document.getElementById("scan-button")?.addEventListener("click",(0,Ke.Z)(function*(){try{const r=yield t.wallet();xI(t);const a=yield OI(r);if(!a||a.length<1)return SI(t);1===a.length&&x3(t,a,a),A3(t,a)}catch(r){yield pw(t,r)}}))}const Ez='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';function D3(t){jn&&(jn.derivationPath=RI,document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${zn("modal.ledger.connectWithLedger")}\n

\n \n
\n
\n
\n
\n
\n ${Ez}\n
\n
\n

${zn("modal.ledger.makeSureYourLedger")}

\n

${zn("modal.ledger.specifyHDPath")}

\n
\n
\n
\n
\n
\n `,document.getElementById("continue-button")?.addEventListener("click",()=>{xv(t,!1)}),document.getElementById("specify-derivation-path-button")?.addEventListener("click",()=>{MI(t)}))}const Az='\n\n \n \n \n \n \n \n \n',_z='\n\n \n \n \n';function II(t){if(!jn)return;let e="";return"injected"===t.type&&(e=t.metadata.downloadUrl),"browser"===t.type&&(e=t.metadata.walletUrl),e}function CI(){return T3.apply(this,arguments)}function T3(){return(T3=(0,Ke.Z)(function*(){if(!jn)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n \n
\n

${zn("modal.wallet.getAWallet")}

\n \n
\n
\n
\n\n
\n
\n
\n `;const e=jn.modules.filter(r=>"bridge"!==r.type&&"hardware"!==r.type&&"instant-link"!==r.type);for(let r=0;r\n
\n ${a&&O?`${Az}`:!a&&O?`${_z}`:""}\n\n
\n
\n
\n
\n
${e[r].metadata.name}
\n
${zn(`modal.walletTypes.${A||e[r].type}`)}
\n
\n \n`)}Array.from(document.querySelectorAll(".single-wallet-get")).forEach(r=>{r.addEventListener("click",()=>{if(!jn)return;const a=jn.modules.find(O=>O.id===r.id);if(!a)return;const A=II(a);A&&window.open(A,"_blank")})}),document.getElementById("back-button")?.addEventListener("click",()=>{O3()})})).apply(this,arguments)}const Sz='\n\n \n',xz='\n\n \n \n \n';function O3(){return N3.apply(this,arguments)}function N3(){return(N3=(0,Ke.Z)(function*(){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n
\n

${zn("modal.wallet.whatIsAWallet")}

\n \n
\n
\n\n
\n
\n
\n ${Sz}\n
\n
\n

${zn("modal.wallet.secureAndManage")}

\n

${zn("modal.wallet.safelyStore")}

\n
\n
\n\n
\n
\n ${xz}\n
\n
\n

${zn("modal.wallet.logInToAny")}

\n

${zn("modal.wallet.noNeedToCreate")}

\n
\n
\n\n
\n \n
\n\n
\n

\n ${zn("modal.wallet.useAWallet")}\n

\n \n
\n\n
\n \n
\n\n
\n
\n `,document.getElementById("get-a-wallet-button")?.addEventListener("click",()=>{CI()}),document.getElementById("get-a-wallet-button-mobile")?.addEventListener("click",()=>{CI()})})).apply(this,arguments)}const Iz='\n\n \n \n';function DI(){return P3.apply(this,arguments)}function P3(){return P3=(0,Ke.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n ${Iz}\n \n ${zn("modal.wallet.connectionSuccessful")}\n \n
\n
\n
\n
\n `}),P3.apply(this,arguments)}var Cz=u(89093),Dz=u.n(Cz),Tz=u(3259);const Oz='\n\n \n \n';function R3(){return R3=(0,Ke.Z)(function*(t,e){function a(){return(a=(0,Ke.Z)(function*(oe){return yield Tz.toString(oe,{margin:0,type:"svg"})})).apply(this,arguments)}const A=yield function r(oe){return a.apply(this,arguments)}(e.uri);document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${zn("modal.qr.scanWithYourMobile")}

\n \n
\n
\n
\n ${A}\n
\n
\n
\n ${Oz}\n ${zn("modal.qr.copyToClipboard")}\n
\n
\n
\n

${zn("modal.qr.preferTheOfficial")} ${t.metadata.name}?

\n \n
\n
\n
\n`,document.getElementById("continue-button")?.addEventListener("click",()=>{xv(t,!1)});const O=document.getElementById("copy-uri-to-clipboard"),J=document.getElementById("uri-copy-notification"),ee=oe=>{J&&O&&(J.innerHTML=oe,J.style.display="block",O.style.display="none")},ie=()=>{J&&O&&(O.style.display="flex",J.style.display="none")};document.getElementById("copy-uri-to-clipboard")?.addEventListener("click",()=>{e.uri&&(Dz()(e.uri)?(ee(zn("modal.qr.copiedToClipboard")),setTimeout(()=>ie(),1200)):(ee(zn("modal.qr.failedToCopy")),setTimeout(()=>ie(),1200)))}),document.getElementById("default-modal-trigger")?.addEventListener("click",()=>{e.handleOpenDefaultModal()})}),R3.apply(this,arguments)}const Pz='\n\n \n \n \n ';let TI=!0;const Rz=function(){var t=(0,Ke.Z)(function*(e){if(!jn)return[];const r=yield fetch(`${jn.selector.options.network.indexerUrl}/publicKey/ed25519:${e}/accounts`);if(!r.ok)throw new Error("Failed to get account id from public key");const a=yield r.json();return Array.isArray(a)&&a.length?a:[]});return function(r){return t.apply(this,arguments)}}(),OI=function(){var t=(0,Ke.Z)(function*(e){if(!jn)return[];const r=yield e.getPublicKey(jn.derivationPath);try{return(yield Rz(r)).map((A,O)=>({derivationPath:jn.derivationPath,publicKey:r,accountId:A,selected:0===O}))}catch{return null}});return function(r){return t.apply(this,arguments)}}();function xv(t){return k3.apply(this,arguments)}function k3(){return k3=(0,Ke.Z)(function*(t,e=!1){if(!jn)return;const{selectedWalletId:r}=jn.selector.store.getState();if(r!==t.id)try{if("injected"===t.type&&!t.metadata.available)return function Mz(t){jn&&(document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n

\n ${t.metadata.name}\n

\n
\n

\n ${zn("modal.install.youllNeedToInstall")} ${t.metadata.name}\n ${zn("modal.install.toContinueAfterInstalling")}\n  \n ${zn("modal.install.refreshThePage")}\n \n

\n
\n \n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{O3()}),document.getElementById("refresh-page-lint")?.addEventListener("click",()=>{window.location.reload()}),document.getElementById("download-button")?.addEventListener("click",()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")}))}(t);if(t.metadata.deprecated)return pw(t,new Error("Wallet is deprecated"));const a=yield t.wallet();if(yield xI(t),"hardware"===a.type){const A=yield OI(a);return!A||A.length<1?SI(t):1===A.length?x3(t,A,A):A3(t,A)}if("bridge"===a.type){const A=jn.selector.on("uriChanged",({uri:O})=>{!function Nz(t,e){return R3.apply(this,arguments)}(t,{uri:O,handleOpenDefaultModal:()=>{xv(t,!0)}})});return yield a.signIn({contractId:jn.options.contractId,methodNames:jn.options.methodNames,qrCodeModal:e}),A.remove(),jn.container.children[0].classList.remove("open"),void jn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}if("browser"===a.type)return yield a.signIn({contractId:jn.options.contractId,methodNames:jn.options.methodNames,successUrl:a.metadata.successUrl,failureUrl:a.metadata.failureUrl}),jn.container.children[0].classList.remove("open"),void jn.emitter.emit("onHide",{hideReason:"wallet-navigation"});yield a.signIn({contractId:jn.options.contractId,methodNames:jn.options.methodNames}),jn.container.children[0].classList.remove("open"),jn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(a){const{name:A}=t.metadata,O=a&&"object"==typeof a&&"message"in a?a.message:"Something went wrong";yield pw(t,new Error(`Failed to sign in with ${A}: ${O}`))}else DI(t)}),k3.apply(this,arguments)}function gw(t,e){if(jn)for(let r=0;r\n
${A}
\n
\n
${A}
\n
${O}
\n
\n ${a.metadata.deprecated?`\n
\n ${Pz}\n
\n `:""}\n \n `),document.getElementById("module-"+a.id)?.addEventListener("click",()=>{if(document.querySelectorAll(".selected-wallet").forEach(ee=>{ee.classList.remove("selected-wallet")}),document.getElementById("module-"+a.id)?.classList.add("selected-wallet"),"hardware"===a.type)return D3(a);xv(a,!1)})}}function NI(){if(!jn)return;jn.container.innerHTML=`\n
\n
\n
\n \n \n
\n
\n `;const t=[],e=[];jn.modules.forEach(r=>{jn?.selector.store.getState().recentlySignedInWallets.includes(r.id)?e.push(r):t.push(r)}),jn.selector.options.optimizeWalletOrder&&e.length>0?(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
Recent
\n
\n
\n '),document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
More
\n
\n
\n '),gw(".recent-options-list-content",e),jn.selector.options.randomizeWalletOrder?gw(".more-options-list-content",t.sort(()=>Math.random()-.5)):gw(".more-options-list-content",t)):(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'
'),gw(".options-list",jn.modules)),document.querySelector(".nws-modal-overlay")?.addEventListener("click",()=>{jn&&(jn.container.children[0].classList.remove("open"),jn.emitter.emit("onHide",{hideReason:"user-triggered"}))}),TI&&(document.addEventListener("click",r=>{if(!jn)return;const a=r.target;a&&"close-button"===a.className&&(jn.container.children[0].classList.remove("open"),jn.emitter.emit("onHide",{hideReason:"user-triggered"}))}),TI=!1)}const PI="near-wallet-selector-modal",RI="44'/397'/0'/0'/1'";let L3=null,jn=null;if(typeof window<"u"){const t=document.createElement("div");t.id=PI,document.body.appendChild(t)}const kz=(t,e)=>{const r=new y3;t.store.getState().modules.forEach(function(){var A=(0,Ke.Z)(function*(O){if("topLevelInjected"in O.metadata){if(!O.metadata.topLevelInjected)return;const J=yield O.wallet();if("injected"!==J.type)return;yield J.signIn({contractId:e.contractId,methodNames:e.methodNames})}});return function(O){return A.apply(this,arguments)}}()),jn={container:document.getElementById(PI),selector:t,options:e,route:{name:"WalletOptions"},modules:[],derivationPath:RI,emitter:r},jn.selector.store.observable.subscribe(A=>{jn&&(t.options.optimizeWalletOrder&&(A.modules.sort((O,J)=>O.metadata.deprecated===J.metadata.deprecated?0:O.metadata.deprecated?1:-1),A.modules.sort((O,J)=>J.metadata.available===O.metadata.available?0:J.metadata.available?1:-1)),jn.modules=A.modules)});return window.addEventListener("keydown",A=>{if("Escape"===A.key){if(!jn)return;jn.container.children[0].classList.remove("open"),jn.emitter.emit("onHide",{hideReason:"user-triggered"})}}),NI(),L3||(L3={show:()=>{if(!jn)return;(t=>{AI=t})(jn.selector.options.languageCode),NI();const A=jn.selector.store.getState().selectedWalletId;if(A){DI(jn.modules.find(J=>J.id===A))}else O3();jn.container.children[0].classList.add("open")},hide:()=>{jn&&jn.container.children[0].classList.remove("open")},on:(A,O)=>jn.emitter.on(A,O),off:(A,O)=>{jn.emitter.off(A,O)}}),L3};var uc=u(48214),kI=u.n(uc);const Lz="data:image/png;base64,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",Bz=()=>kc(()=>!!window.near?.isSender).catch(()=>!1),Fz=function(){var t=(0,Ke.Z)(function*({options:e,metadata:r,store:a,provider:A,emitter:O,logger:J,id:ee}){const ie={wallet:window.near},de=function(){var We=(0,Ke.Z)(function*(){if(!ie.wallet.isSignedIn())return;(()=>{for(const We in ie.wallet.callbacks)ie.wallet.remove(We)})();const $e=yield ie.wallet.signOut();if(!0===$e)return;const ht=new Error("string"==typeof $e.error?$e.error:$e.error.type);if("User reject"===ht.message)throw ht;J.log("Failed to sign out"),J.error(ht)});return function(){return We.apply(this,arguments)}}(),be=()=>{ie.wallet.on("accountChanged",function(){var We=(0,Ke.Z)(function*($e){J.log("onAccountChange",$e),O.emit("signedOut",null)});return function($e){return We.apply(this,arguments)}}()),ie.wallet.on("rpcChanged",function(){var We=(0,Ke.Z)(function*($e){J.log("onNetworkChange",$e),e.network.networkId!==$e.networkId&&(yield de(),O.emit("signedOut",null),O.emit("networkChanged",{networkId:$e.networkId}))});return function($e){return We.apply(this,arguments)}}())},Ee=function(){var We=(0,Ke.Z)(function*(){const{selectedWalletId:$e}=a.getState();$e===ee&&(yield kc(()=>!!ie.wallet?.isSignedIn(),{timeout:1e3}).catch());const ht=ie.wallet.getAccountId();if(!ht)return[];yield kc(()=>!!ie.wallet.account(),{timeout:100});const ct=ie.wallet.account();if(!ct.connection.signer.getPublicKey)return[{accountId:ht,publicKey:void 0}];const wt=yield ct.connection.signer.getPublicKey(ct.accountId,e.network.networkId);return[{accountId:ht,publicKey:wt?wt.toString():void 0}]});return function(){return We.apply(this,arguments)}}(),Ie=We=>{if(!(We=>We.every($e=>"FunctionCall"===$e.type))(We))throw new Error(`Only 'FunctionCall' actions types are supported by ${r.name}`);return We.map(ht=>ht.params)},Ue=We=>We.map($e=>({receiverId:$e.receiverId,actions:Ie($e.actions)}));return ie.wallet&&ie.wallet.isSignedIn()&&be(),{signIn:({contractId:We,methodNames:$e})=>(0,Ke.Z)(function*(){const ht=yield Ee();if(ht.length)return ht;const{accessKey:ct,error:wt}=yield ie.wallet.requestSignIn({contractId:We,methodNames:$e});if(!ct||wt)throw yield de(),new Error(("string"==typeof wt?wt:wt.type)||"Failed to sign in");return be(),yield Ee()})(),signOut:de,getAccounts:()=>(0,Ke.Z)(function*(){return Ee()})(),verifyOwner:({message:We})=>(0,Ke.Z)(function*(){J.log("Sender:verifyOwner",{message:We});const $e=ie.wallet.account();if(!$e)throw new Error("Wallet not signed in");if(!$e.connection.signer.signMessage)throw new Error("Wallet is locked");const ht=e.network.networkId,ct=$e.accountId,wt=yield $e.connection.signer.getPublicKey(ct,ht),zt=yield A.block({finality:"final"}),Zt={accountId:ct,message:We,blockId:zt.header.hash,publicKey:Buffer.from(wt.data).toString("base64"),keyType:wt.keyType},En=JSON.stringify(Zt),Yt=yield $e.connection.signer.signMessage(new Uint8Array(Buffer.from(En)),ct,ht);return{...Zt,signature:Buffer.from(Yt.signature).toString("base64"),keyType:Yt.publicKey.keyType}})(),signMessage:We=>(0,Ke.Z)(function*(){return ie.wallet.signMessage(We).then($e=>{if($e.error)throw new Error($e.error);if(!$e?.response)throw new Error("Invalid response");return $e.response})})(),signAndSendTransaction:({signerId:We,receiverId:$e,actions:ht})=>(0,Ke.Z)(function*(){J.log("signAndSendTransaction",{signerId:We,receiverId:$e,actions:ht});const{contract:ct}=a.getState();if(!ie.wallet.isSignedIn()||!ct)throw new Error("Wallet not signed in");return ie.wallet.signAndSendTransaction({receiverId:$e||ct.contractId,actions:Ie(ht)}).then(wt=>{if(wt.error)throw new Error(wt.error);if(wt.response&&"error"in wt.response)throw new Error(wt.response.error.message);if(!wt.response?.length)throw new Error("Invalid response");return wt.response[0]})})(),signAndSendTransactions:({transactions:We})=>(0,Ke.Z)(function*(){if(J.log("signAndSendTransactions",{transactions:We}),!ie.wallet.isSignedIn())throw new Error("Wallet not signed in");return ie.wallet.requestSignTransactions({transactions:Ue(We)}).then($e=>{if($e.error)throw new Error($e.error);if($e.response&&"error"in $e.response)throw new Error($e.response.error.message);if(!$e.response?.length)throw new Error("Invalid response");return $e.response})})(),importAccountsInSecureContext:({accounts:We})=>(0,Ke.Z)(function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:We,network:e.network.networkId}))})()}});return function(r){return t.apply(this,arguments)}}();function LI({iconUrl:t=Lz,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield Bz();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:e,available:a},init:Fz}})}const Uz="data:image/png;base64,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",Kz=()=>kc(()=>!!window.bitkeep.near).catch(()=>!1),Vz=function(){var t=(0,Ke.Z)(function*({options:e,store:r,provider:a,emitter:A,logger:O}){const J={wallet:window.bitkeep.near},ie=function(){var Ee=(0,Ke.Z)(function*(){if(!J.wallet.isSignedIn())return;(()=>{for(const Ee in J.wallet.callbacks)J.wallet.remove(Ee)})();const Ce=yield J.wallet.signOut();if(!0===Ce)return;const Ie=new Error("string"==typeof Ce.error?Ce.error:Ce.error.type);if("User reject"===Ie.message)throw Ie;O.log("Failed to sign out"),O.error(Ie)});return function(){return Ee.apply(this,arguments)}}(),oe=()=>{J.wallet.on("accountChanged",function(){var Ee=(0,Ke.Z)(function*(Ce){O.log("onAccountChange",Ce),A.emit("signedOut",null)});return function(Ce){return Ee.apply(this,arguments)}}()),J.wallet.on("rpcChanged",function(){var Ee=(0,Ke.Z)(function*(Ce){O.log("onNetworkChange",Ce),e.network.networkId!==Ce.networkId&&(yield ie(),A.emit("signedOut",null),A.emit("networkChanged",{networkId:Ce.networkId}))});return function(Ce){return Ee.apply(this,arguments)}}())},de=function(){var Ee=(0,Ke.Z)(function*(){const Ce=J.wallet.getAccountId()||"";if(!Ce)return[];const Ie=yield J.wallet.getPublicKey();return[{accountId:Ce,publicKey:Ie?Ie.toString():void 0}]});return function(){return Ee.apply(this,arguments)}}(),be=Ee=>Ee.map(Ce=>({receiverId:Ce.receiverId,actions:Ce.actions}));return J.wallet&&J.wallet.isSignedIn()&&oe(),{signIn:({contractId:Ee,methodNames:Ce})=>(0,Ke.Z)(function*(){const Ie=yield de();if(Ie.length)return Ie;const{accessKey:Ue,error:We}=yield J.wallet.requestSignIn({contractId:Ee,methodNames:Ce});if(!Ue||We)throw yield ie(),new Error(("string"==typeof We?We:We.type)||"Failed to sign in");return oe(),yield de()})(),signOut:ie,getAccounts:()=>(0,Ke.Z)(function*(){return de()})(),verifyOwner:({message:Ee})=>(0,Ke.Z)(function*(){O.log("Bitget-wallet:verifyOwner",{message:Ee});const Ce=e.network.networkId,Ie=yield J.wallet.getAccountId(),Ue=yield J.wallet.getPublicKey(),We=yield a.block({finality:"final"}),$e={accountId:Ie,message:Ee,blockId:We.header.hash,publicKey:Ue,keyType:"0"},ht=JSON.stringify($e),ct=yield J.wallet.verifyOwner(ht,Ie,Ce);return{...$e,signature:ct.signature,keyType:ct.keyType}})(),signAndSendTransaction:({signerId:Ee,receiverId:Ce,actions:Ie})=>(0,Ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:Ee,receiverId:Ce,actions:Ie});const{contract:Ue}=r.getState();if(!J.wallet.isSignedIn()||!Ue)throw new Error("Wallet not signed in");return J.wallet.signAndSendTransaction({receiverId:Ce||Ue.contractId,actions:Ie}).then(We=>{if(We.error)throw new Error(We.error);if(We.response&&"error"in We.response)throw new Error(We.response.error.message);if(!We.response?.length)throw new Error("Invalid response");return We.response[0]})})(),signAndSendTransactions:({transactions:Ee})=>(0,Ke.Z)(function*(){if(O.log("signAndSendTransactions",{transactions:Ee}),!J.wallet.isSignedIn())throw new Error("Wallet not signed in");return J.wallet.requestSignTransactions({transactions:be(Ee)}).then(Ce=>{if(Ce.error)throw new Error(Ce.error);if(Ce.response&&"error"in Ce.response)throw new Error(Ce.response.error.message);if(!Ce.response?.length)throw new Error("Invalid response");return Ce.response})})()}});return function(r){return t.apply(this,arguments)}}();function BI({iconUrl:t=Uz,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield Kz();return a&&(yield kc(()=>!!window.bitkeep?.near?.isSignedIn()).catch(()=>!1)),{id:"bitget-wallet",type:"injected",metadata:{name:"Bitget Wallet",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",deprecated:e,available:a},init:Vz}})}const Hz="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iYXV0byIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTQuMjYyNyAxMy40MDEzQzEyLjQyMjcgMTQuNTMwNyA5Ljk1OTg3IDE1LjExMjQgNy40NjU1OCAxNC45ODgxQzUuMzY4NDQgMTQuODg2NSAzLjY0ODQ0IDE0LjE0MTEgMi42MDg0NCAxMi45MTU3QzEuNjk0MTYgMTEuODIwMSAxLjMzOTg3IDEwLjM3NDUgMS41Nzk4NyA4LjcxMTQzQzEuNjYxMjEgOC4xNTg3NCAxLjgyNzkxIDcuNjIxNjYgMi4wNzQxNSA3LjExODk2TDIuMTA4NDQgNy4wNDgzN0MyLjk3MTcgNS40MDU5NSA0LjI1MjgyIDQuMDEzOTcgNS44MjU3MyAzLjAwOTQyQzcuMzk4NjQgMi4wMDQ4NiA5LjIwOTEzIDEuNDIyMzYgMTEuMDc5IDEuMzE5MjRDMTIuOTQ4OSAxLjIxNjExIDE0LjgxMzcgMS41OTU5MiAxNi40OSAyLjQyMTI4QzE4LjE2NjIgMy4yNDY2NSAxOS41OTYxIDQuNDg5MTIgMjAuNjM4OSA2LjAyNjQxQzIxLjY4MTcgNy41NjM3MSAyMi4zMDE1IDkuMzQyODUgMjIuNDM3MyAxMS4xODg3QzIyLjU3MzEgMTMuMDM0NiAyMi4yMjAyIDE0Ljg4MzYgMjEuNDEzMyAxNi41NTM4QzIwLjYwNjQgMTguMjI0IDE5LjM3MzQgMTkuNjU3NyAxNy44MzU1IDIwLjcxNEMxNi4yOTc3IDIxLjc3MDIgMTQuNTA4IDIyLjQxMjYgMTIuNjQyNyAyMi41Nzc4TDEyLjc1NyAyMy44NzM4QzE0Ljg1MTMgMjMuNjg5NCAxNi44NjA4IDIyLjk2OTEgMTguNTg3NyAyMS43ODM3QzIwLjMxNDYgMjAuNTk4NCAyMS42OTkyIDE4Ljk4ODkgMjIuNjA1MSAxNy4xMTM4QzIzLjUxMSAxNS4yMzg3IDIzLjkwNyAxMy4xNjI3IDIzLjc1NDEgMTEuMDkwNEMyMy42MDExIDkuMDE4MDggMjIuOTA0NSA3LjAyMDg4IDIxLjczMjggNS4yOTU1NUMyMC41NjEyIDMuNTcwMjIgMTguOTU0OSAyLjE3NjMgMTcuMDcyMyAxLjI1MTExQzE1LjE4OTYgMC4zMjU5MDkgMTMuMDk1NiAtMC4wOTg2NDExIDEwLjk5NjQgMC4wMTkyNzg3QzguODk3MjIgMC4xMzcxOTggNi44NjUzMyAwLjc5MzUyIDUuMTAwOTEgMS45MjM1OUMzLjMzNjQ5IDMuMDUzNjUgMS45MDA0MiA0LjYxODQ4IDAuOTM0MTU3IDYuNDYzOUwwLjg4ODQ0MSA2LjU1NzA3QzAuNTgyOTc2IDcuMTgwOSAwLjM3Njc0IDcuODQ3NTYgMC4yNzcwMTMgOC41MzM1NEMtMC4wMDg3MDEzMiAxMC41NjA4IDAuNDM0MTUzIDEyLjM2NTEgMS41OTEzIDEzLjc1NDJDMi44NTcwMSAxNS4yNzMzIDQuOTE3MDEgMTYuMTc2OCA3LjM4ODQ0IDE2LjI5NTRDMTAuMzk3IDE2LjQ0NTEgMTMuMzg4NCAxNS42MzQ3IDE1LjUxMTMgMTQuMTQzOUwxNC4yNjI3IDEzLjQwMTNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+PHBhdGggZD0iTTE2Ljc4IDE0Ljg3NUMxNS41ODI5IDE1LjkwMjggMTIuOCAxNy43NjYzIDguMTgyODYgMTguMDIwNEMzLjAxNDI5IDE4LjMwMjggMC44NjAwMDEgMTYuNjQyNSAwLjg0MDAwMSAxNi42MjU2TDAuNDIyODU2IDE3LjEzMzhMMC44NDI4NTYgMTYuNjM0MUwwIDE3LjYzMzZDMC4wOTE0Mjg2IDE3LjcwOTggMi4xNTcxNCAxOS4zNTg4IDcuMDA4NTcgMTkuMzU4OEM3LjQwNTcxIDE5LjM1ODggNy44MjI4NiAxOS4zNTg4IDguMjU3MTQgMTkuMzI0OUMxMy44MzcxIDE5LjAxNzEgMTYuOTAyOSAxNi42MTE1IDE3Ljk3MTQgMTUuNTgzN0wxNi43OCAxNC44NzVaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+PHBhdGggZD0iTTE5LjAxOTkgMTYuMjE5MUMxOC4zMTIgMTcuMTM4NiAxNy40NDA3IDE3LjkyMzIgMTYuNDQ4NSAxOC41MzQ0QzEyLjk1MTMgMjAuNzY0OSA4LjUwMjc1IDIxLjA1MjkgNS4zODg0NyAyMC44OTc2TDUuMzIyNzUgMjIuMTk5M0M1Ljg0NTYxIDIyLjIyNDcgNi4zNDg0NyAyMi4yMzYgNi44MzcwNCAyMi4yMzZDMTUuNjE5OSAyMi4yMzYgMTkuMTY4NSAxOC4yODMxIDIwLjE1OTkgMTYuODcxM0wxOS4wMTcgMTYuMjA3OCIgZmlsbD0iIzIwNDFFMCI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC42ODU2IDExLjI5MjNDMTkuMjY3OSAxMS4yOTIzIDE5LjczOTkgMTAuODI1OCAxOS43Mzk5IDEwLjI1MDRDMTkuNzM5OSA5LjY3NDk2IDE5LjI2NzkgOS4yMDg1IDE4LjY4NTYgOS4yMDg1QzE4LjEwMzQgOS4yMDg1IDE3LjYzMTMgOS42NzQ5NiAxNy42MzEzIDEwLjI1MDRDMTcuNjMxMyAxMC44MjU4IDE4LjEwMzQgMTEuMjkyMyAxOC42ODU2IDExLjI5MjNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+Cjwvc3ZnPgo=",Wz=function(){var t=(0,Ke.Z)(function*(e,r){const{selectedWalletId:a}=e.getState(),A=window.xfi.near;return"xdefi"===a&&(yield A.connect(r.networkId).catch(()=>null)),{wallet:A,network:r}});return function(r,a){return t.apply(this,arguments)}}(),Gz=()=>kc(()=>!!window.xfi?.near).catch(()=>!1),Zz=function(){var t=(0,Ke.Z)(function*({metadata:e,store:r,logger:a,options:A}){const O=yield Wz(r,A.network),J=()=>O.wallet.accounts?O.wallet.accounts:[],ee=ie=>{const oe=J(),{contract:de}=r.getState();if(!oe.length||!de)throw new Error("Wallet not signed in");return ie.map(be=>({signerId:be.signerId||oe[0].accountId,receiverId:be.receiverId||de.contractId,actions:be.actions}))};return{signIn:()=>(0,Ke.Z)(function*(){const ie=J().map(oe=>({accountId:oe.accountId,publicKey:oe.publicKey.toString()}));return ie.length?ie:(yield O.wallet.connect(O.network.networkId),J().map(oe=>({accountId:oe.accountId,publicKey:oe.publicKey.toString()})))})(),signOut:()=>(0,Ke.Z)(function*(){yield O.wallet.disconnect()})(),getAccounts:()=>(0,Ke.Z)(function*(){return J().map(ie=>({accountId:ie.accountId,publicKey:ie.publicKey.toString()}))})(),verifyOwner:({message:ie})=>(0,Ke.Z)(function*(){throw a.log("XDEFI:verifyOwner",{message:ie}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:ie=>(0,Ke.Z)(function*(){a.log("signAndSendTransaction",ie);const{contract:oe}=r.getState();if(!J().length||!oe)throw new Error("Wallet not signed in");return yield O.wallet.signAndSendTransaction(ee([ie])[0])})(),signAndSendTransactions:({transactions:ie})=>(0,Ke.Z)(function*(){return a.log("signAndSendTransactions",{transactions:ie}),yield O.wallet.signAndSendTransactions(ee(ie))})()}});return function(r){return t.apply(this,arguments)}}();function jI({iconUrl:t=Hz,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield Gz();return{id:"xdefi",type:"injected",metadata:{name:"XDEFI Wallet",description:"One wallet for all your Crypto",iconUrl:t,downloadUrl:"https://www.xdefi.io",deprecated:e,available:a},init:Zz}})}var Js=u(32184);const Qz=function(){var t=(0,Ke.Z)(function*({metadata:e,options:r,store:a,provider:A,logger:O}){const J={wallet:window.nearWalletApi},ee=function(){var oe=(0,Ke.Z)(function*(){const de=J.wallet.signer.account;return de?[{accountId:de.accountId,publicKey:de.publicKey}]:[]});return function(){return oe.apply(this,arguments)}}(),ie=oe=>{const{contract:de}=a.getState();if(!de)throw new Error("Wallet not signed in");const be=bd(a.getState());if(!be)throw new Error("No active account");return oe.map(Ee=>({signerId:Ee.signerId||be.accountId,receiverId:Ee.receiverId||de.contractId,actions:Ee.actions}))};return{signIn:({contractId:oe})=>(0,Ke.Z)(function*(){const de=yield ee();return de.length?de:(yield J.wallet.login({contractId:oe}),ee())})(),signOut:()=>(0,Ke.Z)(function*(){yield J.wallet.logout()})(),getAccounts:()=>(0,Ke.Z)(function*(){return ee()})(),verifyOwner:({message:oe})=>(0,Ke.Z)(function*(){O.log("MathWallet:verifyOwner",{message:oe});const de=bd(a.getState());if(!de)throw new Error("No active account");const be=de.accountId,Ee=yield J.wallet.signer.getPublicKey(be),Ce=yield A.block({finality:"final"}),Ie={accountId:be,message:oe,blockId:Ce.header.hash,publicKey:Buffer.from(Ee.data).toString("base64"),keyType:Ee.keyType};JSON.stringify(Ie);throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:oe,receiverId:de,actions:be})=>(0,Ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:oe,receiverId:de,actions:be});const Ee=yield(0,Js.signTransactions)(ie([{signerId:oe,receiverId:de,actions:be}]),J.wallet.signer,r.network);return A.sendTransaction(Ee[0])})(),signAndSendTransactions:({transactions:oe})=>(0,Ke.Z)(function*(){O.log("signAndSendTransactions",{transactions:oe});const de=yield(0,Js.signTransactions)(ie(oe),J.wallet.signer,r.network);O.log("signAndSendTransactions:signedTransactions",de);const be=[];for(let Ee=0;Ee(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield!!window.nearWalletApi;return{id:"math-wallet",type:"injected",metadata:{name:"Math Wallet",description:"World's First Insured Crypto Wallet.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc",deprecated:e,available:a},init:Qz}}),Xz="data:image/png;base64,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",qz=function(){var t=(0,Ke.Z)(function*(e,r){const{selectedWalletId:a}=e.getState(),A=window.nightly.near;return"nightly"===a&&(yield A.connect(O=>{O?r.emit("accountsChanged",{accounts:[{accountId:O.accountId,publicKey:A.account.publicKey.toString()}]}):r.emit("signedOut",null)},!0).catch(()=>null)),{wallet:A}});return function(r,a){return t.apply(this,arguments)}}(),eV=()=>kc(()=>!!window.nightly?.near,{timeout:5e3}).catch(()=>!1),tV=function(){var t=(0,Ke.Z)(function*({metadata:e,options:r,store:a,logger:A,provider:O,emitter:J}){const ee=yield qz(a,J),ie=()=>{const{accountId:be,publicKey:Ee}=ee.wallet.account;return be?[{accountId:be,publicKey:Ee.toString()}]:[]},oe=be=>{const Ee=ie(),{contract:Ce}=a.getState();if(!Ee.length||!Ce)throw new Error("Wallet not signed in");return be.map(Ie=>({signerId:Ie.signerId||Ee[0].accountId,receiverId:Ie.receiverId||Ce.contractId,actions:Ie.actions}))},de={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(be=(0,Ke.Z)(function*(Ee){const Ie=ie().find(Ue=>Ue.accountId===Ee);if(!Ie)throw new Error("Failed to find public key for account");return Fr.utils.PublicKey.from(Ie.publicKey)}),function(Ce){return be.apply(this,arguments)}),signMessage:function(){var be=(0,Ke.Z)(function*(Ee,Ce){if(!ie().find(We=>We.accountId===Ce))throw new Error("Failed to find account for signing");try{const We=Fr.transactions.Transaction.decode(Buffer.from(Ee));return{signature:(yield ee.wallet.signTransaction(We)).signature.data,publicKey:We.publicKey}}catch(We){throw A.log("Failed to sign message"),A.error(We),Error("Invalid message. Only transactions can be signed")}});return function(Ce,Ie){return be.apply(this,arguments)}}()};var be;return{signIn:()=>(0,Ke.Z)(function*(){const be=ie();return be.length?be:(yield ee.wallet.connect(Ee=>{Ee?J.emit("accountsChanged",{accounts:[{accountId:Ee.accountId,publicKey:ee.wallet.account.publicKey.toString()}]}):J.emit("signedOut",null)}),ie())})(),signOut:()=>(0,Ke.Z)(function*(){yield ee.wallet.disconnect()})(),getAccounts:()=>(0,Ke.Z)(function*(){return ie()})(),verifyOwner:({message:be})=>(0,Ke.Z)(function*(){throw A.log("Nightly:verifyOwner",{message:be}),new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:be,nonce:Ee,recipient:Ce,state:Ie})=>(0,Ke.Z)(function*(){return A.log("Nightly:signMessage",{message:be,nonce:Ee,recipient:Ce,state:Ie}),ee.wallet.isConnected||(yield ee.wallet.connect()),yield ee.wallet.signMessage({message:be,nonce:Ee,recipient:Ce,state:Ie})})(),signAndSendTransaction:({signerId:be,receiverId:Ee,actions:Ce})=>(0,Ke.Z)(function*(){A.log("signAndSendTransaction",{signerId:be,receiverId:Ee,actions:Ce});const{contract:Ie}=a.getState();if(!ie().length||!Ie)throw new Error("Wallet not signed in");const[We]=yield(0,Js.signTransactions)(oe([{signerId:be,receiverId:Ee,actions:Ce}]),de,r.network);return O.sendTransaction(We)})(),signAndSendTransactions:({transactions:be})=>(0,Ke.Z)(function*(){A.log("signAndSendTransactions",{transactions:be});const Ee=yield(0,Js.signTransactions)(oe(be),de,r.network),Ce=[];for(let Ie=0;Ie(0,Ke.Z)(function*(){ee.wallet.importWalletsNear(be.accounts)})()}});return function(r){return t.apply(this,arguments)}}();function UI({iconUrl:t=Xz,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield eV();return{id:"nightly",type:"injected",metadata:{name:"Nightly",description:"Multichain crypto wallet.",iconUrl:t,downloadUrl:"https://wallet.nightly.app/download",deprecated:e,available:a},init:tV}})}var B3=u(96831);const nV="data:image/png;base64,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",rV=function(){var t=(0,Ke.Z)(function*(e,r){const a=new Fr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),A=yield Fr.connect({keyStore:a,...r,headers:{}});return{wallet:new B3.MeteorWallet({near:A,appKeyPrefix:"near_app"}),keyStore:a}});return function(r,a){return t.apply(this,arguments)}}(),iV=function(){var t=(0,Ke.Z)(function*({options:e,logger:r,store:a,params:A}){const O=yield rV(A,e.network),J=function(){var ee=(0,Ke.Z)(function*(){const ie=O.wallet.getAccountId(),oe=O.wallet.account();if(!ie||!oe)return[];const de=yield oe.connection.signer.getPublicKey(oe.accountId,e.network.networkId);return[{accountId:ie,publicKey:de?de.toString():""}]});return function(){return ee.apply(this,arguments)}}();return{signIn:({contractId:ee,methodNames:ie=[]})=>(0,Ke.Z)(function*(){r.log("MeteorWallet:signIn",{contractId:ee,methodNames:ie}),ie.length?yield O.wallet.requestSignIn({methods:ie,type:B3.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:ee}):yield O.wallet.requestSignIn({type:B3.EMeteorWalletSignInType.ALL_METHODS,contract_id:ee});const oe=yield J();return r.log("MeteorWallet:signIn",{contractId:ee,methodNames:ie,account:oe[0]}),oe})(),signOut:()=>(0,Ke.Z)(function*(){O.wallet.isSignedIn()&&(yield O.wallet.signOut())})(),isSignedIn:()=>(0,Ke.Z)(function*(){return!!O.wallet&&O.wallet.isSignedIn()})(),getAccounts:()=>(0,Ke.Z)(function*(){return J()})(),verifyOwner:({message:ee})=>(0,Ke.Z)(function*(){r.log("MeteorWallet:verifyOwner",{message:ee});const ie=yield O.wallet.verifyOwner({message:ee});if(ie.success)return ie.payload;throw new Error(`Couldn't verify owner: ${ie.message}`)})(),signMessage:({message:ee,nonce:ie,recipient:oe,state:de})=>(0,Ke.Z)(function*(){r.log("MeteorWallet:signMessage",{message:ee,nonce:ie,recipient:oe,state:de});const be=O.wallet.getAccountId(),Ee=yield O.wallet.signMessage({message:ee,nonce:ie,recipient:oe,accountId:be,state:de});if(Ee.success)return Ee.payload;throw new Error(`Couldn't sign message owner: ${Ee.message}`)})(),signAndSendTransaction:({signerId:ee,receiverId:ie,actions:oe})=>(0,Ke.Z)(function*(){r.log("MeteorWallet:signAndSendTransaction",{signerId:ee,receiverId:ie,actions:oe});const{contract:de}=a.getState();if(!O.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!ie&&!de)throw new Error("No receiver found to send the transaction to");return O.wallet.account().signAndSendTransaction_direct({receiverId:ie??de.contractId,actions:oe})})(),signAndSendTransactions:({transactions:ee})=>(0,Ke.Z)(function*(){if(r.log("MeteorWallet:signAndSendTransactions",{transactions:ee}),!O.wallet.isSignedIn())throw new Error("Wallet not signed in");return O.wallet.requestSignTransactions({transactions:ee})})(),buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${O.wallet._networkId}`}});return function(r){return t.apply(this,arguments)}}();function KI({iconUrl:t=nV,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:r=>iV({...r,params:{iconUrl:t}})}})}const Ig_SIGN_IN="sign-in",Ig_IS_SIGNED_IN="is-signed-in",Ig_GET_ACCOUNT_ID="get-account-id",Ig_SIGN_AND_SEND_TRANSACTION="sign-and-send-transaction",Ig_SIGN_AND_SEND_TRANSACTIONS="sign-and-send-transactions";let j3=0;const yw=[],Cg=(t,e=!1,r)=>new Promise((A,O)=>{let J;j3++,e&&(J=setTimeout(()=>O(Error("timeout")),2e3)),yw.push({id_wallet_selector:j3,code:t,resolve:A,reject:O,timeout:J}),window.postMessage({id:j3,src:"ws",type:"nw",code:t,dest:"ext",params:r})}),sV=function(){var t=(0,Ke.Z)(function*(){return kc(()=>!!window.narwallets).catch(()=>!1)});return function(){return t.apply(this,arguments)}}(),zI=()=>Cg(Ig_IS_SIGNED_IN,!0),dV=()=>{window.addEventListener("message",t=>{if(t.source!==window)return;const{data:e}=t;if(e&&"page"===e.dest&&e.id&&"nw"===e.type){const r=(t=>yw.filter(e=>e.id_wallet_selector===t)[0])(e.id);r&&((t=>{const e=yw.indexOf(t);e>-1&&yw.splice(e,1)})(r),r.timeout&&clearTimeout(r.timeout),e.result?e.result.err?r.reject(e.result.err):r.resolve(e.result.data):r.reject("result is empty"))}})},hV=function(){var t=(0,Ke.Z)(function*({metadata:e,store:r,logger:a}){return{signIn:()=>(0,Ke.Z)(function*(){let J;return J=(yield zI())?Ig_GET_ACCOUNT_ID:Ig_SIGN_IN,[{accountId:yield Cg(J)}]})(),signOut:function(){var O=(0,Ke.Z)(function*(){if(!(yield zI()))return;const J=yield Cg("sign-out");if(!0===J)return;const ee=J,ie=new Error("string"==typeof ee.error?ee.error:ee.error.type);if("User reject"===ie.message)throw ie;a.log("Failed to sign out"),a.error(ie)});return function(){return O.apply(this,arguments)}}(),getAccounts:()=>(0,Ke.Z)(function*(){return[{accountId:yield Cg(Ig_GET_ACCOUNT_ID,!1)}]})(),verifyOwner:({message:O})=>(0,Ke.Z)(function*(){throw a.log("Narwallets:verifyOwner",{message:O}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:O,receiverId:J,actions:ee})=>(0,Ke.Z)(function*(){a.log("signAndSendTransaction",{signerId:O,receiverId:J,actions:ee});const{contract:ie,accounts:oe}=r.getState();if(!oe||0===oe.length||!ie)throw new Error("Wallet not signed in");return(t=>Cg(Ig_SIGN_AND_SEND_TRANSACTION,!1,t))({signerId:O,receiverId:J||ie.contractId,actions:ee})})(),signAndSendTransactions:({transactions:O})=>(0,Ke.Z)(function*(){a.log("signAndSendTransactions",{transactions:O});const{contract:J,accounts:ee}=r.getState();if(!ee||0===ee.length||!J)throw new Error("Wallet not signed in");return(t=>Cg(Ig_SIGN_AND_SEND_TRANSACTIONS,!1,t))(O)})()}});return function(r){return t.apply(this,arguments)}}(),VI=({iconUrl:t="data:image/png;base64,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",deprecated:e=!1}={})=>(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;dV();const a=yield sV();return{id:"narwallets",type:"injected",metadata:{name:"Narwallets",description:null,iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/narwallets-v4/lkpeokpdkmcdaiadpmnnpimlgmdobkdj",deprecated:e,available:a},init:hV}}),pV="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAETCAYAAAAVqeK4AAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAAEsAAAAAQAAASwAAAABd3d3Lmlua3NjYXBlLm9yZwAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAROgAwAEAAAAAQAAARMAAAAAwzPlUAAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAi9pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+d3d3Lmlua3NjYXBlLm9yZzwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj4zMDA8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjMwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Csg4CyYAABnZSURBVHgB7Z0JeB3Vdcfnad9t2fK+yPuKsQk2GAN2MAFDmmA2gwsuuFBwCWtDEpOWFAikhNAshaaBplBDPkKDIbTUJYRACDSBj6ZLQgEHApg1lLAZg2TZkq2eY/vZkv1GevNmu/fO737f0Zs3c5dzfnf01+jOnTueR4IABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACBhHI7fKl2yCfbHNlrTh8SkinfyvlJ4WsI63iH0rDbWIfib0q9ryYxvNfYk+KdYiRPK9MIMwWmy82WWyq2ASxRrE6sWYxW9MYcfz1Clu9x29jCOgvg5omFcTFO7Z2/lAhUUF5QOz7Yio2WUoDJNiTxJaKHS5ms2CI+8UlvTLBSmNwV3GI+8ylf8ld579NYnxU7AyxSjGXkwqqXrFuFnO9XzW+0WI7Lr30kwSBuAmUSQMLxW4Te0HsIjG9vHcl6ZDBCWJ6Jfaw2MliNWKZSdrBJAgkTWCsNPg3Yjq+olcqtqc5EsDPxX4odpDtwZTqP2JSKjnKRUFglFSiVyoPio0Tsy3Vi8M3iv2n2ALbnI/aX8QkaqLUVwqBo6TQr8WWl1I4pTLTpd0nxC4QK0/JB6OaRUyM6o5MO9Mk0d8ppn/pTf/lXCk+6q3vWWKkXQQQE04F0wjoX/p7xWpNc2yXPxfL560G+5caNsQkNfQ03AeBT8sxHUfReRqmJL1bo4PG3xLTbdJeBBCTvYDw1RgCh4kn94mZcnv1WvFFb2eTfAggJj5g2G0EAZ2X8gOxtGdqny8+rDaCiMFOICYGdw6u7SBwnPz8qxRZ/IG0fUOK7VvTNGJiTVdl2tHPSfQqKkknnQezRozfkyLIA6kISGRJnYAOeN4ipr/cSSX93bhDrCWpBm1vBzGxvQez47/+UuudlKTSudLQoqQac6EdxMSFXsxODPrw3DEJhDtI2rg6gXacagIxcao7MxHMNyXKuGfIfkXa4N+bgKcTYhIQGNlTJzBNPAi7sl1fQei4zFl9ZeBYYQKISWEu7DWbwOXiXlzn7qVSd5XZ4ZvpXVwdYma0eOUKgRkSSBxjJzp9/xxXICUdB2KSNHHai4rAmVFV1KOeZbLd0OM7mwEIICYBYJHVKAI6iS3qBwFPNypCy5xBTCzrMNzdTUAfAFy6+1v4DR141WeBSCUSQExKBEcxIwh8IkIvjpS6+H0IARR4IeBRNHUCKgBRJWa7hiSJmIQESPFUCYyU1vXFX1EkxCQkRcQkJECKp04ginVYdZX5CalHYrkDiInlHYj73pQIGGgdLMUYEiRiEhIgxVMnEIWYTE49CgccQEwc6MSMh6DjJmHTiLAVUJ5bYZwD9hNojCAEZr1GAJErkwggUkWqBKIQEx2AJYUkgJiEBEjx1AlEIQSmvvArdbhBHEBMgtAiLwQg4EsAMfFFwwEIQCAIAcQkCC3yQgACvgQQE180HIAABIIQQEyC0CIvBCDgSwAx8UXDAQhAIAgBxCQILfJCAAK+BBATXzQcgAAEghBATILQIi8EIOBLADHxRcMBCEAgCAHEJAgt8kIAAr4EEBNfNByAAASCEEBMgtAiLwQg4EsAMfFFwwEIQCAIAcQkCC3yQgACvgQQE180HIAABIIQQEyC0CIvBCDgSwAx8UXDAQhAIAgBxCQILfJCAAK+BBATXzQcgAAEghBATILQIi8EIOBLADHxRcMBCEAgCAHEJAitwnk/KrybvRDIFgHEJHx/d4evghpCEIB/CHhRFkVMoqRJXRDIMAHEJMOdT+gQiJIAYhIlTeqCQIYJICYZ7nxCh0CUBBCTKGlSFwQyTAAxyXDnEzoEoiSAmERJk7ogkGECiEmGO5/QIRAlAcQkSprUBYEME0BMMtz5hA6BKAkgJlHSpC4IZJgAYpLhzid0CERJADGJkiZ1pUGAB/3SoF6gTcSkABR2QQACwQkgJsGZUQICEChAADEpAIVdEIBAcAKISXBmlIAABAoQQEwKQGEXBCAQnABiEpwZJSAAgQIEEJMCUNgFAQgEJ4CYBGdGCQhAoAABxKQAFHZBAALBCSAmwZlRAgIQKEAAMSkAhV0QgEBwAohJcGaUgAAEChBATApAYRcEIBCcAGISnBklzCLAU8OG9AdiYkhH4AYEbCeAmNjeg/gPAUMIICaGdARuQMB2AoiJ7T2I/xAwhABiYkhH4AYEbCeAmNjeg/gPAUMIICaGdARuBCdQXlnrjd7/lIbgJSkRB4GKOCqlTgjESaB+8CSv9WNneq0HrvS6u7cPff2pu+JsjrqLJICYFAmKbCkTyOW8YZOP9iYtuNhrGb/I8+S7pi1tb6fsGM3nCSAmeRJ8GkmgrLzKGzVrmTf5sM96jUOnG+kjTu0kgJhwJhhJoLyyzhs372xv0qF/5tU0DjfSR5zqTQAx6c2DbykTKKuo9sbOOd2besRfiIiMSNkbmg9CADEJQou8sREoK6/0Wuee5U1ddJlX3TAstnaoOD4CiEl8bKm5SAJDJi72Zh17PWMiRfIyNRtiYmrPZMCv5tFzvf2O+Zo3aOz8DETrfoiIift9bFyEVbXNO8ZExh+0ysuVlRvnHw6VRgAxKY0bpUogoMIxbu7Z3rQjr/BUUEhuEUBM3OpPY6PROSIHHH+T1zx6nrE+4lg4AohJOH6U7oeA3qWZuOAib9oRl3t625fkLgHExN2+TT2yASNmex878R+8pmEzU/cFB+IngJjEzzh7LchzMxPmf8abedQ1XI1kqPcRkwx1dhKh1g4YI1cj35WH8RYm0RxtGEQAMTGoM2x3ZcT047wDTrjZq6wZYHso+F8CAcSkBGgU6U0gV1Yh0+BXe1M//ue7lwbonYNvWSCAmGShl2OMsaZppDfvlO/JLNZDYmyFqm0ggJjY0EuG+qjT4A9aficP5hnaP0m7hZgkTdyR9kbvv1wmof2d3K2pcSQiwghLADEJSzBj5XV8ZL9jvrrj1m/GQifcfgggJv0A4vAeAuVV9d7cZbd7w6ceu2cnWxDYRQAx4VQoikBV3SDv4NPuZrmAomhlMxNiks1+DxR1ffN4b/4Z/+w1DJ4cqByZs0UAMclWfweOtmnYft6CM9fJHZuhgctSIFsEEJNs9XegaAeOPMA75Iz7vKq6wYHKkTmbBBCTbPZ7v1EPbj3Um7/iHq+iuqnfvGSAgBJATDgP9iGgD+nNX/FDT99dQ4JAsQR4cXmxpDKSb9CYg+WuzVqEJCP9HWWYiEmUNC2vSxczmr/iXvnXptHySHA/DQKISRrUDWxzx12blfd7lbUDDfQOl2wggJjY0Esx+1g7YLQ3/4/uZcX4mDm7Xj1i4noP9xOfzmxdcOa/erVNo/rJyWEI9E0AMembj9NH9W6NTpFvaJnqdJwElwwBxCQZzsa1ksuVyUN7a3jWxriesdchxMTevgvl+fRPXOUNn/apUHVQGAI9CSAmPWlkZHvM7NO8yYdfmpFoCTMpAohJUqQNaUcnpc1Z+m1DvMENlwggJi71Zj+xVNcP8eadegcvxuqHE4dLI4CYlMbNulK5snLvwJNv9XQ1eRIE4iCAmMRB1cA6px95pTdk4pEGeoZLrhBATFzpyT7i0DVbJx/22T5ycAgC4QkgJuEZGl2DjpPMWfod3rRndC9Z71ynRoCYWN+PfQSQy3lzjr+JJRf7QMShSAggJpFgNLiSCQefx2spDO4fh1xDTBzqzH1C0edtZh59zT772QGBGAggJjFANaJKfe5GJ6bx6k4juiMLTiAmrvbyxAUXeoNbF7gaHnGZRaBN3NmmLjEAa1bHhPZGX5Q1bfFfhq6HCiBQJIFN+XyISZ6EC59y92b2cTfKYtC1LkRDDHYQ+CDvJmKSJ+HA5+hZp3r6mgoSBBIkwJVJgrATaUpfljVzyVcSaYtGINCDwHv5ba5M8iQs/5y++EteTeMIy6PAfQsJvJn3GTHJk7D4s3HodG/8wassjgDXLSbwf3nfEZM8CYs/Zy651suV8aZXi7vQZtcRE5t7r6fvLeMXecMmH91zF9sQSJLAW/nGuDLJk7DwU2e67nfMtRZ6jssOEXglHwtikidh4efo/Zd7A0bMsdBzXHaIwEv5WBCTPAnLPnUZximLvmCZ17jrGAGdSv/7fEx5MXk/v4NPOwiMmX26vIlvih3O4qWrBHZflWiAeTE5VbZ3PKzjatQuxVVWXulN+fhql0IiFjsJvNjT7byY/ER2frHnAbbNJTBaXqJV3zzeXAfxLCsEnukZaF5MdN/1Ymt0g2QwAXmYb9KhFxvsIK5liMDTPWPtKSa6/zyxX/bMwLZZBEZM+7TXOGSaWU7hTVYJ9CkmHULlJLHdI7RZpWRq3JMOvcRU1/ArWwR0dbXne4a895WJHntN7ASxrfqFZA4BXT1t0Nj55jiEJ1km8KwE30sjComJAnpcjD+BSsKgNGH+ZwzyBlcyTuDJveP3ExPNJ29u8m7euwDf0yFQ0zjcGy7jJSQIGEJgn7HVvsREfb5Q7FFDnM+0G61zz/Z0fgkJAoYQCCwmOsiiE9p0HIWUEgFdXqD1wJUptU6zENiHQLvs6TXHRHP0d2WiefQR46ViWgEpBQLDpizxaptGpdAyTUKgIIFfyN6uvY8UIyZa5n/Ezt27MN+TITB2zopkGqIVCBRHoODQR7Fiok3cIfaN4toiV1QEqmqbvWFTjomqOuqBQBQEflaokiBiouX1mfcfFaqIffEQGLX/qfKaz+p4KqdWCAQnoMMd+wy+ajVBxUSfLD5d7AUtTIqfwBh5qI8EAYMIPCa+9JqslvctqJhoOV37RCc87H75ju4kRU+gbmCr1zzqwOgrpkYIlE7A9z+TUsRE3fiN2Bli2/ULKR4CI2fKUw3ylDAJAgYRuN/Pl1LFROv7F7Gr/Spmf3gCI2ccH74SaoBAdAR0ZTXfIY4wYqIuXiW2VjdI0RLQeSXNo+dFWym1QSAcgXV9FQ8rJt1S+VlivdY16KtBjhVHYPi0T/IvTnGoyJUcgbv7aiqsmGjdH4kdJ/aOfiFFQ2DoZOaWREOSWiIioG/u09UEfFMUYqKVbxD7Q7F9ptjqQVIwAjqvpGX84cEKkRsC8RK4R6rvc9H5qMREw3hIjEWplUTI1DJ+oVdR1RCyFopDIFIC/Y6NRikm6vlfi/1jpCFksLKhk47KYNSEbDCBN8S3n/fnX9Riou3pcmAFp9v25wzHdxLQKxMSBAwi8D3xpc9/cdTXOMREF6XWCRK/0wZIwQjog31Nw/YLVojcEIiXwO3FVB+HmGi7KiTLxArO4dcMpMIEBrUeKpNe4+qWwm2yFwJ9ENC1Xtf3cXz3oTjPWr2N9Ke7W2KjKAIt47iLUxQoMiVFoOgx0DjFRINVR1iUOkC38yqLALDIGjeBD6WBO4ttJG4xUT9YlLrI3tAFowcMn1VkbrLtItANidgIrJGai14dIAkxYVHqIvu6SYSkrKKmyNxkg0DsBP4+SAtJiIn6o4tS65R7FqVWGj6pedRcnyPshkDiBB6RFgM9c5eUmCiJX4mdqxukwgQGjjyg8AH2QiB5Al8P2mSSYqK+6aLUgZ0MGpSt+RuHzrTVdfx2i4DeCvZdUc0v1KTFRP3QRal9V2vyc9T5/bKiWuOQqc6HSYBWELhOvAy8imIaYqJOrhDzXbHJCtwRO6nrvVZUN0ZcK9VBIDABfQ6n6NvBPWtPQ0y0/fyi1B/0dCbL201DZ2Q5fGI3h8DXxJWSZq6nJSaKThelPlMs8OWUFnYtNbRMcS0k4rGPwJvi8ndLdTtNMVGfdVHqL5fqvEvl6prHuRQOsdhJ4Bpxe3OprqctJuq3ikm/C6+UGqAt5eqbx9viKn66SeBVCeuWMKGZICY6HfossUATZMIEbWLZukHjTHQLn7JDQN80sSVMuCaIifqvi1KfIPaefrEshX5Lli45UDdgrGVh465DBJ6SWG4LG48pYqJx6K3iU8W69ItFKfRirdUNQ8t5OblFPe6eq5+XkPpdSa2/sE0SE/X1IbHL+nPateM1jSPLXYuJeKwh8IB4+mAU3pomJhqTTre/NYrgbKmjpmlkhS2+4qdTBPS/AL0qiSSZKCYa2Pli/xFJhBZUUtM4nCsTC/rJQRdvkJgiu/FhqphkalHqqrrBiImDv6mGh6Rv6PtylD6aKiYao87G00WpQ92u0opMT5U1TSb3g+n48K80ApdIsUgfZzH9JM7EotSV1QNM74fSTldKmUpAB1x/ELVzNpzEayTom6IO3KT6KmoabegHk5DhS+kE2qToeaUX9y9py0l8kYTwqH8Ydh+prOLfHLt70CrvdT2hl+Lw2BYx0UWpTxLbEAeEtOvMVdbY0g9po6L9cAT0D/J3wlXhX9qmk/hdCeNEMecWpS4rY5qJ/ynKkYgI6DtwzhbTZ+FiSTaJiQLQRanPiYVEipXmyitDP9+Tovs0bQeBC8TNF+N01TYxURbfF7s+TihJ112WK0dMkoaerfbulnBvjztkG8VEmejzO84sSp3j35y4z/Ms1/+6BL8qCQC2ioku9bhC7LdJQIq/DS5M4mecyRZ0LddTxBJZ2sNWMdEzQxel1rcERjqLTysmQcARAp+TOJ5IKhabxUQZ/UaMRamTOltoxyYCOsP1xiQdtl1MlJUuSn1VktBoCwKGE3hW/PuTpH10QUyU2dVidyUNj/YgYCABHR85XkyXQk00uSImOhFHJ+T8b6L0aAwCZhHQmeL6pH0qNyZcERPtUlViHZB9R7+QIJBBAhdKzD9NK26XxEQZviy2XMy2RanFZRIEQhHQ5U5vDlVDyMKuiYnieFhsdUguFIeATQT+SZz9QtoOuygmyvQbYplalDrtE4n2UyPwiLS8UkwncqaaXBUThZqpRalTPYtoPC0C/y0NLxUzYmlTl8WkQyDrLbLfiZEg4BoBnbD5STFdWsCI5LKYKGBdlPpkMSOUWx0iQSACAs9LHYvF3oqgrsiqcF1MFJQ+m7AqMmJUBIF0CbwgzR8hpn8ojUpZEBMFfptYbMvVGdWjOOMygfwViZH/umdFTPQEu1jsZ7pBgoCFBNaLz3pF8pqpvmdJTHSqsY6fbDC1M/ALAj4E9K7NQjEjr0jyPmdJTDRmZxelzncon84R+HeJaLGY8Y+JZE1M9EzTRanPENOHA0kQMJnAveLcEjErFgDLopjoyXOPmFOLUmtQJKcI3CDR6L/lm22JKqtiov3zRbF/s6Wj8DMzBLZJpJeK6Q2D1KfIB6GeZTHRjjpNTEfJSRAwgYDOZj1JTJ8tsy5lWUy0szaJnSBmxf+k6jDJWQL6gqxDxHQZUitT1sVEO+05MR2QteqSUh0nOUPgQYnkILFnbI4IMdnZe/fJx5U2dyS+W0lA7yheJ6YP7L1nZQQ9nEZM9sC4RjZZlHoPD7biJfC2VH+s2GViOuhqfUJM9nSh/pVgUeo9PNiKj8BDUvUcsR/H10TyNSMmvZmzKHVvHnyLlsAWqU6vRHQimtFT40sJu6KUQo6XeVniWy72gJizfLZv6/S6Oj7Y3tX5UVfXlrbO7V3tHds6N2/u6upol7nBOy+7t3d1bd/W1SYcvFxZWX2uvGoXj+7yisraurKKmtryyrqaiqq6yvLKhorKmgFlZRXVmp20LwEdXNX3Y+sMbCeTs78sIXvrYSmvC/Raeb9fY+/c/EF3x4dvtHe0vf12Z/t7r3Zu/ejF7Z3tr3R3dTzbtX3L+vU/vuIZLzcg6kcKcjOOWD3Dq6ibUV5VP728om5cRVXDhMq6Qa019UNaappG1VfVDcqpfxlK+qYEXTn+CjG9MnE2ISb+XftNOTRTTMdRjE3btrZ3t72/oW3zpjde27r53V93bd70mAjHQ+t/8qW+X8SUuzKOmLqffeQ6/Qvse4tz0oILJ1Y1Djuqunbwwqr6IbNrGkeOaRg8saGiutFFkdGrED1/9Klf5xNi0ncXXyCHZ4npHID0U3e3177x5S1t7730SseHbz6+te2Du6c3tT6wbu0p1twNeOHxG18UkGo37Qa6bFn59HdmLqlqaDm5pmnkAhGXcfWDJ1bnctYO6enY25Vi3xKzpm/E11AJMekbX4ccPl7sl2Kj+s4az9HNG1/Zuun3zz3Xsen1dV2d79/y9I++pL+Iu9PTu7cs3li7dtt6b+39EoHajjR14QXjK+tbz64bOPZTjUOnT2sYPMmWwZh1EsD5Yq/ujCQ7PxGT/vv6TcmyTOwRsdhP6G2d7d7GN3/1Rvu7Gx7s2rLx5qfu//yT/bvoXo7nHvvbDRLV5bvMm7Lo0nm1TeNW1Q+asKR59NxRBv5b9Kz4eqHYT8UymRCT4rr9Ccm2SmxNcdmD5drW2bbl3Vd+8Vb7xlfXbe388Oqn77vEqFXHg0UTT+7nH/26Xh2qecP2P7q+ZcTCcxpapq1sGDRhfDwtFl2rLlp0jdi3xXSwlQSBogjoCaN3QHoas2aLQmd0Jh1s79mnxWzruMhXxZqMjgznjCVQKZ7pZWzPkw0xMba7inYsiJi0S606ZWBY0bWTEQI+BAbLfh0EzQsKYuIDyqLdxYiJDsbfLDbSorgSddXae2+JUurd2Lvy9USxtt67+eYogY0Slz7ZO05Mx82cmwYvMZFSJqArYukaKFyZpNwRETRf6Mpkg9S7WmxgBPVTBQT6JaADcIhJv5iMz5AXE/3joGNiOhWAO53Gd5tbDpZLOH/sVkiZjOYKiVpnq07LZPQEDQEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAgQQJ/D/LxtSxjmI1fwAAAABJRU5ErkJggg==",F3="account",gV=()=>kc(()=>!!window.dapp).catch(()=>!1);function U3(){return U3=(0,Ke.Z)(function*(t){const e=yield t.getItem(F3);return window.dapp?{wallet:window.dapp,account:e||void 0}:{}}),U3.apply(this,arguments)}const mV=function(){var t=(0,Ke.Z)(function*({options:e,store:r,emitter:a,logger:A,storage:O,provider:J}){const ee=yield function yV(t){return U3.apply(this,arguments)}(O),ie=function(){var We=(0,Ke.Z)(function*(){if(ee.wallet){const $e=yield ee.wallet.request("near",{method:"dapp:accounts"});return $e.near?[$e.near.address,$e.near.pubKey]:[]}return[]});return function(){return We.apply(this,arguments)}}(),oe=function(){var We=(0,Ke.Z)(function*({accountId:$e,publicKey:ht}){if(A.log("validateAccessKey",{accountId:$e,publicKey:ht}),!ee.wallet)throw new Error("Wallet is not installed");const ct=yield ee.wallet.request("near",{method:"query",params:{request_type:"view_access_key",finality:"final",account_id:$e,public_key:ht}});if(A.log("validateAccessKey:accessKey",{accessKey:ct}),"FullAccess"!==ct.permission)throw new Error("Public key requires 'FullAccess' permission");return ct});return function(ht){return We.apply(this,arguments)}}(),be=()=>ee.account?[{accountId:ee.account.accountId,publicKey:ee.account.publicKey}]:[],Ee=function(){var We=(0,Ke.Z)(function*(){ee.account&&(O.removeItem(F3),delete ee.account),a.emit("signedOut",null)});return function(){return We.apply(this,arguments)}}(),Ce=()=>{ee.wallet&&(ee.wallet.on("dapp:accountsChanged",function(){var We=(0,Ke.Z)(function*($e){A.log("onAccountChange",$e),yield Ee()});return function($e){return We.apply(this,arguments)}}()),ee.wallet.on("dapp:chainChanged",function(){var We=(0,Ke.Z)(function*($e){A.log("onNetworkChange",$e);const ht="near"===$e.split(":")[1]?"mainnet":"testnet";e.network.networkId!==ht&&(yield Ee(),a.emit("networkChanged",{networkId:ht}))});return function($e){return We.apply(this,arguments)}}()))},Ie={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(We=(0,Ke.Z)(function*($e){const ct=be().find(wt=>wt.accountId===$e);if(!ct)throw new Error("Failed to find public key for account");return Fr.utils.PublicKey.from(ct.publicKey)}),function(ht){return We.apply(this,arguments)}),signMessage:function(){var We=(0,Ke.Z)(function*($e,ht){if(!ee.wallet)throw new Error("Wallet is not installed");if(!be().find(zt=>zt.accountId===ht))throw new Error("Failed to find account for signing");try{const zt=Fr.transactions.Transaction.decode(Buffer.from($e)),Zt=Buffer.from(zt.encode()).toString("hex"),En=yield ee.wallet.request("near",{method:"dapp:signTransaction",params:["0x"+Zt]});return{signature:Buffer.from(En[0].signature.substr(2),"hex"),publicKey:Fr.utils.PublicKey.from(En[0].publicKey)}}catch{const Zt=yield ee.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Buffer.from($e).toString("hex")]});return{signature:Buffer.from(Zt[0].signature.substr(2),"hex"),publicKey:Fr.utils.PublicKey.from(Zt[0].publicKey)}}});return function(ht,ct){return We.apply(this,arguments)}}()},Ue=We=>{const $e=be(),{contract:ht}=r.getState();if(!$e.length||!ht)throw new Error("Wallet not signed in");return We.map(ct=>({signerId:ct.signerId||$e[0].accountId,receiverId:ct.receiverId||ht.contractId,actions:ct.actions}))};var We;return{signIn:()=>(0,Ke.Z)(function*(){const We=be();if(We.length)return We;ee.account&&(yield Ee());const $e=yield ie();if(!(yield oe({accountId:$e[0],publicKey:$e[1]})))throw Ee(),new Error(`Public key (${$e[1]}) is not registered with the account '${$e[0]}'.`);return yield O.setItem(F3,{accountId:$e[0],publicKey:$e[1]}),ee.account={accountId:$e[0],publicKey:$e[1]},Ce(),be()})(),getAccounts:()=>(0,Ke.Z)(function*(){return be()})(),signOut:Ee,verifyOwner:({message:We})=>(0,Ke.Z)(function*(){if(A.log("verifyOwner",{message:We}),!ee.wallet)throw new Error("Wallet is not installed");const $e=ee.account;if(!$e)throw new Error("Wallet not signed in");const ht=$e.accountId,ct=Fr.utils.PublicKey.fromString($e.publicKey),wt=yield J.block({finality:"final"}),zt={accountId:ht,message:We,blockId:wt.header.hash,publicKey:Buffer.from(ct.data).toString("base64"),keyType:ct.keyType},Zt=JSON.stringify(zt),En=yield Ie.signMessage(new Uint8Array(Buffer.from(Zt)),ht);return{...zt,signature:Buffer.from(En.signature).toString("base64")}})(),signMessage:We=>(0,Ke.Z)(function*(){if(!ee.wallet)throw new Error("Wallet is not installed");const ht=(yield ie())[0];if(!ht)throw new Error("Failed to find account for signing");const ct=(t=>{const e=new E3({...t});return Buffer.from((0,bI.serialize)(wI,e))})(We),wt=yield ee.wallet.request("near",{method:"dapp:signMessage",params:["0x"+ct.toString("hex")]}),zt={accountId:ht,publicKey:wt[0].publicKey,signature:Buffer.from(wt[0].signature.substr(2),"hex").toString("base64")};return We.state?{...zt,state:We.state}:zt})(),signAndSendTransaction:({signerId:We,receiverId:$e,actions:ht})=>(0,Ke.Z)(function*(){A.log("signAndSendTransaction",{signerId:We,receiverId:$e,actions:ht});const{contract:ct}=r.getState();if(!be().length||!ct)throw new Error("Wallet not signed in");const[zt]=yield(0,Js.signTransactions)(Ue([{signerId:We,receiverId:$e,actions:ht}]),Ie,e.network);return J.sendTransaction(zt)})(),signAndSendTransactions:({transactions:We})=>(0,Ke.Z)(function*(){A.log("signAndSendTransactions",{transactions:We});const $e=yield(0,Js.signTransactions)(Ue(We),Ie,e.network),ht=[];for(let ct=0;ct<$e.length;ct++)ht.push(yield J.sendTransaction($e[ct]));return ht})(),importAccountsInSecureContext:({accounts:We})=>(0,Ke.Z)(function*(){if(!ee.wallet)throw new Error("Wallet is not installed");const $e=[];We.forEach(({privateKey:ct})=>{"ed25519:"===ct.slice(0,8)?$e.push(ct.slice(8)):$e.push(ct)});const ht={privateKey:$e,network:e.network.networkId};yield ee.wallet.request("near",{method:"experimental:near:importPrivatekey",params:[ht]})})()}});return function(r){return t.apply(this,arguments)}}();function HI({iconUrl:t=pV,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){const r=kI()(),a=w3(["chrome","edge-chromium","opera"]);if(r||!a)return null;const A=yield gV();return{id:"welldone-wallet",type:"injected",metadata:{name:"WELLDONE Wallet",description:"WELLDONE Wallet for Multichains",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf",deprecated:e,available:A},init:mV}})}var K3=u(84960);const vV=function(){var t=(0,Ke.Z)(function*(e){const{store:r,logger:a,emitter:A,options:O,defaultProvider:J,defaultStrategy:ee}=e,ie=new K3.HereWallet({networkId:O.network.networkId,nodeUrl:O.network.nodeUrl,defaultProvider:J,defaultStrategy:ee});function oe(){return de.apply(this,arguments)}function de(){return(de=(0,Ke.Z)(function*(){a.log("HereWallet:getAccounts");const be=yield ie.getAccounts(),Ee=[];for(let Ce=0;Ce`https://my.herewallet.app/import?network=${O.network.networkId}`,account:be=>(0,Ke.Z)(function*(){return a.log("HereWallet:account"),yield ie.account(be)})(),switchAccount:be=>(0,Ke.Z)(function*(){a.log("HereWallet:switchAccount"),yield ie.switchAccount(be)})(),getAccountId:()=>(0,Ke.Z)(function*(){return a.log("HereWallet:getAccountId"),yield ie.getAccountId()})(),isSignedIn:()=>(0,Ke.Z)(function*(){return a.log("HereWallet:isSignedIn"),yield ie.isSignedIn()})(),signIn:be=>(0,Ke.Z)(function*(){if(a.log("HereWallet:signIn"),!(yield K3.waitInjectedHereWallet)){const Ce=""!==be.contractId?be.contractId:void 0;yield ie.signIn({...be,contractId:Ce})}return A.emit("signedIn",{contractId:be.contractId,methodNames:be.methodNames??[],accounts:yield oe()}),yield oe()})(),getHereBalance:()=>(0,Ke.Z)(function*(){return a.log("HereWallet:getHereBalance"),yield ie.getHereBalance()})(),getAvailableBalance:()=>(0,Ke.Z)(function*(){return a.log("HereWallet:getAvailableBalance"),yield ie.getAvailableBalance()})(),signOut:()=>(0,Ke.Z)(function*(){a.log("HereWallet:signOut"),yield ie.signOut()})(),getAccounts:()=>(0,Ke.Z)(function*(){return oe()})(),signAndSendTransaction:be=>(0,Ke.Z)(function*(){a.log("HereWallet:signAndSendTransaction",be);const{contract:Ee}=r.getState();return yield ie.signAndSendTransaction({receiverId:Ee?.contractId,...be})})(),verifyOwner:()=>(0,Ke.Z)(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:be=>(0,Ke.Z)(function*(){return a.log("HereWallet:signMessage",be),yield ie.signMessage(be)})(),signAndSendTransactions:be=>(0,Ke.Z)(function*(){return a.log("HereWallet:signAndSendTransactions",be),yield ie.signAndSendTransactions(be)})()}});return function(r){return t.apply(this,arguments)}}(),bV="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function WI({deprecated:t=!1,iconUrl:e=bV,defaultStrategy:r,defaultProvider:a}={}){return(0,Ke.Z)(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",topLevelInjected:null!=(yield K3.waitInjectedHereWallet),iconUrl:e,deprecated:t,available:!0},init:O=>vV({...O,defaultStrategy:r,defaultProvider:a})}})}const _V=function(){var t=(0,Ke.Z)(function*({metadata:e,options:r,store:a,provider:A,logger:O}){const J={wallet:window.coin98},ee=function(){var oe=(0,Ke.Z)(function*(){const de=J.wallet.near.account;if(!de)return[];const be=yield J.wallet.near.signer.getPublicKey(de,r.network.networkId);return[{accountId:de,publicKey:be?be.toString():void 0}]});return function(){return oe.apply(this,arguments)}}(),ie=oe=>{const{contract:de}=a.getState();if(!de)throw new Error("Wallet not signed in");const be=bd(a.getState());if(!be)throw new Error("No active account");return oe.map(Ee=>({signerId:Ee.signerId||be.accountId,receiverId:Ee.receiverId||de.contractId,actions:Ee.actions}))};return{signIn:({contractId:oe})=>(0,Ke.Z)(function*(){const de=yield ee();return de.length?de:(yield J.wallet.near.connect({prefix:"near_selector",contractId:oe}),ee())})(),signOut:()=>(0,Ke.Z)(function*(){yield J.wallet.near.disconnect()})(),getAccounts:()=>(0,Ke.Z)(function*(){return ee()})(),verifyOwner:()=>(0,Ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:oe,receiverId:de,actions:be})=>(0,Ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:oe,receiverId:de,actions:be});const Ee=yield(0,Js.signTransactions)(ie([{signerId:oe,receiverId:de,actions:be}]),J.wallet.near.signer,r.network);return A.sendTransaction(Ee[0])})(),signAndSendTransactions:({transactions:oe})=>(0,Ke.Z)(function*(){O.log("signAndSendTransactions",{transactions:oe});const de=yield(0,Js.signTransactions)(ie(oe),J.wallet.near.signer,r.network);O.log("signAndSendTransactions:signedTransactions",de);const be=[];for(let Ee=0;Ee(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=!!window.coin98;return{id:"coin98-wallet",type:"injected",metadata:{name:"Coin98 Wallet",description:"Using a Decentralized Wallet With Experiences of a Centralized One",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",deprecated:e,available:a},init:_V}}),SV="data:image/png;base64,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",xV=()=>kc(()=>!!window.nearFiWallet?.isNearFi,{timeout:200}).catch(()=>!1),IV=function(){var t=(0,Ke.Z)(function*({options:e,metadata:r,store:a,emitter:A,logger:O}){const J={wallet:window.nearFiWallet},ee=function(){var Ce=(0,Ke.Z)(function*(){if(!J.wallet.isSignedIn())return;const Ie=yield J.wallet.signOut();if(!0===Ie)return;const Ue=new Error("string"==typeof Ie.error?Ie.error:Ie.error.type);if("User reject"===Ue.message)throw Ue;O.log("Failed to sign out"),O.error(Ue)});return function(){return Ce.apply(this,arguments)}}(),ie=()=>{J.wallet.on("accountChanged",function(){var Ce=(0,Ke.Z)(function*(Ie){O.log("onAccountChange",Ie),A.emit("signedOut",null)});return function(Ie){return Ce.apply(this,arguments)}}()),J.wallet.on("rpcChanged",function(){var Ce=(0,Ke.Z)(function*(Ie){O.log("onNetworkChange",Ie),e.network.networkId!==Ie.networkId&&(yield ee(),A.emit("signedOut",null),A.emit("networkChanged",{networkId:Ie.networkId}))});return function(Ie){return Ce.apply(this,arguments)}}())},oe=function(){var Ce=(0,Ke.Z)(function*(){let Ie=J.wallet.getAccountId();return Ie||(yield J.wallet.resolveSignInState(),Ie=J.wallet.getAccountId(),Ie)?[{accountId:Ie}]:[]});return function(){return Ce.apply(this,arguments)}}(),be=Ce=>{if(!(Ce=>Ce.every(Ie=>"FunctionCall"===Ie.type))(Ce))throw new Error(`Only 'FunctionCall' actions types are supported by ${r.name}`);return Ce.map(Ue=>Ue.params)},Ee=Ce=>Ce.map(Ie=>({receiverId:Ie.receiverId,actions:be(Ie.actions)}));return J.wallet&&J.wallet.isSignedIn()&&ie(),{signIn:({contractId:Ce,methodNames:Ie})=>(0,Ke.Z)(function*(){const Ue=yield oe();if(Ue.length)return Ue;const{accessKey:We,error:$e}=yield J.wallet.requestSignIn({contractId:Ce,methodNames:Ie});if(!We||$e)throw yield ee(),new Error(("string"==typeof $e?$e:$e.type)||"Failed to sign in");return ie(),yield oe()})(),signOut:ee,getAccounts:()=>(0,Ke.Z)(function*(){return yield oe()})(),verifyOwner:({message:Ce})=>(0,Ke.Z)(function*(){throw O.log("NearFi:verifyOwner",{message:Ce}),new Error(`Method not supported by ${r.name}`)})(),signAndSendTransaction:({signerId:Ce,receiverId:Ie,actions:Ue})=>(0,Ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:Ce,receiverId:Ie,actions:Ue});const{contract:We}=a.getState();if(!J.wallet.isSignedIn()||!We)throw new Error("Wallet not signed in");return J.wallet.signAndSendTransaction({receiverId:Ie||We.contractId,actions:be(Ue)}).then($e=>{if($e.error)throw new Error($e.error);if(!$e.response?.length)throw new Error("Invalid response");return $e.response[0]})})(),signAndSendTransactions:({transactions:Ce})=>(0,Ke.Z)(function*(){if(O.log("signAndSendTransactions",{transactions:Ce}),!J.wallet.isSignedIn())throw new Error("Wallet not signed in");return J.wallet.requestSignTransactions({transactions:Ee(Ce)}).then(Ie=>{if(Ie.error)throw new Error(Ie.error);if(!Ie.response?.length)throw new Error("Invalid response");return Ie.response})})()}});return function(r){return t.apply(this,arguments)}}();function ZI({iconUrl:t=SV,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){const r=(0,uc.isMobile)(),a=yield xV();return r&&a?{id:"nearfi",type:"injected",metadata:{name:"NearFi",description:"Your NEAR DeFi experience On The Go",iconUrl:t,downloadUrl:"https://nearfi.finance",deprecated:e,available:a},init:IV}:null})}var z3=u(72487);const V3=new z3.NearSnap,CV=function(){var t=(0,Ke.Z)(function*(e){const{store:r,logger:a,options:A}=e,O=A.network.networkId;let J=yield z3.NearSnapAccount.restore({network:O,snap:V3});return{isSignedIn:()=>(0,Ke.Z)(function*(){return a.log("NearSnap:isSignedIn"),null!=J})(),signIn:({contractId:ee,methodNames:ie})=>(0,Ke.Z)(function*(){return a.log("NearSnap:signIn"),J=yield z3.NearSnapAccount.connect({contractId:""===ee?void 0:ee,methods:ie,network:O,snap:V3}),[{accountId:J.accountId}]})(),signOut:()=>(0,Ke.Z)(function*(){a.log("NearSnap:signOut"),yield J?.disconnect()})(),getAccounts:()=>(0,Ke.Z)(function*(){return J?[{accountId:J.accountId}]:[]})(),signAndSendTransaction:ee=>(0,Ke.Z)(function*(){if(a.log("NearSnap:signAndSendTransaction",ee),null==J)throw new Error("Wallet not signed in");const{contract:ie}=r.getState(),oe=ee.receiverId??ie?.contractId;if(null==oe)throw new Error("ReceiverId is not defined");return yield J.executeTransaction({receiverId:oe,...ee})})(),signMessage:({message:ee,nonce:ie,recipient:oe})=>(0,Ke.Z)(function*(){if(null==J)throw new Error("Wallet not signed in");return yield J.signMessage({message:ee,nonce:ie,recipient:oe})})(),verifyOwner:()=>(0,Ke.Z)(function*(){throw Error("NearSnap:verifyOwner is not released yet")})(),signAndSendTransactions:({transactions:ee})=>(0,Ke.Z)(function*(){if(a.log("NearSnap:signAndSendTransactions",{transactions:ee}),null==J)throw new Error("Wallet not signed in");return yield J.executeTransactions(ee)})()}});return function(r){return t.apply(this,arguments)}}(),DV="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIGlkPSJMYXllcl8xIiB4PSIwIiB5PSIwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzMTguNiAzMTguNiI+CiAgPHN0eWxlPgogICAgLnN0MSwuc3Q2e2ZpbGw6I2U0NzYxYjtzdHJva2U6I2U0NzYxYjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmR9LnN0NntmaWxsOiNmNjg1MWI7c3Ryb2tlOiNmNjg1MWJ9CiAgPC9zdHlsZT4KICA8cGF0aCBmaWxsPSIjZTI3NjFiIiBzdHJva2U9IiNlMjc2MWIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTI3NC4xIDM1LjUtOTkuNSA3My45TDE5MyA2NS44eiIvPgogIDxwYXRoIGQ9Im00NC40IDM1LjUgOTguNyA3NC42LTE3LjUtNDQuM3ptMTkzLjkgMTcxLjMtMjYuNSA0MC42IDU2LjcgMTUuNiAxNi4zLTU1LjN6bS0yMDQuNC45TDUwLjEgMjYzbDU2LjctMTUuNi0yNi41LTQwLjZ6IiBjbGFzcz0ic3QxIi8+CiAgPHBhdGggZD0ibTEwMy42IDEzOC4yLTE1LjggMjMuOSA1Ni4zIDIuNS0yLTYwLjV6bTExMS4zIDAtMzktMzQuOC0xLjMgNjEuMiA1Ni4yLTIuNXpNMTA2LjggMjQ3LjRsMzMuOC0xNi41LTI5LjItMjIuOHptNzEuMS0xNi41IDMzLjkgMTYuNS00LjctMzkuM3oiIGNsYXNzPSJzdDEiLz4KICA8cGF0aCBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTIxMS44IDI0Ny40LTMzLjktMTYuNSAyLjcgMjIuMS0uMyA5LjN6bS0xMDUgMCAzMS41IDE0LjktLjItOS4zIDIuNS0yMi4xeiIvPgogIDxwYXRoIGZpbGw9IiMyMzM0NDciIHN0cm9rZT0iIzIzMzQ0NyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJtMTM4LjggMTkzLjUtMjguMi04LjMgMTkuOS05LjF6bTQwLjkgMCA4LjMtMTcuNCAyMCA5LjF6Ii8+CiAgPHBhdGggZmlsbD0iI2NkNjExNiIgc3Ryb2tlPSIjY2Q2MTE2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xMDYuOCAyNDcuNCA0LjgtNDAuNi0zMS4zLjl6TTIwNyAyMDYuOGw0LjggNDAuNiAyNi41LTM5Ljd6bTIzLjgtNDQuNy01Ni4yIDIuNSA1LjIgMjguOSA4LjMtMTcuNCAyMCA5LjF6bS0xMjAuMiAyMy4xIDIwLTkuMSA4LjIgMTcuNCA1LjMtMjguOS01Ni4zLTIuNXoiLz4KICA8cGF0aCBmaWxsPSIjZTQ3NTFmIiBzdHJva2U9IiNlNDc1MWYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTg3LjggMTYyLjEgMjMuNiA0Ni0uOC0yMi45em0xMjAuMyAyMy4xLTEgMjIuOSAyMy43LTQ2em0tNjQtMjAuNi01LjMgMjguOSA2LjYgMzQuMSAxLjUtNDQuOXptMzAuNSAwLTIuNyAxOCAxLjIgNDUgNi43LTM0LjF6Ii8+CiAgPHBhdGggZD0ibTE3OS44IDE5My41LTYuNyAzNC4xIDQuOCAzLjMgMjkuMi0yMi44IDEtMjIuOXptLTY5LjItOC4zLjggMjIuOSAyOS4yIDIyLjggNC44LTMuMy02LjYtMzQuMXoiIGNsYXNzPSJzdDYiLz4KICA8cGF0aCBmaWxsPSIjYzBhZDllIiBzdHJva2U9IiNjMGFkOWUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTE4MC4zIDI2Mi4zLjMtOS4zLTIuNS0yLjJoLTM3LjdsLTIuMyAyLjIuMiA5LjMtMzEuNS0xNC45IDExIDkgMjIuMyAxNS41aDM4LjNsMjIuNC0xNS41IDExLTl6Ii8+CiAgPHBhdGggZmlsbD0iIzE2MTYxNiIgc3Ryb2tlPSIjMTYxNjE2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xNzcuOSAyMzAuOS00LjgtMy4zaC0yNy43bC00LjggMy4zLTIuNSAyMi4xIDIuMy0yLjJoMzcuN2wyLjUgMi4yeiIvPgogIDxwYXRoIGZpbGw9IiM3NjNkMTYiIHN0cm9rZT0iIzc2M2QxNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJtMjc4LjMgMTE0LjIgOC41LTQwLjgtMTIuNy0zNy45LTk2LjIgNzEuNCAzNyAzMS4zIDUyLjMgMTUuMyAxMS42LTEzLjUtNS0zLjYgOC03LjMtNi4yLTQuOCA4LTYuMXpNMzEuOCA3My40bDguNSA0MC44LTUuNCA0IDggNi4xLTYuMSA0LjggOCA3LjMtNSAzLjYgMTEuNSAxMy41IDUyLjMtMTUuMyAzNy0zMS4zLTk2LjItNzEuNHoiLz4KICA8cGF0aCBkPSJtMjY3LjIgMTUzLjUtNTIuMy0xNS4zIDE1LjkgMjMuOS0yMy43IDQ2IDMxLjItLjRoNDYuNXptLTE2My42LTE1LjMtNTIuMyAxNS4zLTE3LjQgNTQuMmg0Ni40bDMxLjEuNC0yMy42LTQ2em03MSAyNi40IDMuMy01Ny43IDE1LjItNDEuMWgtNjcuNWwxNSA0MS4xIDMuNSA1Ny43IDEuMiAxOC4yLjEgNDQuOGgyNy43bC4yLTQ0Ljh6IiBjbGFzcz0ic3Q2Ii8+Cjwvc3ZnPg==";function TV({deprecated:t=!1,iconUrl:e=DV}={}){return(0,Ke.Z)(function*(){return(0,uc.isMobile)()?null:{id:"near-snap",type:"injected",init:CV,metadata:{name:"Near Snap",description:"Metamask Snap for NEAR Protocol",downloadUrl:"https://near-snap.surge.sh",available:yield V3.provider.isSnapsAvailable(),deprecated:t,iconUrl:e}}})}var OV=u(35469),H3=u.n(OV);const NV="data:image/png;base64,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";var or=u(10499),PV=u(66171),Rr=u(24325),fr=u(88666);const mw="providers/5.7.2";var RV=u(12748),Di=u(52909),JI=u(90687),Mv=u(63544),W3=u(71474),wd=u(39851),YI=u(58314),kV=u(57836),G3=u(45887),LV=u(18663),Iv=u(63324);const $I=new fr.Logger("networks/5.7.1");function sf(t){const e=function(r,a){null==a&&(a={});const A=[];if(r.InfuraProvider&&"-"!==a.infura)try{A.push(new r.InfuraProvider(t,a.infura))}catch{}if(r.EtherscanProvider&&"-"!==a.etherscan)try{A.push(new r.EtherscanProvider(t,a.etherscan))}catch{}if(r.AlchemyProvider&&"-"!==a.alchemy)try{A.push(new r.AlchemyProvider(t,a.alchemy))}catch{}if(r.PocketProvider&&"-"!==a.pocket){const O=["goerli","ropsten","rinkeby","sepolia"];try{const J=new r.PocketProvider(t,a.pocket);J.network&&-1===O.indexOf(J.network.name)&&A.push(J)}catch{}}if(r.CloudflareProvider&&"-"!==a.cloudflare)try{A.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&"-"!==a.ankr)try{const O=["ropsten"],J=new r.AnkrProvider(t,a.ankr);J.network&&-1===O.indexOf(J.network.name)&&A.push(J)}catch{}if(0===A.length)return null;if(r.FallbackProvider){let O=1;return null!=a.quorum?O=a.quorum:"homestead"===t&&(O=2),new r.FallbackProvider(A,O)}return A[0]};return e.renetwork=function(r){return sf(r)},e}function vw(t,e){const r=function(a,A){return a.JsonRpcProvider?new a.JsonRpcProvider(t,e):null};return r.renetwork=function(a){return vw(t,a)},r}const QI={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:sf("homestead")},XI={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:sf("ropsten")},qI={chainId:63,name:"classicMordor",_defaultProvider:vw("https://www.ethercluster.com/mordor","classicMordor")},bw={unspecified:{chainId:0,name:"unspecified"},homestead:QI,mainnet:QI,morden:{chainId:2,name:"morden"},ropsten:XI,testnet:XI,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:sf("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:sf("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:sf("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:sf("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:vw("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qI,classicTestnet:qI,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:vw("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:sf("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:sf("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};var e9=u(91871),UV=u(70988),t9=u.n(UV),Z3=u(28016);const Cv=new fr.Logger(mw);class sr{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},r=this.address.bind(this),a=this.bigNumber.bind(this),A=this.blockTag.bind(this),O=this.data.bind(this),J=this.hash.bind(this),ee=this.hex.bind(this),ie=this.number.bind(this),oe=this.type.bind(this);return e.transaction={hash:J,type:oe,accessList:sr.allowNull(this.accessList.bind(this),null),blockHash:sr.allowNull(J,null),blockNumber:sr.allowNull(ie,null),transactionIndex:sr.allowNull(ie,null),confirmations:sr.allowNull(ie,null),from:r,gasPrice:sr.allowNull(a),maxPriorityFeePerGas:sr.allowNull(a),maxFeePerGas:sr.allowNull(a),gasLimit:a,to:sr.allowNull(r,null),value:a,nonce:ie,data:O,r:sr.allowNull(this.uint256),s:sr.allowNull(this.uint256),v:sr.allowNull(ie),creates:sr.allowNull(r,null),raw:sr.allowNull(O)},e.transactionRequest={from:sr.allowNull(r),nonce:sr.allowNull(ie),gasLimit:sr.allowNull(a),gasPrice:sr.allowNull(a),maxPriorityFeePerGas:sr.allowNull(a),maxFeePerGas:sr.allowNull(a),to:sr.allowNull(r),value:sr.allowNull(a),data:sr.allowNull(be=>this.data(be,!0)),type:sr.allowNull(ie),accessList:sr.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:ie,blockNumber:ie,transactionHash:J,address:r,topics:sr.arrayOf(J),data:O,logIndex:ie,blockHash:J},e.receipt={to:sr.allowNull(this.address,null),from:sr.allowNull(this.address,null),contractAddress:sr.allowNull(r,null),transactionIndex:ie,root:sr.allowNull(ee),gasUsed:a,logsBloom:sr.allowNull(O),blockHash:J,transactionHash:J,logs:sr.arrayOf(this.receiptLog.bind(this)),blockNumber:ie,confirmations:sr.allowNull(ie,null),cumulativeGasUsed:a,effectiveGasPrice:sr.allowNull(a),status:sr.allowNull(ie),type:oe},e.block={hash:sr.allowNull(J),parentHash:J,number:ie,timestamp:ie,nonce:sr.allowNull(ee),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:sr.allowNull(r),extraData:O,transactions:sr.allowNull(sr.arrayOf(J)),baseFeePerGas:sr.allowNull(a)},e.blockWithTransactions=(0,Rr.shallowCopy)(e.block),e.blockWithTransactions.transactions=sr.allowNull(sr.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:sr.allowNull(A,void 0),toBlock:sr.allowNull(A,void 0),blockHash:sr.allowNull(J,void 0),address:sr.allowNull(r,void 0),topics:sr.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:sr.allowNull(ie),blockHash:sr.allowNull(J),transactionIndex:ie,removed:sr.allowNull(this.boolean.bind(this)),address:r,data:sr.allowFalsish(O,"0x"),topics:sr.arrayOf(J),transactionHash:J,logIndex:ie},e}accessList(e){return(0,W3.accessListify)(e||[])}number(e){return"0x"===e?0:Di.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:Di.O$.from(e).toNumber()}bigNumber(e){return Di.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return"string"==typeof e&&(!r&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,or.isHexString)(e))?e.toLowerCase():Cv.throwArgumentError("invalid hash","value",e)}data(e,r){const a=this.hex(e,r);if(a.length%2!=0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return(0,Z3.getAddress)(e)}callAddress(e){if(!(0,or.isHexString)(e,32))return null;const r=(0,Z3.getAddress)((0,or.hexDataSlice)(e,12));return"0x0000000000000000000000000000000000000000"===r?null:r}contractAddress(e){return(0,Z3.getContractAddress)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,or.isHexString)(e))return(0,or.hexValue)(e);throw new Error("invalid blockTag")}hash(e,r){const a=this.hex(e,r);return 32!==(0,or.hexDataLength)(a)?Cv.throwArgumentError("invalid hash","value",e):a}difficulty(e){if(null==e)return null;const r=Di.O$.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!(0,or.isHexString)(e))throw new Error("invalid uint256");return(0,or.hexZeroPad)(e,32)}_block(e,r){null!=e.author&&null==e.miner&&(e.miner=e.author);const a=null!=e._difficulty?e._difficulty:e.difficulty,A=sr.check(r,e);return A._difficulty=null==a?null:Di.O$.from(a),A}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return sr.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&Di.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const r=sr.check(this.formats.transaction,e);if(null!=e.chainId){let a=e.chainId;(0,or.isHexString)(a)&&(a=Di.O$.from(a).toNumber()),r.chainId=a}else{let a=e.networkId;null==a&&null==r.v&&(a=e.chainId),(0,or.isHexString)(a)&&(a=Di.O$.from(a).toNumber()),"number"!=typeof a&&null!=r.v&&(a=(r.v-35)/2,a<0&&(a=0),a=parseInt(a)),"number"!=typeof a&&(a=0),r.chainId=a}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}transaction(e){return(0,W3.parse)(e)}receiptLog(e){return sr.check(this.formats.receiptLog,e)}receipt(e){const r=sr.check(this.formats.receipt,e);if(null!=r.root)if(r.root.length<=4){const a=Di.O$.from(r.root).toNumber();0===a||1===a?(null!=r.status&&r.status!==a&&Cv.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=a,delete r.root):Cv.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&Cv.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):null!=e?this.hash(e,!0):null}filter(e){return sr.check(this.formats.filter,e)}filterLog(e){return sr.check(this.formats.filterLog,e)}static check(e,r){const a={};for(const A in e)try{const O=e[A](r[A]);void 0!==O&&(a[A]=O)}catch(O){throw O.checkKey=A,O.checkValue=r[A],O}return a}static allowNull(e,r){return function(a){return null==a?r:e(a)}}static allowFalsish(e,r){return function(a){return a?e(a):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const a=[];return r.forEach(function(A){a.push(e(A))}),a}}}var Vr=function(t,e,r,a){return new(r||(r=Promise))(function(O,J){function ee(de){try{oe(a.next(de))}catch(be){J(be)}}function ie(de){try{oe(a.throw(de))}catch(be){J(be)}}function oe(de){de.done?O(de.value):function A(O){return O instanceof r?O:new r(function(J){J(O)})}(de.value).then(ee,ie)}oe((a=a.apply(t,e||[])).next())})};const qr=new fr.Logger(mw);function r9(t){return null==t?"null":(32!==(0,or.hexDataLength)(t)&&qr.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function i9(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(A=>{r[r9(A)]=!0});const a=Object.keys(r);return a.sort(),a.join("|")}return r9(e)}).join("&")}function Dg(t){if("string"==typeof t){if(t=t.toLowerCase(),32===(0,or.hexDataLength)(t))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+i9(t);if(YI.Sg.isForkEvent(t))throw qr.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+i9(t.topics||[])}throw new Error("invalid event - "+t)}function Dv(){return(new Date).getTime()}function o9(t){return new Promise(e=>{setTimeout(e,t)})}const WV=["block","network","pending","poll"];class GV{constructor(e,r,a){(0,Rr.defineReadOnly)(this,"tag",e),(0,Rr.defineReadOnly)(this,"listener",r),(0,Rr.defineReadOnly)(this,"once",a),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const r=e[1],a=function HV(t){return""===t?[]:t.split(/&/g).map(e=>{if(""===e)return[];const r=e.split("|").map(a=>"null"===a?null:a);return 1===r.length?r[0]:r})}(e[2]),A={};return a.length>0&&(A.topics=a),r&&"*"!==r&&(A.address=r),A}pollable(){return this.tag.indexOf(":")>=0||WV.indexOf(this.tag)>=0}}const ZV={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function J3(t){return(0,or.hexZeroPad)(Di.O$.from(t).toHexString(),32)}function s9(t){return G3.Base58.encode((0,or.concat)([t,(0,or.hexDataSlice)((0,e9.JQ)((0,e9.JQ)(t)),0,4)]))}const a9=new RegExp("^(ipfs)://(.*)$","i"),c9=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),a9,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function ww(t,e){try{return(0,Mv.ZN)(Tv(t,e))}catch{}return null}function Tv(t,e){if("0x"===t)return null;const r=Di.O$.from((0,or.hexDataSlice)(t,e,e+32)).toNumber(),a=Di.O$.from((0,or.hexDataSlice)(t,r,r+32)).toNumber();return(0,or.hexDataSlice)(t,r+32,r+32+a)}function Y3(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):qr.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function u9(t){const e=(0,or.arrayify)(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function JV(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function l9(t){const e=[];let r=0;for(let a=0;aDi.O$.from(e).eq(1)).catch(e=>{if(e.code===fr.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Vr(this,void 0,void 0,function*(){const a={to:this.address,ccipReadEnabled:!0,data:(0,or.hexConcat)([e,(0,Iv.VM)(this.name),r||"0x"])};let A=!1;(yield this.supportsWildcard())&&(A=!0,a.data=(0,or.hexConcat)(["0x9061b923",l9([(0,Iv.Kn)(this.name),a.data])]));try{let O=yield this.provider.call(a);return(0,or.arrayify)(O).length%32==4&&qr.throwError("resolver threw error",fr.Logger.errors.CALL_EXCEPTION,{transaction:a,data:O}),A&&(O=Tv(O,0)),O}catch(O){if(O.code===fr.Logger.errors.CALL_EXCEPTION)return null;throw O}})}_fetchBytes(e,r){return Vr(this,void 0,void 0,function*(){const a=yield this._fetch(e,r);return null!=a?Tv(a,0):null})}_getAddress(e,r){const a=ZV[String(e)];if(null==a&&qr.throwError(`unsupported coin type: ${e}`,fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===a.ilk)return this.provider.formatter.address(r);const A=(0,or.arrayify)(r);if(null!=a.p2pkh){const O=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(O){const J=parseInt(O[1],16);if(O[2].length===2*J&&J>=1&&J<=75)return s9((0,or.concat)([[a.p2pkh],"0x"+O[2]]))}}if(null!=a.p2sh){const O=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(O){const J=parseInt(O[1],16);if(O[2].length===2*J&&J>=1&&J<=75)return s9((0,or.concat)([[a.p2sh],"0x"+O[2]]))}}if(null!=a.prefix){const O=A[1];let J=A[0];if(0===J?20!==O&&32!==O&&(J=-1):J=-1,J>=0&&A.length===2+O&&O>=1&&O<=75){const ee=t9().toWords(A.slice(2));return ee.unshift(J),t9().encode(a.prefix,ee)}}return null}getAddress(e){return Vr(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const A=yield this._fetch("0x3b3b57de");return"0x"===A||A===LV.R?null:this.provider.formatter.callAddress(A)}catch(A){if(A.code===fr.Logger.errors.CALL_EXCEPTION)return null;throw A}const r=yield this._fetchBytes("0xf1cb7e06",J3(e));if(null==r||"0x"===r)return null;const a=this._getAddress(e,r);return null==a&&qr.throwError("invalid or unsupported coin data",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),a})}getAvatar(){return Vr(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(null==r)return null;for(let a=0;aJ[ie])}return qr.throwError("invalid or unsupported content hash data",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Vr(this,void 0,void 0,function*(){let r=(0,Mv.Y0)(e);r=(0,or.concat)([J3(64),J3(r.length),r]),r.length%32!=0&&(r=(0,or.concat)([r,(0,or.hexZeroPad)("0x",32-e.length%32)]));const a=yield this._fetchBytes("0x59d1d43c",(0,or.hexlify)(r));return null==a||"0x"===a?null:(0,Mv.ZN)(a)})}}let $3=null,YV=1;class $V extends YI.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,Rr.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=(0,Rr.getStatic)(new.target,"getNetwork")(e);r?((0,Rr.defineReadOnly)(this,"_network",r),this.emit("network",r,null)):qr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Vr(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}null==e&&(e=yield this.detectNetwork()),e||qr.throwError("no network detected",fr.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,Rr.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return(0,wd.poll)(()=>this._ready().then(e=>e,e=>{if(e.code!==fr.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==$3&&($3=new sr),$3}static getNetwork(e){return function FV(t){if(null==t)return null;if("number"==typeof t){for(const a in bw){const A=bw[a];if(A.chainId===t)return{name:A.name,chainId:A.chainId,ensAddress:A.ensAddress||null,_defaultProvider:A._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const a=bw[t];return null==a?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}const e=bw[t.name];if(!e)return"number"!=typeof t.chainId&&$I.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&$I.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return null==r&&e._defaultProvider&&(r=function jV(t){return t&&"function"==typeof t.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}(e??"homestead")}ccipReadFetch(e,r,a){return Vr(this,void 0,void 0,function*(){if(this.disableCcipRead||0===a.length)return null;const A=e.to.toLowerCase(),O=r.toLowerCase(),J=[];for(let ee=0;ee=0?null:JSON.stringify({data:O,sender:A}),be=yield(0,wd.fetchJson)({url:oe,errorPassThrough:!0},de,(Ce,Ie)=>(Ce.status=Ie.statusCode,Ce));if(be.data)return be.data;const Ee=be.message||"unknown error";if(be.status>=400&&be.status<500)return qr.throwError(`response not found during CCIP fetch: ${Ee}`,fr.Logger.errors.SERVER_ERROR,{url:ie,errorMessage:Ee});J.push(Ee)}return qr.throwError(`error encountered during CCIP fetch: ${J.map(ee=>JSON.stringify(ee)).join(", ")}`,fr.Logger.errors.SERVER_ERROR,{urls:a,errorMessages:J})})}_getInternalBlockNumber(e){return Vr(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const A=this._internalBlockNumber;try{const O=yield A;if(Dv()-O.respTime<=e)return O.blockNumber;break}catch{if(this._internalBlockNumber===A)break}}const r=Dv(),a=(0,Rr.resolveProperties)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(A=>null,A=>A)}).then(({blockNumber:A,networkError:O})=>{if(O)throw this._internalBlockNumber===a&&(this._internalBlockNumber=null),O;const J=Dv();return(A=Di.O$.from(A).toNumber()){this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return Vr(this,void 0,void 0,function*(){const e=YV++,r=[];let a=null;try{a=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(A){return void this.emit("error",A)}if(this._setFastBlockNumber(a),this.emit("poll",e,a),a!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=a-1),Math.abs(this._emitted.block-a)>1e3)qr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",qr.makeError("network block skew detected",fr.Logger.errors.NETWORK_ERROR,{blockNumber:a,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",a);else for(let A=this._emitted.block+1;A<=a;A++)this.emit("block",A);this._emitted.block!==a&&(this._emitted.block=a,Object.keys(this._emitted).forEach(A=>{if("block"===A)return;const O=this._emitted[A];"pending"!==O&&a-O>12&&delete this._emitted[A]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=a-1),this._events.forEach(A=>{switch(A.type){case"tx":{const O=A.hash;let J=this.getTransactionReceipt(O).then(ee=>(!ee||null==ee.blockNumber||(this._emitted["t:"+O]=ee.blockNumber,this.emit(O,ee)),null)).catch(ee=>{this.emit("error",ee)});r.push(J);break}case"filter":if(!A._inflight){A._inflight=!0,-2===A._lastBlockNumber&&(A._lastBlockNumber=a-1);const O=A.filter;O.fromBlock=A._lastBlockNumber+1,O.toBlock=a;const J=O.toBlock-this._maxFilterBlockRange;J>O.fromBlock&&(O.fromBlock=J),O.fromBlock<0&&(O.fromBlock=0);const ee=this.getLogs(O).then(ie=>{A._inflight=!1,0!==ie.length&&ie.forEach(oe=>{oe.blockNumber>A._lastBlockNumber&&(A._lastBlockNumber=oe.blockNumber),this._emitted["b:"+oe.blockHash]=oe.blockNumber,this._emitted["t:"+oe.transactionHash]=oe.blockNumber,this.emit(O,oe)})}).catch(ie=>{this.emit("error",ie),A._inflight=!1});r.push(ee)}}}),this._lastBlockNumber=a,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(A=>{this.emit("error",A)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Vr(this,void 0,void 0,function*(){return qr.throwError("provider does not support network detection",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Vr(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",r,e),yield o9(0),this._network;const a=qr.makeError("underlying network changed",fr.Logger.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",a),a}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=Dv();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((null==this._fastBlockNumber||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,a){return Vr(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,a||0,null)})}_waitForTransaction(e,r,a,A){return Vr(this,void 0,void 0,function*(){const O=yield this.getTransactionReceipt(e);return(O?O.confirmations:0)>=r?O:new Promise((J,ee)=>{const ie=[];let oe=!1;const de=function(){return!!oe||(oe=!0,ie.forEach(Ee=>{Ee()}),!1)},be=Ee=>{Ee.confirmations{this.removeListener(e,be)}),A){let Ee=A.startBlock,Ce=null;const Ie=Ue=>Vr(this,void 0,void 0,function*(){oe||(yield o9(1e3),this.getTransactionCount(A.from).then(We=>Vr(this,void 0,void 0,function*(){if(!oe){if(We<=A.nonce)Ee=Ue;else{{const $e=yield this.getTransaction(e);if($e&&null!=$e.blockNumber)return}for(null==Ce&&(Ce=Ee-3,Ce{oe||this.once("block",Ie)}))});if(oe)return;this.once("block",Ie),ie.push(()=>{this.removeListener("block",Ie)})}if("number"==typeof a&&a>0){const Ee=setTimeout(()=>{de()||ee(qr.makeError("timeout exceeded",fr.Logger.errors.TIMEOUT,{timeout:a}))},a);Ee.unref&&Ee.unref(),ie.push(()=>{clearTimeout(Ee)})}})})}getBlockNumber(){return Vr(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Di.O$.from(e)}catch(r){return qr.throwError("bad result from backend",fr.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield(0,Rr.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),A=yield this.perform("getBalance",a);try{return Di.O$.from(A)}catch(O){return qr.throwError("bad result from backend",fr.Logger.errors.SERVER_ERROR,{method:"getBalance",params:a,result:A,error:O})}})}getTransactionCount(e,r){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield(0,Rr.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),A=yield this.perform("getTransactionCount",a);try{return Di.O$.from(A).toNumber()}catch(O){return qr.throwError("bad result from backend",fr.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:A,error:O})}})}getCode(e,r){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const a=yield(0,Rr.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),A=yield this.perform("getCode",a);try{return(0,or.hexlify)(A)}catch(O){return qr.throwError("bad result from backend",fr.Logger.errors.SERVER_ERROR,{method:"getCode",params:a,result:A,error:O})}})}getStorageAt(e,r,a){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const A=yield(0,Rr.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(r).then(J=>(0,or.hexValue)(J))}),O=yield this.perform("getStorageAt",A);try{return(0,or.hexlify)(O)}catch(J){return qr.throwError("bad result from backend",fr.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:A,result:O,error:J})}})}_wrapTransaction(e,r,a){if(null!=r&&32!==(0,or.hexDataLength)(r))throw new Error("invalid response - sendTransaction");const A=e;return null!=r&&e.hash!==r&&qr.throwError("Transaction hash mismatch from Provider.sendTransaction.",fr.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),A.wait=(O,J)=>Vr(this,void 0,void 0,function*(){let ee;null==O&&(O=1),null==J&&(J=0),0!==O&&null!=a&&(ee={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:a});const ie=yield this._waitForTransaction(e.hash,O,J,ee);return null==ie&&0===O?null:(this._emitted["t:"+e.hash]=ie.blockNumber,0===ie.status&&qr.throwError("transaction failed",fr.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:ie}),ie)}),A}sendTransaction(e){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(O=>(0,or.hexlify)(O)),a=this.formatter.transaction(e);null==a.confirmations&&(a.confirmations=0);const A=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const O=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(a,O,A)}catch(O){throw O.transaction=a,O.transactionHash=a.hash,O}})}_getTransactionRequest(e){return Vr(this,void 0,void 0,function*(){const r=yield e,a={};return["from","to"].forEach(A=>{null!=r[A]&&(a[A]=Promise.resolve(r[A]).then(O=>O?this._getAddress(O):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(A=>{null!=r[A]&&(a[A]=Promise.resolve(r[A]).then(O=>O?Di.O$.from(O):null))}),["type"].forEach(A=>{null!=r[A]&&(a[A]=Promise.resolve(r[A]).then(O=>O??null))}),r.accessList&&(a.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(A=>{null!=r[A]&&(a[A]=Promise.resolve(r[A]).then(O=>O?(0,or.hexlify)(O):null))}),this.formatter.transactionRequest(yield(0,Rr.resolveProperties)(a))})}_getFilter(e){return Vr(this,void 0,void 0,function*(){e=yield e;const r={};return null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(a=>{null!=e[a]&&(r[a]=e[a])}),["fromBlock","toBlock"].forEach(a=>{null!=e[a]&&(r[a]=this._getBlockTag(e[a]))}),this.formatter.filter(yield(0,Rr.resolveProperties)(r))})}_call(e,r,a){return Vr(this,void 0,void 0,function*(){a>=10&&qr.throwError("CCIP read exceeded maximum redirections",fr.Logger.errors.SERVER_ERROR,{redirects:a,transaction:e});const A=e.to,O=yield this.perform("call",{transaction:e,blockTag:r});if(a>=0&&"latest"===r&&null!=A&&"0x556f1830"===O.substring(0,10)&&(0,or.hexDataLength)(O)%32==4)try{const J=(0,or.hexDataSlice)(O,4),ee=(0,or.hexDataSlice)(J,0,32);Di.O$.from(ee).eq(A)||qr.throwError("CCIP Read sender did not match",fr.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:O});const ie=[],oe=Di.O$.from((0,or.hexDataSlice)(J,32,64)).toNumber(),de=Di.O$.from((0,or.hexDataSlice)(J,oe,oe+32)).toNumber(),be=(0,or.hexDataSlice)(J,oe+32);for(let $e=0;$eVr(this,void 0,void 0,function*(){const O=yield this.perform("getBlock",A);if(null==O)return null!=A.blockHash&&null==this._emitted["b:"+A.blockHash]||null!=A.blockTag&&a>this._emitted.block?null:void 0;if(r){let J=null;for(let ie=0;iethis._wrapTransaction(ie)),ee}return this.formatter.block(O)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Vr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return(0,wd.poll)(()=>Vr(this,void 0,void 0,function*(){const a=yield this.perform("getTransaction",r);if(null==a)return null==this._emitted["t:"+e]?null:void 0;const A=this.formatter.transactionResponse(a);if(null==A.blockNumber)A.confirmations=0;else if(null==A.confirmations){let J=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-A.blockNumber+1;J<=0&&(J=1),A.confirmations=J}return this._wrapTransaction(A)}),{oncePoll:this})})}getTransactionReceipt(e){return Vr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return(0,wd.poll)(()=>Vr(this,void 0,void 0,function*(){const a=yield this.perform("getTransactionReceipt",r);if(null==a)return null==this._emitted["t:"+e]?null:void 0;if(null==a.blockHash)return;const A=this.formatter.receipt(a);if(null==A.blockNumber)A.confirmations=0;else if(null==A.confirmations){let J=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-A.blockNumber+1;J<=0&&(J=1),A.confirmations=J}return A}),{oncePoll:this})})}getLogs(e){return Vr(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield(0,Rr.resolveProperties)({filter:this._getFilter(e)}),a=yield this.perform("getLogs",r);return a.forEach(A=>{null==A.removed&&(A.removed=!1)}),sr.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return Vr(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Vr(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&qr.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Vr(this,void 0,void 0,function*(){let r=e;for(;;){if(""===r||"."===r||"eth"!==e&&"eth"===r)return null;const a=yield this._getResolver(r,"getResolver");if(null!=a){const A=new f9(this,a,e);return r===e||(yield A.supportsWildcard())?A:null}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Vr(this,void 0,void 0,function*(){null==r&&(r="ENS");const a=yield this.getNetwork();a.ensAddress||qr.throwError("network does not support ENS",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:r,network:a.name});try{const A=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+(0,Iv.VM)(e).substring(2)});return this.formatter.callAddress(A)}catch{}return null})}resolveName(e){return Vr(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if((0,or.isHexString)(e))throw a}"string"!=typeof e&&qr.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Vr(this,void 0,void 0,function*(){e=yield e;const r=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",a=yield this._getResolver(r,"lookupAddress");if(null==a)return null;const A=ww(yield this.call({to:a,data:"0x691f3431"+(0,Iv.VM)(r).substring(2)}),0);return(yield this.resolveName(A))!=e?null:A})}getAvatar(e){return Vr(this,void 0,void 0,function*(){let r=null;if((0,or.isHexString)(e)){const O=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",J=yield this._getResolver(O,"getAvatar");if(!J)return null;r=new f9(this,J,O);try{const ee=yield r.getAvatar();if(ee)return ee.url}catch(ee){if(ee.code!==fr.Logger.errors.CALL_EXCEPTION)throw ee}try{const ee=ww(yield this.call({to:J,data:"0x691f3431"+(0,Iv.VM)(O).substring(2)}),0);r=yield this.getResolver(ee)}catch(ee){if(ee.code!==fr.Logger.errors.CALL_EXCEPTION)throw ee;return null}}else if(r=yield this.getResolver(e),!r)return null;const a=yield r.getAvatar();return null==a?null:a.url})}perform(e,r){return qr.throwError(e+" not implemented",fr.Logger.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,a){const A=new GV(Dg(e),r,a);return this._events.push(A),this._startEvent(A),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let a=!1,A=[],O=Dg(e);return this._events=this._events.filter(J=>J.tag!==O||(setTimeout(()=>{J.listener.apply(this,r)},0),a=!0,!J.once||(A.push(J),!1))),A.forEach(J=>{this._stopEvent(J)}),a}listenerCount(e){if(!e)return this._events.length;let r=Dg(e);return this._events.filter(a=>a.tag===r).length}listeners(e){if(null==e)return this._events.map(a=>a.listener);let r=Dg(e);return this._events.filter(a=>a.tag===r).map(a=>a.listener)}off(e,r){if(null==r)return this.removeAllListeners(e);const a=[];let A=!1,O=Dg(e);return this._events=this._events.filter(J=>!(J.tag===O&&J.listener==r&&!A)||(A=!0,a.push(J),!1)),a.forEach(J=>{this._stopEvent(J)}),this}removeAllListeners(e){let r=[];if(null==e)r=this._events,this._events=[];else{const a=Dg(e);this._events=this._events.filter(A=>A.tag!==a||(r.push(A),!1))}return r.forEach(a=>{this._stopEvent(a)}),this}}var af=function(t,e,r,a){return new(r||(r=Promise))(function(O,J){function ee(de){try{oe(a.next(de))}catch(be){J(be)}}function ie(de){try{oe(a.throw(de))}catch(be){J(be)}}function oe(de){de.done?O(de.value):function A(O){return O instanceof r?O:new r(function(J){J(O)})}(de.value).then(ee,ie)}oe((a=a.apply(t,e||[])).next())})};const es=new fr.Logger(mw),QV=["call","estimateGas"];function Ov(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const r=(0,or.isHexString)(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if("object"==typeof t){for(const r in t){const a=Ov(t[r],e);if(a)return a}return null}if("string"==typeof t)try{return Ov(JSON.parse(t),e)}catch{}return null}function d9(t,e,r){const a=r.transaction||r.signedTransaction;if("call"===t){const O=Ov(e,!0);if(O)return O.data;es.throwError("missing revert data in call exception; Transaction reverted without a reason string",fr.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if("estimateGas"===t){let O=Ov(e.body,!1);null==O&&(O=Ov(e,!1)),O&&es.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",fr.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:O.message,method:t,transaction:a,error:e})}let A=e.message;throw e.code===fr.Logger.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?A=e.error.message:"string"==typeof e.body?A=e.body:"string"==typeof e.responseText&&(A=e.responseText),A=(A||"").toLowerCase(),A.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&es.throwError("insufficient funds for intrinsic transaction cost",fr.Logger.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:a}),A.match(/nonce (is )?too low/i)&&es.throwError("nonce has already been used",fr.Logger.errors.NONCE_EXPIRED,{error:e,method:t,transaction:a}),A.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&es.throwError("replacement fee too low",fr.Logger.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:a}),A.match(/only replay-protected/i)&&es.throwError("legacy pre-eip-155 transactions not supported",fr.Logger.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:a}),QV.indexOf(t)>=0&&A.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&es.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",fr.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:a}),e}function h9(t){return new Promise(function(e){setTimeout(e,t)})}function XV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Nv(t){return t&&t.toLowerCase()}const Q3={};class p9 extends RV.E{constructor(e,r,a){if(super(),e!==Q3)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,Rr.defineReadOnly)(this,"provider",r),null==a&&(a=0),"string"==typeof a?((0,Rr.defineReadOnly)(this,"_address",this.provider.formatter.address(a)),(0,Rr.defineReadOnly)(this,"_index",null)):"number"==typeof a?((0,Rr.defineReadOnly)(this,"_index",a),(0,Rr.defineReadOnly)(this,"_address",null)):es.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return es.throwError("cannot alter JSON-RPC Signer connection",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new qV(Q3,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&es.throwError("unknown account #"+this._index,fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=(0,Rr.shallowCopy)(e);const r=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(null==e.gasLimit){const a=(0,Rr.shallowCopy)(e);a.from=r,e.gasLimit=this.provider.estimateGas(a)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(a=>af(this,void 0,void 0,function*(){if(null==a)return null;const A=yield this.provider.resolveName(a);return null==A&&es.throwArgumentError("provided ENS name resolves to null","tx.to",a),A}))),(0,Rr.resolveProperties)({tx:(0,Rr.resolveProperties)(e),sender:r}).then(({tx:a,sender:A})=>{null!=a.from?a.from.toLowerCase()!==A&&es.throwArgumentError("from address mismatch","transaction",e):a.from=A;const O=this.provider.constructor.hexlifyTransaction(a,{from:!0});return this.provider.send("eth_sendTransaction",[O]).then(J=>J,J=>("string"==typeof J.message&&J.message.match(/user denied/i)&&es.throwError("user rejected transaction",fr.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),d9("sendTransaction",J,O)))})}signTransaction(e){return es.throwError("signing transactions is unsupported",fr.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return af(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),a=yield this.sendUncheckedTransaction(e);try{return yield(0,wd.poll)(()=>af(this,void 0,void 0,function*(){const A=yield this.provider.getTransaction(a);if(null!==A)return this.provider._wrapTransaction(A,a,r)}),{oncePoll:this.provider})}catch(A){throw A.transactionHash=a,A}})}signMessage(e){return af(this,void 0,void 0,function*(){const r="string"==typeof e?(0,Mv.Y0)(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,or.hexlify)(r),a.toLowerCase()])}catch(A){throw"string"==typeof A.message&&A.message.match(/user denied/i)&&es.throwError("user rejected signing",fr.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),A}})}_legacySignMessage(e){return af(this,void 0,void 0,function*(){const r="string"==typeof e?(0,Mv.Y0)(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),(0,or.hexlify)(r)])}catch(A){throw"string"==typeof A.message&&A.message.match(/user denied/i)&&es.throwError("user rejected signing",fr.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),A}})}_signTypedData(e,r,a){return af(this,void 0,void 0,function*(){const A=yield JI.E.resolveNames(e,r,a,J=>this.provider.resolveName(J)),O=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[O.toLowerCase(),JSON.stringify(JI.E.getPayload(A.domain,r,A.value))])}catch(J){throw"string"==typeof J.message&&J.message.match(/user denied/i)&&es.throwError("user rejected signing",fr.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:O,messageData:{domain:A.domain,types:r,value:A.value}}),J}})}unlock(e){return af(this,void 0,void 0,function*(){const r=this.provider,a=yield this.getAddress();return r.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}}class qV extends p9{sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:a=>this.provider.waitForTransaction(r,a)}))}}const eH={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class tH extends $V{constructor(e,r){let a=r;null==a&&(a=new Promise((A,O)=>{setTimeout(()=>{this.detectNetwork().then(J=>{A(J)},J=>{O(J)})},0)})),super(a),e||(e=(0,Rr.getStatic)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,Rr.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,Rr.defineReadOnly)(this,"connection",Object.freeze((0,Rr.shallowCopy)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return af(this,void 0,void 0,function*(){yield h9(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(null!=e){const r=(0,Rr.getStatic)(this.constructor,"getNetwork");try{return r(Di.O$.from(e).toNumber())}catch(a){return es.throwError("could not detect network",fr.Logger.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return es.throwError("could not detect network",fr.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new p9(Q3,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const a={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,Rr.deepCopy)(a),provider:this});const A=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(A&&this._cache[e])return this._cache[e];const O=(0,wd.fetchJson)(this.connection,JSON.stringify(a),XV).then(J=>(this.emit("debug",{action:"response",request:a,response:J,provider:this}),J),J=>{throw this.emit("debug",{action:"response",error:J,request:a,provider:this}),J});return A&&(this._cache[e]=O,setTimeout(()=>{this._cache[e]=null},0)),O}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Nv(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Nv(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Nv(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Nv(r.address),(0,or.hexZeroPad)(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[(0,Rr.getStatic)(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,Rr.getStatic)(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&null!=r.filter.address&&(r.filter.address=Nv(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return af(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const A=r.transaction;if(A&&null!=A.type&&Di.O$.from(A.type).isZero()&&null==A.maxFeePerGas&&null==A.maxPriorityFeePerGas){const O=yield this.getFeeData();null==O.maxFeePerGas&&null==O.maxPriorityFeePerGas&&((r=(0,Rr.shallowCopy)(r)).transaction=(0,Rr.shallowCopy)(A),delete r.transaction.type)}}const a=this.prepareRequest(e,r);null==a&&es.throwError(e+" not implemented",fr.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(A){return d9(e,A,r)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(a){return function A(){e.send("eth_getFilterChanges",[a]).then(function(O){if(e._pendingFilter!=r)return null;let J=Promise.resolve();return O.forEach(function(ee){e._emitted["t:"+ee.toLowerCase()]="pending",J=J.then(function(){return e.getTransaction(ee).then(function(ie){return e.emit("pending",ie),null})})}),J.then(function(){return h9(1e3)})}).then(function(){if(e._pendingFilter==r)return setTimeout(function(){A()},0),null;e.send("eth_uninstallFilter",[a])}).catch(O=>{})}(),a}).catch(a=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const a=(0,Rr.shallowCopy)(eH);if(r)for(const O in r)r[O]&&(a[O]=!0);(0,Rr.checkProperties)(e,a);const A={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(O){if(null==e[O])return;const J=(0,or.hexValue)(Di.O$.from(e[O]));"gasLimit"===O&&(O="gas"),A[O]=J}),["from","to","data"].forEach(function(O){null!=e[O]&&(A[O]=(0,or.hexlify)(e[O]))}),e.accessList&&(A.accessList=(0,W3.accessListify)(e.accessList)),A}}const g9=new fr.Logger(mw);let nH=1;function y9(t,e){const r="Web3LegacyFetcher";return function(a,A){const O={method:a,params:A,id:nH++,jsonrpc:"2.0"};return new Promise((J,ee)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,Rr.deepCopy)(O),provider:this}),e(O,(ie,oe)=>{if(ie)return this.emit("debug",{action:"response",fetcher:r,error:ie,request:O,provider:this}),ee(ie);if(this.emit("debug",{action:"response",fetcher:r,request:O,response:oe,provider:this}),oe.error){const de=new Error(oe.error.message);return de.code=oe.error.code,de.data=oe.error.data,ee(de)}J(oe.result)})})}}class m9 extends tH{constructor(e,r){null==e&&g9.throwArgumentError("missing provider","provider",e);let a=null,A=null,O=null;"function"==typeof e?(a="unknown:",A=e):(a=e.host||e.path||"",!a&&e.isMetaMask&&(a="metamask"),O=e,e.request?(""===a&&(a="eip-1193:"),A=function rH(t){return function(e,r){null==r&&(r=[]);const a={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,Rr.deepCopy)(a),provider:this}),t.request(a).then(A=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:A,provider:this}),A),A=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:A,provider:this}),A})}}(e)):e.sendAsync?A=y9(0,e.sendAsync.bind(e)):e.send?A=y9(0,e.send.bind(e)):g9.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,r),(0,Rr.defineReadOnly)(this,"jsonRpcFetchFunc",A),(0,Rr.defineReadOnly)(this,"provider",O)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}var iH=u(21087);const{Near:oH,Account:Ew,KeyPair:X3,keyStores:{BrowserLocalStorageKeyStore:sH},transactions:{addKey:Ble,deleteKey:jle,functionCallAccessKey:Fle},utils:{PublicKey:aH,format:{parseNearAmount:s0}}}=Fr,Aw="https://neth.app",uH={testnet:{FUNDING_ACCOUNT_ID:"neth.testnet",MAP_ACCOUNT_ID:"map.neth.testnet",ROOT_ACCOUNT_ID:"testnet"},mainnet:{MAP_ACCOUNT_ID:"nethmap.near",ROOT_ACCOUNT_ID:"near"}},_w="__TX_ARGS_ATTEMPT",Pv="__APP_KEY_SECRET",Tg="__APP_KEY_ACCOUNT_ID",v9=(s0("0.4"),s0("0.49"),s0("0.5"),s0("0.05"),(t="")=>({getItem:e=>{const r=localStorage.getItem(t+e);if("{"!==r?.charAt(0))return r;try{return JSON.parse(r)}catch{}},setItem:(e,r)=>localStorage.setItem(t+e,"string"==typeof r?r:JSON.stringify(r)),removeItem:e=>localStorage.removeItem(t+e)})),gH=()=>({log:t=>console.log(...t)});let q3,e_,Og,cf,Ys,Ng,lc,Sw,b9;const t_=t=>or.hexlify(aH.fromString(t).data).substring(2),w9=t=>t.some(e=>{const r=e?.access_key?.permission?.FunctionCall;return null!==r.allowance&&"execute"===r.method_names[0]}),mH=function(){var t=(0,Ke.Z)(function*(e,r){const{account:a,accountId:A}=yield E9(e,r),O=parseInt(yield a.viewFunction({contractId:A,methodName:"get_nonce"}),16).toString(),{publicKey:J,secretKey:ee}=yield Mw(e,n_(A,O)),ie=t_(J),oe=[{type:"AddKey",public_key:ie,allowance:s0("1"),receiver_id:A,method_names:"execute"}],de=yield a.getAccessKeys();if(w9(de)){const Ce=parseInt(yield a.viewFunction({contractId:A,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:Ie}=yield Mw(e,n_(A,Ce)),Ue=t_(Ie);oe.unshift({type:"DeleteKey",public_key:Ue})}const be=yield xw(e,{nonce:O,receivers:[A],transactions:[{actions:oe}]});return""!==(yield a.functionCall({contractId:A,methodName:"execute",args:be,gas:e_}))?.status?.SuccessValue?cf.log("App key rotation unsuccessful. Please refresh the page and try again."):(yield Ys.removeItem(Pv),yield Ys.removeItem(Tg),{publicKey:ie,secretKey:ee})});return function(r,a){return t.apply(this,arguments)}}(),E9=function(){var t=(0,Ke.Z)(function*(e,r,a=!1){let A,O=yield Ys.getItem("__ATTEMPT_SECRET_KEY");if(O)A=yield Ys.getItem("__ATTEMPT_ACCOUNT_ID");else{A=yield M9(r);const{secretKey:de}=yield Mw(e,vH(A,a));O=de}const J=new Ew(Ng,A),ee=X3.fromString(O),ie=ee.getPublicKey().toString();return(yield J.getAccessKeys()).some(({public_key:de})=>ie===de)?(Og.setKey(lc,A,ee),{account:J,accountId:A,secretKey:O}):yield E9(e,r,!0)});return function(r,a){return t.apply(this,arguments)}}(),n_=(t,e)=>({WARNING:`Creating key for: ${t}`,nonce:e,description:"ONLY sign this on apps you trust! This key CAN use up to 1 N for transactions."}),vH=(t,e)=>({WARNING:`Creates a key with access to your (new) paired NEAR Account: ${t}`,description:`ONLY sign this message on this website: ${e?"neardefi.github.io/neth":Aw}`}),r_={name:"NETH",version:"1",chainId:1313161554},S9=t=>t.map(e=>{const r="string"==typeof e?e:Object.entries(e).map(([A,O])=>`|NETH_${A}:${"string"==typeof O?O:JSON.stringify(O)}_NETH|`).join("");return"NETH"+r.length.toString().padStart(8,"0")+"__"+r}).join(""),xw=function(){var t=(0,Ke.Z)(function*(e,r){const A={Transaction:[]};if(Object.entries(r).forEach(([ee])=>{A.Transaction.push({type:"string",name:ee})}),r.transactions&&(Object.values(r.transactions).forEach((ee,ie)=>{ee.actions.forEach(oe=>{if(oe.args){if(Buffer.isBuffer(oe.args))return void(oe.args="0x"+oe.args.toString("hex"));Object.entries(oe.args).forEach(([de,be])=>{/receiver_id|account_id/g.test(de)&&(oe.args[de]="|~-_NETH~-_-~RECEIVER_-~|",r.receivers.splice(ie+1,0,be))})}})}),r.transactions=S9(r.transactions.map(({actions:ee})=>S9(ee)))),r.receivers){const ee=r.receivers.length.toString();r.receivers="NETH"+r.receivers.join(",").length.toString().padStart(8,"0")+"__"+r.receivers.join(","),r.receivers=r.receivers.substring(0,4)+ee.padStart(3,"0")+r.receivers.substring(7)}return{sig:yield e._signTypedData(r_,A,r),msg:r}});return function(r,a){return t.apply(this,arguments)}}(),Mw=function(){var t=(0,Ke.Z)(function*(e,r){const{sig:a}=yield xw(e,r),A=PV.id(a);return(0,iH.generateSeedPhrase)(A.substring(2,34))});return function(r,a){return t.apply(this,arguments)}}(),x9=function(){var t=(0,Ke.Z)(function*(){if(!(yield H3()()))return alert("Please install/activate MetaMask and try again.");try{yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+r_.chainId.toString(16)}]})}catch(O){if(cf.log(O),4902!==(O?.code||O?.data?.originalError?.code))throw O;try{yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x"+r_.chainId.toString(16),chainName:"Aurora Mainnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},blockExplorerUrls:["https://explorer.mainnet.aurora.dev/"],rpcUrls:["https://mainnet.aurora.dev"]}]})}catch(ee){throw alert('Error adding chain. Please click "Choose Ethereum Account" and add the Aurora Network to continue.'),ee}}const r=new m9(window.ethereum);0===(yield r.listAccounts()).length&&(yield r.send("eth_requestAccounts",[]));const A=r.getSigner();return{signer:A,ethAddress:yield A.getAddress()}});return function(){return t.apply(this,arguments)}}(),AH=function(){var t=(0,Ke.Z)(function*(){yield(yield H3()()).send("wallet_requestPermissions",[{eth_accounts:{}}]);const a=new m9(window.ethereum).getSigner();return{signer:a,ethAddress:yield a.getAddress()}});return function(){return t.apply(this,arguments)}}(),M9=function(){var t=(0,Ke.Z)(function*(e){return Sw.viewFunction({contractId:uH[lc].MAP_ACCOUNT_ID,methodName:"get_near",args:{eth_address:e}})});return function(r){return t.apply(this,arguments)}}(),Pg=function(){var t=(0,Ke.Z)(function*(){const e=yield Ys.getItem(Pv),r=yield Ys.getItem(Tg);if(!e||!r){const O=yield x9();return!!(yield I9(O))&&(yield Pg())}const a=new Ew(Ng,r),A=X3.fromString(e);return Og.setKey(lc,r,A),{account:a,accountId:r,keyPair:A,secretKey:e}});return function(){return t.apply(this,arguments)}}(),_H=Pg,SH=function(){var t=(0,Ke.Z)(function*(){const e=yield Ys.getItem(Tg);return e?(yield Ys.removeItem(Pv),yield Ys.removeItem(Tg),{accountId:e}):cf.log("already signed out")});return function(){return t.apply(this,arguments)}}(),xH=function(){var t=(0,Ke.Z)(function*({message:e,provider:r,account:a}){let A;if(a)({accountId:A}=a);else{const Ee=yield Pg();Ee&&({account:a,accountId:A}=Ee)}if(!a)throw new Error("Wallet not signed in");const O=yield a.connection.signer.getPublicKey(A,lc),J=Buffer.from(O.data).toString("base64"),oe={accountId:A,message:e,blockId:(yield r.block({finality:"final"})).header.hash,publicKey:J,keyType:O.keyType},de=JSON.stringify(oe),be=yield a.connection.signer.signMessage(new Uint8Array(Buffer.from(de)),A,lc);return{...oe,signature:Buffer.from(be.signature).toString("base64")}});return function(r){return t.apply(this,arguments)}}(),MH=function(){var t=(0,Ke.Z)(function*(){const e=v9("near-wallet-selector:neth:");return!!(yield e.getItem(Pv))||!!(yield e.getItem(Tg))});return function(){return t.apply(this,arguments)}}(),I9=function(){var t=(0,Ke.Z)(function*({signer:e,ethAddress:r}){const a=yield M9(r);if(!a){if(window.confirm(`Ethereum account ${r} is not connected to a NETH account. Would you like to try another Ethereum account?`)){try{const{signer:Ee,ethAddress:Ce}=yield AH();return yield I9({signer:Ee,ethAddress:Ce})}catch(Ee){cf.log(Ee)}return}const be=`${Aw}/${"testnet"===lc?"?network=testnet":""}`;window.prompt("We couldn't find a NETH account. To set up a NETH account visit",be)}const A=parseInt(yield Sw.viewFunction({contractId:a,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:O,secretKey:J}=yield Mw(e,n_(a,A)),ee=new Ew(Ng,a),ie=yield ee.getAccessKeys();w9(ie)||(yield mH(e,r));const oe=X3.fromString(J);return Og.setKey(lc,a,oe),yield Ys.setItem(Pv,J),yield Ys.setItem(Tg,ee.accountId),{publicKey:O,secretKey:J,account:ee}});return function(r){return t.apply(this,arguments)}}(),C9=function(){var t=(0,Ke.Z)(function*(){const e=yield Pg();if(!e)return void cf.log("NETH: ERROR broadcasting tx. No account found.");const{account:r,accountId:a}=e,A=yield Ys.getItem(_w);if(!A||0===A.length)return;const O=[];for(;A.length>0;){const J=A.shift();cf.log("NETH: broadcasting tx",J);try{const ee=yield r.functionCall({contractId:a,methodName:"execute",args:J,gas:e_});yield Ys.setItem(_w,A),O.push(ee)}catch(ee){cf.log("NETH: ERROR broadcasting tx",ee)}}return yield Ys.removeItem(_w),O});return function(){return t.apply(this,arguments)}}(),IH=function(){var t=(0,Ke.Z)(function*({transactions:e,bundle:r}){const a=yield x9(),{signer:A}=a,O=yield Pg();if(!O)return void cf.log("NETH: ERROR signing and sending transactions. No account found.");const{account:J,accountId:ee}=O,ie=e.map(({receiverId:Ce})=>Ce),oe=e.map(({receiverId:Ce,actions:Ie})=>({actions:CH(Ie,ee,Ce)})),de=parseInt(yield J.viewFunction({contractId:ee,methodName:"get_nonce"}),16),be=[];if(r)be.push(yield xw(A,{nonce:de.toString(),receivers:ie,transactions:oe}));else for(let Ce=0;Cet.map(a=>{const{enum:A}=a,{gas:O,publicKey:J,methodName:ee,args:ie,deposit:oe,accessKey:de,code:be}=a[A]||a,Ee={type:A&&A[0].toUpperCase()+A.substr(1)||"FunctionCall",gas:O&&O.toString()||void 0,public_key:J&&t_(J)||void 0,method_name:ee,args:ie||void 0,code:be||void 0,amount:oe&&oe.toString()||void 0,permission:void 0};if(Object.keys(Ee).forEach(Ce=>{void 0===Ee[Ce]&&delete Ee[Ce]}),de)if(r===e)Ee.allowance=s0("1"),Ee.method_names="execute",Ee.receiver_id=e;else if("functionCall"===de.permission.enum){const{receiverId:Ce,methodNames:Ie,allowance:Ue}=de.permission.functionCall;Ee.receiver_id=Ce,Ee.allowance=Ue&&Ue.toString()||s0("0.25"),Ee.method_names=Ie.join(",")}return Ee}),DH=function(){var t=(0,Ke.Z)(function*(){return yield H3()({timeout:100}),!!window.ethereum});return function(){return t.apply(this,arguments)}}();let T9,D9=!0,i_=!1;const TH=function(){var t=(0,Ke.Z)(function*({metadata:e,logger:r,store:a,storage:A,options:O,provider:J}){const ee=(({network:t,gas:e="200000000000000",logger:r=gH(),storage:a=v9()})=>{e_=e,cf=r,Ys=a,Og=new sH,q3=new oH({...t,keyStore:Og}),Ng=q3.connection,lc=t.networkId,Sw=new Ew(Ng,"mainnet"===lc?"near":lc),b9="mainnet"===lc?".near":"."+lc;const A=document.createElement("div");return A.style.display="none",A.style.width="100%",A.style.height="100vh",A.style.zIndex="999999",A.style.position="fixed",A.style.top="0",A.style.background="rgba(0, 0, 0, 0.5)",document.body.appendChild(A),C9(),A})({network:O.network,gas:T9,logger:r,storage:A}),oe=be=>{if(!(be=>be.every(Ee=>"FunctionCall"===Ee.type))(be))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return be.map(Ce=>Ce.params)},de=function(){var be=(0,Ke.Z)(function*(Ee){r.log("NETH:signAndSendTransactions",{transactions:Ee});const{contract:Ce}=a.getState();if(!(yield MH())||!Ce)throw new Error("Wallet not signed in");i_&&(ee.style.display="block");const Ie=Ee.map(({receiverId:We,actions:$e})=>({receiverId:We||Ce.contractId,actions:oe($e)}));let Ue;try{Ue=yield IH({transactions:Ie,bundle:D9})}catch(We){throw r.log("NETH:signAndSendTransactions Error",We),We}return i_&&(ee.style.display="none"),Ue});return function(Ce){return be.apply(this,arguments)}}();return{signIn:()=>(0,Ke.Z)(function*(){let be;try{if(be=yield _H(),!be)return[]}catch(Ee){if(!/not connected/.test(Ee.toString()))throw Ee}return[be]})(),signOut:()=>(0,Ke.Z)(function*(){yield SH()})(),verifyOwner:({message:be})=>(0,Ke.Z)(function*(){return r.log("NETH:verifyOwner",{message:be}),xH({message:be,provider:J,account:null})})(),getAccounts:()=>(0,Ke.Z)(function*(){const be=yield Pg();if(!be)return r.log("NETH:getAccounts"),[];const{account:Ee,accountId:Ce}=be;return[{accountId:Ce,publicKey:(yield Ee.connection.signer.getPublicKey(Ee.accountId,O.network.networkId)).toString()}]})(),signAndSendTransaction:(be=(0,Ke.Z)(function*({receiverId:Ee,actions:Ce}){return de([{receiverId:Ee,actions:Ce}])}),function(Ce){return be.apply(this,arguments)}),signAndSendTransactions:function(){var be=(0,Ke.Z)(function*({transactions:Ee}){return de(Ee)});return function(Ce){return be.apply(this,arguments)}}()};var be});return function(r){return t.apply(this,arguments)}}();function O9({iconUrl:t=NV,gas:e,useModalCover:r=!1,bundle:a=!0,deprecated:A=!1}={}){return(0,Ke.Z)(function*(){if(i_=r,T9=e,D9=a,kI()())return null;const J=yield DH();return{id:"neth",type:"injected",metadata:{name:"NETH Account",description:null,iconUrl:t,downloadUrl:Aw,deprecated:!1,available:J},deprecated:A,init:TH}})}const OH=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,NH=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,PH=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function RH(t,e){if(!("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e))return e;(function kH(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)})(t)}function Rv(t,e={}){if("string"!=typeof t)return t;const r=t.trim();if('"'===t[0]&&t.endsWith('"')&&!t.includes("\\"))return r.slice(1,-1);if(r.length<=9){const a=r.toLowerCase();if("true"===a)return!0;if("false"===a)return!1;if("undefined"===a)return;if("null"===a)return null;if("nan"===a)return Number.NaN;if("infinity"===a)return Number.POSITIVE_INFINITY;if("-infinity"===a)return Number.NEGATIVE_INFINITY}if(!PH.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(OH.test(t)||NH.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,RH)}return JSON.parse(t)}catch(a){if(e.strict)throw a;return t}}function vs(t,...e){try{return function LH(t){return t&&"function"==typeof t.then?t:Promise.resolve(t)}(t(...e))}catch(r){return Promise.reject(r)}}function Iw(t){if(function BH(t){const e=typeof t;return null===t||"object"!==e&&"function"!==e}(t))return String(t);if(function jH(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}(t)||Array.isArray(t))return JSON.stringify(t);if("function"==typeof t.toJSON)return Iw(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function N9(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const o_="base64:";function Ba(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function zH(...t){return Ba(t.join(":"))}function kv(t){return(t=Ba(t))?t+":":""}const HH=()=>{const t=new Map;return{name:"memory",options:{},hasItem:e=>t.has(e),getItem:e=>t.get(e)??null,getItemRaw:e=>t.get(e)??null,setItem(e,r){t.set(e,r)},setItemRaw(e,r){t.set(e,r)},removeItem(e){t.delete(e)},getKeys:()=>Array.from(t.keys()),clear(){t.clear()},dispose(){t.clear()}}};function WH(t={}){const e={mounts:{"":t.driver||HH()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=oe=>{for(const de of e.mountpoints)if(oe.startsWith(de))return{base:de,relativeKey:oe.slice(de.length),driver:e.mounts[de]};return{base:"",relativeKey:oe,driver:e.mounts[""]}},a=(oe,de)=>e.mountpoints.filter(be=>be.startsWith(oe)||de&&oe.startsWith(be)).map(be=>({relativeBase:oe.length>be.length?oe.slice(be.length):void 0,mountpoint:be,driver:e.mounts[be]})),A=(oe,de)=>{if(e.watching){de=Ba(de);for(const be of e.watchListeners)be(oe,de)}},O=function(){var oe=(0,Ke.Z)(function*(){if(!e.watching){e.watching=!0;for(const de in e.mounts)e.unwatch[de]=yield P9(e.mounts[de],A,de)}});return function(){return oe.apply(this,arguments)}}(),J=function(){var oe=(0,Ke.Z)(function*(){if(e.watching){for(const de in e.unwatch)yield e.unwatch[de]();e.unwatch={},e.watching=!1}});return function(){return oe.apply(this,arguments)}}(),ee=(oe,de,be)=>{const Ee=new Map,Ce=Ie=>{let Ue=Ee.get(Ie.base);return Ue||(Ue={driver:Ie.driver,base:Ie.base,items:[]},Ee.set(Ie.base,Ue)),Ue};for(const Ie of oe){const Ue="string"==typeof Ie,We=Ba(Ue?Ie:Ie.key),$e=Ue?void 0:Ie.value,ht=Ue||!Ie.options?de:{...de,...Ie.options},ct=r(We);Ce(ct).items.push({key:We,value:$e,relativeKey:ct.relativeKey,options:ht})}return Promise.all([...Ee.values()].map(Ie=>be(Ie))).then(Ie=>Ie.flat())},ie={hasItem(oe,de={}){oe=Ba(oe);const{relativeKey:be,driver:Ee}=r(oe);return vs(Ee.hasItem,be,de)},getItem(oe,de={}){oe=Ba(oe);const{relativeKey:be,driver:Ee}=r(oe);return vs(Ee.getItem,be,de).then(Ce=>Rv(Ce))},getItems:(oe,de)=>ee(oe,de,be=>be.driver.getItems?vs(be.driver.getItems,be.items.map(Ee=>({key:Ee.relativeKey,options:Ee.options})),de).then(Ee=>Ee.map(Ce=>({key:zH(be.base,Ce.key),value:Rv(Ce.value)}))):Promise.all(be.items.map(Ee=>vs(be.driver.getItem,Ee.relativeKey,Ee.options).then(Ce=>({key:Ee.key,value:Rv(Ce)}))))),getItemRaw(oe,de={}){oe=Ba(oe);const{relativeKey:be,driver:Ee}=r(oe);return Ee.getItemRaw?vs(Ee.getItemRaw,be,de):vs(Ee.getItem,be,de).then(Ce=>function UH(t){return"string"==typeof t&&t.startsWith(o_)?(N9(),Buffer.from(t.slice(o_.length),"base64")):t}(Ce))},setItem:(oe,de,be={})=>(0,Ke.Z)(function*(){if(void 0===de)return ie.removeItem(oe);oe=Ba(oe);const{relativeKey:Ee,driver:Ce}=r(oe);Ce.setItem&&(yield vs(Ce.setItem,Ee,Iw(de),be),Ce.watch||A("update",oe))})(),setItems:(oe,de)=>(0,Ke.Z)(function*(){yield ee(oe,de,function(){var be=(0,Ke.Z)(function*(Ee){if(Ee.driver.setItems)return vs(Ee.driver.setItems,Ee.items.map(Ce=>({key:Ce.relativeKey,value:Iw(Ce.value),options:Ce.options})),de);Ee.driver.setItem&&(yield Promise.all(Ee.items.map(Ce=>vs(Ee.driver.setItem,Ce.relativeKey,Iw(Ce.value),Ce.options))))});return function(Ee){return be.apply(this,arguments)}}())})(),setItemRaw:(oe,de,be={})=>(0,Ke.Z)(function*(){if(void 0===de)return ie.removeItem(oe,be);oe=Ba(oe);const{relativeKey:Ee,driver:Ce}=r(oe);if(Ce.setItemRaw)yield vs(Ce.setItemRaw,Ee,de,be);else{if(!Ce.setItem)return;yield vs(Ce.setItem,Ee,function FH(t){if("string"==typeof t)return t;N9();const e=Buffer.from(t).toString("base64");return o_+e}(de),be)}Ce.watch||A("update",oe)})(),removeItem:(oe,de={})=>(0,Ke.Z)(function*(){"boolean"==typeof de&&(de={removeMeta:de}),oe=Ba(oe);const{relativeKey:be,driver:Ee}=r(oe);Ee.removeItem&&(yield vs(Ee.removeItem,be,de),(de.removeMeta||de.removeMata)&&(yield vs(Ee.removeItem,be+"$",de)),Ee.watch||A("remove",oe))})(),getMeta:(oe,de={})=>(0,Ke.Z)(function*(){"boolean"==typeof de&&(de={nativeOnly:de}),oe=Ba(oe);const{relativeKey:be,driver:Ee}=r(oe),Ce=Object.create(null);if(Ee.getMeta&&Object.assign(Ce,yield vs(Ee.getMeta,be,de)),!de.nativeOnly){const Ie=yield vs(Ee.getItem,be+"$",de).then(Ue=>Rv(Ue));Ie&&"object"==typeof Ie&&("string"==typeof Ie.atime&&(Ie.atime=new Date(Ie.atime)),"string"==typeof Ie.mtime&&(Ie.mtime=new Date(Ie.mtime)),Object.assign(Ce,Ie))}return Ce})(),setMeta(oe,de,be={}){return this.setItem(oe+"$",de,be)},removeMeta(oe,de={}){return this.removeItem(oe+"$",de)},getKeys:(oe,de={})=>(0,Ke.Z)(function*(){oe=kv(oe);const be=a(oe,!0);let Ee=[];const Ce=[];for(const Ie of be){const We=(yield vs(Ie.driver.getKeys,Ie.relativeBase,de)).map($e=>Ie.mountpoint+Ba($e)).filter($e=>!Ee.some(ht=>$e.startsWith(ht)));Ce.push(...We),Ee=[Ie.mountpoint,...Ee.filter($e=>!$e.startsWith(Ie.mountpoint))]}return oe?Ce.filter(Ie=>Ie.startsWith(oe)&&!Ie.endsWith("$")):Ce.filter(Ie=>!Ie.endsWith("$"))})(),clear:(oe,de={})=>(0,Ke.Z)(function*(){oe=kv(oe),yield Promise.all(a(oe,!1).map(function(){var be=(0,Ke.Z)(function*(Ee){if(Ee.driver.clear)return vs(Ee.driver.clear,Ee.relativeBase,de);if(Ee.driver.removeItem){const Ce=yield Ee.driver.getKeys(Ee.relativeBase||"",de);return Promise.all(Ce.map(Ie=>Ee.driver.removeItem(Ie,de)))}});return function(Ee){return be.apply(this,arguments)}}()))})(),dispose:()=>(0,Ke.Z)(function*(){yield Promise.all(Object.values(e.mounts).map(oe=>R9(oe)))})(),watch:oe=>(0,Ke.Z)(function*(){return yield O(),e.watchListeners.push(oe),(0,Ke.Z)(function*(){e.watchListeners=e.watchListeners.filter(de=>de!==oe),0===e.watchListeners.length&&(yield J())})})(),unwatch:()=>(0,Ke.Z)(function*(){e.watchListeners=[],yield J()})(),mount(oe,de){if((oe=kv(oe))&&e.mounts[oe])throw new Error(`already mounted at ${oe}`);return oe&&(e.mountpoints.push(oe),e.mountpoints.sort((be,Ee)=>Ee.length-be.length)),e.mounts[oe]=de,e.watching&&Promise.resolve(P9(de,A,oe)).then(be=>{e.unwatch[oe]=be}).catch(console.error),ie},unmount:(oe,de=!0)=>(0,Ke.Z)(function*(){(oe=kv(oe))&&e.mounts[oe]&&(e.watching&&oe in e.unwatch&&(e.unwatch[oe](),delete e.unwatch[oe]),de&&(yield R9(e.mounts[oe])),e.mountpoints=e.mountpoints.filter(be=>be!==oe),delete e.mounts[oe])})(),getMount(oe=""){oe=Ba(oe)+":";const de=r(oe);return{driver:de.driver,base:de.base}},getMounts:(oe="",de={})=>(oe=Ba(oe),a(oe,de.parents).map(Ee=>({driver:Ee.driver,base:Ee.mountpoint})))};return ie}function P9(t,e,r){return t.watch?t.watch((a,A)=>e(a,r+A)):()=>{}}function R9(t){return c_.apply(this,arguments)}function c_(){return c_=(0,Ke.Z)(function*(t){"function"==typeof t.dispose&&(yield vs(t.dispose))}),c_.apply(this,arguments)}function ja(t){return new Promise((e,r)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>r(t.error)})}function k9(t,e){const r=indexedDB.open(t);r.onupgradeneeded=()=>r.result.createObjectStore(e);const a=ja(r);return(A,O)=>a.then(J=>O(J.transaction(e,A).objectStore(e)))}let u_;function Eu(){return u_||(u_=k9("keyval-store","keyval")),u_}function L9(t,e=Eu()){return e("readonly",r=>ja(r.get(t)))}function l_(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},ja(t.transaction)}const $H=t=>JSON.stringify(t,(e,r)=>"bigint"==typeof r?r.toString()+"n":r),QH=t=>{const r=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(r,(a,A)=>"string"==typeof A&&A.match(/^\d+n$/)?BigInt(A.substring(0,A.length-1)):A)};function Cw(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return QH(t)}catch{return t}}function a0(t){return"string"==typeof t?t:$H(t)||""}var qH=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",r=A=>e+A;let a;return t.dbName&&t.storeName&&(a=k9(t.dbName,t.storeName)),{name:"idb-keyval",options:t,hasItem:A=>(0,Ke.Z)(function*(){return!(typeof(yield L9(r(A),a))>"u")})(),getItem:A=>(0,Ke.Z)(function*(){return(yield L9(r(A),a))??null})(),setItem:(A,O)=>function GH(t,e,r=Eu()){return r("readwrite",a=>(a.put(e,t),ja(a.transaction)))}(r(A),O,a),removeItem:A=>function ZH(t,e=Eu()){return e("readwrite",r=>(r.delete(t),ja(r.transaction)))}(r(A),a),getKeys:()=>function YH(t=Eu()){return t("readonly",e=>{if(e.getAllKeys)return ja(e.getAllKeys());const r=[];return l_(e,a=>r.push(a.key)).then(()=>r)})}(a),clear:()=>function JH(t=Eu()){return t("readwrite",e=>(e.clear(),ja(e.transaction)))}(a)}};class nW{constructor(){this.indexedDb=WH({driver:qH({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}getKeys(){var e=this;return(0,Ke.Z)(function*(){return e.indexedDb.getKeys()})()}getEntries(){var e=this;return(0,Ke.Z)(function*(){return(yield e.indexedDb.getItems(yield e.indexedDb.getKeys())).map(r=>[r.key,r.value])})()}getItem(e){var r=this;return(0,Ke.Z)(function*(){const a=yield r.indexedDb.getItem(e);if(null!==a)return a})()}setItem(e,r){var a=this;return(0,Ke.Z)(function*(){yield a.indexedDb.setItem(e,a0(r))})()}removeItem(e){var r=this;return(0,Ke.Z)(function*(){yield r.indexedDb.removeItem(e)})()}}var f_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dw={exports:{}};function rW(t){var e;return[t[0],Cw(null!=(e=t[1])?e:"")]}!function(){let t;function e(){}t=e,t.prototype.getItem=function(r){return this.hasOwnProperty(r)?String(this[r]):null},t.prototype.setItem=function(r,a){this[r]=String(a)},t.prototype.removeItem=function(r){delete this[r]},t.prototype.clear=function(){const r=this;Object.keys(r).forEach(function(a){r[a]=void 0,delete r[a]})},t.prototype.key=function(r){return r=r||0,Object.keys(this)[r]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof f_<"u"&&f_.localStorage?Dw.exports=f_.localStorage:typeof window<"u"&&window.localStorage?Dw.exports=window.localStorage:Dw.exports=new e}();class iW{constructor(){this.localStorage=Dw.exports}getKeys(){var e=this;return(0,Ke.Z)(function*(){return Object.keys(e.localStorage)})()}getEntries(){var e=this;return(0,Ke.Z)(function*(){return Object.entries(e.localStorage).map(rW)})()}getItem(e){var r=this;return(0,Ke.Z)(function*(){const a=r.localStorage.getItem(e);if(null!==a)return Cw(a)})()}setItem(e,r){var a=this;return(0,Ke.Z)(function*(){a.localStorage.setItem(e,a0(r))})()}removeItem(e){var r=this;return(0,Ke.Z)(function*(){r.localStorage.removeItem(e)})()}}const sW=function(){var t=(0,Ke.Z)(function*(e,r,a){const A="wc_storage_version",O=yield r.getItem(A);if(O&&O>=1)return void a(r);const J=yield e.getKeys();if(!J.length)return void a(r);const ee=[];for(;J.length;){const ie=J.shift();if(!ie)continue;const oe=ie.toLowerCase();if(oe.includes("wc@")||oe.includes("walletconnect")||oe.includes("wc_")||oe.includes("wallet_connect")){const de=yield e.getItem(ie);yield r.setItem(ie,de),ee.push(ie)}}yield r.setItem(A,1),a(r),aW(e,ee)});return function(r,a,A){return t.apply(this,arguments)}}(),aW=function(){var t=(0,Ke.Z)(function*(e,r){r.length&&r.forEach(function(){var a=(0,Ke.Z)(function*(A){yield e.removeItem(A)});return function(A){return a.apply(this,arguments)}}())});return function(r,a){return t.apply(this,arguments)}}();class cW{constructor(){this.initialized=!1,this.setInitialized=r=>{this.storage=r,this.initialized=!0};const e=new iW;this.storage=e;try{const r=new nW;sW(e,r,this.setInitialized)}catch{this.initialized=!0}}getKeys(){var e=this;return(0,Ke.Z)(function*(){return yield e.initialize(),e.storage.getKeys()})()}getEntries(){var e=this;return(0,Ke.Z)(function*(){return yield e.initialize(),e.storage.getEntries()})()}getItem(e){var r=this;return(0,Ke.Z)(function*(){return yield r.initialize(),r.storage.getItem(e)})()}setItem(e,r){var a=this;return(0,Ke.Z)(function*(){return yield a.initialize(),a.storage.setItem(e,r)})()}removeItem(e){var r=this;return(0,Ke.Z)(function*(){return yield r.initialize(),r.storage.removeItem(e)})()}initialize(){var e=this;return(0,Ke.Z)(function*(){e.initialized||(yield new Promise(r=>{const a=setInterval(()=>{e.initialized&&(clearInterval(a),r())},20)}))})()}}var Lv=u(72062),Rg=u(28544),Tw=u.n(Rg);const uW={level:"info"},Bv="custom_context",d_=1024e3;class lW{constructor(e){this.nodeValue=e,this.sizeInBytes=(new TextEncoder).encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class j9{constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){const r=new lW(e);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${e} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;const e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){const e=[];let r=this.head;for(;null!==r;)e.push(r.value),r=r.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};const r=e.value;return e=e.next,{done:!1,value:r}}}}}class F9{constructor(e,r=d_){this.level=e??"error",this.levelValue=Rg.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new j9(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,r){r===Rg.levels.values.error?console.error(e):r===Rg.levels.values.warn?console.warn(e):r===Rg.levels.values.debug?console.debug(e):r===Rg.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append(a0({timestamp:(new Date).toISOString(),log:e}));const r="string"==typeof e?JSON.parse(e).level:e.level;r>=this.levelValue&&this.forwardToConsole(e,r)}getLogs(){return this.logs}clearLogs(){this.logs=new j9(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){const r=this.getLogArray();return r.push(a0({extraMetadata:e})),new Blob(r,{type:"application/json"})}}class fW{constructor(e,r=d_){this.baseChunkLogger=new F9(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){const r=URL.createObjectURL(this.logsToBlob(e)),a=document.createElement("a");a.href=r,a.download=`walletconnect-logs-${(new Date).toISOString()}.txt`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}}class dW{constructor(e,r=d_){this.baseChunkLogger=new F9(e,r)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var hW=Object.defineProperty,pW=Object.defineProperties,gW=Object.getOwnPropertyDescriptors,U9=Object.getOwnPropertySymbols,yW=Object.prototype.hasOwnProperty,mW=Object.prototype.propertyIsEnumerable,K9=(t,e,r)=>e in t?hW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ow=(t,e)=>{for(var r in e||(e={}))yW.call(e,r)&&K9(t,r,e[r]);if(U9)for(var r of U9(e))mW.call(e,r)&&K9(t,r,e[r]);return t},Nw=(t,e)=>pW(t,gW(e));function h_(t){return Nw(Ow({},t),{level:t?.level||uW.level})}function Fa(t,e=Bv){let r="";return r=typeof t.bindings>"u"?function vW(t,e=Bv){return t[e]||""}(t,e):t.bindings().context||"",r}function Ua(t,e,r=Bv){const a=function wW(t,e,r=Bv){const a=Fa(t,r);return a.trim()?`${a}/${e}`:e}(t,e,r);return function bW(t,e,r=Bv){return t[r]=e,t}(t.child({context:a}),a,r)}function _W(t){return typeof t.loggerOverride<"u"&&"string"!=typeof t.loggerOverride?{logger:t.loggerOverride,chunkLoggerController:null}:typeof window<"u"?function EW(t){var e,r;const a=new fW(null==(e=t.opts)?void 0:e.level,t.maxSizeInBytes);return{logger:Tw()(Nw(Ow({},t.opts),{level:"trace",browser:Nw(Ow({},null==(r=t.opts)?void 0:r.browser),{write:A=>a.write(A)})})),chunkLoggerController:a}}(t):function AW(t){var e;const r=new dW(null==(e=t.opts)?void 0:e.level,t.maxSizeInBytes);return{logger:Tw()(Nw(Ow({},t.opts),{level:"trace"}),r),chunkLoggerController:r}}(t)}var kg=u(42092);class SW extends kg.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class xW extends kg.q{constructor(e,r){super(),this.core=e,this.logger=r,this.records=new Map}}class MW{constructor(e,r){this.logger=e,this.core=r}}class IW extends kg.q{constructor(e,r){super(),this.relayer=e,this.logger=r}}class CW extends kg.q{constructor(e){super()}}class DW{constructor(e,r,a,A){this.core=e,this.logger=r,this.name=a}}class TW extends kg.q{constructor(e,r){super(),this.relayer=e,this.logger=r}}class OW extends kg.q{constructor(e,r){super(),this.core=e,this.logger=r}}class NW{constructor(e,r){this.projectId=e,this.logger=r}}class PW{constructor(e,r){this.projectId=e,this.logger=r}}class RW{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class kW{constructor(e){this.client=e}}var z9=u(65553),p_=u(5784),rr=u(43961);const LW="EdDSA",BW="JWT",V9=".",H9="base64url",jW="utf8",FW="utf8",UW=":",KW="did",zW="key",W9="base58btc",VW="z",HW="K36",WW=32;function g_(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function G9(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?g_(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}var JW=function ZW(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),a=0;a>>0,ct=new Uint8Array(ht);Ie[Ue];){var wt=r[Ie.charCodeAt(Ue)];if(255===wt)return;for(var zt=0,Zt=ht-1;(0!==wt||zt<$e)&&-1!==Zt;Zt--,zt++)wt+=ee*ct[Zt]>>>0,ct[Zt]=wt%256>>>0,wt=wt/256>>>0;if(0!==wt)throw new Error("Non-zero carry");$e=zt,Ue++}if(" "!==Ie[Ue]){for(var En=ht-$e;En!==ht&&0===ct[En];)En++;for(var Yt=new Uint8Array(We+(ht-En)),Xt=We;En!==ht;)Yt[Xt++]=ct[En++];return Yt}}}return{encode:function be(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Ue=0,We=0,$e=0,ht=Ie.length;$e!==ht&&0===Ie[$e];)$e++,Ue++;for(var ct=(ht-$e)*de+1>>>0,wt=new Uint8Array(ct);$e!==ht;){for(var zt=Ie[$e],Zt=0,En=ct-1;(0!==zt||Zt>>0,wt[En]=zt%ee>>>0,zt=zt/ee>>>0;if(0!==zt)throw new Error("Non-zero carry");We=Zt,$e++}for(var Yt=ct-We;Yt!==ct&&0===wt[Yt];)Yt++;for(var Xt=ie.repeat(Ue);Yt{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class eG{constructor(e,r,a){this.name=e,this.prefix=r,this.baseEncode=a}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class tG{constructor(e,r,a){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=a}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return Z9(this,e)}}class nG{constructor(e){this.decoders=e}or(e){return Z9(this,e)}decode(e){const r=e[0],a=this.decoders[r];if(a)return a.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Z9=(t,e)=>new nG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class rG{constructor(e,r,a,A){this.name=e,this.prefix=r,this.baseEncode=a,this.baseDecode=A,this.encoder=new eG(e,r,a),this.decoder=new tG(e,r,A)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Rw=({name:t,prefix:e,encode:r,decode:a})=>new rG(t,e,r,a),jv=({prefix:t,name:e,alphabet:r})=>{const{encode:a,decode:A}=$W(r,e);return Rw({prefix:t,name:e,encode:a,decode:O=>Pw(A(O))})},Cs=({name:t,prefix:e,bitsPerChar:r,alphabet:a})=>Rw({prefix:e,name:t,encode:A=>((t,e,r)=>{const a="="===e[e.length-1],A=(1<r;)J-=r,O+=e[A&ee>>J];if(J&&(O+=e[A&ee<((t,e,r,a)=>{const A={};for(let de=0;de=8&&(ee-=8,J[oe++]=255&ie>>ee)}if(ee>=r||255&ie<<8-ee)throw new SyntaxError("Unexpected end of data");return J})(A,a,r,t)}),sG=Rw({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),aG=Cs({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),cG=Cs({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),uG=jv({prefix:"9",name:"base10",alphabet:"0123456789"}),lG=Cs({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),fG=Cs({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),dG=Cs({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),hG=Cs({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),pG=Cs({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),gG=Cs({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),yG=Cs({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),mG=Cs({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),vG=Cs({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),bG=Cs({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),wG=Cs({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),EG=jv({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),AG=jv({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),_G=jv({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),SG=jv({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),xG=Cs({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),MG=Cs({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),IG=Cs({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),CG=Cs({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),J9=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),DG=J9.reduce((t,e,r)=>(t[r]=e,t),[]),TG=J9.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);const PG=Rw({prefix:"\u{1f680}",name:"base256emoji",encode:function OG(t){return t.reduce((e,r)=>e+=DG[r],"")},decode:function NG(t){const e=[];for(const r of t){const a=TG[r.codePointAt(0)];if(void 0===a)throw new Error(`Non-base256emoji character: ${r}`);e.push(a)}return new Uint8Array(e)}});var RG=function $9(t,e,r){e=e||[];for(var a=r=r||0;t>=BG;)e[r++]=255&t|Y9,t/=128;for(;t&LG;)e[r++]=255&t|Y9,t>>>=7;return e[r]=0|t,$9.bytes=r-a+1,e},Y9=128,LG=-128,BG=Math.pow(2,31);var jG=function y_(t,a){var J,r=0,A=0,O=a=a||0,ee=t.length;do{if(O>=ee)throw y_.bytes=0,new RangeError("Could not decode varint");J=t[O++],r+=A<28?(J&Q9)<=FG);return y_.bytes=O-a,r},FG=128,Q9=127;var UG=Math.pow(2,7),KG=Math.pow(2,14),zG=Math.pow(2,21),VG=Math.pow(2,28),HG=Math.pow(2,35),WG=Math.pow(2,42),GG=Math.pow(2,49),ZG=Math.pow(2,56),JG=Math.pow(2,63),$G={encode:RG,decode:jG,encodingLength:function(t){return t(X9.encode(t,e,r),e),eC=t=>X9.encodingLength(t),m_=(t,e)=>{const r=e.byteLength,a=eC(t),A=a+eC(r),O=new Uint8Array(A+r);return q9(t,O,0),q9(r,O,a),O.set(e,A),new tC(t,r,e,O)};class tC{constructor(e,r,a,A){this.code=e,this.size=r,this.digest=a,this.bytes=A}}const nC=({name:t,code:e,encode:r})=>new XG(t,e,r);class XG{constructor(e,r,a){this.name=e,this.code=r,this.encode=a}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?m_(this.code,r):r.then(a=>m_(this.code,a))}throw Error("Unknown type, must be binary type")}}const rC=t=>function(){var e=(0,Ke.Z)(function*(r){return new Uint8Array(yield crypto.subtle.digest(t,r))});return function(r){return e.apply(this,arguments)}}(),qG=nC({name:"sha2-256",code:18,encode:rC("SHA-256")}),eZ=nC({name:"sha2-512",code:19,encode:rC("SHA-512")}),oC=Pw,nZ={code:0,name:"identity",encode:oC,digest:t=>m_(0,oC(t))},rZ="raw",iZ=85,oZ=t=>Pw(t),sZ=t=>Pw(t),aZ=new TextEncoder,cZ=new TextDecoder,uZ="json",lZ=512,fZ=t=>aZ.encode(JSON.stringify(t)),dZ=t=>JSON.parse(cZ.decode(t));class ma{constructor(e,r,a,A){this.code=r,this.version=e,this.multihash=a,this.bytes=A,this.byteOffset=A.byteOffset,this.byteLength=A.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Lw,byteLength:Lw,code:kw,version:kw,multihash:kw,bytes:kw,_baseCache:Lw,asCID:Lw})}toV0(){if(0===this.version)return this;{const{code:e,multihash:r}=this;if(e!==Fv)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==yZ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return ma.createV0(r)}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,a=Digest.create(e,r);return ma.createV1(this.code,a)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:r,version:a,_baseCache:A}=this;return 0===a?pZ(r,A,e||base58btc.encoder):gZ(r,A,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return vZ(/^0\.0/,bZ),!(!e||!e[aC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof ma)return e;if(null!=e&&e.asCID===e){const{version:r,code:a,multihash:A,bytes:O}=e;return new ma(r,a,A,O||sC(r,a,A.bytes))}if(null!=e&&!0===e[aC]){const{version:r,multihash:a,code:A}=e,O=Digest.decode(a);return ma.create(r,A,O)}return null}static create(e,r,a){if("number"!=typeof r)throw new Error("String codecs are no longer supported");switch(e){case 0:if(r!==Fv)throw new Error(`Version 0 CID must use dag-pb (code: ${Fv}) block encoding`);return new ma(e,r,a,a.bytes);case 1:{const A=sC(e,r,a.bytes);return new ma(e,r,a,A)}default:throw new Error("Invalid version")}}static createV0(e){return ma.create(0,Fv,e)}static createV1(e,r){return ma.create(1,e,r)}static decode(e){const[r,a]=ma.decodeFirst(e);if(a.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=ma.inspectBytes(e),a=r.size-r.multihashSize,A=coerce(e.subarray(a,a+r.multihashSize));if(A.byteLength!==r.multihashSize)throw new Error("Incorrect length");const O=A.subarray(r.multihashSize-r.digestSize),J=new Digest.Digest(r.multihashCode,r.digestSize,O,A);return[0===r.version?ma.createV0(J):ma.createV1(r.codec,J),e.subarray(r.size)]}static inspectBytes(e){let r=0;const a=()=>{const[be,Ee]=varint.decode(e.subarray(r));return Ee,be};let A=a(),O=Fv;if(18===A?(0,0):1===A&&a(),0!==A&&1!==A)throw new RangeError(`Invalid CID version ${A}`);const J=r,ee=a(),ie=a(),oe=r+ie;return{version:A,codec:O,multihashCode:ee,digestSize:ie,multihashSize:oe-J,size:oe}}static parse(e,r){const[a,A]=hZ(e,r),O=ma.decode(A);return O._baseCache.set(a,e),O}}Symbol.for("@ipld/js-cid/CID");const cC={...l,...v,...E,...M,...s,...g,...y,...f,...d,...p};function uC(t,e,r,a){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:a}}}const lC=uC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),v_=uC("ascii","a",t=>{let e="a";for(let r=0;r{const e=G9((t=t.substring(1)).length);for(let r=0;rA+O.length,0));const r=G9(e);let a=0;for(const A of t)r.set(A,a),a+=A.length;return g_(r)}([e,t]),W9);return[KW,zW,r].join(UW)}function wZ(t){return b_(t,H9)}function hC(t=(0,p_.randomBytes)(WW)){return z9._w(t)}function E_(){return E_=(0,Ke.Z)(function*(t,e,r,a,A=(0,rr.fromMiliseconds)(Date.now())){const O={alg:LW,typ:BW},ie={iss:dC(a.publicKey),sub:t,aud:e,iat:A,exp:A+r},oe=function AZ(t){return w_([jw(t.header),jw(t.payload)].join(V9),FW)}({header:O,payload:ie});return function _Z(t){return[jw(t.header),jw(t.payload),wZ(t.signature)].join(V9)}({header:O,payload:ie,signature:z9.Xx(a.secretKey,oe)})}),E_.apply(this,arguments)}u(6375);var pC=function(t,e,r){if(r||2===arguments.length)for(var O,a=0,A=e.length;a"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new DZ:typeof navigator<"u"?vC(navigator.userAgent):function kZ(){var t=typeof process<"u"&&process.version;return t?new MZ(process.version.slice(1)):null}()}function mC(t){return""!==t&&NZ.reduce(function(e,r){var a=r[0],A=r[1];if(e)return e;var O=A.exec(t);return!!O&&[a,O]},!1)}function vC(t){var e=mC(t);if(!e)return null;var r=e[0],a=e[1];if("searchbot"===r)return new CZ;var A=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);A?A.lengthA+O.length,0));const r=EC(e);let a=0;for(const A of t)r.set(A,a),a+=A.length;return S_(r)}var UZ=function FZ(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),a=0;a>>0,ct=new Uint8Array(ht);Ie[Ue];){var wt=r[Ie.charCodeAt(Ue)];if(255===wt)return;for(var zt=0,Zt=ht-1;(0!==wt||zt<$e)&&-1!==Zt;Zt--,zt++)wt+=ee*ct[Zt]>>>0,ct[Zt]=wt%256>>>0,wt=wt/256>>>0;if(0!==wt)throw new Error("Non-zero carry");$e=zt,Ue++}if(" "!==Ie[Ue]){for(var En=ht-$e;En!==ht&&0===ct[En];)En++;for(var Yt=new Uint8Array(We+(ht-En)),Xt=We;En!==ht;)Yt[Xt++]=ct[En++];return Yt}}}return{encode:function be(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Ue=0,We=0,$e=0,ht=Ie.length;$e!==ht&&0===Ie[$e];)$e++,Ue++;for(var ct=(ht-$e)*de+1>>>0,wt=new Uint8Array(ct);$e!==ht;){for(var zt=Ie[$e],Zt=0,En=ct-1;(0!==zt||Zt>>0,wt[En]=zt%ee>>>0,zt=zt/ee>>>0;if(0!==zt)throw new Error("Non-zero carry");We=Zt,$e++}for(var Yt=ct-We;Yt!==ct&&0===wt[Yt];)Yt++;for(var Xt=ie.repeat(Ue);Yt{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class GZ{constructor(e,r,a){this.name=e,this.prefix=r,this.baseEncode=a}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class ZZ{constructor(e,r,a){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=a}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return _C(this,e)}}class JZ{constructor(e){this.decoders=e}or(e){return _C(this,e)}decode(e){const r=e[0],a=this.decoders[r];if(a)return a.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const _C=(t,e)=>new JZ({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class YZ{constructor(e,r,a,A){this.name=e,this.prefix=r,this.baseEncode=a,this.baseDecode=A,this.encoder=new GZ(e,r,a),this.decoder=new ZZ(e,r,A)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Kw=({name:t,prefix:e,encode:r,decode:a})=>new YZ(t,e,r,a),Kv=({prefix:t,name:e,alphabet:r})=>{const{encode:a,decode:A}=zZ(r,e);return Kw({prefix:t,name:e,encode:a,decode:O=>Uw(A(O))})},Ds=({name:t,prefix:e,bitsPerChar:r,alphabet:a})=>Kw({prefix:e,name:t,encode:A=>((t,e,r)=>{const a="="===e[e.length-1],A=(1<r;)J-=r,O+=e[A&ee>>J];if(J&&(O+=e[A&ee<((t,e,r,a)=>{const A={};for(let de=0;de=8&&(ee-=8,J[oe++]=255&ie>>ee)}if(ee>=r||255&ie<<8-ee)throw new SyntaxError("Unexpected end of data");return J})(A,a,r,t)}),XZ=Kw({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),qZ=Ds({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),eJ=Ds({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),tJ=Kv({prefix:"9",name:"base10",alphabet:"0123456789"}),nJ=Ds({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),rJ=Ds({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),iJ=Ds({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),oJ=Ds({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),sJ=Ds({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),aJ=Ds({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),cJ=Ds({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),uJ=Ds({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),lJ=Ds({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),fJ=Ds({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),dJ=Ds({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),hJ=Kv({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),pJ=Kv({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),gJ=Kv({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),yJ=Kv({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),mJ=Ds({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),vJ=Ds({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),bJ=Ds({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),wJ=Ds({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),SC=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),EJ=SC.reduce((t,e,r)=>(t[r]=e,t),[]),AJ=SC.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);const xJ=Kw({prefix:"\u{1f680}",name:"base256emoji",encode:function _J(t){return t.reduce((e,r)=>e+=EJ[r],"")},decode:function SJ(t){const e=[];for(const r of t){const a=AJ[r.codePointAt(0)];if(void 0===a)throw new Error(`Non-base256emoji character: ${r}`);e.push(a)}return new Uint8Array(e)}});var MJ=function MC(t,e,r){e=e||[];for(var a=r=r||0;t>=DJ;)e[r++]=255&t|xC,t/=128;for(;t&CJ;)e[r++]=255&t|xC,t>>>=7;return e[r]=0|t,MC.bytes=r-a+1,e},xC=128,CJ=-128,DJ=Math.pow(2,31);var TJ=function x_(t,a){var J,r=0,A=0,O=a=a||0,ee=t.length;do{if(O>=ee)throw x_.bytes=0,new RangeError("Could not decode varint");J=t[O++],r+=A<28?(J&IC)<=OJ);return x_.bytes=O-a,r},OJ=128,IC=127;var NJ=Math.pow(2,7),PJ=Math.pow(2,14),RJ=Math.pow(2,21),kJ=Math.pow(2,28),LJ=Math.pow(2,35),BJ=Math.pow(2,42),jJ=Math.pow(2,49),FJ=Math.pow(2,56),UJ=Math.pow(2,63),zJ={encode:MJ,decode:TJ,encodingLength:function(t){return t(CC.encode(t,e,r),e),TC=t=>CC.encodingLength(t),M_=(t,e)=>{const r=e.byteLength,a=TC(t),A=a+TC(r),O=new Uint8Array(A+r);return DC(t,O,0),DC(r,O,a),O.set(e,A),new OC(t,r,e,O)};class OC{constructor(e,r,a,A){this.code=e,this.size=r,this.digest=a,this.bytes=A}}const NC=({name:t,code:e,encode:r})=>new HJ(t,e,r);class HJ{constructor(e,r,a){this.name=e,this.code=r,this.encode=a}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?M_(this.code,r):r.then(a=>M_(this.code,a))}throw Error("Unknown type, must be binary type")}}const PC=t=>function(){var e=(0,Ke.Z)(function*(r){return new Uint8Array(yield crypto.subtle.digest(t,r))});return function(r){return e.apply(this,arguments)}}(),WJ=NC({name:"sha2-256",code:18,encode:PC("SHA-256")}),GJ=NC({name:"sha2-512",code:19,encode:PC("SHA-512")}),kC=Uw,JJ={code:0,name:"identity",encode:kC,digest:t=>M_(0,kC(t))},YJ="raw",$J=85,QJ=t=>Uw(t),XJ=t=>Uw(t),qJ=new TextEncoder,eY=new TextDecoder,tY="json",nY=512,rY=t=>qJ.encode(JSON.stringify(t)),iY=t=>JSON.parse(eY.decode(t));class va{constructor(e,r,a,A){this.code=r,this.version=e,this.multihash=a,this.bytes=A,this.byteOffset=A.byteOffset,this.byteLength=A.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Vw,byteLength:Vw,code:zw,version:zw,multihash:zw,bytes:zw,_baseCache:Vw,asCID:Vw})}toV0(){if(0===this.version)return this;{const{code:e,multihash:r}=this;if(e!==zv)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==cY)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return va.createV0(r)}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,a=Digest.create(e,r);return va.createV1(this.code,a)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:r,version:a,_baseCache:A}=this;return 0===a?sY(r,A,e||base58btc.encoder):aY(r,A,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return lY(/^0\.0/,fY),!(!e||!e[BC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof va)return e;if(null!=e&&e.asCID===e){const{version:r,code:a,multihash:A,bytes:O}=e;return new va(r,a,A,O||LC(r,a,A.bytes))}if(null!=e&&!0===e[BC]){const{version:r,multihash:a,code:A}=e,O=Digest.decode(a);return va.create(r,A,O)}return null}static create(e,r,a){if("number"!=typeof r)throw new Error("String codecs are no longer supported");switch(e){case 0:if(r!==zv)throw new Error(`Version 0 CID must use dag-pb (code: ${zv}) block encoding`);return new va(e,r,a,a.bytes);case 1:{const A=LC(e,r,a.bytes);return new va(e,r,a,A)}default:throw new Error("Invalid version")}}static createV0(e){return va.create(0,zv,e)}static createV1(e,r){return va.create(1,e,r)}static decode(e){const[r,a]=va.decodeFirst(e);if(a.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=va.inspectBytes(e),a=r.size-r.multihashSize,A=coerce(e.subarray(a,a+r.multihashSize));if(A.byteLength!==r.multihashSize)throw new Error("Incorrect length");const O=A.subarray(r.multihashSize-r.digestSize),J=new Digest.Digest(r.multihashCode,r.digestSize,O,A);return[0===r.version?va.createV0(J):va.createV1(r.codec,J),e.subarray(r.size)]}static inspectBytes(e){let r=0;const a=()=>{const[be,Ee]=varint.decode(e.subarray(r));return Ee,be};let A=a(),O=zv;if(18===A?(0,0):1===A&&a(),0!==A&&1!==A)throw new RangeError(`Invalid CID version ${A}`);const J=r,ee=a(),ie=a(),oe=r+ie;return{version:A,codec:O,multihashCode:ee,digestSize:ie,multihashSize:oe-J,size:oe}}static parse(e,r){const[a,A]=oY(e,r),O=va.decode(A);return O._baseCache.set(a,e),O}}Symbol.for("@ipld/js-cid/CID");const jC={...P,...x,...C,...N,...k,...U,...z,...Y,...G,...F};function FC(t,e,r,a){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:a}}}const UC=FC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),I_=FC("ascii","a",t=>{let e="a";for(let r=0;r{const e=EC((t=t.substring(1)).length);for(let r=0;re in t?EY(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,eD=(t,e)=>{for(var r in e||(e={}))AY.call(e,r)&&qC(t,r,e[r]);if(XC)for(var r of XC(e))_Y.call(e,r)&&qC(t,r,e[r]);return t};const SY="ReactNative",Ka={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},MY="js";function Vv(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Lg(){return!(0,Uv.getDocument)()&&!!(0,Uv.getNavigator)()&&navigator.product===SY}function Bg(){return!Vv()&&!!(0,Uv.getNavigator)()&&!!(0,Uv.getDocument)()}function jg(){return Lg()?Ka.reactNative:Vv()?Ka.node:Bg()?Ka.browser:Ka.unknown}function NY(t,e,r){const a=function TY(){if(jg()===Ka.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:r,Version:a}=global.Platform;return[r,a].join("-")}const t=PZ();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),A=function OY(){var t;const e=jg();return e===Ka.browser?[e,(null==(t=(0,Uv.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[MY,r].join("-"),a,A].join("/")}function PY({protocol:t,version:e,relayUrl:r,sdkVersion:a,auth:A,projectId:O,useOnCloseEvent:J,bundleId:ee}){const ie=r.split("?"),de={auth:A,ua:NY(t,e,a),projectId:O,useOnCloseEvent:J||void 0,origin:ee||void 0},be=function CY(t,e){let r=Fw.parse(t);return r=eD(eD({},r),e),Fw.stringify(r)}(ie[1]||"",de);return ie[0]+"?"+be}function u0(t,e){return t.filter(r=>e.includes(r)).length===t.length}function nD(t){return Object.fromEntries(t.entries())}function rD(t){return new Map(Object.entries(t))}function l0(t=rr.FIVE_MINUTES,e){const r=(0,rr.toMiliseconds)(t||rr.FIVE_MINUTES);let a,A,O;return{resolve:J=>{O&&a&&(clearTimeout(O),a(J))},reject:J=>{O&&A&&(clearTimeout(O),A(J))},done:()=>new Promise((J,ee)=>{O=setTimeout(()=>{ee(new Error(e))},r),a=J,A=ee})}}function Hv(t,e,r){return new Promise(function(){var a=(0,Ke.Z)(function*(A,O){const J=setTimeout(()=>O(new Error(r)),e);try{A(yield t)}catch(ee){O(ee)}clearTimeout(J)});return function(A,O){return a.apply(this,arguments)}}())}function iD(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function oD(t){const[e,r]=t.split(":"),a={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof r)a.topic=r;else{if("id"!==e||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);a.id=Number(r)}return a}function $s(t,e){return(0,rr.fromMiliseconds)((e||Date.now())+(0,rr.toMiliseconds)(t))}function Ed(t){return Date.now()>=(0,rr.toMiliseconds)(t)}function ti(t,e){return`${t}${e?`:${e}`:""}`}function Ad(t=[],e=[]){return[...new Set([...t,...e])]}function T_(){return T_=(0,Ke.Z)(function*({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;let A=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof A)return;A.endsWith("/")&&(A=A.slice(0,-1));const O=`${A}/wc?requestId=${t}&sessionTopic=${e}`,J=jg();J===Ka.browser?O.startsWith("https://")||O.startsWith("http://")?window.open(O,"_blank","noreferrer noopener"):window.open(O,"_self","noreferrer noopener"):J===Ka.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(O))}catch(a){console.error(a)}}),T_.apply(this,arguments)}function O_(){return O_=(0,Ke.Z)(function*(t,e){try{return(yield t.getItem(e))||(Bg()?localStorage.getItem(e):void 0)}catch(r){console.error(r)}}),O_.apply(this,arguments)}var aD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var cD={exports:{}};!function(t){!function(){var e="input is invalid type",a="object"==typeof window,A=a?window:{};A.JS_SHA3_NO_WINDOW&&(a=!1);var O=!a&&"object"==typeof self;!A.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?A=aD:O&&(A=self);var ee=!A.JS_SHA3_NO_COMMON_JS&&t.exports,ie=!A.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",oe="0123456789abcdef".split(""),be=[4,1024,262144,67108864],Ie=[0,8,16,24],Ue=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],We=[224,256,384,512],$e=[128,256],ht=["hex","buffer","arrayBuffer","array","digest"],ct={128:168,256:136};(A.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(tt){return"[object Array]"===Object.prototype.toString.call(tt)}),ie&&(A.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(tt){return"object"==typeof tt&&tt.buffer&&tt.buffer.constructor===ArrayBuffer});for(var wt=function(tt,tn,Qt){return function(un){return new ft(tt,tn,tt).update(un)[Qt]()}},zt=function(tt,tn,Qt){return function(un,Fn){return new ft(tt,tn,Fn).update(un)[Qt]()}},Zt=function(tt,tn,Qt){return function(un,Fn,Vn,Gn){return Je["cshake"+tt].update(un,Fn,Vn,Gn)[Qt]()}},En=function(tt,tn,Qt){return function(un,Fn,Vn,Gn){return Je["kmac"+tt].update(un,Fn,Vn,Gn)[Qt]()}},Yt=function(tt,tn,Qt,un){for(var Fn=0;Fn>5,this.byteCount=this.blockCount<<2,this.outputBlocks=Qt>>5,this.extraBytes=(31&Qt)>>3;for(var un=0;un<50;++un)this.s[un]=0}function er(tt,tn,Qt){ft.call(this,tt,tn,Qt)}ft.prototype.update=function(tt){if(this.finalized)throw new Error("finalize already called");var tn,Qt=typeof tt;if("string"!==Qt){if("object"!==Qt)throw new Error(e);if(null===tt)throw new Error(e);if(ie&&tt.constructor===ArrayBuffer)tt=new Uint8Array(tt);else if(!(Array.isArray(tt)||ie&&ArrayBuffer.isView(tt)))throw new Error(e);tn=!0}for(var Jn,Si,un=this.blocks,Fn=this.byteCount,Vn=tt.length,Gn=this.blockCount,gr=0,Ur=this.s;gr>2]|=tt[gr]<>2]|=Si<>2]|=(192|Si>>6)<>2]|=(128|63&Si)<=57344?(un[Jn>>2]|=(224|Si>>12)<>2]|=(128|Si>>6&63)<>2]|=(128|63&Si)<>2]|=(240|Si>>18)<>2]|=(128|Si>>12&63)<>2]|=(128|Si>>6&63)<>2]|=(128|63&Si)<=Fn){for(this.start=Jn-Fn,this.block=un[Gn],Jn=0;Jn>=8);Qt>0;)Fn.unshift(Qt),Qt=255&(tt>>=8),++un;return tn?Fn.push(un):Fn.unshift(un),this.update(Fn),Fn.length},ft.prototype.encodeString=function(tt){var tn,Qt=typeof tt;if("string"!==Qt){if("object"!==Qt)throw new Error(e);if(null===tt)throw new Error(e);if(ie&&tt.constructor===ArrayBuffer)tt=new Uint8Array(tt);else if(!(Array.isArray(tt)||ie&&ArrayBuffer.isView(tt)))throw new Error(e);tn=!0}var un=0,Fn=tt.length;if(tn)un=Fn;else for(var Vn=0;Vn=57344?un+=3:(Gn=65536+((1023&Gn)<<10|1023&tt.charCodeAt(++Vn)),un+=4)}return un+=this.encode(8*un),this.update(tt),un},ft.prototype.bytepad=function(tt,tn){for(var Qt=this.encode(tn),un=0;un>2]|=this.padding[3&tn],this.lastByteIndex===this.byteCount)for(tt[0]=tt[Qt],tn=1;tn>4&15]+oe[15&gr]+oe[gr>>12&15]+oe[gr>>8&15]+oe[gr>>20&15]+oe[gr>>16&15]+oe[gr>>28&15]+oe[gr>>24&15];Vn%tt==0&&(Un(tn),Fn=0)}return un&&(gr=tn[Fn],Gn+=oe[gr>>4&15]+oe[15&gr],un>1&&(Gn+=oe[gr>>12&15]+oe[gr>>8&15]),un>2&&(Gn+=oe[gr>>20&15]+oe[gr>>16&15])),Gn},ft.prototype.arrayBuffer=function(){this.finalize();var gr,tt=this.blockCount,tn=this.s,Qt=this.outputBlocks,un=this.extraBytes,Fn=0,Vn=0,Gn=this.outputBits>>3;gr=un?new ArrayBuffer(Qt+1<<2):new ArrayBuffer(Gn);for(var Ur=new Uint32Array(gr);Vn>8&255,Gn[gr+2]=Ur>>16&255,Gn[gr+3]=Ur>>24&255;Vn%tt==0&&Un(tn)}return un&&(gr=Vn<<2,Ur=tn[Fn],Gn[gr]=255&Ur,un>1&&(Gn[gr+1]=Ur>>8&255),un>2&&(Gn[gr+2]=Ur>>16&255)),Gn},er.prototype=new ft,er.prototype.finalize=function(){return this.encode(this.outputBits,!0),ft.prototype.finalize.call(this)};var Un=function(tt){var tn,Qt,un,Fn,Vn,Gn,gr,Ur,Jn,Si,Ui,Ti,dl,ni,gi,Zc,cr,br,Gr,kr,lr,Jc,Ar,mi,Es,Oi,Ni,b0,$i,Qi,w0,Xi,qi,E0,eo,to,A0,no,ro,_0,io,oo,S0,so,ao,x0,co,uo,M0,lo,fo,I0,ho,po,C0,go,yo,Pd,Rd,kd,Ld,Bd,jd;for(un=0;un<48;un+=2)Fn=tt[0]^tt[10]^tt[20]^tt[30]^tt[40],Vn=tt[1]^tt[11]^tt[21]^tt[31]^tt[41],Gn=tt[2]^tt[12]^tt[22]^tt[32]^tt[42],gr=tt[3]^tt[13]^tt[23]^tt[33]^tt[43],Ur=tt[4]^tt[14]^tt[24]^tt[34]^tt[44],Jn=tt[5]^tt[15]^tt[25]^tt[35]^tt[45],Si=tt[6]^tt[16]^tt[26]^tt[36]^tt[46],Ui=tt[7]^tt[17]^tt[27]^tt[37]^tt[47],tn=(Ti=tt[8]^tt[18]^tt[28]^tt[38]^tt[48])^(Gn<<1|gr>>>31),Qt=(dl=tt[9]^tt[19]^tt[29]^tt[39]^tt[49])^(gr<<1|Gn>>>31),tt[0]^=tn,tt[1]^=Qt,tt[10]^=tn,tt[11]^=Qt,tt[20]^=tn,tt[21]^=Qt,tt[30]^=tn,tt[31]^=Qt,tt[40]^=tn,tt[41]^=Qt,tn=Fn^(Ur<<1|Jn>>>31),Qt=Vn^(Jn<<1|Ur>>>31),tt[2]^=tn,tt[3]^=Qt,tt[12]^=tn,tt[13]^=Qt,tt[22]^=tn,tt[23]^=Qt,tt[32]^=tn,tt[33]^=Qt,tt[42]^=tn,tt[43]^=Qt,tn=Gn^(Si<<1|Ui>>>31),Qt=gr^(Ui<<1|Si>>>31),tt[4]^=tn,tt[5]^=Qt,tt[14]^=tn,tt[15]^=Qt,tt[24]^=tn,tt[25]^=Qt,tt[34]^=tn,tt[35]^=Qt,tt[44]^=tn,tt[45]^=Qt,tn=Ur^(Ti<<1|dl>>>31),Qt=Jn^(dl<<1|Ti>>>31),tt[6]^=tn,tt[7]^=Qt,tt[16]^=tn,tt[17]^=Qt,tt[26]^=tn,tt[27]^=Qt,tt[36]^=tn,tt[37]^=Qt,tt[46]^=tn,tt[47]^=Qt,tn=Si^(Fn<<1|Vn>>>31),Qt=Ui^(Vn<<1|Fn>>>31),tt[8]^=tn,tt[9]^=Qt,tt[18]^=tn,tt[19]^=Qt,tt[28]^=tn,tt[29]^=Qt,tt[38]^=tn,tt[39]^=Qt,tt[48]^=tn,tt[49]^=Qt,ni=tt[0],gi=tt[1],x0=tt[11]<<4|tt[10]>>>28,co=tt[10]<<4|tt[11]>>>28,b0=tt[20]<<3|tt[21]>>>29,$i=tt[21]<<3|tt[20]>>>29,kd=tt[31]<<9|tt[30]>>>23,Ld=tt[30]<<9|tt[31]>>>23,oo=tt[40]<<18|tt[41]>>>14,S0=tt[41]<<18|tt[40]>>>14,E0=tt[2]<<1|tt[3]>>>31,eo=tt[3]<<1|tt[2]>>>31,Zc=tt[13]<<12|tt[12]>>>20,cr=tt[12]<<12|tt[13]>>>20,uo=tt[22]<<10|tt[23]>>>22,M0=tt[23]<<10|tt[22]>>>22,Qi=tt[33]<<13|tt[32]>>>19,w0=tt[32]<<13|tt[33]>>>19,Bd=tt[42]<<2|tt[43]>>>30,jd=tt[43]<<2|tt[42]>>>30,po=tt[5]<<30|tt[4]>>>2,C0=tt[4]<<30|tt[5]>>>2,to=tt[14]<<6|tt[15]>>>26,A0=tt[15]<<6|tt[14]>>>26,br=tt[25]<<11|tt[24]>>>21,Gr=tt[24]<<11|tt[25]>>>21,lo=tt[34]<<15|tt[35]>>>17,fo=tt[35]<<15|tt[34]>>>17,Xi=tt[45]<<29|tt[44]>>>3,qi=tt[44]<<29|tt[45]>>>3,mi=tt[6]<<28|tt[7]>>>4,Es=tt[7]<<28|tt[6]>>>4,go=tt[17]<<23|tt[16]>>>9,yo=tt[16]<<23|tt[17]>>>9,no=tt[26]<<25|tt[27]>>>7,ro=tt[27]<<25|tt[26]>>>7,kr=tt[36]<<21|tt[37]>>>11,lr=tt[37]<<21|tt[36]>>>11,I0=tt[47]<<24|tt[46]>>>8,ho=tt[46]<<24|tt[47]>>>8,so=tt[8]<<27|tt[9]>>>5,ao=tt[9]<<27|tt[8]>>>5,Oi=tt[18]<<20|tt[19]>>>12,Ni=tt[19]<<20|tt[18]>>>12,Pd=tt[29]<<7|tt[28]>>>25,Rd=tt[28]<<7|tt[29]>>>25,_0=tt[38]<<8|tt[39]>>>24,io=tt[39]<<8|tt[38]>>>24,Jc=tt[48]<<14|tt[49]>>>18,Ar=tt[49]<<14|tt[48]>>>18,tt[0]=ni^~Zc&br,tt[1]=gi^~cr&Gr,tt[10]=mi^~Oi&b0,tt[11]=Es^~Ni&$i,tt[20]=E0^~to&no,tt[21]=eo^~A0&ro,tt[30]=so^~x0&uo,tt[31]=ao^~co&M0,tt[40]=po^~go&Pd,tt[41]=C0^~yo&Rd,tt[2]=Zc^~br&kr,tt[3]=cr^~Gr&lr,tt[12]=Oi^~b0&Qi,tt[13]=Ni^~$i&w0,tt[22]=to^~no&_0,tt[23]=A0^~ro&io,tt[32]=x0^~uo&lo,tt[33]=co^~M0&fo,tt[42]=go^~Pd&kd,tt[43]=yo^~Rd&Ld,tt[4]=br^~kr&Jc,tt[5]=Gr^~lr&Ar,tt[14]=b0^~Qi&Xi,tt[15]=$i^~w0&qi,tt[24]=no^~_0&oo,tt[25]=ro^~io&S0,tt[34]=uo^~lo&I0,tt[35]=M0^~fo&ho,tt[44]=Pd^~kd&Bd,tt[45]=Rd^~Ld&jd,tt[6]=kr^~Jc&ni,tt[7]=lr^~Ar&gi,tt[16]=Qi^~Xi&mi,tt[17]=w0^~qi&Es,tt[26]=_0^~oo&E0,tt[27]=io^~S0&eo,tt[36]=lo^~I0&so,tt[37]=fo^~ho&ao,tt[46]=kd^~Bd&po,tt[47]=Ld^~jd&C0,tt[8]=Jc^~ni&Zc,tt[9]=Ar^~gi&cr,tt[18]=Xi^~mi&Oi,tt[19]=qi^~Es&Ni,tt[28]=oo^~E0&to,tt[29]=S0^~eo&A0,tt[38]=I0^~so&x0,tt[39]=ho^~ao&co,tt[48]=Bd^~po&go,tt[49]=jd^~C0&yo,tt[0]^=Ue[un],tt[1]^=Ue[un+1]};if(ee)t.exports=Je;else for(lt=0;lt{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var P_,Su;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(P_||(P_={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(Su||(Su={}));const hD="0123456789abcdef";class $r{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const a=e.toLowerCase();null==Jw[a]&&this.throwArgumentError("invalid log level name","logLevel",e),!(fD>Jw[a])&&console.log.apply(console,r)}debug(...e){this._log($r.levels.DEBUG,e)}info(...e){this._log($r.levels.INFO,e)}warn(...e){this._log($r.levels.WARNING,e)}makeError(e,r,a){if(lD)return this.makeError("censored error",r,{});r||(r=$r.errors.UNKNOWN_ERROR),a||(a={});const A=[];Object.keys(a).forEach(ie=>{const oe=a[ie];try{if(oe instanceof Uint8Array){let de="";for(let be=0;be>4],de+=hD[15&oe[be]];A.push(ie+"=Uint8Array(0x"+de+")")}else A.push(ie+"="+JSON.stringify(oe))}catch{A.push(ie+"="+JSON.stringify(a[ie].toString()))}}),A.push(`code=${r}`),A.push(`version=${this.version}`);const O=e;let J="";switch(r){case Su.NUMERIC_FAULT:{J="NUMERIC_FAULT";const ie=e;switch(ie){case"overflow":case"underflow":case"division-by-zero":J+="-"+ie;break;case"negative-power":case"negative-width":J+="-unsupported";break;case"unbound-bitwise-result":J+="-unbound-result"}break}case Su.CALL_EXCEPTION:case Su.INSUFFICIENT_FUNDS:case Su.MISSING_NEW:case Su.NONCE_EXPIRED:case Su.REPLACEMENT_UNDERPRICED:case Su.TRANSACTION_REPLACED:case Su.UNPREDICTABLE_GAS_LIMIT:J=r}J&&(e+=" [ See: https://links.ethers.org/v5-errors-"+J+" ]"),A.length&&(e+=" ("+A.join(", ")+")");const ee=new Error(e);return ee.reason=O,ee.code=r,Object.keys(a).forEach(function(ie){ee[ie]=a[ie]}),ee}throwError(e,r,a){throw this.makeError(e,r,a)}throwArgumentError(e,r,a){return this.throwError(e,$r.errors.INVALID_ARGUMENT,{argument:r,value:a})}assert(e,r,a,A){e||this.throwError(r,a,A)}assertArgument(e,r,a,A){e||this.throwArgumentError(r,a,A)}checkNormalize(e){dD&&this.throwError("platform missing String.prototype.normalize",$r.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:dD})}checkSafeUint53(e,r){"number"==typeof e&&(null==r&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,$r.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,$r.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,a){a=a?": "+a:"",er&&this.throwError("too many arguments"+a,$r.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||null==e)&&this.throwError("missing new",$r.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",$r.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",$r.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return N_||(N_=new $r("logger/5.7.0")),N_}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",$r.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),uD){if(!e)return;this.globalLogger().throwError("error censorship permanent",$r.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}lD=!!e,uD=!!r}static setLogLevel(e){const r=Jw[e.toLowerCase()];null!=r?fD=r:$r.globalLogger().warn("invalid log level - "+e)}static from(e){return new $r(e)}}$r.errors=Su,$r.levels=P_;const Jo=new $r("bytes/5.7.0");function pD(t){return!!t.toHexString}function Fg(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return Fg(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function gD(t){return"number"==typeof t&&t==t&&t%1==0}function Ug(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!gD(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Bo(t,e){if(e||(e={}),"number"==typeof t){Jo.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(255&t),t=parseInt(String(t/256));return 0===r.length&&r.push(0),Fg(new Uint8Array(r))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),pD(t)&&(t=t.toHexString()),fc(t)){let r=t.substring(2);r.length%2&&("left"===e.hexPad?r="0"+r:"right"===e.hexPad?r+="0":Jo.throwArgumentError("hex data is odd-length","value",t));const a=[];for(let A=0;A>4]+R_[15&A]}return r}return Jo.throwArgumentError("invalid hexlify value","value",t)}function yD(t,e,r){return"string"!=typeof t?t=ba(t):(!fc(t)||t.length%2)&&Jo.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=r?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function el(t,e){for("string"!=typeof t?t=ba(t):fc(t)||Jo.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&Jo.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function mD(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(function GY(t){return fc(t)&&!(t.length%2)||Ug(t)}(t)){let r=Bo(t);64===r.length?(e.v=27+(r[32]>>7),r[32]&=127,e.r=ba(r.slice(0,32)),e.s=ba(r.slice(32,64))):65===r.length?(e.r=ba(r.slice(0,32)),e.s=ba(r.slice(32,64)),e.v=r[64]):Jo.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:Jo.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=ba(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const A=function JY(t,e){(t=Bo(t)).length>e&&Jo.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),Fg(r)}(Bo(e._vs),32);e._vs=ba(A);const O=A[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=O:e.recoveryParam!==O&&Jo.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),A[0]&=127;const J=ba(A);null==e.s?e.s=J:e.s!==J&&Jo.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?Jo.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const A=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==A&&Jo.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&fc(e.r)?e.r=el(e.r,32):Jo.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&fc(e.s)?e.s=el(e.s,32):Jo.throwArgumentError("signature missing or invalid s","signature",t);const r=Bo(e.s);r[0]>=128&&Jo.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const a=ba(r);e._vs&&(fc(e._vs)||Jo.throwArgumentError("signature invalid _vs","signature",t),e._vs=el(e._vs,32)),null==e._vs?e._vs=a:e._vs!==a&&Jo.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function k_(t){return"0x"+zY.keccak_256(Bo(t))}var vD={exports:{}},XY=function KY(t){var e=t.default;if("function"==typeof e){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var A=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,A.get?A:{enumerable:!0,get:function(){return t[a]}})}),r}(Object.freeze({__proto__:null,default:{}}));!function(t){!function(e,r){function a(Ne,Je){if(!Ne)throw new Error(Je||"Assertion failed")}function A(Ne,Je){Ne.super_=Je;var rt=function(){};rt.prototype=Je.prototype,Ne.prototype=new rt,Ne.prototype.constructor=Ne}function O(Ne,Je,rt){if(O.isBN(Ne))return Ne;this.negative=0,this.words=null,this.length=0,this.red=null,null!==Ne&&(("le"===Je||"be"===Je)&&(rt=Je,Je=10),this._init(Ne||0,Je||10,rt||"be"))}var J;"object"==typeof e?e.exports=O:r.BN=O,O.BN=O,O.wordSize=26;try{J=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:XY.Buffer}catch{}function ee(Ne,Je){var rt=Ne.charCodeAt(Je);return rt>=48&&rt<=57?rt-48:rt>=65&&rt<=70?rt-55:rt>=97&&rt<=102?rt-87:void a(!1,"Invalid character in "+Ne)}function ie(Ne,Je,rt){var lt=ee(Ne,rt);return rt-1>=Je&&(lt|=ee(Ne,rt-1)<<4),lt}function oe(Ne,Je,rt,lt){for(var vt=0,Mt=0,St=Math.min(Ne.length,rt),yt=Je;yt=49?Ve-49+10:Ve>=17?Ve-17+10:Ve,a(Ve>=0&&Mt0?Ne:Je},O.min=function(Ne,Je){return Ne.cmp(Je)<0?Ne:Je},O.prototype._init=function(Ne,Je,rt){if("number"==typeof Ne)return this._initNumber(Ne,Je,rt);if("object"==typeof Ne)return this._initArray(Ne,Je,rt);"hex"===Je&&(Je=16),a(Je===(0|Je)&&Je>=2&&Je<=36);var lt=0;"-"===(Ne=Ne.toString().replace(/\s+/g,""))[0]&&(lt++,this.negative=1),lt=0;lt-=3)Mt=Ne[lt]|Ne[lt-1]<<8|Ne[lt-2]<<16,this.words[vt]|=Mt<>>26-St&67108863,(St+=24)>=26&&(St-=26,vt++);else if("le"===rt)for(lt=0,vt=0;lt>>26-St&67108863,(St+=24)>=26&&(St-=26,vt++);return this._strip()},O.prototype._parseHex=function(Ne,Je,rt){this.length=Math.ceil((Ne.length-Je)/6),this.words=new Array(this.length);for(var lt=0;lt=Je;lt-=2)St=ie(Ne,Je,lt)<=18?(vt-=18,Mt+=1,this.words[Mt]|=St>>>26):vt+=8;else for(lt=(Ne.length-Je)%2==0?Je+1:Je;lt=18?(vt-=18,Mt+=1,this.words[Mt]|=St>>>26):vt+=8;this._strip()},O.prototype._parseBase=function(Ne,Je,rt){this.words=[0],this.length=1;for(var lt=0,vt=1;vt<=67108863;vt*=Je)lt++;lt--,vt=vt/Je|0;for(var Mt=Ne.length-rt,St=Mt%lt,yt=Math.min(Mt,Mt-St)+rt,Ve=0,ft=rt;ft1&&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},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{O.prototype[Symbol.for("nodejs.util.inspect.custom")]=be}catch{O.prototype.inspect=be}else O.prototype.inspect=be;function be(){return(this.red?""}var Ee=["","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"],Ce=[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],Ie=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];O.prototype.toString=function(Ne,Je){var rt;if(Je=0|Je||1,16===(Ne=Ne||10)||"hex"===Ne){rt="";for(var lt=0,vt=0,Mt=0;Mt>>24-lt&16777215,(lt+=2)>=26&&(lt-=26,Mt--),rt=0!==vt||Mt!==this.length-1?Ee[6-yt.length]+yt+rt:yt+rt}for(0!==vt&&(rt=vt.toString(16)+rt);rt.length%Je!=0;)rt="0"+rt;return 0!==this.negative&&(rt="-"+rt),rt}if(Ne===(0|Ne)&&Ne>=2&&Ne<=36){var Ve=Ce[Ne],ft=Ie[Ne];rt="";var er=this.clone();for(er.negative=0;!er.isZero();){var Un=er.modrn(ft).toString(Ne);rt=(er=er.idivn(ft)).isZero()?Un+rt:Ee[Ve-Un.length]+Un+rt}for(this.isZero()&&(rt="0"+rt);rt.length%Je!=0;)rt="0"+rt;return 0!==this.negative&&(rt="-"+rt),rt}a(!1,"Base should be between 2 and 36")},O.prototype.toNumber=function(){var Ne=this.words[0];return 2===this.length?Ne+=67108864*this.words[1]:3===this.length&&1===this.words[2]?Ne+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-Ne:Ne},O.prototype.toJSON=function(){return this.toString(16,2)},J&&(O.prototype.toBuffer=function(Ne,Je){return this.toArrayLike(J,Ne,Je)}),O.prototype.toArray=function(Ne,Je){return this.toArrayLike(Array,Ne,Je)};function $e(Ne,Je,rt){rt.negative=Je.negative^Ne.negative;var lt=Ne.length+Je.length|0;rt.length=lt,lt=lt-1|0;var vt=0|Ne.words[0],Mt=0|Je.words[0],St=vt*Mt,yt=67108863&St,Ve=St/67108864|0;rt.words[0]=yt;for(var ft=1;ft>>26,Un=67108863&Ve,tt=Math.min(ft,Je.length-1),tn=Math.max(0,ft-Ne.length+1);tn<=tt;tn++){var Qt=ft-tn|0;er+=(St=(vt=0|Ne.words[Qt])*(Mt=0|Je.words[tn])+Un)/67108864|0,Un=67108863&St}rt.words[ft]=0|Un,Ve=0|er}return 0!==Ve?rt.words[ft]=0|Ve:rt.length--,rt._strip()}O.prototype.toArrayLike=function(Ne,Je,rt){this._strip();var lt=this.byteLength(),vt=rt||Math.max(1,lt);a(lt<=vt,"byte array longer than desired length"),a(vt>0,"Requested array length <= 0");var Mt=function(Ne,Je){return Ne.allocUnsafe?Ne.allocUnsafe(Je):new Ne(Je)}(Ne,vt);return this["_toArrayLike"+("le"===Je?"LE":"BE")](Mt,lt),Mt},O.prototype._toArrayLikeLE=function(Ne,Je){for(var rt=0,lt=0,vt=0,Mt=0;vt>8&255),rt>16&255),6===Mt?(rt>24&255),lt=0,Mt=0):(lt=St>>>24,Mt+=2)}if(rt=0&&(Ne[rt--]=St>>8&255),rt>=0&&(Ne[rt--]=St>>16&255),6===Mt?(rt>=0&&(Ne[rt--]=St>>24&255),lt=0,Mt=0):(lt=St>>>24,Mt+=2)}if(rt>=0)for(Ne[rt--]=lt;rt>=0;)Ne[rt--]=0},Math.clz32?O.prototype._countBits=function(Ne){return 32-Math.clz32(Ne)}:O.prototype._countBits=function(Ne){var Je=Ne,rt=0;return Je>=4096&&(rt+=13,Je>>>=13),Je>=64&&(rt+=7,Je>>>=7),Je>=8&&(rt+=4,Je>>>=4),Je>=2&&(rt+=2,Je>>>=2),rt+Je},O.prototype._zeroBits=function(Ne){if(0===Ne)return 26;var Je=Ne,rt=0;return 8191&Je||(rt+=13,Je>>>=13),127&Je||(rt+=7,Je>>>=7),15&Je||(rt+=4,Je>>>=4),3&Je||(rt+=2,Je>>>=2),1&Je||rt++,rt},O.prototype.bitLength=function(){var Ne=this.words[this.length-1],Je=this._countBits(Ne);return 26*(this.length-1)+Je},O.prototype.zeroBits=function(){if(this.isZero())return 0;for(var Ne=0,Je=0;JeNe.length?this.clone().ior(Ne):Ne.clone().ior(this)},O.prototype.uor=function(Ne){return this.length>Ne.length?this.clone().iuor(Ne):Ne.clone().iuor(this)},O.prototype.iuand=function(Ne){var Je;Je=this.length>Ne.length?Ne:this;for(var rt=0;rtNe.length?this.clone().iand(Ne):Ne.clone().iand(this)},O.prototype.uand=function(Ne){return this.length>Ne.length?this.clone().iuand(Ne):Ne.clone().iuand(this)},O.prototype.iuxor=function(Ne){var Je,rt;this.length>Ne.length?(Je=this,rt=Ne):(Je=Ne,rt=this);for(var lt=0;ltNe.length?this.clone().ixor(Ne):Ne.clone().ixor(this)},O.prototype.uxor=function(Ne){return this.length>Ne.length?this.clone().iuxor(Ne):Ne.clone().iuxor(this)},O.prototype.inotn=function(Ne){a("number"==typeof Ne&&Ne>=0);var Je=0|Math.ceil(Ne/26),rt=Ne%26;this._expand(Je),rt>0&&Je--;for(var lt=0;lt0&&(this.words[lt]=~this.words[lt]&67108863>>26-rt),this._strip()},O.prototype.notn=function(Ne){return this.clone().inotn(Ne)},O.prototype.setn=function(Ne,Je){a("number"==typeof Ne&&Ne>=0);var rt=Ne/26|0,lt=Ne%26;return this._expand(rt+1),this.words[rt]=Je?this.words[rt]|1<Ne.length?(rt=this,lt=Ne):(rt=Ne,lt=this);for(var vt=0,Mt=0;Mt>>26;for(;0!==vt&&Mt>>26;if(this.length=rt.length,0!==vt)this.words[this.length]=vt,this.length++;else if(rt!==this)for(;MtNe.length?this.clone().iadd(Ne):Ne.clone().iadd(this)},O.prototype.isub=function(Ne){if(0!==Ne.negative){Ne.negative=0;var Je=this.iadd(Ne);return Ne.negative=1,Je._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(Ne),this.negative=1,this._normSign();var lt,vt,rt=this.cmp(Ne);if(0===rt)return this.negative=0,this.length=1,this.words[0]=0,this;rt>0?(lt=this,vt=Ne):(lt=Ne,vt=this);for(var Mt=0,St=0;St>26,this.words[St]=67108863&Je;for(;0!==Mt&&St>26,this.words[St]=67108863&Je;if(0===Mt&&St>>13,tn=0|lt[1],Qt=8191&tn,un=tn>>>13,Fn=0|lt[2],Vn=8191&Fn,Gn=Fn>>>13,gr=0|lt[3],Ur=8191&gr,Jn=gr>>>13,Si=0|lt[4],Ui=8191&Si,Ti=Si>>>13,dl=0|lt[5],ni=8191&dl,gi=dl>>>13,Zc=0|lt[6],cr=8191&Zc,br=Zc>>>13,Gr=0|lt[7],kr=8191&Gr,lr=Gr>>>13,Jc=0|lt[8],Ar=8191&Jc,mi=Jc>>>13,Es=0|lt[9],Oi=8191&Es,Ni=Es>>>13,b0=0|vt[0],$i=8191&b0,Qi=b0>>>13,w0=0|vt[1],Xi=8191&w0,qi=w0>>>13,E0=0|vt[2],eo=8191&E0,to=E0>>>13,A0=0|vt[3],no=8191&A0,ro=A0>>>13,_0=0|vt[4],io=8191&_0,oo=_0>>>13,S0=0|vt[5],so=8191&S0,ao=S0>>>13,x0=0|vt[6],co=8191&x0,uo=x0>>>13,M0=0|vt[7],lo=8191&M0,fo=M0>>>13,I0=0|vt[8],ho=8191&I0,po=I0>>>13,C0=0|vt[9],go=8191&C0,yo=C0>>>13;rt.negative=Ne.negative^Je.negative,rt.length=19;var Pd=(St+(yt=Math.imul(Un,$i))|0)+((8191&(Ve=(Ve=Math.imul(Un,Qi))+Math.imul(tt,$i)|0))<<13)|0;St=((ft=Math.imul(tt,Qi))+(Ve>>>13)|0)+(Pd>>>26)|0,Pd&=67108863,yt=Math.imul(Qt,$i),Ve=(Ve=Math.imul(Qt,Qi))+Math.imul(un,$i)|0,ft=Math.imul(un,Qi);var Rd=(St+(yt=yt+Math.imul(Un,Xi)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,qi)|0)+Math.imul(tt,Xi)|0))<<13)|0;St=((ft=ft+Math.imul(tt,qi)|0)+(Ve>>>13)|0)+(Rd>>>26)|0,Rd&=67108863,yt=Math.imul(Vn,$i),Ve=(Ve=Math.imul(Vn,Qi))+Math.imul(Gn,$i)|0,ft=Math.imul(Gn,Qi),yt=yt+Math.imul(Qt,Xi)|0,Ve=(Ve=Ve+Math.imul(Qt,qi)|0)+Math.imul(un,Xi)|0,ft=ft+Math.imul(un,qi)|0;var kd=(St+(yt=yt+Math.imul(Un,eo)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,to)|0)+Math.imul(tt,eo)|0))<<13)|0;St=((ft=ft+Math.imul(tt,to)|0)+(Ve>>>13)|0)+(kd>>>26)|0,kd&=67108863,yt=Math.imul(Ur,$i),Ve=(Ve=Math.imul(Ur,Qi))+Math.imul(Jn,$i)|0,ft=Math.imul(Jn,Qi),yt=yt+Math.imul(Vn,Xi)|0,Ve=(Ve=Ve+Math.imul(Vn,qi)|0)+Math.imul(Gn,Xi)|0,ft=ft+Math.imul(Gn,qi)|0,yt=yt+Math.imul(Qt,eo)|0,Ve=(Ve=Ve+Math.imul(Qt,to)|0)+Math.imul(un,eo)|0,ft=ft+Math.imul(un,to)|0;var Ld=(St+(yt=yt+Math.imul(Un,no)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,ro)|0)+Math.imul(tt,no)|0))<<13)|0;St=((ft=ft+Math.imul(tt,ro)|0)+(Ve>>>13)|0)+(Ld>>>26)|0,Ld&=67108863,yt=Math.imul(Ui,$i),Ve=(Ve=Math.imul(Ui,Qi))+Math.imul(Ti,$i)|0,ft=Math.imul(Ti,Qi),yt=yt+Math.imul(Ur,Xi)|0,Ve=(Ve=Ve+Math.imul(Ur,qi)|0)+Math.imul(Jn,Xi)|0,ft=ft+Math.imul(Jn,qi)|0,yt=yt+Math.imul(Vn,eo)|0,Ve=(Ve=Ve+Math.imul(Vn,to)|0)+Math.imul(Gn,eo)|0,ft=ft+Math.imul(Gn,to)|0,yt=yt+Math.imul(Qt,no)|0,Ve=(Ve=Ve+Math.imul(Qt,ro)|0)+Math.imul(un,no)|0,ft=ft+Math.imul(un,ro)|0;var Bd=(St+(yt=yt+Math.imul(Un,io)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,oo)|0)+Math.imul(tt,io)|0))<<13)|0;St=((ft=ft+Math.imul(tt,oo)|0)+(Ve>>>13)|0)+(Bd>>>26)|0,Bd&=67108863,yt=Math.imul(ni,$i),Ve=(Ve=Math.imul(ni,Qi))+Math.imul(gi,$i)|0,ft=Math.imul(gi,Qi),yt=yt+Math.imul(Ui,Xi)|0,Ve=(Ve=Ve+Math.imul(Ui,qi)|0)+Math.imul(Ti,Xi)|0,ft=ft+Math.imul(Ti,qi)|0,yt=yt+Math.imul(Ur,eo)|0,Ve=(Ve=Ve+Math.imul(Ur,to)|0)+Math.imul(Jn,eo)|0,ft=ft+Math.imul(Jn,to)|0,yt=yt+Math.imul(Vn,no)|0,Ve=(Ve=Ve+Math.imul(Vn,ro)|0)+Math.imul(Gn,no)|0,ft=ft+Math.imul(Gn,ro)|0,yt=yt+Math.imul(Qt,io)|0,Ve=(Ve=Ve+Math.imul(Qt,oo)|0)+Math.imul(un,io)|0,ft=ft+Math.imul(un,oo)|0;var jd=(St+(yt=yt+Math.imul(Un,so)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,ao)|0)+Math.imul(tt,so)|0))<<13)|0;St=((ft=ft+Math.imul(tt,ao)|0)+(Ve>>>13)|0)+(jd>>>26)|0,jd&=67108863,yt=Math.imul(cr,$i),Ve=(Ve=Math.imul(cr,Qi))+Math.imul(br,$i)|0,ft=Math.imul(br,Qi),yt=yt+Math.imul(ni,Xi)|0,Ve=(Ve=Ve+Math.imul(ni,qi)|0)+Math.imul(gi,Xi)|0,ft=ft+Math.imul(gi,qi)|0,yt=yt+Math.imul(Ui,eo)|0,Ve=(Ve=Ve+Math.imul(Ui,to)|0)+Math.imul(Ti,eo)|0,ft=ft+Math.imul(Ti,to)|0,yt=yt+Math.imul(Ur,no)|0,Ve=(Ve=Ve+Math.imul(Ur,ro)|0)+Math.imul(Jn,no)|0,ft=ft+Math.imul(Jn,ro)|0,yt=yt+Math.imul(Vn,io)|0,Ve=(Ve=Ve+Math.imul(Vn,oo)|0)+Math.imul(Gn,io)|0,ft=ft+Math.imul(Gn,oo)|0,yt=yt+Math.imul(Qt,so)|0,Ve=(Ve=Ve+Math.imul(Qt,ao)|0)+Math.imul(un,so)|0,ft=ft+Math.imul(un,ao)|0;var sS=(St+(yt=yt+Math.imul(Un,co)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,uo)|0)+Math.imul(tt,co)|0))<<13)|0;St=((ft=ft+Math.imul(tt,uo)|0)+(Ve>>>13)|0)+(sS>>>26)|0,sS&=67108863,yt=Math.imul(kr,$i),Ve=(Ve=Math.imul(kr,Qi))+Math.imul(lr,$i)|0,ft=Math.imul(lr,Qi),yt=yt+Math.imul(cr,Xi)|0,Ve=(Ve=Ve+Math.imul(cr,qi)|0)+Math.imul(br,Xi)|0,ft=ft+Math.imul(br,qi)|0,yt=yt+Math.imul(ni,eo)|0,Ve=(Ve=Ve+Math.imul(ni,to)|0)+Math.imul(gi,eo)|0,ft=ft+Math.imul(gi,to)|0,yt=yt+Math.imul(Ui,no)|0,Ve=(Ve=Ve+Math.imul(Ui,ro)|0)+Math.imul(Ti,no)|0,ft=ft+Math.imul(Ti,ro)|0,yt=yt+Math.imul(Ur,io)|0,Ve=(Ve=Ve+Math.imul(Ur,oo)|0)+Math.imul(Jn,io)|0,ft=ft+Math.imul(Jn,oo)|0,yt=yt+Math.imul(Vn,so)|0,Ve=(Ve=Ve+Math.imul(Vn,ao)|0)+Math.imul(Gn,so)|0,ft=ft+Math.imul(Gn,ao)|0,yt=yt+Math.imul(Qt,co)|0,Ve=(Ve=Ve+Math.imul(Qt,uo)|0)+Math.imul(un,co)|0,ft=ft+Math.imul(un,uo)|0;var aS=(St+(yt=yt+Math.imul(Un,lo)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,fo)|0)+Math.imul(tt,lo)|0))<<13)|0;St=((ft=ft+Math.imul(tt,fo)|0)+(Ve>>>13)|0)+(aS>>>26)|0,aS&=67108863,yt=Math.imul(Ar,$i),Ve=(Ve=Math.imul(Ar,Qi))+Math.imul(mi,$i)|0,ft=Math.imul(mi,Qi),yt=yt+Math.imul(kr,Xi)|0,Ve=(Ve=Ve+Math.imul(kr,qi)|0)+Math.imul(lr,Xi)|0,ft=ft+Math.imul(lr,qi)|0,yt=yt+Math.imul(cr,eo)|0,Ve=(Ve=Ve+Math.imul(cr,to)|0)+Math.imul(br,eo)|0,ft=ft+Math.imul(br,to)|0,yt=yt+Math.imul(ni,no)|0,Ve=(Ve=Ve+Math.imul(ni,ro)|0)+Math.imul(gi,no)|0,ft=ft+Math.imul(gi,ro)|0,yt=yt+Math.imul(Ui,io)|0,Ve=(Ve=Ve+Math.imul(Ui,oo)|0)+Math.imul(Ti,io)|0,ft=ft+Math.imul(Ti,oo)|0,yt=yt+Math.imul(Ur,so)|0,Ve=(Ve=Ve+Math.imul(Ur,ao)|0)+Math.imul(Jn,so)|0,ft=ft+Math.imul(Jn,ao)|0,yt=yt+Math.imul(Vn,co)|0,Ve=(Ve=Ve+Math.imul(Vn,uo)|0)+Math.imul(Gn,co)|0,ft=ft+Math.imul(Gn,uo)|0,yt=yt+Math.imul(Qt,lo)|0,Ve=(Ve=Ve+Math.imul(Qt,fo)|0)+Math.imul(un,lo)|0,ft=ft+Math.imul(un,fo)|0;var cS=(St+(yt=yt+Math.imul(Un,ho)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,po)|0)+Math.imul(tt,ho)|0))<<13)|0;St=((ft=ft+Math.imul(tt,po)|0)+(Ve>>>13)|0)+(cS>>>26)|0,cS&=67108863,yt=Math.imul(Oi,$i),Ve=(Ve=Math.imul(Oi,Qi))+Math.imul(Ni,$i)|0,ft=Math.imul(Ni,Qi),yt=yt+Math.imul(Ar,Xi)|0,Ve=(Ve=Ve+Math.imul(Ar,qi)|0)+Math.imul(mi,Xi)|0,ft=ft+Math.imul(mi,qi)|0,yt=yt+Math.imul(kr,eo)|0,Ve=(Ve=Ve+Math.imul(kr,to)|0)+Math.imul(lr,eo)|0,ft=ft+Math.imul(lr,to)|0,yt=yt+Math.imul(cr,no)|0,Ve=(Ve=Ve+Math.imul(cr,ro)|0)+Math.imul(br,no)|0,ft=ft+Math.imul(br,ro)|0,yt=yt+Math.imul(ni,io)|0,Ve=(Ve=Ve+Math.imul(ni,oo)|0)+Math.imul(gi,io)|0,ft=ft+Math.imul(gi,oo)|0,yt=yt+Math.imul(Ui,so)|0,Ve=(Ve=Ve+Math.imul(Ui,ao)|0)+Math.imul(Ti,so)|0,ft=ft+Math.imul(Ti,ao)|0,yt=yt+Math.imul(Ur,co)|0,Ve=(Ve=Ve+Math.imul(Ur,uo)|0)+Math.imul(Jn,co)|0,ft=ft+Math.imul(Jn,uo)|0,yt=yt+Math.imul(Vn,lo)|0,Ve=(Ve=Ve+Math.imul(Vn,fo)|0)+Math.imul(Gn,lo)|0,ft=ft+Math.imul(Gn,fo)|0,yt=yt+Math.imul(Qt,ho)|0,Ve=(Ve=Ve+Math.imul(Qt,po)|0)+Math.imul(un,ho)|0,ft=ft+Math.imul(un,po)|0;var uS=(St+(yt=yt+Math.imul(Un,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Un,yo)|0)+Math.imul(tt,go)|0))<<13)|0;St=((ft=ft+Math.imul(tt,yo)|0)+(Ve>>>13)|0)+(uS>>>26)|0,uS&=67108863,yt=Math.imul(Oi,Xi),Ve=(Ve=Math.imul(Oi,qi))+Math.imul(Ni,Xi)|0,ft=Math.imul(Ni,qi),yt=yt+Math.imul(Ar,eo)|0,Ve=(Ve=Ve+Math.imul(Ar,to)|0)+Math.imul(mi,eo)|0,ft=ft+Math.imul(mi,to)|0,yt=yt+Math.imul(kr,no)|0,Ve=(Ve=Ve+Math.imul(kr,ro)|0)+Math.imul(lr,no)|0,ft=ft+Math.imul(lr,ro)|0,yt=yt+Math.imul(cr,io)|0,Ve=(Ve=Ve+Math.imul(cr,oo)|0)+Math.imul(br,io)|0,ft=ft+Math.imul(br,oo)|0,yt=yt+Math.imul(ni,so)|0,Ve=(Ve=Ve+Math.imul(ni,ao)|0)+Math.imul(gi,so)|0,ft=ft+Math.imul(gi,ao)|0,yt=yt+Math.imul(Ui,co)|0,Ve=(Ve=Ve+Math.imul(Ui,uo)|0)+Math.imul(Ti,co)|0,ft=ft+Math.imul(Ti,uo)|0,yt=yt+Math.imul(Ur,lo)|0,Ve=(Ve=Ve+Math.imul(Ur,fo)|0)+Math.imul(Jn,lo)|0,ft=ft+Math.imul(Jn,fo)|0,yt=yt+Math.imul(Vn,ho)|0,Ve=(Ve=Ve+Math.imul(Vn,po)|0)+Math.imul(Gn,ho)|0,ft=ft+Math.imul(Gn,po)|0;var lS=(St+(yt=yt+Math.imul(Qt,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Qt,yo)|0)+Math.imul(un,go)|0))<<13)|0;St=((ft=ft+Math.imul(un,yo)|0)+(Ve>>>13)|0)+(lS>>>26)|0,lS&=67108863,yt=Math.imul(Oi,eo),Ve=(Ve=Math.imul(Oi,to))+Math.imul(Ni,eo)|0,ft=Math.imul(Ni,to),yt=yt+Math.imul(Ar,no)|0,Ve=(Ve=Ve+Math.imul(Ar,ro)|0)+Math.imul(mi,no)|0,ft=ft+Math.imul(mi,ro)|0,yt=yt+Math.imul(kr,io)|0,Ve=(Ve=Ve+Math.imul(kr,oo)|0)+Math.imul(lr,io)|0,ft=ft+Math.imul(lr,oo)|0,yt=yt+Math.imul(cr,so)|0,Ve=(Ve=Ve+Math.imul(cr,ao)|0)+Math.imul(br,so)|0,ft=ft+Math.imul(br,ao)|0,yt=yt+Math.imul(ni,co)|0,Ve=(Ve=Ve+Math.imul(ni,uo)|0)+Math.imul(gi,co)|0,ft=ft+Math.imul(gi,uo)|0,yt=yt+Math.imul(Ui,lo)|0,Ve=(Ve=Ve+Math.imul(Ui,fo)|0)+Math.imul(Ti,lo)|0,ft=ft+Math.imul(Ti,fo)|0,yt=yt+Math.imul(Ur,ho)|0,Ve=(Ve=Ve+Math.imul(Ur,po)|0)+Math.imul(Jn,ho)|0,ft=ft+Math.imul(Jn,po)|0;var fS=(St+(yt=yt+Math.imul(Vn,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Vn,yo)|0)+Math.imul(Gn,go)|0))<<13)|0;St=((ft=ft+Math.imul(Gn,yo)|0)+(Ve>>>13)|0)+(fS>>>26)|0,fS&=67108863,yt=Math.imul(Oi,no),Ve=(Ve=Math.imul(Oi,ro))+Math.imul(Ni,no)|0,ft=Math.imul(Ni,ro),yt=yt+Math.imul(Ar,io)|0,Ve=(Ve=Ve+Math.imul(Ar,oo)|0)+Math.imul(mi,io)|0,ft=ft+Math.imul(mi,oo)|0,yt=yt+Math.imul(kr,so)|0,Ve=(Ve=Ve+Math.imul(kr,ao)|0)+Math.imul(lr,so)|0,ft=ft+Math.imul(lr,ao)|0,yt=yt+Math.imul(cr,co)|0,Ve=(Ve=Ve+Math.imul(cr,uo)|0)+Math.imul(br,co)|0,ft=ft+Math.imul(br,uo)|0,yt=yt+Math.imul(ni,lo)|0,Ve=(Ve=Ve+Math.imul(ni,fo)|0)+Math.imul(gi,lo)|0,ft=ft+Math.imul(gi,fo)|0,yt=yt+Math.imul(Ui,ho)|0,Ve=(Ve=Ve+Math.imul(Ui,po)|0)+Math.imul(Ti,ho)|0,ft=ft+Math.imul(Ti,po)|0;var dS=(St+(yt=yt+Math.imul(Ur,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Ur,yo)|0)+Math.imul(Jn,go)|0))<<13)|0;St=((ft=ft+Math.imul(Jn,yo)|0)+(Ve>>>13)|0)+(dS>>>26)|0,dS&=67108863,yt=Math.imul(Oi,io),Ve=(Ve=Math.imul(Oi,oo))+Math.imul(Ni,io)|0,ft=Math.imul(Ni,oo),yt=yt+Math.imul(Ar,so)|0,Ve=(Ve=Ve+Math.imul(Ar,ao)|0)+Math.imul(mi,so)|0,ft=ft+Math.imul(mi,ao)|0,yt=yt+Math.imul(kr,co)|0,Ve=(Ve=Ve+Math.imul(kr,uo)|0)+Math.imul(lr,co)|0,ft=ft+Math.imul(lr,uo)|0,yt=yt+Math.imul(cr,lo)|0,Ve=(Ve=Ve+Math.imul(cr,fo)|0)+Math.imul(br,lo)|0,ft=ft+Math.imul(br,fo)|0,yt=yt+Math.imul(ni,ho)|0,Ve=(Ve=Ve+Math.imul(ni,po)|0)+Math.imul(gi,ho)|0,ft=ft+Math.imul(gi,po)|0;var hS=(St+(yt=yt+Math.imul(Ui,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Ui,yo)|0)+Math.imul(Ti,go)|0))<<13)|0;St=((ft=ft+Math.imul(Ti,yo)|0)+(Ve>>>13)|0)+(hS>>>26)|0,hS&=67108863,yt=Math.imul(Oi,so),Ve=(Ve=Math.imul(Oi,ao))+Math.imul(Ni,so)|0,ft=Math.imul(Ni,ao),yt=yt+Math.imul(Ar,co)|0,Ve=(Ve=Ve+Math.imul(Ar,uo)|0)+Math.imul(mi,co)|0,ft=ft+Math.imul(mi,uo)|0,yt=yt+Math.imul(kr,lo)|0,Ve=(Ve=Ve+Math.imul(kr,fo)|0)+Math.imul(lr,lo)|0,ft=ft+Math.imul(lr,fo)|0,yt=yt+Math.imul(cr,ho)|0,Ve=(Ve=Ve+Math.imul(cr,po)|0)+Math.imul(br,ho)|0,ft=ft+Math.imul(br,po)|0;var pS=(St+(yt=yt+Math.imul(ni,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(ni,yo)|0)+Math.imul(gi,go)|0))<<13)|0;St=((ft=ft+Math.imul(gi,yo)|0)+(Ve>>>13)|0)+(pS>>>26)|0,pS&=67108863,yt=Math.imul(Oi,co),Ve=(Ve=Math.imul(Oi,uo))+Math.imul(Ni,co)|0,ft=Math.imul(Ni,uo),yt=yt+Math.imul(Ar,lo)|0,Ve=(Ve=Ve+Math.imul(Ar,fo)|0)+Math.imul(mi,lo)|0,ft=ft+Math.imul(mi,fo)|0,yt=yt+Math.imul(kr,ho)|0,Ve=(Ve=Ve+Math.imul(kr,po)|0)+Math.imul(lr,ho)|0,ft=ft+Math.imul(lr,po)|0;var gS=(St+(yt=yt+Math.imul(cr,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(cr,yo)|0)+Math.imul(br,go)|0))<<13)|0;St=((ft=ft+Math.imul(br,yo)|0)+(Ve>>>13)|0)+(gS>>>26)|0,gS&=67108863,yt=Math.imul(Oi,lo),Ve=(Ve=Math.imul(Oi,fo))+Math.imul(Ni,lo)|0,ft=Math.imul(Ni,fo),yt=yt+Math.imul(Ar,ho)|0,Ve=(Ve=Ve+Math.imul(Ar,po)|0)+Math.imul(mi,ho)|0,ft=ft+Math.imul(mi,po)|0;var yS=(St+(yt=yt+Math.imul(kr,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(kr,yo)|0)+Math.imul(lr,go)|0))<<13)|0;St=((ft=ft+Math.imul(lr,yo)|0)+(Ve>>>13)|0)+(yS>>>26)|0,yS&=67108863,yt=Math.imul(Oi,ho),Ve=(Ve=Math.imul(Oi,po))+Math.imul(Ni,ho)|0,ft=Math.imul(Ni,po);var mS=(St+(yt=yt+Math.imul(Ar,go)|0)|0)+((8191&(Ve=(Ve=Ve+Math.imul(Ar,yo)|0)+Math.imul(mi,go)|0))<<13)|0;St=((ft=ft+Math.imul(mi,yo)|0)+(Ve>>>13)|0)+(mS>>>26)|0,mS&=67108863;var vS=(St+(yt=Math.imul(Oi,go))|0)+((8191&(Ve=(Ve=Math.imul(Oi,yo))+Math.imul(Ni,go)|0))<<13)|0;return St=((ft=Math.imul(Ni,yo))+(Ve>>>13)|0)+(vS>>>26)|0,vS&=67108863,Mt[0]=Pd,Mt[1]=Rd,Mt[2]=kd,Mt[3]=Ld,Mt[4]=Bd,Mt[5]=jd,Mt[6]=sS,Mt[7]=aS,Mt[8]=cS,Mt[9]=uS,Mt[10]=lS,Mt[11]=fS,Mt[12]=dS,Mt[13]=hS,Mt[14]=pS,Mt[15]=gS,Mt[16]=yS,Mt[17]=mS,Mt[18]=vS,0!==St&&(Mt[19]=St,rt.length++),rt};function ct(Ne,Je,rt){rt.negative=Je.negative^Ne.negative,rt.length=Ne.length+Je.length;for(var lt=0,vt=0,Mt=0;Mt>>26)|0)>>>26,St&=67108863}rt.words[Mt]=yt,lt=St,St=vt}return 0!==lt?rt.words[Mt]=lt:rt.length--,rt._strip()}function wt(Ne,Je,rt){return ct(Ne,Je,rt)}Math.imul||(ht=$e),O.prototype.mulTo=function(Ne,Je){var lt=this.length+Ne.length;return 10===this.length&&10===Ne.length?ht(this,Ne,Je):lt<63?$e(this,Ne,Je):lt<1024?ct(this,Ne,Je):wt(this,Ne,Je)},O.prototype.mul=function(Ne){var Je=new O(null);return Je.words=new Array(this.length+Ne.length),this.mulTo(Ne,Je)},O.prototype.mulf=function(Ne){var Je=new O(null);return Je.words=new Array(this.length+Ne.length),wt(this,Ne,Je)},O.prototype.imul=function(Ne){return this.clone().mulTo(Ne,this)},O.prototype.imuln=function(Ne){var Je=Ne<0;Je&&(Ne=-Ne),a("number"==typeof Ne),a(Ne<67108864);for(var rt=0,lt=0;lt>=26,rt+=vt/67108864|0,rt+=Mt>>>26,this.words[lt]=67108863&Mt}return 0!==rt&&(this.words[lt]=rt,this.length++),Je?this.ineg():this},O.prototype.muln=function(Ne){return this.clone().imuln(Ne)},O.prototype.sqr=function(){return this.mul(this)},O.prototype.isqr=function(){return this.imul(this.clone())},O.prototype.pow=function(Ne){var Je=function We(Ne){for(var Je=new Array(Ne.bitLength()),rt=0;rt>>vt&1}return Je}(Ne);if(0===Je.length)return new O(1);for(var rt=this,lt=0;lt=0);var vt,Je=Ne%26,rt=(Ne-Je)/26,lt=67108863>>>26-Je<<26-Je;if(0!==Je){var Mt=0;for(vt=0;vt>>26-Je}Mt&&(this.words[vt]=Mt,this.length++)}if(0!==rt){for(vt=this.length-1;vt>=0;vt--)this.words[vt+rt]=this.words[vt];for(vt=0;vt=0),lt=Je?(Je-Je%26)/26:0;var vt=Ne%26,Mt=Math.min((Ne-vt)/26,this.length),St=67108863^67108863>>>vt<Mt)for(this.length-=Mt,Ve=0;Ve=0&&(0!==ft||Ve>=lt);Ve--){var er=0|this.words[Ve];this.words[Ve]=ft<<26-vt|er>>>vt,ft=er&St}return yt&&0!==ft&&(yt.words[yt.length++]=ft),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},O.prototype.ishrn=function(Ne,Je,rt){return a(0===this.negative),this.iushrn(Ne,Je,rt)},O.prototype.shln=function(Ne){return this.clone().ishln(Ne)},O.prototype.ushln=function(Ne){return this.clone().iushln(Ne)},O.prototype.shrn=function(Ne){return this.clone().ishrn(Ne)},O.prototype.ushrn=function(Ne){return this.clone().iushrn(Ne)},O.prototype.testn=function(Ne){a("number"==typeof Ne&&Ne>=0);var Je=Ne%26,rt=(Ne-Je)/26,lt=1<=0);var Je=Ne%26,rt=(Ne-Je)/26;if(a(0===this.negative,"imaskn works only with positive numbers"),this.length<=rt)return this;if(0!==Je&&rt++,this.length=Math.min(rt,this.length),0!==Je){var lt=67108863^67108863>>>Je<=67108864;Je++)this.words[Je]-=67108864,Je===this.length-1?this.words[Je+1]=1:this.words[Je+1]++;return this.length=Math.max(this.length,Je+1),this},O.prototype.isubn=function(Ne){if(a("number"==typeof Ne),a(Ne<67108864),Ne<0)return this.iaddn(-Ne);if(0!==this.negative)return this.negative=0,this.iaddn(Ne),this.negative=1,this;if(this.words[0]-=Ne,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var Je=0;Je>26)-(yt/67108864|0),this.words[vt+rt]=67108863&Mt}for(;vt>26,this.words[vt+rt]=67108863&Mt;if(0===St)return this._strip();for(a(-1===St),St=0,vt=0;vt>26,this.words[vt]=67108863&Mt;return this.negative=1,this._strip()},O.prototype._wordDiv=function(Ne,Je){var rt=(this.length,Ne.length),lt=this.clone(),vt=Ne,Mt=0|vt.words[vt.length-1];0!==(rt=26-this._countBits(Mt))&&(vt=vt.ushln(rt),lt.iushln(rt),Mt=0|vt.words[vt.length-1]);var Ve,yt=lt.length-vt.length;if("mod"!==Je){(Ve=new O(null)).length=yt+1,Ve.words=new Array(Ve.length);for(var ft=0;ft=0;Un--){var tt=67108864*(0|lt.words[vt.length+Un])+(0|lt.words[vt.length+Un-1]);for(tt=Math.min(tt/Mt|0,67108863),lt._ishlnsubmul(vt,tt,Un);0!==lt.negative;)tt--,lt.negative=0,lt._ishlnsubmul(vt,1,Un),lt.isZero()||(lt.negative^=1);Ve&&(Ve.words[Un]=tt)}return Ve&&Ve._strip(),lt._strip(),"div"!==Je&&0!==rt&<.iushrn(rt),{div:Ve||null,mod:lt}},O.prototype.divmod=function(Ne,Je,rt){return a(!Ne.isZero()),this.isZero()?{div:new O(0),mod:new O(0)}:0!==this.negative&&0===Ne.negative?(Mt=this.neg().divmod(Ne,Je),"mod"!==Je&&(lt=Mt.div.neg()),"div"!==Je&&(vt=Mt.mod.neg(),rt&&0!==vt.negative&&vt.iadd(Ne)),{div:lt,mod:vt}):0===this.negative&&0!==Ne.negative?(Mt=this.divmod(Ne.neg(),Je),"mod"!==Je&&(lt=Mt.div.neg()),{div:lt,mod:Mt.mod}):this.negative&Ne.negative?(Mt=this.neg().divmod(Ne.neg(),Je),"div"!==Je&&(vt=Mt.mod.neg(),rt&&0!==vt.negative&&vt.isub(Ne)),{div:Mt.div,mod:vt}):Ne.length>this.length||this.cmp(Ne)<0?{div:new O(0),mod:this}:1===Ne.length?"div"===Je?{div:this.divn(Ne.words[0]),mod:null}:"mod"===Je?{div:null,mod:new O(this.modrn(Ne.words[0]))}:{div:this.divn(Ne.words[0]),mod:new O(this.modrn(Ne.words[0]))}:this._wordDiv(Ne,Je);var lt,vt,Mt},O.prototype.div=function(Ne){return this.divmod(Ne,"div",!1).div},O.prototype.mod=function(Ne){return this.divmod(Ne,"mod",!1).mod},O.prototype.umod=function(Ne){return this.divmod(Ne,"mod",!0).mod},O.prototype.divRound=function(Ne){var Je=this.divmod(Ne);if(Je.mod.isZero())return Je.div;var rt=0!==Je.div.negative?Je.mod.isub(Ne):Je.mod,lt=Ne.ushrn(1),vt=Ne.andln(1),Mt=rt.cmp(lt);return Mt<0||1===vt&&0===Mt?Je.div:0!==Je.div.negative?Je.div.isubn(1):Je.div.iaddn(1)},O.prototype.modrn=function(Ne){var Je=Ne<0;Je&&(Ne=-Ne),a(Ne<=67108863);for(var rt=(1<<26)%Ne,lt=0,vt=this.length-1;vt>=0;vt--)lt=(rt*lt+(0|this.words[vt]))%Ne;return Je?-lt:lt},O.prototype.modn=function(Ne){return this.modrn(Ne)},O.prototype.idivn=function(Ne){var Je=Ne<0;Je&&(Ne=-Ne),a(Ne<=67108863);for(var rt=0,lt=this.length-1;lt>=0;lt--){var vt=(0|this.words[lt])+67108864*rt;this.words[lt]=vt/Ne|0,rt=vt%Ne}return this._strip(),Je?this.ineg():this},O.prototype.divn=function(Ne){return this.clone().idivn(Ne)},O.prototype.egcd=function(Ne){a(0===Ne.negative),a(!Ne.isZero());var Je=this,rt=Ne.clone();Je=0!==Je.negative?Je.umod(Ne):Je.clone();for(var lt=new O(1),vt=new O(0),Mt=new O(0),St=new O(1),yt=0;Je.isEven()&&rt.isEven();)Je.iushrn(1),rt.iushrn(1),++yt;for(var Ve=rt.clone(),ft=Je.clone();!Je.isZero();){for(var er=0,Un=1;!(Je.words[0]&Un)&&er<26;++er,Un<<=1);if(er>0)for(Je.iushrn(er);er-- >0;)(lt.isOdd()||vt.isOdd())&&(lt.iadd(Ve),vt.isub(ft)),lt.iushrn(1),vt.iushrn(1);for(var tt=0,tn=1;!(rt.words[0]&tn)&&tt<26;++tt,tn<<=1);if(tt>0)for(rt.iushrn(tt);tt-- >0;)(Mt.isOdd()||St.isOdd())&&(Mt.iadd(Ve),St.isub(ft)),Mt.iushrn(1),St.iushrn(1);Je.cmp(rt)>=0?(Je.isub(rt),lt.isub(Mt),vt.isub(St)):(rt.isub(Je),Mt.isub(lt),St.isub(vt))}return{a:Mt,b:St,gcd:rt.iushln(yt)}},O.prototype._invmp=function(Ne){a(0===Ne.negative),a(!Ne.isZero());var er,Je=this,rt=Ne.clone();Je=0!==Je.negative?Je.umod(Ne):Je.clone();for(var lt=new O(1),vt=new O(0),Mt=rt.clone();Je.cmpn(1)>0&&rt.cmpn(1)>0;){for(var St=0,yt=1;!(Je.words[0]&yt)&&St<26;++St,yt<<=1);if(St>0)for(Je.iushrn(St);St-- >0;)lt.isOdd()&<.iadd(Mt),lt.iushrn(1);for(var Ve=0,ft=1;!(rt.words[0]&ft)&&Ve<26;++Ve,ft<<=1);if(Ve>0)for(rt.iushrn(Ve);Ve-- >0;)vt.isOdd()&&vt.iadd(Mt),vt.iushrn(1);Je.cmp(rt)>=0?(Je.isub(rt),lt.isub(vt)):(rt.isub(Je),vt.isub(lt))}return(er=0===Je.cmpn(1)?lt:vt).cmpn(0)<0&&er.iadd(Ne),er},O.prototype.gcd=function(Ne){if(this.isZero())return Ne.abs();if(Ne.isZero())return this.abs();var Je=this.clone(),rt=Ne.clone();Je.negative=0,rt.negative=0;for(var lt=0;Je.isEven()&&rt.isEven();lt++)Je.iushrn(1),rt.iushrn(1);for(;;){for(;Je.isEven();)Je.iushrn(1);for(;rt.isEven();)rt.iushrn(1);var vt=Je.cmp(rt);if(vt<0){var Mt=Je;Je=rt,rt=Mt}else if(0===vt||0===rt.cmpn(1))break;Je.isub(rt)}return rt.iushln(lt)},O.prototype.invm=function(Ne){return this.egcd(Ne).a.umod(Ne)},O.prototype.isEven=function(){return 0==(1&this.words[0])},O.prototype.isOdd=function(){return 1==(1&this.words[0])},O.prototype.andln=function(Ne){return this.words[0]&Ne},O.prototype.bincn=function(Ne){a("number"==typeof Ne);var Je=Ne%26,rt=(Ne-Je)/26,lt=1<>>26,St&=67108863,this.words[Mt]=St}return 0!==vt&&(this.words[Mt]=vt,this.length++),this},O.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},O.prototype.cmpn=function(Ne){var rt,Je=Ne<0;if(0!==this.negative&&!Je)return-1;if(0===this.negative&&Je)return 1;if(this._strip(),this.length>1)rt=1;else{Je&&(Ne=-Ne),a(Ne<=67108863,"Number is too big");var lt=0|this.words[0];rt=lt===Ne?0:ltNe.length)return 1;if(this.length=0;rt--){var lt=0|this.words[rt],vt=0|Ne.words[rt];if(lt!==vt){ltvt&&(Je=1);break}}return Je},O.prototype.gtn=function(Ne){return 1===this.cmpn(Ne)},O.prototype.gt=function(Ne){return 1===this.cmp(Ne)},O.prototype.gten=function(Ne){return this.cmpn(Ne)>=0},O.prototype.gte=function(Ne){return this.cmp(Ne)>=0},O.prototype.ltn=function(Ne){return-1===this.cmpn(Ne)},O.prototype.lt=function(Ne){return-1===this.cmp(Ne)},O.prototype.lten=function(Ne){return this.cmpn(Ne)<=0},O.prototype.lte=function(Ne){return this.cmp(Ne)<=0},O.prototype.eqn=function(Ne){return 0===this.cmpn(Ne)},O.prototype.eq=function(Ne){return 0===this.cmp(Ne)},O.red=function(Ne){return new Pn(Ne)},O.prototype.toRed=function(Ne){return a(!this.red,"Already a number in reduction context"),a(0===this.negative,"red works only with positives"),Ne.convertTo(this)._forceRed(Ne)},O.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},O.prototype._forceRed=function(Ne){return this.red=Ne,this},O.prototype.forceRed=function(Ne){return a(!this.red,"Already a number in reduction context"),this._forceRed(Ne)},O.prototype.redAdd=function(Ne){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,Ne)},O.prototype.redIAdd=function(Ne){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,Ne)},O.prototype.redSub=function(Ne){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,Ne)},O.prototype.redISub=function(Ne){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,Ne)},O.prototype.redShl=function(Ne){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,Ne)},O.prototype.redMul=function(Ne){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ne),this.red.mul(this,Ne)},O.prototype.redIMul=function(Ne){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,Ne),this.red.imul(this,Ne)},O.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},O.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},O.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},O.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},O.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},O.prototype.redPow=function(Ne){return a(this.red&&!Ne.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,Ne)};var zt={k256:null,p224:null,p192:null,p25519:null};function Zt(Ne,Je){this.name=Ne,this.p=new O(Je,16),this.n=this.p.bitLength(),this.k=new O(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function En(){Zt.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Yt(){Zt.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Xt(){Zt.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function xn(){Zt.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Pn(Ne){if("string"==typeof Ne){var Je=O._prime(Ne);this.m=Je.p,this.prime=Je}else a(Ne.gtn(1),"modulus must be greater than 1"),this.m=Ne,this.prime=null}function Ln(Ne){Pn.call(this,Ne),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)}Zt.prototype._tmp=function(){var Ne=new O(null);return Ne.words=new Array(Math.ceil(this.n/13)),Ne},Zt.prototype.ireduce=function(Ne){var rt,Je=Ne;do{this.split(Je,this.tmp),rt=(Je=(Je=this.imulK(Je)).iadd(this.tmp)).bitLength()}while(rt>this.n);var lt=rt0?Je.isub(this.p):void 0!==Je.strip?Je.strip():Je._strip(),Je},Zt.prototype.split=function(Ne,Je){Ne.iushrn(this.n,0,Je)},Zt.prototype.imulK=function(Ne){return Ne.imul(this.k)},A(En,Zt),En.prototype.split=function(Ne,Je){for(var lt=Math.min(Ne.length,9),vt=0;vt>>22,Mt=St}Mt>>>=22,Ne.words[vt-10]=Mt,0===Mt&&Ne.length>10?Ne.length-=10:Ne.length-=9},En.prototype.imulK=function(Ne){Ne.words[Ne.length]=0,Ne.words[Ne.length+1]=0,Ne.length+=2;for(var Je=0,rt=0;rt>>=26,Ne.words[rt]=vt,Je=lt}return 0!==Je&&(Ne.words[Ne.length++]=Je),Ne},O._prime=function(Ne){if(zt[Ne])return zt[Ne];var Je;if("k256"===Ne)Je=new En;else if("p224"===Ne)Je=new Yt;else if("p192"===Ne)Je=new Xt;else{if("p25519"!==Ne)throw new Error("Unknown prime "+Ne);Je=new xn}return zt[Ne]=Je,Je},Pn.prototype._verify1=function(Ne){a(0===Ne.negative,"red works only with positives"),a(Ne.red,"red works only with red numbers")},Pn.prototype._verify2=function(Ne,Je){a(0==(Ne.negative|Je.negative),"red works only with positives"),a(Ne.red&&Ne.red===Je.red,"red works only with red numbers")},Pn.prototype.imod=function(Ne){return this.prime?this.prime.ireduce(Ne)._forceRed(this):(de(Ne,Ne.umod(this.m)._forceRed(this)),Ne)},Pn.prototype.neg=function(Ne){return Ne.isZero()?Ne.clone():this.m.sub(Ne)._forceRed(this)},Pn.prototype.add=function(Ne,Je){this._verify2(Ne,Je);var rt=Ne.add(Je);return rt.cmp(this.m)>=0&&rt.isub(this.m),rt._forceRed(this)},Pn.prototype.iadd=function(Ne,Je){this._verify2(Ne,Je);var rt=Ne.iadd(Je);return rt.cmp(this.m)>=0&&rt.isub(this.m),rt},Pn.prototype.sub=function(Ne,Je){this._verify2(Ne,Je);var rt=Ne.sub(Je);return rt.cmpn(0)<0&&rt.iadd(this.m),rt._forceRed(this)},Pn.prototype.isub=function(Ne,Je){this._verify2(Ne,Je);var rt=Ne.isub(Je);return rt.cmpn(0)<0&&rt.iadd(this.m),rt},Pn.prototype.shl=function(Ne,Je){return this._verify1(Ne),this.imod(Ne.ushln(Je))},Pn.prototype.imul=function(Ne,Je){return this._verify2(Ne,Je),this.imod(Ne.imul(Je))},Pn.prototype.mul=function(Ne,Je){return this._verify2(Ne,Je),this.imod(Ne.mul(Je))},Pn.prototype.isqr=function(Ne){return this.imul(Ne,Ne.clone())},Pn.prototype.sqr=function(Ne){return this.mul(Ne,Ne)},Pn.prototype.sqrt=function(Ne){if(Ne.isZero())return Ne.clone();var Je=this.m.andln(3);if(a(Je%2==1),3===Je){var rt=this.m.add(new O(1)).iushrn(2);return this.pow(Ne,rt)}for(var lt=this.m.subn(1),vt=0;!lt.isZero()&&0===lt.andln(1);)vt++,lt.iushrn(1);a(!lt.isZero());var Mt=new O(1).toRed(this),St=Mt.redNeg(),yt=this.m.subn(1).iushrn(1),Ve=this.m.bitLength();for(Ve=new O(2*Ve*Ve).toRed(this);0!==this.pow(Ve,yt).cmp(St);)Ve.redIAdd(St);for(var ft=this.pow(Ve,lt),er=this.pow(Ne,lt.addn(1).iushrn(1)),Un=this.pow(Ne,lt),tt=vt;0!==Un.cmp(Mt);){for(var tn=Un,Qt=0;0!==tn.cmp(Mt);Qt++)tn=tn.redSqr();a(Qt=0;vt--){for(var ft=Je.words[vt],er=Ve-1;er>=0;er--){var Un=ft>>er&1;(Mt!==lt[0]&&(Mt=this.sqr(Mt)),0!==Un||0!==St)?(St<<=1,St|=Un,(4===++yt||0===vt&&0===er)&&(Mt=this.mul(Mt,lt[St]),yt=0,St=0)):yt=0}Ve=26}return Mt},Pn.prototype.convertTo=function(Ne){var Je=Ne.umod(this.m);return Je===Ne?Je.clone():Je},Pn.prototype.convertFrom=function(Ne){var Je=Ne.clone();return Je.red=null,Je},O.mont=function(Ne){return new Ln(Ne)},A(Ln,Pn),Ln.prototype.convertTo=function(Ne){return this.imod(Ne.ushln(this.shift))},Ln.prototype.convertFrom=function(Ne){var Je=this.imod(Ne.mul(this.rinv));return Je.red=null,Je},Ln.prototype.imul=function(Ne,Je){if(Ne.isZero()||Je.isZero())return Ne.words[0]=0,Ne.length=1,Ne;var rt=Ne.imul(Je),lt=rt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),vt=rt.isub(lt).iushrn(this.shift),Mt=vt;return vt.cmp(this.m)>=0?Mt=vt.isub(this.m):vt.cmpn(0)<0&&(Mt=vt.iadd(this.m)),Mt._forceRed(this)},Ln.prototype.mul=function(Ne,Je){if(Ne.isZero()||Je.isZero())return new O(0)._forceRed(this);var rt=Ne.mul(Je),lt=rt.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),vt=rt.isub(lt).iushrn(this.shift),Mt=vt;return vt.cmp(this.m)>=0?Mt=vt.isub(this.m):vt.cmpn(0)<0&&(Mt=vt.iadd(this.m)),Mt._forceRed(this)},Ln.prototype.invm=function(Ne){return this.imod(Ne._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,aD)}(vD);var Wr=vD.exports;const bD="bignumber/5.7.0";var Yw=Wr.BN;const uf=new $r(bD),L_={},wD=9007199254740991;let ED=!1;class Gi{constructor(e,r){e!==L_&&uf.throwError("cannot call constructor directly; use BigNumber.from",$r.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return za(ii(this).fromTwos(e))}toTwos(e){return za(ii(this).toTwos(e))}abs(){return"-"===this._hex[0]?Gi.from(this._hex.substring(1)):this}add(e){return za(ii(this).add(ii(e)))}sub(e){return za(ii(this).sub(ii(e)))}div(e){return Gi.from(e).isZero()&&Bc("division-by-zero","div"),za(ii(this).div(ii(e)))}mul(e){return za(ii(this).mul(ii(e)))}mod(e){const r=ii(e);return r.isNeg()&&Bc("division-by-zero","mod"),za(ii(this).umod(r))}pow(e){const r=ii(e);return r.isNeg()&&Bc("negative-power","pow"),za(ii(this).pow(r))}and(e){const r=ii(e);return(this.isNegative()||r.isNeg())&&Bc("unbound-bitwise-result","and"),za(ii(this).and(r))}or(e){const r=ii(e);return(this.isNegative()||r.isNeg())&&Bc("unbound-bitwise-result","or"),za(ii(this).or(r))}xor(e){const r=ii(e);return(this.isNegative()||r.isNeg())&&Bc("unbound-bitwise-result","xor"),za(ii(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Bc("negative-width","mask"),za(ii(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Bc("negative-width","shl"),za(ii(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Bc("negative-width","shr"),za(ii(this).shrn(e))}eq(e){return ii(this).eq(ii(e))}lt(e){return ii(this).lt(ii(e))}lte(e){return ii(this).lte(ii(e))}gt(e){return ii(this).gt(ii(e))}gte(e){return ii(this).gte(ii(e))}isNegative(){return"-"===this._hex[0]}isZero(){return ii(this).isZero()}toNumber(){try{return ii(this).toNumber()}catch{Bc("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return uf.throwError("this platform does not support BigInt",$r.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?ED||(ED=!0,uf.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?uf.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",$r.errors.UNEXPECTED_ARGUMENT,{}):uf.throwError("BigNumber.toString does not accept parameters",$r.errors.UNEXPECTED_ARGUMENT,{})),ii(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Gi)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new Gi(L_,Wv(e)):e.match(/^-?[0-9]+$/)?new Gi(L_,Wv(new Yw(e))):uf.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Bc("underflow","BigNumber.from",e),(e>=wD||e<=-wD)&&Bc("overflow","BigNumber.from",e),Gi.from(String(e));const r=e;if("bigint"==typeof r)return Gi.from(r.toString());if(Ug(r))return Gi.from(ba(r));if(r)if(r.toHexString){const a=r.toHexString();if("string"==typeof a)return Gi.from(a)}else{let a=r._hex;if(null==a&&"BigNumber"===r.type&&(a=r.hex),"string"==typeof a&&(fc(a)||"-"===a[0]&&fc(a.substring(1))))return Gi.from(a)}return uf.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function Wv(t){if("string"!=typeof t)return Wv(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&uf.throwArgumentError("invalid hex","value",t),"0x00"===(t=Wv(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function za(t){return Gi.from(Wv(t))}function ii(t){const e=Gi.from(t).toHexString();return"-"===e[0]?new Yw("-"+e.substring(3),16):new Yw(e.substring(2),16)}function Bc(t,e,r){const a={fault:t,operation:e};return null!=r&&(a.value=r),uf.throwError(t,$r.errors.NUMERIC_FAULT,a)}const wa=new $r(bD),Gv={},AD=Gi.from(0),_D=Gi.from(-1);function SD(t,e,r,a){const A={fault:e,operation:r};return void 0!==a&&(A.value=a),wa.throwError(t,$r.errors.NUMERIC_FAULT,A)}let Zv="0";for(;Zv.length<256;)Zv+=Zv;function B_(t){if("number"!=typeof t)try{t=Gi.from(t).toNumber()}catch{}return"number"==typeof t&&t>=0&&t<=256&&!(t%1)?"1"+Zv.substring(0,t):wa.throwArgumentError("invalid decimal size","decimals",t)}function j_(t,e){null==e&&(e=0);const r=B_(e),a=(t=Gi.from(t)).lt(AD);a&&(t=t.mul(_D));let A=t.mod(r).toString();for(;A.length2&&wa.throwArgumentError("too many decimal points","value",t);let O=A[0],J=A[1];for(O||(O="0"),J||(J="0");"0"===J[J.length-1];)J=J.substring(0,J.length-1);for(J.length>r.length-1&&SD("fractional component exceeds decimals","underflow","parseFixed"),""===J&&(J="0");J.lengthnull==e[J]?ie:(typeof e[J]!==ee&&wa.throwArgumentError("invalid fixed format ("+J+" not "+ee+")","format."+J,e[J]),e[J]);r=O("signed","boolean",r),a=O("width","number",a),A=O("decimals","number",A)}return a%8&&wa.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),A>80&&wa.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",A),new Kg(Gv,r,a,A)}}class Ts{constructor(e,r,a,A){e!==Gv&&wa.throwError("cannot use FixedNumber constructor; use FixedNumber.from",$r.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=A,this._hex=r,this._value=a,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&wa.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=lf(this._value,this.format.decimals),a=lf(e._value,e.format.decimals);return Ts.fromValue(r.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=lf(this._value,this.format.decimals),a=lf(e._value,e.format.decimals);return Ts.fromValue(r.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=lf(this._value,this.format.decimals),a=lf(e._value,e.format.decimals);return Ts.fromValue(r.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=lf(this._value,this.format.decimals),a=lf(e._value,e.format.decimals);return Ts.fromValue(r.mul(this.format._multiplier).div(a),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let r=Ts.from(e[0],this.format);const a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(r=r.subUnsafe(xD.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let r=Ts.from(e[0],this.format);const a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(r=r.addUnsafe(xD.toFormat(r.format))),r}round(e){null==e&&(e=0);const r=this.toString().split(".");if(1===r.length&&r.push("0"),(e<0||e>80||e%1)&&wa.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const a=Ts.from("1"+Zv.substring(0,e),this.format),A=t$.toFormat(this.format);return this.mulUnsafe(a).addUnsafe(A).floor().divUnsafe(a)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&wa.throwArgumentError("invalid byte width","width",e);return el(Gi.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString(),e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Ts.fromString(this._value,e)}static fromValue(e,r,a){return null==a&&null!=r&&!function qY(t){return null!=t&&(Gi.isBigNumber(t)||"number"==typeof t&&t%1==0||"string"==typeof t&&!!t.match(/^-?[0-9]+$/)||fc(t)||"bigint"==typeof t||Ug(t))}(r)&&(a=r,r=null),null==r&&(r=0),null==a&&(a="fixed"),Ts.fromString(j_(e,r),Kg.from(a))}static fromString(e,r){null==r&&(r="fixed");const a=Kg.from(r),A=lf(e,a.decimals);!a.signed&&A.lt(AD)&&SD("unsigned value cannot be negative","overflow","value",e);let O=null;a.signed?O=A.toTwos(a.width).toHexString():(O=A.toHexString(),O=el(O,a.width/8));const J=j_(A,a.decimals);return new Ts(Gv,O,J,a)}static fromBytes(e,r){null==r&&(r="fixed");const a=Kg.from(r);if(Bo(e).length>a.width/8)throw new Error("overflow");let A=Gi.from(e);a.signed&&(A=A.fromTwos(a.width));const O=A.toTwos((a.signed?0:1)+a.width).toHexString(),J=j_(A,a.decimals);return new Ts(Gv,O,J,a)}static from(e,r){if("string"==typeof e)return Ts.fromString(e,r);if(Ug(e))return Ts.fromBytes(e,r);try{return Ts.fromValue(e,0,r)}catch(a){if(a.code!==$r.errors.INVALID_ARGUMENT)throw a}return wa.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const xD=Ts.from(1),t$=Ts.from("0.5"),MD=new $r("strings/5.7.0");var $w,zg;function ID(t,e,r,a,A){if(t===zg.BAD_PREFIX||t===zg.UNEXPECTED_CONTINUE){let O=0;for(let J=e+1;J>6==2;J++)O++;return O}return t===zg.OVERRUN?r.length-e-1:0}function F_(t,e=$w.current){e!=$w.current&&(MD.checkNormalize(),t=t.normalize(e));let r=[];for(let a=0;a>6|192),r.push(63&A|128);else if(55296==(64512&A)){a++;const O=t.charCodeAt(a);if(a>=t.length||56320!=(64512&O))throw new Error("invalid utf-8 string");const J=65536+((1023&A)<<10)+(1023&O);r.push(J>>18|240),r.push(J>>12&63|128),r.push(J>>6&63|128),r.push(63&J|128)}else r.push(A>>12|224),r.push(A>>6&63|128),r.push(63&A|128)}return Bo(r)}function U_(t,e){e||(e=function(A){return[parseInt(A,16)]});let r=0,a={};return t.split(",").forEach(A=>{let O=A.split(":");r+=parseInt(O[0],16),a[r]=e(O[1])}),a}function CD(t){let e=0;return t.split(",").map(r=>{let a=r.split("-");1===a.length?a[1]="0":""===a[1]&&(a[1]="1");let A=e+parseInt(a[0],16);return e=parseInt(a[1],16),{l:A,h:e}})}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}($w||($w={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(zg||(zg={})),Object.freeze({error:function r$(t,e,r,a,A){return MD.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:ID,replace:function i$(t,e,r,a,A){return t===zg.OVERLONG?(a.push(A),0):(a.push(65533),ID(t,e,r))}}),CD("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),"ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),U_("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),U_("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),U_("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function o$(t){if(t.length%4!=0)throw new Error("bad data");let e=[];for(let r=0;r0&&Array.isArray(ee)?A(ee,J-1):r.push(ee)})};return A(t,e),r}function l$(t){return function u$(t){let e=0;return()=>t[e++]}(function c$(t){let e=0;function r(){return t[e++]<<8|t[e++]}let a=r(),A=1,O=[0,1];for(let zt=1;zt>--ie&1}const Ee=Math.pow(2,31),Ce=Ee>>>1,Ie=Ce>>1,Ue=Ee-1;let We=0;for(let zt=0;zt<31;zt++)We=We<<1|de();let $e=[],ht=0,ct=Ee;for(;;){let zt=Math.floor(((We-ht+1)*A-1)/ct),Zt=0,En=a;for(;En-Zt>1;){let xn=Zt+En>>>1;zt>>1|de(),Yt=Yt<<1^Ce,Xt=(Xt^Ce)<<1|Ce|1;ht=Yt,ct=1+Xt-Yt}let wt=a-4;return $e.map(zt=>{switch(zt-wt){case 3:return wt+65792+(t[ee++]<<16|t[ee++]<<8|t[ee++]);case 2:return wt+256+(t[ee++]<<8|t[ee++]);case 1:return wt+t[ee++];default:return zt-1}})}(t))}function f$(t){return 1&t?~t>>1:t>>1}function OD(t,e){let r=Array(t);for(let a=0,A=-1;ae[J]):r}function ND(t,e,r){let a=Array(t).fill(void 0).map(()=>[]);for(let A=0;Aa[J].push(O));return a}function y$(t,e){let r=1+e(),a=e(),A=function g$(t){let e=[];for(;;){let r=t();if(0==r)break;e.push(r)}return e}(e);return TD(ND(A.length,1+t,e).map((J,ee)=>{const ie=J[0],oe=J.slice(1);return Array(A[ee]).fill(void 0).map((de,be)=>{let Ee=be*a;return[ie+be*r,oe.map(Ce=>Ce+Ee)]})}))}function m$(t,e){return ND(1+e(),1+t,e).map(a=>[a[0],a.slice(1)])}const Xw=function b$(){return l$(function s$(t){t=atob(t);const e=[];for(let r=0;ra-A);return function r(){let a=[];for(;;){let oe=Qw(t,e);if(0==oe.length)break;a.push({set:new Set(oe),node:r()})}a.sort((oe,de)=>de.set.size-oe.set.size);let A=t(),O=A%3;A=A/3|0;let J=!!(1&A);return A>>=1,{branches:a,valid:O,fe0f:J,save:1==A,check:2==A}}()}(Xw),new $r(DD),new Uint8Array(32).fill(0);const w$="\x19Ethereum Signed Message:\n";function PD(t){return"string"==typeof t&&(t=F_(t)),k_(function ZY(t){const e=t.map(A=>Bo(A)),r=e.reduce((A,O)=>A+O.length,0),a=new Uint8Array(r);return e.reduce((A,O)=>(a.set(O,A),A+O.length),0),Fg(a)}([F_(w$),F_(String(t.length)),t]))}new $r("rlp/5.7.0");const Jv=new $r("address/5.7.0");function RD(t){fc(t,20)||Jv.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let A=0;A<40;A++)r[A]=e[A].charCodeAt(0);const a=Bo(k_(r));for(let A=0;A<40;A+=2)a[A>>1]>>4>=8&&(e[A]=e[A].toUpperCase()),(15&a[A>>1])>=8&&(e[A+1]=e[A+1].toUpperCase());return"0x"+e.join("")}const K_={};for(let t=0;t<10;t++)K_[String(t)]=String(t);for(let t=0;t<26;t++)K_[String.fromCharCode(65+t)]=String(10+t);const kD=Math.floor(function S$(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function M$(t){let e=null;if("string"!=typeof t&&Jv.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=RD(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Jv.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==function x$(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(a=>K_[a]).join("");for(;e.length>=kD;){let a=e.substring(0,kD);e=parseInt(a,10)%97+e.substring(a.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}(t)&&Jv.throwArgumentError("bad icap checksum","address",t),e=function e$(t){return new Yw(t,36).toString(16)}(t.substring(4));e.length<40;)e="0"+e;e=RD("0x"+e)}else Jv.throwArgumentError("invalid address","address",t);return e}function Yv(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}new $r("properties/5.7.0"),new $r(DD),new Uint8Array(32).fill(0),Gi.from(-1);const C$=Gi.from(0),D$=Gi.from(1);Gi.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),el(D$.toHexString(),32),el(C$.toHexString(),32);var tl={},oi={},$v=LD;function LD(t,e){if(!t)throw new Error(e||"Assertion failed")}LD.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)};var z_={exports:{}};"function"==typeof Object.create?z_.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:z_.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}};var T$=$v,O$=z_.exports;function N$(t,e){return!(55296!=(64512&t.charCodeAt(e))||e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function BD(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function jD(t){return 1===t.length?"0"+t:t}function FD(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}oi.inherits=O$,oi.toArray=function P$(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),A=0;A>6|192,r[a++]=63&O|128):N$(t,A)?(O=65536+((1023&O)<<10)+(1023&t.charCodeAt(++A)),r[a++]=O>>18|240,r[a++]=O>>12&63|128,r[a++]=O>>6&63|128,r[a++]=63&O|128):(r[a++]=O>>12|224,r[a++]=O>>6&63|128,r[a++]=63&O|128)}else for(A=0;A>>0}return O},oi.split32=function B$(t,e){for(var r=new Array(4*t.length),a=0,A=0;a>>24,r[A+1]=O>>>16&255,r[A+2]=O>>>8&255,r[A+3]=255&O):(r[A+3]=O>>>24,r[A+2]=O>>>16&255,r[A+1]=O>>>8&255,r[A]=255&O)}return r},oi.rotr32=function j$(t,e){return t>>>e|t<<32-e},oi.rotl32=function F$(t,e){return t<>>32-e},oi.sum32=function U$(t,e){return t+e>>>0},oi.sum32_3=function K$(t,e,r){return t+e+r>>>0},oi.sum32_4=function z$(t,e,r,a){return t+e+r+a>>>0},oi.sum32_5=function V$(t,e,r,a,A){return t+e+r+a+A>>>0},oi.sum64=function H$(t,e,r,a){var A=t[e],J=a+t[e+1]>>>0,ee=(J>>0,t[e+1]=J},oi.sum64_hi=function W$(t,e,r,a){return(e+a>>>0>>0},oi.sum64_lo=function G$(t,e,r,a){return e+a>>>0},oi.sum64_4_hi=function Z$(t,e,r,a,A,O,J,ee){var ie=0,oe=e;return ie+=(oe=oe+a>>>0)>>0)>>0)>>0},oi.sum64_4_lo=function J$(t,e,r,a,A,O,J,ee){return e+a+O+ee>>>0},oi.sum64_5_hi=function Y$(t,e,r,a,A,O,J,ee,ie,oe){var de=0,be=e;return de+=(be=be+a>>>0)>>0)>>0)>>0)>>0},oi.sum64_5_lo=function $$(t,e,r,a,A,O,J,ee,ie,oe){return e+a+O+ee+oe>>>0},oi.rotr64_hi=function Q$(t,e,r){return(e<<32-r|t>>>r)>>>0},oi.rotr64_lo=function X$(t,e,r){return(t<<32-r|e>>>r)>>>0},oi.shr64_hi=function q$(t,e,r){return t>>>r},oi.shr64_lo=function eQ(t,e,r){return(t<<32-r|e>>>r)>>>0};var Vg={},UD=oi,tQ=$v;function qw(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Vg.BlockHash=qw,qw.prototype.update=function(t,e){if(t=UD.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=UD.join32(t,0,t.length-r,this.endian);for(var a=0;a>>24&255,a[A++]=t>>>16&255,a[A++]=t>>>8&255,a[A++]=255&t}else for(a[A++]=255&t,a[A++]=t>>>8&255,a[A++]=t>>>16&255,a[A++]=t>>>24&255,a[A++]=0,a[A++]=0,a[A++]=0,a[A++]=0,O=8;O>>3},nl.g1_256=function aQ(t){return rl(t,17)^rl(t,19)^t>>>10};var Wg=oi,cQ=Vg,uQ=nl,V_=Wg.rotl32,Qv=Wg.sum32,lQ=Wg.sum32_5,fQ=uQ.ft_1,HD=cQ.BlockHash,dQ=[1518500249,1859775393,2400959708,3395469782];function il(){if(!(this instanceof il))return new il;HD.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Wg.inherits(il,HD);var hQ=il;il.blockSize=512,il.outSize=160,il.hmacStrength=80,il.padLength=64,il.prototype._update=function(t,e){for(var r=this.W,a=0;a<16;a++)r[a]=t[e+a];for(;athis.blockSize&&(t=(new this.Hash).update(t).digest()),eX(t.length<=this.blockSize);for(var e=t.length;e>8,Ee=255&de;be?ie.push(be,Ee):ie.push(Ee)}return ie},r.zero2=A,r.toHex=O,r.encode=function(J,ee){return"hex"===ee?O(J):J}}),dc=Yg(function(t,e){var r=e;r.assert=J_,r.toArray=Iu.toArray,r.zero2=Iu.zero2,r.toHex=Iu.toHex,r.encode=Iu.encode,r.getNAF=function a(ie,oe,de){var be=new Array(Math.max(ie.bitLength(),de)+1);be.fill(0);for(var Ee=1<(Ee>>1)-1?(Ee>>1)-We:We,Ce.isubn(Ue)):Ue=0,be[Ie]=Ue,Ce.iushrn(1)}return be},r.getJSF=function A(ie,oe){var de=[[],[]];ie=ie.clone(),oe=oe.clone();for(var Ce,be=0,Ee=0;ie.cmpn(-be)>0||oe.cmpn(-Ee)>0;){var We,$e,Ie=ie.andln(3)+be&3,Ue=oe.andln(3)+Ee&3;3===Ie&&(Ie=-1),3===Ue&&(Ue=-1),1&Ie?We=3!==(Ce=ie.andln(7)+be&7)&&5!==Ce||2!==Ue?Ie:-Ie:We=0,de[0].push(We),1&Ue?$e=3!==(Ce=oe.andln(7)+Ee&7)&&5!==Ce||2!==Ie?Ue:-Ue:$e=0,de[1].push($e),2*be===We+1&&(be=1-be),2*Ee===$e+1&&(Ee=1-Ee),ie.iushrn(1),oe.iushrn(1)}return de},r.cachedProperty=function O(ie,oe,de){var be="_"+oe;ie.prototype[oe]=function(){return void 0!==this[be]?this[be]:this[be]=de.call(this)}},r.parseBytes=function J(ie){return"string"==typeof ie?r.toArray(ie,"hex"):ie},r.intFromLE=function ee(ie){return new Wr(ie,"hex","le")}}),t2=dc.getNAF,rX=dc.getJSF,n2=dc.assert;function Sd(t,e){this.type=t,this.p=new Wr(e.p,16),this.red=e.prime?Wr.red(e.prime):Wr.mont(this.p),this.zero=new Wr(0).toRed(this.red),this.one=new Wr(1).toRed(this.red),this.two=new Wr(2).toRed(this.red),this.n=e.n&&new Wr(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var d0=Sd;function jc(t,e){this.curve=t,this.type=e,this.precomputed=null}Sd.prototype.point=function(){throw new Error("Not implemented")},Sd.prototype.validate=function(){throw new Error("Not implemented")},Sd.prototype._fixedNafMul=function(t,e){n2(t.precomputed);var r=t._getDoubles(),a=t2(e,1,this._bitLength),A=(1<=J;ie--)ee=(ee<<1)+a[ie];O.push(ee)}for(var oe=this.jpoint(null,null,null),de=this.jpoint(null,null,null),be=A;be>0;be--){for(J=0;J=0;ee--){for(var ie=0;ee>=0&&0===O[ee];ee--)ie++;if(ee>=0&&ie++,J=J.dblp(ie),ee<0)break;var oe=O[ee];n2(0!==oe),J="affine"===t.type?oe>0?J.mixedAdd(A[oe-1>>1]):J.mixedAdd(A[-oe-1>>1].neg()):oe>0?J.add(A[oe-1>>1]):J.add(A[-oe-1>>1].neg())}return"affine"===t.type?J.toP():J},Sd.prototype._wnafMulAdd=function(t,e,r,a,A){var oe,de,be,O=this._wnafT1,J=this._wnafT2,ee=this._wnafT3,ie=0;for(oe=0;oe=1;oe-=2){var Ce=oe-1,Ie=oe;if(1===O[Ce]&&1===O[Ie]){var Ue=[e[Ce],null,null,e[Ie]];0===e[Ce].y.cmp(e[Ie].y)?(Ue[1]=e[Ce].add(e[Ie]),Ue[2]=e[Ce].toJ().mixedAdd(e[Ie].neg())):0===e[Ce].y.cmp(e[Ie].y.redNeg())?(Ue[1]=e[Ce].toJ().mixedAdd(e[Ie]),Ue[2]=e[Ce].add(e[Ie].neg())):(Ue[1]=e[Ce].toJ().mixedAdd(e[Ie]),Ue[2]=e[Ce].toJ().mixedAdd(e[Ie].neg()));var We=[-3,-1,-5,-7,0,7,5,1,3],$e=rX(r[Ce],r[Ie]);for(ie=Math.max($e[0].length,ie),ee[Ce]=new Array(ie),ee[Ie]=new Array(ie),de=0;de=0;oe--){for(var Zt=0;oe>=0;){var En=!0;for(de=0;de=0&&Zt++,wt=wt.dblp(Zt),oe<0)break;for(de=0;de0?be=J[de][Yt-1>>1]:Yt<0&&(be=J[de][-Yt-1>>1].neg()),wt="affine"===be.type?wt.mixedAdd(be):wt.add(be))}}for(oe=0;oe=Math.ceil((t.bitLength()+1)/e.step)},jc.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],a=this,A=0;A=0&&(Ee=ie,Ce=oe),de.negative&&(de=de.neg(),be=be.neg()),Ee.negative&&(Ee=Ee.neg(),Ce=Ce.neg()),[{a:de,b:be},{a:Ee,b:Ce}]},Fc.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],a=e[1],A=a.b.mul(t).divRound(this.n),O=r.b.neg().mul(t).divRound(this.n),J=A.mul(r.a),ee=O.mul(a.a),ie=A.mul(r.b),oe=O.mul(a.b);return{k1:t.sub(J).sub(ee),k2:ie.add(oe).neg()}},Fc.prototype.pointFromX=function(t,e){(t=new Wr(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),a=r.redSqrt();if(0!==a.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var A=a.fromRed().isOdd();return(e&&!A||!e&&A)&&(a=a.redNeg()),this.point(t,a)},Fc.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,a=this.a.redMul(e),A=e.redSqr().redMul(e).redIAdd(a).redIAdd(this.b);return 0===r.redSqr().redISub(A).cmpn(0)},Fc.prototype._endoWnafMulAdd=function(t,e,r){for(var a=this._endoWnafT1,A=this._endoWnafT2,O=0;O":""},bs.prototype.isInfinity=function(){return this.inf},bs.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),a=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,a)},bs.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),a=t.redInvm(),A=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(a),O=A.redSqr().redISub(this.x.redAdd(this.x)),J=A.redMul(this.x.redSub(O)).redISub(this.y);return this.curve.point(O,J)},bs.prototype.getX=function(){return this.x.fromRed()},bs.prototype.getY=function(){return this.y.fromRed()},bs.prototype.mul=function(t){return t=new Wr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},bs.prototype.mulAdd=function(t,e,r){var a=[this,e],A=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,A):this.curve._wnafMulAdd(1,a,A,2)},bs.prototype.jmulAdd=function(t,e,r){var a=[this,e],A=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(a,A,!0):this.curve._wnafMulAdd(1,a,A,2,!0)},bs.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},bs.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,a=function(A){return A.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(a)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(a)}}}return e},bs.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Y_(Os,d0.BasePoint),Fc.prototype.jpoint=function(t,e,r){return new Os(this,t,e,r)},Os.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),a=this.y.redMul(e).redMul(t);return this.curve.point(r,a)},Os.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},Os.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),a=this.x.redMul(e),A=t.x.redMul(r),O=this.y.redMul(e.redMul(t.z)),J=t.y.redMul(r.redMul(this.z)),ee=a.redSub(A),ie=O.redSub(J);if(0===ee.cmpn(0))return 0!==ie.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var oe=ee.redSqr(),de=oe.redMul(ee),be=a.redMul(oe),Ee=ie.redSqr().redIAdd(de).redISub(be).redISub(be),Ce=ie.redMul(be.redISub(Ee)).redISub(O.redMul(de)),Ie=this.z.redMul(t.z).redMul(ee);return this.curve.jpoint(Ee,Ce,Ie)},Os.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,a=t.x.redMul(e),A=this.y,O=t.y.redMul(e).redMul(this.z),J=r.redSub(a),ee=A.redSub(O);if(0===J.cmpn(0))return 0!==ee.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ie=J.redSqr(),oe=ie.redMul(J),de=r.redMul(ie),be=ee.redSqr().redIAdd(oe).redISub(de).redISub(de),Ee=ee.redMul(de.redISub(be)).redISub(A.redMul(oe)),Ce=this.z.redMul(J);return this.curve.jpoint(be,Ee,Ce)},Os.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(A),0===this.x.cmp(r))return!0}},Os.prototype.inspect=function(){return this.isInfinity()?"":""},Os.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var r2=Yg(function(t,e){var r=e;r.base=d0,r.short=oX,r.mont=null,r.edwards=null}),i2=Yg(function(t,e){var J,r=e,a=dc.assert;function A(ee){"short"===ee.type?this.curve=new r2.short(ee):"edwards"===ee.type?this.curve=new r2.edwards(ee):this.curve=new r2.mont(ee),this.g=this.curve.g,this.n=this.curve.n,this.hash=ee.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function O(ee,ie){Object.defineProperty(r,ee,{configurable:!0,enumerable:!0,get:function(){var oe=new A(ie);return Object.defineProperty(r,ee,{configurable:!0,enumerable:!0,value:oe}),oe}})}r.PresetCurve=A,O("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:tl.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),O("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:tl.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),O("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:tl.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),O("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:tl.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),O("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:tl.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),O("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:tl.sha256,gRed:!1,g:["9"]}),O("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:tl.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{J=null.crash()}catch{J=void 0}O("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:tl.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",J]})});function xd(t){if(!(this instanceof xd))return new xd(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Iu.toArray(t.entropy,t.entropyEnc||"hex"),r=Iu.toArray(t.nonce,t.nonceEnc||"hex"),a=Iu.toArray(t.pers,t.persEnc||"hex");J_(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,a)}var o7=xd;xd.prototype._init=function(t,e,r){var a=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var A=0;A=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},xd.prototype.generate=function(t,e,r,a){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(a=r,r=e,e=null),r&&(r=Iu.toArray(r,a||"hex"),this._update(r));for(var A=[];A.length"};var sX=dc.assert;function o2(t,e){if(t instanceof o2)return t;this._importDER(t,e)||(sX(t.r&&t.s,"Signature without r or s"),this.r=new Wr(t.r,16),this.s=new Wr(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var s2=o2;function aX(){this.place=0}function X_(t,e){var r=t[e.place++];if(!(128&r))return r;var a=15&r;if(0===a||a>4)return!1;for(var A=0,O=0,J=e.place;O>>=0;return!(A<=127)&&(e.place=J,A)}function s7(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}o2.prototype._importDER=function(t,e){t=dc.toArray(t,e);var r=new aX;if(48!==t[r.place++])return!1;var a=X_(t,r);if(!1===a||a+r.place!==t.length||2!==t[r.place++])return!1;var A=X_(t,r);if(!1===A)return!1;var O=t.slice(r.place,A+r.place);if(r.place+=A,2!==t[r.place++])return!1;var J=X_(t,r);if(!1===J||t.length!==J+r.place)return!1;var ee=t.slice(r.place,J+r.place);if(0===O[0]){if(!(128&O[1]))return!1;O=O.slice(1)}if(0===ee[0]){if(!(128&ee[1]))return!1;ee=ee.slice(1)}return this.r=new Wr(O),this.s=new Wr(ee),this.recoveryParam=null,!0},o2.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=s7(e),r=s7(r);!(r[0]||128&r[1]);)r=r.slice(1);var a=[2];q_(a,e.length),(a=a.concat(e)).push(2),q_(a,r.length);var A=a.concat(r),O=[48];return q_(O,A.length),O=O.concat(A),dc.encode(O,t)};var cX=function(){throw new Error("unsupported")},a7=dc.assert;function Uc(t){if(!(this instanceof Uc))return new Uc(t);"string"==typeof t&&(a7(Object.prototype.hasOwnProperty.call(i2,t),"Unknown curve "+t),t=i2[t]),t instanceof i2.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var uX=Uc;Uc.prototype.keyPair=function(t){return new Q_(this,t)},Uc.prototype.keyFromPrivate=function(t,e){return Q_.fromPrivate(this,t,e)},Uc.prototype.keyFromPublic=function(t,e){return Q_.fromPublic(this,t,e)},Uc.prototype.genKeyPair=function(t){t||(t={});for(var e=new o7({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||cX(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new Wr(2));;){var A=new Wr(e.generate(r));if(!(A.cmp(a)>0))return A.iaddn(1),this.keyFromPrivate(A)}},Uc.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},Uc.prototype.sign=function(t,e,r,a){"object"==typeof r&&(a=r,r=null),a||(a={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new Wr(t,16));for(var A=this.n.byteLength(),O=e.getPrivate().toArray("be",A),J=t.toArray("be",A),ee=new o7({hash:this.hash,entropy:O,nonce:J,pers:a.pers,persEnc:a.persEnc||"utf8"}),ie=this.n.sub(new Wr(1)),oe=0;;oe++){var de=a.k?a.k(oe):new Wr(ee.generate(this.n.byteLength()));if(!((de=this._truncateToN(de,!0)).cmpn(1)<=0||de.cmp(ie)>=0)){var be=this.g.mul(de);if(!be.isInfinity()){var Ee=be.getX(),Ce=Ee.umod(this.n);if(0!==Ce.cmpn(0)){var Ie=de.invm(this.n).mul(Ce.mul(e.getPrivate()).iadd(t));if(0!==(Ie=Ie.umod(this.n)).cmpn(0)){var Ue=(be.getY().isOdd()?1:0)|(0!==Ee.cmp(Ce)?2:0);return a.canonical&&Ie.cmp(this.nh)>0&&(Ie=this.n.sub(Ie),Ue^=1),new s2({r:Ce,s:Ie,recoveryParam:Ue})}}}}}},Uc.prototype.verify=function(t,e,r,a){t=this._truncateToN(new Wr(t,16)),r=this.keyFromPublic(r,a);var A=(e=new s2(e,"hex")).r,O=e.s;if(A.cmpn(1)<0||A.cmp(this.n)>=0||O.cmpn(1)<0||O.cmp(this.n)>=0)return!1;var oe,J=O.invm(this.n),ee=J.mul(t).umod(this.n),ie=J.mul(A).umod(this.n);return this.curve._maxwellTrick?!(oe=this.g.jmulAdd(ee,r.getPublic(),ie)).isInfinity()&&oe.eqXToP(A):!(oe=this.g.mulAdd(ee,r.getPublic(),ie)).isInfinity()&&0===oe.getX().umod(this.n).cmp(A)},Uc.prototype.recoverPubKey=function(t,e,r,a){a7((3&r)===r,"The recovery param is more than two bits"),e=new s2(e,a);var A=this.n,O=new Wr(t),J=e.r,ee=e.s,ie=1&r,oe=r>>1;if(J.cmp(this.curve.p.umod(this.curve.n))>=0&&oe)throw new Error("Unable to find sencond key candinate");J=oe?this.curve.pointFromX(J.add(this.curve.n),ie):this.curve.pointFromX(J,ie);var de=e.r.invm(A),be=A.sub(O).mul(de).umod(A),Ee=ee.mul(de).umod(A);return this.g.mulAdd(be,J,Ee)},Uc.prototype.getKeyRecoveryParam=function(t,e,r,a){if(null!==(e=new s2(e,a)).recoveryParam)return e.recoveryParam;for(var A=0;A<4;A++){var O;try{O=this.recoverPubKey(t,e,A)}catch{continue}if(O.eq(r))return A}throw new Error("Unable to find valid recovery factor")};var fX=Yg(function(t,e){var r=e;r.version="6.5.4",r.utils=dc,r.rand=function(){throw new Error("unsupported")},r.curve=r2,r.curves=i2,r.ec=uX,r.eddsa=null}).ec;const e6=new $r("signing-key/5.7.0");let t6=null;function ul(){return t6||(t6=new fX("secp256k1")),t6}class hX{constructor(e){Yv(this,"curve","secp256k1"),Yv(this,"privateKey",ba(e)),32!==function YY(t){if("string"!=typeof t)t=ba(t);else if(!fc(t)||t.length%2)return null;return(t.length-2)/2}(this.privateKey)&&e6.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ul().keyFromPrivate(Bo(this.privateKey));Yv(this,"publicKey","0x"+r.getPublic(!1,"hex")),Yv(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),Yv(this,"_isSigningKey",!0)}_addPoint(e){const r=ul().keyFromPublic(Bo(this.publicKey)),a=ul().keyFromPublic(Bo(e));return"0x"+r.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){const r=ul().keyFromPrivate(Bo(this.privateKey)),a=Bo(e);32!==a.length&&e6.throwArgumentError("bad digest length","digest",e);const A=r.sign(a,{canonical:!0});return mD({recoveryParam:A.recoveryParam,r:el("0x"+A.r.toString(16),32),s:el("0x"+A.s.toString(16),32)})}computeSharedSecret(e){const r=ul().keyFromPrivate(Bo(this.privateKey)),a=ul().keyFromPublic(Bo(c7(e)));return el("0x"+r.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function c7(t,e){const r=Bo(t);if(32===r.length){const a=new hX(r);return e?"0x"+ul().keyFromPrivate(r).getPublic(!0,"hex"):a.publicKey}return 33===r.length?e?ba(r):"0x"+ul().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?e?"0x"+ul().keyFromPublic(r).getPublic(!0,"hex"):ba(r):e6.throwArgumentError("invalid public or private key","key","[REDACTED]")}var u7;function mX(t,e){return function yX(t){return M$(yD(k_(yD(c7(t),1)),12))}(function pX(t,e){const r=mD(e),a={r:Bo(r.r),s:Bo(r.s)};return"0x"+ul().recoverPubKey(Bo(t),a,r.recoveryParam).encode("hex",!1)}(Bo(t),e))}new $r("transactions/5.7.0"),function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(u7||(u7={}));const vX="https://rpc.walletconnect.com/v1";function n6(){return n6=(0,Ke.Z)(function*(t,e,r,a,A,O){switch(r.t){case"eip191":return function wX(t,e,r){return mX(PD(e),r).toLowerCase()===t.toLowerCase()}(t,e,r.s);case"eip1271":return yield function EX(t,e,r,a,A,O){return r6.apply(this,arguments)}(t,e,r.s,a,A,O);default:throw new Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}),n6.apply(this,arguments)}function r6(){return r6=(0,Ke.Z)(function*(t,e,r,a,A,O){try{const J="0x1626ba7e",ee="0000000000000000000000000000000000000000000000000000000000000040",ie="0000000000000000000000000000000000000000000000000000000000000041",oe=r.substring(2),be=J+PD(e).substring(2)+ee+ie+oe,Ee=yield fetch(`${O||vX}/?chainId=${a}&projectId=${A}`,{method:"POST",body:JSON.stringify({id:Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:"eth_call",params:[{to:t,data:be},"latest"]})}),{result:Ce}=yield Ee.json();return!!Ce&&Ce.slice(0,J.length).toLowerCase()===J.toLowerCase()}catch(J){return console.error("isValidEip1271Signature: ",J),!1}}),r6.apply(this,arguments)}var _X=Object.defineProperty,SX=Object.defineProperties,xX=Object.getOwnPropertyDescriptors,l7=Object.getOwnPropertySymbols,MX=Object.prototype.hasOwnProperty,IX=Object.prototype.propertyIsEnumerable,f7=(t,e,r)=>e in t?_X(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,i6=(t,e)=>{for(var r in e||(e={}))MX.call(e,r)&&f7(t,r,e[r]);if(l7)for(var r of l7(e))IX.call(e,r)&&f7(t,r,e[r]);return t},d7=(t,e)=>SX(t,xX(e));const o6=t=>t?.split(":"),h7=t=>{const e=t&&o6(t);if(e)return t.includes("did:pkh:")?e[3]:e[1]},p7=t=>{const e=t&&o6(t);if(e)return e[2]+":"+e[3]},a2=t=>{const e=t&&o6(t);if(e)return e.pop()};function g7(t){return s6.apply(this,arguments)}function s6(){return s6=(0,Ke.Z)(function*(t){const{cacao:e,projectId:r}=t,{s:a,p:A}=e,O=y7(A,A.iss),J=a2(A.iss);return yield function bX(t,e,r,a,A,O){return n6.apply(this,arguments)}(J,O,a,h7(A.iss),r)}),s6.apply(this,arguments)}const y7=(t,e)=>{const r=`${t.domain} wants you to sign in with your Ethereum account:`,a=a2(e);if(!t.aud&&!t.uri)throw new Error("Either `aud` or `uri` is required to construct the message");let A=t.statement||void 0;const O=`URI: ${t.aud||t.uri}`,J=`Version: ${t.version}`,ee=`Chain ID: ${h7(e)}`,ie=`Nonce: ${t.nonce}`,oe=`Issued At: ${t.iat}`,de=t.resources?`Resources:${t.resources.map(Ee=>`\n- ${Ee}`).join("")}`:void 0,be=$g(t.resources);if(be){A=b7(A,h0(be))}return[r,a,"",A,"",O,J,ee,ie,oe,de].filter(Ee=>null!=Ee).join("\n")};function hf(t){if(!t)throw new Error("No recap provided, value is undefined");if(!t.att)throw new Error("No `att` property found");const e=Object.keys(t.att);if(null==e||!e.length)throw new Error("No resources found in `att` property");e.forEach(r=>{const a=t.att[r];if(Array.isArray(a))throw new Error(`Resource must be an object: ${r}`);if("object"!=typeof a)throw new Error(`Resource must be an object: ${r}`);if(!Object.keys(a).length)throw new Error(`Resource object is empty: ${r}`);Object.keys(a).forEach(A=>{const O=a[A];if(!Array.isArray(O))throw new Error(`Ability limits ${A} must be an array of objects, found: ${O}`);if(!O.length)throw new Error(`Value of ${A} is empty array, must be an array with objects`);O.forEach(J=>{if("object"!=typeof J)throw new Error(`Ability limits (${A}) must be an array of objects, found: ${J}`)})})})}function m7(t,e,r={}){e=e?.sort((A,O)=>A.localeCompare(O));const a=e.map(A=>({[`${t}/${A}`]:[r]}));return Object.assign({},...a)}function a6(t){return hf(t),`urn:recap:${function NX(t){return Buffer.from(JSON.stringify(t)).toString("base64")}(t).replace(/=/g,"")}`}function h0(t){const e=function PX(t){return JSON.parse(Buffer.from(t,"base64").toString("utf-8"))}(t.replace("urn:recap:",""));return hf(e),e}function LX(t,e,r){const a=function RX(t,e,r,a={}){return r?.sort((A,O)=>A.localeCompare(O)),{att:{[t]:m7(e,r,a)}}}(t,e,r);return a6(a)}function v7(t){return t&&t.includes("urn:recap:")}function BX(t,e){const A=function jX(t,e){hf(t),hf(e);const r=Object.keys(t.att).concat(Object.keys(e.att)).sort((A,O)=>A.localeCompare(O)),a={att:{}};return r.forEach(A=>{var O,J;Object.keys((null==(O=t.att)?void 0:O[A])||{}).concat(Object.keys((null==(J=e.att)?void 0:J[A])||{})).sort((ee,ie)=>ee.localeCompare(ie)).forEach(ee=>{var ie,oe;a.att[A]=d7(i6({},a.att[A]),{[ee]:(null==(ie=t.att[A])?void 0:ie[ee])||(null==(oe=e.att[A])?void 0:oe[ee])})})}),a}(h0(t),h0(e));return a6(A)}function b7(t="",e){hf(e);const r="I further authorize the stated URI to perform the following actions on my behalf: ";if(t.includes(r))return t;const a=[];let A=0;Object.keys(e.att).forEach(ee=>{const ie=Object.keys(e.att[ee]).map(be=>({ability:be.split("/")[0],action:be.split("/")[1]}));ie.sort((be,Ee)=>be.action.localeCompare(Ee.action));const oe={};ie.forEach(be=>{oe[be.ability]||(oe[be.ability]=[]),oe[be.ability].push(be.action)});const de=Object.keys(oe).map(be=>(A++,`(${A}) '${be}': '${oe[be].join("', '")}' for '${ee}'.`));a.push(de.join(", ").replace(".,","."))});return`${t?t+" ":""}${`${r}${a.join(" ")}`}`}function w7(t){var e;const r=h0(t);hf(r);const a=null==(e=r.att)?void 0:e.eip155;return a?Object.keys(a).map(A=>A.split("/")[1]):[]}function E7(t){const e=h0(t);hf(e);const r=[];return Object.values(e.att).forEach(a=>{Object.values(a).forEach(A=>{var O;null!=(O=A?.[0])&&O.chains&&r.push(A[0].chains)})}),[...new Set(r.flat())]}function $g(t){if(!t)return;const e=t?.[t.length-1];return v7(e)?e:void 0}const A7="base10",Ea="base16",c6="base64pad",u6="utf8",_7=0,Md=1,UX=0,S7=1,l6=12,f6=32;function d6(){return _u((0,p_.randomBytes)(f6),Ea)}function c2(t){return _u((0,__.vp)(Au(t,Ea)),Ea)}function p0(t){return _u((0,__.vp)(Au(t,u6)),Ea)}function qv(t){return Number(_u(t,A7))}function HX(t){const e=function VX(t){return Au(`${t}`,A7)}(typeof t.type<"u"?t.type:_7);if(qv(e)===Md&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Au(t.senderPublicKey,Ea):void 0,a=typeof t.iv<"u"?Au(t.iv,Ea):(0,p_.randomBytes)(l6);return function GX(t){if(qv(t.type)===Md){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return _u(AC([t.type,t.senderPublicKey,t.iv,t.sealed]),c6)}return _u(AC([t.type,t.iv,t.sealed]),c6)}({type:e,sealed:new bC.OK(Au(t.symKey,Ea)).seal(a,Au(t.message,u6)),iv:a,senderPublicKey:r})}function u2(t){const e=Au(t,c6),r=e.slice(UX,S7),a=S7;if(qv(r)===Md){const ee=a+f6,ie=ee+l6,oe=e.slice(a,ee),de=e.slice(ee,ie);return{type:r,sealed:e.slice(ie),iv:de,senderPublicKey:oe}}const A=a+l6,O=e.slice(a,A);return{type:r,sealed:e.slice(A),iv:O}}function x7(t){const e=t?.type||_7;if(e===Md){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function M7(t){return t.type===Md&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}const JX="irn";function h6(t){return t?.relay||{protocol:JX}}function l2(t){const e=gY[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var YX=Object.defineProperty,$X=Object.defineProperties,QX=Object.getOwnPropertyDescriptors,I7=Object.getOwnPropertySymbols,XX=Object.prototype.hasOwnProperty,qX=Object.prototype.propertyIsEnumerable,C7=(t,e,r)=>e in t?YX(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D7=(t,e)=>{for(var r in e||(e={}))XX.call(e,r)&&C7(t,r,e[r]);if(I7)for(var r of I7(e))qX.call(e,r)&&C7(t,r,e[r]);return t},eq=(t,e)=>$X(t,QX(e));function tq(t,e="-"){const r={},a="relay"+e;return Object.keys(t).forEach(A=>{if(A.startsWith(a)){const O=A.replace(a,""),J=t[A];r[O]=J}}),r}function T7(t){const e=(t=(t=t.includes("wc://")?t.replace("wc://",""):t).includes("wc:")?t.replace("wc:",""):t).indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,a=t.substring(0,e),A=t.substring(e+1,r).split("@"),O=typeof r<"u"?t.substring(r):"",J=Fw.parse(O),ee="string"==typeof J.methods?J.methods.split(","):void 0;return{protocol:a,topic:nq(A[0]),version:parseInt(A[1],10),symKey:J.symKey,relay:tq(J),methods:ee,expiryTimestamp:J.expiryTimestamp?parseInt(J.expiryTimestamp,10):void 0}}function nq(t){return t.startsWith("//")?t.substring(2):t}function iq(t){return`${t.protocol}:${t.topic}@${t.version}?`+Fw.stringify(D7(eq(D7({symKey:t.symKey},function rq(t,e="-"){const a={};return Object.keys(t).forEach(A=>{const O="relay"+e+A;t[A]&&(a[O]=t[A])}),a}(t.relay)),{expiryTimestamp:t.expiryTimestamp}),t.methods?{methods:t.methods.join(",")}:{}))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Qg(t){const e=[];return t.forEach(r=>{const[a,A]=r.split(":");e.push(`${a}:${A}`)}),e}function k7(t,e){const r=function yq(t){const e={};return t?.forEach(r=>{const[a,A]=r.split(":");e[a]||(e[a]={accounts:[],chains:[],events:[]}),e[a].accounts.push(r),e[a].chains.push(`${a}:${A}`)}),e}(e=e.map(a=>a.replace("did:pkh:","")));for(const[a,A]of Object.entries(r))A.methods?A.methods=Ad(A.methods,t):A.methods=t,A.events=["chainChanged","accountsChanged"];return r}const mq={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},vq={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Bn(t,e){const{message:r,code:a}=vq[t];return{message:e?`${r} ${e}`:r,code:a}}function Zi(t,e){const{message:r,code:a}=mq[t];return{message:e?`${r} ${e}`:r,code:a}}function e1(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function t1(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Aa(t){return typeof t>"u"}function Yo(t,e){return!(!e||!Aa(t))||"string"==typeof t&&!!t.trim().length}function p6(t,e){return!(!e||!Aa(t))||"number"==typeof t&&!isNaN(t)}function f2(t){return!(!Yo(t,!1)||!t.includes(":"))&&2===t.split(":").length}function L7(t){let e=!0;return e1(t)?t.length&&(e=t.every(r=>Yo(r,!1))):e=!1,e}function Mq(t,e,r){let a=null;return Object.entries(t).forEach(([A,O])=>{if(a)return;const J=function xq(t,e,r){let a=null;return e1(e)&&e.length?e.forEach(A=>{a||f2(A)||(a=Zi("UNSUPPORTED_CHAINS",`${r}, chain ${A} should be a string and conform to "namespace:chainId" format`))}):f2(t)||(a=Zi("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),a}(A,C_(A,O),`${e} ${r}`);J&&(a=J)}),a}function Iq(t,e){let r=null;return e1(t)?t.forEach(a=>{r||function wq(t){if(Yo(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const r=e[0]+":"+e[1];return!!e[2]&&f2(r)}}return!1}(a)||(r=Zi("UNSUPPORTED_ACCOUNTS",`${e}, account ${a} should be a string and conform to "namespace:chainId:address" format`))}):r=Zi("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function B7(t,e){let r=null;return Object.values(t).forEach(a=>{if(r)return;const A=function Dq(t,e){let r=null;return L7(t?.methods)?L7(t?.events)||(r=Zi("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Zi("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}(a,`${e}, namespace`);A&&(r=A)}),r}function d2(t,e){let r=null;if(t&&t1(t)){const a=B7(t,e);a&&(r=a);const A=function Cq(t,e){let r=null;return Object.values(t).forEach(a=>{if(r)return;const A=Iq(a?.accounts,`${e} namespace`);A&&(r=A)}),r}(t,e);A&&(r=A)}else r=Bn("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function j7(t){return Yo(t.protocol,!0)}function Ha(t){return typeof t<"u"&&null!==typeof t}function F7(t,e){return!(!f2(e)||!function dq(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Qg(r.accounts))}),e}(t).includes(e))}function Bq(t,e,r){return!!Yo(r,!1)&&function hq(t,e){const r=[];return Object.values(t).forEach(a=>{Qg(a.accounts).includes(e)&&r.push(...a.methods)}),r}(t,e).includes(r)}function jq(t,e,r){return!!Yo(r,!1)&&function pq(t,e){const r=[];return Object.values(t).forEach(a=>{Qg(a.accounts).includes(e)&&r.push(...a.events)}),r}(t,e).includes(r)}function g6(t,e,r){let a=null;const A=function Fq(t){const e={};return Object.keys(t).forEach(r=>{var a;r.includes(":")?e[r]=t[r]:null==(a=t[r].chains)||a.forEach(A=>{e[A]={methods:t[r].methods,events:t[r].events}})}),e}(t),O=function Uq(t){const e={};return Object.keys(t).forEach(r=>{r.includes(":")?e[r]=t[r]:Qg(t[r].accounts)?.forEach(A=>{e[A]={accounts:t[r].accounts.filter(O=>O.includes(`${A}:`)),methods:t[r].methods,events:t[r].events}})}),e}(e),J=Object.keys(A),ee=Object.keys(O),ie=U7(Object.keys(t)),oe=U7(Object.keys(e)),de=ie.filter(be=>!oe.includes(be));return de.length&&(a=Bn("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${de.toString()}\n Received: ${Object.keys(e).toString()}`)),u0(J,ee)||(a=Bn("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${J.toString()}\n Approved: ${ee.toString()}`)),Object.keys(e).forEach(be=>{if(!be.includes(":")||a)return;const Ee=Qg(e[be].accounts);Ee.includes(be)||(a=Bn("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${be}\n Required: ${be}\n Approved: ${Ee.toString()}`))}),J.forEach(be=>{a||(u0(A[be].methods,O[be].methods)?u0(A[be].events,O[be].events)||(a=Bn("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${be}`)):a=Bn("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${be}`))}),a}function U7(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function K7(){const t=jg();return new Promise(e=>{switch(t){case Ka.browser:e(function zq(){return Bg()&&navigator?.onLine}());break;case Ka.reactNative:e(function Vq(){return y6.apply(this,arguments)}());break;case Ka.node:default:e(!0)}})}function y6(){return(y6=(0,Ke.Z)(function*(){return!(Lg()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function Wq(t){switch(jg()){case Ka.browser:!function Gq(t){!Lg()&&Bg()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}(t);break;case Ka.reactNative:!function Zq(t){Lg()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}(t);case Ka.node:}}const m6={};class n1{static get(e){return m6[e]}static set(e,r){m6[e]=r}static delete(e){delete m6[e]}}var Yq=function Jq(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),a=0;a>>0,ct=new Uint8Array(ht);Ie[Ue];){var wt=r[Ie.charCodeAt(Ue)];if(255===wt)return;for(var zt=0,Zt=ht-1;(0!==wt||zt<$e)&&-1!==Zt;Zt--,zt++)wt+=ee*ct[Zt]>>>0,ct[Zt]=wt%256>>>0,wt=wt/256>>>0;if(0!==wt)throw new Error("Non-zero carry");$e=zt,Ue++}if(" "!==Ie[Ue]){for(var En=ht-$e;En!==ht&&0===ct[En];)En++;for(var Yt=new Uint8Array(We+(ht-En)),Xt=We;En!==ht;)Yt[Xt++]=ct[En++];return Yt}}}return{encode:function be(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Ue=0,We=0,$e=0,ht=Ie.length;$e!==ht&&0===Ie[$e];)$e++,Ue++;for(var ct=(ht-$e)*de+1>>>0,wt=new Uint8Array(ct);$e!==ht;){for(var zt=Ie[$e],Zt=0,En=ct-1;(0!==zt||Zt>>0,wt[En]=zt%ee>>>0,zt=zt/ee>>>0;if(0!==zt)throw new Error("Non-zero carry");We=Zt,$e++}for(var Yt=ct-We;Yt!==ct&&0===wt[Yt];)Yt++;for(var Xt=ie.repeat(Ue);Yt{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class tee{constructor(e,r,a){this.name=e,this.prefix=r,this.baseEncode=a}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nee{constructor(e,r,a){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=a}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return z7(this,e)}}class ree{constructor(e){this.decoders=e}or(e){return z7(this,e)}decode(e){const r=e[0],a=this.decoders[r];if(a)return a.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const z7=(t,e)=>new ree({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class iee{constructor(e,r,a,A){this.name=e,this.prefix=r,this.baseEncode=a,this.baseDecode=A,this.encoder=new tee(e,r,a),this.decoder=new nee(e,r,A)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const p2=({name:t,prefix:e,encode:r,decode:a})=>new iee(t,e,r,a),r1=({prefix:t,name:e,alphabet:r})=>{const{encode:a,decode:A}=Qq(r,e);return p2({prefix:t,name:e,encode:a,decode:O=>h2(A(O))})},Ns=({name:t,prefix:e,bitsPerChar:r,alphabet:a})=>p2({prefix:e,name:t,encode:A=>((t,e,r)=>{const a="="===e[e.length-1],A=(1<r;)J-=r,O+=e[A&ee>>J];if(J&&(O+=e[A&ee<((t,e,r,a)=>{const A={};for(let de=0;de=8&&(ee-=8,J[oe++]=255&ie>>ee)}if(ee>=r||255&ie<<8-ee)throw new SyntaxError("Unexpected end of data");return J})(A,a,r,t)}),aee=p2({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),cee=Ns({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),uee=Ns({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),lee=r1({prefix:"9",name:"base10",alphabet:"0123456789"}),fee=Ns({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),dee=Ns({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),hee=Ns({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),pee=Ns({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gee=Ns({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),yee=Ns({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),mee=Ns({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),vee=Ns({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),bee=Ns({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),wee=Ns({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Eee=Ns({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Aee=r1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),_ee=r1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),See=r1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),xee=r1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Mee=Ns({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Iee=Ns({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Cee=Ns({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Dee=Ns({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),V7=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Tee=V7.reduce((t,e,r)=>(t[r]=e,t),[]),Oee=V7.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);const Ree=p2({prefix:"\u{1f680}",name:"base256emoji",encode:function Nee(t){return t.reduce((e,r)=>e+=Tee[r],"")},decode:function Pee(t){const e=[];for(const r of t){const a=Oee[r.codePointAt(0)];if(void 0===a)throw new Error(`Non-base256emoji character: ${r}`);e.push(a)}return new Uint8Array(e)}});var kee=function W7(t,e,r){e=e||[];for(var a=r=r||0;t>=jee;)e[r++]=255&t|H7,t/=128;for(;t&Bee;)e[r++]=255&t|H7,t>>>=7;return e[r]=0|t,W7.bytes=r-a+1,e},H7=128,Bee=-128,jee=Math.pow(2,31);var Fee=function v6(t,a){var J,r=0,A=0,O=a=a||0,ee=t.length;do{if(O>=ee)throw v6.bytes=0,new RangeError("Could not decode varint");J=t[O++],r+=A<28?(J&G7)<=Uee);return v6.bytes=O-a,r},Uee=128,G7=127;var Kee=Math.pow(2,7),zee=Math.pow(2,14),Vee=Math.pow(2,21),Hee=Math.pow(2,28),Wee=Math.pow(2,35),Gee=Math.pow(2,42),Zee=Math.pow(2,49),Jee=Math.pow(2,56),Yee=Math.pow(2,63),Qee={encode:kee,decode:Fee,encodingLength:function(t){return t(Z7.encode(t,e,r),e),Y7=t=>Z7.encodingLength(t),b6=(t,e)=>{const r=e.byteLength,a=Y7(t),A=a+Y7(r),O=new Uint8Array(A+r);return J7(t,O,0),J7(r,O,a),O.set(e,A),new $7(t,r,e,O)};class $7{constructor(e,r,a,A){this.code=e,this.size=r,this.digest=a,this.bytes=A}}const Q7=({name:t,code:e,encode:r})=>new qee(t,e,r);class qee{constructor(e,r,a){this.name=e,this.code=r,this.encode=a}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?b6(this.code,r):r.then(a=>b6(this.code,a))}throw Error("Unknown type, must be binary type")}}const X7=t=>function(){var e=(0,Ke.Z)(function*(r){return new Uint8Array(yield crypto.subtle.digest(t,r))});return function(r){return e.apply(this,arguments)}}(),ete=Q7({name:"sha2-256",code:18,encode:X7("SHA-256")}),tte=Q7({name:"sha2-512",code:19,encode:X7("SHA-512")}),eT=h2,rte={code:0,name:"identity",encode:eT,digest:t=>b6(0,eT(t))},ite="raw",ote=85,ste=t=>h2(t),ate=t=>h2(t),cte=new TextEncoder,ute=new TextDecoder,lte="json",fte=512,dte=t=>cte.encode(JSON.stringify(t)),hte=t=>JSON.parse(ute.decode(t));class _a{constructor(e,r,a,A){this.code=r,this.version=e,this.multihash=a,this.bytes=A,this.byteOffset=A.byteOffset,this.byteLength=A.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:y2,byteLength:y2,code:g2,version:g2,multihash:g2,bytes:g2,_baseCache:y2,asCID:y2})}toV0(){if(0===this.version)return this;{const{code:e,multihash:r}=this;if(e!==i1)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==mte)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return _a.createV0(r)}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,a=Digest.create(e,r);return _a.createV1(this.code,a)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:r,version:a,_baseCache:A}=this;return 0===a?gte(r,A,e||base58btc.encoder):yte(r,A,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return bte(/^0\.0/,wte),!(!e||!e[nT]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof _a)return e;if(null!=e&&e.asCID===e){const{version:r,code:a,multihash:A,bytes:O}=e;return new _a(r,a,A,O||tT(r,a,A.bytes))}if(null!=e&&!0===e[nT]){const{version:r,multihash:a,code:A}=e,O=Digest.decode(a);return _a.create(r,A,O)}return null}static create(e,r,a){if("number"!=typeof r)throw new Error("String codecs are no longer supported");switch(e){case 0:if(r!==i1)throw new Error(`Version 0 CID must use dag-pb (code: ${i1}) block encoding`);return new _a(e,r,a,a.bytes);case 1:{const A=tT(e,r,a.bytes);return new _a(e,r,a,A)}default:throw new Error("Invalid version")}}static createV0(e){return _a.create(0,i1,e)}static createV1(e,r){return _a.create(1,e,r)}static decode(e){const[r,a]=_a.decodeFirst(e);if(a.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=_a.inspectBytes(e),a=r.size-r.multihashSize,A=coerce(e.subarray(a,a+r.multihashSize));if(A.byteLength!==r.multihashSize)throw new Error("Incorrect length");const O=A.subarray(r.multihashSize-r.digestSize),J=new Digest.Digest(r.multihashCode,r.digestSize,O,A);return[0===r.version?_a.createV0(J):_a.createV1(r.codec,J),e.subarray(r.size)]}static inspectBytes(e){let r=0;const a=()=>{const[be,Ee]=varint.decode(e.subarray(r));return Ee,be};let A=a(),O=i1;if(18===A?(0,0):1===A&&a(),0!==A&&1!==A)throw new RangeError(`Invalid CID version ${A}`);const J=r,ee=a(),ie=a(),oe=r+ie;return{version:A,codec:O,multihashCode:ee,digestSize:ie,multihashSize:oe-J,size:oe}}static parse(e,r){const[a,A]=pte(e,r),O=_a.decode(A);return O._baseCache.set(a,e),O}}Symbol.for("@ipld/js-cid/CID");const rT={...h,...w,...I,...R,...V,...H,...L,...b,...B,...re};function Ate(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?function Ete(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function iT(t,e,r,a){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:a}}}const oT=iT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),w6=iT("ascii","a",t=>{let e="a";for(let r=0;r{const e=Ate((t=t.substring(1)).length);for(let r=0;rr.code===t)||o1[aT]}var Nte=u(71948);function Id(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function g0(t=6){return BigInt(Id(t))}function Xg(t,e,r){return{id:r||Id(),jsonrpc:"2.0",method:t,params:e}}function A6(t,e){return{id:t,jsonrpc:"2.0",result:e}}function _6(t,e,r){return{id:t,jsonrpc:"2.0",error:Pte(e,r)}}function Pte(t,e){return typeof t>"u"?uT(sT):("string"==typeof t&&(t=Object.assign(Object.assign({},uT(E6)),{message:t})),typeof e<"u"&&(t.data=e),cT(t.code)&&(t=lT(t.code)),t)}class Rte{}class kte extends Rte{constructor(){super()}}class Lte extends kte{constructor(e){super()}}const jte="^wss?:";function fT(t,e){const r=function Fte(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return!(typeof r>"u")&&new RegExp(e).test(r)}function dT(t){return fT(t,jte)}function Ute(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function hT(t){return"object"==typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function S6(t){return hT(t)&&"method"in t}function m2(t){return hT(t)&&(ll(t)||Kc(t))}function ll(t){return"result"in t}function Kc(t){return"error"in t}class Kte extends Lte{constructor(e){super(e),this.events=new wu.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var r=this;return(0,Ke.Z)(function*(){yield r.open(e)})()}disconnect(){var e=this;return(0,Ke.Z)(function*(){yield e.close()})()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}request(e,r){var a=this;return(0,Ke.Z)(function*(){return a.requestStrict(Xg(e.method,e.params||[],e.id||g0().toString()),r)})()}requestStrict(e,r){var a=this;return(0,Ke.Z)(function*(){return new Promise(function(){var A=(0,Ke.Z)(function*(O,J){if(!a.connection.connected)try{yield a.open()}catch(ee){J(ee)}a.events.on(`${e.id}`,ee=>{Kc(ee)?J(ee.error):O(ee.result)});try{yield a.connection.send(e,r)}catch(ee){J(ee)}});return function(O,J){return A.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),m2(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var r=this;return(0,Ke.Z)(function*(){r.connection===e&&r.connection.connected||(r.connection.connected&&r.close(),"string"==typeof e&&(yield r.connection.open(e),e=r.connection),r.connection=r.setConnection(e),yield r.connection.open(),r.registerEventListeners(),r.events.emit("connect"))})()}close(){var e=this;return(0,Ke.Z)(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const pT=t=>t.split("?")[0],Hte=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:u(25504);class Wte{constructor(e){if(this.url=e,this.events=new wu.EventEmitter,this.registering=!1,!dT(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}open(e=this.url){var r=this;return(0,Ke.Z)(function*(){yield r.register(e)})()}close(){var e=this;return(0,Ke.Z)(function*(){return new Promise((r,a)=>{typeof e.socket>"u"?a(new Error("Connection already closed")):(e.socket.onclose=A=>{e.onClose(A),r()},e.socket.close())})})()}send(e){var r=this;return(0,Ke.Z)(function*(){typeof r.socket>"u"&&(r.socket=yield r.register());try{r.socket.send(a0(e))}catch(a){r.onError(e.id,a)}})()}register(e=this.url){if(!dT(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((a,A)=>{this.events.once("register_error",O=>{this.resetMaxListeners(),A(O)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return A(new Error("WebSocket connection is missing or invalid"));a(this.socket)})})}return this.url=e,this.registering=!0,new Promise((r,a)=>{const A=new URLSearchParams(e).get("origin"),O=(0,Nte.isReactNative)()?{headers:{origin:A}}:{rejectUnauthorized:!Ute(e)},J=new Hte(e,[],O);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?J.onerror=ee=>{const ie=ee;a(this.emitError(ie.error))}:J.on("error",ee=>{a(this.emitError(ee))}),J.onopen=()=>{this.onOpen(J),r(J)}})}onOpen(e){e.onmessage=r=>this.onPayload(r),e.onclose=r=>this.onClose(r),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const r="string"==typeof e.data?Cw(e.data):e.data;this.events.emit("payload",r)}onError(e,r){const a=this.parseError(r),O=_6(e,a.message||a.toString());this.events.emit("payload",O)}parseError(e,r=this.url){return function Ote(t,e,r){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${e}`):t}(e,pT(r),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const r=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${pT(this.url)}`));return this.events.emit("register_error",r),r}}var Gte=u(88222),Zte=u.n(Gte),Jte=u(33024),Yte=u.n(Jte);var Qte=function $te(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),a=0;a>>0,ct=new Uint8Array(ht);Ie[Ue];){var wt=r[Ie.charCodeAt(Ue)];if(255===wt)return;for(var zt=0,Zt=ht-1;(0!==wt||zt<$e)&&-1!==Zt;Zt--,zt++)wt+=ee*ct[Zt]>>>0,ct[Zt]=wt%256>>>0,wt=wt/256>>>0;if(0!==wt)throw new Error("Non-zero carry");$e=zt,Ue++}if(" "!==Ie[Ue]){for(var En=ht-$e;En!==ht&&0===ct[En];)En++;for(var Yt=new Uint8Array(We+(ht-En)),Xt=We;En!==ht;)Yt[Xt++]=ct[En++];return Yt}}}return{encode:function be(Ie){if(Ie instanceof Uint8Array||(ArrayBuffer.isView(Ie)?Ie=new Uint8Array(Ie.buffer,Ie.byteOffset,Ie.byteLength):Array.isArray(Ie)&&(Ie=Uint8Array.from(Ie))),!(Ie instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Ie.length)return"";for(var Ue=0,We=0,$e=0,ht=Ie.length;$e!==ht&&0===Ie[$e];)$e++,Ue++;for(var ct=(ht-$e)*de+1>>>0,wt=new Uint8Array(ct);$e!==ht;){for(var zt=Ie[$e],Zt=0,En=ct-1;(0!==zt||Zt>>0,wt[En]=zt%ee>>>0,zt=zt/ee>>>0;if(0!==zt)throw new Error("Non-zero carry");We=Zt,$e++}for(var Yt=ct-We;Yt!==ct&&0===wt[Yt];)Yt++;for(var Xt=ie.repeat(Ue);Yt{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class tne{constructor(e,r,a){this.name=e,this.prefix=r,this.baseEncode=a}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class nne{constructor(e,r,a){if(this.name=e,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=a}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return mT(this,e)}}class rne{constructor(e){this.decoders=e}or(e){return mT(this,e)}decode(e){const r=e[0],a=this.decoders[r];if(a)return a.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const mT=(t,e)=>new rne({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class ine{constructor(e,r,a,A){this.name=e,this.prefix=r,this.baseEncode=a,this.baseDecode=A,this.encoder=new tne(e,r,a),this.decoder=new nne(e,r,A)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const v2=({name:t,prefix:e,encode:r,decode:a})=>new ine(t,e,r,a),s1=({prefix:t,name:e,alphabet:r})=>{const{encode:a,decode:A}=Xte(r,e);return v2({prefix:t,name:e,encode:a,decode:O=>yT(A(O))})},Ps=({name:t,prefix:e,bitsPerChar:r,alphabet:a})=>v2({prefix:e,name:t,encode:A=>((t,e,r)=>{const a="="===e[e.length-1],A=(1<r;)J-=r,O+=e[A&ee>>J];if(J&&(O+=e[A&ee<((t,e,r,a)=>{const A={};for(let de=0;de=8&&(ee-=8,J[oe++]=255&ie>>ee)}if(ee>=r||255&ie<<8-ee)throw new SyntaxError("Unexpected end of data");return J})(A,a,r,t)}),ane=v2({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var cne=Object.freeze({__proto__:null,identity:ane});const une=Ps({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var lne=Object.freeze({__proto__:null,base2:une});const fne=Ps({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var dne=Object.freeze({__proto__:null,base8:fne});const hne=s1({prefix:"9",name:"base10",alphabet:"0123456789"});var pne=Object.freeze({__proto__:null,base10:hne});const gne=Ps({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),yne=Ps({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var mne=Object.freeze({__proto__:null,base16:gne,base16upper:yne});const vne=Ps({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),bne=Ps({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),wne=Ps({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Ene=Ps({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Ane=Ps({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),_ne=Ps({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Sne=Ps({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),xne=Ps({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Mne=Ps({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Ine=Object.freeze({__proto__:null,base32:vne,base32upper:bne,base32pad:wne,base32padupper:Ene,base32hex:Ane,base32hexupper:_ne,base32hexpad:Sne,base32hexpadupper:xne,base32z:Mne});const Cne=s1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Dne=s1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Tne=Object.freeze({__proto__:null,base36:Cne,base36upper:Dne});const One=s1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Nne=s1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Pne=Object.freeze({__proto__:null,base58btc:One,base58flickr:Nne});const Rne=Ps({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),kne=Ps({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Lne=Ps({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Bne=Ps({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var jne=Object.freeze({__proto__:null,base64:Rne,base64pad:kne,base64url:Lne,base64urlpad:Bne});const vT=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Fne=vT.reduce((t,e,r)=>(t[r]=e,t),[]),Une=vT.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);const Vne=v2({prefix:"\u{1f680}",name:"base256emoji",encode:function Kne(t){return t.reduce((e,r)=>e+=Fne[r],"")},decode:function zne(t){const e=[];for(const r of t){const a=Une[r.codePointAt(0)];if(void 0===a)throw new Error(`Non-base256emoji character: ${r}`);e.push(a)}return new Uint8Array(e)}});var Hne=Object.freeze({__proto__:null,base256emoji:Vne}),Wne=function wT(t,e,r){e=e||[];for(var a=r=r||0;t>=Jne;)e[r++]=255&t|bT,t/=128;for(;t&Zne;)e[r++]=255&t|bT,t>>>=7;return e[r]=0|t,wT.bytes=r-a+1,e},bT=128,Zne=-128,Jne=Math.pow(2,31);var Yne=function x6(t,a){var J,r=0,A=0,O=a=a||0,ee=t.length;do{if(O>=ee)throw x6.bytes=0,new RangeError("Could not decode varint");J=t[O++],r+=A<28?(J&ET)<=$ne);return x6.bytes=O-a,r},$ne=128,ET=127;var Qne=Math.pow(2,7),Xne=Math.pow(2,14),qne=Math.pow(2,21),ere=Math.pow(2,28),tre=Math.pow(2,35),nre=Math.pow(2,42),rre=Math.pow(2,49),ire=Math.pow(2,56),ore=Math.pow(2,63),are={encode:Wne,decode:Yne,encodingLength:function(t){return t(AT.encode(t,e,r),e),ST=t=>AT.encodingLength(t),M6=(t,e)=>{const r=e.byteLength,a=ST(t),A=a+ST(r),O=new Uint8Array(A+r);return _T(t,O,0),_T(r,O,a),O.set(e,A),new cre(t,r,e,O)};class cre{constructor(e,r,a,A){this.code=e,this.size=r,this.digest=a,this.bytes=A}}const xT=({name:t,code:e,encode:r})=>new ure(t,e,r);class ure{constructor(e,r,a){this.name=e,this.code=r,this.encode=a}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?M6(this.code,r):r.then(a=>M6(this.code,a))}throw Error("Unknown type, must be binary type")}}const MT=t=>function(){var e=(0,Ke.Z)(function*(r){return new Uint8Array(yield crypto.subtle.digest(t,r))});return function(r){return e.apply(this,arguments)}}(),lre=xT({name:"sha2-256",code:18,encode:MT("SHA-256")}),fre=xT({name:"sha2-512",code:19,encode:MT("SHA-512")});Object.freeze({__proto__:null,sha256:lre,sha512:fre});const CT=yT;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:CT,digest:t=>M6(0,CT(t))}});new TextEncoder,new TextDecoder;const DT={...cne,...lne,...dne,...pne,...mne,...Ine,...Tne,...Pne,...jne,...Hne};function TT(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function OT(t,e,r,a){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:a}}}const NT=OT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),I6=OT("ascii","a",t=>{let e="a";for(let r=0;r{const e=function gre(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?TT(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let r=0;r(this.isInitialized(),this.keychain.has(A)),this.set=function(){var A=(0,Ke.Z)(function*(O,J){a.isInitialized(),a.keychain.set(O,J),yield a.persist()});return function(O,J){return A.apply(this,arguments)}}(),this.get=A=>{this.isInitialized();const O=this.keychain.get(A);if(typeof O>"u"){const{message:J}=Bn("NO_MATCHING_KEY",`${this.name}: ${A}`);throw new Error(J)}return O},this.del=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized(),a.keychain.delete(O),yield a.persist()});return function(O){return A.apply(this,arguments)}}(),this.core=e,this.logger=Ua(r,this.name)}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var r=this;return(0,Ke.Z)(function*(){yield r.core.storage.setItem(r.storageKey,nD(e))})()}getKeyChain(){var e=this;return(0,Ke.Z)(function*(){const r=yield e.core.storage.getItem(e.storageKey);return typeof r<"u"?rD(r):void 0})()}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class $re{constructor(e,r,a){var A=this;this.core=e,this.logger=r,this.name="crypto",this.initialized=!1,this.init=(0,Ke.Z)(function*(){A.initialized||(yield A.keychain.init(),A.initialized=!0)}),this.hasKeys=O=>(this.isInitialized(),this.keychain.has(O)),this.getClientId=(0,Ke.Z)(function*(){A.isInitialized();return dC(hC(yield A.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const O=function KX(){const t=wC.Au();return{privateKey:_u(t.secretKey,Ea),publicKey:_u(t.publicKey,Ea)}}();return this.setPrivateKey(O.publicKey,O.privateKey)},this.signJWT=function(){var O=(0,Ke.Z)(function*(J){A.isInitialized();const ie=hC(yield A.getClientSeed()),oe=d6();return yield function SZ(t,e,r,a){return E_.apply(this,arguments)}(oe,J,Are,ie)});return function(J){return O.apply(this,arguments)}}(),this.generateSharedKey=(O,J,ee)=>{this.isInitialized();const oe=function zX(t,e){const r=wC.gi(Au(t,Ea),Au(e,Ea),!0);return _u(new jZ.t(__.mE,r).expand(f6),Ea)}(this.getPrivateKey(O),J);return this.setSymKey(oe,ee)},this.setSymKey=function(){var O=(0,Ke.Z)(function*(J,ee){A.isInitialized();const ie=ee||c2(J);return yield A.keychain.set(ie,J),ie});return function(J,ee){return O.apply(this,arguments)}}(),this.deleteKeyPair=function(){var O=(0,Ke.Z)(function*(J){A.isInitialized(),yield A.keychain.del(J)});return function(J){return O.apply(this,arguments)}}(),this.deleteSymKey=function(){var O=(0,Ke.Z)(function*(J){A.isInitialized(),yield A.keychain.del(J)});return function(J){return O.apply(this,arguments)}}(),this.encode=function(){var O=(0,Ke.Z)(function*(J,ee,ie){A.isInitialized();const oe=x7(ie),de=a0(ee);if(M7(oe)){const Ie=oe.senderPublicKey,Ue=oe.receiverPublicKey;J=yield A.generateSharedKey(Ie,Ue)}const be=A.getSymKey(J),{type:Ee,senderPublicKey:Ce}=oe;return HX({type:Ee,symKey:be,message:de,senderPublicKey:Ce})});return function(J,ee,ie){return O.apply(this,arguments)}}(),this.decode=function(){var O=(0,Ke.Z)(function*(J,ee,ie){A.isInitialized();const oe=function ZX(t,e){const r=u2(t);return x7({type:qv(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?_u(r.senderPublicKey,Ea):void 0,receiverPublicKey:e?.receiverPublicKey})}(ee,ie);if(M7(oe)){const de=oe.receiverPublicKey,be=oe.senderPublicKey;J=yield A.generateSharedKey(de,be)}try{const be=function WX(t){const e=new bC.OK(Au(t.symKey,Ea)),{sealed:r,iv:a}=u2(t.encoded),A=e.open(a,r);if(null===A)throw new Error("Failed to decrypt");return _u(A,u6)}({symKey:A.getSymKey(J),encoded:ee});return Cw(be)}catch(de){A.logger.error(`Failed to decode message from topic: '${J}', clientId: '${yield A.getClientId()}'`),A.logger.error(de)}});return function(J,ee,ie){return O.apply(this,arguments)}}(),this.getPayloadType=O=>qv(u2(O).type),this.getPayloadSenderPublicKey=O=>{const J=u2(O);return J.senderPublicKey?function Ste(t,e="utf8"){const r=_te[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(t).substring(1):globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8")}(J.senderPublicKey,Ea):void 0},this.core=e,this.logger=Ua(r,this.name),this.keychain=a||new Yre(this.core,this.logger)}get context(){return Fa(this.logger)}setPrivateKey(e,r){var a=this;return(0,Ke.Z)(function*(){return yield a.keychain.set(e,r),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return(0,Ke.Z)(function*(){let r="";try{r=e.keychain.get(RT)}catch{r=d6(),yield e.keychain.set(RT,r)}return function mre(t,e="utf8"){const r=yre[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${t}`):TT(globalThis.Buffer.from(t,"utf-8"))}(r,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Qre extends MW{constructor(e,r){var a;super(e,r),a=this,this.logger=e,this.core=r,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Cd,this.init=(0,Ke.Z)(function*(){if(!a.initialized){a.logger.trace("Initialized");try{const A=yield a.getRelayerMessages();typeof A<"u"&&(a.messages=A),a.logger.debug(`Successfully Restored records for ${a.name}`),a.logger.trace({type:"method",method:"restore",size:a.messages.size})}catch(A){a.logger.debug(`Failed to Restore records for ${a.name}`),a.logger.error(A)}finally{a.initialized=!0}}}),this.set=function(){var A=(0,Ke.Z)(function*(O,J){a.isInitialized();const ee=p0(J);let ie=a.messages.get(O);return typeof ie>"u"&&(ie={}),typeof ie[ee]<"u"||(ie[ee]=J,a.messages.set(O,ie),yield a.persist()),ee});return function(O,J){return A.apply(this,arguments)}}(),this.get=A=>{this.isInitialized();let O=this.messages.get(A);return typeof O>"u"&&(O={}),O},this.has=(A,O)=>{this.isInitialized();return typeof this.get(A)[p0(O)]<"u"},this.del=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized(),a.messages.delete(O),yield a.persist()});return function(O){return A.apply(this,arguments)}}(),this.logger=Ua(e,this.name),this.core=r}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var r=this;return(0,Ke.Z)(function*(){yield r.core.storage.setItem(r.storageKey,nD(e))})()}getRelayerMessages(){var e=this;return(0,Ke.Z)(function*(){const r=yield e.core.storage.getItem(e.storageKey);return typeof r<"u"?rD(r):void 0})()}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Xre extends IW{constructor(e,r){var a;super(e,r),a=this,this.relayer=e,this.logger=r,this.events=new wu.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,rr.toMiliseconds)(rr.ONE_MINUTE),this.failedPublishTimeout=(0,rr.toMiliseconds)(rr.ONE_SECOND),this.needsTransportRestart=!1,this.publish=function(){var A=(0,Ke.Z)(function*(O,J,ee){var ie;a.logger.debug("Publishing Payload"),a.logger.trace({type:"method",method:"publish",params:{topic:O,message:J,opts:ee}});const oe=ee?.ttl||Ire,de=h6(ee),be=ee?.prompt||!1,Ee=ee?.tag||0,Ce=ee?.id||g0().toString(),Ie={topic:O,message:J,opts:{ttl:oe,relay:de,prompt:be,tag:Ee,id:Ce}},Ue=`Failed to publish payload, please try again. id:${Ce} tag:${Ee}`,We=Date.now();let $e,ht=1;try{for(;void 0===$e;){if(Date.now()-We>a.publishTimeout)throw new Error(Ue);a.logger.trace({id:Ce,attempts:ht},`publisher.publish - attempt ${ht}`),$e=yield yield Hv(a.rpcPublish(O,J,oe,de,be,Ee,Ce).catch(ct=>a.logger.warn(ct)),a.publishTimeout,Ue),ht++,$e||(yield new Promise(ct=>setTimeout(ct,a.failedPublishTimeout)))}a.relayer.events.emit(hc_publish,Ie),a.logger.debug("Successfully Published Payload"),a.logger.trace({type:"method",method:"publish",params:{id:Ce,topic:O,message:J,opts:ee}})}catch(ct){if(a.logger.debug("Failed to Publish Payload"),a.logger.error(ct),null!=(ie=ee?.internal)&&ie.throwOnFailedPublish)throw ct;a.queue.set(Ce,Ie)}});return function(O,J,ee){return A.apply(this,arguments)}}(),this.on=(A,O)=>{this.events.on(A,O)},this.once=(A,O)=>{this.events.once(A,O)},this.off=(A,O)=>{this.events.off(A,O)},this.removeListener=(A,O)=>{this.events.removeListener(A,O)},this.relayer=e,this.logger=Ua(r,this.name),this.registerEventListeners()}get context(){return Fa(this.logger)}rpcPublish(e,r,a,A,O,J,ee){var ie,oe,de,be;const Ee={method:l2(A.protocol).publish,params:{topic:e,message:r,ttl:a,prompt:O,tag:J},id:ee};return Aa(null==(ie=Ee.params)?void 0:ie.prompt)&&(null==(oe=Ee.params)||delete oe.prompt),Aa(null==(de=Ee.params)?void 0:de.tag)&&(null==(be=Ee.params)||delete be.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:Ee}),this.relayer.request(Ee)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var r=(0,Ke.Z)(function*(a){const{topic:A,message:O,opts:J}=a;yield e.publish(A,O,J)});return function(a){return r.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Lv.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(hc_connection_stalled);this.checkQueue()}),this.relayer.on(hc_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class qre{constructor(){this.map=new Map,this.set=(e,r)=>{const a=this.get(e);this.exists(e,r)||this.map.set(e,[...a,r])},this.get=e=>this.map.get(e)||[],this.exists=(e,r)=>this.get(e).includes(r),this.delete=(e,r)=>{if(typeof r>"u")return void this.map.delete(e);if(!this.map.has(e))return;const a=this.get(e);if(!this.exists(e,r))return;const A=a.filter(O=>O!==r);A.length?this.map.set(e,A):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var eie=Object.defineProperty,tie=Object.defineProperties,nie=Object.getOwnPropertyDescriptors,jT=Object.getOwnPropertySymbols,rie=Object.prototype.hasOwnProperty,iie=Object.prototype.propertyIsEnumerable,FT=(t,e,r)=>e in t?eie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c1=(t,e)=>{for(var r in e||(e={}))rie.call(e,r)&&FT(t,r,e[r]);if(jT)for(var r of jT(e))iie.call(e,r)&&FT(t,r,e[r]);return t},O6=(t,e)=>tie(t,nie(e));class oie extends TW{constructor(e,r){var a;super(e,r),a=this,this.relayer=e,this.logger=r,this.subscriptions=new Map,this.topicMap=new qre,this.events=new wu.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Cd,this.subscribeTimeout=(0,rr.toMiliseconds)(rr.ONE_MINUTE),this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,Ke.Z)(function*(){a.initialized||(a.logger.trace("Initialized"),a.registerEventListeners(),a.clientId=yield a.relayer.core.crypto.getClientId())}),this.subscribe=function(){var A=(0,Ke.Z)(function*(O,J){yield a.restartToComplete(),a.isInitialized(),a.logger.debug("Subscribing Topic"),a.logger.trace({type:"method",method:"subscribe",params:{topic:O,opts:J}});try{const ee=h6(J),ie={topic:O,relay:ee};a.pending.set(O,ie);const oe=yield a.rpcSubscribe(O,ee);return"string"==typeof oe&&(a.onSubscribe(oe,ie),a.logger.debug("Successfully Subscribed Topic"),a.logger.trace({type:"method",method:"subscribe",params:{topic:O,opts:J}})),oe}catch(ee){throw a.logger.debug("Failed to Subscribe Topic"),a.logger.error(ee),ee}});return function(O,J){return A.apply(this,arguments)}}(),this.unsubscribe=function(){var A=(0,Ke.Z)(function*(O,J){yield a.restartToComplete(),a.isInitialized(),typeof J?.id<"u"?yield a.unsubscribeById(O,J.id,J):yield a.unsubscribeByTopic(O,J)});return function(O,J){return A.apply(this,arguments)}}(),this.isSubscribed=function(){var A=(0,Ke.Z)(function*(O){if(a.topics.includes(O))return!0;const J=`${a.pendingSubscriptionWatchLabel}_${O}`;return yield new Promise((ee,ie)=>{const oe=new rr.Watch;oe.start(J);const de=setInterval(()=>{!a.pending.has(O)&&a.topics.includes(O)&&(clearInterval(de),oe.stop(J),ee(!0)),oe.elapsed(J)>=Fre&&(clearInterval(de),oe.stop(J),ie(new Error("Subscription resolution timeout")))},a.pollingInterval)}).catch(()=>!1)});return function(O){return A.apply(this,arguments)}}(),this.on=(A,O)=>{this.events.on(A,O)},this.once=(A,O)=>{this.events.once(A,O)},this.off=(A,O)=>{this.events.off(A,O)},this.removeListener=(A,O)=>{this.events.removeListener(A,O)},this.start=(0,Ke.Z)(function*(){yield a.onConnect()}),this.stop=(0,Ke.Z)(function*(){yield a.onDisconnect()}),this.restart=(0,Ke.Z)(function*(){a.restartInProgress=!0,yield a.restore(),yield a.reset(),a.restartInProgress=!1}),this.relayer=e,this.logger=Ua(r,this.name),this.clientId=""}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,r){let a=!1;try{a=this.getSubscription(e).topic===r}catch{}return a}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,r){var a=this;return(0,Ke.Z)(function*(){const A=a.topicMap.get(e);yield Promise.all(A.map(function(){var O=(0,Ke.Z)(function*(J){return yield a.unsubscribeById(e,J,r)});return function(J){return O.apply(this,arguments)}}()))})()}unsubscribeById(e,r,a){var A=this;return(0,Ke.Z)(function*(){A.logger.debug("Unsubscribing Topic"),A.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:a}});try{const O=h6(a);yield A.rpcUnsubscribe(e,r,O);const J=Zi("USER_DISCONNECTED",`${A.name}, ${e}`);yield A.onUnsubscribe(e,r,J),A.logger.debug("Successfully Unsubscribed Topic"),A.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:r,opts:a}})}catch(O){throw A.logger.debug("Failed to Unsubscribe Topic"),A.logger.error(O),O}})()}rpcSubscribe(e,r){var a=this;return(0,Ke.Z)(function*(){const A={method:l2(r.protocol).subscribe,params:{topic:e}};a.logger.debug("Outgoing Relay Payload"),a.logger.trace({type:"payload",direction:"outgoing",request:A});try{return(yield yield Hv(a.relayer.request(A).catch(O=>a.logger.warn(O)),a.subscribeTimeout))?p0(e+a.clientId):null}catch{a.logger.debug("Outgoing Relay Subscribe Payload stalled"),a.relayer.events.emit(hc_connection_stalled)}return null})()}rpcBatchSubscribe(e){var r=this;return(0,Ke.Z)(function*(){if(!e.length)return;const A={method:l2(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(O=>O.topic)}};r.logger.debug("Outgoing Relay Payload"),r.logger.trace({type:"payload",direction:"outgoing",request:A});try{return yield yield Hv(r.relayer.request(A).catch(O=>r.logger.warn(O)),r.subscribeTimeout)}catch{r.relayer.events.emit(hc_connection_stalled)}})()}rpcUnsubscribe(e,r,a){const A={method:l2(a.protocol).unsubscribe,params:{topic:e,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:A}),this.relayer.request(A)}onSubscribe(e,r){this.setSubscription(e,O6(c1({},r),{id:e})),this.pending.delete(r.topic)}onBatchSubscribe(e){e.length&&e.forEach(r=>{this.setSubscription(r.id,c1({},r)),this.pending.delete(r.topic)})}onUnsubscribe(e,r,a){var A=this;return(0,Ke.Z)(function*(){A.events.removeAllListeners(r),A.hasSubscription(r,e)&&A.deleteSubscription(r,a),yield A.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var r=this;return(0,Ke.Z)(function*(){yield r.relayer.core.storage.setItem(r.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return(0,Ke.Z)(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,r){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:r}),this.addSubscription(e,r)}addSubscription(e,r){this.subscriptions.set(e,c1({},r)),this.topicMap.set(r.topic,e),this.events.emit(fl_created,r)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const r=this.subscriptions.get(e);if(!r){const{message:a}=Bn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(a)}return r}deleteSubscription(e,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:r});const a=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(a.topic,e),this.events.emit(fl_deleted,O6(c1({},a),{reason:r}))}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(fl_sync)})()}reset(){var e=this;return(0,Ke.Z)(function*(){if(e.cached.length){const r=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let a=0;a"u"||!r.length)return;if(e.subscriptions.size){const{message:a}=Bn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(a),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(a)}e.cached=r,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(r){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(r)}})()}batchSubscribe(e){var r=this;return(0,Ke.Z)(function*(){if(!e.length)return;const a=yield r.rpcBatchSubscribe(e);e1(a)&&r.onBatchSubscribe(a.map((A,O)=>O6(c1({},e[O]),{id:A})))})()}onConnect(){var e=this;return(0,Ke.Z)(function*(){yield e.restart(),e.onEnable()})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return(0,Ke.Z)(function*(){if(!e.initialized||!e.relayer.connected)return;const r=[];e.pending.forEach(a=>{r.push(a)}),yield e.batchSubscribe(r)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(Lv.HEARTBEAT_EVENTS.pulse,(0,Ke.Z)(function*(){yield e.checkPending()})),this.events.on(fl_created,function(){var r=(0,Ke.Z)(function*(a){const A=fl_created;e.logger.info(`Emitting ${A}`),e.logger.debug({type:"event",event:A,data:a}),yield e.persist()});return function(a){return r.apply(this,arguments)}}()),this.events.on(fl_deleted,function(){var r=(0,Ke.Z)(function*(a){const A=fl_deleted;e.logger.info(`Emitting ${A}`),e.logger.debug({type:"event",event:A,data:a}),yield e.persist()});return function(a){return r.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return(0,Ke.Z)(function*(){e.restartInProgress&&(yield new Promise(r=>{const a=setInterval(()=>{e.restartInProgress||(clearInterval(a),r())},e.pollingInterval)}))})()}}var sie=Object.defineProperty,UT=Object.getOwnPropertySymbols,aie=Object.prototype.hasOwnProperty,cie=Object.prototype.propertyIsEnumerable,KT=(t,e,r)=>e in t?sie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;class lie extends CW{constructor(e){var r;super(e),r=this,this.protocol="wc",this.version=2,this.events=new wu.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled","interrupted"],this.hasExperiencedNetworkDisruption=!1,this.requestsInFlight=new Map,this.heartBeatTimeout=(0,rr.toMiliseconds)(rr.THIRTY_SECONDS+rr.ONE_SECOND),this.request=function(){var a=(0,Ke.Z)(function*(A){var O,J;r.logger.debug("Publishing Request Payload");const ee=A.id||g0().toString();yield r.toEstablishConnection();try{const ie=r.provider.request(A);r.requestsInFlight.set(ee,{promise:ie,request:A}),r.logger.trace({id:ee,method:A.method,topic:null==(O=A.params)?void 0:O.topic},"relayer.request - attempt to publish...");const oe=yield new Promise(function(){var de=(0,Ke.Z)(function*(be,Ee){const Ce=()=>{Ee(new Error(`relayer.request - publish interrupted, id: ${ee}`))};r.provider.on(zc_disconnect,Ce);const Ie=yield ie;r.provider.off(zc_disconnect,Ce),be(Ie)});return function(be,Ee){return de.apply(this,arguments)}}());return r.logger.trace({id:ee,method:A.method,topic:null==(J=A.params)?void 0:J.topic},"relayer.request - published"),oe}catch(ie){throw r.logger.debug(`Failed to Publish Request: ${ee}`),ie}finally{r.requestsInFlight.delete(ee)}});return function(A){return a.apply(this,arguments)}}(),this.resetPingTimeout=()=>{if(Vv())try{clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var a,A,O;null==(O=null==(A=null==(a=this.provider)?void 0:a.connection)?void 0:A.socket)||O.terminate()},this.heartBeatTimeout)}catch(a){this.logger.warn(a)}},this.onPayloadHandler=a=>{this.onProviderPayload(a),this.resetPingTimeout()},this.onConnectHandler=()=>{this.startPingTimeout(),this.events.emit(hc_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=a=>{this.logger.error(a),this.events.emit(hc_error,a),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(zc_payload,this.onPayloadHandler),this.provider.on(zc_connect,this.onConnectHandler),this.provider.on(zc_disconnect,this.onDisconnectHandler),this.provider.on(zc_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?Ua(e.logger,this.name):Tw()(h_({level:e.logger||"error"})),this.messages=new Qre(this.logger,e.core),this.subscriber=new oie(this,this.logger),this.publisher=new Xre(this,this.logger),this.relayUrl=e?.relayUrl||LT,this.projectId=e.projectId,this.bundleId=function IY(){var t;try{return Lg()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(t=global.Application)?void 0:t.applicationId:void 0}catch{return}}(),this.provider={}}init(){var e=this;return(0,Ke.Z)(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${BT}...`),yield e.restartTransport(BT)}e.initialized=!0,setTimeout((0,Ke.Z)(function*(){0===e.subscriber.topics.length&&0===e.subscriber.pending.size&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return Fa(this.logger)}get connected(){var e,r,a;return 1===(null==(a=null==(r=null==(e=this.provider)?void 0:e.connection)?void 0:r.socket)?void 0:a.readyState)}get connecting(){var e,r,a;return 0===(null==(a=null==(r=null==(e=this.provider)?void 0:e.connection)?void 0:r.socket)?void 0:a.readyState)}publish(e,r,a){var A=this;return(0,Ke.Z)(function*(){A.isInitialized(),yield A.publisher.publish(e,r,a),yield A.recordMessageEvent({topic:e,message:r,publishedAt:Date.now()})})()}subscribe(e,r){var a=this;return(0,Ke.Z)(function*(){var A;a.isInitialized();let J,O=(null==(A=a.subscriber.topicMap.get(e))?void 0:A[0])||"";const ee=ie=>{ie.topic===e&&(a.subscriber.off(fl_created,ee),J())};return yield Promise.all([new Promise(ie=>{J=ie,a.subscriber.on(fl_created,ee)}),new Promise(function(){var ie=(0,Ke.Z)(function*(oe){O=(yield a.subscriber.subscribe(e,r))||O,oe()});return function(oe){return ie.apply(this,arguments)}}())]),O})()}unsubscribe(e,r){var a=this;return(0,Ke.Z)(function*(){a.isInitialized(),yield a.subscriber.unsubscribe(e,r)})()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}transportDisconnect(){var e=this;return(0,Ke.Z)(function*(){if(!e.hasExperiencedNetworkDisruption&&e.connected&&e.requestsInFlight.size>0)try{yield Promise.all(Array.from(e.requestsInFlight.values()).map(r=>r.promise))}catch(r){e.logger.warn(r)}e.hasExperiencedNetworkDisruption||e.connected?yield Hv(e.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.onProviderDisconnect()})()}transportClose(){var e=this;return(0,Ke.Z)(function*(){e.transportExplicitlyClosed=!0,yield e.transportDisconnect()})()}transportOpen(e){var r=this;return(0,Ke.Z)(function*(){yield r.confirmOnlineStateOrThrow(),e&&e!==r.relayUrl&&(r.relayUrl=e,yield r.transportDisconnect(),yield r.createProvider()),r.connectionAttemptInProgress=!0,r.transportExplicitlyClosed=!1;try{yield new Promise(function(){var a=(0,Ke.Z)(function*(A,O){const J=()=>{r.provider.off(zc_disconnect,J),O(new Error("Connection interrupted while trying to subscribe"))};r.provider.on(zc_disconnect,J),yield Hv(r.provider.connect(),(0,rr.toMiliseconds)(rr.ONE_MINUTE),`Socket stalled when trying to connect to ${r.relayUrl}`).catch(ee=>{O(ee)}),yield r.subscriber.start(),r.hasExperiencedNetworkDisruption=!1,A()});return function(A,O){return a.apply(this,arguments)}}())}catch(a){r.logger.error(a);const A=a;if(!r.isConnectionStalled(A.message))throw a}finally{r.connectionAttemptInProgress=!1}})()}restartTransport(e){var r=this;return(0,Ke.Z)(function*(){r.connectionAttemptInProgress||(r.relayUrl=e||r.relayUrl,yield r.confirmOnlineStateOrThrow(),yield r.transportClose(),yield r.createProvider(),yield r.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,Ke.Z)(function*(){if(!(yield K7()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}startPingTimeout(){var e,r,a,A,O;if(Vv())try{null!=(r=null==(e=this.provider)?void 0:e.connection)&&r.socket&&(null==(O=null==(A=null==(a=this.provider)?void 0:a.connection)?void 0:A.socket)||O.once("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(J){this.logger.warn(J)}}isConnectionStalled(e){return this.staleConnectionErrors.some(r=>e.includes(r))}createProvider(){var e=this;return(0,Ke.Z)(function*(){e.provider.connection&&e.unregisterProviderListeners();const r=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new Kte(new Wte(PY({sdkVersion:"2.12.2",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:r,useOnCloseEvent:!0,bundleId:e.bundleId}))),e.registerProviderListeners()})()}recordMessageEvent(e){var r=this;return(0,Ke.Z)(function*(){const{topic:a,message:A}=e;yield r.messages.set(a,A)})()}shouldIgnoreMessageEvent(e){var r=this;return(0,Ke.Z)(function*(){const{topic:a,message:A}=e;if(!A||0===A.length)return r.logger.debug(`Ignoring invalid/empty message: ${A}`),!0;if(!(yield r.subscriber.isSubscribed(a)))return r.logger.debug(`Ignoring message for non-subscribed topic ${a}`),!0;const O=r.messages.has(a,A);return O&&r.logger.debug(`Ignoring duplicate message: ${A}`),O})()}onProviderPayload(e){var r=this;return(0,Ke.Z)(function*(){if(r.logger.debug("Incoming Relay Payload"),r.logger.trace({type:"payload",direction:"incoming",payload:e}),S6(e)){if(!e.method.endsWith("_subscription"))return;const a=e.params,{topic:A,message:O,publishedAt:J}=a.data,ee={topic:A,message:O,publishedAt:J};r.logger.debug("Emitting Relayer Payload"),r.logger.trace(((t,e)=>{for(var r in e||(e={}))aie.call(e,r)&&KT(t,r,e[r]);if(UT)for(var r of UT(e))cie.call(e,r)&&KT(t,r,e[r]);return t})({type:"event",event:a.id},ee)),r.events.emit(a.id,ee),yield r.acknowledgePayload(e),yield r.onMessageEvent(ee)}else m2(e)&&r.events.emit(hc_message_ack,e)})()}onMessageEvent(e){var r=this;return(0,Ke.Z)(function*(){(yield r.shouldIgnoreMessageEvent(e))||(r.events.emit(hc_message,e),yield r.recordMessageEvent(e))})()}acknowledgePayload(e){var r=this;return(0,Ke.Z)(function*(){const a=A6(e.id,!0);yield r.provider.connection.send(a)})()}unregisterProviderListeners(){this.provider.off(zc_payload,this.onPayloadHandler),this.provider.off(zc_connect,this.onConnectHandler),this.provider.off(zc_disconnect,this.onDisconnectHandler),this.provider.off(zc_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return(0,Ke.Z)(function*(){let r=yield K7();Wq(function(){var a=(0,Ke.Z)(function*(A){r!==A&&(r=A,A?yield e.restartTransport().catch(O=>e.logger.error(O)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportDisconnect(),e.transportExplicitlyClosed=!1))});return function(A){return a.apply(this,arguments)}}())})()}onProviderDisconnect(){var e=this;return(0,Ke.Z)(function*(){yield e.subscriber.stop(),e.events.emit(hc_disconnect),e.connectionAttemptInProgress=!1,!e.transportExplicitlyClosed&&setTimeout((0,Ke.Z)(function*(){yield e.transportOpen().catch(r=>e.logger.error(r))}),(0,rr.toMiliseconds)(Nre))})()}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return(0,Ke.Z)(function*(){yield e.confirmOnlineStateOrThrow(),!e.connected&&(e.connectionAttemptInProgress&&(yield new Promise(r=>{const a=setInterval(()=>{e.connected&&(clearInterval(a),r())},e.connectionStatusPollingInterval)})),yield e.transportOpen())})()}}var fie=Object.defineProperty,zT=Object.getOwnPropertySymbols,die=Object.prototype.hasOwnProperty,hie=Object.prototype.propertyIsEnumerable,VT=(t,e,r)=>e in t?fie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,HT=(t,e)=>{for(var r in e||(e={}))die.call(e,r)&&VT(t,r,e[r]);if(zT)for(var r of zT(e))hie.call(e,r)&&VT(t,r,e[r]);return t};class y0 extends DW{constructor(e,r,a,A=Cd,O){var J;super(e,r,a,A),J=this,this.core=e,this.logger=r,this.name=a,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Cd,this.recentlyDeleted=[],this.recentlyDeletedLimit=200,this.init=(0,Ke.Z)(function*(){J.initialized||(J.logger.trace("Initialized"),yield J.restore(),J.cached.forEach(ee=>{J.getKey&&null!==ee&&!Aa(ee)?J.map.set(J.getKey(ee),ee):function Aq(t){var e;return null==(e=t?.proposer)?void 0:e.publicKey}(ee)?J.map.set(ee.id,ee):function _q(t){return t?.topic}(ee)&&J.map.set(ee.topic,ee)}),J.cached=[],J.initialized=!0)}),this.set=function(){var ee=(0,Ke.Z)(function*(ie,oe){J.isInitialized(),J.map.has(ie)?yield J.update(ie,oe):(J.logger.debug("Setting value"),J.logger.trace({type:"method",method:"set",key:ie,value:oe}),J.map.set(ie,oe),yield J.persist())});return function(ie,oe){return ee.apply(this,arguments)}}(),this.get=ee=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:ee}),this.getData(ee)),this.getAll=ee=>(this.isInitialized(),ee?this.values.filter(ie=>Object.keys(ee).every(oe=>Zte()(ie[oe],ee[oe]))):this.values),this.update=function(){var ee=(0,Ke.Z)(function*(ie,oe){J.isInitialized(),J.logger.debug("Updating value"),J.logger.trace({type:"method",method:"update",key:ie,update:oe});const de=HT(HT({},J.getData(ie)),oe);J.map.set(ie,de),yield J.persist()});return function(ie,oe){return ee.apply(this,arguments)}}(),this.delete=function(){var ee=(0,Ke.Z)(function*(ie,oe){J.isInitialized(),J.map.has(ie)&&(J.logger.debug("Deleting value"),J.logger.trace({type:"method",method:"delete",key:ie,reason:oe}),J.map.delete(ie),J.addToRecentlyDeleted(ie),yield J.persist())});return function(ie,oe){return ee.apply(this,arguments)}}(),this.logger=Ua(r,this.name),this.storagePrefix=A,this.getKey=O}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}setDataStore(e){var r=this;return(0,Ke.Z)(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getDataStore(){var e=this;return(0,Ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const r=this.map.get(e);if(!r){if(this.recentlyDeleted.includes(e)){const{message:A}=Bn("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(A),new Error(A)}const{message:a}=Bn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(a),new Error(a)}return r}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return(0,Ke.Z)(function*(){try{const r=yield e.getDataStore();if(typeof r>"u"||!r.length)return;if(e.map.size){const{message:a}=Bn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(a),new Error(a)}e.cached=r,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(r){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(r)}})()}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class pie{constructor(e,r){var a=this;this.core=e,this.logger=r,this.name="pairing",this.version="0.3",this.events=new(g3()),this.initialized=!1,this.storagePrefix=Cd,this.ignoredPayloadTypes=[Md],this.registeredMethods=[],this.init=(0,Ke.Z)(function*(){a.initialized||(yield a.pairings.init(),yield a.cleanup(),a.registerRelayerEvents(),a.registerExpirerEvents(),a.initialized=!0,a.logger.trace("Initialized"))}),this.register=({methods:A})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...A])]},this.create=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized();const J=d6(),ee=yield a.core.crypto.setSymKey(J),ie=$s(rr.FIVE_MINUTES),oe={protocol:"irn"},de={topic:ee,expiry:ie,relay:oe,active:!1},be=iq({protocol:a.core.protocol,version:a.core.version,topic:ee,symKey:J,relay:oe,expiryTimestamp:ie,methods:O?.methods});return yield a.pairings.set(ee,de),yield a.core.relayer.subscribe(ee),a.core.expirer.set(ee,ie),{topic:ee,uri:be}});return function(O){return A.apply(this,arguments)}}(),this.pair=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized(),a.isValidPair(O);const{topic:J,symKey:ee,relay:ie,expiryTimestamp:oe,methods:de}=T7(O.uri);let be;if(a.pairings.keys.includes(J)&&(be=a.pairings.get(J),be.active))throw new Error(`Pairing already exists: ${J}. Please try again with a new connection URI.`);const Ee=oe||$s(rr.FIVE_MINUTES),Ce={topic:J,relay:ie,expiry:Ee,active:!1,methods:de};return yield a.pairings.set(J,Ce),a.core.expirer.set(J,Ee),O.activatePairing&&(yield a.activate({topic:J})),a.events.emit(qg_create,Ce),a.core.crypto.keychain.has(J)||(yield a.core.crypto.setSymKey(ee,J)),yield a.core.relayer.subscribe(J,{relay:ie}),Ce});return function(O){return A.apply(this,arguments)}}(),this.activate=function(){var A=(0,Ke.Z)(function*({topic:O}){a.isInitialized();const J=$s(rr.THIRTY_DAYS);yield a.pairings.update(O,{active:!0,expiry:J}),a.core.expirer.set(O,J)});return function(O){return A.apply(this,arguments)}}(),this.ping=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized(),yield a.isValidPing(O);const{topic:J}=O;if(a.pairings.keys.includes(J)){const ee=yield a.sendRequest(J,"wc_pairingPing",{}),{done:ie,resolve:oe,reject:de}=l0();a.events.once(ti("pairing_ping",ee),({error:be})=>{be?de(be):oe()}),yield ie()}});return function(O){return A.apply(this,arguments)}}(),this.updateExpiry=function(){var A=(0,Ke.Z)(function*({topic:O,expiry:J}){a.isInitialized(),yield a.pairings.update(O,{expiry:J})});return function(O){return A.apply(this,arguments)}}(),this.updateMetadata=function(){var A=(0,Ke.Z)(function*({topic:O,metadata:J}){a.isInitialized(),yield a.pairings.update(O,{peerMetadata:J})});return function(O){return A.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var A=(0,Ke.Z)(function*(O){a.isInitialized(),yield a.isValidDisconnect(O);const{topic:J}=O;a.pairings.keys.includes(J)&&(yield a.sendRequest(J,"wc_pairingDelete",Zi("USER_DISCONNECTED")),yield a.deletePairing(J))});return function(O){return A.apply(this,arguments)}}(),this.sendRequest=function(){var A=(0,Ke.Z)(function*(O,J,ee){const ie=Xg(J,ee),oe=yield a.core.crypto.encode(O,ie),de=a1[J].req;return a.core.history.set(O,ie),a.core.relayer.publish(O,oe,de),ie.id});return function(O,J,ee){return A.apply(this,arguments)}}(),this.sendResult=function(){var A=(0,Ke.Z)(function*(O,J,ee){const ie=A6(O,ee),oe=yield a.core.crypto.encode(J,ie),de=yield a.core.history.get(J,O),be=a1[de.request.method].res;yield a.core.relayer.publish(J,oe,be),yield a.core.history.resolve(ie)});return function(O,J,ee){return A.apply(this,arguments)}}(),this.sendError=function(){var A=(0,Ke.Z)(function*(O,J,ee){const ie=_6(O,ee),oe=yield a.core.crypto.encode(J,ie),de=yield a.core.history.get(J,O),be=a1[de.request.method]?a1[de.request.method].res:a1.unregistered_method.res;yield a.core.relayer.publish(J,oe,be),yield a.core.history.resolve(ie)});return function(O,J,ee){return A.apply(this,arguments)}}(),this.deletePairing=function(){var A=(0,Ke.Z)(function*(O,J){yield a.core.relayer.unsubscribe(O),yield Promise.all([a.pairings.delete(O,Zi("USER_DISCONNECTED")),a.core.crypto.deleteSymKey(O),J?Promise.resolve():a.core.expirer.del(O)])});return function(O,J){return A.apply(this,arguments)}}(),this.cleanup=(0,Ke.Z)(function*(){const A=a.pairings.getAll().filter(O=>Ed(O.expiry));yield Promise.all(A.map(O=>a.deletePairing(O.topic)))}),this.onRelayEventRequest=A=>{const{topic:O,payload:J}=A;switch(J.method){case"wc_pairingPing":return this.onPairingPingRequest(O,J);case"wc_pairingDelete":return this.onPairingDeleteRequest(O,J);default:return this.onUnknownRpcMethodRequest(O,J)}},this.onRelayEventResponse=function(){var A=(0,Ke.Z)(function*(O){const{topic:J,payload:ee}=O,ie=(yield a.core.history.get(J,ee.id)).request.method;return"wc_pairingPing"===ie?a.onPairingPingResponse(J,ee):a.onUnknownRpcMethodResponse(ie)});return function(O){return A.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var A=(0,Ke.Z)(function*(O,J){const{id:ee}=J;try{a.isValidPing({topic:O}),yield a.sendResult(ee,O,!0),a.events.emit(qg_ping,{id:ee,topic:O})}catch(ie){yield a.sendError(ee,O,ie),a.logger.error(ie)}});return function(O,J){return A.apply(this,arguments)}}(),this.onPairingPingResponse=(A,O)=>{const{id:J}=O;setTimeout(()=>{ll(O)?this.events.emit(ti("pairing_ping",J),{}):Kc(O)&&this.events.emit(ti("pairing_ping",J),{error:O.error})},500)},this.onPairingDeleteRequest=function(){var A=(0,Ke.Z)(function*(O,J){const{id:ee}=J;try{a.isValidDisconnect({topic:O}),yield a.deletePairing(O),a.events.emit(qg_delete,{id:ee,topic:O})}catch(ie){yield a.sendError(ee,O,ie),a.logger.error(ie)}});return function(O,J){return A.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var A=(0,Ke.Z)(function*(O,J){const{id:ee,method:ie}=J;try{if(a.registeredMethods.includes(ie))return;const oe=Zi("WC_METHOD_UNSUPPORTED",ie);yield a.sendError(ee,O,oe),a.logger.error(oe)}catch(oe){yield a.sendError(ee,O,oe),a.logger.error(oe)}});return function(O,J){return A.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=A=>{this.registeredMethods.includes(A)||this.logger.error(Zi("WC_METHOD_UNSUPPORTED",A))},this.isValidPair=A=>{var O;if(!Ha(A)){const{message:ee}=Bn("MISSING_OR_INVALID",`pair() params: ${A}`);throw new Error(ee)}if(!function Eq(t){if(Yo(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}(A.uri)){const{message:ee}=Bn("MISSING_OR_INVALID",`pair() uri: ${A.uri}`);throw new Error(ee)}const J=T7(A.uri);if(null==(O=J?.relay)||!O.protocol){const{message:ee}=Bn("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(ee)}if(null==J||!J.symKey){const{message:ee}=Bn("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(ee)}if(null!=J&&J.expiryTimestamp&&(0,rr.toMiliseconds)(J?.expiryTimestamp)a.records.set(A.id,A)),a.cached=[],a.registerEventListeners(),a.initialized=!0)}),this.set=(A,O,J)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:A,request:O,chainId:J}),this.records.has(O.id))return;const ee={id:O.id,topic:A,request:{method:O.method,params:O.params||null},chainId:J,expiry:$s(rr.THIRTY_DAYS)};this.records.set(ee.id,ee),this.persist(),this.events.emit(Cu_created,ee)},this.resolve=function(){var A=(0,Ke.Z)(function*(O){if(a.isInitialized(),a.logger.debug("Updating JSON-RPC response history record"),a.logger.trace({type:"method",method:"update",response:O}),!a.records.has(O.id))return;const J=yield a.getRecord(O.id);typeof J.response>"u"&&(J.response=Kc(O)?{error:O.error}:{result:O.result},a.records.set(J.id,J),a.persist(),a.events.emit(Cu_updated,J))});return function(O){return A.apply(this,arguments)}}(),this.get=function(){var A=(0,Ke.Z)(function*(O,J){return a.isInitialized(),a.logger.debug("Getting record"),a.logger.trace({type:"method",method:"get",topic:O,id:J}),yield a.getRecord(J)});return function(O,J){return A.apply(this,arguments)}}(),this.delete=(A,O)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:O}),this.values.forEach(J=>{if(J.topic===A){if(typeof O<"u"&&J.id!==O)return;this.records.delete(J.id),this.events.emit(Cu_deleted,J)}}),this.persist()},this.exists=function(){var A=(0,Ke.Z)(function*(O,J){return a.isInitialized(),!!a.records.has(J)&&(yield a.getRecord(J)).topic===O});return function(O,J){return A.apply(this,arguments)}}(),this.on=(A,O)=>{this.events.on(A,O)},this.once=(A,O)=>{this.events.once(A,O)},this.off=(A,O)=>{this.events.off(A,O)},this.removeListener=(A,O)=>{this.events.removeListener(A,O)},this.logger=Ua(r,this.name)}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const a={topic:r.topic,request:Xg(r.request.method,r.request.params,r.id),chainId:r.chainId};return e.push(a)}),e}setJsonRpcRecords(e){var r=this;return(0,Ke.Z)(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getJsonRpcRecords(){var e=this;return(0,Ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const r=this.records.get(e);if(!r){const{message:a}=Bn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(a)}return r}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(Cu_sync)})()}restore(){var e=this;return(0,Ke.Z)(function*(){try{const r=yield e.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(e.records.size){const{message:a}=Bn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(a),new Error(a)}e.cached=r,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(r){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(r)}})()}registerEventListeners(){this.events.on(Cu_created,e=>{const r=Cu_created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Cu_updated,e=>{const r=Cu_updated;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.events.on(Cu_deleted,e=>{const r=Cu_deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:e})}),this.core.heartbeat.on(Lv.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(r=>{(0,rr.toMiliseconds)(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.records.delete(r.id),this.events.emit(Cu_deleted,r,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class yie extends OW{constructor(e,r){var a;super(e,r),a=this,this.core=e,this.logger=r,this.expirations=new Map,this.events=new wu.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Cd,this.init=(0,Ke.Z)(function*(){a.initialized||(a.logger.trace("Initialized"),yield a.restore(),a.cached.forEach(A=>a.expirations.set(A.target,A)),a.cached=[],a.registerEventListeners(),a.initialized=!0)}),this.has=A=>{try{const O=this.formatTarget(A);return typeof this.getExpiration(O)<"u"}catch{return!1}},this.set=(A,O)=>{this.isInitialized();const J=this.formatTarget(A),ee={target:J,expiry:O};this.expirations.set(J,ee),this.checkExpiry(J,ee),this.events.emit(Vc_created,{target:J,expiration:ee})},this.get=A=>{this.isInitialized();const O=this.formatTarget(A);return this.getExpiration(O)},this.del=A=>{if(this.isInitialized(),this.has(A)){const O=this.formatTarget(A),J=this.getExpiration(O);this.expirations.delete(O),this.events.emit(Vc_deleted,{target:O,expiration:J})}},this.on=(A,O)=>{this.events.on(A,O)},this.once=(A,O)=>{this.events.once(A,O)},this.off=(A,O)=>{this.events.off(A,O)},this.removeListener=(A,O)=>{this.events.removeListener(A,O)},this.logger=Ua(r,this.name)}get context(){return Fa(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function BY(t){return iD("topic",t)}(e);if("number"==typeof e)return function jY(t){return iD("id",t)}(e);const{message:r}=Bn("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(r)}setExpirations(e){var r=this;return(0,Ke.Z)(function*(){yield r.core.storage.setItem(r.storageKey,e)})()}getExpirations(){var e=this;return(0,Ke.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return(0,Ke.Z)(function*(){yield e.setExpirations(e.values),e.events.emit(Vc_sync)})()}restore(){var e=this;return(0,Ke.Z)(function*(){try{const r=yield e.getExpirations();if(typeof r>"u"||!r.length)return;if(e.expirations.size){const{message:a}=Bn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(a),new Error(a)}e.cached=r,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(r){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(r)}})()}getExpiration(e){const r=this.expirations.get(e);if(!r){const{message:a}=Bn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(a),new Error(a)}return r}checkExpiry(e,r){const{expiry:a}=r;(0,rr.toMiliseconds)(a)-Date.now()<=0&&this.expire(e,r)}expire(e,r){this.expirations.delete(e),this.events.emit(Vc_expired,{target:e,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,r)=>this.checkExpiry(r,e))}registerEventListeners(){this.core.heartbeat.on(Lv.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Vc_created,e=>{const r=Vc_created;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Vc_expired,e=>{const r=Vc_expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()}),this.events.on(Vc_deleted,e=>{const r=Vc_deleted;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=Bn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class mie extends NW{constructor(e,r){var a;super(e,r),a=this,this.projectId=e,this.logger=r,this.name=D6,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var A=(0,Ke.Z)(function*(O){if(a.verifyDisabled||Lg()||!Bg())return;const J=a.getVerifyUrl(O?.verifyUrl);a.verifyUrl!==J&&a.removeIframe(),a.verifyUrl=J;try{yield a.createIframe()}catch(ee){a.logger.info(`Verify iframe failed to load: ${a.verifyUrl}`),a.logger.info(ee)}if(!a.initialized){a.removeIframe(),a.verifyUrl=T6;try{yield a.createIframe()}catch(ee){a.logger.info(`Verify iframe failed to load: ${a.verifyUrl}`),a.logger.info(ee),a.verifyDisabled=!0}}});return function(O){return A.apply(this,arguments)}}(),this.register=function(){var A=(0,Ke.Z)(function*(O){a.initialized?a.sendPost(O.attestationId):(a.addToQueue(O.attestationId),yield a.init())});return function(O){return A.apply(this,arguments)}}(),this.resolve=function(){var A=(0,Ke.Z)(function*(O){if(a.isDevEnv)return"";const J=a.getVerifyUrl(O?.verifyUrl);let ee;try{ee=yield a.fetchAttestation(O.attestationId,J)}catch(ie){a.logger.info(`failed to resolve attestation: ${O.attestationId} from url: ${J}`),a.logger.info(ie),ee=yield a.fetchAttestation(O.attestationId,T6)}return ee});return function(O){return A.apply(this,arguments)}}(),this.fetchAttestation=function(){var A=(0,Ke.Z)(function*(O,J){a.logger.info(`resolving attestation: ${O} from url: ${J}`);const ee=a.startAbortTimer(2*rr.ONE_SECOND),ie=yield fetch(`${J}/attestation/${O}`,{signal:a.abortController.signal});return clearTimeout(ee),200===ie.status?yield ie.json():void 0});return function(O,J){return A.apply(this,arguments)}}(),this.addToQueue=A=>{this.queue.push(A)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(A=>this.sendPost(A)),this.queue=[])},this.sendPost=A=>{var O;try{if(!this.iframe)return;null==(O=this.iframe.contentWindow)||O.postMessage(A,"*"),this.logger.info(`postMessage sent: ${A} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,Ke.Z)(function*(){let A;const O=J=>{"verify_ready"===J.data&&(a.onInit(),window.removeEventListener("message",O),A())};yield Promise.race([new Promise(J=>{const ee=document.getElementById(D6);if(ee)return a.iframe=ee,a.onInit(),J();window.addEventListener("message",O);const ie=document.createElement("iframe");ie.id=D6,ie.src=`${a.verifyUrl}/${a.projectId}`,ie.style.display="none",document.body.append(ie),a.iframe=ie,A=J}),new Promise((J,ee)=>setTimeout(()=>{window.removeEventListener("message",O),ee("verify iframe load timeout")},(0,rr.toMiliseconds)(rr.FIVE_SECONDS)))])}),this.onInit=()=>{this.initialized=!0,this.processQueue()},this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=A=>{let O=A||ey;return Gre.includes(O)||(this.logger.info(`verify url: ${O}, not included in trusted list, assigning default: ${ey}`),O=ey),O},this.logger=Ua(r,this.name),this.verifyUrl=ey,this.abortController=new AbortController,this.isDevEnv=Vv()&&process.env.IS_VITEST}get context(){return Fa(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,rr.toMiliseconds)(e))}}class vie extends PW{constructor(e,r){var a;super(e,r),a=this,this.projectId=e,this.logger=r,this.context="echo",this.registerDeviceToken=function(){var A=(0,Ke.Z)(function*(O){const{clientId:J,token:ee,notificationType:ie,enableEncrypted:oe=!1}=O,de=`https://echo.walletconnect.com/${a.projectId}/clients`;yield Yte()(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:J,type:ie,token:ee,always_raw:oe})})});return function(O){return A.apply(this,arguments)}}(),this.logger=Ua(r,this.context)}}var bie=Object.defineProperty,WT=Object.getOwnPropertySymbols,wie=Object.prototype.hasOwnProperty,Eie=Object.prototype.propertyIsEnumerable,GT=(t,e,r)=>e in t?bie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ZT=(t,e)=>{for(var r in e||(e={}))wie.call(e,r)&>(t,r,e[r]);if(WT)for(var r of WT(e))Eie.call(e,r)&>(t,r,e[r]);return t};class N6 extends SW{constructor(e){var r,a;super(e),r=this,this.protocol="wc",this.version=2,this.name=C6,this.events=new wu.EventEmitter,this.initialized=!1,this.on=(ee,ie)=>this.events.on(ee,ie),this.once=(ee,ie)=>this.events.once(ee,ie),this.off=(ee,ie)=>this.events.off(ee,ie),this.removeListener=(ee,ie)=>this.events.removeListener(ee,ie),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||LT,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const A=h_({level:"string"==typeof e?.logger&&e.logger?e.logger:bre_logger}),{logger:O,chunkLoggerController:J}=_W({opts:A,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=J,null!=(a=this.logChunkController)&&a.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=(0,Ke.Z)(function*(){var ee,ie;null!=(ee=r.logChunkController)&&ee.downloadLogsBlobInBrowser&&(null==(ie=r.logChunkController)||ie.downloadLogsBlobInBrowser({clientId:yield r.crypto.getClientId()}))})),this.logger=Ua(O,this.name),this.heartbeat=new Lv.HeartBeat,this.crypto=new $re(this,this.logger,e?.keychain),this.history=new gie(this,this.logger),this.expirer=new yie(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new cW(ZT(ZT({},wre),e?.storageOptions)),this.relayer=new lie({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new pie(this,this.logger),this.verify=new mie(this.projectId||"",this.logger),this.echoClient=new vie(this.projectId||"",this.logger)}static init(e){return(0,Ke.Z)(function*(){const r=new N6(e);yield r.initialize();const a=yield r.crypto.getClientId();return yield r.storage.setItem("WALLETCONNECT_CLIENT_ID",a),r})()}get context(){return Fa(this.logger)}start(){var e=this;return(0,Ke.Z)(function*(){e.initialized||(yield e.initialize())})()}getLogsBlob(){var e=this;return(0,Ke.Z)(function*(){var r;return null==(r=e.logChunkController)?void 0:r.logsToBlob({clientId:yield e.crypto.getClientId()})})()}initialize(){var e=this;return(0,Ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(r){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),e.logger.error(r.message),r}})()}}const Aie=N6,P6="wc@2:client:",R6_name="client",R6_logger="error",QT="WALLETCONNECT_DEEPLINK_CHOICE",ty=rr.SEVEN_DAYS,Hc={wc_sessionPropose:{req:{ttl:rr.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:rr.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:rr.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:rr.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:rr.ONE_DAY,prompt:!1,tag:1104},res:{ttl:rr.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:rr.ONE_DAY,prompt:!1,tag:1106},res:{ttl:rr.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:rr.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:rr.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:rr.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:rr.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:rr.ONE_DAY,prompt:!1,tag:1112},res:{ttl:rr.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:rr.ONE_DAY,prompt:!1,tag:1114},res:{ttl:rr.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:rr.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:rr.ONE_HOUR,prompt:!1,tag:1117}}},k6={min:rr.FIVE_MINUTES,max:rr.SEVEN_DAYS},pf_idle="IDLE",pf_active="ACTIVE",Cie=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"],b2="wc@1.5:auth:",w2=`${b2}:PUB_KEY`;var Rie=Object.defineProperty,kie=Object.defineProperties,Lie=Object.getOwnPropertyDescriptors,XT=Object.getOwnPropertySymbols,Bie=Object.prototype.hasOwnProperty,jie=Object.prototype.propertyIsEnumerable,qT=(t,e,r)=>e in t?Rie(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ws=(t,e)=>{for(var r in e||(e={}))Bie.call(e,r)&&qT(t,r,e[r]);if(XT)for(var r of XT(e))jie.call(e,r)&&qT(t,r,e[r]);return t},ny=(t,e)=>kie(t,Lie(e));class Fie extends kW{constructor(e){var r;super(e),r=this,this.name="engine",this.events=new(g3()),this.initialized=!1,this.requestQueue={state:pf_idle,queue:[]},this.sessionRequestQueue={state:pf_idle,queue:[]},this.requestQueueDelay=rr.ONE_SECOND,this.expectedPairingMethodMap=new Map,this.recentlyDeletedMap=new Map,this.recentlyDeletedLimit=200,this.init=(0,Ke.Z)(function*(){r.initialized||(yield r.cleanup(),r.registerRelayerEvents(),r.registerExpirerEvents(),r.registerPairingEvents(),r.client.core.pairing.register({methods:Object.keys(Hc)}),r.initialized=!0,setTimeout(()=>{r.sessionRequestQueue.queue=r.getPendingSessionRequests(),r.processSessionRequestQueue()},(0,rr.toMiliseconds)(r.requestQueueDelay)))}),this.connect=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();const O=ny(ws({},A),{requiredNamespaces:A.requiredNamespaces||{},optionalNamespaces:A.optionalNamespaces||{}});yield r.isValidConnect(O);const{pairingTopic:J,requiredNamespaces:ee,optionalNamespaces:ie,sessionProperties:oe,relays:de}=O;let Ee,be=J,Ce=!1;try{be&&(Ce=r.client.core.pairing.pairings.get(be).active)}catch(Zt){throw r.client.logger.error(`connect() -> pairing.get(${be}) failed`),Zt}if(!be||!Ce){const{topic:Zt,uri:En}=yield r.client.core.pairing.create();be=Zt,Ee=En}if(!be){const{message:Zt}=Bn("NO_MATCHING_KEY",`connect() pairing topic: ${be}`);throw new Error(Zt)}const Ie=yield r.client.core.crypto.generateKeyPair(),Ue=Hc.wc_sessionPropose.req.ttl||rr.FIVE_MINUTES,We=$s(Ue),$e=ws({requiredNamespaces:ee,optionalNamespaces:ie,relays:de??[{protocol:"irn"}],proposer:{publicKey:Ie,metadata:r.client.metadata},expiryTimestamp:We},oe&&{sessionProperties:oe}),{reject:ht,resolve:ct,done:wt}=l0(Ue,"Proposal expired");r.events.once(ti("session_connect"),function(){var Zt=(0,Ke.Z)(function*({error:En,session:Yt}){if(En)ht(En);else if(Yt){Yt.self.publicKey=Ie;const Xt=ny(ws({},Yt),{requiredNamespaces:$e.requiredNamespaces,optionalNamespaces:$e.optionalNamespaces});yield r.client.session.set(Yt.topic,Xt),yield r.setExpiry(Yt.topic,Yt.expiry),be&&(yield r.client.core.pairing.updateMetadata({topic:be,metadata:Yt.peer.metadata})),ct(Xt)}});return function(En){return Zt.apply(this,arguments)}}());const zt=yield r.sendRequest({topic:be,method:"wc_sessionPropose",params:$e,throwOnFailedPublish:!0});return yield r.setProposal(zt,ws({id:zt},$e)),{uri:Ee,approval:wt}});return function(A){return a.apply(this,arguments)}}(),this.pair=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{return yield r.client.core.pairing.pair(A)}catch(O){throw r.client.logger.error("pair() failed"),O}});return function(A){return a.apply(this,arguments)}}(),this.approve=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidApprove(A)}catch(wt){throw r.client.logger.error("approve() -> isValidApprove() failed"),wt}const{id:O,relayProtocol:J,namespaces:ee,sessionProperties:ie,sessionConfig:oe}=A;let de;try{de=r.client.proposal.get(O)}catch(wt){throw r.client.logger.error(`approve() -> proposal.get(${O}) failed`),wt}let{pairingTopic:be,proposer:Ee,requiredNamespaces:Ce,optionalNamespaces:Ie}=de;be=be||"";const Ue=yield r.client.core.crypto.generateKeyPair(),We=Ee.publicKey,$e=yield r.client.core.crypto.generateSharedKey(Ue,We),ht=ws(ws({relay:{protocol:J??"irn"},namespaces:ee,pairingTopic:be,controller:{publicKey:Ue,metadata:r.client.metadata},expiry:$s(ty)},ie&&{sessionProperties:ie}),oe&&{sessionConfig:oe});yield r.client.core.relayer.subscribe($e);const ct=ny(ws({},ht),{topic:$e,requiredNamespaces:Ce,optionalNamespaces:Ie,pairingTopic:be,acknowledged:!1,self:ht.controller,peer:{publicKey:Ee.publicKey,metadata:Ee.metadata},controller:Ue});yield r.client.session.set($e,ct);try{yield r.sendResult({id:O,topic:be,result:{relay:{protocol:J??"irn"},responderPublicKey:Ue},throwOnFailedPublish:!0}),yield r.sendRequest({topic:$e,method:"wc_sessionSettle",params:ht,throwOnFailedPublish:!0})}catch(wt){throw r.client.logger.error(wt),r.client.session.delete($e,Zi("USER_DISCONNECTED")),yield r.client.core.relayer.unsubscribe($e),wt}return yield r.client.core.pairing.updateMetadata({topic:be,metadata:Ee.metadata}),yield r.client.proposal.delete(O,Zi("USER_DISCONNECTED")),yield r.client.core.pairing.activate({topic:be}),yield r.setExpiry($e,$s(ty)),{topic:$e,acknowledged:()=>new Promise(wt=>setTimeout(()=>wt(r.client.session.get($e)),500))}});return function(A){return a.apply(this,arguments)}}(),this.reject=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidReject(A)}catch(ie){throw r.client.logger.error("reject() -> isValidReject() failed"),ie}const{id:O,reason:J}=A;let ee;try{ee=r.client.proposal.get(O).pairingTopic}catch(ie){throw r.client.logger.error(`reject() -> proposal.get(${O}) failed`),ie}ee&&(yield r.sendError({id:O,topic:ee,error:J}),yield r.client.proposal.delete(O,Zi("USER_DISCONNECTED")))});return function(A){return a.apply(this,arguments)}}(),this.update=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidUpdate(A)}catch(Ce){throw r.client.logger.error("update() -> isValidUpdate() failed"),Ce}const{topic:O,namespaces:J}=A,{done:ee,resolve:ie,reject:oe}=l0(),de=Id(),be=g0().toString(),Ee=r.client.session.get(O).namespaces;return r.events.once(ti("session_update",de),({error:Ce})=>{Ce?oe(Ce):ie()}),yield r.client.session.update(O,{namespaces:J}),r.sendRequest({topic:O,method:"wc_sessionUpdate",params:{namespaces:J},throwOnFailedPublish:!0,clientRpcId:de,relayRpcId:be}).catch(Ce=>{r.client.logger.error(Ce),r.client.session.update(O,{namespaces:Ee}),oe(Ce)}),{acknowledged:ee}});return function(A){return a.apply(this,arguments)}}(),this.extend=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidExtend(A)}catch(de){throw r.client.logger.error("extend() -> isValidExtend() failed"),de}const{topic:O}=A,J=Id(),{done:ee,resolve:ie,reject:oe}=l0();return r.events.once(ti("session_extend",J),({error:de})=>{de?oe(de):ie()}),yield r.setExpiry(O,$s(ty)),r.sendRequest({topic:O,method:"wc_sessionExtend",params:{},clientRpcId:J,throwOnFailedPublish:!0}).catch(de=>{oe(de)}),{acknowledged:ee}});return function(A){return a.apply(this,arguments)}}(),this.request=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidRequest(A)}catch(Ue){throw r.client.logger.error("request() -> isValidRequest() failed"),Ue}const{chainId:O,request:J,topic:ee,expiry:ie=Hc.wc_sessionRequest.req.ttl}=A,oe=r.client.session.get(ee),de=Id(),be=g0().toString(),{done:Ee,resolve:Ce,reject:Ie}=l0(ie,"Request expired. Please try again.");return r.events.once(ti("session_request",de),({error:Ue,result:We})=>{Ue?Ie(Ue):Ce(We)}),yield Promise.all([new Promise(function(){var Ue=(0,Ke.Z)(function*(We){yield r.sendRequest({clientRpcId:de,relayRpcId:be,topic:ee,method:"wc_sessionRequest",params:{request:ny(ws({},J),{expiryTimestamp:$s(ie)}),chainId:O},expiry:ie,throwOnFailedPublish:!0}).catch($e=>Ie($e)),r.client.events.emit("session_request_sent",{topic:ee,request:J,chainId:O,id:de}),We()});return function(We){return Ue.apply(this,arguments)}}()),new Promise(function(){var Ue=(0,Ke.Z)(function*(We){var $e;if(null==($e=oe.sessionConfig)||!$e.disableDeepLink){const ht=yield function UY(t,e){return O_.apply(this,arguments)}(r.client.core.storage,QT);!function FY(t){return T_.apply(this,arguments)}({id:de,topic:ee,wcDeepLink:ht})}We()});return function(We){return Ue.apply(this,arguments)}}()),Ee()]).then(Ue=>Ue[2])});return function(A){return a.apply(this,arguments)}}(),this.respond=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized(),yield r.isValidRespond(A);const{topic:O,response:J}=A,{id:ee}=J;ll(J)?yield r.sendResult({id:ee,topic:O,result:J.result,throwOnFailedPublish:!0}):Kc(J)&&(yield r.sendError({id:ee,topic:O,error:J.error})),r.cleanupAfterResponse(A)});return function(A){return a.apply(this,arguments)}}(),this.ping=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();try{yield r.isValidPing(A)}catch(J){throw r.client.logger.error("ping() -> isValidPing() failed"),J}const{topic:O}=A;if(r.client.session.keys.includes(O)){const J=Id(),ee=g0().toString(),{done:ie,resolve:oe,reject:de}=l0();r.events.once(ti("session_ping",J),({error:be})=>{be?de(be):oe()}),yield Promise.all([r.sendRequest({topic:O,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:J,relayRpcId:ee}),ie()])}else r.client.core.pairing.pairings.keys.includes(O)&&(yield r.client.core.pairing.ping({topic:O}))});return function(A){return a.apply(this,arguments)}}(),this.emit=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized(),yield r.isValidEmit(A);const{topic:O,event:J,chainId:ee}=A,ie=g0().toString();yield r.sendRequest({topic:O,method:"wc_sessionEvent",params:{event:J,chainId:ee},throwOnFailedPublish:!0,relayRpcId:ie})});return function(A){return a.apply(this,arguments)}}(),this.disconnect=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized(),yield r.isValidDisconnect(A);const{topic:O}=A;if(r.client.session.keys.includes(O))yield r.sendRequest({topic:O,method:"wc_sessionDelete",params:Zi("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield r.deleteSession({topic:O,emitEvent:!1});else{if(!r.client.core.pairing.pairings.keys.includes(O)){const{message:J}=Bn("MISMATCHED_TOPIC",`Session or pairing topic not found: ${O}`);throw new Error(J)}yield r.client.core.pairing.disconnect({topic:O})}});return function(A){return a.apply(this,arguments)}}(),this.find=a=>(this.isInitialized(),this.client.session.getAll().filter(A=>function bq(t,e){const{requiredNamespaces:r}=e,a=Object.keys(t.namespaces),A=Object.keys(r);let O=!0;return!!u0(A,a)&&(a.forEach(J=>{const{accounts:ee,methods:ie,events:oe}=t.namespaces[J],de=Qg(ee),be=r[J];u0(C_(J,be),de)&&u0(be.methods,ie)&&u0(be.events,oe)||(O=!1)}),O)}(A,a))),this.getPendingSessionRequests=()=>this.client.pendingRequest.getAll(),this.authenticate=function(){var a=(0,Ke.Z)(function*(A){r.isInitialized(),r.isValidAuthenticate(A);const{chains:O,statement:J="",uri:ee,domain:ie,nonce:oe,type:de,exp:be,nbf:Ee,methods:Ce=[]}=A,Ie=[...A.resources||[]],{topic:Ue,uri:We}=yield r.client.core.pairing.create({methods:["wc_sessionAuthenticate"]});r.client.logger.info({message:"Generated new pairing",pairing:{topic:Ue,uri:We}});const $e=yield r.client.core.crypto.generateKeyPair(),ht=c2($e);if(yield Promise.all([r.client.auth.authKeys.set(w2,{responseTopic:ht,publicKey:$e}),r.client.auth.pairingTopics.set(ht,{topic:ht,pairingTopic:Ue})]),yield r.client.core.relayer.subscribe(ht),r.client.logger.info(`sending request to new pairing topic: ${Ue}`),Ce.length>0){const{namespace:Je}=Zw(O[0]);let rt=LX(Je,"request",Ce);$g(Ie)&&(rt=BX(rt,Ie.pop())),Ie.push(rt)}const ct=$s(Hc.wc_sessionPropose.req.ttl),wt={authPayload:{type:de??"caip122",chains:O,statement:J,aud:ee,domain:ie,version:"1",nonce:oe,iat:(new Date).toISOString(),exp:be,nbf:Ee,resources:Ie},requester:{publicKey:$e,metadata:r.client.metadata},expiryTimestamp:ct},Zt={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:O,methods:[...new Set(["personal_sign",...Ce])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],proposer:{publicKey:$e,metadata:r.client.metadata},expiryTimestamp:ct},{done:En,resolve:Yt,reject:Xt}=l0(Hc.wc_sessionAuthenticate.req.ttl,"Request expired"),xn=function(){var Je=(0,Ke.Z)(function*({error:rt,session:lt}){if(r.events.off(ti("session_request",Ln),Pn),rt)Xt(rt);else if(lt){lt.self.publicKey=$e,yield r.client.session.set(lt.topic,lt),yield r.setExpiry(lt.topic,lt.expiry),Ue&&(yield r.client.core.pairing.updateMetadata({topic:Ue,metadata:lt.peer.metadata}));const vt=r.client.session.get(lt.topic);Yt({session:vt})}});return function(lt){return Je.apply(this,arguments)}}(),Pn=function(){var Je=(0,Ke.Z)(function*(rt){if(rt.error){const ft=Zi("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return rt.error.code===ft.code?void 0:(r.events.off(ti("session_connect"),xn),Xt(rt.error.message))}r.events.off(ti("session_connect"),xn);const{cacaos:lt,responder:vt}=rt.result,Mt=[],St=[];for(const ft of lt){(yield g7({cacao:ft,projectId:r.client.core.projectId}))||(r.client.logger.error(ft,"Signature verification failed"),Xt(Zi("SESSION_SETTLEMENT_FAILED","Signature verification failed")));const{p:er}=ft,Un=$g(er.resources),tt=[p7(er.iss)],tn=a2(er.iss);if(Un){const Qt=w7(Un),un=E7(Un);Mt.push(...Qt),tt.push(...un)}for(const Qt of tt)St.push(`${Qt}:${tn}`)}const yt=yield r.client.core.crypto.generateSharedKey($e,vt.publicKey);let Ve;Mt.length>0&&(Ve={topic:yt,acknowledged:!0,self:{publicKey:$e,metadata:r.client.metadata},peer:vt,controller:vt.publicKey,expiry:$s(ty),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:Ue,namespaces:k7([...new Set(Mt)],[...new Set(St)])},yield r.client.core.relayer.subscribe(yt),yield r.client.session.set(yt,Ve),Ve=r.client.session.get(yt)),Yt({auths:lt,session:Ve})});return function(lt){return Je.apply(this,arguments)}}(),Ln=Id(),Ne=Id();r.events.once(ti("session_connect"),xn),r.events.once(ti("session_request",Ln),Pn);try{yield Promise.all([r.sendRequest({topic:Ue,method:"wc_sessionAuthenticate",params:wt,expiry:A.expiry,throwOnFailedPublish:!0,clientRpcId:Ln}),r.sendRequest({topic:Ue,method:"wc_sessionPropose",params:Zt,expiry:Hc.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:Ne})])}catch(Je){throw r.events.off(ti("session_connect"),xn),r.events.off(ti("session_request",Ln),Pn),Je}return yield r.setProposal(Ne,ws({id:Ne},Zt)),yield r.client.auth.requests.set(Ln,{authPayload:wt.authPayload,requester:wt.requester,expiryTimestamp:ct,id:Ln,pairingTopic:Ue,verifyContext:{}}),{uri:We,response:En}});return function(A){return a.apply(this,arguments)}}(),this.approveSessionAuthenticate=function(){var a=(0,Ke.Z)(function*(A){r.isInitialized();const{id:O,auths:J}=A,ee=r.getPendingAuthRequest(O);if(!ee)throw new Error(`Could not find pending auth request with id ${O}`);const ie=ee.requester.publicKey,oe=yield r.client.core.crypto.generateKeyPair(),de=c2(ie),be={type:Md,receiverPublicKey:ie,senderPublicKey:oe},Ee=[],Ce=[];for(const We of J){if(!(yield g7({cacao:We,projectId:r.client.core.projectId}))){const zt=Zi("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw yield r.sendError({id:O,topic:de,error:zt,encodeOpts:be}),new Error(zt.message)}const{p:$e}=We,ht=$g($e.resources),ct=[p7($e.iss)],wt=a2($e.iss);if(ht){const zt=w7(ht),Zt=E7(ht);Ee.push(...zt),ct.push(...Zt)}for(const zt of ct)Ce.push(`${zt}:${wt}`)}const Ie=yield r.client.core.crypto.generateSharedKey(oe,ie);let Ue;return Ee?.length>0&&(Ue={topic:Ie,acknowledged:!0,self:{publicKey:oe,metadata:r.client.metadata},peer:{publicKey:ie,metadata:ee.requester.metadata},controller:ie,expiry:$s(ty),authentication:J,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:"",namespaces:k7([...new Set(Ee)],[...new Set(Ce)])},yield r.client.core.relayer.subscribe(Ie),yield r.client.session.set(Ie,Ue)),yield r.sendResult({topic:de,id:O,result:{cacaos:J,responder:{publicKey:oe,metadata:r.client.metadata}},encodeOpts:be,throwOnFailedPublish:!0}),yield r.client.auth.requests.delete(O,{message:"fullfilled",code:0}),yield r.client.core.pairing.activate({topic:ee.pairingTopic}),{session:Ue}});return function(A){return a.apply(this,arguments)}}(),this.rejectSessionAuthenticate=function(){var a=(0,Ke.Z)(function*(A){yield r.isInitialized();const{id:O,reason:J}=A,ee=r.getPendingAuthRequest(O);if(!ee)throw new Error(`Could not find pending auth request with id ${O}`);const ie=ee.requester.publicKey,oe=yield r.client.core.crypto.generateKeyPair(),de=c2(ie),be={type:Md,receiverPublicKey:ie,senderPublicKey:oe};yield r.sendError({id:O,topic:de,error:J,encodeOpts:be}),yield r.client.auth.requests.delete(O,{message:"rejected",code:0}),yield r.client.proposal.delete(O,Zi("USER_DISCONNECTED"))});return function(A){return a.apply(this,arguments)}}(),this.formatAuthMessage=a=>{this.isInitialized();const{request:A,iss:O}=a;return y7(A,O)},this.cleanupDuplicatePairings=function(){var a=(0,Ke.Z)(function*(A){if(A.pairingTopic)try{const O=r.client.core.pairing.pairings.get(A.pairingTopic),J=r.client.core.pairing.pairings.getAll().filter(ee=>{var ie,oe;return(null==(ie=ee.peerMetadata)?void 0:ie.url)&&(null==(oe=ee.peerMetadata)?void 0:oe.url)===A.peer.metadata.url&&ee.topic&&ee.topic!==O.topic});if(0===J.length)return;r.client.logger.info(`Cleaning up ${J.length} duplicate pairing(s)`),yield Promise.all(J.map(ee=>r.client.core.pairing.disconnect({topic:ee.topic}))),r.client.logger.info("Duplicate pairings clean up finished")}catch(O){r.client.logger.error(O)}});return function(A){return a.apply(this,arguments)}}(),this.deleteSession=function(){var a=(0,Ke.Z)(function*(A){const{topic:O,expirerHasDeleted:J=!1,emitEvent:ee=!0,id:ie=0}=A,{self:oe}=r.client.session.get(O);yield r.client.core.relayer.unsubscribe(O),yield r.client.session.delete(O,Zi("USER_DISCONNECTED")),r.addToRecentlyDeleted(O,"session"),r.client.core.crypto.keychain.has(oe.publicKey)&&(yield r.client.core.crypto.deleteKeyPair(oe.publicKey)),r.client.core.crypto.keychain.has(O)&&(yield r.client.core.crypto.deleteSymKey(O)),J||r.client.core.expirer.del(O),r.client.core.storage.removeItem(QT).catch(de=>r.client.logger.warn(de)),r.getPendingSessionRequests().forEach(de=>{de.topic===O&&r.deletePendingSessionRequest(de.id,Zi("USER_DISCONNECTED"))}),ee&&r.client.events.emit("session_delete",{id:ie,topic:O})});return function(A){return a.apply(this,arguments)}}(),this.deleteProposal=function(){var a=(0,Ke.Z)(function*(A,O){yield Promise.all([r.client.proposal.delete(A,Zi("USER_DISCONNECTED")),O?Promise.resolve():r.client.core.expirer.del(A)]),r.addToRecentlyDeleted(A,"proposal")});return function(A,O){return a.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var a=(0,Ke.Z)(function*(A,O,J=!1){yield Promise.all([r.client.pendingRequest.delete(A,O),J?Promise.resolve():r.client.core.expirer.del(A)]),r.addToRecentlyDeleted(A,"request"),r.sessionRequestQueue.queue=r.sessionRequestQueue.queue.filter(ee=>ee.id!==A),J&&(r.sessionRequestQueue.state=pf_idle,r.client.events.emit("session_request_expire",{id:A}))});return function(A,O){return a.apply(this,arguments)}}(),this.setExpiry=function(){var a=(0,Ke.Z)(function*(A,O){r.client.session.keys.includes(A)&&(yield r.client.session.update(A,{expiry:O})),r.client.core.expirer.set(A,O)});return function(A,O){return a.apply(this,arguments)}}(),this.setProposal=function(){var a=(0,Ke.Z)(function*(A,O){yield r.client.proposal.set(A,O),r.client.core.expirer.set(A,$s(Hc.wc_sessionPropose.req.ttl))});return function(A,O){return a.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var a=(0,Ke.Z)(function*(A){const{id:O,topic:J,params:ee,verifyContext:ie}=A,oe=ee.request.expiryTimestamp||$s(Hc.wc_sessionRequest.req.ttl);yield r.client.pendingRequest.set(O,{id:O,topic:J,params:ee,verifyContext:ie}),oe&&r.client.core.expirer.set(O,oe)});return function(A){return a.apply(this,arguments)}}(),this.sendRequest=function(){var a=(0,Ke.Z)(function*(A){const{topic:O,method:J,params:ee,expiry:ie,relayRpcId:oe,clientRpcId:de,throwOnFailedPublish:be}=A,Ee=Xg(J,ee,de);if(Bg()&&Cie.includes(J)){const Ue=p0(JSON.stringify(Ee));r.client.core.verify.register({attestationId:Ue})}let Ce;try{Ce=yield r.client.core.crypto.encode(O,Ee)}catch(Ue){throw yield r.cleanup(),r.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${O} failed`),Ue}const Ie=Hc[J].req;return ie&&(Ie.ttl=ie),oe&&(Ie.id=oe),r.client.core.history.set(O,Ee),be?(Ie.internal=ny(ws({},Ie.internal),{throwOnFailedPublish:!0}),yield r.client.core.relayer.publish(O,Ce,Ie)):r.client.core.relayer.publish(O,Ce,Ie).catch(Ue=>r.client.logger.error(Ue)),Ee.id});return function(A){return a.apply(this,arguments)}}(),this.sendResult=function(){var a=(0,Ke.Z)(function*(A){const{id:O,topic:J,result:ee,throwOnFailedPublish:ie,encodeOpts:oe}=A,de=A6(O,ee);let be,Ee;try{be=yield r.client.core.crypto.encode(J,de,oe)}catch(Ie){throw yield r.cleanup(),r.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${J} failed`),Ie}try{Ee=yield r.client.core.history.get(J,O)}catch(Ie){throw r.client.logger.error(`sendResult() -> history.get(${J}, ${O}) failed`),Ie}const Ce=Hc[Ee.request.method].res;ie?(Ce.internal=ny(ws({},Ce.internal),{throwOnFailedPublish:!0}),yield r.client.core.relayer.publish(J,be,Ce)):r.client.core.relayer.publish(J,be,Ce).catch(Ie=>r.client.logger.error(Ie)),yield r.client.core.history.resolve(de)});return function(A){return a.apply(this,arguments)}}(),this.sendError=function(){var a=(0,Ke.Z)(function*(A){const{id:O,topic:J,error:ee,encodeOpts:ie}=A,oe=_6(O,ee);let de,be;try{de=yield r.client.core.crypto.encode(J,oe,ie)}catch(Ce){throw yield r.cleanup(),r.client.logger.error(`sendError() -> core.crypto.encode() for topic ${J} failed`),Ce}try{be=yield r.client.core.history.get(J,O)}catch(Ce){throw r.client.logger.error(`sendError() -> history.get(${J}, ${O}) failed`),Ce}const Ee=Hc[be.request.method].res;r.client.core.relayer.publish(J,de,Ee),yield r.client.core.history.resolve(oe)});return function(A){return a.apply(this,arguments)}}(),this.cleanup=(0,Ke.Z)(function*(){const a=[],A=[];r.client.session.getAll().forEach(O=>{let J=!1;Ed(O.expiry)&&(J=!0),r.client.core.crypto.keychain.has(O.topic)||(J=!0),J&&a.push(O.topic)}),r.client.proposal.getAll().forEach(O=>{Ed(O.expiryTimestamp)&&A.push(O.id)}),yield Promise.all([...a.map(O=>r.deleteSession({topic:O})),...A.map(O=>r.deleteProposal(O))])}),this.onRelayEventRequest=function(){var a=(0,Ke.Z)(function*(A){r.requestQueue.queue.push(A),yield r.processRequestsQueue()});return function(A){return a.apply(this,arguments)}}(),this.processRequestsQueue=(0,Ke.Z)(function*(){if(r.requestQueue.state!==pf_active){for(r.client.logger.info(`Request queue starting with ${r.requestQueue.queue.length} requests`);r.requestQueue.queue.length>0;){r.requestQueue.state=pf_active;const a=r.requestQueue.queue.shift();if(a)try{r.processRequest(a),yield new Promise(A=>setTimeout(A,300))}catch(A){r.client.logger.warn(A)}}r.requestQueue.state=pf_idle}else r.client.logger.info("Request queue already active, skipping...")}),this.processRequest=a=>{const{topic:A,payload:O}=a,J=O.method;if(!this.shouldIgnorePairingRequest({topic:A,requestMethod:J}))switch(J){case"wc_sessionPropose":return this.onSessionProposeRequest(A,O);case"wc_sessionSettle":return this.onSessionSettleRequest(A,O);case"wc_sessionUpdate":return this.onSessionUpdateRequest(A,O);case"wc_sessionExtend":return this.onSessionExtendRequest(A,O);case"wc_sessionPing":return this.onSessionPingRequest(A,O);case"wc_sessionDelete":return this.onSessionDeleteRequest(A,O);case"wc_sessionRequest":return this.onSessionRequest(A,O);case"wc_sessionEvent":return this.onSessionEventRequest(A,O);case"wc_sessionAuthenticate":return this.onSessionAuthenticateRequest(A,O);default:return this.client.logger.info(`Unsupported request method ${J}`)}},this.onRelayEventResponse=function(){var a=(0,Ke.Z)(function*(A){const{topic:O,payload:J}=A,ee=(yield r.client.core.history.get(O,J.id)).request.method;switch(ee){case"wc_sessionPropose":return r.onSessionProposeResponse(O,J);case"wc_sessionSettle":return r.onSessionSettleResponse(O,J);case"wc_sessionUpdate":return r.onSessionUpdateResponse(O,J);case"wc_sessionExtend":return r.onSessionExtendResponse(O,J);case"wc_sessionPing":return r.onSessionPingResponse(O,J);case"wc_sessionRequest":return r.onSessionRequestResponse(O,J);case"wc_sessionAuthenticate":return r.onSessionAuthenticateResponse(O,J);default:return r.client.logger.info(`Unsupported response method ${ee}`)}});return function(A){return a.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=a=>{const{topic:A}=a,{message:O}=Bn("MISSING_OR_INVALID",`Decoded payload on topic ${A} is not identifiable as a JSON-RPC request or a response.`);throw new Error(O)},this.shouldIgnorePairingRequest=a=>{const{topic:A,requestMethod:O}=a,J=this.expectedPairingMethodMap.get(A);return!(!J||J.includes(O))&&!!(J.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)},this.onSessionProposeRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{params:J,id:ee}=O;try{r.isValidConnect(ws({},O.params));const ie=J.expiryTimestamp||$s(Hc.wc_sessionPropose.req.ttl),oe=ws({id:ee,pairingTopic:A,expiryTimestamp:ie},J);yield r.setProposal(ee,oe);const de=p0(JSON.stringify(O)),be=yield r.getVerifyContext(de,oe.proposer.metadata);r.client.events.emit("session_proposal",{id:ee,params:oe,verifyContext:be})}catch(ie){yield r.sendError({id:ee,topic:A,error:ie}),r.client.logger.error(ie)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J}=O;if(ll(O)){const{result:ee}=O;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:ee});const ie=r.client.proposal.get(J);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:ie});const oe=ie.proposer.publicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:oe});const de=ee.responderPublicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:de});const be=yield r.client.core.crypto.generateSharedKey(oe,de);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:be});const Ee=yield r.client.core.relayer.subscribe(be);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:Ee}),yield r.client.core.pairing.activate({topic:A})}else if(Kc(O)){yield r.client.proposal.delete(J,Zi("USER_DISCONNECTED"));const ee=ti("session_connect");if(0===r.events.listenerCount(ee))throw new Error(`emitting ${ee} without any listeners, 954`);r.events.emit(ti("session_connect"),{error:O.error})}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J,params:ee}=O;try{r.isValidSessionSettleRequest(ee);const{relay:ie,controller:oe,expiry:de,namespaces:be,sessionProperties:Ee,pairingTopic:Ce,sessionConfig:Ie}=O.params,Ue=ws(ws({topic:A,relay:ie,expiry:de,namespaces:be,acknowledged:!0,pairingTopic:Ce,requiredNamespaces:{},optionalNamespaces:{},controller:oe.publicKey,self:{publicKey:"",metadata:r.client.metadata},peer:{publicKey:oe.publicKey,metadata:oe.metadata}},Ee&&{sessionProperties:Ee}),Ie&&{sessionConfig:Ie});yield r.sendResult({id:O.id,topic:A,result:!0,throwOnFailedPublish:!0});const We=ti("session_connect");if(0===r.events.listenerCount(We))throw new Error(`emitting ${We} without any listeners 997`);r.events.emit(ti("session_connect"),{session:Ue}),r.cleanupDuplicatePairings(Ue)}catch(ie){yield r.sendError({id:J,topic:A,error:ie}),r.client.logger.error(ie)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J}=O;ll(O)?(yield r.client.session.update(A,{acknowledged:!0}),r.events.emit(ti("session_approve",J),{})):Kc(O)&&(yield r.client.session.delete(A,Zi("USER_DISCONNECTED")),r.events.emit(ti("session_approve",J),{error:O.error}))});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{params:J,id:ee}=O;try{const ie=`${A}_session_update`,oe=n1.get(ie);if(oe&&r.isRequestOutOfSync(oe,ee))return r.client.logger.info(`Discarding out of sync request - ${ee}`),void r.sendError({id:ee,topic:A,error:Zi("INVALID_UPDATE_REQUEST")});r.isValidUpdate(ws({topic:A},J));try{n1.set(ie,ee),yield r.client.session.update(A,{namespaces:J.namespaces}),yield r.sendResult({id:ee,topic:A,result:!0,throwOnFailedPublish:!0})}catch(de){throw n1.delete(ie),de}r.client.events.emit("session_update",{id:ee,topic:A,params:J})}catch(ie){yield r.sendError({id:ee,topic:A,error:ie}),r.client.logger.error(ie)}});return function(A,O){return a.apply(this,arguments)}}(),this.isRequestOutOfSync=(a,A)=>parseInt(A.toString().slice(0,-3))<=parseInt(a.toString().slice(0,-3)),this.onSessionUpdateResponse=(a,A)=>{const{id:O}=A,J=ti("session_update",O);if(0===this.events.listenerCount(J))throw new Error(`emitting ${J} without any listeners`);ll(A)?this.events.emit(ti("session_update",O),{}):Kc(A)&&this.events.emit(ti("session_update",O),{error:A.error})},this.onSessionExtendRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J}=O;try{r.isValidExtend({topic:A}),yield r.setExpiry(A,$s(ty)),yield r.sendResult({id:J,topic:A,result:!0,throwOnFailedPublish:!0}),r.client.events.emit("session_extend",{id:J,topic:A})}catch(ee){yield r.sendError({id:J,topic:A,error:ee}),r.client.logger.error(ee)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionExtendResponse=(a,A)=>{const{id:O}=A,J=ti("session_extend",O);if(0===this.events.listenerCount(J))throw new Error(`emitting ${J} without any listeners`);ll(A)?this.events.emit(ti("session_extend",O),{}):Kc(A)&&this.events.emit(ti("session_extend",O),{error:A.error})},this.onSessionPingRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J}=O;try{r.isValidPing({topic:A}),yield r.sendResult({id:J,topic:A,result:!0,throwOnFailedPublish:!0}),r.client.events.emit("session_ping",{id:J,topic:A})}catch(ee){yield r.sendError({id:J,topic:A,error:ee}),r.client.logger.error(ee)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionPingResponse=(a,A)=>{const{id:O}=A,J=ti("session_ping",O);if(0===this.events.listenerCount(J))throw new Error(`emitting ${J} without any listeners`);setTimeout(()=>{ll(A)?this.events.emit(ti("session_ping",O),{}):Kc(A)&&this.events.emit(ti("session_ping",O),{error:A.error})},500)},this.onSessionDeleteRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J}=O;try{r.isValidDisconnect({topic:A,reason:O.params}),yield Promise.all([new Promise(ee=>{r.client.core.relayer.once(hc_publish,(0,Ke.Z)(function*(){ee(yield r.deleteSession({topic:A,id:J}))}))}),r.sendResult({id:J,topic:A,result:!0,throwOnFailedPublish:!0}),r.cleanupPendingSentRequestsForTopic({topic:A,error:Zi("USER_DISCONNECTED")})])}catch(ee){r.client.logger.error(ee)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J,params:ee}=O;try{yield r.isValidRequest(ws({topic:A},ee));const ie=p0(JSON.stringify(Xg("wc_sessionRequest",ee,J))),oe=r.client.session.get(A),be={id:J,topic:A,params:ee,verifyContext:yield r.getVerifyContext(ie,oe.peer.metadata)};yield r.setPendingSessionRequest(be),r.addSessionRequestToSessionRequestQueue(be),r.processSessionRequestQueue()}catch(ie){yield r.sendError({id:J,topic:A,error:ie}),r.client.logger.error(ie)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionRequestResponse=(a,A)=>{const{id:O}=A,J=ti("session_request",O);if(0===this.events.listenerCount(J))throw new Error(`emitting ${J} without any listeners`);ll(A)?this.events.emit(ti("session_request",O),{result:A.result}):Kc(A)&&this.events.emit(ti("session_request",O),{error:A.error})},this.onSessionEventRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{id:J,params:ee}=O;try{const ie=`${A}_session_event_${ee.event.name}`,oe=n1.get(ie);if(oe&&r.isRequestOutOfSync(oe,J))return void r.client.logger.info(`Discarding out of sync request - ${J}`);r.isValidEmit(ws({topic:A},ee)),r.client.events.emit("session_event",{id:J,topic:A,params:ee}),n1.set(ie,J)}catch(ie){yield r.sendError({id:J,topic:A,error:ie}),r.client.logger.error(ie)}});return function(A,O){return a.apply(this,arguments)}}(),this.onSessionAuthenticateResponse=(a,A)=>{const{id:O}=A;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:a,payload:A}),ll(A)?this.events.emit(ti("session_request",O),{result:A.result}):Kc(A)&&this.events.emit(ti("session_request",O),{error:A.error})},this.onSessionAuthenticateRequest=function(){var a=(0,Ke.Z)(function*(A,O){const{requester:J,authPayload:ee,expiryTimestamp:ie}=O.params,oe=p0(JSON.stringify(O)),de=yield r.getVerifyContext(oe,r.client.metadata),be={requester:J,pairingTopic:A,id:O.id,authPayload:ee,verifyContext:de,expiryTimestamp:ie};yield r.client.auth.requests.set(O.id,be),r.client.events.emit("session_authenticate",{topic:A,params:O.params,id:O.id})});return function(A,O){return a.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=a=>{this.sessionRequestQueue.queue.push(a)},this.cleanupAfterResponse=a=>{this.deletePendingSessionRequest(a.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=pf_idle,this.processSessionRequestQueue()},(0,rr.toMiliseconds)(this.requestQueueDelay))},this.cleanupPendingSentRequestsForTopic=({topic:a,error:A})=>{const O=this.client.core.history.pending;O.length>0&&O.filter(J=>J.topic===a&&"wc_sessionRequest"===J.request.method).forEach(J=>{const ie=ti("session_request",J.request.id);if(0===this.events.listenerCount(ie))throw new Error(`emitting ${ie} without any listeners`);this.events.emit(ti("session_request",J.request.id),{error:A})})},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===pf_active)return void this.client.logger.info("session request queue is already active.");const a=this.sessionRequestQueue.queue[0];if(a)try{this.sessionRequestQueue.state=pf_active,this.client.events.emit("session_request",a)}catch(A){this.client.logger.error(A)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=a=>{if(a.methods&&this.expectedPairingMethodMap.set(a.topic,a.methods),a.active)return;const A=this.client.proposal.getAll().find(O=>O.pairingTopic===a.topic);A&&this.onSessionProposeRequest(a.topic,Xg("wc_sessionPropose",{requiredNamespaces:A.requiredNamespaces,optionalNamespaces:A.optionalNamespaces,relays:A.relays,proposer:A.proposer,sessionProperties:A.sessionProperties},A.id))},this.isValidConnect=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:de}=Bn("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(A)}`);throw new Error(de)}const{pairingTopic:O,requiredNamespaces:J,optionalNamespaces:ee,sessionProperties:ie,relays:oe}=A;if(Aa(O)||(yield r.isValidPairingTopic(O)),!function Oq(t,e){let r=!1;return e&&!t?r=!0:t&&e1(t)&&t.length&&t.forEach(a=>{r=j7(a)}),r}(oe,!0)){const{message:de}=Bn("MISSING_OR_INVALID",`connect() relays: ${oe}`);throw new Error(de)}!Aa(J)&&0!==t1(J)&&r.validateNamespaces(J,"requiredNamespaces"),!Aa(ee)&&0!==t1(ee)&&r.validateNamespaces(ee,"optionalNamespaces"),Aa(ie)||r.validateSessionProps(ie,"sessionProperties")});return function(A){return a.apply(this,arguments)}}(),this.validateNamespaces=(a,A)=>{const O=function Tq(t,e,r){let a=null;if(t&&t1(t)){const A=B7(t,e);A&&(a=A);const O=Mq(t,e,r);O&&(a=O)}else a=Bn("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return a}(a,"connect()",A);if(O)throw new Error(O.message)},this.isValidApprove=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A))throw new Error(Bn("MISSING_OR_INVALID",`approve() params: ${A}`).message);const{id:O,namespaces:J,relayProtocol:ee,sessionProperties:ie}=A;r.checkRecentlyDeleted(O),yield r.isValidProposalId(O);const oe=r.client.proposal.get(O),de=d2(J,"approve()");if(de)throw new Error(de.message);const be=g6(oe.requiredNamespaces,J,"approve()");if(be)throw new Error(be.message);if(!Yo(ee,!0)){const{message:Ee}=Bn("MISSING_OR_INVALID",`approve() relayProtocol: ${ee}`);throw new Error(Ee)}Aa(ie)||r.validateSessionProps(ie,"sessionProperties")});return function(A){return a.apply(this,arguments)}}(),this.isValidReject=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:ee}=Bn("MISSING_OR_INVALID",`reject() params: ${A}`);throw new Error(ee)}const{id:O,reason:J}=A;if(r.checkRecentlyDeleted(O),yield r.isValidProposalId(O),!function Pq(t){return!!(t&&"object"==typeof t&&t.code&&p6(t.code,!1)&&t.message&&Yo(t.message,!1))}(J)){const{message:ee}=Bn("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(J)}`);throw new Error(ee)}});return function(A){return a.apply(this,arguments)}}(),this.isValidSessionSettleRequest=a=>{if(!Ha(a)){const{message:de}=Bn("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${a}`);throw new Error(de)}const{relay:A,controller:O,namespaces:J,expiry:ee}=a;if(!j7(A)){const{message:de}=Bn("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(de)}const ie=function Sq(t,e){let r=null;return Yo(t?.publicKey,!1)||(r=Bn("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}(O,"onSessionSettleRequest()");if(ie)throw new Error(ie.message);const oe=d2(J,"onSessionSettleRequest()");if(oe)throw new Error(oe.message);if(Ed(ee)){const{message:de}=Bn("EXPIRED","onSessionSettleRequest()");throw new Error(de)}},this.isValidUpdate=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:de}=Bn("MISSING_OR_INVALID",`update() params: ${A}`);throw new Error(de)}const{topic:O,namespaces:J}=A;r.checkRecentlyDeleted(O),yield r.isValidSessionTopic(O);const ee=r.client.session.get(O),ie=d2(J,"update()");if(ie)throw new Error(ie.message);const oe=g6(ee.requiredNamespaces,J,"update()");if(oe)throw new Error(oe.message)});return function(A){return a.apply(this,arguments)}}(),this.isValidExtend=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:J}=Bn("MISSING_OR_INVALID",`extend() params: ${A}`);throw new Error(J)}const{topic:O}=A;r.checkRecentlyDeleted(O),yield r.isValidSessionTopic(O)});return function(A){return a.apply(this,arguments)}}(),this.isValidRequest=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:de}=Bn("MISSING_OR_INVALID",`request() params: ${A}`);throw new Error(de)}const{topic:O,request:J,chainId:ee,expiry:ie}=A;r.checkRecentlyDeleted(O),yield r.isValidSessionTopic(O);const{namespaces:oe}=r.client.session.get(O);if(!F7(oe,ee)){const{message:de}=Bn("MISSING_OR_INVALID",`request() chainId: ${ee}`);throw new Error(de)}if(!function Rq(t){return!(Aa(t)||!Yo(t.method,!1))}(J)){const{message:de}=Bn("MISSING_OR_INVALID",`request() ${JSON.stringify(J)}`);throw new Error(de)}if(!Bq(oe,ee,J.method)){const{message:de}=Bn("MISSING_OR_INVALID",`request() method: ${J.method}`);throw new Error(de)}if(ie&&!function Kq(t,e){return p6(t,!1)&&t<=e.max&&t>=e.min}(ie,k6)){const{message:de}=Bn("MISSING_OR_INVALID",`request() expiry: ${ie}. Expiry must be a number (in seconds) between ${k6.min} and ${k6.max}`);throw new Error(de)}});return function(A){return a.apply(this,arguments)}}(),this.isValidRespond=function(){var a=(0,Ke.Z)(function*(A){var O;if(!Ha(A)){const{message:ie}=Bn("MISSING_OR_INVALID",`respond() params: ${A}`);throw new Error(ie)}const{topic:J,response:ee}=A;try{yield r.isValidSessionTopic(J)}catch(ie){throw null!=(O=A?.response)&&O.id&&r.cleanupAfterResponse(A),ie}if(!function kq(t){return!(Aa(t)||Aa(t.result)&&Aa(t.error)||!p6(t.id,!1)||!Yo(t.jsonrpc,!1))}(ee)){const{message:ie}=Bn("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(ee)}`);throw new Error(ie)}});return function(A){return a.apply(this,arguments)}}(),this.isValidPing=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:J}=Bn("MISSING_OR_INVALID",`ping() params: ${A}`);throw new Error(J)}const{topic:O}=A;yield r.isValidSessionOrPairingTopic(O)});return function(A){return a.apply(this,arguments)}}(),this.isValidEmit=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:oe}=Bn("MISSING_OR_INVALID",`emit() params: ${A}`);throw new Error(oe)}const{topic:O,event:J,chainId:ee}=A;yield r.isValidSessionTopic(O);const{namespaces:ie}=r.client.session.get(O);if(!F7(ie,ee)){const{message:oe}=Bn("MISSING_OR_INVALID",`emit() chainId: ${ee}`);throw new Error(oe)}if(!function Lq(t){return!(Aa(t)||!Yo(t.name,!1))}(J)){const{message:oe}=Bn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(J)}`);throw new Error(oe)}if(!jq(ie,ee,J.name)){const{message:oe}=Bn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(J)}`);throw new Error(oe)}});return function(A){return a.apply(this,arguments)}}(),this.isValidDisconnect=function(){var a=(0,Ke.Z)(function*(A){if(!Ha(A)){const{message:J}=Bn("MISSING_OR_INVALID",`disconnect() params: ${A}`);throw new Error(J)}const{topic:O}=A;yield r.isValidSessionOrPairingTopic(O)});return function(A){return a.apply(this,arguments)}}(),this.isValidAuthenticate=a=>{const{chains:A,uri:O,domain:J,nonce:ee}=a;if(!Array.isArray(A)||0===A.length)throw new Error("chains is required and must be a non-empty array");if(!Yo(O,!1))throw new Error("uri is required parameter");if(!Yo(J,!1))throw new Error("domain is required parameter");if(!Yo(ee,!1))throw new Error("nonce is required parameter");if([...new Set(A.map(oe=>Zw(oe).namespace))].length>1)throw new Error("Multi-namespace requests are not supported. Please request single namespace only.");const{namespace:ie}=Zw(A[0]);if("eip155"!==ie)throw new Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")},this.getVerifyContext=function(){var a=(0,Ke.Z)(function*(A,O){const J={verified:{verifyUrl:O.verifyUrl||ey,validation:"UNKNOWN",origin:O.url||""}};try{const ee=yield r.client.core.verify.resolve({attestationId:A,verifyUrl:O.verifyUrl});ee&&(J.verified.origin=ee.origin,J.verified.isScam=ee.isScam,J.verified.validation=ee.origin===new URL(O.url).origin?"VALID":"INVALID")}catch(ee){r.client.logger.info(ee)}return r.client.logger.info(`Verify context: ${JSON.stringify(J)}`),J});return function(A,O){return a.apply(this,arguments)}}(),this.validateSessionProps=(a,A)=>{Object.values(a).forEach(O=>{if(!Yo(O,!1)){const{message:J}=Bn("MISSING_OR_INVALID",`${A} must be in Record format. Received: ${JSON.stringify(O)}`);throw new Error(J)}})},this.getPendingAuthRequest=a=>{const A=this.client.auth.requests.get(a);return"object"==typeof A?A:void 0},this.addToRecentlyDeleted=(a,A)=>{if(this.recentlyDeletedMap.set(a,A),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let O=0;const J=this.recentlyDeletedLimit/2;for(const ee of this.recentlyDeletedMap.keys()){if(O++>=J)break;this.recentlyDeletedMap.delete(ee)}}},this.checkRecentlyDeleted=a=>{const A=this.recentlyDeletedMap.get(a);if(A){const{message:O}=Bn("MISSING_OR_INVALID",`Record was recently deleted - ${A}: ${a}`);throw new Error(O)}}}isInitialized(){var e=this;return(0,Ke.Z)(function*(){if(!e.initialized){const{message:r}=Bn("NOT_INITIALIZED",e.name);throw new Error(r)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(hc_message,function(){var r=(0,Ke.Z)(function*(a){const{topic:A,message:O}=a,{publicKey:J}=e.client.auth.authKeys.keys.includes(w2)?e.client.auth.authKeys.get(w2):{responseTopic:void 0,publicKey:void 0},ee=yield e.client.core.crypto.decode(A,O,{receiverPublicKey:J});try{S6(ee)?(e.client.core.history.set(A,ee),e.onRelayEventRequest({topic:A,payload:ee})):m2(ee)?(yield e.client.core.history.resolve(ee),yield e.onRelayEventResponse({topic:A,payload:ee}),e.client.core.history.delete(A,ee.id)):e.onRelayEventUnknownPayload({topic:A,payload:ee})}catch(ie){e.client.logger.error(ie)}});return function(a){return r.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(Vc_expired,function(){var r=(0,Ke.Z)(function*(a){const{topic:A,id:O}=oD(a.target);if(O&&e.client.pendingRequest.keys.includes(O))return yield e.deletePendingSessionRequest(O,Bn("EXPIRED"),!0);A?e.client.session.keys.includes(A)&&(yield e.deleteSession({topic:A,expirerHasDeleted:!0}),e.client.events.emit("session_expire",{topic:A})):O&&(yield e.deleteProposal(O,!0),e.client.events.emit("proposal_expire",{id:O}))});return function(a){return r.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(qg_create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(qg_delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!Yo(e,!1)){const{message:r}=Bn("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:r}=Bn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(r)}if(Ed(this.client.core.pairing.pairings.get(e).expiry)){const{message:r}=Bn("EXPIRED",`pairing topic: ${e}`);throw new Error(r)}}isValidSessionTopic(e){var r=this;return(0,Ke.Z)(function*(){if(!Yo(e,!1)){const{message:a}=Bn("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(a)}if(r.checkRecentlyDeleted(e),!r.client.session.keys.includes(e)){const{message:a}=Bn("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(a)}if(Ed(r.client.session.get(e).expiry)){yield r.deleteSession({topic:e});const{message:a}=Bn("EXPIRED",`session topic: ${e}`);throw new Error(a)}if(!r.client.core.crypto.keychain.has(e)){const{message:a}=Bn("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw yield r.deleteSession({topic:e}),new Error(a)}})()}isValidSessionOrPairingTopic(e){var r=this;return(0,Ke.Z)(function*(){if(r.checkRecentlyDeleted(e),r.client.session.keys.includes(e))yield r.isValidSessionTopic(e);else{if(!r.client.core.pairing.pairings.keys.includes(e)){if(Yo(e,!1)){const{message:a}=Bn("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(a)}{const{message:a}=Bn("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(a)}}r.isValidPairingTopic(e)}})()}isValidProposalId(e){var r=this;return(0,Ke.Z)(function*(){if(!function Nq(t){return"number"==typeof t}(e)){const{message:a}=Bn("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(a)}if(!r.client.proposal.keys.includes(e)){const{message:a}=Bn("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(a)}if(Ed(r.client.proposal.get(e).expiryTimestamp)){yield r.deleteProposal(e);const{message:a}=Bn("EXPIRED",`proposal id: ${e}`);throw new Error(a)}})()}}class Uie extends y0{constructor(e,r){super(e,r,"proposal",P6),this.core=e,this.logger=r}}class Kie extends y0{constructor(e,r){super(e,r,"session",P6),this.core=e,this.logger=r}}class zie extends y0{constructor(e,r){super(e,r,"request",P6,a=>a.id),this.core=e,this.logger=r}}class Vie extends y0{constructor(e,r){super(e,r,"authKeys",b2,()=>w2),this.core=e,this.logger=r}}class Hie extends y0{constructor(e,r){super(e,r,"pairingTopics",b2),this.core=e,this.logger=r}}class Wie extends y0{constructor(e,r){super(e,r,"requests",b2,a=>a.id),this.core=e,this.logger=r}}class Gie{constructor(e,r){this.core=e,this.logger=r,this.authKeys=new Vie(this.core,this.logger),this.pairingTopics=new Hie(this.core,this.logger),this.requests=new Wie(this.core,this.logger)}init(){var e=this;return(0,Ke.Z)(function*(){yield e.authKeys.init(),yield e.pairingTopics.init(),yield e.requests.init()})()}}class L6 extends RW{constructor(e){var r;super(e),r=this,this.protocol="wc",this.version=2,this.name=R6_name,this.events=new wu.EventEmitter,this.on=(A,O)=>this.events.on(A,O),this.once=(A,O)=>this.events.once(A,O),this.off=(A,O)=>this.events.off(A,O),this.removeListener=(A,O)=>this.events.removeListener(A,O),this.removeAllListeners=A=>this.events.removeAllListeners(A),this.connect=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.connect(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.pair=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.pair(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.approve=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.approve(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.reject=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.reject(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.update=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.update(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.extend=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.extend(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.request=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.request(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.respond=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.respond(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.ping=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.ping(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.emit=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.emit(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.disconnect=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.disconnect(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.find=A=>{try{return this.engine.find(A)}catch(O){throw this.logger.error(O.message),O}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(A){throw this.logger.error(A.message),A}},this.authenticate=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.authenticate(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.formatAuthMessage=A=>{try{return this.engine.formatAuthMessage(A)}catch(O){throw this.logger.error(O.message),O}},this.approveSessionAuthenticate=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.approveSessionAuthenticate(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.rejectSessionAuthenticate=function(){var A=(0,Ke.Z)(function*(O){try{return yield r.engine.rejectSessionAuthenticate(O)}catch(J){throw r.logger.error(J.message),J}});return function(O){return A.apply(this,arguments)}}(),this.name=e?.name||R6_name,this.metadata=e?.metadata||function DY(){return(0,BZ.D)()||{name:"",description:"",url:"",icons:[""]}}();const a=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:Tw()(h_({level:e?.logger||R6_logger}));this.core=e?.core||new Aie(e),this.logger=Ua(a,this.name),this.session=new Kie(this.core,this.logger),this.proposal=new Uie(this.core,this.logger),this.pendingRequest=new zie(this.core,this.logger),this.engine=new Fie(this),this.auth=new Gie(this.core,this.logger)}static init(e){return(0,Ke.Z)(function*(){const r=new L6(e);return yield r.initialize(),r})()}get context(){return Fa(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return(0,Ke.Z)(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),yield e.auth.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(r){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(r.message),r}})()}}let eO;u.e(283).then(u.bind(u,41283)).then(t=>{eO=t.WalletConnectModal});const Jie=class Zie{init(e){var r=this;return(0,Ke.Z)(function*(){r.client=yield L6.init(e)})()}constructor(e){this.emitter=e}get session(){return this.client.session}on(e,r){return this.client.on(e,r),{remove:()=>this.client.removeListener(e,r)}}once(e,r){this.client.once(e,r)}connect(e,r,a,A){var O=this;return(0,Ke.Z)(function*(){return O.modal||(O.modal=new eO({projectId:a,chains:[A],explorerExcludedWalletIds:"ALL"})),new Promise((J,ee)=>{O.client.connect(e).then(({uri:ie,approval:oe})=>{ie&&(r?(O.modal.openModal({uri:ie,standaloneChains:[A]}),O.modal.subscribeModal(({open:de})=>{de||ee(new Error("User cancelled pairing"))})):O.emitter.emit("uriChanged",{uri:ie})),oe().then(J).catch(ee).finally(()=>O.modal.closeModal())}).catch(ee)})})()}request(e){var r=this;return(0,Ke.Z)(function*(){return r.client.request(e)})()}disconnect(e){var r=this;return(0,Ke.Z)(function*(){return r.client.disconnect(e)})()}},Yie="data:image/png;base64,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",$ie=["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions","near_verifyOwner","near_signMessage"],Qie=["chainChanged","accountsChanged"],Xie=function(){var t=(0,Ke.Z)(function*(e,r,a){const A=new Jie(a);let O=null;const J=new Fr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,`near-wallet-selector:${e}:keystore:`);if(yield A.init({projectId:r.projectId,metadata:r.metadata,relayUrl:r.relayUrl}),A.session.length){const ee=A.session.keys.length-1;O=A.session.get(A.session.keys[ee])}return{client:A,session:O,keystore:J,subscriptions:[]}});return function(r,a,A){return t.apply(this,arguments)}}(),tO=function(){var t=(0,Ke.Z)(function*({state:e,chainId:r,qrCodeModal:a,projectId:A,methods:O,events:J}){return yield e.client.connect({requiredNamespaces:{near:{chains:[r],methods:O||$ie,events:J||Qie}}},a,A,r)});return function(r){return t.apply(this,arguments)}}(),B6=function(){var t=(0,Ke.Z)(function*({state:e}){yield e.client.disconnect({topic:e.session.topic,reason:{code:5900,message:"User disconnected"}})});return function(r){return t.apply(this,arguments)}}(),qie=function(){var t=(0,Ke.Z)(function*({id:e,options:r,store:a,params:A,provider:O,emitter:J,logger:ee}){const ie=yield Xie(e,A,J),oe=()=>{if(A.chainId)return A.chainId;const{networkId:Yt}=r.network;if(["mainnet","testnet"].includes(Yt))return`near:${Yt}`;throw new Error("Invalid chain id")},de=function(){var Yt=(0,Ke.Z)(function*(){const Xt=ie.session?.namespaces.near.accounts||[],xn=[];for(let Pn=0;PnXt.remove()),ie.subscriptions=[],ie.session=null});return function(){return Yt.apply(this,arguments)}}(),Ee=(Yt,Xt)=>{if("FullAccess"===Xt.permission)return Xt;const{receiver_id:xn,method_names:Pn}=Xt.permission.FunctionCall;return Yt.receiverId!==xn?null:Yt.actions.every(Ln=>{if("FunctionCall"!==Ln.type)return!1;const{methodName:Ne,deposit:Je}=Ln.params;return(!Pn.length||!Pn.includes(Ne))&&parseFloat(Je)<=0})},Ce=function(){var Yt=(0,Ke.Z)(function*(Xt){const xn=new Fr.InMemorySigner(ie.keystore),Pn=[],Ln=yield O.block({finality:"final"});for(let Ne=0;Ne(0,Js.createAction)(St)),Fr.utils.serialize.base_decode(Ln.header.hash)),[,Mt]=yield Fr.transactions.signTransaction(vt,xn,Xt[Ne].signerId,r.network.networkId);Pn.push(Mt)}return Pn});return function(xn){return Yt.apply(this,arguments)}}(),Ie=function(){var Yt=(0,Ke.Z)(function*(){return ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_getAccounts",params:{}}})});return function(){return Yt.apply(this,arguments)}}(),Ue=function(){var Yt=(0,Ke.Z)(function*(Xt,xn){return ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_verifyOwner",params:{accountId:Xt,message:xn}}})});return function(xn,Pn){return Yt.apply(this,arguments)}}(),We=function(){var Yt=(0,Ke.Z)(function*(Xt){const{message:xn,nonce:Pn,recipient:Ln,callbackUrl:Ne,accountId:Je}=Xt;return ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_signMessage",params:{message:xn,nonce:Pn,recipient:Ln,...Ne&&{callbackUrl:Ne},...Je&&{accountId:Je}}}})});return function(xn){return Yt.apply(this,arguments)}}(),$e=function(){var Yt=(0,Ke.Z)(function*(Xt){const Pn=(yield Ie()).find(lt=>lt.accountId===Xt.signerId);if(!Pn)throw new Error("Invalid signer id");const[Ln,Ne]=yield Promise.all([O.block({finality:"final"}),O.query({request_type:"view_access_key",finality:"final",account_id:Xt.signerId,public_key:Pn.publicKey})]),Je=Fr.transactions.createTransaction(Xt.signerId,Fr.utils.PublicKey.from(Pn.publicKey),Xt.receiverId,Ne.nonce+1,Xt.actions.map(lt=>(0,Js.createAction)(lt)),Fr.utils.serialize.base_decode(Ln.header.hash)),rt=yield ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_signTransaction",params:{transaction:Je.encode()}}});return Fr.transactions.SignedTransaction.decode(Buffer.from(rt))});return function(xn){return Yt.apply(this,arguments)}}(),ht=function(){var Yt=(0,Ke.Z)(function*(Xt){if(!Xt.length)return[];const xn=[],[Pn,Ln]=yield Promise.all([O.block({finality:"final"}),Ie()]);for(let Je=0;JeMt.accountId===rt.signerId);if(!lt)throw new Error("Invalid signer id");const vt=yield O.query({request_type:"view_access_key",finality:"final",account_id:rt.signerId,public_key:lt.publicKey});xn.push(Fr.transactions.createTransaction(rt.signerId,Fr.utils.PublicKey.from(lt.publicKey),rt.receiverId,vt.nonce+Je+1,rt.actions.map(Mt=>(0,Js.createAction)(Mt)),Fr.utils.serialize.base_decode(Pn.header.hash)))}return(yield ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_signTransactions",params:{transactions:xn.map(Je=>Je.encode())}}})).map(Je=>Fr.transactions.SignedTransaction.decode(Buffer.from(Je)))});return function(xn){return Yt.apply(this,arguments)}}(),ct=function(){var Yt=(0,Ke.Z)(function*(){return(yield de()).map(({accountId:xn})=>({accountId:xn,keyPair:Fr.utils.KeyPair.fromRandom("ed25519")}))});return function(){return Yt.apply(this,arguments)}}(),wt=function(){var Yt=(0,Ke.Z)(function*(Xt){const xn=yield ct(),Pn=xn.map(({accountId:Ln,keyPair:Ne})=>({accountId:Ln,publicKey:Ne.getPublicKey().toString()}));yield ie.client.request({topic:ie.session.topic,chainId:oe(),request:{method:"near_signIn",params:{permission:Xt,accounts:Pn}}});for(let Ln=0;Ln(0,Ke.Z)(function*(){try{const{contract:Pn}=a.getState();ie.session&&!Pn&&(yield B6({state:ie}),yield be());const Ln=oe();return ie.session=yield tO({state:ie,chainId:Ln,qrCodeModal:xn,projectId:A.projectId,methods:A.methods,events:A.events}),yield wt({receiverId:Yt,methodNames:Xt}),yield En(),yield de()}catch(Pn){throw yield Zt(),Pn}})(),signOut:Zt,getAccounts:()=>(0,Ke.Z)(function*(){return de()})(),verifyOwner:({message:Yt})=>(0,Ke.Z)(function*(){ee.log("WalletConnect:verifyOwner",{message:Yt});const{contract:Xt}=a.getState();if(!ie.session||!Xt)throw new Error("Wallet not signed in");const xn=bd(a.getState());if(!xn)throw new Error("No active account");return Ue(xn.accountId,Yt)})(),signMessage:({message:Yt,nonce:Xt,recipient:xn,callbackUrl:Pn})=>(0,Ke.Z)(function*(){ee.log("WalletConnect:signMessage",{message:Yt,nonce:Xt,recipient:xn});try{const Ln=oe();ie.session||(ie.session=ie.session=yield tO({state:ie,chainId:Ln,qrCodeModal:!0,projectId:A.projectId}));const Ne=bd(a.getState());return yield We({message:Yt,nonce:Xt,recipient:xn,callbackUrl:Pn,accountId:Ne?.accountId})}catch(Ln){throw yield B6({state:ie}),yield be(),Ln}})(),signAndSendTransaction:({signerId:Yt,receiverId:Xt,actions:xn})=>(0,Ke.Z)(function*(){ee.log("signAndSendTransaction",{signerId:Yt,receiverId:Xt,actions:xn});const{contract:Pn}=a.getState();if(!ie.session||!Pn)throw new Error("Wallet not signed in");const Ln=bd(a.getState());if(!Ln)throw new Error("No active account");const Ne={signerId:Yt||Ln.accountId,receiverId:Xt||Pn.contractId,actions:xn};try{const[Je]=yield Ce([Ne]);return O.sendTransaction(Je)}catch(Je){ee.log("Falling back to WalletConnect to sign transaction",Je);const rt=yield $e(Ne);return O.sendTransaction(rt)}})(),signAndSendTransactions:({transactions:Yt})=>(0,Ke.Z)(function*(){ee.log("signAndSendTransactions",{transactions:Yt});const{contract:Xt}=a.getState();if(!ie.session||!Xt)throw new Error("Wallet not signed in");const xn=bd(a.getState());if(!xn)throw new Error("No active account");const Pn=Yt.map(Ln=>({signerId:Ln.signerId||xn.accountId,receiverId:Ln.receiverId,actions:Ln.actions}));try{const Ln=yield Ce(Pn),Ne=[];for(let Je=0;Jeqie({...ie,params:{projectId:t,metadata:e,relayUrl:a,chainId:r,methods:J,events:ee}})}})}const eoe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAMAAABOo35HAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAD8UExURUdwTGx5rpLO8YOYx1Og0ly29X5ezR4mT0tiji4eWJ953KGn1Jxs7qB9xvfD/Us0gduu8yeh4HOq74dD647R91256eSz+j82cbvg/dSj/LuL79Wp6zCf24KN9xANGRANF59d/0W+/taa/8iN/3HL9uOn/z638Bil7l3G84TP+FHB8o5A/0i9/ZjU+47S+vq8/4Qy/S6w8O+x/5Rp/wyg7G2T/s+T/vO2/+qt/1qp/qDV/HyD/ki4+4R7/qnY/tyh/1Gx/ptU/76E/2bJ9Ld8/4t0/pxe+XvN9iOq7rB0/0i88aRk/6ps/z++/naL/mab/mGh/pVM/wub5mGd+fAEOhEAAAAgdFJOUwBEyWKA47EKJhnFluGA6l3H67Du6crdNOXs5q/I65rcQbfB9AAAIABJREFUeNrsnE9r4zoXxidOG9tNQqBvSrLKeKGF7WIz4J0WgSCuDc1s7vf/Mq/+S0d2p7Zkd7i0SsZJh3th+PGcR4+OpP748T3+4yNODofDKY2/SYxgdbhcfl4ul9M3rY9ZpZefbFwu6TeMD8dJwPp5Sb6l9eFIL5zW5TDoWrEc35wEjtOFDWPxjE2aJMkqWa3W6/WevuigPyVJ+tWngTg+HQ58PmSDQlqvt5Eax+jIBv2UY7umyL6u0JiMBK6DpETp4KqmL/ngX9hnwcEJYl8TGIV1EpzOEaNUCUBqFPwPfRX0W8GfFSPGgX255JCcTpwUByVY1WAU/FHwLxRWV3RdIYGtvhIvKqoVI0WriwoGK1CDvLi8JDouse5L8YqT08M2Op+vVFOYl54wJ+5PkppkJUkJZYlipN9RV1Ne69UXmCOT0zY6Xq+4Kip7GEYGmKZVyNF1ghj9whx//ZfltXQYTE/b8xnTUeFr1R82Lm7vwuPh6Cgz9jr+TVx8Mt+zcTgt0w6Ik310xIJVJXxdUaqgsIzH1w6tjlekxrVdpX/FSlb7zW63a+lrt3vazG8JFiqHVa2ewOQLlR70W1oX58XlhSiv7aerKz4xUvd7Rse9pWO32xxm/VfE6To64yt1KyEsgUt8ckT99GDsHUpL6oq9EaKT4+cWY5weNrvfbZtlNwqLfkpcM0o8XtFMhZlRUT7YYDLKEtmhsurQJNO6R0sEL0brk3FRWe3+ydpMDvblzpDtnvYz/SPihIYFzHRFYYE6xMazBnJWYTyrhsri4uqEfSESPX+WdcWnza7NbjemKyYpVob/Ml5Zu9vP0cmME1aBxZXDuSpdKWSGlK0qxUqteSxUphA7hLoOsednWVe8YiV4y34zTYkX9a4bhXejtbgJp8VQcVmJuDA4Gyp7d2K8TFn1oGnJWbEjqO5ywnLE5+iK8mGyEnbFlMV0dWO1GEyLmhWdA1kKrdiTG7y2duPvss3QWx1qVLVLSxZiJwRWdOQTxJXsd9qrGKvMHsznn4JocbNic6B5KWW5wlLMBmbDesjcOzN4KZLj0uKKD7tWcslcVIJgiLbi1fasSYk3p2WUJTsOdsqqHGVBw9I5q7BQcVp0XlxYXKdNa4Tlqkp8/uNNi0UrzupqawsLd8cYqqoXSkHOqu0ED5SF1AshQo1+tRyteM+F1RhGjXy0oiwZLU9txWwdKEhpTKIIjWv1pDUQHGpXW66uUGfTWi8WIk5Pd6Ao5VqNNDCGq7170WIx9IqFqq4iuXNUVyWr95RVDeYsSKqwPEvSkrgQLcXFhHW/STz8T2uqz9DKfHwrPVisMP/GSV0tZdkxvq6qgf6fzu+1hQsoC+mwRQd/Pi5kXOnmt+Jh53fH4mkG220m/gOSh0gpyuBSVVhhuNxRsbRfh+5sCH1LCqpjvNg39kHYrLiIcfEqZHwah5DzM8tbk2glbBbEVgHKqVANMxViJzvApWFd9wOWcng9FSrHQtLpaUJdgFa8euqHheExzeWptRuzMgqzgpaO8bClVVXuhoXSVT0kLCEtwUo+mG2hxwVoxetdNhYW09YkXUFQ3LIMJ1OJGPJyFoiqVVrD6K6VpSdCpS0xlqjEdD8a1hRa8fYs8DiuBUrRpSWF1e/+DbSzrCq0YpaaDjv2mJ9Wutll9w8xNWKGpLT242gl0fnDEsRDylKkqoF2Vu24FoxYcsGjypDQEa3npRVvRllWw8MXXWGPpJVE0bXvWCad2sLCfc9yZkSoqkI3suyljnQrrimOi+Q5mplWuhnp7zKqUm2lo6wQlqGqQygsteDBoAFfuWsdp1Oquu+82dBZyoKuRdhr3kqksMbSov8dja8jtZVsoyFlye6DrSwtLVxbydQA05hqW1qOZ1mrQ1GENGyxx7y0KKzbOFgNz6ajXT5xogO+2j0H4Fm2tNxeqZXgB5SF3JQFBnWtefPW2DJsVLRvR9KKk4GgpV1LSQv0HjDcwh8CpTfCQHPGWJampF1+zrw12rPElDghQXBa2PV3LFc9lrIwbCtbs2ExBMzOo9ZEqCtQUpLFmOfH59lW1emYAN+2rb1snEDrHWm56QE7uAZmQ1iInb3QkaTEgwhgiIgPNCetdNxqpzUmn4kexFhauOdbYDVtdwAr9zzb8JahyqSwCjtkS4vwwX/K82g7T38rnqgs9Rf30S5/xX9QlhO1avNyldVzeKejbKpQSosI46Jhi+Rzxa109DoajFs2ntYfpNWbEHstmrofsmQZFrD5Dk2LCJNnpkWBoXlMPh4Jq4ENG563vLTVC1qgDut+F75/5AiUIfR36er6Wy4URrp5bCsZBavpb2fcRva3+tqCMb7CTg+w6p8qfb8MkeblmpaweOZblFl5nKPRHHuW4fj+FshbeIgXPPBQgSNa8iwpnAjtIjTuToBpyaW0GvPYFlXWPYTWhDnRNJcx1rs8yrC0ZfWOO4CGA5gLkW1ZrJ2skAlBWQPl5CXctpiyfGG12ciVz0lWIjZLa6Osyj3XVtfvG5YmVViGZa11pGUREUpFepDSIjPYlqeyGtXfmpK3sNUAtGj1TmnB3p+7aWiON1jW3klJ6ToEwqKoaNp6iP8KrEa5/di8dbLnRNxrl1Z21JLLRJgd3MMzrrur7E6QeQBYpCRRMkPO8itDtbc4tmNzBgZvw3Kb8AM7PEJbmhXYMESgj0V0yDI1mHNplcdgafkbPKfF9hPHnA0cWPmArGV1acCJtt5+YQH9ynYsgvS6EDllSGnRKB/s8QEGb3Yxxs6Jg5YFtyyArApnbSjPdPcSKQLKUgbveFYe7vFB0WFKf6u3kYhB9wH2ljUrFUrroe1CI6qOGGERhFCfE/8IlVaYsqZ0bNTKB2OVIrBTifJy4cAR3HcWOhKYG0d7M+Fc0vJTlld/C86JIGrpJQ/olaqLTXVtoSqsRGpWOTC5m3DFKTFQ3LVCc7yXstp+f2vUno/JW043XsbSuhq4kDJ07hZurMJAOmBXiloZJi3fBN/CoyNsPzGdsPKxYZmzy8KvsK5F9WUok0LXIqCfbCJDrljlYpRh0krDytBaJ07RluNa8Jj3UV0if5b3pu2DpI6yYMAyjQYrMhD9CpVWHBwdVH/r9xRaIMTbTRoBar9aJWKs+H1XSqxn8JpVJ2dDiQrBKEqAsgKlFbaQhnlrdCVewTa+Vha/X89+iUMM/49EACsKc/IdwfMNBLRIkWtYufb5IGkxZbE7AtMXh9nAefnt6P1ErNfV8iYPxmd2QeKdS3txslpTXPJeU1cg5PRnUK/+BB9LVDNIi+0btu2f3Gg0vZFnbHQPomK3U0Qgra7nj26Is9s/xyOlUxRDZ9d0KLXjlealPCsnQdJK+CZrm80w2imVKLqB/HoKV9W7ooK4okJ1sxCMWUQld2QbFvArupbmrZpVgLL+xy6DZfdwUqzLNS1viWXO9Rptk1E7e1xdtAaVbSHU26oAwT03ZiWZlbQO/ZsPFNbrLbsNH7qd0gzU57fS8VmeX9SkFTj+kH+SbKNanGCTJ7E63vgjCEYsouZBRYm7OzP4kL4WhfXr9XYb3H+ePjfesmYCLd6Jv068bMPEpY/O2Cdm1E40sqrQrUTOy9/iGSxFqwlgpc9vNU9jK5HdAJ4kK3W++vkIt+w7qzmK+v0GC1Qelh44rF//3uTN6CbMuW6j89aPlHdsztH0y7rsArGqxM5q+BF3BW3lK0WLLRD9LV7Aotq6ZzJvNb7RwfS3Rs2JlBaNml7XRpLt8UiorApwykjHhtwOC4ZUKT/KR986lLAorYErdF7r63a0ttbedwOpcRHSdXCXAsYG1fIjDi/28K1DBYvTalvv4OD0t0ZpK/b/JRuMlrMJTdw8CrO7paz8JRSW0FZIx9Ta8hmprZBuCaWVy/1CGLGsuK54lcLdpbJy7zo0sLhvZd77Yg04NHJfntY2Mg1lgnrtPuDrSloS1+NzGgpLJoh7gLIm97dCGuLbI4E79o6/W7hIqVmVtAx969CG1U+nPnOizBC/F6e1itR2DhlY5pjuqO1ZUlovq3BYglbr5fONX38rpCW+juz9HOT0sGzLKqVxleLta1oQFvetW3Zv5+lBbBf+HQvUtuSBoj/VoPH4UqAqc+JnWg4sOSe2QctEfdBmwv1EP9uKOnUeC2gqH/YrSYo9/JKWC4vTus0grAnpNLAQYcJyls9lbmJDKQ2ePl7mgRWUt5yY2ixNK3k+8gPJTsCydSVQKUxSWW+PXhv5fVgib4V2A6f1t/yldRwMDU5TRvAy0aEs0cNMsGbpb8lfntE0y9JKoiM76O4IK7eDOzAshuqNKeshnQmWS6v1tq3x9xP9XYvYsKyOe8nempYsQEXMz+FF82+YVtuG2tZtcd+iyZRYW6nvKctQkuMlmUtZpr/VhvsWpbVdjla6PZZcWQ4qKCrbsdh4K70yvFbW68Cc6N+yUbm0bTit5bQVr6J8uN0ODMtW1hufDn0yPNvd+TWsLf9EqhY+7LNZ2OWTl37/2O7J6LhgAXsLgcVxvc6Yt8zvSWKLxmZJWunzsXRxldzaS9utchsVez94K+v11+uwbwVKq2kFrHY5WjRqlWYjh6jFoFw8A1BvFqvH5yBlDWnLt2Uj9qcbRqvhymr+T9vZtTaOZGG4m51O3M3AsDOEgaEDXhjsxr6JcXxh3AKLHQnFDk68/v//ZavOV51TVfKHpJRkxUl6LubhOW+dKtlO9VG0fGhFrajsxiihfqi8grPLUpphtbhV9lhH4wdN4fjA3Pr88PcPvcahXQZdgRoVserUaHEZiluGGd5P7BD0TqeyFq18xn8YrdHvf4fmXWJd1oNRg7Wj8z8P3WA9zcmsltwqO9JybQMdOD6oEu//lXRY0X6MTIEECi4dYc0F1DzfQdy8v+UJ4bnU4/FDaEGnlZglpH7sog6LaHWGRbjmuZiH/a36JqfGJbGKYDm3PuJDMSHhCdR/bRf6Q9XezuT7rpdZ8/ZK7HDHgutPToL17QNoueUhvxg5tA2zdDm4I2a7fmXIauV53XY/sQ51aMWq3OHduv8QWDOJLIXqh4703Uyfuy6LQzILec3T+TB7P7E+qxaQqmOriNcH0Bo9yEvVeB6cmbTaxcB2HVfSbBYAw2JM7bpyfwuLcImJtRwniQWX6tvQtD4/SNdOG6N6caP7djnc+PJ5gMxq706vuZ+4ZLeYVSSWgzW4W86szK6MXTdrWjt4dHk7nZg1n8/VtBhXI+xvjc/uby3JqmWmaSCxMLaGdotghbUg35UIMs0w1yned2jWfefM0p3pvGUP4qJZwoucGusCJFp+fBv0k/hGDz/0YtDs8dneKqCaDGKWZNdT4tbljrTWdbhMpkJmVT3+OiQtB2um7jnbxY0qQJ1YPcyai1y6i8j2W/t2qZYRqXEovzpYVQ3uFpo1i7YZQv3586cpQW9Wl92/XGaZ6DK5db4/LTmyIrGqcHwELc4sm+ncJESUhoL1FBqurFpP6t0F7QvCjFdwFlqsQWn5MkxWzrtMtyCgJu4yhFmm45onbpXnb1EsWxosa1WBtIaaEwFWvBZUC5uIFdLqDusYVaEqQusXvV7+TOfOk+BYNe2+XYi88mOolIeAT2/ghElwNrOoepnlWR3n84xhmQ6i9fVb3F2N064dkSmzCj8eB3Jr9CDNle7Wd7swD052P9GncBmoDMPM+DTP3/NJtmw8onKZmwi5Fw2kioqOohiGlocFbu1UtxDSPVSeOXqU4TFHLJv14FYN7xVe2i0stcixabXUNViwWJV3a4hKFLNmihdTwifCKDzpUYZHC0zahywtiK19VIDpRMiNu80rJZaj9fsAtBjWTjUMO92ua7Xw7BnwSOqYmpVu2+A6Mbzblxv3fIdly7CAMgxjiA4CYamJb5ZMfgGVXL/80sMsVqtlZmztIJZxgxUCq9LrQc0KcG38uRmgEo1ZyqbJ2aM7LMaVZpfs3cyztPCtFRmvKu5IbbqHCgRag1QiwFJTn2GlmanI6m+W+HWMaCVuHZlW3da5i1TWrFCDHtVmsxmAloMlQTWTXQWKp0kUVSHgf+kd8MfsnJj2XEfcCoTw2ktoRfvtUeMeEqsiq1wZAq1+f6uKzOJdPV2CkxSS59cPVnokXVfccdWv+HmS/iVY+2XYw4q2RTWqQoe7w7QZhhaYtTPrZQ3JcuJHH1hH/7DhdcxFl4w7/5dJa9pp2OdWg8s42yuNisXyoyctb1ayUtZJBXAmhItpdYSFlEItJlH/xIvroNcfd3/+dkevvvKvWEv3RdMaND0DmMW0Nr1oebNyLdXErnCi0RkWD7aLWJ1x64/fvn79fId/7HZZi1e1whRt91FYVRmzerpFZXi2X5jIV8bWDVZ9LAWUkMo1EtJ1Aaz7T/fOrVevVT3WVsUb7rJyjkixWQd39HILzTJNekBjrhOFqxesSK44up4ULoL16etvd/tXvPds072qkiosKqa1kcZBxPK4utNCWJNs/ck1HovesCDobXTlNm3mHhb8x86t2t7ICbcmosCy6b7hA8069KFFZsVa7VSq6yeTvmVYGrtEMNui6m1nMMv915/vKKdqulTSt5ttGdlpUGFlxDocDo933WiNHtKEujAWPc0qLau5jq9owRhgebd0uHupinQbWa8HqXUnXAcgBaxWh45uxbAmqldQeOiER68yLMsScSlk8zpdWwsyhgWViFpVyzTZk/WglKASC6rw4HF1oxVgtXQJA5tVloKq1Dmvp8fjXG1yCSxPqwpuKbVUMxol1maz4XTHqRBjyz2+dKE1ejgPCYyyhzs7wgJSZUlfkuyisrSGBVi+g6jiFWGVqEW0glgqsCCywK1OKe9gRY1CWnxcfwuB1xkWc4IncTWa3YgjNRAKFtGqlrl90ciqWCzMduAEo1NueViZOmOFBJvF1QXWCM2CzEJmx1SxOOafDCxPCzjV0GApXoXZdGepCh1X9GBYqw65hWYlrGwJmktvsxAXSEWtRGnnRtN6GVjgVpXZkpEVYdUa7oeN9srBWt2cWzmzJtqsuBi7Z9Y3gCU1SJXIlqXtRA4Wp3yyHoxQ8RZWCCsK9kDLfXcrLQ9rkYZ5kCgN+K5mMSxGFqqR7Kqj+IJLBAtzq1qmPYPdwrK9aJgHoQLJrMOtuQVmJYjgXOgiNN9MBoClHHOUyriz5+g6xrDAragOw3KwkPWNFCEtcgQVksLr6TZaZFb7KZR6Z5aDNfbv/ir5UqoqlGqsfYuq6jGBhbRyN1PNPFgYs6QAV+HwxG7LLQernU/4brHAi79O+phV+3Os1QpVidkPvKivd5cUVkRLbnpVIlZh58GDqkGsQjpXb7f18lSGhtWCSjBAmqjrortZY4+pRrESwUqFS6mVgWVpFYlaG7V8Pti8Ikj0ZXXjnAhmLfQ5YVDqqYDql1ke1jjQMry4Eo/Y53PY58yiDsJsM5gGy/buB91fHYhVGDek/Oi7AWN1khqkn6FYPc1CYgxprHDRUsi2qVlYwa1CZ9aGOyyn1SFaO4cGS+N6W51ucGv0fTGxXlnBFgttFz/vCsvfLGVa4NhYcCGyY62v3rA8rOBW6LA20jUUei3Im1hhKgyk4Pp29arawbJjop43Ot0n8rNFD1j0MVBAyrHSuPx3ZoKEamyBxbQKfTdHljgFpxUvni0qKcM3h8qN1ZX3qhWsiSq/JsKmYPpf/bsrrJI+6hftGktdcoJFRXlsNYtpFXaJYzZGD3bxvDJinUgsr9bpykqMzGqUPnSNqPkfTjrC2qcfkFyOpSxrnfiyOfFrGyykpefBTaEXz9E8uJJ+VInlI4vduoJWBGvSLK4ZA8ESZPi1DGVZcpNRtpoFtEzPYBpRnALtrowpQc4sxHX6ckUlOlgN+nQBk9arh1l7OrLAalWTXJXtZqFbUS9qbk4c1EYyLQkF1xtVIMXW++mKSiSzCFdDlwy5ZjCz8NPYWqjpyMce9gwscMvcdi4MqDiwbIPlig9JrQDW6XLKs1lGL/u0SdB1N2vvxhgeltWeQOFnO2F/AW7V58zCfqsw97z0grAt3FEsZPUORXg6gVsXaOnMaoSOMo1/1ah/1nSHxQcz4xPJ7eUznsSzs2ZRJRZF1LdT9W3OouLGwU2GDta7w3aJFpnVhPJrDJ7G/gwf/cxiu1gxOeGo4aAPfPefnHwelneL2lHdim7OspIqpHHy4/39Ii0d8E2sUfhBNAv0gIVA9qKXyMWo8M8QwMce+uMSLMotuxq02wwZrzwqYYW0PKwLtDwsB6KhSxNUEoKNqVP4TVdY2RFwuVHTQ8ZFWOBWYe7Qm3VzbpHDnTtOhG/vPNbvp3O0Rt+bhlGFcmzEpsY84cegsOzwRYiVCI8rYHm3HjniDxu7MarMsmqFxDoJqbW7nnOLYZFYGlljZsfmw8w6P66ABbSCVXb/KrCKpsFQgGTWybFar8/RElgtgkXNF3zpDOvV/c+/wtk2kl+91lfA8q+xeTQNVnTXK+MV8joRrTcQy7t1WrfT8rCm7rDEwhFCKyRZD1ivROsVTz7CU48Hjj3942vMgtx6DHtYuRoM+wzgFdegEwraBjDrtPZne245WFODa5EyW1hinc16JRpBL4WIkfkTBn7zch2sT/d/3lVKLLMzGtL9zezMYLxLuK9JrnWrW6Pv0ymgmvqvLQOLk89FH1ivTIUhAROtGP8S/+XrlbA+3VMl4vbVJocq6q5wInS03kLCr5lW9p1cDhZyimuxaTLJz5r1MUtXnsYkHMUtP16uhoW0HKeVeQVI3GCtQsC/265BxPIpn/3kCjZrinKdI7YI0HqZJVwUMEtIf3ctLKjEx41e56R3clCslXglWgGkdzrWbZUIsIDV9KJbIfS7wopNujxerof16SvQStbPqh19W0WstFlrMWvrjhwthBWAYX41TWt+NU0/WFcRen2h8+UWWOiWbbHS2xOrRKt3UYpTfutwZWgFWOQWxDxNkPkkW0y7wnrZnyUEpx9Myz/55wZYQCu8SkZe0hDFO+z5ua7hzXglgYVjkqHlYT1PY2DypSX3hzbrhVGFg8S6ySyitUn7dtW4UzNKvZUmpVk5uVJaDtYzY9K0zrLqCusl8QiBvITn8iMef90Ei93KRLtZ5mSLkONq61vTHK3R92ej1tRY1UiG6THtAYvNoZMtwrrjIlTjn9vMIlq5lbPak1G5rkgJLjdmp+02peVhAa7nJkn6WLJesO4BFvIJGW4jKgL18o87bjTLDaAVrQdDWtEsqHCZuNqiXOstDttvEayp8at5bkI3kavHHma9hHKTQE8oMSl33A4rdSvpGUJgSXvlzi2H1RaKMXWLyjCuxQSUUqyzWVJsJphSTMypo1mf7kdIK4DSeaXbqzWtCY1ZAsqPn5qWg/X8jLQI2rT5nyR+nldXs15UQOkyNJg0KT86wLK01B7y6i1e5di2fcsZvyW9ttv/83Z+PY3kWBSHpdkkZBtlHjYtQr9UlaCkliXUKGuIZClRKQ8QbQlU+f7fZe17/edel9MTXMlWMmmGHqTh1+ceHx9XB0FpASxnW7XV19uyb161TxTZBv9OEkHq2vLHFv7JejsnQ4t2ok5Ze8fKVDOfetEzjd+Ki8rL6pcR1urxMdCa/DSoGC+trC6o641RsmIbAovO3n8PiMqj0srKei8GT4tW7vuervYrlkYBlMe12uEgBm15ZcFLZ4B1b5yTw1UP8iyAlRBWwBNe6LXIfOMKoPXxYW9Y2//nY7+PhtDPn98PkhFU9lXpy7v85CfoarnUcqqJvKzfL98It8BsAKweKfvqTCpoatuYR45nMW3t9dOdOn+QLJrK7ZvVhrq7sayNMNrCBDH52SEqa/PE6Ol+0UsMX08Ea+ul5fhwVTX6uch+S5TxP6/hFhm8FQssa0+ncPUZzyCbQ60tYXBpYKq4/of53xgjLFRWR5TFokScU/NgbWOHsoMXJpCBgscAWCNDC6Koze57X7f7JOpZbbyugrLEBqdQCVGYe2xGZm+4tLyctpZ8FD2wN6+vXFhbMn3bSFRJVEOUhdr6cJEU7pQBTh9hCtnFSCnrWRqVVlZr1sTxj5+1QQW4nLaiWXzju+xBytoGUfE49Z4gBdcQWIbWB4mjENo/yAjS/TOCoroCezdjKIq2ba///e3bz87pCrVFvQscfslBwcdDYPUiQkpSICoANgjWhZtER2tF94Mstq+YtysrK41KGGKFxnV9ff2XhtWhtGqnrbAq8j2QP9sYMIY9Ub0fGsATKIvR6jUNn/EySMYQdWXsSr8abcH1WHeIy0qrphvr5VsoI2qyCcqHFRC9p43KU8KrWgx9g7Bvek2047fHzSAxrE/r7DwyWF2Z0CBUIdQv7VpFWxQaWW0Gsevq9CxaeXGvz4S15VuZ9yglbPkAGlTDYRlaRlQmv/ePU10rs+EJSxhXN7TEpoA5dNJq2zeqrc5vrP0vxMLsJObCOjx7yCpSVnUCZekEoWkZZe0/UVurz55fRbJyjmWEZUSlgRlVaZEhrSWZRKetlKgGKiusfO9pT2cj2FTVcFigLXunzH7fWwXjAssqC0htQFqgKGGYASzU1rKjq2LtaHmNLUM1mA8r7VV9XBWwak4Cy2gLItZ+7/srnq74MiiU3RQKq6y2LdzVIi3CqrZPjwsF9rY8jbKSsgJM20hWp/Asq61Pcwix/4zWwY2vGryyhN0/Y2wwBl+wy2srTlxdWBxJjljWA2AxaTV+DWxIDnWiAlwngWW0Ze/s49vBOLe7rgG2hPphrp0A14IRLITo06ptogdp9TY/g5WVSFXc1wOuxWney91M4iqxErLcDnvnYFdGWIBMGVYQTAtM823NJtE3gh1fGHE9PAmsHiSNaFv5+TulsqxvOVR7XvWtIllZUgBIuCn0w4jawry1rLl18YrLfmIgrKb/oFbVBFQng4W+FUh5Wa2ItVtZbUBROikQQu6DHX46sSZ6YFxay2GwGp4XmjgveGWdFhbSYstgcPcI6FJiAAASE0lEQVRQNIBZaWIGijP3yOJ3zuUJrM6VzXXweEttAKwmmr8tD1aoqSYM4uKEPwmG0Nq4jMWmUOAiuAFdCcQUxhA/2rXpNbGrvXeBdXVuHLNhNdtD80eiFVGWlCeEZXyLnTvTgAUrILRX2I3iI9JUAVtEKy3UVnShprrwSz0EVjKruxXQ6coP4UmVBdpiLXLQlYIO2ccrE0VVawaxcN6lGDNVJGjV4eiH9Db5sJreZpmJinECaZ0UltfWph+wbCVj94PWs4qIkGiDifV2PmRx7IysrMByYTmv2vZUZXn5LHoeWJggrFWtwrmzcr0oqqpVrfAzVxR9ajuBnU1bp/eJ/mCxyx9Db+69FFr5dEVRyZPDsrT4aWrQFZbIkBsEiiteCp2yIKQWpN86FCKWy2xYyW6hYcHKfSBPbvDBt1jZ/mjrmLAOqp6tk2URgykw1Z/6XdM1saN53hlYPqwmHkNnV02wdmlFBR/cXZ78x9AirfhAFVVlHZ0aFqyJ7Y6jcwkfsrzRFdv+kI4rX1l/RuUEFSZRympx+p9w7GgBscfQyeB2MK0sl0a9siyuVAfhZQXtc6ayFgcmkGwGvbSke9ydHtbI0lIrUrmbGVT+ZCINrGWDCKPo+61+5HLOlQVruqj6siKJoUFhyWBYAGt6clhWWyt+kANHXgJ9XbXUrLyiRG8Qd3rpJNpKKmwArMQEelQkZUmUl4F1hh9ib7QFth4OCKEYRc+yWaFVTFHCK4poS7TK561umR7GHFij74skqortcGSQlQEm5d3NGWBdXFxqWuSGBhhCJURR9MOooFGLwCpsM6hh/a5TsAYoa3T1r2jLTLbNTUDlE5a9ZuNzwLrw2jLhARq+X86wqDfxrNUzMnCuonD9Fjh6F81jFqzLBeHkHcuLSpIBNJqytMrZ5ehstADW4wZEFQ4Hv3IplyDImuiP+FFdWbB+zMLWpgp7G/2AkSNRFJFZXPOr88BC34JbioATFsi0wHJBVJiQJeKkhToT9ouifmuosi4AVt/VUVmNdJx8aLDXmUzL0wKbh+8bTijcrKVVJrCDUNGqyPstrqw8WOOblLHTnkHa5EAcS8r1mUwLaYGqrLebUewzOpRQhbctVFbc2HjHz4KFEb6i5UKvkeETKM86h4GWu5lB4bGXlY7oc1IJXm59DLT43qfOh1Vxw/Lbm/QMlrIszxNLKS17WI8nN2n9GMcSETIVBhG+OJxVW2SWWBas0XRBW74qLvuca+EQVo7WGefQ+ZaAATTDJBIxQdjaPSEx5feJqqDniR3ND3nKurzbVtGpoI+fvpIJU1jio6zm30dnpaVshSASXV+UT6nAqMUXzuxs3iJxq8tT1uWC1XxEYBVtsIhflRLm8P580gJaQrV2Z6iK/jYwlA5t6t9cA4Fx9rfb+Xh95SlLZwfaWjWVbLysnLhoHnXKktX5LN7Ran2PwDCFIot8NqjLHZbZSWT9lh/DPGXp7CCdR5HkwHVFUFla8szSsi4P37Ld8YiCHUf/IT8UeMBvx9in086ZVpc9hpPpXRXvnoOkYAL9QljapRCe5VmlBbR+qVan0h1fDnloJ5m+JTUgftIBM0YftYF5yhpdLXp6on0Mze0WF8Bay7vZOaUF+0TjW5jgRTJOaY8SCXIicHL7xIL3W5ljqB2+Cmc4TcTLSUwGwypRWmtZnnNBdLTghiIRO1PUv8M2sWDBwX+NzhgC/4bBG0mlmbAuftykMrskyyBPWGBZa7kuy7tzdQ+EljL3qhX+kEuIY7Y+9r4kP5IGF79/KxcWmJYvZWQ4wmH5ypKynoUKO7PHO1pws7vpinHLp0Xy94cXCXi+gxgwhmBatDqWdPtMAlYp0aykxEEsy/V6Pj0/LfNtKvVoJol2ovE+cRcXhIwV3lH5O/hWLqzLWWxU9JCQ0iq9sNC5jG1Nzktrgr7lTriCHSlCSdBKXvGzV8G0Ze8NzIZlkhbt2yUVVkwKJ3FtnuXaDOLsanTxf/EtkEbRMvOmdbP4w3F13G91+bDMCY+MhSXjUqaM10KYQzkfQGs0Gn3F5TFdujrB16RhZVQpz1dMWf4em1xYbA5lhAuAlfxhRLWG14chtEaX08sjaYW8hSIr4v1PwuEVKylYvzVAWaPxTcRKVgd0FeI7sCo1rTKX1uTqdn6c5QEtPIaAb3f3x9OK5G+LqA3MhgVzSJo+CwpRVSEyBFpISssLXvNojae3t0+3t8fS+qUK51voUja779KpQSSaU8heeJ44AJYO8bKJ+/aoRi5tYCDCkmvgZWh9H39Zzfe3T/o6ntaj/jYdrSMbeUFKVbelBnVpbWXD0uvhXcOPJ6SkrEpuWWYpRHWtgdZ6Ppt+7Qc4ji41q5enp5eX2+Mm0SQIE0ahaFbpLgvVJZzszG/6/yDut+p8WKMrHeJlQxJDf/ccRGWVVeIUmqt8mN9ffSFwjb/Pb180K8PreG35xKQOnYmlT1zdEPrLZPl8WBc/ZjJq26XXVhmCu9/nrO2KuMYLbP5ocenVd377+voE18vr8bR22G/tFHekHasf1CF7xzICnprWAFi4P/TZiuqqlL0toZtBMCyA9fCg4+n99yNwjUbjqZWV1hX88vQFl29dhEjeDn+wDPSoXK3fXufD0n/YMj4frDgrNolrqiszhlpb2rlmf4drNBlPjaxeYALx+fTyhUmENlCIg86+a/HgJ/xFDOHvfRC+5jJvzfJtwNt43Nw5s5L9ZZBpStplkPPS6jJGr4dxMjosqqv7+e0zyOn1+cldL1/xrfZw5dD7GwShq+f7b+N6Q2CZ6kGy4C57wd0qax1CVgRLPzUuPY3j3j5G72zGl05Uz0/P1t2f3CAeTcv0UiSR28r5byZyJ4IcbYgYAuticnMXWneuLRm1DTSUMlRw3Rle0++X4/FkMjLXZDIZj6+m9zON6vn55fnFXd6zvkgLd9M75TpRyKnh6HB3jIu1g2Bpacn+zTJS0sAQMkOIWLgYPoTnw8Prej6fGWT6mpqX2b3mdKvn75nCeqIm/3Kky0/ifmsnxIGB3P0psKpBsLRrrdlJDstYss/K03pAXERcmtfD66vOBHO87m7/197V9CaOBNGwBGEmCkJIOEKcMHK0QpbQ+GD3wVLfkfj/f2e7+rOqus0ANtFqEq82yaz2sPvy6vWrV9VG1OrPtcGqtlA9xq3efCti1SVRnn6LcFgZgjENnDrw8qNoBcUqUswCpEoQfKF/BpD0F8CKVKEVLf1DfTu3rudbUXtYRXcxBjNLqVZxOHCl8k0hyxu0d0d1iLCy3DLwCA0T/KFtMVwn83cg1l3cYvlWVbGCO/uUSx+HPqzp/N2xgcxS1MpTviF4d9cT0irUSAWsZCkMVsJ8hQJ030WoQouVF632PpVn+Rbuf7reKH5MZukDMZVgFThywNTCCi8tVE6yNECGX74EqcC3vgI9v+7QLZRv7aveCuzzYoOZpai1OjR8WcYNc5zJgkBZUktqqWXx0lhZ5QI2aVJ5yBy1Tr4K2xOqxdvRwvlWmE2fk1JvDD3ZxRnMrJc5dIimv4FqLIjAG+cOKZYsUljJcBKWZW2p5bEKAo+5RY7DO9H6VOrel2+lr9hhyl0Gg/Xy8Us2h4KOCaPD0Hc7xGVJxCwNmAh41eFAbJFsBY+FEbvHb/F8i3Gq613jGl6GEItvi0NTsAm0mxK63F2yXocB5cAKSAl7KCaYdWqxwt/rt+yQiwcQfA0Crwg6CIeDBc60cYYh2IUQY7kmOnCrRJJFkcJw+aclttSTCjGrvT2x+cT5VnrNpkfqx2AWRDUWLdoRNrglbJLdDvZYlFmWXbVxDgnNailcj+VbzKKfA6vQ6k3g2AhgvSzeVSFagMyiLUlmcPRexL5B4m4nwIUf5LSQuj+k8nG+db4i9mc8uR6FWVCIBW6g4fvBTVYbHzdwzZJMtIwjLSmzrH8P5gEz61G0XL7V4bvT1R9s1kjMgkIsDiwZtUVImRVpFrWk2DtY6yA8Wix3iAzE4/lWxUuyS1rVkZg1VydiOAllg6Y5wV/hxMEplkMMkaoMx6EXeSZaqKNmaL3d3Ccav/Vp7iCevfPq2FUxvBFRdaOABaPiLZpQSLcEQjxDiP1KKVO+oceUuk46xDRO3eNSvGNCdtH78tH+FtEwshzRVSOBNQfZKhBeZPZFAuUS5zOo16FFaMtQJJl1aoPTah9Ay+VbnX/9n4GrSvsHN3sci1latkjgwEK/okfc0VmITsOa+Cx2HBIbT587slOUL8f51vnCOFaNySzjH2B32zHLjSh46OfR4k10KYi8Y8B0qhXxqk0YiMfzra7q3ZZ3ujUeWDBzDWZUaxaqQ4nSGdwUBoUX1Gfh3tAUYU3L8JQowkH5Fr2+Eu1MjlmGGq28CdkM7gm5yXIpKZH4kjY7tBRRtOzrMMksjVZ2o251aLvvfGWSuB+dWeq3tcsLnMzwsU7BipD7d1KIdbI3JMRK2Yfb0YLOpwqJzYV2h1qviN8aOGRN7E9tnV41XNujrpCGMyU/CyOhJ3FpGwxEohJXt+9v0XyrZ4/SBPKqDKejvlsO0DJWq0li5aYU/iiUUatjoaprFjxQT4rz0rgS83s2knC+1XGnFe75jA2WQctcaYK/Ghl5Uq9WVxTLwcVki4wtyFgs5tZtl8+yK/lWdDRWY4Ol0dKGlJ6EEtt3pFgso4m8Q8JnOWaRyXQbNz43/W/xfOvaNjP4rMnLqM98sttawUo5UjoCI71OD7FSHv7PzFrduCQX51vn3rcDKrDGvkezALSkkXncQIc+Giv8NWax7rDFVovMpaMucXn7zTOSb/kbKuHlBej9LF21Gf3S0fzj11YSVkWtDmdW1BcGWmHNQvlf29sdAla7O27pxftbFdetyjFrfLBAt3JrSMNeJNOsMNyh1KJ4mWF+GzstNmltqV7t7tqCDvkW9aM8n7+MaeAjlZcS2Xgi8bKkXbRHill4wRKtOHlIlODy3ht62dTfT6zsx/LAzxcSCyr2/R5b3x1ab7kxWqV1EQVLsiQ17wnvQJvD1IEYpha2IFuzanp3rSi0rN+CzzGi40R/GVZht37SPcmP9xxEvpTR8gxay5LJmWHiLAzMYkENppVZE1lNH7jLaKav5h75J+SmlVuUtDmXNvlPqUI7el2Z7rDEK1ncOkhmSvt8ViJZpi7LbZk+eAHbvPUHADt3x+6otBzsRNiG1xH05mkXcOeLiTkUrbYXkkwqJG116lRvGKjV+jKkIk/j5Rbk6tFrW6DynXt3ML2/ad4fcpw99WUnH2+5kEVBAmW278fNQ8lNVp/Ae3lvUUiavz/+u9d+qzOvsKEpvN3jmq2ferN7nk1XW1WGDq2SRMpsN6ukDt5zq7cMww6g+bbMd4PegaDzLfPpMu4dbdU+vPPoMnvyGxbAzecNGYKVvdNV6uB9CYq0wLPFNh00ZIM/EfCoDddlb1/C5d6VpP7B+XnqjgeKK1AuvVnLh2DSrd5a8xAx69rw8GRFy9JquRuuKIvp5viphz1ddzzqt/8YAVN2dPaavTz/WUzeVtuyARfhFmeSAU3Zw6xoxBNymlNtLqm0Il8NpZX9b93M9r/trOe815+GCHVZzdbTr8DKwJWL0otWgdRd9galxGiJVAJ4EgYpEPa3yVjzvNfZWctWePa/j/+8ZvOXL3oWIPSluTTXo1oRs5KTQ8otDVXdKmEf8deeTdf6rrCWLv31c7b5KlqZX9j84321DPfAPKd6NatGTqsvATydhFDWapwKxEf4Zvbv0b5JdzbbrL+QVki6cjq5v+azBK5AMrIIkiXq8aEycE1e1xv9rF+nky+Hypw1Ci4U/PHWsExrVjzDd3CJZf4EqEwlLLJskmWJW31fVoyGXTJK30WsWXUqKiXMWj4Nqv/LA9oVtF57L5s3hHEYmRtquPQlHrvwoKklalV/Stb/ZqjMyaivptalbKRbCHGpgyDxn2hxCRrkNFLCkGrxt0NlqvFjqvGSOpZx8QxCy2+V+mtiUI3KqgOCLSA1yb4DUgSvrbYSNbpsWCYyeCCU8lOaW8Cpt+k3QsrhpW9AA2CWXLWguXJtL7IKW4MA1E5xavHdoPKGRhFspRADWkkMV+0WQ+D8g5vA6l97n35XoJCjmb7rS/Y5YMYaRGCTvpY/zb45UKQmgWQ7hRl5dj8wXaPZQr/PQeGTLfQLHn5A+Xl+np/n53nC8x/tAMljWkeBnAAAAABJRU5ErkJggg==",rO=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},toe=function(){var t=(0,Ke.Z)(function*(e,r){const a=new Fr.keyStores.BrowserLocalStorageKeyStore,A=yield Fr.connect({keyStore:a,walletUrl:e.walletUrl,...r,headers:{}});return{wallet:new Fr.WalletConnection(A,"near_app"),keyStore:a}});return function(r,a){return t.apply(this,arguments)}}(),noe=function(){var t=(0,Ke.Z)(function*({metadata:e,options:r,store:a,params:A,logger:O,id:J}){const ee=yield toe(A,r.network),ie=function(){var de=(0,Ke.Z)(function*(){const be=ee.wallet.getAccountId(),Ee=ee.wallet.account();if(!be||!Ee)return[];const Ce=yield Ee.connection.signer.getPublicKey(Ee.accountId,r.network.networkId);return[{accountId:be,publicKey:Ce?Ce.toString():""}]});return function(){return de.apply(this,arguments)}}(),oe=function(){var de=(0,Ke.Z)(function*(be){const Ee=ee.wallet.account(),{networkId:Ce,signer:Ie,provider:Ue}=Ee.connection,We=yield Ie.getPublicKey(Ee.accountId,Ce);return Promise.all(be.map(function(){var $e=(0,Ke.Z)(function*(ht,ct){const wt=ht.actions.map(En=>(0,Js.createAction)(En)),zt=yield Ee.accessKeyForTransaction(ht.receiverId,wt,We);if(!zt)throw new Error(`Failed to find matching key for transaction sent to ${ht.receiverId}`);const Zt=yield Ue.block({finality:"final"});return Fr.transactions.createTransaction(Ee.accountId,Fr.utils.PublicKey.from(zt.public_key),ht.receiverId,zt.access_key.nonce+ct+1,wt,Fr.utils.serialize.base_decode(Zt.header.hash))});return function(ht,ct){return $e.apply(this,arguments)}}()))});return function(Ee){return de.apply(this,arguments)}}();return{signIn:({contractId:de,methodNames:be,successUrl:Ee,failureUrl:Ce})=>(0,Ke.Z)(function*(){const Ie=yield ie();return Ie.length?Ie:(yield ee.wallet.requestSignIn({contractId:de,methodNames:be,successUrl:Ee,failureUrl:Ce}),ie())})(),signOut:()=>(0,Ke.Z)(function*(){ee.wallet.isSignedIn()&&ee.wallet.signOut()})(),getAccounts:()=>(0,Ke.Z)(function*(){return ie()})(),verifyOwner:()=>(0,Ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:de,nonce:be,recipient:Ee,callbackUrl:Ce,state:Ie})=>(0,Ke.Z)(function*(){if(O.log("sign message",{message:de}),"my-near-wallet"!==J)throw Error(`The signMessage method is not supported by ${e.name}`);const Ue=typeof window<"u"?window.location.href:"",We=Ce||Ue;if(!We)throw new Error(`The callbackUrl is missing for ${e.name}`);const $e=new URL(A.walletUrl);$e.pathname="sign-message",$e.searchParams.append("message",de),$e.searchParams.append("nonce",be.toString("base64")),$e.searchParams.append("recipient",Ee),$e.searchParams.append("callbackUrl",We),Ie&&$e.searchParams.append("state",Ie),window.location.replace($e.toString())})(),signAndSendTransaction:({signerId:de,receiverId:be,actions:Ee,callbackUrl:Ce})=>(0,Ke.Z)(function*(){O.log("signAndSendTransaction",{signerId:de,receiverId:be,actions:Ee,callbackUrl:Ce});const{contract:Ie}=a.getState();if(!ee.wallet.isSignedIn()||!Ie)throw new Error("Wallet not signed in");return ee.wallet.account().signAndSendTransaction({receiverId:be||Ie.contractId,actions:Ee.map(We=>(0,Js.createAction)(We)),walletCallbackUrl:Ce})})(),signAndSendTransactions:({transactions:de,callbackUrl:be})=>(0,Ke.Z)(function*(){if(O.log("signAndSendTransactions",{transactions:de,callbackUrl:be}),!ee.wallet.isSignedIn())throw new Error("Wallet not signed in");return ee.wallet.requestSignTransactions({transactions:yield oe(de),callbackUrl:be})})(),buildImportAccountsUrl:()=>`${A.walletUrl}/batch-import`}});return function(r){return t.apply(this,arguments)}}();function iO({walletUrl:t,iconUrl:e=eoe,deprecated:r=!1,successUrl:a="",failureUrl:A=""}={}){return function(){var O=(0,Ke.Z)(function*(J){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:e,deprecated:r,available:!0,successUrl:a,failureUrl:A,walletUrl:rO(J.options.network,t)},init:ee=>noe({...ee,params:{walletUrl:rO(ee.options.network,t)}})}});return function(J){return O.apply(this,arguments)}}()}const roe="data:image/png;base64,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";var oO,sO,aO;function ioe(t,e,r,a){return new(r||(r=Promise))(function(O,J){function ee(de){try{oe(a.next(de))}catch(be){J(be)}}function ie(de){try{oe(a.throw(de))}catch(be){J(be)}}function oe(de){de.done?O(de.value):function A(O){return O instanceof r?O:new r(function(J){J(O)})}(de.value).then(ee,ie)}oe((a=a.apply(t,e||[])).next())})}const u1=null!=(oO={}.NEXT_PUBLIC_RAMPER_ENV)?oO:globalThis.RAMPER_ENV,Yi_LOCAL="local",Yi_PREVIEW="preview",Yi_DEV="dev",Yi_STAGING="staging",Yi_PROD="prod",l1=(sO={}.NEXT_PUBLIC_VERCEL_URL,aO={}.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF,()=>void 0===globalThis.window),Du=()=>!l1()&&window.location.hostname.includes("dev.ramper.xyz")?Yi_DEV:!l1()&&window.location.hostname.includes("preview.ramper.xyz")?Yi_PREVIEW:!l1()&&window.location.hostname.includes("staging.ramper.xyz")?Yi_STAGING:u1===Yi_PROD?Yi_PROD:u1===Yi_STAGING?Yi_STAGING:u1===Yi_DEV?Yi_DEV:u1===Yi_PREVIEW?Yi_PREVIEW:u1===Yi_LOCAL?Yi_LOCAL:Yi_PROD;var cO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function loe(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),e}var j6={exports:{}};(function(t,e){!function(r,a){var ee="function",ie="undefined",oe="object",de="string",Ee="model",Ce="name",Ie="type",Ue="vendor",We="version",$e="architecture",ht="console",ct="mobile",wt="tablet",zt="smarttv",Zt="wearable",En="embedded",Xt="Amazon",xn="Apple",Ln="BlackBerry",Ne="Browser",Je="Chrome",lt="Firefox",vt="Google",yt="Microsoft",Ve="Motorola",ft="Opera",er="Samsung",Un="Sony",tn="Zebra",Qt="Facebook",Fn=function(cr){for(var br={},Gr=0;Gr0?2===Ar.length?typeof Ar[1]==ee?this[Ar[0]]=Ar[1].call(this,Es):this[Ar[0]]=Ar[1]:3===Ar.length?typeof Ar[1]!==ee||Ar[1].exec&&Ar[1].test?this[Ar[0]]=Es?Es.replace(Ar[1],Ar[2]):a:this[Ar[0]]=Es?Ar[1].call(this,Es,Ar[2]):a:4===Ar.length&&(this[Ar[0]]=Es?Ar[3].call(this,Es.replace(Ar[1],Ar[2])):a):this[Ar]=Es||a;Gr+=2}},Si=function(cr,br){for(var Gr in br)if(typeof br[Gr]===oe&&br[Gr].length>0){for(var kr=0;kr255?Ur(lr,255):lr,this},this.setUA(Gr),this};ni.VERSION="1.0.2",ni.BROWSER=Fn([Ce,We,"major"]),ni.CPU=Fn([$e]),ni.DEVICE=Fn([Ee,Ue,Ie,ht,ct,zt,wt,Zt,En]),ni.ENGINE=ni.OS=Fn([Ce,We]),t.exports&&(e=t.exports=ni),e.UAParser=ni;var gi=typeof r!==ie&&(r.jQuery||r.Zepto);if(gi&&!gi.ua){var Zc=new ni;gi.ua=Zc.getResult(),gi.ua.get=function(){return Zc.getUA()},gi.ua.set=function(cr){Zc.setUA(cr);var br=Zc.getResult();for(var Gr in br)gi.ua[Gr]=br[Gr]}}}("object"==typeof window?window:cO)})(j6,j6.exports),(new j6.exports.UAParser).getBrowser;!function(t,e){var A;A=function(){var r=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053a":"JH","\u053b":"I","\u053c":"L","\u053d":"X","\u053e":"C\'","\u053f":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054a":"P","\u054b":"J","\u054c":"R\'","\u054d":"S","\u054e":"V","\u054f":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062a":"t","\u062b":"th","\u062c":"j","\u062d":"h","\u062e":"kh","\u062f":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063a":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064a":"y","\u064b":"an","\u064c":"on","\u064d":"en","\u064e":"a","\u064f":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067e":"p","\u0686":"ch","\u0698":"zh","\u06a9":"k","\u06af":"g","\u06cc":"y","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e62":"S","\u1e63":"s","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u201e":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial","\ufef5":"laa","\ufef7":"laa","\ufef9":"lai","\ufefb":"la"}'),a=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042a":"A","\u042c":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044a":"a","\u044c":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","\u20a3":"francos","\u2211":"suma","\u221e":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","\u2211":"soma","\xa3":"libra","\u221e":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function A(O,J){if("string"!=typeof O)throw new Error("slugify: string argument expected");var ee=a[(J="string"==typeof J?{replacement:J}:J||{}).locale]||{},ie=void 0===J.replacement?"-":J.replacement,oe=void 0===J.trim||J.trim,de=O.normalize().split("").reduce(function(be,Ee){var Ce=ee[Ee]||r[Ee]||Ee;return Ce===ie&&(Ce=" "),be+Ce.replace(J.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return J.strict&&(de=de.replace(/[^A-Za-z0-9\s]/g,"")),oe&&(de=de.trim()),de=de.replace(/\s+/g,ie),J.lower&&(de=de.toLowerCase()),de}return A.extend=function(O){Object.assign(r,O)},A},t.exports=A(),t.exports.default=A()}({exports:{}});const ry=()=>l1()?"localhost":window.location.hostname;({local:`http://${ry()}:3000`,preview:"https://auth.v1.preview.ramper.xyz",dev:"https://auth.v1.dev.ramper.xyz",staging:"https://auth.v1.staging.ramper.xyz",prod:"https://auth.v1.ramper.xyz"})[Du()];({local:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",preview:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",dev:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",staging:"https://us-central1-ramper-prod.cloudfunctions.net",prod:"https://us-central1-ramper-prod.cloudfunctions.net"})[Du()],{local:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",preview:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",dev:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",staging:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod",prod:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod"}[Du()],{local:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",preview:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",dev:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",staging:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0",prod:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0"}[Du()],{local:"G-QDW3GW421L",preview:"G-QDW3GW421L",dev:"G-QDW3GW421L",staging:"G-7NRREF51EB",prod:"G-7NRREF51EB"}[Du()],{local:`http://${ry()}:3001`,preview:"https://example.preview.ramper.xyz",dev:"https://example.dev.ramper.xyz",staging:"https://example.staging.ramper.xyz",prod:"https://example.ramper.xyz"}[Du()];({local:`http://${ry()}:3002`,preview:"https://static.preview.ramper.xyz",dev:"https://static.dev.ramper.xyz",staging:"https://static.staging.ramper.xyz",prod:"https://static.ramper.xyz"})[Du()];({local:`http://${ry()}:3004`,preview:"https://docs.preview.ramper.xyz",dev:"https://docs.dev.ramper.xyz",staging:"https://docs.staging.ramper.xyz",prod:"https://docs.ramper.xyz"})[Du()];const uO={local:`http://${ry()}:3005`,preview:"https://js.preview.ramper.xyz",dev:"https://js.dev.ramper.xyz",staging:"https://js.staging.ramper.xyz",prod:"https://js.ramper.xyz"};uO[Du()],{local:"suyklxmori",preview:"suyklxmori",dev:"suyklxmori",staging:"dtofgevaxu",prod:"dtofgevaxu"}[Du()],{local:`http://${ry()}:3008`,preview:"https://developer.preview.ramper.xyz",dev:"https://developer.dev.ramper.xyz",staging:"https://developer.staging.ramper.xyz",prod:"https://developer.ramper.xyz"}[Du()];const E2=t=>window[t];let A2;const Dd_GOOGLE="google",Dd_FACEBOOK="facebook",Dd_APPLE="apple",Dd_TWITTER="twitter",Dd_EMAIL="email",iy={MAINNET:"mainnet",ROPSTEN:"ropsten",GOERLI:"goerli",MATIC:"matic",MATICMUM:"maticmum"},lO_DARK=(iy.MAINNET,iy.GOERLI,iy.MATIC,iy.MATICMUM,"dark"),oy=(iy.MAINNET,{ALL:"ALL",DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR"}),F6=oy.DEBUG,_2=(t,...e)=>{};class woe{constructor(e=F6){this.debug=_2,this.info=_2,this.warn=_2,this.error=_2;const r=Object.values(oy).includes(e)?e:F6;this.error=console.error.bind(console),r!==oy.ERROR&&(this.warn=console.warn.bind(console),r!==oy.WARN&&(this.info=console.info.bind(console),r!==oy.INFO&&(this.debug=console.log.bind(console),oy.DEBUG)))}}let Eoe;if(void 0!==globalThis.window){Eoe=new woe(window.localStorage.getItem("ramper_loggingLevel")||F6)}function U6(t){this.message=t}U6.prototype=new Error,U6.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function S2(t){this.message=t}S2.prototype=new Error,S2.prototype.name="InvalidTokenError";!function(){try{window&&window.Promise}catch{return null}}();var Doe=loe(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(t){var e=Doe,r={HS256:"sha256",HS384:"sha384",HS512:"sha512",RS256:"RSA-SHA256"},a={HS256:"hmac",HS384:"hmac",HS512:"hmac",RS256:"sign"},A=t.exports;function ee(Ee,Ce,Ie,Ue){var We;if("hmac"===Ue)We=e.createHmac(Ie,Ce).update(Ee).digest("base64");else{if("sign"!=Ue)throw new Error("Algorithm type not recognized");We=e.createSign(Ie).update(Ee).sign(Ce,"base64")}return be(We)}function ie(Ee){return Buffer.from(oe(Ee),"base64").toString()}function oe(Ee){return(Ee+=new Array(5-Ee.length%4).join("=")).replace(/\-/g,"+").replace(/_/g,"/")}function de(Ee){return be(Buffer.from(Ee).toString("base64"))}function be(Ee){return Ee.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}A.version="0.5.6",A.decode=function(Ce,Ie,Ue,We){if(!Ce)throw new Error("No token supplied");var $e=Ce.split(".");if(3!==$e.length)throw new Error("Not enough or too many segments");var ht=$e[0],ct=$e[1],wt=$e[2],zt=JSON.parse(ie(ht)),Zt=JSON.parse(ie(ct));if(!Ue){!We&&/BEGIN( RSA)? PUBLIC KEY/.test(Ie.toString())&&(We="RS256");var En=r[We||zt.alg],Yt=a[We||zt.alg];if(!En||!Yt)throw new Error("Algorithm not supported");if(!function J(Ee,Ce,Ie,Ue,We){if("hmac"===Ue)return We===ee(Ee,Ce,Ie,Ue);if("sign"==Ue)return e.createVerify(Ie).update(Ee).verify(Ce,oe(We),"base64");throw new Error("Algorithm type not recognized")}([ht,ct].join("."),Ie,En,Yt,wt))throw new Error("Signature verification failed");if(Zt.nbf&&Date.now()<1e3*Zt.nbf)throw new Error("Token not yet active");if(Zt.exp&&Date.now()>1e3*Zt.exp)throw new Error("Token expired")}return Zt},A.encode=function(Ce,Ie,Ue,We){if(!Ie)throw new Error("Require key");Ue||(Ue="HS256");var $e=r[Ue],ht=a[Ue];if(!$e||!ht)throw new Error("Algorithm not supported");var ct={typ:"JWT",alg:Ue};We&&We.header&&function O(Ee,Ce){for(var Ie in Ce)Ce.hasOwnProperty(Ie)&&(Ee[Ie]=Ce[Ie])}(ct,We.header);var wt=[];return wt.push(de(JSON.stringify(ct))),wt.push(de(JSON.stringify(Ce))),wt.push(ee(wt.join("."),Ie,$e,ht)),wt.join(".")}}({exports:{}});const Ooe=()=>`${uO[(()=>{const t=globalThis.RAMPER_ENV;return t===Yi_PROD?Yi_PROD:t===Yi_STAGING?Yi_STAGING:t===Yi_DEV?Yi_DEV:t===Yi_PREVIEW?Yi_PREVIEW:t===Yi_LOCAL?Yi_LOCAL:Yi_PROD})()]}/v1/near`,Noe=({src:t})=>l1()?Promise.resolve({}):((t,e)=>{const r=document.querySelector(`[src="${t}"]`);if(null!=r&&void 0!==A2)return A2;if(null!=r&&void 0!==E2(e))return Promise.resolve(E2(e));const a=document.createElement("script");return a.src=t,A2=new Promise((A,O)=>{document.head.appendChild(a),window.addEventListener(`initialize:${e}`,()=>{void 0!==E2(e)?A(E2(e)):O(new Error(`Failed to load script: [${t}]`))})}),A2})(t,"ramper"),gf=()=>globalThis.ramper,hO=(...t)=>{var e;return null===(e=gf())||void 0===e?void 0:e.sendTransaction(...t)},Loe=function(){var t=(0,Ke.Z)(function*({metadata:e,store:r,options:a,logger:A}){yield((...t)=>ioe(void 0,void 0,void 0,function*(){const e=yield Noe({src:Ooe()});return yield e?.init(...t),e}))({appName:"Ramper Wallet",authProviders:[Dd_GOOGLE,Dd_FACEBOOK,Dd_TWITTER,Dd_APPLE,Dd_EMAIL],walletProviders:[],network:a.network.networkId,theme:lO_DARK});const O={wallet:window.ramper},J=function(){var ie=(0,Ke.Z)(function*(){const{wallets:oe}=O.wallet.getUser(),{publicKey:de}=oe.near;return de?[{accountId:de}]:[]});return function(){return ie.apply(this,arguments)}}(),ee=function(){var ie=(0,Ke.Z)(function*(oe){const de=yield J(),{contract:be}=r.getState();if(!de.length||!be)throw new Error("Wallet not signed in");return oe.map(Ee=>{const Ce=Ee.actions.map(Ie=>(0,Js.createAction)(Ie));return{receiverId:Ee.receiverId||be.contractId,actions:Ce}})});return function(de){return ie.apply(this,arguments)}}();return{signIn:()=>(0,Ke.Z)(function*(){const ie=yield((...t)=>{var e;return null===(e=gf())||void 0===e?void 0:e.signIn(...t)})();if("cancel"===ie.method||"none"===ie.method)throw new Error("Something went wrong");const oe=yield J();return oe.length?oe:J()})(),signOut:()=>(0,Ke.Z)(function*(){O.wallet.signOut()})(),getAccounts:()=>(0,Ke.Z)(function*(){return J()})(),verifyOwner:({message:ie})=>(0,Ke.Z)(function*(){throw A.log("Ramper Wallet:verifyOwner",{message:ie}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({receiverId:ie,actions:oe})=>(0,Ke.Z)(function*(){A.log("signAndSendTransaction",{receiverId:ie,actions:oe});const{contract:de}=r.getState();if(!(yield J()).length||!de)throw new Error("Wallet not signed in");const Ee=yield ee([{receiverId:ie,actions:oe}]);try{const{result:Ce}=yield hO({transactionActions:Ee});if(0===Object.keys(Ce[0]).length&&Ce[0].constructor===Object)throw new Error;return Ce[0]}catch{throw new Error("Failed to send transaction")}})(),signAndSendTransactions:({transactions:ie})=>(0,Ke.Z)(function*(){A.log("signAndSendTransactions",{transactions:ie});const oe=yield ee(ie);try{const{result:de}=yield hO({transactionActions:oe});if(0===Object.keys(de[0]).length&&de[0].constructor===Object)throw new Error;return de}catch{throw new Error("Failed to send transactions")}})()}});return function(r){return t.apply(this,arguments)}}();function pO({iconUrl:t=roe,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){return(0,uc.isMobile)()?null:{id:"ramper-wallet",type:"injected",metadata:{name:"Ramper Wallet",description:null,iconUrl:t,downloadUrl:"https://docs.ramper.xyz/",deprecated:e,available:!0},init:Loe}})}const gO={},yO={},mO=(t,e)=>{yO[t]=e},an=t=>{class e extends Error{constructor(a,A,O){if(super(a||t,O),Object.setPrototypeOf(this,e.prototype),this.name=t,A)for(const J in A)this[J]=A[J];if(O&&function Boe(t){return"object"==typeof t}(O)&&"cause"in O&&!("cause"in this)){const J=O.cause;this.cause=J,"stack"in J&&(this.stack=this.stack+"\nCAUSE: "+J.stack)}}}return gO[t]=e,e};an("AccountNameRequired"),an("AccountNotSupported"),an("AccountAwaitingSendPendingOperations"),an("AmountRequired"),an("BluetoothRequired"),an("BtcUnmatchedApp"),an("CantOpenDevice"),an("CashAddrNotSupported"),an("ClaimRewardsFeesWarning"),an("CurrencyNotSupported"),an("DeviceAppVerifyNotSupported"),an("DeviceGenuineSocketEarlyClose"),an("DeviceNotGenuine"),an("DeviceOnDashboardExpected"),an("DeviceOnDashboardUnexpected"),an("DeviceInOSUExpected"),an("DeviceHalted"),an("DeviceNameInvalid"),an("DeviceSocketFail"),an("DeviceSocketNoBulkStatus"),an("DeviceSocketNoBulkStatus"),an("UnresponsiveDeviceError");const Foe=an("DisconnectedDevice"),Uoe=an("DisconnectedDeviceDuringOperation"),bO=(an("DeviceExtractOnboardingStateError"),an("DeviceOnboardingStatePollingError"),an("EnpointConfig"),an("EthAppPleaseEnableContractData"),an("FeeEstimationFailed"),an("FirmwareNotRecognized"),an("HardResetFail"),an("InvalidXRPTag"),an("InvalidAddress"),an("InvalidNonce"),an("InvalidAddressBecauseDestinationIsAlsoSource"),an("LatestMCUInstalledError"),an("UnknownMCU"),an("LedgerAPIError"),an("LedgerAPIErrorWithMessage"),an("LedgerAPINotAvailable"),an("ManagerAppAlreadyInstalled"),an("ManagerAppRelyOnBTC"),an("ManagerAppDepInstallRequired"),an("ManagerAppDepUninstallRequired"),an("ManagerDeviceLocked"),an("ManagerFirmwareNotEnoughSpace"),an("ManagerNotEnoughSpace"),an("ManagerUninstallBTCDep"),an("NetworkDown"),an("NetworkError"),an("NoAddressesFound"),an("NotEnoughBalance"),an("NotEnoughBalanceToDelegate"),an("NotEnoughBalanceInParentAccount"),an("NotEnoughSpendableBalance"),an("NotEnoughBalanceBecauseDestinationNotCreated"),an("NoAccessToCamera"),an("NotEnoughGas"),an("NotEnoughGasSwap"),an("NotSupportedLegacyAddress"),an("GasLessThanEstimate"),an("PriorityFeeTooLow"),an("PriorityFeeTooHigh"),an("PriorityFeeHigherThanMaxFee"),an("MaxFeeTooLow"),an("PasswordsDontMatch"),an("PasswordIncorrect"),an("RecommendSubAccountsToEmpty"),an("RecommendUndelegation"),an("TimeoutTagged"),an("UnexpectedBootloader"),an("MCUNotGenuineToDashboard"),an("RecipientRequired"),an("UnavailableTezosOriginatedAccountReceive"),an("UnavailableTezosOriginatedAccountSend"),an("UpdateFetchFileFail"),an("UpdateIncorrectHash"),an("UpdateIncorrectSig"),an("UpdateYourApp"),an("UserRefusedDeviceNameChange"),an("UserRefusedAddress"),an("UserRefusedFirmwareUpdate"),an("UserRefusedAllowManager"),an("UserRefusedOnDevice"),an("ExpertModeRequired"),an("TransportOpenUserCancelled")),Koe=(an("TransportInterfaceNotAvailable"),an("TransportRaceCondition"));an("TransportWebUSBGestureRequired"),an("TransactionHasBeenValidatedError"),an("TransportExchangeTimeoutError"),an("DeviceShouldStayInApp"),an("WebsocketConnectionError"),an("WebsocketConnectionFailed"),an("WrongDeviceForAccount"),an("WrongDeviceForAccountPayout"),an("WrongDeviceForAccountRefund"),an("WrongAppForCurrency"),an("ETHAddressNonEIP"),an("CantScanQRCode"),an("FeeNotLoaded"),an("FeeNotLoadedSwap"),an("FeeRequired"),an("FeeTooHigh"),an("PendingOperation"),an("SyncError"),an("PairingFailed"),an("PeerRemovedPairing"),an("GenuineCheckFailed"),an("LedgerAPI4xx"),an("LedgerAPI5xx"),an("FirmwareOrAppUpdateRequired"),an("ReplacementTransactionUnderpriced"),an("OpReturnSizeLimit"),an("DustLimit"),an("LanguageNotFound"),an("NoDBPathGiven"),an("DBWrongPassword"),an("DBNotReset"),an("SequenceNumberError"),an("DisabledTransactionBroadcastError");var wO;!function(t){t.Unknown="Unknown",t.LocationServicesDisabled="LocationServicesDisabled",t.LocationServicesUnauthorized="LocationServicesUnauthorized",t.BluetoothScanStartFailed="BluetoothScanStartFailed"}(wO||(wO={}));class EO extends Error{constructor(e,r){super(r),this.name="HwTransportError",this.type=e,Object.setPrototypeOf(this,EO.prototype)}}class yf extends Error{constructor(e,r){const a="TransportError";super(e||a),this.name=a,this.message=e,this.stack=new Error(e).stack,this.id=r}}mO("TransportError",t=>new yf(t.message,t.id));const sy={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};class ay extends Error{constructor(e,{canBeMappedToChildError:r=!0}={}){const a=Object.keys(sy).find(ee=>sy[ee]===e)||"UNKNOWN_ERROR",A=function zoe(t){switch(t){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=t&&t<=28671)return"Internal error, please report"}(e)||a,J=`Ledger device: ${A} (0x${e.toString(16)})`;if(super(J),this.name="TransportStatusError",this.statusCode=e,this.statusText=a,Object.setPrototypeOf(this,ay.prototype),r&&e===sy.LOCKED_DEVICE)return new K6(J)}}class K6 extends ay{constructor(e){super(sy.LOCKED_DEVICE,{canBeMappedToChildError:!1}),e&&(this.message=e),this.name="LockedDeviceError",Object.setPrototypeOf(this,K6.prototype)}}mO("TransportStatusError",t=>new ay(t.statusCode));let AO=0;const Td=[],_O=(t,e,r)=>{const a={type:t,id:String(++AO),date:new Date};e&&(a.message=e),r&&(a.data=r),SO(a)};class f1{constructor(e,r){this.type=e,this.context=r}trace(e,r){(({type:t,message:e,data:r,context:a})=>{const A={type:t,id:String(++AO),date:new Date};e&&(A.message=e),r&&(A.data=r),a&&(A.context=a),SO(A)})({type:this.type,message:e,data:r,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new f1(e,this.context)}withContext(e){return new f1(this.type,e)}withUpdatedContext(e){return new f1(this.type,Object.assign(Object.assign({},this.context),e))}}function SO(t){for(let e=0;e(Td.push(t),()=>{const e=Td.indexOf(t);-1!==e&&(Td[e]=Td[Td.length-1],Td.pop())}));var x2=function(t,e,r,a){return new(r||(r=Promise))(function(O,J){function ee(de){try{oe(a.next(de))}catch(be){J(be)}}function ie(de){try{oe(a.throw(de))}catch(be){J(be)}}function oe(de){de.done?O(de.value):function A(O){return O instanceof r?O:new r(function(J){J(O)})}(de.value).then(ee,ie)}oe((a=a.apply(t,e||[])).next())})};class z6{constructor({context:e,logType:r}={}){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(g3()),this.send=(a,A,O,J,...ee)=>x2(this,[a,A,O,J,...ee],void 0,function*(ie,oe,de,be,Ee=Buffer.alloc(0),Ce=[sy.OK],{abortTimeoutMs:Ie}={}){const Ue=this.tracer.withUpdatedContext({function:"send"});if(Ee.length>=256)throw Ue.trace("data.length exceeded 256 bytes limit",{dataLength:Ee.length}),new yf("data.length exceed 256 bytes limit. Got: "+Ee.length,"DataLengthTooBig");Ue.trace("Starting an exchange",{abortTimeoutMs:Ie});const We=yield this.exchange(Buffer.concat([Buffer.from([ie,oe,de,be]),Buffer.from([Ee.length]),Ee]),{abortTimeoutMs:Ie});Ue.trace("Received response from exchange");const $e=We.readUInt16BE(We.length-2);if(!Ce.some(ht=>ht===$e))throw new ay($e);return We}),this._appAPIlock=null,this.tracer=new f1(r??"transport",e)}exchange(e,{abortTimeoutMs:r}={}){throw new Error("exchange not implemented")}exchangeBulk(e,r){let a=!1;return(()=>x2(this,void 0,void 0,function*(){if(!a)for(const J of e){const ee=yield this.exchange(J);if(a)return;const ie=ee.readUInt16BE(ee.length-2);if(ie!==sy.OK)throw new ay(ie);r.next(ee)}}))().then(()=>!a&&r.complete(),J=>!a&&r.error(J)),{unsubscribe:()=>{a=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}on(e,r){this._events.on(e,r)}off(e,r){this._events.removeListener(e,r)}emit(e,...r){this._events.emit(e,...r)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,r){return new Promise((a,A)=>{let O=!1;const J=this.listen({next:ie=>{O=!0,J&&J.unsubscribe(),ee&&clearTimeout(ee),this.open(ie.descriptor,e).then(a,A)},error:ie=>{ee&&clearTimeout(ee),A(ie)},complete:()=>{ee&&clearTimeout(ee),O||A(new yf(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),ee=r?setTimeout(()=>{J.unsubscribe(),A(new yf(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},r):null})}exchangeAtomicImpl(e){return x2(this,void 0,void 0,function*(){const r=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw r.trace("Atomic exchange is already busy"),new Koe("An action was already pending on the Ledger device. Please deny or reconnect.");let a;const A=new Promise(ee=>{a=ee});this.exchangeBusyPromise=A;let O=!1;const J=setTimeout(()=>{r.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}),O=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const ee=yield e();return O&&(r.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),ee}finally{r.trace("Finalize, clearing busy guard"),clearTimeout(J),a&&a(),this.exchangeBusyPromise=null}})}decorateAppAPIMethods(e,r,a){for(const A of r)e[A]=this.decorateAppAPIMethod(A,e[A],e,a)}decorateAppAPIMethod(e,r,a,A){return(...O)=>x2(this,void 0,void 0,function*(){const{_appAPIlock:J}=this;if(J)return Promise.reject(new yf("Ledger Device is busy (lock "+J+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(A),yield r.apply(a,O)}finally{this._appAPIlock=null}})}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}}z6.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",z6.ErrorMessage_NoDeviceFound="No Ledger device found";const Goe=z6;function Zoe(t){const e=Buffer.alloc(2);return e.writeUInt16BE(t,0),e}const Joe={data:Buffer.alloc(0),dataLength:0,sequence:0};var $oe=u(97858),MO=u.n($oe);var ts;!function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax",t.europa="europa"}(ts||(ts={}));const M2={[ts.blue]:{id:ts.blue,productName:"Ledger\xa0Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,masks:[822083584,822149120],getBlockSize:t=>4096},[ts.nanoS]:{id:ts.nanoS,productName:"Ledger\xa0Nano\xa0S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,masks:[823132160],getBlockSize:t=>{var e;return MO().lt(null!==(e=MO().coerce(t))&&void 0!==e?e:"","2.0.0")?4096:2048}},[ts.nanoX]:{id:ts.nanoX,productName:"Ledger\xa0Nano\xa0X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,masks:[855638016],getBlockSize:t=>4096,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[ts.nanoSP]:{id:ts.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1569792,masks:[856686592],getBlockSize:t=>32},[ts.stax]:{id:ts.stax,productName:"Ledger\xa0Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1569792,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]},[ts.europa]:{id:ts.europa,productName:"Ledger Europa",productIdMM:112,legacyUsbProductId:7,usbOnly:!1,memorySize:1569792,masks:[858783744],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-3004-0000-4c6564676572",notifyUuid:"13d63400-2c97-3004-0001-4c6564676572",writeUuid:"13d63400-2c97-3004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-3004-0003-4c6564676572"}]}},I2=(ts.blue,ts.nanoS,ts.nanoSP,ts.nanoX,ts.stax,ts.europa,Object.values(M2)),IO=11415,CO=t=>{const e=I2.find(A=>A.legacyUsbProductId===t);if(e)return e;const r=t>>8;return I2.find(A=>A.productIdMM===r)},DO=[],V6={};for(const t in M2){const e=M2[t],{bluetoothSpec:r}=e;if(r)for(let a=0;a{const{hid:t}=navigator;if(!t)throw new yf("navigator.hid is not supported","HIDNotSupported");return t};function TO(){return mf(this,void 0,void 0,function*(){const t=yield C2().requestDevice({filters:Xoe});return Array.isArray(t)?t:[t]})}function H6(){return mf(this,void 0,void 0,function*(){return(yield C2().getDevices()).filter(e=>e.vendorId===IO)})}class Od extends Goe{constructor(e){super(),this.channel=Math.floor(65535*Math.random()),this.packetSize=64,this.inputs=[],this.read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(r=>{this.inputCallback=r}),this.onInputReport=r=>{const a=Buffer.from(r.data.buffer);this.inputCallback?(this.inputCallback(a),this.inputCallback=null):this.inputs.push(a)},this._disconnectEmitted=!1,this._emitDisconnect=r=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",r))},this.exchange=r=>mf(this,void 0,void 0,function*(){return yield this.exchangeAtomicImpl(()=>mf(this,void 0,void 0,function*(){const{channel:A,packetSize:O}=this;_O("apdu","=> "+r.toString("hex"));const J=((t,e)=>({makeBlocks(r){let a=Buffer.concat([Zoe(r.length),r]);const A=e-5,O=Math.ceil(a.length/A);a=Buffer.concat([a,Buffer.alloc(O*A-a.length+1).fill(0)]);const J=[];for(let ee=0;eeO&&(A=A.slice(0,O)),{data:A,dataLength:O,sequence:J}},getReducedResult(r){if(r&&r.dataLength===r.data.length)return r.data}}))(A,O),ee=J.makeBlocks(r);for(let de=0;de{throw A&&A.message&&A.message.includes("write")?(this._emitDisconnect(A),new Uoe(A.message)):A})}),this.device=e,this.deviceModel="number"==typeof e.productId?CO(e.productId):void 0,e.addEventListener("inputreport",this.onInputReport)}static request(){return mf(this,void 0,void 0,function*(){const[e]=yield TO();return Od.open(e)})}static openConnected(){return mf(this,void 0,void 0,function*(){const e=yield H6();return 0===e.length?null:Od.open(e[0])})}static open(e){return mf(this,void 0,void 0,function*(){yield e.open();const r=new Od(e),a=A=>{e===A.device&&(C2().removeEventListener("disconnect",a),r._emitDisconnect(new Foe))};return C2().addEventListener("disconnect",a),r})}close(){return mf(this,void 0,void 0,function*(){yield this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),yield this.device.close()})}setScrambleKey(){}}Od.isSupported=()=>Promise.resolve(!(!window.navigator||!window.navigator.hid)),Od.list=H6,Od.listen=t=>{let e=!1;return function ese(){return mf(this,void 0,void 0,function*(){const t=yield H6();return t.length>0?t[0]:(yield TO())[0]})}().then(a=>{if(a){if(!e){const A="number"==typeof a.productId?CO(a.productId):void 0;t.next({type:"add",descriptor:a,deviceModel:A}),t.complete()}}else t.error(new bO("Access denied to use Ledger device"))},a=>{t.error(new bO(a.message))}),{unsubscribe:function r(){e=!0}}};const tse=Od;function OO(t){const e=t.split("/");return Buffer.concat(e.map(r=>r.endsWith("'")?2147483648|Math.abs(parseInt(r.slice(0,-1))):Math.abs(parseInt(r))).map(r=>Buffer.from([r>>24&255,r>>16&255,r>>8&255,255&r])))}const cse="W".charCodeAt(0),use=()=>!!window.navigator?.hid;class lse{constructor(){var e=this;this.transport=null,this.isConnected=()=>Boolean(this.transport),this.connect=(0,Ke.Z)(function*(){e.transport=yield tse.create();const r=()=>{e.transport?.off("disconnect",r),e.transport=null};e.transport.on("disconnect",r)}),this.disconnect=(0,Ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");yield e.transport.close(),e.transport=null}),this.setScrambleKey=r=>{if(!this.transport)throw new Error("Device not connected");this.transport.setScrambleKey(r)},this.on=(r,a)=>{if(!this.transport)throw new Error("Device not connected");return this.transport.on(r,a),{remove:()=>this.transport?.off(r,a)}},this.off=(r,a)=>{if(!this.transport)throw new Error("Device not connected");this.transport.off(r,a)},this.getVersion=(0,Ke.Z)(function*(){if(!e.transport)throw new Error("Device not connected");const r=yield e.transport.send(128,6,0,0),[a,A,O]=Array.from(r);return`${a}.${A}.${O}`}),this.getPublicKey=function(){var r=(0,Ke.Z)(function*({derivationPath:a}){if(!e.transport)throw new Error("Device not connected");const A=yield e.transport.send(128,4,0,cse,OO(a));return Fr.utils.serialize.base_encode(A.subarray(0,-2))});return function(a){return r.apply(this,arguments)}}(),this.sign=function(){var r=(0,Ke.Z)(function*({data:a,derivationPath:A}){if(!e.transport)throw new Error("Device not connected");yield e.getVersion();const J=Buffer.concat([OO(A),Buffer.from(a)]);for(let ee=0;ee=J.length,oe=yield e.transport.send(128,2,ie?128:0,0,Buffer.from(J.subarray(ee,ee+123)));if(ie)return Buffer.from(oe.subarray(0,-2))}throw new Error("Invalid data or derivation path")});return function(a){return r.apply(this,arguments)}}()}}const fse="data:image/png;base64,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",Z6="accounts",dse=function(){var t=(0,Ke.Z)(function*(e){const r=yield e.getItem(Z6);return{client:new lse,subscriptions:[],accounts:r||[]}});return function(r){return t.apply(this,arguments)}}(),hse=function(){var t=(0,Ke.Z)(function*({options:e,store:r,provider:a,logger:A,storage:O,metadata:J}){const ee=yield dse(O),ie={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Ue=(0,Ke.Z)(function*(We){const $e=ee.accounts.find(ht=>ht.accountId===We);if(!$e)throw new Error("Failed to find public key for account");return Fr.utils.PublicKey.from($e.publicKey)}),function($e){return Ue.apply(this,arguments)}),signMessage:function(){var Ue=(0,Ke.Z)(function*(We,$e){const ht=ee.accounts.find(wt=>wt.accountId===$e);if(!ht)throw new Error("Failed to find account for signing");return{signature:yield ee.client.sign({data:We,derivationPath:ht.derivationPath}),publicKey:Fr.utils.PublicKey.from(ht.publicKey)}});return function($e,ht){return Ue.apply(this,arguments)}}()},oe=()=>ee.accounts.map(Ue=>({accountId:Ue.accountId,publicKey:"ed25519:"+Ue.publicKey})),be=function(){var Ue=(0,Ke.Z)(function*(){ee.client.isConnected()&&(yield ee.client.disconnect().catch(We=>{A.log("Failed to disconnect device"),A.error(We)})),ee.subscriptions.forEach(Ue=>Ue.remove()),ee.subscriptions=[],ee.accounts=[],O.removeItem(Z6)});return function(){return Ue.apply(this,arguments)}}(),Ee=function(){var Ue=(0,Ke.Z)(function*(){ee.client.isConnected()||(yield ee.client.connect())});return function(){return Ue.apply(this,arguments)}}(),Ce=({accountId:Ue,publicKey:We})=>(A.log("validateAccessKey",{accountId:Ue,publicKey:We}),a.viewAccessKey({accountId:Ue,publicKey:We}).then($e=>{if(A.log("validateAccessKey:accessKey",{accessKey:$e}),"FullAccess"!==$e.permission)throw new Error("Public key requires 'FullAccess' permission");return $e},$e=>{if("AccessKeyDoesNotExist"===$e.type)return null;throw $e})),Ie=Ue=>{const{contract:We}=r.getState();if(!We)throw new Error("Wallet not signed in");const $e=bd(r.getState());if(!$e)throw new Error("No active account");return Ue.map(ht=>({signerId:ht.signerId||$e.accountId,receiverId:ht.receiverId||We.contractId,actions:ht.actions}))};var Ue;return{signIn:({accounts:Ue})=>(0,Ke.Z)(function*(){const We=oe();if(We.length)return We;const $e=[];for(let ht=0;ht(0,Ke.Z)(function*(){return oe()})(),verifyOwner:({message:Ue})=>(0,Ke.Z)(function*(){throw A.log("Ledger:verifyOwner",{message:Ue}),new Error(`Method not supported by ${J.name}`)})(),signAndSendTransaction:({signerId:Ue,receiverId:We,actions:$e})=>(0,Ke.Z)(function*(){if(A.log("signAndSendTransaction",{signerId:Ue,receiverId:We,actions:$e}),!ee.accounts.length)throw new Error("Wallet not signed in");yield Ee();const ht=yield(0,Js.signTransactions)(Ie([{signerId:Ue,receiverId:We,actions:$e}]),ie,e.network);return a.sendTransaction(ht[0])})(),signAndSendTransactions:({transactions:Ue})=>(0,Ke.Z)(function*(){if(A.log("signAndSendTransactions",{transactions:Ue}),!ee.accounts.length)throw new Error("Wallet not signed in");yield Ee();const We=yield(0,Js.signTransactions)(Ie(Ue),ie,e.network),$e=[];for(let ht=0;ht(0,Ke.Z)(function*(){return yield Ee(),yield ee.client.getPublicKey({derivationPath:Ue})})()}});return function(r){return t.apply(this,arguments)}}();function NO({iconUrl:t=fse,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){const r=(0,uc.isMobile)(),a=use();return r?null:{id:"ledger",type:"hardware",metadata:{name:"Ledger",description:"Protect crypto assets with the most popular hardware wallet.",iconUrl:t,deprecated:e,available:a},init:hse}})}var pse=u(96105);const gse=function(){var t=(0,Ke.Z)(function*(e){const{store:r,options:a,logger:A,dAppMetadata:O}=e,J=new pse.NearMobileWallet({network:a.network.networkId,nodeUrl:a.network.nodeUrl,metadata:O});function ee(){return ie.apply(this,arguments)}function ie(){return(ie=(0,Ke.Z)(function*(){A.log("[NearMobileWallet]:getAccounts");const oe=yield J.getAccounts(),de=[];for(let be=0;be(0,Ke.Z)(function*(){A.log("[NearMobileWallet]: signIn");const de=""!==oe.contractId?oe.contractId:void 0;return yield J.signIn({...oe,contractId:de}),yield ee()})(),signOut:()=>(0,Ke.Z)(function*(){A.log("[NearMobileWallet]: signOut"),yield J.signOut()})(),getAccounts:()=>(0,Ke.Z)(function*(){return ee()})(),signAndSendTransaction:oe=>(0,Ke.Z)(function*(){A.log("[NearMobileWallet]: signAndSendTransaction",oe);const{contract:de}=r.getState();if(!de)throw new Error("Wallet not signed in");return yield J.signAndSendTransaction({receiverId:de.contractId,...oe})})(),verifyOwner:()=>(0,Ke.Z)(function*(){throw Error("[NearMobileWallet]: verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:oe=>(0,Ke.Z)(function*(){const{recipient:de,nonce:be,...Ee}=oe;A.log("[NearMobileWallet]: signMessage",oe);const Ce=yield J.signMessage({...Ee,receiver:de,nonce:Array.from(be)});return{accountId:Ce.accountId,signature:Ce.signature.toString(),publicKey:Ce.publicKey.toString()}})(),signAndSendTransactions:oe=>(0,Ke.Z)(function*(){return A.log("[NearMobileWallet]: signAndSendTransactions",oe),yield J.signAndSendTransactions(oe)})()}});return function(r){return t.apply(this,arguments)}}(),yse="data:image/png;base64,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";function PO({dAppMetadata:t}={}){return(0,Ke.Z)(function*(){return{id:"near-mobile-wallet",type:"injected",metadata:{iconUrl:yse,name:"Near Mobile Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!1,downloadUrl:"https://nearmobile.app/",deprecated:!1,available:!0},init:e=>gse({...e,dAppMetadata:t})}})}var D2=u(73597),mse=u(45733);const vse="data:image/png;base64,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";let J6="https://chromewebstore.google.com/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/mcohilncbfahbmgdjkbpemcciiolgcge";w3(["safari"])&&(J6="https://apps.apple.com/us/app/okx-wallet/id6463797825"),w3(["edge-chromium"])&&(J6="https://microsoftedge.microsoft.com/addons/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/pbpjkcldjiffchgbbndmhojiacbgflha");const bse=()=>kc(()=>!!window.okxwallet?.near).catch(()=>!1),Ese=function(){var t=(0,Ke.Z)(function*({metadata:e,store:r,emitter:a,logger:A,id:O,provider:J}){const ee={wallet:window.okxwallet?.near},ie=function(){var Ue=(0,Ke.Z)(function*(){ee.wallet.isSignedIn()&&(yield ee.wallet.signOut())});return function(){return Ue.apply(this,arguments)}}(),oe=()=>{ee.wallet.on("accountChanged",function(){var Ue=(0,Ke.Z)(function*(We){A.log("onAccountChange",We),a.emit("signedOut",null)});return function(We){return Ue.apply(this,arguments)}}())},be=Ue=>{if(!(Ue=>Ue.every(We=>"FunctionCall"===We.type))(Ue))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return Ue.map($e=>$e.params)},Ee=Ue=>Ue.map(We=>({receiverId:We.receiverId,actions:be(We.actions)}));ee.wallet&&ee.wallet.isSignedIn()&&oe();const Ce=function(){var Ue=(0,Ke.Z)(function*(){const{selectedWalletId:We}=r.getState();We===O&&(yield kc(()=>!!ee.wallet?.isSignedIn(),{timeout:1e3}).catch());const $e=ee.wallet.getAccountId();return $e?[{accountId:$e}]:[]});return function(){return Ue.apply(this,arguments)}}(),Ie=Ue=>{const We=Buffer.from(Ue,"base64");return mse.SignedTransaction.decode(We)};return{signIn:({contractId:Ue,methodNames:We})=>(0,Ke.Z)(function*(){try{const{accessKey:$e,accountId:ht}=yield ee.wallet.requestSignIn({contractId:Ue,methodNames:We});oe();const ct=$e?.publicKey;return[{accountId:ht,publicKey:ct?ct.toString():void 0}]}catch{throw yield ie(),new Error("Failed to sign in")}})(),signOut:ie,getAccounts:Ce,verifyOwner:()=>(0,Ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:()=>(0,Ke.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:Ue,receiverId:We,actions:$e})=>(0,Ke.Z)(function*(){A.log("signAndSendTransaction",{signerId:Ue,receiverId:We,actions:$e});const{contract:ht}=r.getState();if(!ee.wallet.isSignedIn()||!ht)throw new Error("Wallet not signed in");try{const ct=yield ee.wallet.signTransaction({receiverId:We||ht.contractId,actions:be($e)}),wt=Ie(ct);return J.sendTransaction(wt)}catch{throw new Error("sign Error")}})(),signAndSendTransactions:({transactions:Ue})=>(0,Ke.Z)(function*(){if(A.log("signAndSendTransactions",{transactions:Ue}),!ee.wallet.isSignedIn())throw new Error("Wallet not signed in");try{const We=yield ee.wallet.requestSignTransactions({transactions:Ee(Ue)}),{txs:$e}=We,ht=[];for(let ct=0;ct<$e.length;ct++){const wt=Ie($e[ct].signedTx);ht.push(yield J.sendTransaction(wt))}return ht}catch{throw new Error("sign Error")}})()}});return function(r){return t.apply(this,arguments)}}();function Ase({iconUrl:t=vse,deprecated:e=!1}={}){return(0,Ke.Z)(function*(){if((0,uc.isMobile)())return null;const a=yield bse();return{id:"okx-wallet",type:"injected",metadata:{name:"OKX Wallet",description:"Browser extension wallet",iconUrl:t,downloadUrl:J6,deprecated:e,available:a},init:Ese}})}const cy="guest-book.testnet";function Sse(t,e){return t===e}class T2{static#e=this.\u0275fac=function(r){return new(r||T2)};static#t=this.\u0275cmp=Bs({type:T2,selectors:[["near-wallet-selector-sign-in"]],decls:6,vars:0,template:function(r,a){1&r&&(ji(0,"p"),Ao(1," This app demonstrates a key element of NEAR\u2019s UX: once an app has permission to make calls on behalf of a user (that is, once a user signs in), the app can make calls to the blockchain for them without prompting extra confirmation. So you\u2019ll see that if you don\u2019t include a donation, your message gets posted right to the guest book.\n"),yi(),ji(2,"p"),Ao(3," But if you do add a donation, then NEAR will double-check that you\u2019re ok with sending money to this app.\n"),yi(),ji(4,"p"),Ao(5,"Go ahead and sign in to try it out!"),yi())}})}const xse=function(t){return{"is-premium":t}};function Mse(t,e){if(1&t&&(ji(0,"p",1)(1,"strong"),Ao(2),yi(),Ao(3,":"),ka(4,"br"),Ao(5),yi()),2&t){const r=e.$implicit;ys("ngClass",S4(3,xse,r.premium)),zs(2),Ob(r.sender),zs(3),$p(" ",r.text,"\n")}}class O2{static#e=this.\u0275fac=function(r){return new(r||O2)};static#t=this.\u0275cmp=Bs({type:O2,selectors:[["near-wallet-selector-messages"]],inputs:{messages:"messages"},decls:3,vars:1,consts:[[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(r,a){1&r&&(ji(0,"h2"),Ao(1,"Messages"),yi(),Cc(2,Mse,6,5,"p",0)),2&r&&(zs(2),ys("ngForOf",a.messages))},dependencies:[ag,cg]})}var Ise=u(57994),Cse=u.n(Ise);class N2{constructor(){this.addMessage=new ms}ngOnInit(){this.maxValue=Cse()(this.account.amount).div(10**24).toString()}onSubmit(e){this.addMessage.emit(e)}static#e=this.\u0275fac=function(r){return new(r||N2)};static#t=this.\u0275cmp=Bs({type:N2,selectors:[["near-wallet-selector-form"]],inputs:{account:"account"},outputs:{addMessage:"addMessage"},decls:20,vars:3,consts:[[3,"ngSubmit"],["id","fieldset"],[1,"highlight"],["for","message"],["autoComplete","off","autoFocus","","id","message","required",""],["for","donation"],["autocomplete","off","id","donation","min","0","step","0.01","type","number",3,"defaultValue","max"],["title","NEAR Tokens"],["htmlFor","multiple"],["id","multiple","type","checkbox"],["type","submit"]],template:function(r,a){1&r&&(ji(0,"form",0),Zo("ngSubmit",function(O){return a.onSubmit(O)}),ji(1,"fieldset",1)(2,"p"),Ao(3),yi(),ji(4,"p",2)(5,"label",3),Ao(6,"Message:"),yi(),ka(7,"input",4),yi(),ji(8,"p")(9,"label",5),Ao(10,"Donation (optional):"),yi(),ka(11,"input",6),ji(12,"span",7),Ao(13,"\u24c3"),yi()(),ji(14,"p")(15,"label",8),Ao(16,"Multiple Transactions:"),yi(),ka(17,"input",9),yi(),ji(18,"button",10),Ao(19,"Sign"),yi()()()),2&r&&(zs(3),$p("Sign the guest book, ",a.account.account_id,"!"),zs(8),VE("max",a.maxValue),ys("defaultValue","0"))},dependencies:[Ag,bg,hd]})}function Dse(t,e){if(1&t){const r=Om();ji(0,"button",1),Zo("click",function(){Po(r);return Is(Dc(2).switchAccount())}),Ao(1," Switch Account "),yi()}}function Tse(t,e){if(1&t&&ka(0,"near-wallet-selector-messages",5),2&t){ys("messages",Dc(2).messages)}}function Ose(t,e){if(1&t){const r=Om();Dm(0),ji(1,"div")(2,"button",1),Zo("click",function(){Po(r);return Is(Dc().signOut())}),Ao(3,"Log out"),yi(),ji(4,"button",1),Zo("click",function(){Po(r);return Is(Dc().switchWallet())}),Ao(5,"Switch Wallet"),yi(),ji(6,"button",1),Zo("click",function(){Po(r);return Is(Dc().onVerifyOwner())}),Ao(7,"Verify Owner"),yi(),ji(8,"button",1),Zo("click",function(){Po(r);return Is(Dc().onSignMessage())}),Ao(9,"Sign Message"),yi(),Cc(10,Dse,2,0,"button",2),yi(),ji(11,"near-wallet-selector-form",3),Zo("addMessage",function(A){Po(r);return Is(Dc().onSubmit(A))}),yi(),Cc(12,Tse,1,1,"near-wallet-selector-messages",4),Tm()}if(2&t){const r=Dc();zs(10),ys("ngIf",r.accounts.length>1),zs(1),ys("account",r.account),zs(1),ys("ngIf",!!r.messages.length)}}function Nse(t,e){if(1&t){const r=Om();Dm(0),ji(1,"button",1),Zo("click",function(){Po(r);return Is(Dc().signIn())}),Ao(2,"Log In"),yi(),ka(3,"near-wallet-selector-sign-in"),Tm()}}const RO=Fr.utils.format.parseNearAmount("0.00000000003");class P2{ngOnInit(){var e=this;return(0,Ke.Z)(function*(){const[r,a]=yield Promise.all([e.getMessages(),e.getAccount()]);e.account=a,e.messages=r,e.subscribeToEvents(),yield e.verifyMessageBrowserWallet()})()}getAccountBalance({provider:e,accountId:r}){return(0,Ke.Z)(function*(){try{const{amount:a}=yield e.query({request_type:"view_account",finality:"final",account_id:r});return{hasBalance:BigInt(a)!==BigInt(0)}}catch{return{hasBalance:!1}}})()}getAccount(){var e=this;return(0,Ke.Z)(function*(){if(!e.accountId)return null;const{network:r}=e.selector.options,a=new Fr.providers.JsonRpcProvider({url:r.nodeUrl}),{hasBalance:A}=yield e.getAccountBalance({provider:a,accountId:e.accountId});return A?a.query({request_type:"view_account",finality:"final",account_id:e.accountId}).then(O=>({...O,account_id:e.accountId})):(window.alert(`Account ID: ${e.accountId} has not been founded. Please send some NEAR into this account.`),yield(yield e.selector.wallet()).signOut(),null)})()}signIn(){this.modal.show()}signOut(){var e=this;return(0,Ke.Z)(function*(){(yield e.selector.wallet()).signOut().catch(a=>{console.log("Failed to sign out"),console.error(a)})})()}switchWallet(){this.modal.show()}getMessages(){const{network:e}=this.selector.options;return new Fr.providers.JsonRpcProvider({url:e.nodeUrl}).query({request_type:"call_function",account_id:cy,method_name:"getMessages",args_base64:"",finality:"optimistic"}).then(a=>JSON.parse(Buffer.from(a.result).toString()))}switchAccount(){const e=this.accounts.findIndex(A=>A.accountId===this.accountId),r=e{const J=new E3({message:r,nonce:a,recipient:A,callbackUrl:O}),ee=(0,bI.serialize)(wI,J),ie=Uint8Array.from(qK.sha256.array(ee)),oe=Buffer.from(e,"base64");return Fr.utils.PublicKey.from(t).verify(ie,oe)})({message:e.message,nonce:e.nonce,recipient:e.recipient,publicKey:r.publicKey,signature:r.signature,callbackUrl:e.callbackUrl}),ee=(yield rz({publicKey:r.publicKey,accountId:r.accountId,network:a.selector.options.network}))&&A?"Successfully verified":"Failed to verify";alert(`${ee} signed message: '${e.message}': \n ${JSON.stringify(r)}`)})()}verifyMessageBrowserWallet(){var e=this;return(0,Ke.Z)(function*(){const r=new URLSearchParams(window.location.hash.substring(1)),a=r.get("accountId"),A=r.get("publicKey"),O=r.get("signature");if(!a&&!A&&!O)return;const J=JSON.parse(localStorage.getItem("message")),ee={accountId:a,publicKey:A,signature:O};yield e.verifyMessage(J,ee);const ie=new URL(location.href);ie.hash="",ie.search="",window.history.replaceState({},document.title,ie),localStorage.removeItem("message")})()}onSignMessage(){var e=this;return(0,Ke.Z)(function*(){const r=yield e.selector.wallet(),a="test message to sign",A=Buffer.from(crypto.getRandomValues(new Uint8Array(32))),O="guest-book.testnet";"browser"===r.type&&localStorage.setItem("message",JSON.stringify({message:a,nonce:[...A],recipient:O,callbackUrl:location.href}));try{const J=yield r.signMessage({message:a,nonce:A,recipient:O});J&&(yield e.verifyMessage({message:a,nonce:A,recipient:O},J))}catch(J){const ee=J instanceof Error?J.message:"Something went wrong";alert(ee)}})()}subscribeToEvents(){this.subscription=this.selector.store.observable.pipe(dr(e=>e.accounts),function _se(t,e=qe){return t=t??Sse,Hn((r,a)=>{let A,O=!0;r.subscribe(Bt(a,J=>{const ee=e(J);(O||!t(A,ee))&&(O=!1,A=ee,a.next(J))}))})}()).subscribe(e=>{console.log("Accounts Update",e),this.accounts=e,this.accountId=e.find(r=>r.active)?.accountId||null,this.getAccount().then(r=>{this.account=r})}),this.modal.on("onHide",({hideReason:e})=>{console.log(`The reason for hiding the modal ${e}`)})}addMessages(e,r,a){var A=this;return(0,Ke.Z)(function*(){const{contract:O}=A.selector.store.getState(),J=yield A.selector.wallet();if(!a)return J.signAndSendTransaction({signerId:A.accountId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:e},gas:RO,deposit:Fr.utils.format.parseNearAmount(r)}}]}).catch(ie=>{throw alert("Failed to add message"),console.log("Failed to add message"),ie});const ee=[];for(let ie=0;ie<2;ie+=1)ee.push({signerId:A.accountId,receiverId:O.contractId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:`${e} (${ie+1}/2)`},gas:RO,deposit:Fr.utils.format.parseNearAmount(r)}}]});return J.signAndSendTransactions({transactions:ee}).catch(ie=>{throw alert("Failed to add messages"),console.log("Failed to add messages"),ie})})()}onSubmit(e){var r=this;return(0,Ke.Z)(function*(){const{fieldset:a,message:A,donation:O,multiple:J}=e.target.elements;a.disabled=!0,r.addMessages(A.value,O.value||"0",J.checked).then(()=>r.getMessages().then(ee=>{r.messages=ee,A.value="",O.value="0",a.disabled=!1,J.checked=!1,A.focus()}).catch(ee=>{throw alert("Failed to refresh messages"),console.log("Failed to refresh messages"),ee})).catch(ee=>{console.error(ee),a.disabled=!1})})()}ngOnDestroy(){this.subscription?.unsubscribe()}static#e=this.\u0275fac=function(r){return new(r||P2)};static#t=this.\u0275cmp=Bs({type:P2,selectors:[["near-wallet-selector-content"]],inputs:{selector:"selector",modal:"modal",accounts:"accounts",accountId:"accountId"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"],[3,"click",4,"ngIf"],[3,"account","addMessage"],[3,"messages",4,"ngIf"],[3,"messages"]],template:function(r,a){1&r&&(Cc(0,Ose,13,3,"ng-container",0),Cc(1,Nse,4,0,"ng-container",0)),2&r&&(ys("ngIf",a.account),zs(1),ys("ngIf",!a.accountId))},dependencies:[nf,T2,O2,N2]})}class d1{static#e=this.\u0275fac=function(r){return new(r||d1)};static#t=this.\u0275cmp=Bs({type:d1,selectors:[["near-wallet-selector-loading"]],decls:5,vars:0,consts:[[1,"lds-ellipsis"]],template:function(r,a){1&r&&(ji(0,"div",0),ka(1,"div")(2,"div")(3,"div")(4,"div"),yi())},styles:[".lds-ellipsis[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;margin:auto}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--fg);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis1 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){left:32px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){left:56px;animation:_ngcontent-%COMP%_lds-ellipsis3 .6s infinite}@keyframes _ngcontent-%COMP%_lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}"]})}function Rse(t,e){1&t&&ka(0,"near-wallet-selector-loading")}function kse(t,e){if(1&t&&ka(0,"near-wallet-selector-content",2),2&t){const r=Dc();ys("selector",r.selector)("accounts",r.accounts)("accountId",r.accountId)("modal",r.modal)}}class R2{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Ke.Z)(function*(){yield e.initialize().catch(r=>{console.error(r),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Ke.Z)(function*(){const r=yield yI({network:"testnet",debug:!0,modules:[iO(),NO(),LI(),BI(),jI(),FI(),UI(),KI(),Ase(),VI(),HI(),WI(),GI(),ZI(),TV(),O9({bundle:!1}),nO({projectId:"c8cb6204543639c31aef44ea4837a554",methods:["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions"],metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),pO(),PO(),(0,D2.h4)({contractId:cy}),(0,D2.uC)({contractId:cy})]}),a=kz(r,{contractId:cy}),A=r.store.getState();e.accounts=A.accounts,e.accountId=A.accounts.find(O=>O.active)?.accountId||null,window.selector=r,window.modal=a,e.selector=r,e.modal=a})()}static#e=this.\u0275fac=function(r){return new(r||R2)};static#t=this.\u0275cmp=Bs({type:R2,selectors:[["near-wallet-selector-wallet-selector"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"selector","accounts","accountId","modal",4,"ngIf"],[3,"selector","accounts","accountId","modal"]],template:function(r,a){1&r&&(Cc(0,Rse,1,0,"near-wallet-selector-loading",0),Cc(1,kse,1,4,"near-wallet-selector-content",1)),2&r&&(ys("ngIf",!a.modal||!a.selector),zs(1),ys("ngIf",!!a.selector))},dependencies:[nf,P2,d1]})}var Ht=u(18348),Lse=u(49965),Ai=u(54284);const Bse=({selector:t,handleWalletClick:e})=>{const[r,a]=(0,Ai.useState)([]),[A,O]=(0,Ai.useState)("");function J(ee){return ee.reduce((ie,oe,de)=>{const{selectedWalletId:be}=t.store.getState(),{name:Ee,iconUrl:Ce,deprecated:Ie}=oe.metadata,Ue=oe.id===be;return ie.push((0,Ht.jsxs)("li",{tabIndex:0,className:`single-wallet ${A===oe.id?"selected-wallet":""} ${Ue?"connected-wallet":""} ${Ie?"deprecated-wallet":""} sidebar ${oe.id}`,onClick:()=>(oe.id===ee[de].id&&O(oe.id),e(oe)),children:[(0,Ht.jsx)("div",{className:"icon",children:(0,Ht.jsx)("img",{src:Ce,alt:Ee})}),(0,Ht.jsxs)("div",{className:"import-content",children:[(0,Ht.jsx)("div",{className:"title",children:Ee}),(0,Ht.jsx)("div",{className:"import-type",children:zn(`modal.exportAccounts.walletTypes.${oe.type}`)})]}),Ie&&(0,Ht.jsx)("div",{className:"warning-triangle",children:(0,Ht.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ht.jsx)("path",{d:"M4.95215 16.3536L10.2152 5.85657C10.9531 4.38481 13.0538 4.38519 13.7912 5.85723L19.0494 16.3543C19.7156 17.6841 18.7486 19.25 17.2612 19.25H6.74001C5.25228 19.25 4.28535 17.6835 4.95215 16.3536Z",stroke:"#E6B73E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ht.jsx)("path",{d:"M12 10V12",stroke:"#E6B73E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ht.jsx)("path",{d:"M12.5 16C12.5 16.2761 12.2761 16.5 12 16.5C11.7239 16.5 11.5 16.2761 11.5 16C11.5 15.7239 11.7239 15.5 12 15.5C12.2761 15.5 12.5 15.7239 12.5 16Z",stroke:"#E6B73E"})]})})]},oe.id)),ie},[])}return(0,Ai.useEffect)(()=>{const ee=t.store.observable.subscribe(ie=>{a(ie.modules)});return()=>ee.unsubscribe()},[]),(0,Ht.jsx)("div",{children:t.options.optimizeWalletOrder&&t.store.getState().recentlySignedInWallets.length>0?(0,Ht.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ht.jsx)("div",{className:"options-list-section",children:(0,Ht.jsx)("div",{className:"options-list more-options-list-content",children:J(r)})})}):(0,Ht.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ht.jsx)("div",{className:"options-list",children:J(r)})})})},kO=({onClick:t})=>(0,Ht.jsx)("button",{onClick:t,className:"back-button",children:(0,Ht.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ht.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),jse=({onClick:t})=>(0,Ht.jsx)("button",{onClick:t,className:"close-button",children:(0,Ht.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1",children:[(0,Ht.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Ht.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})}),v0=({title:t,onCloseModal:e,onBack:r})=>{const a="Get a Wallet"===t?" -open":"";return(0,Ht.jsxs)("div",{className:"nws-modal-header",children:[r&&(0,Ht.jsx)(kO,{onClick:r}),(0,Ht.jsx)("h3",{className:`middleTitle ${a}`,children:t}),(0,Ht.jsx)(jse,{onClick:e})]})},Fse=({message:t,module:e,onBack:r,onCloseModal:a})=>(0,Ht.jsxs)(Ai.Fragment,{children:[(0,Ht.jsx)(v0,{title:"",onCloseModal:a,onBack:r}),(0,Ht.jsx)("div",{className:"alert-message connecting-wrapper connecting-wrapper-err",children:(0,Ht.jsxs)("div",{className:"content",children:[(0,Ht.jsx)("div",{className:"icon",children:(0,Ht.jsx)("img",{src:e?.metadata.iconUrl,alt:e?.metadata.name})}),(0,Ht.jsx)("h3",{className:"connecting-name",children:e?.metadata.name}),(0,Ht.jsx)("h4",{children:t})]})})]}),Use=({module:t,onBack:e,onCloseModal:r})=>(0,Ht.jsxs)(Ai.Fragment,{children:[(0,Ht.jsxs)("div",{className:"nws-modal-header-wrapper",children:[(0,Ht.jsx)(kO,{onClick:e}),(0,Ht.jsx)(v0,{title:"",onCloseModal:r})]}),(0,Ht.jsxs)("div",{className:"wallet-not-installed-wrapper",children:[(0,Ht.jsxs)("div",{className:"wallet-data",children:[(0,Ht.jsx)("div",{className:`wallet-icon-box ${t.id}`,children:(0,Ht.jsx)("img",{src:t.metadata.iconUrl,alt:t.metadata.name})}),(0,Ht.jsx)("p",{children:t.metadata.name})]}),(0,Ht.jsxs)("p",{children:[zn("modal.install.youllNeedToInstall")," ",t.metadata.name," ",zn("modal.install.toContinueAfterInstalling"),(0,Ht.jsxs)("span",{className:"refresh-link",onClick:()=>window.location.reload(),children:[" ",zn("modal.install.refreshThePage")]})]}),(0,Ht.jsx)("div",{className:"action-buttons",children:(0,Ht.jsxs)("button",{className:"middleButton",onClick:()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")},children:[zn("modal.install.open")," ",t.metadata.name]})})]})]}),Kse=({onCloseModal:t})=>(0,Ht.jsxs)("div",{className:"wallet-home-wrapper",children:[(0,Ht.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ht.jsx)(v0,{title:zn("modal.exportAccounts.transferYourAccounts"),onCloseModal:t})}),(0,Ht.jsxs)("div",{className:"wallet-info-wrapper what-wallet-hide",children:[(0,Ht.jsxs)("div",{className:"wallet-what",children:[(0,Ht.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ht.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17897)"}),(0,Ht.jsx)("g",{opacity:"0.7",children:(0,Ht.jsx)("path",{d:"M23 43.5H16.3333C15.4493 43.5 14.6014 43.1488 13.9763 42.5237C13.3512 41.8986 13 41.0507 13 40.1667V16.8333C13 15.9493 13.3512 15.1014 13.9763 14.4763C14.6014 13.8512 15.4493 13.5 16.3333 13.5H23M34.6667 36.8333L43 28.5M43 28.5L34.6667 20.1667M43 28.5H23",stroke:"#568FFC",strokeWidth:"3.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Ht.jsx)("defs",{children:(0,Ht.jsxs)("radialGradient",{id:"paint0_radial_2563_17897",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ht.jsx)("stop",{stopColor:"#112140"}),(0,Ht.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ht.jsxs)("div",{className:"content-side",children:[(0,Ht.jsx)("h3",{children:zn("modal.exportAccounts.chooseAWallet")}),(0,Ht.jsx)("p",{children:zn("modal.exportAccounts.selectAWallet")})]})]}),(0,Ht.jsxs)("div",{className:"wallet-what",children:[(0,Ht.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ht.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17904)"}),(0,Ht.jsxs)("g",{opacity:"0.7",children:[(0,Ht.jsx)("path",{d:"M13 28.5C13 20.2157 19.7157 13.5 28 13.5C36.2843 13.5 43 20.2157 43 28.5C43 29.4205 43.7462 30.1667 44.6667 30.1667C45.5871 30.1667 46.3333 29.4205 46.3333 28.5C46.3333 18.3748 38.1252 10.1667 28 10.1667C17.8748 10.1667 9.66667 18.3748 9.66667 28.5C9.66667 29.4205 10.4129 30.1667 11.3333 30.1667C12.2538 30.1667 13 29.4205 13 28.5Z",fill:"#568FFC"}),(0,Ht.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38 28.5C38 31.0612 37.0372 33.3975 35.4537 35.1667H42.6434C43.8167 35.1667 44.6152 36.3476 44.0465 37.3738C40.9203 43.0147 34.9061 46.8333 28 46.8333C21.0939 46.8333 15.0796 43.0147 11.9535 37.3738C11.3848 36.3476 12.1833 35.1667 13.3566 35.1667H20.5463C18.9628 33.3975 18 31.0612 18 28.5C18 22.9771 22.4772 18.5 28 18.5C33.5228 18.5 38 22.9771 38 28.5ZM28 35.1667C31.6819 35.1667 34.6667 32.1819 34.6667 28.5C34.6667 24.8181 31.6819 21.8333 28 21.8333C24.3181 21.8333 21.3333 24.8181 21.3333 28.5C21.3333 32.1819 24.3181 35.1667 28 35.1667ZM16.8189 38.5H39.1811C36.4319 41.572 32.4397 43.5 28 43.5C23.5603 43.5 19.5681 41.572 16.8189 38.5Z",fill:"#568FFC"})]}),(0,Ht.jsx)("defs",{children:(0,Ht.jsxs)("radialGradient",{id:"paint0_radial_2563_17904",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ht.jsx)("stop",{stopColor:"#112140"}),(0,Ht.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ht.jsxs)("div",{className:"content-side",children:[(0,Ht.jsx)("h3",{children:zn("modal.exportAccounts.selectYourAccounts")}),(0,Ht.jsx)("p",{children:zn("modal.exportAccounts.afterDecide")})]})]}),(0,Ht.jsx)("div",{className:"button-spacing"}),(0,Ht.jsx)("div",{className:"middleContainer",children:(0,Ht.jsx)("p",{children:zn("modal.exportAccounts.disclaimer")})})]})]}),Vse=({hasBalance:t,type:e})=>e===wf.UNKNOWN?(0,Ht.jsx)("span",{className:"error",children:zn("modal.exportAccounts.selectAccounts.error")}):e===wf.LEDGER?(0,Ht.jsx)("span",{className:"warning",children:zn("modal.exportAccounts.selectAccounts.warningLedger")}):t?null:(0,Ht.jsx)("span",{className:"warning",children:zn("modal.exportAccounts.selectAccounts.noBalance")}),Hse=({onCloseModal:t,onBack:e,selectedAccounts:r,setSelectedAccounts:a,accountsWithDetail:A,disabledAccounts:O,onNextStep:J,isLoading:ee,buttonLabel:ie})=>{const oe=(Ee,Ce)=>{a(Ce?[...r,Ee]:r.filter(Ie=>Ie!==Ee))},be=r.length===A.length?zn("modal.exportAccounts.selectAccounts.deselectAll"):zn("modal.exportAccounts.selectAccounts.selectAll");return(0,Ai.useEffect)(()=>{r.length||a(A.map(({accountId:Ee})=>Ee))},[A.length]),(0,Ht.jsxs)(Ai.Fragment,{children:[(0,Ht.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ht.jsx)(v0,{title:zn("modal.exportAccounts.selectAccounts.title"),onCloseModal:t,onBack:e})}),(0,Ht.jsx)("div",{className:"account-export connecting-wrapper",children:(0,Ht.jsx)("div",{className:"content",children:ee?(0,Ht.jsx)("div",{className:"connecting-details",children:(0,Ht.jsx)("div",{className:"spinner account-selection-spinner",children:(0,Ht.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR3SURBVHgBpVZ9aJVVGH+e55z33bi7zY9hMz+yMAeNoEIq6A9ZRKQWEsQNFIIpsf5Y9E+GsD9iBEEDMUkDa6ShRKKZYIWiRkaKaUGUGCKOTGMF84PNO99773vOefq9720yK5ZzD/dwPt/nd37P17lEk5Qnuz9roUkKT7T5bNe+QjTNLCHv24h1Xgh+OmtwQYPH2jUXwlnW9NRooqePfLS6MmmQ59cdeEGJlkJZA5MGVecoAwghBYZTVY9ftuaDSy8x8w9fbFl95JZAXuw9dmelkvRAyXxS7wMFryG4bIyWZiqzPgMhaFfGfn3NY3AZG9sPf/Dy8HidZvxkZc/h1pqnPlKey6yspMqUd9jVAEYY6RCGDQTwjGDwGTgAlbwRijV1C9vanz577tT+6r+YrOz5rlXFrQ/qZ+FbDxCfXS5oOgxln4v473f3rbgwdn7FK5/MCaH2eAg6X8g3K2iBMTiBkNJVKbod+ze9mgPZsY/UaicYzCE1HgpZc558olCTjTvWLxv9p1n3bV45iO7T5zq3TU9j9xTOLwQ5D9t48aEYrtGj2P/2BpNS78nZJoRdlDsYd8vphz273lqyhW5Rnlnz3hOe6SEwghvxPUMTVfYe2rpuUOqOkZeIxdSbsSJ8eTIAmXy5tftrMPkzi0C4B2ZDNHp+INvLQURkhYiJ6gDGko376DbEJ8k3mcnYBSeSM2ptL/XGsurNnxfnDIQNwCKADO1845Ef6Tbk0M51g4joMgncDyBmkrtsNEMQovcDxGYsGL2yDNAUxPv0VySs4yxhfeYbabJg0Awg+ILylEB6nKMpSOp0WCR1+QSuD4ELljNDEfyRrdXPCU1BTEgD7pyOzVmC2iBm0KgYAMCEeXovoClIjdKiVdQ3FYbzmatxWRqMPcNsDHyfNWskWk5TkJhNEwVyxA6hLL5clLJsW7voFxa6LiR5CCOeWzo3XFxKtyEdy3tnp7VahAoDp6PEVGvJye09l3P7K9k9WQijXBv4B6WG+0pvD0ybFEBHZ6OPh+/OGaBsIvNRAGp/ZHv1jJeon+omszBkFsr3FhsLB7rev3JLQKVSyfjmaW2BJSavDlqR7c5VrR+4AbLttbkXMehH7gjA8gZiD/tq+Or/ABZ3dUW/J62LcPUGcrW8pKSVFAg6cHz3O0l25qZHa/XGwWPg9aAwwzdZAaDX+7tbNsMYf5+bpaUS0dDQEF8rtsUxCbI5e5KRzGhBMiqNxllKju7d8NOYXjseRBytQngcVDL3wD9H+7vf3YS7mnnzqrZpwSxrwkh04cpM5NTMyJdHbIgaESyxJ6tZ5cDbw3qd0tqVCp25Se/4yYdr5/zm/ehjwvpxZHgN0Wlub0/Yt7awdykqRYFHy6NUQVrBd4o6p6ngrVL2Bo8ksuJqoXzq9Ln9m6rj9U74b6Wjo8OeP082aY5NUxRsYzwDkeFsU+MdUU3U4PG0QtbahqhadDMuHTy4fvS/9EwIUpdeuW/ZiShOipFxURRbNdWETFMRZrCFlEZGkuPHdycTafgLExNiI6YfUpcAAAAASUVORK5CYII=",alt:"loading-icon"})})}):(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsxs)("div",{className:"account-selection-container",children:[(0,Ht.jsx)("span",{className:"account-select-all",onClick:()=>{r.length!==A.length?a(A.map(({accountId:Ee})=>Ee)):a([])},children:be}),(0,Ht.jsx)("div",{className:"account-selection",children:A.map(({accountId:Ee})=>(0,Ht.jsx)("div",{className:"account-selection-row",children:(0,Ht.jsxs)("div",{className:"checkbox",children:[(0,Ht.jsx)("input",{onChange:Ce=>{oe(Ee,Ce.target.checked)},checked:r.includes(Ee),type:"checkbox",id:Ee,name:Ee,value:Ee}),(0,Ht.jsx)("label",{htmlFor:Ee,title:Ee,children:(0,Ht.jsx)("span",{className:"label",children:Ee})})]})},Ee))}),O.length>0&&(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)("span",{className:"account-unavailable",children:zn("modal.exportAccounts.selectAccounts.unavailable")}),(0,Ht.jsx)("div",{className:"account-selection",children:O.map(({accountId:Ee,type:Ce,hasBalance:Ie})=>(0,Ht.jsx)("div",{className:"account-selection-row",children:(0,Ht.jsxs)("div",{className:"checkbox",children:[(0,Ht.jsx)("input",{onChange:Ue=>{oe(Ee,Ue.target.checked)},checked:r.includes(Ee),type:"checkbox",id:Ee,name:Ee,value:Ee,disabled:!0}),(0,Ht.jsxs)("label",{htmlFor:Ee,title:Ee,children:[(0,Ht.jsx)("span",{className:"account-id",children:Ee}),Vse({hasBalance:Ie,type:Ce})]})]})},Ee))})]}),(0,Ht.jsx)("div",{className:"filler"})]}),(0,Ht.jsx)("button",{className:"middleButton account-export-button",onClick:J,disabled:0===r.length,children:zn(ie)})]})})})]})};function uy(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function Y6(t){if("boolean"!=typeof t)throw new Error(`boolean expected, not ${t}`)}function LO(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function Wc(t,...e){if(!LO(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function $6(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function BO(t,e){Wc(t);const r=e.outputLen;if(t.lengthnew Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");function X6(t){if("string"==typeof t)t=function Xse(t){if("string"!=typeof t)throw new Error("string expected, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t);else{if(!LO(t))throw new Error("Uint8Array expected, got "+typeof t);t=t.slice()}return t}const tae=(t,e)=>(Object.assign(e,t),e);const UO=t=>Uint8Array.from(t.split("").map(e=>e.charCodeAt(0))),nae=UO("expand 16-byte k"),rae=UO("expand 32-byte k"),iae=Nd(nae),KO=Nd(rae);KO.slice();function ir(t,e){return t<>>32-e}function q6(t){return t.byteOffset%4==0}const k2=64,oae=16,zO=2**32-1,VO=new Uint32Array;function HO(t,e){const{allowShortKeys:r,extendNonceFn:a,counterLength:A,counterRight:O,rounds:J}=function qse(t,e){if(null==e||"object"!=typeof e)throw new Error("options must be defined");return Object.assign(t,e)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},e);if("function"!=typeof t)throw new Error("core must be a function");return uy(A),uy(J),Y6(O),Y6(r),(ee,ie,oe,de,be=0)=>{Wc(ee),Wc(ie),Wc(oe);const Ee=oe.length;if(de||(de=new Uint8Array(Ee)),Wc(de),uy(be),be<0||be>=zO)throw new Error("arx: counter overflow");if(de.length=zO)throw new Error("arx: counter overflow");const Ue=Math.min(k2,ie-Ie);if(be&&Ue===k2){const We=Ie/4;if(Ie%4!=0)throw new Error("arx: invalid block position");for(let ht,$e=0;$e0;)Ce.pop().fill(0);return de}}const Rs=(t,e)=>255&t[e++]|(255&t[e++])<<8;class aae{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,Wc(e=X6(e),32);const r=Rs(e,0),a=Rs(e,2),A=Rs(e,4),O=Rs(e,6),J=Rs(e,8),ee=Rs(e,10),ie=Rs(e,12),oe=Rs(e,14);this.r[0]=8191&r,this.r[1]=8191&(r>>>13|a<<3),this.r[2]=7939&(a>>>10|A<<6),this.r[3]=8191&(A>>>7|O<<9),this.r[4]=255&(O>>>4|J<<12),this.r[5]=J>>>1&8190,this.r[6]=8191&(J>>>14|ee<<2),this.r[7]=8065&(ee>>>11|ie<<5),this.r[8]=8191&(ie>>>8|oe<<8),this.r[9]=oe>>>5&127;for(let de=0;de<8;de++)this.pad[de]=Rs(e,16+2*de)}process(e,r,a=!1){const A=a?0:2048,{h:O,r:J}=this,ee=J[0],ie=J[1],oe=J[2],de=J[3],be=J[4],Ee=J[5],Ce=J[6],Ie=J[7],Ue=J[8],We=J[9],$e=Rs(e,r+0),ht=Rs(e,r+2),ct=Rs(e,r+4),wt=Rs(e,r+6),zt=Rs(e,r+8),Zt=Rs(e,r+10),En=Rs(e,r+12),Yt=Rs(e,r+14);let Xt=O[0]+(8191&$e),xn=O[1]+(8191&($e>>>13|ht<<3)),Pn=O[2]+(8191&(ht>>>10|ct<<6)),Ln=O[3]+(8191&(ct>>>7|wt<<9)),Ne=O[4]+(8191&(wt>>>4|zt<<12)),Je=O[5]+(zt>>>1&8191),rt=O[6]+(8191&(zt>>>14|Zt<<2)),lt=O[7]+(8191&(Zt>>>11|En<<5)),vt=O[8]+(8191&(En>>>8|Yt<<8)),Mt=O[9]+(Yt>>>5|A),St=0,yt=St+Xt*ee+xn*(5*We)+Pn*(5*Ue)+Ln*(5*Ie)+Ne*(5*Ce);St=yt>>>13,yt&=8191,yt+=Je*(5*Ee)+rt*(5*be)+lt*(5*de)+vt*(5*oe)+Mt*(5*ie),St+=yt>>>13,yt&=8191;let Ve=St+Xt*ie+xn*ee+Pn*(5*We)+Ln*(5*Ue)+Ne*(5*Ie);St=Ve>>>13,Ve&=8191,Ve+=Je*(5*Ce)+rt*(5*Ee)+lt*(5*be)+vt*(5*de)+Mt*(5*oe),St+=Ve>>>13,Ve&=8191;let ft=St+Xt*oe+xn*ie+Pn*ee+Ln*(5*We)+Ne*(5*Ue);St=ft>>>13,ft&=8191,ft+=Je*(5*Ie)+rt*(5*Ce)+lt*(5*Ee)+vt*(5*be)+Mt*(5*de),St+=ft>>>13,ft&=8191;let er=St+Xt*de+xn*oe+Pn*ie+Ln*ee+Ne*(5*We);St=er>>>13,er&=8191,er+=Je*(5*Ue)+rt*(5*Ie)+lt*(5*Ce)+vt*(5*Ee)+Mt*(5*be),St+=er>>>13,er&=8191;let Un=St+Xt*be+xn*de+Pn*oe+Ln*ie+Ne*ee;St=Un>>>13,Un&=8191,Un+=Je*(5*We)+rt*(5*Ue)+lt*(5*Ie)+vt*(5*Ce)+Mt*(5*Ee),St+=Un>>>13,Un&=8191;let tt=St+Xt*Ee+xn*be+Pn*de+Ln*oe+Ne*ie;St=tt>>>13,tt&=8191,tt+=Je*ee+rt*(5*We)+lt*(5*Ue)+vt*(5*Ie)+Mt*(5*Ce),St+=tt>>>13,tt&=8191;let tn=St+Xt*Ce+xn*Ee+Pn*be+Ln*de+Ne*oe;St=tn>>>13,tn&=8191,tn+=Je*ie+rt*ee+lt*(5*We)+vt*(5*Ue)+Mt*(5*Ie),St+=tn>>>13,tn&=8191;let Qt=St+Xt*Ie+xn*Ce+Pn*Ee+Ln*be+Ne*de;St=Qt>>>13,Qt&=8191,Qt+=Je*oe+rt*ie+lt*ee+vt*(5*We)+Mt*(5*Ue),St+=Qt>>>13,Qt&=8191;let un=St+Xt*Ue+xn*Ie+Pn*Ce+Ln*Ee+Ne*be;St=un>>>13,un&=8191,un+=Je*de+rt*oe+lt*ie+vt*ee+Mt*(5*We),St+=un>>>13,un&=8191;let Fn=St+Xt*We+xn*Ue+Pn*Ie+Ln*Ce+Ne*Ee;St=Fn>>>13,Fn&=8191,Fn+=Je*be+rt*de+lt*oe+vt*ie+Mt*ee,St+=Fn>>>13,Fn&=8191,St=(St<<2)+St|0,St=St+yt|0,yt=8191&St,St>>>=13,Ve+=St,O[0]=yt,O[1]=Ve,O[2]=ft,O[3]=er,O[4]=Un,O[5]=tt,O[6]=tn,O[7]=Qt,O[8]=un,O[9]=Fn}finalize(){const{h:e,pad:r}=this,a=new Uint16Array(10);let A=e[1]>>>13;e[1]&=8191;for(let ee=2;ee<10;ee++)e[ee]+=A,A=e[ee]>>>13,e[ee]&=8191;e[0]+=5*A,A=e[0]>>>13,e[0]&=8191,e[1]+=A,A=e[1]>>>13,e[1]&=8191,e[2]+=A,a[0]=e[0]+5,A=a[0]>>>13,a[0]&=8191;for(let ee=1;ee<10;ee++)a[ee]=e[ee]+A,A=a[ee]>>>13,a[ee]&=8191;a[9]-=8192;let O=(1^A)-1;for(let ee=0;ee<10;ee++)a[ee]&=O;O=~O;for(let ee=0;ee<10;ee++)e[ee]=e[ee]&O|a[ee];e[0]=65535&(e[0]|e[1]<<13),e[1]=65535&(e[1]>>>3|e[2]<<10),e[2]=65535&(e[2]>>>6|e[3]<<7),e[3]=65535&(e[3]>>>9|e[4]<<4),e[4]=65535&(e[4]>>>12|e[5]<<1|e[6]<<14),e[5]=65535&(e[6]>>>2|e[7]<<11),e[6]=65535&(e[7]>>>5|e[8]<<8),e[7]=65535&(e[8]>>>8|e[9]<<5);let J=e[0]+r[0];e[0]=65535&J;for(let ee=1;ee<8;ee++)J=(e[ee]+r[ee]|0)+(J>>>16)|0,e[ee]=65535&J}update(e){$6(this);const{buffer:r,blockLen:a}=this,A=(e=X6(e)).length;for(let O=0;O>>0,e[O++]=a[J]>>>8;return e}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const a=e.slice(0,r);return this.destroy(),a}}const WO=function cae(t){const e=(a,A)=>t(A).update(X6(a)).digest(),r=t(new Uint8Array(32));return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=a=>t(a),e}(t=>new aae(t));function GO(t,e,r,a,A,O=20){let J=t[0],ee=e[0],ie=e[1],oe=e[2],de=e[3],be=t[1],Ee=r[0],Ce=r[1],Ie=A,We=t[2],$e=e[4],ht=e[5],ct=e[6],wt=e[7],zt=t[3],Zt=J,En=ee,Yt=ie,Xt=oe,xn=de,Pn=be,Ln=Ee,Ne=Ce,Je=Ie,rt=0,lt=We,vt=$e,Mt=ht,St=ct,yt=wt,Ve=zt;for(let er=0;er(Wc(t,32),Wc(e,24),{encrypt:(a,A)=>{Wc(a);const O=a.length+32;A?Wc(A,O):A=new Uint8Array(O),A.set(a,32),eS(t,e,A,A);const J=A.subarray(0,32),ee=WO(A.subarray(32),J);return A.set(ee,16),A.subarray(0,16).fill(0),A.subarray(16)},decrypt:a=>{Wc(a);const A=a.length;if(A<16)throw new Error("encrypted data should be at least 16 bytes");const O=new Uint8Array(A+16);O.set(a,16);const J=eS(t,e,new Uint8Array(32)),ee=WO(O.subarray(32),J);if(!function eae(t,e){if(t.length!==e.length)return!1;let r=0;for(let a=0;a{if(!e)throw new Error("Secret key is required");try{const r=mae.base64.decode(Buffer.from(e).toString("base64")),a=wae(JSON.stringify(t)),A=JO(L2_NONCE),O=function fae(t,e){const r=lae(t,e);return{seal:r.encrypt,open:r.decrypt}}(r,A).seal(a),J=new Uint8Array(A.length+O.length);return J.set(A),J.set(O,A.length),Buffer.from(J).toString("base64")}catch{throw new Error("Unable to encrypt account data")}},wae=t=>(new TextEncoder).encode(t),Aae=({children:t,copy:e,onClick:r,id:a})=>{const[A,O]=(0,Ai.useState)(!1);return(0,Ht.jsxs)("button",{title:zn("component.clickToCopy.tooltip"),className:"click-to-copy",onClick:()=>{O(!0),setTimeout(()=>O(!1),2e3);const ee=document.createElement("textarea");ee.innerHTML=e,document.body.appendChild(ee),ee.select();const ie=document.execCommand("copy");return document.body.removeChild(ee),r&&r(e),ie},id:a,children:[t,(0,Ht.jsx)("div",{className:"copy-success"+(A?" show":""),children:zn("component.clickToCopy.label")})]})},_ae=({onNextStep:t,hasCopied:e,setHasCopied:r,onCloseModal:a,onBack:A,onPassphraseSave:O})=>{const[J,ee]=(0,Ai.useState)("");(0,Ai.useEffect)(()=>{const de=(()=>{const t=JO(L2_NONCE);return Buffer.from(t).toString("base64")})();ee(de)},[]);return(0,Ht.jsxs)(Ai.Fragment,{children:[(0,Ht.jsx)(v0,{title:zn("modal.exportAccounts.getPassphrase.title"),onCloseModal:a,onBack:A}),(0,Ht.jsx)("div",{className:"account-export",children:(0,Ht.jsxs)("div",{className:"content",children:[(0,Ht.jsx)("h4",{className:"passphrase-title",children:zn("modal.exportAccounts.getPassphrase.desc")}),(0,Ht.jsx)(Aae,{copy:J,id:"passphraseButton",children:(0,Ht.jsx)("div",{className:"passphrase-text",children:J})}),(0,Ht.jsx)("label",{htmlFor:"passphraseButton",className:"passphrase-label",children:zn("modal.exportAccounts.getPassphrase.label")}),(0,Ht.jsx)("div",{className:"filler"}),(0,Ht.jsx)("div",{className:"passphrase-check-container",children:(0,Ht.jsxs)("div",{className:"checkbox",children:[(0,Ht.jsx)("input",{onChange:de=>{r(de.target.checked),O(J)},checked:e,type:"checkbox",id:"passphrase-check",name:"passphrase-check",value:"passphrase-check"}),(0,Ht.jsx)("label",{htmlFor:"passphrase-check",children:(0,Ht.jsx)("span",{className:"label",children:zn("modal.exportAccounts.getPassphrase.checkLabel")})})]})}),(0,Ht.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t()},disabled:!e,children:zn("modal.exportAccounts.getPassphrase.transferButton")})]})})]})},Sae=({src:t,name:e,alertMessage:r,onCloseModal:a,onBack:A})=>(0,Ht.jsxs)("div",{className:"account-export connecting-wrapper",children:[(0,Ht.jsx)(v0,{title:"No interface found",onCloseModal:a,onBack:A}),(0,Ht.jsxs)("div",{className:"content",children:[(0,Ht.jsx)("div",{className:"icon",children:(0,Ht.jsx)("img",{src:t,alt:e})}),(0,Ht.jsx)("h3",{className:"connecting-name",children:e}),(0,Ht.jsx)("p",{children:r})]})]}),xae=({onComplete:t,onBack:e,onCloseModal:r,onStartOver:a})=>(0,Ht.jsxs)(Ht.Fragment,{children:[(0,Ht.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ht.jsx)(v0,{title:zn("modal.exportAccounts.complete.title"),onCloseModal:r,onBack:e})}),(0,Ht.jsxs)("div",{className:"complete-desc",children:[(0,Ht.jsx)("h4",{className:"content",children:zn("modal.exportAccounts.complete.descOne")}),(0,Ht.jsx)("h4",{className:"content",children:zn("modal.exportAccounts.complete.descTwo")})]}),(0,Ht.jsx)("button",{className:"middleButton account-export-button secondary",onClick:a,children:zn("modal.exportAccounts.complete.startOverButton")}),(0,Ht.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t(),r()},children:zn("modal.exportAccounts.complete.button")})]}),Gc_ACCOUNT_SELECTION="ACCOUNT_SELECTION",Gc_GET_PASSPHRASE="GET_PASSPHRASE",Gc_NO_INTERFACE="NO_INTERFACE",Gc_COMPLETE="COMPLETE",wf={LEDGER:"Ledger",FULL_ACCESS_KEY:"Full Access Key",MULTI_SIG:"Multi-Sig",UNKNOWN:"Unknown"},Mae=t=>{if("FullAccess"===t)return wf.FULL_ACCESS_KEY;if(t?.FunctionCall?.method_names.includes("__wallet__metadata"))return wf.LEDGER;const e=["add_request","add_request_and_confirm","delete_request","confirm"];return t?.FunctionCall?.method_names.every(r=>e.includes(r))?wf.MULTI_SIG:wf.UNKNOWN},Iae=function(){var t=(0,Ke.Z)(function*({provider:e,accountId:r,publicKey:a}){try{const{permission:A}=yield e.query({request_type:"view_access_key",account_id:r,public_key:a,finality:"final"});return{type:Mae(A)}}catch{return{type:wf.UNKNOWN}}});return function(r){return t.apply(this,arguments)}}(),Cae=function(){var t=(0,Ke.Z)(function*({provider:e,accountId:r}){try{const{amount:a}=yield e.query({request_type:"view_account",finality:"final",account_id:r});return{hasBalance:BigInt(a)!==BigInt(0)}}catch{return{hasBalance:!1}}});return function(r){return t.apply(this,arguments)}}(),Dae=({alertMessage:t,module:e,onCloseModal:r,onWarning:a,accounts:A,selector:O,wallet:J,onBack:ee,onComplete:ie})=>{const[oe,de]=(0,Ai.useState)([]),[be,Ee]=(0,Ai.useState)(!1),[Ce,Ie]=(0,Ai.useState)([]),[Ue,We]=(0,Ai.useState)([]),[$e,ht]=(0,Ai.useState)(""),[ct,wt]=(0,Ai.useState)({});(0,Ai.useEffect)(()=>{!function(){var yt=(0,Ke.Z)(function*(){try{const{buildImportAccountsUrl:Ve,importAccountsInSecureContext:ft}=yield J.wallet();wt({buildImportAccountsUrl:Ve,importAccountsInSecureContext:ft}),!Ve&&!ft&&a()}catch{a()}});return function(){return yt.apply(this,arguments)}}()()},[e?.metadata.name,t]);const{network:zt}=O.options,Zt=new Fr.providers.JsonRpcProvider({url:zt.nodeUrl}),[En,Yt]=(0,Ai.useState)(!1);(0,Ai.useEffect)(()=>{const St=function(){var yt=(0,Ke.Z)(function*(){Ee(!0);const Ve=yield Promise.all(A.map(function(){var Un=(0,Ke.Z)(function*({accountId:tt,privateKey:tn}){const Qt=Fr.utils.KeyPair.fromString(tn),{type:un}=yield Iae({provider:Zt,accountId:tt,publicKey:Qt.getPublicKey().toString()}),{hasBalance:Fn}=yield Cae({provider:Zt,accountId:tt});return{accountId:tt,privateKey:tn,type:un,hasBalance:Fn}});return function(tt){return Un.apply(this,arguments)}}())),ft=Ve.filter(({hasBalance:Un,type:tt})=>Un&&tt===wf.FULL_ACCESS_KEY);Ie(ft);const er=Ve.filter(({hasBalance:Un,type:tt})=>!Un||tt!==wf.FULL_ACCESS_KEY);We(er),Ee(!1)});return function(){return yt.apply(this,arguments)}}();0===Ce.length&&St()},[ct.buildImportAccountsUrl,ct.importAccountsInSecureContext]);const[Xt,xn]=(0,Ai.useState)(Gc_ACCOUNT_SELECTION);(0,Ai.useEffect)(()=>{xn(t?Gc_NO_INTERFACE:Gc_ACCOUNT_SELECTION)},[t]);const Ln=()=>{xn(Gc_GET_PASSPHRASE)},{buildImportAccountsUrl:Ne,importAccountsInSecureContext:Je}=ct,lt=function(){var St=(0,Ke.Z)(function*(){Je?yield Je({accounts:A.filter(({accountId:yt})=>oe.includes(yt))}):xn(Gc_NO_INTERFACE)});return function(){return St.apply(this,arguments)}}();return(0,Ht.jsxs)(Ai.Fragment,{children:[Xt===Gc_NO_INTERFACE&&(0,Ht.jsx)(Sae,{src:e?.metadata.iconUrl,name:e?.metadata.name,alertMessage:t,onBack:ee,onCloseModal:r}),Xt===Gc_ACCOUNT_SELECTION&&(0,Ht.jsx)(Hse,{onCloseModal:r,onBack:ee,selectedAccounts:oe,setSelectedAccounts:de,accountsWithDetail:Ce,disabledAccounts:Ue,onNextStep:()=>{"injected"!==J.type||J.metadata.useUrlAccountImport?Ln():(lt(),xn(Gc_COMPLETE))},isLoading:be,buttonLabel:"injected"===J.type?"modal.exportAccounts.getPassphrase.button":"modal.exportAccounts.selectAccounts.button"}),Xt===Gc_GET_PASSPHRASE&&(0,Ht.jsx)(_ae,{onNextStep:()=>{const St=vae({accountData:A.filter(({accountId:Ve})=>oe.includes(Ve)),secretKey:$e});if(("browser"===J.type||J.metadata.useUrlAccountImport)&&Ne){const Ve=`${Ne()}#${St}`;window.open(Ve,"_blank")}xn(Gc_COMPLETE)},hasCopied:En,setHasCopied:Yt,onCloseModal:r,onBack:()=>xn(Gc_ACCOUNT_SELECTION),onPassphraseSave:ht}),Xt===Gc_COMPLETE&&(0,Ht.jsx)(xae,{onCloseModal:r,onBack:Ln,onComplete:()=>{ie&&ie({accounts:oe,walletName:e?.metadata.name||"Unknown"})},onStartOver:ee})]})},Tae=t=>{switch(t){case"dark":return"dark-theme";case"light":return"light-theme";default:return""}},Oae=({selector:t,options:e,visible:r,hide:a})=>{const[A,O]=(0,Ai.useState)({name:"WalletHome"}),[J,ee]=(0,Ai.useState)(null),[ie,oe]=(0,Ai.useState)(),de=()=>{O({name:"WalletHome"})};(0,Ai.useEffect)(()=>{O({name:"WalletHome"});const{selectedWalletId:Ie,modules:Ue}=t.store.getState();if(Ie){const We=Ue.find($e=>$e.id===Ie);oe(We)}},[r]);const be=(0,Ai.useCallback)(()=>{ee(null),de(),a()},[a]);(0,Ai.useEffect)(()=>{const Ie=Ue=>{"Escape"===Ue.key&&be()};return window.addEventListener("keydown",Ie),()=>window.removeEventListener("keydown",Ie)},[be]);const Ee=function(){var Ie=(0,Ke.Z)(function*(Ue){ee(null),oe(Ue);try{const{deprecated:We,available:$e}=Ue.metadata;return"injected"!==Ue.type||$e?We?(ee(`${Ue.metadata.name} is deprecated. Please select another wallet.`),void O({name:"AlertMessage",params:{module:Ue}})):void O({name:"ExportAccounts",params:{module:Ue}}):void O({name:"WalletNotInstalled",params:{module:Ue}})}catch(We){const{name:$e}=Ue.metadata,ht=We instanceof Error?We.message:"Something went wrong";ee(`Failed to sign in with ${$e}: ${ht}`),O({name:"AlertMessage",params:{module:Ue}})}});return function(We){return Ie.apply(this,arguments)}}(),Ce=(0,Ai.useCallback)(()=>{ie&&(ee(`${ie?.metadata.name} ${zn("modal.exportAccounts.warning")}`),O({name:"AlertMessage",params:{module:ie}}))},[ie]);return r?(0,Ht.jsxs)("div",{className:`nws-modal-wrapper ${Tae(e?.theme)} ${r?"open":""}`,children:[(0,Ht.jsx)("div",{className:"nws-modal-overlay",onClick:be}),(0,Ht.jsxs)("div",{className:"nws-modal",children:[(0,Ht.jsxs)("div",{className:"modal-left",children:[(0,Ht.jsx)("div",{className:"modal-left-title",children:(0,Ht.jsx)("h2",{children:zn("modal.exportAccounts.chooseAWallet")})}),(0,Ht.jsx)(Bse,{handleWalletClick:Ie=>{Ee(Ie)},selector:t})]}),(0,Ht.jsx)("div",{className:"modal-right",children:(0,Ht.jsxs)("div",{className:"nws-modal-body account-export-body",children:["AlertMessage"===A.name&&J&&(0,Ht.jsx)(Fse,{message:J,module:A.params?.module,onBack:()=>{ee(null),de()},onCloseModal:be}),"WalletNotInstalled"===A.name&&(0,Ht.jsx)(Use,{module:A.params?.module,onBack:()=>{de()},onCloseModal:be}),"WalletHome"===A.name&&(0,Ht.jsx)(Kse,{onCloseModal:be}),"ExportAccounts"===A.name&&(0,Ht.jsx)(Dae,{module:A.params?.module,alertMessage:J,onCloseModal:be,onWarning:Ce,onBack:de,selector:t,accounts:e.accounts,wallet:ie,onComplete:e?.onComplete})]})})]})]}):null};let iS=null,oS=null;function Rae(t,e){1&t&&ka(0,"near-wallet-selector-loading")}function kae(t,e){if(1&t){const r=Om();ji(0,"div")(1,"button",1),Zo("click",function(){Po(r);return Is(Dc().show())}),Ao(2,"Open Modal"),yi(),ji(3,"p"),Ao(4," The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive data in transit during this process will be encrypted with a randomly-generated password which the user will be required to copy down and use in the account import process on the target wallet. "),yi()()}}class B2{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Ke.Z)(function*(){yield e.initialize().catch(r=>{console.error(r),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Ke.Z)(function*(){const r=yield yI({network:"testnet",debug:!0,modules:[iO(),NO(),LI(),BI(),jI(),FI(),UI(),KI(),VI(),HI(),WI(),GI(),ZI(),O9({bundle:!1}),nO({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),pO(),PO(),(0,D2.h4)({contractId:cy}),(0,D2.uC)({contractId:cy})]}),a=((t,e)=>{if(!oS){const a=document.body,A=document.createElement("div");A.id="near-wallet-selector-modal",a.appendChild(A),oS=(0,Lse.s)(A)}const r=a=>{oS.render((0,Ht.jsx)(Oae,{selector:t,options:e,visible:a,hide:()=>r(!1)}))};return iS||(iS={show:()=>{r(!0)},hide:()=>{r(!1)}}),iS})(r,{accounts:[],onComplete:O=>{console.log("Transfer Completed: ",O)}}),A=r.store.getState();e.accounts=A.accounts,e.accountId=A.accounts.find(O=>O.active)?.accountId||null,window.exportSelector=r,window.exportModal=a,e.exportSelector=r,e.exportModal=a})()}show(){this.exportModal.show()}static#e=this.\u0275fac=function(r){return new(r||B2)};static#t=this.\u0275cmp=Bs({type:B2,selectors:[["near-wallet-selector-wallet-selector-export"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"]],template:function(r,a){1&r&&(Cc(0,Rae,1,0,"near-wallet-selector-loading",0),Cc(1,kae,5,0,"div",0)),2&r&&(ys("ngIf",!a.exportModal||!a.exportSelector),zs(1),ys("ngIf",a.exportModal||a.exportSelector))},dependencies:[nf,d1]})}function Lae(t,e){1&t&&ka(0,"near-wallet-selector-wallet-selector")}function Bae(t,e){1&t&&ka(0,"near-wallet-selector-wallet-selector-export")}class j2{static#e=this.\u0275fac=function(r){return new(r||j2)};static#t=this.\u0275cmp=Bs({type:j2,selectors:[["near-wallet-selector-root"]],decls:8,vars:4,consts:[[1,"title-container"],[3,"click"],[4,"ngIf"]],template:function(r,a){1&r&&(ji(0,"main")(1,"div",0)(2,"h1"),Ao(3),yi(),ji(4,"button",1),Zo("click",function(){return a.showImport=!a.showImport}),Ao(5),yi()(),Cc(6,Lae,1,0,"near-wallet-selector-wallet-selector",2),Cc(7,Bae,1,0,"near-wallet-selector-wallet-selector-export",2),yi()),2&r&&(zs(3),Ob(a.showImport?"Export Account":"NEAR Guest Book"),zs(2),$p(" ",a.showImport?"Back to Log in":"Try Export Account"," "),zs(1),ys("ngIf",!a.showImport),zs(1),ys("ngIf",a.showImport))},dependencies:[nf,R2,B2]})}class F2{static#e=this.\u0275fac=function(r){return new(r||F2)};static#t=this.\u0275mod=Ca({type:F2,bootstrap:[j2]});static#n=this.\u0275inj=Ma({imports:[cd,vd]})}xU().bootstrapModule(F2).catch(t=>console.error(t))},32184:(q,n,u)=>{"use strict";u.r(n),u.d(n,{createAction:()=>s,signTransactions:()=>y});var l=u(71836);const{transactions:v,utils:E}=l,s=f=>{switch(f.type){case"CreateAccount":return v.createAccount();case"DeployContract":{const{code:d}=f.params;return v.deployContract(d)}case"FunctionCall":{const{methodName:d,args:p,gas:m,deposit:S}=f.params;return v.functionCall(d,p,BigInt(m),BigInt(S))}case"Transfer":{const{deposit:d}=f.params;return v.transfer(BigInt(d))}case"Stake":{const{stake:d,publicKey:p}=f.params;return v.stake(BigInt(d),E.PublicKey.from(p))}case"AddKey":{const{publicKey:d,accessKey:p}=f.params;return v.addKey(E.PublicKey.from(d),(f=>{if("FullAccess"===f)return v.fullAccessKey();const{receiverId:d,methodNames:p=[]}=f,m=f.allowance?BigInt(f.allowance):void 0;return v.functionCallAccessKey(d,p,m)})(p.permission))}case"DeleteKey":{const{publicKey:d}=f.params;return v.deleteKey(E.PublicKey.from(d))}case"DeleteAccount":{const{beneficiaryId:d}=f.params;return v.deleteAccount(d)}default:throw new Error("Invalid action type")}};var g=u(49671);const y=function(){var f=(0,g.Z)(function*(d,p,m){const S=new l.providers.JsonRpcProvider({url:m.nodeUrl}),_=[];for(let D=0;Ds(z)),k=l.transactions.createTransaction(d[D].signerId,l.utils.PublicKey.from(P.toString()),d[D].receiverId,C.nonce+D+1,N,l.utils.serialize.base_decode(x.header.hash)),U=yield l.transactions.signTransaction(k,p,d[D].signerId,m.networkId);_.push(U[1])}return _});return function(p,m,S){return f.apply(this,arguments)}}()},68512:(q,n,u)=>{"use strict";u.r(n),u.d(n,{AbiCoder:()=>It,ConstructorFragment:()=>z,ErrorFragment:()=>F,EventFragment:()=>C,FormatTypes:()=>S,Fragment:()=>x,FunctionFragment:()=>Y,Indexed:()=>ve,Interface:()=>Ge,LogDescription:()=>Ze,ParamType:()=>D,TransactionDescription:()=>ut,checkResultErrors:()=>R,defaultAbiCoder:()=>st});var l=u(52909),v=u(24325),E=u(88666);const M="abi/5.7.0",s=new E.Logger(M),g={};let y={calldata:!0,memory:!0,storage:!0},f={calldata:!0,memory:!0};function d(Qe,ye){if("bytes"===Qe||"string"===Qe){if(y[ye])return!0}else if("address"===Qe){if("payable"===ye)return!0}else if((Qe.indexOf("[")>=0||"tuple"===Qe)&&f[ye])return!0;return(y[ye]||"payable"===ye)&&s.throwArgumentError("invalid modifier","name",ye),!1}function m(Qe,ye){for(let ke in ye)(0,v.defineReadOnly)(Qe,ke,ye[ke])}const S=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),_=new RegExp(/^(.*)\[([0-9]*)\]$/);class D{constructor(ye,ke){ye!==g&&s.throwError("use fromString",E.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,ke);let et=this.type.match(_);m(this,et?{arrayLength:parseInt(et[2]||"-1"),arrayChildren:D.fromObject({type:et[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(ye){if(ye||(ye=S.sighash),S[ye]||s.throwArgumentError("invalid format type","format",ye),ye===S.json){let et={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(et.indexed=this.indexed),this.components&&(et.components=this.components.map(qe=>JSON.parse(qe.format(ye)))),JSON.stringify(et)}let ke="";return"array"===this.baseType?(ke+=this.arrayChildren.format(ye),ke+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(ye!==S.sighash&&(ke+=this.type),ke+="("+this.components.map(et=>et.format(ye)).join(ye===S.full?", ":",")+")"):ke+=this.type,ye!==S.sighash&&(!0===this.indexed&&(ke+=" indexed"),ye===S.full&&this.name&&(ke+=" "+this.name)),ke}static from(ye,ke){return"string"==typeof ye?D.fromString(ye,ke):D.fromObject(ye)}static fromObject(ye){return D.isParamType(ye)?ye:new D(g,{name:ye.name||null,type:j(ye.type),indexed:null==ye.indexed?null:!!ye.indexed,components:ye.components?ye.components.map(D.fromObject):null})}static fromString(ye,ke){return function et(qe){return D.fromObject({name:qe.name,type:qe.type,indexed:qe.indexed,components:qe.components})}(function p(Qe,ye){let ke=Qe;function et(pt){s.throwArgumentError(`unexpected character at position ${pt}`,"param",Qe)}function qe(pt){let xt={type:"",name:"",parent:pt,state:{allowType:!0}};return ye&&(xt.indexed=!1),xt}Qe=Qe.replace(/\s/g," ");let at={type:"",name:"",state:{allowType:!0}},bt=at;for(let pt=0;ptD.fromString(ke,ye))}class x{constructor(ye,ke){ye!==g&&s.throwError("use a static from method",E.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),m(this,ke),this._isFragment=!0,Object.freeze(this)}static from(ye){return x.isFragment(ye)?ye:"string"==typeof ye?x.fromString(ye):x.fromObject(ye)}static fromObject(ye){if(x.isFragment(ye))return ye;switch(ye.type){case"function":return Y.fromObject(ye);case"event":return C.fromObject(ye);case"constructor":return z.fromObject(ye);case"error":return F.fromObject(ye);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",ye)}static fromString(ye){return"event"===(ye=(ye=(ye=ye.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?C.fromString(ye.substring(5).trim()):"function"===ye.split(" ")[0]?Y.fromString(ye.substring(8).trim()):"constructor"===ye.split("(")[0].trim()?z.fromString(ye.trim()):"error"===ye.split(" ")[0]?F.fromString(ye.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",ye)}static isFragment(ye){return!(!ye||!ye._isFragment)}}class C extends x{format(ye){if(ye||(ye=S.sighash),S[ye]||s.throwArgumentError("invalid format type","format",ye),ye===S.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(et=>JSON.parse(et.format(ye)))});let ke="";return ye!==S.sighash&&(ke+="event "),ke+=this.name+"("+this.inputs.map(et=>et.format(ye)).join(ye===S.full?", ":",")+") ",ye!==S.sighash&&this.anonymous&&(ke+="anonymous "),ke.trim()}static from(ye){return"string"==typeof ye?C.fromString(ye):C.fromObject(ye)}static fromObject(ye){if(C.isEventFragment(ye))return ye;"event"!==ye.type&&s.throwArgumentError("invalid event object","value",ye);const ke={name:T(ye.name),anonymous:ye.anonymous,inputs:ye.inputs?ye.inputs.map(D.fromObject):[],type:"event"};return new C(g,ke)}static fromString(ye){let ke=ye.match(o);ke||s.throwArgumentError("invalid event string","value",ye);let et=!1;return ke[3].split(" ").forEach(qe=>{switch(qe.trim()){case"anonymous":et=!0;break;case"":break;default:s.warn("unknown modifier: "+qe)}}),C.fromObject({name:ke[1].trim(),anonymous:et,inputs:P(ke[2],!0),type:"event"})}static isEventFragment(ye){return ye&&ye._isFragment&&"event"===ye.type}}function N(Qe,ye){ye.gas=null;let ke=Qe.split("@");return 1!==ke.length?(ke.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",Qe),ke[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",Qe),ye.gas=l.O$.from(ke[1]),ke[0]):Qe}function k(Qe,ye){ye.constant=!1,ye.payable=!1,ye.stateMutability="nonpayable",Qe.split(" ").forEach(ke=>{switch(ke.trim()){case"constant":ye.constant=!0;break;case"payable":ye.payable=!0,ye.stateMutability="payable";break;case"nonpayable":ye.payable=!1,ye.stateMutability="nonpayable";break;case"pure":ye.constant=!0,ye.stateMutability="pure";break;case"view":ye.constant=!0,ye.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+ke)}})}function U(Qe){let ye={constant:!1,payable:!0,stateMutability:"payable"};return null!=Qe.stateMutability?(ye.stateMutability=Qe.stateMutability,ye.constant="view"===ye.stateMutability||"pure"===ye.stateMutability,null!=Qe.constant&&!!Qe.constant!==ye.constant&&s.throwArgumentError("cannot have constant function with mutability "+ye.stateMutability,"value",Qe),ye.payable="payable"===ye.stateMutability,null!=Qe.payable&&!!Qe.payable!==ye.payable&&s.throwArgumentError("cannot have payable function with mutability "+ye.stateMutability,"value",Qe)):null!=Qe.payable?(ye.payable=!!Qe.payable,null==Qe.constant&&!ye.payable&&"constructor"!==Qe.type&&s.throwArgumentError("unable to determine stateMutability","value",Qe),ye.constant=!!Qe.constant,ye.constant?ye.stateMutability="view":ye.stateMutability=ye.payable?"payable":"nonpayable",ye.payable&&ye.constant&&s.throwArgumentError("cannot have constant payable function","value",Qe)):null!=Qe.constant?(ye.constant=!!Qe.constant,ye.payable=!ye.constant,ye.stateMutability=ye.constant?"view":"payable"):"constructor"!==Qe.type&&s.throwArgumentError("unable to determine stateMutability","value",Qe),ye}class z extends x{format(ye){if(ye||(ye=S.sighash),S[ye]||s.throwArgumentError("invalid format type","format",ye),ye===S.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(et=>JSON.parse(et.format(ye)))});ye===S.sighash&&s.throwError("cannot format a constructor for sighash",E.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let ke="constructor("+this.inputs.map(et=>et.format(ye)).join(ye===S.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(ke+=this.stateMutability+" "),ke.trim()}static from(ye){return"string"==typeof ye?z.fromString(ye):z.fromObject(ye)}static fromObject(ye){if(z.isConstructorFragment(ye))return ye;"constructor"!==ye.type&&s.throwArgumentError("invalid constructor object","value",ye);let ke=U(ye);ke.constant&&s.throwArgumentError("constructor cannot be constant","value",ye);const et={name:null,type:ye.type,inputs:ye.inputs?ye.inputs.map(D.fromObject):[],payable:ke.payable,stateMutability:ke.stateMutability,gas:ye.gas?l.O$.from(ye.gas):null};return new z(g,et)}static fromString(ye){let ke={type:"constructor"},et=(ye=N(ye,ke)).match(o);return(!et||"constructor"!==et[1].trim())&&s.throwArgumentError("invalid constructor string","value",ye),ke.inputs=P(et[2].trim(),!1),k(et[3].trim(),ke),z.fromObject(ke)}static isConstructorFragment(ye){return ye&&ye._isFragment&&"constructor"===ye.type}}class Y extends z{format(ye){if(ye||(ye=S.sighash),S[ye]||s.throwArgumentError("invalid format type","format",ye),ye===S.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(et=>JSON.parse(et.format(ye))),outputs:this.outputs.map(et=>JSON.parse(et.format(ye)))});let ke="";return ye!==S.sighash&&(ke+="function "),ke+=this.name+"("+this.inputs.map(et=>et.format(ye)).join(ye===S.full?", ":",")+") ",ye!==S.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(ke+=this.stateMutability+" "):this.constant&&(ke+="view "),this.outputs&&this.outputs.length&&(ke+="returns ("+this.outputs.map(et=>et.format(ye)).join(", ")+") "),null!=this.gas&&(ke+="@"+this.gas.toString()+" ")),ke.trim()}static from(ye){return"string"==typeof ye?Y.fromString(ye):Y.fromObject(ye)}static fromObject(ye){if(Y.isFunctionFragment(ye))return ye;"function"!==ye.type&&s.throwArgumentError("invalid function object","value",ye);let ke=U(ye);const et={type:ye.type,name:T(ye.name),constant:ke.constant,inputs:ye.inputs?ye.inputs.map(D.fromObject):[],outputs:ye.outputs?ye.outputs.map(D.fromObject):[],payable:ke.payable,stateMutability:ke.stateMutability,gas:ye.gas?l.O$.from(ye.gas):null};return new Y(g,et)}static fromString(ye){let ke={type:"function"},et=(ye=N(ye,ke)).split(" returns ");et.length>2&&s.throwArgumentError("invalid function string","value",ye);let qe=et[0].match(o);if(qe||s.throwArgumentError("invalid function signature","value",ye),ke.name=qe[1].trim(),ke.name&&T(ke.name),ke.inputs=P(qe[2],!1),k(qe[3].trim(),ke),et.length>1){let at=et[1].match(o);(""!=at[1].trim()||""!=at[3].trim())&&s.throwArgumentError("unexpected tokens","value",ye),ke.outputs=P(at[2],!1)}else ke.outputs=[];return Y.fromObject(ke)}static isFunctionFragment(ye){return ye&&ye._isFragment&&"function"===ye.type}}function G(Qe){const ye=Qe.format();return("Error(string)"===ye||"Panic(uint256)"===ye)&&s.throwArgumentError(`cannot specify user defined ${ye} error`,"fragment",Qe),Qe}class F extends x{format(ye){if(ye||(ye=S.sighash),S[ye]||s.throwArgumentError("invalid format type","format",ye),ye===S.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(et=>JSON.parse(et.format(ye)))});let ke="";return ye!==S.sighash&&(ke+="error "),ke+=this.name+"("+this.inputs.map(et=>et.format(ye)).join(ye===S.full?", ":",")+") ",ke.trim()}static from(ye){return"string"==typeof ye?F.fromString(ye):F.fromObject(ye)}static fromObject(ye){if(F.isErrorFragment(ye))return ye;"error"!==ye.type&&s.throwArgumentError("invalid error object","value",ye);const ke={type:ye.type,name:T(ye.name),inputs:ye.inputs?ye.inputs.map(D.fromObject):[]};return G(new F(g,ke))}static fromString(ye){let ke={type:"error"},et=ye.match(o);return et||s.throwArgumentError("invalid error signature","value",ye),ke.name=et[1].trim(),ke.name&&T(ke.name),ke.inputs=P(et[2],!1),G(F.fromObject(ke))}static isErrorFragment(ye){return ye&&ye._isFragment&&"error"===ye.type}}function j(Qe){return Qe.match(/^uint($|[^1-9])/)?Qe="uint256"+Qe.substring(4):Qe.match(/^int($|[^1-9])/)&&(Qe="int256"+Qe.substring(3)),Qe}const Z=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function T(Qe){return(!Qe||!Qe.match(Z))&&s.throwArgumentError(`invalid identifier "${Qe}"`,"value",Qe),Qe}const o=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var w=u(10499);const I=new E.Logger(M);function R(Qe){const ye=[],ke=function(et,qe){if(Array.isArray(qe))for(let at in qe){const bt=et.slice();bt.push(at);try{ke(bt,qe[at])}catch(pt){ye.push({path:bt,error:pt})}}};return ke([],Qe),ye}class V{constructor(ye,ke,et,qe){this.name=ye,this.type=ke,this.localName=et,this.dynamic=qe}_throwError(ye,ke){I.throwArgumentError(ye,this.localName,ke)}}class H{constructor(ye){(0,v.defineReadOnly)(this,"wordSize",ye||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(ye)}get data(){return(0,w.hexConcat)(this._data)}get length(){return this._dataLength}_writeData(ye){return this._data.push(ye),this._dataLength+=ye.length,ye.length}appendWriter(ye){return this._writeData((0,w.concat)(ye._data))}writeBytes(ye){let ke=(0,w.arrayify)(ye);const et=ke.length%this.wordSize;return et&&(ke=(0,w.concat)([ke,this._padding.slice(et)])),this._writeData(ke)}_getValue(ye){let ke=(0,w.arrayify)(l.O$.from(ye));return ke.length>this.wordSize&&I.throwError("value out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:ke.length}),ke.length%this.wordSize&&(ke=(0,w.concat)([this._padding.slice(ke.length%this.wordSize),ke])),ke}writeValue(ye){return this._writeData(this._getValue(ye))}writeUpdatableValue(){const ye=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,ke=>{this._data[ye]=this._getValue(ke)}}}class L{constructor(ye,ke,et,qe){(0,v.defineReadOnly)(this,"_data",(0,w.arrayify)(ye)),(0,v.defineReadOnly)(this,"wordSize",ke||32),(0,v.defineReadOnly)(this,"_coerceFunc",et),(0,v.defineReadOnly)(this,"allowLoose",qe),this._offset=0}get data(){return(0,w.hexlify)(this._data)}get consumed(){return this._offset}static coerce(ye,ke){let et=ye.match("^u?int([0-9]+)$");return et&&parseInt(et[1])<=48&&(ke=ke.toNumber()),ke}coerce(ye,ke){return this._coerceFunc?this._coerceFunc(ye,ke):L.coerce(ye,ke)}_peekBytes(ye,ke,et){let qe=Math.ceil(ke/this.wordSize)*this.wordSize;return this._offset+qe>this._data.length&&(this.allowLoose&&et&&this._offset+ke<=this._data.length?qe=ke:I.throwError("data out-of-bounds",E.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+qe})),this._data.slice(this._offset,this._offset+qe)}subReader(ye){return new L(this._data.slice(this._offset+ye),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(ye,ke){let et=this._peekBytes(0,ye,!!ke);return this._offset+=et.length,et.slice(0,ye)}readValue(){return l.O$.from(this.readBytes(this.wordSize))}}var b=u(28016);class B extends V{constructor(ye){super("address","address",ye,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(ye,ke){try{ke=(0,b.getAddress)(ke)}catch(et){this._throwError(et.message,ke)}return ye.writeValue(ke)}decode(ye){return(0,b.getAddress)((0,w.hexZeroPad)(ye.readValue().toHexString(),20))}}class re extends V{constructor(ye){super(ye.name,ye.type,void 0,ye.dynamic),this.coder=ye}defaultValue(){return this.coder.defaultValue()}encode(ye,ke){return this.coder.encode(ye,ke)}decode(ye){return this.coder.decode(ye)}}const ne=new E.Logger(M);function te(Qe,ye,ke){let et=null;if(Array.isArray(ke))et=ke;else if(ke&&"object"==typeof ke){let xt={};et=ye.map(kn=>{const Nt=kn.localName;return Nt||ne.throwError("cannot encode object for signature with missing names",E.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:kn,value:ke}),xt[Nt]&&ne.throwError("cannot encode object for signature with duplicate names",E.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:kn,value:ke}),xt[Nt]=!0,ke[Nt]})}else ne.throwArgumentError("invalid tuple value","tuple",ke);ye.length!==et.length&&ne.throwArgumentError("types/value length mismatch","tuple",ke);let qe=new H(Qe.wordSize),at=new H(Qe.wordSize),bt=[];ye.forEach((xt,kn)=>{let Nt=et[kn];if(xt.dynamic){let Ot=at.length;xt.encode(at,Nt);let Mn=qe.writeUpdatableValue();bt.push(Tt=>{Mn(Tt+Ot)})}else xt.encode(qe,Nt)}),bt.forEach(xt=>{xt(qe.length)});let pt=Qe.appendWriter(qe);return pt+=Qe.appendWriter(at),pt}function ae(Qe,ye){let ke=[],et=Qe.subReader(0);ye.forEach(at=>{let bt=null;if(at.dynamic){let pt=Qe.readValue(),xt=et.subReader(pt.toNumber());try{bt=at.decode(xt)}catch(kn){if(kn.code===E.Logger.errors.BUFFER_OVERRUN)throw kn;bt=kn,bt.baseType=at.name,bt.name=at.localName,bt.type=at.type}}else try{bt=at.decode(Qe)}catch(pt){if(pt.code===E.Logger.errors.BUFFER_OVERRUN)throw pt;bt=pt,bt.baseType=at.name,bt.name=at.localName,bt.type=at.type}null!=bt&&ke.push(bt)});const qe=ye.reduce((at,bt)=>{const pt=bt.localName;return pt&&(at[pt]||(at[pt]=0),at[pt]++),at},{});ye.forEach((at,bt)=>{let pt=at.localName;if(!pt||1!==qe[pt]||("length"===pt&&(pt="_length"),null!=ke[pt]))return;const xt=ke[bt];xt instanceof Error?Object.defineProperty(ke,pt,{enumerable:!0,get:()=>{throw xt}}):ke[pt]=xt});for(let at=0;at{throw bt}})}return Object.freeze(ke)}class ge extends V{constructor(ye,ke,et){super("array",ye.type+"["+(ke>=0?ke:"")+"]",et,-1===ke||ye.dynamic),this.coder=ye,this.length=ke}defaultValue(){const ye=this.coder.defaultValue(),ke=[];for(let et=0;etye._data.length&&ne.throwError("insufficient data length",E.Logger.errors.BUFFER_OVERRUN,{length:ye._data.length,count:ke}));let et=[];for(let qe=0;qe{bt.dynamic&&(et=!0),qe.push(bt.type)});super("tuple","tuple("+qe.join(",")+")",ke,et),this.coders=ye}defaultValue(){const ye=[];this.coders.forEach(et=>{ye.push(et.defaultValue())});const ke=this.coders.reduce((et,qe)=>{const at=qe.localName;return at&&(et[at]||(et[at]=0),et[at]++),et},{});return this.coders.forEach((et,qe)=>{let at=et.localName;!at||1!==ke[at]||("length"===at&&(at="_length"),null==ye[at]&&(ye[at]=ye[qe]))}),Object.freeze(ye)}encode(ye,ke){return te(ye,this.coders,ke)}decode(ye){return ye.coerce(this.name,ae(ye,this.coders))}}const ot=new E.Logger(M),nt=new RegExp(/^bytes([0-9]*)$/),Ye=new RegExp(/^(u?int)([0-9]*)$/);class It{constructor(ye){(0,v.defineReadOnly)(this,"coerceFunc",ye||null)}_getCoder(ye){switch(ye.baseType){case"address":return new B(ye.name);case"bool":return new pe(ye.name);case"string":return new Pe(ye.name);case"bytes":return new ce(ye.name);case"array":return new ge(this._getCoder(ye.arrayChildren),ye.arrayLength,ye.name);case"tuple":return new Re((ye.components||[]).map(et=>this._getCoder(et)),ye.name);case"":return new ue(ye.name)}let ke=ye.type.match(Ye);if(ke){let et=parseInt(ke[2]||"256");return(0===et||et>256||et%8!=0)&&ot.throwArgumentError("invalid "+ke[1]+" bit length","param",ye),new he(et/8,"int"===ke[1],ye.name)}if(ke=ye.type.match(nt),ke){let et=parseInt(ke[1]);return(0===et||et>32)&&ot.throwArgumentError("invalid bytes length","param",ye),new le(et,ye.name)}return ot.throwArgumentError("invalid type","type",ye.type)}_getWordSize(){return 32}_getReader(ye,ke){return new L(ye,this._getWordSize(),this.coerceFunc,ke)}_getWriter(){return new H(this._getWordSize())}getDefaultValue(ye){const ke=ye.map(qe=>this._getCoder(D.from(qe)));return new Re(ke,"_").defaultValue()}encode(ye,ke){ye.length!==ke.length&&ot.throwError("types/values length mismatch",E.Logger.errors.INVALID_ARGUMENT,{count:{types:ye.length,values:ke.length},value:{types:ye,values:ke}});const et=ye.map(bt=>this._getCoder(D.from(bt))),qe=new Re(et,"_"),at=this._getWriter();return qe.encode(at,ke),at.data}decode(ye,ke,et){const qe=ye.map(bt=>this._getCoder(D.from(bt)));return new Re(qe,"_").decode(this._getReader((0,w.arrayify)(ke),et))}}const st=new It;var He=u(66171),ze=u(92547);const Be=new E.Logger(M);class Ze extends v.Description{}class ut extends v.Description{}class Me extends v.Description{}class ve extends v.Description{static isIndexed(ye){return!(!ye||!ye._isIndexed)}}const xe={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function je(Qe,ye){const ke=new Error(`deferred error during ABI decoding triggered accessing ${Qe}`);return ke.error=ye,ke}class Ge{constructor(ye){let ke=[];ke="string"==typeof ye?JSON.parse(ye):ye,(0,v.defineReadOnly)(this,"fragments",ke.map(et=>x.from(et)).filter(et=>null!=et)),(0,v.defineReadOnly)(this,"_abiCoder",(0,v.getStatic)(new.target,"getAbiCoder")()),(0,v.defineReadOnly)(this,"functions",{}),(0,v.defineReadOnly)(this,"errors",{}),(0,v.defineReadOnly)(this,"events",{}),(0,v.defineReadOnly)(this,"structs",{}),this.fragments.forEach(et=>{let qe=null;switch(et.type){case"constructor":return this.deploy?void Be.warn("duplicate definition - constructor"):void(0,v.defineReadOnly)(this,"deploy",et);case"function":qe=this.functions;break;case"event":qe=this.events;break;case"error":qe=this.errors;break;default:return}let at=et.format();qe[at]?Be.warn("duplicate definition - "+at):qe[at]=et}),this.deploy||(0,v.defineReadOnly)(this,"deploy",z.from({payable:!1,type:"constructor"})),(0,v.defineReadOnly)(this,"_isInterface",!0)}format(ye){ye||(ye=S.full),ye===S.sighash&&Be.throwArgumentError("interface does not support formatting sighash","format",ye);const ke=this.fragments.map(et=>et.format(ye));return ye===S.json?JSON.stringify(ke.map(et=>JSON.parse(et))):ke}static getAbiCoder(){return st}static getAddress(ye){return(0,b.getAddress)(ye)}static getSighash(ye){return(0,w.hexDataSlice)((0,He.id)(ye.format()),0,4)}static getEventTopic(ye){return(0,He.id)(ye.format())}getFunction(ye){if((0,w.isHexString)(ye)){for(const et in this.functions)if(ye===this.getSighash(et))return this.functions[et];Be.throwArgumentError("no matching function","sighash",ye)}if(-1===ye.indexOf("(")){const et=ye.trim(),qe=Object.keys(this.functions).filter(at=>at.split("(")[0]===et);return 0===qe.length?Be.throwArgumentError("no matching function","name",et):qe.length>1&&Be.throwArgumentError("multiple matching functions","name",et),this.functions[qe[0]]}const ke=this.functions[Y.fromString(ye).format()];return ke||Be.throwArgumentError("no matching function","signature",ye),ke}getEvent(ye){if((0,w.isHexString)(ye)){const et=ye.toLowerCase();for(const qe in this.events)if(et===this.getEventTopic(qe))return this.events[qe];Be.throwArgumentError("no matching event","topichash",et)}if(-1===ye.indexOf("(")){const et=ye.trim(),qe=Object.keys(this.events).filter(at=>at.split("(")[0]===et);return 0===qe.length?Be.throwArgumentError("no matching event","name",et):qe.length>1&&Be.throwArgumentError("multiple matching events","name",et),this.events[qe[0]]}const ke=this.events[C.fromString(ye).format()];return ke||Be.throwArgumentError("no matching event","signature",ye),ke}getError(ye){if((0,w.isHexString)(ye)){const et=(0,v.getStatic)(this.constructor,"getSighash");for(const qe in this.errors){if(ye===et(this.errors[qe]))return this.errors[qe]}Be.throwArgumentError("no matching error","sighash",ye)}if(-1===ye.indexOf("(")){const et=ye.trim(),qe=Object.keys(this.errors).filter(at=>at.split("(")[0]===et);return 0===qe.length?Be.throwArgumentError("no matching error","name",et):qe.length>1&&Be.throwArgumentError("multiple matching errors","name",et),this.errors[qe[0]]}const ke=this.errors[Y.fromString(ye).format()];return ke||Be.throwArgumentError("no matching error","signature",ye),ke}getSighash(ye){if("string"==typeof ye)try{ye=this.getFunction(ye)}catch(ke){try{ye=this.getError(ye)}catch{throw ke}}return(0,v.getStatic)(this.constructor,"getSighash")(ye)}getEventTopic(ye){return"string"==typeof ye&&(ye=this.getEvent(ye)),(0,v.getStatic)(this.constructor,"getEventTopic")(ye)}_decodeParams(ye,ke){return this._abiCoder.decode(ye,ke)}_encodeParams(ye,ke){return this._abiCoder.encode(ye,ke)}encodeDeploy(ye){return this._encodeParams(this.deploy.inputs,ye||[])}decodeErrorResult(ye,ke){"string"==typeof ye&&(ye=this.getError(ye));const et=(0,w.arrayify)(ke);return(0,w.hexlify)(et.slice(0,4))!==this.getSighash(ye)&&Be.throwArgumentError(`data signature does not match error ${ye.name}.`,"data",(0,w.hexlify)(et)),this._decodeParams(ye.inputs,et.slice(4))}encodeErrorResult(ye,ke){return"string"==typeof ye&&(ye=this.getError(ye)),(0,w.hexlify)((0,w.concat)([this.getSighash(ye),this._encodeParams(ye.inputs,ke||[])]))}decodeFunctionData(ye,ke){"string"==typeof ye&&(ye=this.getFunction(ye));const et=(0,w.arrayify)(ke);return(0,w.hexlify)(et.slice(0,4))!==this.getSighash(ye)&&Be.throwArgumentError(`data signature does not match function ${ye.name}.`,"data",(0,w.hexlify)(et)),this._decodeParams(ye.inputs,et.slice(4))}encodeFunctionData(ye,ke){return"string"==typeof ye&&(ye=this.getFunction(ye)),(0,w.hexlify)((0,w.concat)([this.getSighash(ye),this._encodeParams(ye.inputs,ke||[])]))}decodeFunctionResult(ye,ke){"string"==typeof ye&&(ye=this.getFunction(ye));let et=(0,w.arrayify)(ke),qe=null,at="",bt=null,pt=null,xt=null;switch(et.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(ye.outputs,et)}catch{}break;case 4:{const kn=(0,w.hexlify)(et.slice(0,4)),Nt=xe[kn];if(Nt)bt=this._abiCoder.decode(Nt.inputs,et.slice(4)),pt=Nt.name,xt=Nt.signature,Nt.reason&&(qe=bt[0]),"Error"===pt?at=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(bt[0])}`:"Panic"===pt&&(at=`; VM Exception while processing transaction: reverted with panic code ${bt[0]}`);else try{const Ot=this.getError(kn);bt=this._abiCoder.decode(Ot.inputs,et.slice(4)),pt=Ot.name,xt=Ot.format()}catch{}break}}return Be.throwError("call revert exception"+at,E.Logger.errors.CALL_EXCEPTION,{method:ye.format(),data:(0,w.hexlify)(ke),errorArgs:bt,errorName:pt,errorSignature:xt,reason:qe})}encodeFunctionResult(ye,ke){return"string"==typeof ye&&(ye=this.getFunction(ye)),(0,w.hexlify)(this._abiCoder.encode(ye.outputs,ke||[]))}encodeFilterTopics(ye,ke){"string"==typeof ye&&(ye=this.getEvent(ye)),ke.length>ye.inputs.length&&Be.throwError("too many arguments for "+ye.format(),E.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:ke});let et=[];ye.anonymous||et.push(this.getEventTopic(ye));const qe=(at,bt)=>"string"===at.type?(0,He.id)(bt):"bytes"===at.type?(0,ze.keccak256)((0,w.hexlify)(bt)):("bool"===at.type&&"boolean"==typeof bt&&(bt=bt?"0x01":"0x00"),at.type.match(/^u?int/)&&(bt=l.O$.from(bt).toHexString()),"address"===at.type&&this._abiCoder.encode(["address"],[bt]),(0,w.hexZeroPad)((0,w.hexlify)(bt),32));for(ke.forEach((at,bt)=>{let pt=ye.inputs[bt];pt.indexed?null==at?et.push(null):"array"===pt.baseType||"tuple"===pt.baseType?Be.throwArgumentError("filtering with tuples or arrays not supported","contract."+pt.name,at):Array.isArray(at)?et.push(at.map(xt=>qe(pt,xt))):et.push(qe(pt,at)):null!=at&&Be.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+pt.name,at)});et.length&&null===et[et.length-1];)et.pop();return et}encodeEventLog(ye,ke){"string"==typeof ye&&(ye=this.getEvent(ye));const et=[],qe=[],at=[];return ye.anonymous||et.push(this.getEventTopic(ye)),ke.length!==ye.inputs.length&&Be.throwArgumentError("event arguments/values mismatch","values",ke),ye.inputs.forEach((bt,pt)=>{const xt=ke[pt];if(bt.indexed)if("string"===bt.type)et.push((0,He.id)(xt));else if("bytes"===bt.type)et.push((0,ze.keccak256)(xt));else{if("tuple"===bt.baseType||"array"===bt.baseType)throw new Error("not implemented");et.push(this._abiCoder.encode([bt.type],[xt]))}else qe.push(bt),at.push(xt)}),{data:this._abiCoder.encode(qe,at),topics:et}}decodeEventLog(ye,ke,et){if("string"==typeof ye&&(ye=this.getEvent(ye)),null!=et&&!ye.anonymous){let Mn=this.getEventTopic(ye);(!(0,w.isHexString)(et[0],32)||et[0].toLowerCase()!==Mn)&&Be.throwError("fragment/topic mismatch",E.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:Mn,value:et[0]}),et=et.slice(1)}let qe=[],at=[],bt=[];ye.inputs.forEach((Mn,Tt)=>{Mn.indexed?"string"===Mn.type||"bytes"===Mn.type||"tuple"===Mn.baseType||"array"===Mn.baseType?(qe.push(D.fromObject({type:"bytes32",name:Mn.name})),bt.push(!0)):(qe.push(Mn),bt.push(!1)):(at.push(Mn),bt.push(!1))});let pt=null!=et?this._abiCoder.decode(qe,(0,w.concat)(et)):null,xt=this._abiCoder.decode(at,ke,!0),kn=[],Nt=0,Ot=0;ye.inputs.forEach((Mn,Tt)=>{if(Mn.indexed)if(null==pt)kn[Tt]=new ve({_isIndexed:!0,hash:null});else if(bt[Tt])kn[Tt]=new ve({_isIndexed:!0,hash:pt[Ot++]});else try{kn[Tt]=pt[Ot++]}catch(Pt){kn[Tt]=Pt}else try{kn[Tt]=xt[Nt++]}catch(Pt){kn[Tt]=Pt}if(Mn.name&&null==kn[Mn.name]){const Pt=kn[Tt];Pt instanceof Error?Object.defineProperty(kn,Mn.name,{enumerable:!0,get:()=>{throw je(`property ${JSON.stringify(Mn.name)}`,Pt)}}):kn[Mn.name]=Pt}});for(let Mn=0;Mn{throw je(`index ${Mn}`,Tt)}})}return Object.freeze(kn)}parseTransaction(ye){let ke=this.getFunction(ye.data.substring(0,10).toLowerCase());return ke?new ut({args:this._abiCoder.decode(ke.inputs,"0x"+ye.data.substring(10)),functionFragment:ke,name:ke.name,signature:ke.format(),sighash:this.getSighash(ke),value:l.O$.from(ye.value||"0")}):null}parseLog(ye){let ke=this.getEvent(ye.topics[0]);return!ke||ke.anonymous?null:new Ze({eventFragment:ke,name:ke.name,signature:ke.format(),topic:this.getEventTopic(ke),args:this.decodeEventLog(ke,ye.data,ye.topics)})}parseError(ye){const ke=(0,w.hexlify)(ye);let et=this.getError(ke.substring(0,10).toLowerCase());return et?new Me({args:this._abiCoder.decode(et.inputs,"0x"+ke.substring(10)),errorFragment:et,name:et.name,signature:et.format(),sighash:this.getSighash(et)}):null}static isInterface(ye){return!(!ye||!ye._isInterface)}}},58314:(q,n,u)=>{"use strict";u.d(n,{Sg:()=>y,zt:()=>m});var l=u(52909),v=u(24325),E=u(88666);var s=function(S,_,D,P){return new(D||(D=Promise))(function(C,N){function k(Y){try{z(P.next(Y))}catch(G){N(G)}}function U(Y){try{z(P.throw(Y))}catch(G){N(G)}}function z(Y){Y.done?C(Y.value):function x(C){return C instanceof D?C:new D(function(N){N(C)})}(Y.value).then(k,U)}z((P=P.apply(S,_||[])).next())})};const g=new E.Logger("abstract-provider/5.7.0");class y extends v.Description{static isForkEvent(_){return!(!_||!_._isForkEvent)}}class m{constructor(){g.checkAbstract(new.target,m),(0,v.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){return s(this,void 0,void 0,function*(){const{block:_,gasPrice:D}=yield(0,v.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(N=>null)});let P=null,x=null,C=null;return _&&_.baseFeePerGas&&(P=_.baseFeePerGas,C=l.O$.from("1500000000"),x=_.baseFeePerGas.mul(2).add(C)),{lastBaseFeePerGas:P,maxFeePerGas:x,maxPriorityFeePerGas:C,gasPrice:D}})}addListener(_,D){return this.on(_,D)}removeListener(_,D){return this.off(_,D)}static isProvider(_){return!(!_||!_._isProvider)}}},12748:(q,n,u)=>{"use strict";u.d(n,{E:()=>f});var l=u(24325),v=u(88666);var M=function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};const s=new v.Logger("abstract-signer/5.7.0"),g=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],y=[v.Logger.errors.INSUFFICIENT_FUNDS,v.Logger.errors.NONCE_EXPIRED,v.Logger.errors.REPLACEMENT_UNDERPRICED];class f{constructor(){s.checkAbstract(new.target,f),(0,l.defineReadOnly)(this,"_isSigner",!0)}getBalance(m){return M(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),m)})}getTransactionCount(m){return M(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),m)})}estimateGas(m){return M(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const S=yield(0,l.resolveProperties)(this.checkTransaction(m));return yield this.provider.estimateGas(S)})}call(m,S){return M(this,void 0,void 0,function*(){this._checkProvider("call");const _=yield(0,l.resolveProperties)(this.checkTransaction(m));return yield this.provider.call(_,S)})}sendTransaction(m){return M(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const S=yield this.populateTransaction(m),_=yield this.signTransaction(S);return yield this.provider.sendTransaction(_)})}getChainId(){return M(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return M(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return M(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(m){return M(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(m)})}checkTransaction(m){for(const _ in m)-1===g.indexOf(_)&&s.throwArgumentError("invalid transaction key: "+_,"transaction",m);const S=(0,l.shallowCopy)(m);return null==S.from?S.from=this.getAddress():S.from=Promise.all([Promise.resolve(S.from),this.getAddress()]).then(_=>(_[0].toLowerCase()!==_[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",m),_[0])),S}populateTransaction(m){return M(this,void 0,void 0,function*(){const S=yield(0,l.resolveProperties)(this.checkTransaction(m));null!=S.to&&(S.to=Promise.resolve(S.to).then(D=>M(this,void 0,void 0,function*(){if(null==D)return null;const P=yield this.resolveName(D);return null==P&&s.throwArgumentError("provided ENS name resolves to null","tx.to",D),P})),S.to.catch(D=>{}));const _=null!=S.maxFeePerGas||null!=S.maxPriorityFeePerGas;if(null==S.gasPrice||2!==S.type&&!_?(0===S.type||1===S.type)&&_&&s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",m):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",m),2!==S.type&&null!=S.type||null==S.maxFeePerGas||null==S.maxPriorityFeePerGas)if(0===S.type||1===S.type)null==S.gasPrice&&(S.gasPrice=this.getGasPrice());else{const D=yield this.getFeeData();if(null==S.type)if(null!=D.maxFeePerGas&&null!=D.maxPriorityFeePerGas)if(S.type=2,null!=S.gasPrice){const P=S.gasPrice;delete S.gasPrice,S.maxFeePerGas=P,S.maxPriorityFeePerGas=P}else null==S.maxFeePerGas&&(S.maxFeePerGas=D.maxFeePerGas),null==S.maxPriorityFeePerGas&&(S.maxPriorityFeePerGas=D.maxPriorityFeePerGas);else null!=D.gasPrice?(_&&s.throwError("network does not support EIP-1559",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==S.gasPrice&&(S.gasPrice=D.gasPrice),S.type=0):s.throwError("failed to get consistent fee data",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===S.type&&(null==S.maxFeePerGas&&(S.maxFeePerGas=D.maxFeePerGas),null==S.maxPriorityFeePerGas&&(S.maxPriorityFeePerGas=D.maxPriorityFeePerGas))}else S.type=2;return null==S.nonce&&(S.nonce=this.getTransactionCount("pending")),null==S.gasLimit&&(S.gasLimit=this.estimateGas(S).catch(D=>{if(y.indexOf(D.code)>=0)throw D;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",v.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:D,tx:S})})),null==S.chainId?S.chainId=this.getChainId():S.chainId=Promise.all([Promise.resolve(S.chainId),this.getChainId()]).then(D=>(0!==D[1]&&D[0]!==D[1]&&s.throwArgumentError("chainId address mismatch","transaction",m),D[0])),yield(0,l.resolveProperties)(S)})}_checkProvider(m){this.provider||s.throwError("missing provider",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:m||"_checkProvider"})}static isSigner(m){return!(!m||!m._isSigner)}}},28016:(q,n,u)=>{"use strict";u.r(n),u.d(n,{getAddress:()=>D,getContractAddress:()=>C,getCreate2Address:()=>N,getIcapAddress:()=>x,isAddress:()=>P});var l=u(10499),v=u(52909),E=u(92547),M=u(70810);const y=new(u(88666).Logger)("address/5.7.0");function f(k){(0,l.isHexString)(k,20)||y.throwArgumentError("invalid address","address",k);const U=(k=k.toLowerCase()).substring(2).split(""),z=new Uint8Array(40);for(let G=0;G<40;G++)z[G]=U[G].charCodeAt(0);const Y=(0,l.arrayify)((0,E.keccak256)(z));for(let G=0;G<40;G+=2)Y[G>>1]>>4>=8&&(U[G]=U[G].toUpperCase()),(15&Y[G>>1])>=8&&(U[G+1]=U[G+1].toUpperCase());return"0x"+U.join("")}const m={};for(let k=0;k<10;k++)m[String(k)]=String(k);for(let k=0;k<26;k++)m[String.fromCharCode(65+k)]=String(10+k);const S=Math.floor(function p(k){return Math.log10?Math.log10(k):Math.log(k)/Math.LN10}(9007199254740991));function _(k){let U=(k=(k=k.toUpperCase()).substring(4)+k.substring(0,2)+"00").split("").map(Y=>m[Y]).join("");for(;U.length>=S;){let Y=U.substring(0,S);U=parseInt(Y,10)%97+U.substring(Y.length)}let z=String(98-parseInt(U,10)%97);for(;z.length<2;)z="0"+z;return z}function D(k){let U=null;if("string"!=typeof k&&y.throwArgumentError("invalid address","address",k),k.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==k.substring(0,2)&&(k="0x"+k),U=f(k),k.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&U!==k&&y.throwArgumentError("bad address checksum","address",k);else if(k.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(k.substring(2,4)!==_(k)&&y.throwArgumentError("bad icap checksum","address",k),U=(0,v.g$)(k.substring(4));U.length<40;)U="0"+U;U=f("0x"+U)}else y.throwArgumentError("invalid address","address",k);return U}function P(k){try{return D(k),!0}catch{}return!1}function x(k){let U=(0,v.t2)(D(k).substring(2)).toUpperCase();for(;U.length<30;)U="0"+U;return"XE"+_("XE00"+U)+U}function C(k){let U=null;try{U=D(k.from)}catch{y.throwArgumentError("missing from address","transaction",k)}const z=(0,l.stripZeros)((0,l.arrayify)(v.O$.from(k.nonce).toHexString()));return D((0,l.hexDataSlice)((0,E.keccak256)((0,M.encode)([U,z])),12))}function N(k,U,z){return 32!==(0,l.hexDataLength)(U)&&y.throwArgumentError("salt must be 32 bytes","salt",U),32!==(0,l.hexDataLength)(z)&&y.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",z),D((0,l.hexDataSlice)((0,E.keccak256)((0,l.concat)(["0xff",D(k),U,z])),12))}},57836:(q,n,u)=>{"use strict";u.d(n,{J:()=>v,c:()=>E});var l=u(10499);function v(M){M=atob(M);const s=[];for(let g=0;g{"use strict";u.r(n),u.d(n,{decode:()=>l.J,encode:()=>l.c});var l=u(57836)},45887:(q,n,u)=>{"use strict";u.r(n),u.d(n,{Base32:()=>M,Base58:()=>s,BaseX:()=>E});var l=u(10499),v=u(24325);class E{constructor(y){(0,v.defineReadOnly)(this,"alphabet",y),(0,v.defineReadOnly)(this,"base",y.length),(0,v.defineReadOnly)(this,"_alphabetMap",{}),(0,v.defineReadOnly)(this,"_leader",y.charAt(0));for(let f=0;f0;)d.push(S%this.base),S=S/this.base|0}let p="";for(let m=0;0===f[m]&&m=0;--m)p+=this.alphabet[d[m]];return p}decode(y){if("string"!=typeof y)throw new TypeError("Expected String");let f=[];if(0===y.length)return new Uint8Array(f);f.push(0);for(let d=0;d>=8;for(;m>0;)f.push(255&m),m>>=8}for(let d=0;y[d]===this._leader&&d{"use strict";u.d(n,{i:()=>l});const l="bignumber/5.7.0"},52909:(q,n,u)=>{"use strict";u.d(n,{O$:()=>S,Zm:()=>p,g$:()=>C,t2:()=>N});var l=u(98538),v=u.n(l),E=u(10499),M=u(88666),s=u(37883),g=v().BN;const y=new M.Logger(s.i),f={},d=9007199254740991;function p(k){return null!=k&&(S.isBigNumber(k)||"number"==typeof k&&k%1==0||"string"==typeof k&&!!k.match(/^-?[0-9]+$/)||(0,E.isHexString)(k)||"bigint"==typeof k||(0,E.isBytes)(k))}let m=!1;class S{constructor(U,z){U!==f&&y.throwError("cannot call constructor directly; use BigNumber.from",M.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=z,this._isBigNumber=!0,Object.freeze(this)}fromTwos(U){return D(P(this).fromTwos(U))}toTwos(U){return D(P(this).toTwos(U))}abs(){return"-"===this._hex[0]?S.from(this._hex.substring(1)):this}add(U){return D(P(this).add(P(U)))}sub(U){return D(P(this).sub(P(U)))}div(U){return S.from(U).isZero()&&x("division-by-zero","div"),D(P(this).div(P(U)))}mul(U){return D(P(this).mul(P(U)))}mod(U){const z=P(U);return z.isNeg()&&x("division-by-zero","mod"),D(P(this).umod(z))}pow(U){const z=P(U);return z.isNeg()&&x("negative-power","pow"),D(P(this).pow(z))}and(U){const z=P(U);return(this.isNegative()||z.isNeg())&&x("unbound-bitwise-result","and"),D(P(this).and(z))}or(U){const z=P(U);return(this.isNegative()||z.isNeg())&&x("unbound-bitwise-result","or"),D(P(this).or(z))}xor(U){const z=P(U);return(this.isNegative()||z.isNeg())&&x("unbound-bitwise-result","xor"),D(P(this).xor(z))}mask(U){return(this.isNegative()||U<0)&&x("negative-width","mask"),D(P(this).maskn(U))}shl(U){return(this.isNegative()||U<0)&&x("negative-width","shl"),D(P(this).shln(U))}shr(U){return(this.isNegative()||U<0)&&x("negative-width","shr"),D(P(this).shrn(U))}eq(U){return P(this).eq(P(U))}lt(U){return P(this).lt(P(U))}lte(U){return P(this).lte(P(U))}gt(U){return P(this).gt(P(U))}gte(U){return P(this).gte(P(U))}isNegative(){return"-"===this._hex[0]}isZero(){return P(this).isZero()}toNumber(){try{return P(this).toNumber()}catch{x("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return y.throwError("this platform does not support BigInt",M.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?m||(m=!0,y.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?y.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",M.Logger.errors.UNEXPECTED_ARGUMENT,{}):y.throwError("BigNumber.toString does not accept parameters",M.Logger.errors.UNEXPECTED_ARGUMENT,{})),P(this).toString(10)}toHexString(){return this._hex}toJSON(U){return{type:"BigNumber",hex:this.toHexString()}}static from(U){if(U instanceof S)return U;if("string"==typeof U)return U.match(/^-?0x[0-9a-f]+$/i)?new S(f,_(U)):U.match(/^-?[0-9]+$/)?new S(f,_(new g(U))):y.throwArgumentError("invalid BigNumber string","value",U);if("number"==typeof U)return U%1&&x("underflow","BigNumber.from",U),(U>=d||U<=-d)&&x("overflow","BigNumber.from",U),S.from(String(U));const z=U;if("bigint"==typeof z)return S.from(z.toString());if((0,E.isBytes)(z))return S.from((0,E.hexlify)(z));if(z)if(z.toHexString){const Y=z.toHexString();if("string"==typeof Y)return S.from(Y)}else{let Y=z._hex;if(null==Y&&"BigNumber"===z.type&&(Y=z.hex),"string"==typeof Y&&((0,E.isHexString)(Y)||"-"===Y[0]&&(0,E.isHexString)(Y.substring(1))))return S.from(Y)}return y.throwArgumentError("invalid BigNumber value","value",U)}static isBigNumber(U){return!(!U||!U._isBigNumber)}}function _(k){if("string"!=typeof k)return _(k.toString(16));if("-"===k[0])return"-"===(k=k.substring(1))[0]&&y.throwArgumentError("invalid hex","value",k),"0x00"===(k=_(k))?k:"-"+k;if("0x"!==k.substring(0,2)&&(k="0x"+k),"0x"===k)return"0x00";for(k.length%2&&(k="0x0"+k.substring(2));k.length>4&&"0x00"===k.substring(0,4);)k="0x"+k.substring(4);return k}function D(k){return S.from(_(k))}function P(k){const U=S.from(k).toHexString();return"-"===U[0]?new g("-"+U.substring(3),16):new g(U.substring(2),16)}function x(k,U,z){const Y={fault:k,operation:U};return null!=z&&(Y.value=z),y.throwError(k,M.Logger.errors.NUMERIC_FAULT,Y)}function C(k){return new g(k,36).toString(16)}function N(k){return new g(k,16).toString(36)}},10499:(q,n,u)=>{"use strict";u.r(n),u.d(n,{arrayify:()=>d,concat:()=>p,hexConcat:()=>N,hexDataLength:()=>x,hexDataSlice:()=>C,hexStripZeros:()=>U,hexValue:()=>k,hexZeroPad:()=>z,hexlify:()=>P,isBytes:()=>f,isBytesLike:()=>g,isHexString:()=>_,joinSignature:()=>G,splitSignature:()=>Y,stripZeros:()=>m,zeroPad:()=>S});const E=new(u(88666).Logger)("bytes/5.7.0");function M(F){return!!F.toHexString}function s(F){return F.slice||(F.slice=function(){const j=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(F,j)))}),F}function g(F){return _(F)&&!(F.length%2)||f(F)}function y(F){return"number"==typeof F&&F==F&&F%1==0}function f(F){if(null==F)return!1;if(F.constructor===Uint8Array)return!0;if("string"==typeof F||!y(F.length)||F.length<0)return!1;for(let j=0;j=256)return!1}return!0}function d(F,j){if(j||(j={}),"number"==typeof F){E.checkSafeUint53(F,"invalid arrayify value");const Z=[];for(;F;)Z.unshift(255&F),F=parseInt(String(F/256));return 0===Z.length&&Z.push(0),s(new Uint8Array(Z))}if(j.allowMissingPrefix&&"string"==typeof F&&"0x"!==F.substring(0,2)&&(F="0x"+F),M(F)&&(F=F.toHexString()),_(F)){let Z=F.substring(2);Z.length%2&&("left"===j.hexPad?Z="0"+Z:"right"===j.hexPad?Z+="0":E.throwArgumentError("hex data is odd-length","value",F));const T=[];for(let o=0;od(o)),Z=j.reduce((o,h)=>o+h.length,0),T=new Uint8Array(Z);return j.reduce((o,h)=>(T.set(h,o),o+h.length),0),s(T)}function m(F){let j=d(F);if(0===j.length)return j;let Z=0;for(;Zj&&E.throwArgumentError("value out of range","value",arguments[0]);const Z=new Uint8Array(j);return Z.set(F,j-F.length),s(Z)}function _(F,j){return!("string"!=typeof F||!F.match(/^0x[0-9A-Fa-f]*$/)||j&&F.length!==2+2*j)}const D="0123456789abcdef";function P(F,j){if(j||(j={}),"number"==typeof F){E.checkSafeUint53(F,"invalid hexlify value");let Z="";for(;F;)Z=D[15&F]+Z,F=Math.floor(F/16);return Z.length?(Z.length%2&&(Z="0"+Z),"0x"+Z):"0x00"}if("bigint"==typeof F)return(F=F.toString(16)).length%2?"0x0"+F:"0x"+F;if(j.allowMissingPrefix&&"string"==typeof F&&"0x"!==F.substring(0,2)&&(F="0x"+F),M(F))return F.toHexString();if(_(F))return F.length%2&&("left"===j.hexPad?F="0x0"+F.substring(2):"right"===j.hexPad?F+="0":E.throwArgumentError("hex data is odd-length","value",F)),F.toLowerCase();if(f(F)){let Z="0x";for(let T=0;T>4]+D[15&o]}return Z}return E.throwArgumentError("invalid hexlify value","value",F)}function x(F){if("string"!=typeof F)F=P(F);else if(!_(F)||F.length%2)return null;return(F.length-2)/2}function C(F,j,Z){return"string"!=typeof F?F=P(F):(!_(F)||F.length%2)&&E.throwArgumentError("invalid hexData","value",F),j=2+2*j,null!=Z?"0x"+F.substring(j,2+2*Z):"0x"+F.substring(j)}function N(F){let j="0x";return F.forEach(Z=>{j+=P(Z).substring(2)}),j}function k(F){const j=U(P(F,{hexPad:"left"}));return"0x"===j?"0x0":j}function U(F){"string"!=typeof F&&(F=P(F)),_(F)||E.throwArgumentError("invalid hex string","value",F),F=F.substring(2);let j=0;for(;j2*j+2&&E.throwArgumentError("value out of range","value",arguments[1]);F.length<2*j+2;)F="0x0"+F.substring(2);return F}function Y(F){const j={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(g(F)){let Z=d(F);64===Z.length?(j.v=27+(Z[32]>>7),Z[32]&=127,j.r=P(Z.slice(0,32)),j.s=P(Z.slice(32,64))):65===Z.length?(j.r=P(Z.slice(0,32)),j.s=P(Z.slice(32,64)),j.v=Z[64]):E.throwArgumentError("invalid signature string","signature",F),j.v<27&&(0===j.v||1===j.v?j.v+=27:E.throwArgumentError("signature invalid v byte","signature",F)),j.recoveryParam=1-j.v%2,j.recoveryParam&&(Z[32]|=128),j._vs=P(Z.slice(32,64))}else{if(j.r=F.r,j.s=F.s,j.v=F.v,j.recoveryParam=F.recoveryParam,j._vs=F._vs,null!=j._vs){const o=S(d(j._vs),32);j._vs=P(o);const h=o[0]>=128?1:0;null==j.recoveryParam?j.recoveryParam=h:j.recoveryParam!==h&&E.throwArgumentError("signature recoveryParam mismatch _vs","signature",F),o[0]&=127;const w=P(o);null==j.s?j.s=w:j.s!==w&&E.throwArgumentError("signature v mismatch _vs","signature",F)}if(null==j.recoveryParam)null==j.v?E.throwArgumentError("signature missing v and recoveryParam","signature",F):0===j.v||1===j.v?j.recoveryParam=j.v:j.recoveryParam=1-j.v%2;else if(null==j.v)j.v=27+j.recoveryParam;else{const o=0===j.v||1===j.v?j.v:1-j.v%2;j.recoveryParam!==o&&E.throwArgumentError("signature recoveryParam mismatch v","signature",F)}null!=j.r&&_(j.r)?j.r=z(j.r,32):E.throwArgumentError("signature missing or invalid r","signature",F),null!=j.s&&_(j.s)?j.s=z(j.s,32):E.throwArgumentError("signature missing or invalid s","signature",F);const Z=d(j.s);Z[0]>=128&&E.throwArgumentError("signature s out of range","signature",F),j.recoveryParam&&(Z[0]|=128);const T=P(Z);j._vs&&(_(j._vs)||E.throwArgumentError("signature invalid _vs","signature",F),j._vs=z(j._vs,32)),null==j._vs?j._vs=T:j._vs!==T&&E.throwArgumentError("signature _vs mismatch v and s","signature",F)}return j.yParityAndS=j._vs,j.compact=j.r+j.yParityAndS.substring(2),j}function G(F){return P(p([(F=Y(F)).r,F.s,F.recoveryParam?"0x1c":"0x1b"]))}},53037:(q,n,u)=>{"use strict";u.d(n,{Bz:()=>y,_Y:()=>E,fh:()=>M,tL:()=>v});var l=u(52909);const v=l.O$.from(-1),E=l.O$.from(0),M=l.O$.from(1),y=l.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},18663:(q,n,u)=>{"use strict";u.d(n,{R:()=>l});const l="0x0000000000000000000000000000000000000000000000000000000000000000"},53198:(q,n,u)=>{"use strict";u.d(n,{i:()=>l});const l="hash/5.7.0"},66171:(q,n,u)=>{"use strict";u.d(n,{id:()=>E});var l=u(92547),v=u(63544);function E(M){return(0,l.keccak256)((0,v.Y0)(M))}},43015:(q,n,u)=>{"use strict";u.r(n),u.d(n,{_TypedDataEncoder:()=>M.E,dnsEncode:()=>v.Kn,ensNormalize:()=>v.w3,hashMessage:()=>E.r,id:()=>l.id,isValidName:()=>v.r1,messagePrefix:()=>E.B,namehash:()=>v.VM});var l=u(66171),v=u(63324),E=u(24660),M=u(90687)},24660:(q,n,u)=>{"use strict";u.d(n,{B:()=>M,r:()=>s});var l=u(10499),v=u(92547),E=u(63544);const M="\x19Ethereum Signed Message:\n";function s(g){return"string"==typeof g&&(g=(0,E.Y0)(g)),(0,v.keccak256)((0,l.concat)([(0,E.Y0)(M),(0,E.Y0)(String(g.length)),g]))}},63324:(q,n,u)=>{"use strict";u.d(n,{Kn:()=>ce,w3:()=>ge,r1:()=>pe,VM:()=>we});var l=u(10499),v=u(63544),E=u(92547),M=u(88666),s=u(53198),g=u(57836);function y(le,ue){null==ue&&(ue=1);const fe=[],he=fe.forEach,Ae=function(Pe,Re){he.call(Pe,function(ot){Re>0&&Array.isArray(ot)?Ae(ot,Re-1):fe.push(ot)})};return Ae(le,ue),fe}function m(le){return function p(le){let ue=0;return()=>le[ue++]}(function d(le){let ue=0;function fe(){return le[ue++]<<8|le[ue++]}let he=fe(),Ae=1,Pe=[0,1];for(let Ge=1;Ge>--nt&1}const He=Math.pow(2,31),ze=He>>>1,Be=ze>>1,Ze=He-1;let ut=0;for(let Ge=0;Ge<31;Ge++)ut=ut<<1|It();let Me=[],ve=0,xe=He;for(;;){let Ge=Math.floor(((ut-ve+1)*Ae-1)/xe),Qe=0,ye=he;for(;ye-Qe>1;){let qe=Qe+ye>>>1;Ge>>1|It(),ke=ke<<1^ze,et=(et^ze)<<1|ze|1;ve=ke,xe=1+et-ke}let je=he-4;return Me.map(Ge=>{switch(Ge-je){case 3:return je+65792+(le[ot++]<<16|le[ot++]<<8|le[ot++]);case 2:return je+256+(le[ot++]<<8|le[ot++]);case 1:return je+le[ot++];default:return Ge-1}})}(le))}function S(le){return 1&le?~le>>1:le>>1}function D(le,ue){let fe=Array(le);for(let he=0,Ae=-1;heue[Re]):fe}function k(le,ue,fe){let he=Array(le).fill(void 0).map(()=>[]);for(let Ae=0;Aehe[Re].push(Pe));return he}function U(le,ue){let fe=1+ue(),he=ue(),Ae=function N(le){let ue=[];for(;;){let fe=le();if(0==fe)break;ue.push(fe)}return ue}(ue);return y(k(Ae.length,1+le,ue).map((Re,ot)=>{const nt=Re[0],Ye=Re.slice(1);return Array(Ae[ot]).fill(void 0).map((It,st)=>{let He=st*he;return[nt+st*fe,Ye.map(ze=>ze+He)]})}))}function z(le,ue){return k(1+ue(),1+le,ue).map(Ae=>[Ae[0],Ae.slice(1)])}const F=function G(){return m((0,g.J)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}(),j=new Set(x(F)),Z=new Set(x(F)),T=function C(le){let ue=[];for(;;){let fe=le();if(0==fe)break;ue.push(U(fe,le))}for(;;){let fe=le()-1;if(fe<0)break;ue.push(z(fe,le))}return function f(le){const ue={};for(let fe=0;fehe-Ae);return function fe(){let he=[];for(;;){let Ye=x(le,ue);if(0==Ye.length)break;he.push({set:new Set(Ye),node:fe()})}he.sort((Ye,It)=>It.set.size-Ye.set.size);let Ae=le(),Pe=Ae%3;Ae=Ae/3|0;let Re=!!(1&Ae);return Ae>>=1,{branches:he,valid:Pe,fe0f:Re,save:1==Ae,check:2==Ae}}()}(F),h=45,w=95;function I(le){return(0,v.XL)(le)}function R(le){return le.filter(ue=>65039!=ue)}function V(le){for(let ue of le.split(".")){let fe=I(ue);try{for(let he=fe.lastIndexOf(w)-1;he>=0;he--)if(fe[he]!==w)throw new Error("underscore only allowed at start");if(fe.length>=4&&fe.every(he=>he<128)&&fe[2]===h&&fe[3]===h)throw new Error("invalid label extension")}catch(he){throw new Error(`Invalid label "${ue}": ${he.message}`)}}return le}function H(le){return V(function L(le,ue){let fe=I(le).reverse(),he=[];for(;fe.length;){let Ae=B(fe);if(Ae){he.push(...ue(Ae));continue}let Pe=fe.pop();if(j.has(Pe)){he.push(Pe);continue}if(Z.has(Pe))continue;let Re=T[Pe];if(!Re)throw new Error(`Disallowed codepoint: 0x${Pe.toString(16).toUpperCase()}`);he.push(...Re)}return V(function b(le){return le.normalize("NFC")}(String.fromCodePoint(...he)))}(le,R))}function B(le,ue){var fe;let Ae,Pe,he=o,Re=[],ot=le.length;for(ue&&(ue.length=0);ot;){let nt=le[--ot];if(he=null===(fe=he.branches.find(Ye=>Ye.set.has(nt)))||void 0===fe?void 0:fe.node,!he)break;if(he.save)Pe=nt;else if(he.check&&nt===Pe)break;Re.push(nt),he.fe0f&&(Re.push(65039),ot>0&&65039==le[ot-1]&&ot--),he.valid&&(Ae=Re.slice(),2==he.valid&&Ae.splice(1,1),ue&&ue.push(...le.slice(ot).reverse()),le.length=ot)}return Ae}const re=new M.Logger(s.i),ne=new Uint8Array(32);function te(le){if(0===le.length)throw new Error("invalid ENS name; empty component");return le}function ae(le){const ue=(0,v.Y0)(H(le)),fe=[];if(0===le.length)return fe;let he=0;for(let Ae=0;Ae=ue.length)throw new Error("invalid ENS name; empty component");return fe.push(te(ue.slice(he))),fe}function ge(le){return ae(le).map(ue=>(0,v.ZN)(ue)).join(".")}function pe(le){try{return 0!==ae(le).length}catch{}return!1}function we(le){"string"!=typeof le&&re.throwArgumentError("invalid ENS name; not a string","name",le);let ue=ne;const fe=ae(le);for(;fe.length;)ue=(0,E.keccak256)((0,l.concat)([ue,(0,E.keccak256)(fe.pop())]));return(0,l.hexlify)(ue)}function ce(le){return(0,l.hexlify)((0,l.concat)(ae(le).map(ue=>{if(ue.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const fe=new Uint8Array(ue.length+1);return fe.set(ue,1),fe[0]=fe.length-1,fe})))+"00"}ne.fill(0)},90687:(q,n,u)=>{"use strict";u.d(n,{E:()=>j});var l=u(28016),v=u(52909),E=u(10499),M=u(92547),s=u(24325),g=u(88666),y=u(53198),f=u(66171),d=function(Z,T,o,h){return new(o||(o=Promise))(function(I,R){function V(b){try{L(h.next(b))}catch(B){R(B)}}function H(b){try{L(h.throw(b))}catch(B){R(B)}}function L(b){b.done?I(b.value):function w(I){return I instanceof o?I:new o(function(R){R(I)})}(b.value).then(V,H)}L((h=h.apply(Z,T||[])).next())})};const p=new g.Logger(y.i),m=new Uint8Array(32);m.fill(0);const S=v.O$.from(-1),_=v.O$.from(0),D=v.O$.from(1),P=v.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const C=(0,E.hexZeroPad)(D.toHexString(),32),N=(0,E.hexZeroPad)(_.toHexString(),32),k={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},U=["name","version","chainId","verifyingContract","salt"];function z(Z){return function(T){return"string"!=typeof T&&p.throwArgumentError(`invalid domain value for ${JSON.stringify(Z)}`,`domain.${Z}`,T),T}}const Y={name:z("name"),version:z("version"),chainId:function(Z){try{return v.O$.from(Z).toString()}catch{}return p.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",Z)},verifyingContract:function(Z){try{return(0,l.getAddress)(Z).toLowerCase()}catch{}return p.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",Z)},salt:function(Z){try{const T=(0,E.arrayify)(Z);if(32!==T.length)throw new Error("bad length");return(0,E.hexlify)(T)}catch{}return p.throwArgumentError('invalid domain value "salt"',"domain.salt",Z)}};function G(Z){{const T=Z.match(/^(u?)int(\d*)$/);if(T){const o=""===T[1],h=parseInt(T[2]||"256");(h%8!=0||h>256||T[2]&&T[2]!==String(h))&&p.throwArgumentError("invalid numeric width","type",Z);const w=P.mask(o?h-1:h),I=o?w.add(D).mul(S):_;return function(R){const V=v.O$.from(R);return(V.lt(I)||V.gt(w))&&p.throwArgumentError(`value out-of-bounds for ${Z}`,"value",R),(0,E.hexZeroPad)(V.toTwos(256).toHexString(),32)}}}{const T=Z.match(/^bytes(\d+)$/);if(T){const o=parseInt(T[1]);return(0===o||o>32||T[1]!==String(o))&&p.throwArgumentError("invalid bytes width","type",Z),function(h){return(0,E.arrayify)(h).length!==o&&p.throwArgumentError(`invalid length for ${Z}`,"value",h),function x(Z){const T=(0,E.arrayify)(Z),o=T.length%32;return o?(0,E.hexConcat)([T,m.slice(o)]):(0,E.hexlify)(T)}(h)}}}switch(Z){case"address":return function(T){return(0,E.hexZeroPad)((0,l.getAddress)(T),32)};case"bool":return function(T){return T?C:N};case"bytes":return function(T){return(0,M.keccak256)(T)};case"string":return function(T){return(0,f.id)(T)}}return null}function F(Z,T){return`${Z}(${T.map(({name:o,type:h})=>h+" "+o).join(",")})`}class j{constructor(T){(0,s.defineReadOnly)(this,"types",Object.freeze((0,s.deepCopy)(T))),(0,s.defineReadOnly)(this,"_encoderCache",{}),(0,s.defineReadOnly)(this,"_types",{});const o={},h={},w={};Object.keys(T).forEach(V=>{o[V]={},h[V]=[],w[V]={}});for(const V in T){const H={};T[V].forEach(L=>{H[L.name]&&p.throwArgumentError(`duplicate variable name ${JSON.stringify(L.name)} in ${JSON.stringify(V)}`,"types",T),H[L.name]=!0;const b=L.type.match(/^([^\x5b]*)(\x5b|$)/)[1];b===V&&p.throwArgumentError(`circular type reference to ${JSON.stringify(b)}`,"types",T),!G(b)&&(h[b]||p.throwArgumentError(`unknown type ${JSON.stringify(b)}`,"types",T),h[b].push(V),o[V][b]=!0)})}const I=Object.keys(h).filter(V=>0===h[V].length);0===I.length?p.throwArgumentError("missing primary type","types",T):I.length>1&&p.throwArgumentError(`ambiguous primary types or unused types: ${I.map(V=>JSON.stringify(V)).join(", ")}`,"types",T),(0,s.defineReadOnly)(this,"primaryType",I[0]),function R(V,H){H[V]&&p.throwArgumentError(`circular type reference to ${JSON.stringify(V)}`,"types",T),H[V]=!0,Object.keys(o[V]).forEach(L=>{h[L]&&(R(L,H),Object.keys(H).forEach(b=>{w[b][L]=!0}))}),delete H[V]}(this.primaryType,{});for(const V in w){const H=Object.keys(w[V]);H.sort(),this._types[V]=F(V,T[V])+H.map(L=>F(L,T[L])).join("")}}getEncoder(T){let o=this._encoderCache[T];return o||(o=this._encoderCache[T]=this._getEncoder(T)),o}_getEncoder(T){{const w=G(T);if(w)return w}const o=T.match(/^(.*)(\x5b(\d*)\x5d)$/);if(o){const w=o[1],I=this.getEncoder(w),R=parseInt(o[3]);return V=>{R>=0&&V.length!==R&&p.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",V);let H=V.map(I);return this._types[w]&&(H=H.map(M.keccak256)),(0,M.keccak256)((0,E.hexConcat)(H))}}const h=this.types[T];if(h){const w=(0,f.id)(this._types[T]);return I=>{const R=h.map(({name:V,type:H})=>{const L=this.getEncoder(H)(I[V]);return this._types[H]?(0,M.keccak256)(L):L});return R.unshift(w),(0,E.hexConcat)(R)}}return p.throwArgumentError(`unknown type: ${T}`,"type",T)}encodeType(T){const o=this._types[T];return o||p.throwArgumentError(`unknown type: ${JSON.stringify(T)}`,"name",T),o}encodeData(T,o){return this.getEncoder(T)(o)}hashStruct(T,o){return(0,M.keccak256)(this.encodeData(T,o))}encode(T){return this.encodeData(this.primaryType,T)}hash(T){return this.hashStruct(this.primaryType,T)}_visit(T,o,h){if(G(T))return h(T,o);const w=T.match(/^(.*)(\x5b(\d*)\x5d)$/);if(w){const R=w[1],V=parseInt(w[3]);return V>=0&&o.length!==V&&p.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o),o.map(H=>this._visit(R,H,h))}const I=this.types[T];return I?I.reduce((R,{name:V,type:H})=>(R[V]=this._visit(H,o[V],h),R),{}):p.throwArgumentError(`unknown type: ${T}`,"type",T)}visit(T,o){return this._visit(this.primaryType,T,o)}static from(T){return new j(T)}static getPrimaryType(T){return j.from(T).primaryType}static hashStruct(T,o,h){return j.from(o).hashStruct(T,h)}static hashDomain(T){const o=[];for(const h in T){const w=k[h];w||p.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(h)}`,"domain",T),o.push({name:h,type:w})}return o.sort((h,w)=>U.indexOf(h.name)-U.indexOf(w.name)),j.hashStruct("EIP712Domain",{EIP712Domain:o},T)}static encode(T,o,h){return(0,E.hexConcat)(["0x1901",j.hashDomain(T),j.from(o).hash(h)])}static hash(T,o,h){return(0,M.keccak256)(j.encode(T,o,h))}static resolveNames(T,o,h,w){return d(this,void 0,void 0,function*(){T=(0,s.shallowCopy)(T);const I={};T.verifyingContract&&!(0,E.isHexString)(T.verifyingContract,20)&&(I[T.verifyingContract]="0x");const R=j.from(o);R.visit(h,(V,H)=>("address"===V&&!(0,E.isHexString)(H,20)&&(I[H]="0x"),H));for(const V in I)I[V]=yield w(V);return T.verifyingContract&&I[T.verifyingContract]&&(T.verifyingContract=I[T.verifyingContract]),h=R.visit(h,(V,H)=>"address"===V&&I[H]?I[H]:H),{domain:T,value:h}})}static getPayload(T,o,h){j.hashDomain(T);const w={},I=[];U.forEach(H=>{const L=T[H];null!=L&&(w[H]=Y[H](L),I.push({name:H,type:k[H]}))});const R=j.from(o),V=(0,s.shallowCopy)(o);return V.EIP712Domain?p.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",o):V.EIP712Domain=I,R.encode(h),{types:V,domain:w,primaryType:R.primaryType,message:R.visit(h,(H,L)=>{if(H.match(/^bytes(\d*)/))return(0,E.hexlify)((0,E.arrayify)(L));if(H.match(/^u?int/))return v.O$.from(L).toString();switch(H){case"address":return L.toLowerCase();case"bool":return!!L;case"string":return"string"!=typeof L&&p.throwArgumentError("invalid string","value",L),L}return p.throwArgumentError("unsupported type","type",H)})}}}},21516:(q,n,u)=>{"use strict";u.r(n),u.d(n,{HDNode:()=>L,defaultPath:()=>H,entropyToMnemonic:()=>re,getAccountPath:()=>te,isValidMnemonic:()=>ne,mnemonicToEntropy:()=>B,mnemonicToSeed:()=>b});var l=u(45887),v=u(10499),E=u(52909),M=u(63544),s=u(44985),g=u(24325),y=u(33126),f=u(91871),d=u(55587),p=u(71474),m=u(66171),S=u(88666);const P=new S.Logger("wordlists/5.7.0");class x{constructor(ge){P.checkAbstract(new.target,x),(0,g.defineReadOnly)(this,"locale",ge)}split(ge){return ge.toLowerCase().split(/ +/g)}join(ge){return ge.join(" ")}static check(ge){const pe=[];for(let we=0;we<2048;we++){const ce=ge.getWord(we);if(we!==ge.getWordIndex(ce))return"0x";pe.push(ce)}return(0,m.id)(pe.join("\n")+"\n")}static register(ge,pe){pe||(pe=ge.locale),false}}const C="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let N=null;function k(ae){if(null==N&&(N=C.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==x.check(ae)))throw N=null,new Error("BIP39 Wordlist for en (English) FAILED")}const z=new class U extends x{constructor(){super("en")}getWord(ge){return k(this),N[ge]}getWordIndex(ge){return k(this),N.indexOf(ge)}};x.register(z);const Y={en:z},F=new S.Logger("hdnode/5.7.0"),j=E.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Z=(0,M.Y0)("Bitcoin seed"),T=2147483648;function o(ae){return(1<=256)throw new Error("Depth too large!");return I((0,v.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,v.hexlify)(this.depth),this.parentFingerprint,(0,v.hexZeroPad)((0,v.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,v.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new L(V,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(ge){if(ge>4294967295)throw new Error("invalid index - "+String(ge));let pe=this.path;pe&&(pe+="/"+(ge&~T));const we=new Uint8Array(37);if(ge&T){if(!this.privateKey)throw new Error("cannot derive child of neutered node");we.set((0,v.arrayify)(this.privateKey),1),pe&&(pe+="'")}else we.set((0,v.arrayify)(this.publicKey));for(let Re=24;Re>=0;Re-=8)we[33+(Re>>3)]=ge>>24-Re&255;const ce=(0,v.arrayify)((0,f.Gy)(d.p.sha512,this.chainCode,we)),le=ce.slice(0,32),ue=ce.slice(32);let fe=null,he=null;this.privateKey?fe=w(E.O$.from(le).add(this.privateKey).mod(j)):he=new y.SigningKey((0,v.hexlify)(le))._addPoint(this.publicKey);let Ae=pe;const Pe=this.mnemonic;return Pe&&(Ae=Object.freeze({phrase:Pe.phrase,path:pe,locale:Pe.locale||"en"})),new L(V,fe,he,this.fingerprint,w(ue),ge,this.depth+1,Ae)}derivePath(ge){const pe=ge.split("/");if(0===pe.length||"m"===pe[0]&&0!==this.depth)throw new Error("invalid path - "+ge);"m"===pe[0]&&pe.shift();let we=this;for(let ce=0;ce=T)throw new Error("invalid path index - "+le);we=we._derive(T+ue)}else{if(!le.match(/^[0-9]+$/))throw new Error("invalid path component - "+le);{const ue=parseInt(le);if(ue>=T)throw new Error("invalid path index - "+le);we=we._derive(ue)}}}return we}static _fromSeed(ge,pe){const we=(0,v.arrayify)(ge);if(we.length<16||we.length>64)throw new Error("invalid seed");const ce=(0,v.arrayify)((0,f.Gy)(d.p.sha512,Z,we));return new L(V,w(ce.slice(0,32)),null,"0x00000000",w(ce.slice(32)),0,0,pe)}static fromMnemonic(ge,pe,we){return ge=re(B(ge,we=R(we)),we),L._fromSeed(b(ge,pe),{phrase:ge,path:"m",locale:we.locale})}static fromSeed(ge){return L._fromSeed(ge,null)}static fromExtendedKey(ge){const pe=l.Base58.decode(ge);(82!==pe.length||I(pe.slice(0,78))!==ge)&&F.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const we=pe[4],ce=(0,v.hexlify)(pe.slice(5,9)),le=parseInt((0,v.hexlify)(pe.slice(9,13)).substring(2),16),ue=(0,v.hexlify)(pe.slice(13,45)),fe=pe.slice(45,78);switch((0,v.hexlify)(pe.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new L(V,null,(0,v.hexlify)(fe),ce,ue,le,we,null);case"0x0488ade4":case"0x04358394 ":if(0!==fe[0])break;return new L(V,(0,v.hexlify)(fe.slice(1)),null,ce,ue,le,we,null)}return F.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function b(ae,ge){ge||(ge="");const pe=(0,M.Y0)("mnemonic"+ge,M.Uj.NFKD);return(0,s.n)((0,M.Y0)(ae,M.Uj.NFKD),pe,2048,64,"sha512")}function B(ae,ge){ge=R(ge),F.checkNormalize();const pe=ge.split(ae);if(pe.length%3!=0)throw new Error("invalid mnemonic");const we=(0,v.arrayify)(new Uint8Array(Math.ceil(11*pe.length/8)));let ce=0;for(let Ae=0;Ae>3]|=1<<7-ce%8),ce++}const le=32*pe.length/3,fe=o(pe.length/3);if(((0,v.arrayify)((0,f.JQ)(we.slice(0,le/8)))[0]&fe)!=(we[we.length-1]&fe))throw new Error("invalid checksum");return(0,v.hexlify)(we.slice(0,le/8))}function re(ae,ge){if(ge=R(ge),(ae=(0,v.arrayify)(ae)).length%4!=0||ae.length<16||ae.length>32)throw new Error("invalid entropy");const pe=[0];let we=11;for(let ue=0;ue8?(pe[pe.length-1]<<=8,pe[pe.length-1]|=ae[ue],we-=8):(pe[pe.length-1]<<=we,pe[pe.length-1]|=ae[ue]>>8-we,pe.push(ae[ue]&h(8-we)),we+=3);const ce=ae.length/4,le=(0,v.arrayify)((0,f.JQ)(ae))[0]&o(ce);return pe[pe.length-1]<<=ce,pe[pe.length-1]|=le>>8-ce,ge.join(pe.map(ue=>ge.getWord(ue)))}function ne(ae,ge){try{return B(ae,ge),!0}catch{}return!1}function te(ae){return("number"!=typeof ae||ae<0||ae>=T||ae%1)&&F.throwArgumentError("invalid account index","index",ae),`m/44'/60'/${ae}'/0/0`}},43204:(q,n,u)=>{"use strict";u.d(n,{i:()=>l});const l="json-wallets/5.7.0"},27591:(q,n,u)=>{"use strict";u.r(n),u.d(n,{decryptCrowdsale:()=>D,decryptJsonWallet:()=>k,decryptJsonWalletSync:()=>U,decryptKeystore:()=>N.pe,decryptKeystoreSync:()=>N.hb,encryptKeystore:()=>N.HI,getJsonWalletAddress:()=>C,isCrowdsaleWallet:()=>P,isKeystoreWallet:()=>x});var l=u(90240),v=u.n(l),E=u(28016),M=u(10499),s=u(92547),g=u(44985),y=u(63544),f=u(24325),d=u(88666),p=u(43204),m=u(79266);const S=new d.Logger(p.i);class _ extends f.Description{isCrowdsaleAccount(Y){return!(!Y||!Y._isCrowdsaleAccount)}}function D(z,Y){const G=JSON.parse(z);Y=(0,m.Ij)(Y);const F=(0,E.getAddress)((0,m.gx)(G,"ethaddr")),j=(0,m.p3)((0,m.gx)(G,"encseed"));(!j||j.length%16!=0)&&S.throwArgumentError("invalid encseed","json",z);const Z=(0,M.arrayify)((0,g.n)(Y,Y,2e3,32,"sha256")).slice(0,16),T=j.slice(0,16),o=j.slice(16),h=new(v().ModeOfOperation.cbc)(Z,T),w=v().padding.pkcs7.strip((0,M.arrayify)(h.decrypt(o)));let I="";for(let H=0;H{"use strict";u.d(n,{HI:()=>T,hb:()=>j,pe:()=>Z});var l=u(90240),v=u.n(l),E=u(62708),M=u.n(E),s=u(28016),g=u(10499),y=u(21516),f=u(92547),d=u(44985),p=u(41928),m=u(24325),S=u(71474),_=u(79266),D=u(88666),P=u(43204),x=function(o,h,w,I){return new(w||(w=Promise))(function(V,H){function L(re){try{B(I.next(re))}catch(ne){H(ne)}}function b(re){try{B(I.throw(re))}catch(ne){H(ne)}}function B(re){re.done?V(re.value):function R(V){return V instanceof w?V:new w(function(H){H(V)})}(re.value).then(L,b)}B((I=I.apply(o,h||[])).next())})};const C=new D.Logger(P.i);function N(o){return null!=o&&o.mnemonic&&o.mnemonic.phrase}class k extends m.Description{isKeystoreAccount(h){return!(!h||!h._isKeystoreAccount)}}function z(o,h){const w=(0,_.p3)((0,_.gx)(o,"crypto/ciphertext"));if((0,g.hexlify)((0,f.keccak256)((0,g.concat)([h.slice(16,32),w]))).substring(2)!==(0,_.gx)(o,"crypto/mac").toLowerCase())throw new Error("invalid password");const R=function U(o,h,w){if("aes-128-ctr"===(0,_.gx)(o,"crypto/cipher")){const R=(0,_.p3)((0,_.gx)(o,"crypto/cipherparams/iv")),V=new(v().Counter)(R),H=new(v().ModeOfOperation.ctr)(h,V);return(0,g.arrayify)(H.decrypt(w))}return null}(o,h.slice(0,16),w);R||C.throwError("unsupported cipher",D.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const V=h.slice(32,64),H=(0,S.computeAddress)(R);if(o.address){let b=o.address.toLowerCase();if("0x"!==b.substring(0,2)&&(b="0x"+b),(0,s.getAddress)(b)!==H)throw new Error("address mismatch")}const L={_isKeystoreAccount:!0,address:H,privateKey:(0,g.hexlify)(R)};if("0.1"===(0,_.gx)(o,"x-ethers/version")){const b=(0,_.p3)((0,_.gx)(o,"x-ethers/mnemonicCiphertext")),B=(0,_.p3)((0,_.gx)(o,"x-ethers/mnemonicCounter")),re=new(v().Counter)(B),ne=new(v().ModeOfOperation.ctr)(V,re),te=(0,_.gx)(o,"x-ethers/path")||y.defaultPath,ae=(0,_.gx)(o,"x-ethers/locale")||"en",ge=(0,g.arrayify)(ne.decrypt(b));try{const pe=(0,y.entropyToMnemonic)(ge,ae),we=y.HDNode.fromMnemonic(pe,null,ae).derivePath(te);if(we.privateKey!=L.privateKey)throw new Error("mnemonic mismatch");L.mnemonic=we.mnemonic}catch(pe){if(pe.code!==D.Logger.errors.INVALID_ARGUMENT||"wordlist"!==pe.argument)throw pe}}return new k(L)}function Y(o,h,w,I,R){return(0,g.arrayify)((0,d.n)(o,h,w,I,R))}function G(o,h,w,I,R){return Promise.resolve(Y(o,h,w,I,R))}function F(o,h,w,I,R){const V=(0,_.Ij)(h),H=(0,_.gx)(o,"crypto/kdf");if(H&&"string"==typeof H){const L=function(b,B){return C.throwArgumentError("invalid key-derivation function parameters",b,B)};if("scrypt"===H.toLowerCase()){const b=(0,_.p3)((0,_.gx)(o,"crypto/kdfparams/salt")),B=parseInt((0,_.gx)(o,"crypto/kdfparams/n")),re=parseInt((0,_.gx)(o,"crypto/kdfparams/r")),ne=parseInt((0,_.gx)(o,"crypto/kdfparams/p"));(!B||!re||!ne)&&L("kdf",H),B&B-1&&L("N",B);const te=parseInt((0,_.gx)(o,"crypto/kdfparams/dklen"));return 32!==te&&L("dklen",te),I(V,b,B,re,ne,64,R)}if("pbkdf2"===H.toLowerCase()){const b=(0,_.p3)((0,_.gx)(o,"crypto/kdfparams/salt"));let B=null;const re=(0,_.gx)(o,"crypto/kdfparams/prf");"hmac-sha256"===re?B="sha256":"hmac-sha512"===re?B="sha512":L("prf",re);const ne=parseInt((0,_.gx)(o,"crypto/kdfparams/c")),te=parseInt((0,_.gx)(o,"crypto/kdfparams/dklen"));return 32!==te&&L("dklen",te),w(V,b,ne,te,B)}}return C.throwArgumentError("unsupported key-derivation function","kdf",H)}function j(o,h){const w=JSON.parse(o);return z(w,F(w,h,Y,M().syncScrypt))}function Z(o,h,w){return x(this,void 0,void 0,function*(){const I=JSON.parse(o);return z(I,yield F(I,h,G,M().scrypt,w))})}function T(o,h,w,I){try{if((0,s.getAddress)(o.address)!==(0,S.computeAddress)(o.privateKey))throw new Error("address/privateKey mismatch");if(N(o)){const we=o.mnemonic;if(y.HDNode.fromMnemonic(we.phrase,null,we.locale).derivePath(we.path||y.defaultPath).privateKey!=o.privateKey)throw new Error("mnemonic mismatch")}}catch(we){return Promise.reject(we)}"function"==typeof w&&!I&&(I=w,w={}),w||(w={});const R=(0,g.arrayify)(o.privateKey),V=(0,_.Ij)(h);let H=null,L=null,b=null;if(N(o)){const we=o.mnemonic;H=(0,g.arrayify)((0,y.mnemonicToEntropy)(we.phrase,we.locale||"en")),L=we.path||y.defaultPath,b=we.locale||"en"}let B=w.client;B||(B="ethers.js");let re=null;re=w.salt?(0,g.arrayify)(w.salt):(0,p.O)(32);let ne=null;if(w.iv){if(ne=(0,g.arrayify)(w.iv),16!==ne.length)throw new Error("invalid iv")}else ne=(0,p.O)(16);let te=null;if(w.uuid){if(te=(0,g.arrayify)(w.uuid),16!==te.length)throw new Error("invalid uuid")}else te=(0,p.O)(16);let ae=1<<17,ge=8,pe=1;return w.scrypt&&(w.scrypt.N&&(ae=w.scrypt.N),w.scrypt.r&&(ge=w.scrypt.r),w.scrypt.p&&(pe=w.scrypt.p)),M().scrypt(V,re,ae,ge,pe,64,I).then(we=>{const ce=(we=(0,g.arrayify)(we)).slice(0,16),le=we.slice(16,32),ue=we.slice(32,64),fe=new(v().Counter)(ne),he=new(v().ModeOfOperation.ctr)(ce,fe),Ae=(0,g.arrayify)(he.encrypt(R)),Pe=(0,f.keccak256)((0,g.concat)([le,Ae])),Re={address:o.address.substring(2).toLowerCase(),id:(0,_.EH)(te),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,g.hexlify)(ne).substring(2)},ciphertext:(0,g.hexlify)(Ae).substring(2),kdf:"scrypt",kdfparams:{salt:(0,g.hexlify)(re).substring(2),n:ae,dklen:32,p:pe,r:ge},mac:Pe.substring(2)}};if(H){const ot=(0,p.O)(16),nt=new(v().Counter)(ot),Ye=new(v().ModeOfOperation.ctr)(ue,nt),It=(0,g.arrayify)(Ye.encrypt(H)),st=new Date,He=st.getUTCFullYear()+"-"+(0,_.VP)(st.getUTCMonth()+1,2)+"-"+(0,_.VP)(st.getUTCDate(),2)+"T"+(0,_.VP)(st.getUTCHours(),2)+"-"+(0,_.VP)(st.getUTCMinutes(),2)+"-"+(0,_.VP)(st.getUTCSeconds(),2)+".0Z";Re["x-ethers"]={client:B,gethFilename:"UTC--"+He+"--"+Re.address,mnemonicCounter:(0,g.hexlify)(ot).substring(2),mnemonicCiphertext:(0,g.hexlify)(It).substring(2),path:L,locale:b,version:"0.1"}}return JSON.stringify(Re)})}},79266:(q,n,u)=>{"use strict";u.d(n,{EH:()=>y,Ij:()=>s,VP:()=>M,gx:()=>g,p3:()=>E});var l=u(10499),v=u(63544);function E(f){return"string"==typeof f&&"0x"!==f.substring(0,2)&&(f="0x"+f),(0,l.arrayify)(f)}function M(f,d){for(f=String(f);f.length{"use strict";u.r(n),u.d(n,{keccak256:()=>M});var l=u(54237),v=u.n(l),E=u(10499);function M(s){return"0x"+v().keccak_256((0,E.arrayify)(s))}},88666:(q,n,u)=>{"use strict";u.r(n),u.d(n,{ErrorCode:()=>p,LogLevel:()=>d,Logger:()=>S});let v=!1,E=!1;const M={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=M.default,g=null;const f=function y(){try{const _=[];if(["NFD","NFC","NFKD","NFKC"].forEach(D=>{try{if("test"!=="test".normalize(D))throw new Error("bad normalize")}catch{_.push(D)}}),_.length)throw new Error("missing "+_.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(_){return _.message}return null}();var d,_,p;(_=d||(d={})).DEBUG="DEBUG",_.INFO="INFO",_.WARNING="WARNING",_.ERROR="ERROR",_.OFF="OFF",function(_){_.UNKNOWN_ERROR="UNKNOWN_ERROR",_.NOT_IMPLEMENTED="NOT_IMPLEMENTED",_.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",_.NETWORK_ERROR="NETWORK_ERROR",_.SERVER_ERROR="SERVER_ERROR",_.TIMEOUT="TIMEOUT",_.BUFFER_OVERRUN="BUFFER_OVERRUN",_.NUMERIC_FAULT="NUMERIC_FAULT",_.MISSING_NEW="MISSING_NEW",_.INVALID_ARGUMENT="INVALID_ARGUMENT",_.MISSING_ARGUMENT="MISSING_ARGUMENT",_.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",_.CALL_EXCEPTION="CALL_EXCEPTION",_.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",_.NONCE_EXPIRED="NONCE_EXPIRED",_.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",_.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",_.TRANSACTION_REPLACED="TRANSACTION_REPLACED",_.ACTION_REJECTED="ACTION_REJECTED"}(p||(p={}));const m="0123456789abcdef";class S{constructor(D){Object.defineProperty(this,"version",{enumerable:!0,value:D,writable:!1})}_log(D,P){const x=D.toLowerCase();null==M[x]&&this.throwArgumentError("invalid log level name","logLevel",D),!(s>M[x])&&console.log.apply(console,P)}debug(...D){this._log(S.levels.DEBUG,D)}info(...D){this._log(S.levels.INFO,D)}warn(...D){this._log(S.levels.WARNING,D)}makeError(D,P,x){if(E)return this.makeError("censored error",P,{});P||(P=S.errors.UNKNOWN_ERROR),x||(x={});const C=[];Object.keys(x).forEach(z=>{const Y=x[z];try{if(Y instanceof Uint8Array){let G="";for(let F=0;F>4],G+=m[15&Y[F]];C.push(z+"=Uint8Array(0x"+G+")")}else C.push(z+"="+JSON.stringify(Y))}catch{C.push(z+"="+JSON.stringify(x[z].toString()))}}),C.push(`code=${P}`),C.push(`version=${this.version}`);const N=D;let k="";switch(P){case p.NUMERIC_FAULT:{k="NUMERIC_FAULT";const z=D;switch(z){case"overflow":case"underflow":case"division-by-zero":k+="-"+z;break;case"negative-power":case"negative-width":k+="-unsupported";break;case"unbound-bitwise-result":k+="-unbound-result"}break}case p.CALL_EXCEPTION:case p.INSUFFICIENT_FUNDS:case p.MISSING_NEW:case p.NONCE_EXPIRED:case p.REPLACEMENT_UNDERPRICED:case p.TRANSACTION_REPLACED:case p.UNPREDICTABLE_GAS_LIMIT:k=P}k&&(D+=" [ See: https://links.ethers.org/v5-errors-"+k+" ]"),C.length&&(D+=" ("+C.join(", ")+")");const U=new Error(D);return U.reason=N,U.code=P,Object.keys(x).forEach(function(z){U[z]=x[z]}),U}throwError(D,P,x){throw this.makeError(D,P,x)}throwArgumentError(D,P,x){return this.throwError(D,S.errors.INVALID_ARGUMENT,{argument:P,value:x})}assert(D,P,x,C){D||this.throwError(P,x,C)}assertArgument(D,P,x,C){D||this.throwArgumentError(P,x,C)}checkNormalize(D){null==D&&(D="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",S.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(D,P){"number"==typeof D&&(null==P&&(P="value not safe"),(D<0||D>=9007199254740991)&&this.throwError(P,S.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:D}),D%1&&this.throwError(P,S.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:D}))}checkArgumentCount(D,P,x){x=x?": "+x:"",DP&&this.throwError("too many arguments"+x,S.errors.UNEXPECTED_ARGUMENT,{count:D,expectedCount:P})}checkNew(D,P){(D===Object||null==D)&&this.throwError("missing new",S.errors.MISSING_NEW,{name:P.name})}checkAbstract(D,P){D===P?this.throwError("cannot instantiate abstract class "+JSON.stringify(P.name)+" directly; use a sub-class",S.errors.UNSUPPORTED_OPERATION,{name:D.name,operation:"new"}):(D===Object||null==D)&&this.throwError("missing new",S.errors.MISSING_NEW,{name:P.name})}static globalLogger(){return g||(g=new S("logger/5.7.0")),g}static setCensorship(D,P){if(!D&&P&&this.globalLogger().throwError("cannot permanently disable censorship",S.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),v){if(!D)return;this.globalLogger().throwError("error censorship permanent",S.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}E=!!D,v=!!P}static setLogLevel(D){const P=M[D.toLowerCase()];null!=P?s=P:S.globalLogger().warn("invalid log level - "+D)}static from(D){return new S(D)}}S.errors=p,S.levels=d},44985:(q,n,u)=>{"use strict";u.d(n,{n:()=>E});var l=u(10499),v=u(91871);function E(M,s,g,y,f){M=(0,l.arrayify)(M),s=(0,l.arrayify)(s);let d,p=1;const m=new Uint8Array(y),S=new Uint8Array(s.length+4);let _,D;S.set(s);for(let P=1;P<=p;P++){S[s.length]=P>>24&255,S[s.length+1]=P>>16&255,S[s.length+2]=P>>8&255,S[s.length+3]=255&P;let x=(0,l.arrayify)((0,v.Gy)(f,M,S));d||(d=x.length,D=new Uint8Array(d),p=Math.ceil(y/d),_=y-(p-1)*d),D.set(x);for(let k=1;k{"use strict";u.r(n),u.d(n,{Description:()=>D,checkProperties:()=>f,deepCopy:()=>_,defineReadOnly:()=>s,getStatic:()=>g,resolveProperties:()=>y,shallowCopy:()=>d});var l=u(88666);var E=function(P,x,C,N){return new(C||(C=Promise))(function(U,z){function Y(j){try{F(N.next(j))}catch(Z){z(Z)}}function G(j){try{F(N.throw(j))}catch(Z){z(Z)}}function F(j){j.done?U(j.value):function k(U){return U instanceof C?U:new C(function(z){z(U)})}(j.value).then(Y,G)}F((N=N.apply(P,x||[])).next())})};const M=new l.Logger("properties/5.7.0");function s(P,x,C){Object.defineProperty(P,x,{enumerable:!0,value:C,writable:!1})}function g(P,x){for(let C=0;C<32;C++){if(P[x])return P[x];if(!P.prototype||"object"!=typeof P.prototype)break;P=Object.getPrototypeOf(P.prototype).constructor}return null}function y(P){return E(this,void 0,void 0,function*(){const x=Object.keys(P).map(N=>{const k=P[N];return Promise.resolve(k).then(U=>({key:N,value:U}))});return(yield Promise.all(x)).reduce((N,k)=>(N[k.key]=k.value,N),{})})}function f(P,x){(!P||"object"!=typeof P)&&M.throwArgumentError("invalid object","object",P),Object.keys(P).forEach(C=>{x[C]||M.throwArgumentError("invalid object key - "+C,"transaction:"+C,P)})}function d(P){const x={};for(const C in P)x[C]=P[C];return x}const p={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function m(P){if(null==P||p[typeof P])return!0;if(Array.isArray(P)||"object"==typeof P){if(!Object.isFrozen(P))return!1;const x=Object.keys(P);for(let C=0;C_(x)));if("object"==typeof P){const x={};for(const C in P){const N=P[C];void 0!==N&&s(x,C,_(N))}return x}return M.throwArgumentError("Cannot deepCopy "+typeof P,"object",P)}function _(P){return S(P)}class D{constructor(x){for(const C in x)this[C]=_(x[C])}}},34709:(q,n,u)=>{"use strict";u.r(n),u.d(n,{randomBytes:()=>l.O,shuffled:()=>v});var l=u(41928);function v(E){for(let M=(E=E.slice()).length-1;M>0;M--){const s=Math.floor(Math.random()*(M+1)),g=E[M];E[M]=E[s],E[s]=g}return E}},41928:(q,n,u)=>{"use strict";u.d(n,{O:()=>f});var l=u(10499),v=u(88666);const M=new v.Logger("random/5.7.0");const g=function s(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();let y=g.crypto||g.msCrypto;function f(d){(d<=0||d>1024||d%1||d!=d)&&M.throwArgumentError("invalid length","length",d);const p=new Uint8Array(d);return y.getRandomValues(p),(0,l.arrayify)(p)}(!y||!y.getRandomValues)&&(M.warn("WARNING: Missing strong random number source"),y={getRandomValues:function(d){return M.throwError("no secure random source avaialble",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},70810:(q,n,u)=>{"use strict";u.r(n),u.d(n,{decode:()=>m,encode:()=>f});var l=u(10499),v=u(88666);const M=new v.Logger("rlp/5.7.0");function s(S){const _=[];for(;S;)_.unshift(255&S),S>>=8;return _}function g(S,_,D){let P=0;for(let x=0;x_+1+P&&M.throwError("child data too short",v.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+P,result:x}}function p(S,_){if(0===S.length&&M.throwError("data too short",v.Logger.errors.BUFFER_OVERRUN,{}),S[_]>=248){const D=S[_]-247;_+1+D>S.length&&M.throwError("data short segment too short",v.Logger.errors.BUFFER_OVERRUN,{});const P=g(S,_+1,D);return _+1+D+P>S.length&&M.throwError("data long segment too short",v.Logger.errors.BUFFER_OVERRUN,{}),d(S,_,_+1+D,D+P)}if(S[_]>=192){const D=S[_]-192;return _+1+D>S.length&&M.throwError("data array too short",v.Logger.errors.BUFFER_OVERRUN,{}),d(S,_,_+1,D)}if(S[_]>=184){const D=S[_]-183;_+1+D>S.length&&M.throwError("data array too short",v.Logger.errors.BUFFER_OVERRUN,{});const P=g(S,_+1,D);_+1+D+P>S.length&&M.throwError("data array too short",v.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+D+P,result:(0,l.hexlify)(S.slice(_+1+D,_+1+D+P))}}if(S[_]>=128){const D=S[_]-128;_+1+D>S.length&&M.throwError("data too short",v.Logger.errors.BUFFER_OVERRUN,{});return{consumed:1+D,result:(0,l.hexlify)(S.slice(_+1,_+1+D))}}return{consumed:1,result:(0,l.hexlify)(S[_])}}function m(S){const _=(0,l.arrayify)(S),D=p(_,0);return D.consumed!==_.length&&M.throwArgumentError("invalid rlp data","data",S),D.result}},42973:(q,n,u)=>{"use strict";u.r(n),u.d(n,{SupportedAlgorithm:()=>v.p,computeHmac:()=>l.Gy,ripemd160:()=>l.bP,sha256:()=>l.JQ,sha512:()=>l.o});var l=u(91871),v=u(55587)},91871:(q,n,u)=>{"use strict";u.d(n,{Gy:()=>m,bP:()=>f,JQ:()=>d,o:()=>p});var l=u(37084),v=u.n(l),E=u(10499),M=u(55587),s=u(88666);const y=new s.Logger("sha2/5.7.0");function f(S){return"0x"+v().ripemd160().update((0,E.arrayify)(S)).digest("hex")}function d(S){return"0x"+v().sha256().update((0,E.arrayify)(S)).digest("hex")}function p(S){return"0x"+v().sha512().update((0,E.arrayify)(S)).digest("hex")}function m(S,_,D){return M.p[S]||y.throwError("unsupported algorithm "+S,s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:S}),"0x"+v().hmac(v()[S],(0,E.arrayify)(_)).update((0,E.arrayify)(D)).digest("hex")}},55587:(q,n,u)=>{"use strict";var l,v;u.d(n,{p:()=>l}),(v=l||(l={})).sha256="sha256",v.sha512="sha512"},33126:(q,n,u)=>{"use strict";u.r(n),u.d(n,{SigningKey:()=>Ye,computePublicKey:()=>st,recoverPublicKey:()=>It});var l=u(98538),v=u.n(l),E=u(37084),M=u.n(E);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function y(He,ze,Be){return He(Be={path:ze,exports:{},require:function(Ze,ut){return function m(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(ut??Be.path)}},Be.exports),Be.exports}var S=_;function _(He,ze){if(!He)throw new Error(ze||"Assertion failed")}_.equal=function(ze,Be,Ze){if(ze!=Be)throw new Error(Ze||"Assertion failed: "+ze+" != "+Be)};var D=y(function(He,ze){var Be=ze;function ut(ve){return 1===ve.length?"0"+ve:ve}function Me(ve){for(var xe="",je=0;je>8,ke=255&Qe;ye?je.push(ye,ke):je.push(ke)}return je},Be.zero2=ut,Be.toHex=Me,Be.encode=function(xe,je){return"hex"===je?Me(xe):xe}}),P=y(function(He,ze){var Be=ze;Be.assert=S,Be.toArray=D.toArray,Be.zero2=D.zero2,Be.toHex=D.toHex,Be.encode=D.encode,Be.getNAF=function Ze(je,Ge,Qe){var ye=new Array(Math.max(je.bitLength(),Qe)+1);ye.fill(0);for(var ke=1<(ke>>1)-1?(ke>>1)-bt:bt,et.isubn(at)):at=0,ye[qe]=at,et.iushrn(1)}return ye},Be.getJSF=function ut(je,Ge){var Qe=[[],[]];je=je.clone(),Ge=Ge.clone();for(var et,ye=0,ke=0;je.cmpn(-ye)>0||Ge.cmpn(-ke)>0;){var bt,pt,qe=je.andln(3)+ye&3,at=Ge.andln(3)+ke&3;3===qe&&(qe=-1),3===at&&(at=-1),1&qe?bt=3!==(et=je.andln(7)+ye&7)&&5!==et||2!==at?qe:-qe:bt=0,Qe[0].push(bt),1&at?pt=3!==(et=Ge.andln(7)+ke&7)&&5!==et||2!==qe?at:-at:pt=0,Qe[1].push(pt),2*ye===bt+1&&(ye=1-ye),2*ke===pt+1&&(ke=1-ke),je.iushrn(1),Ge.iushrn(1)}return Qe},Be.cachedProperty=function Me(je,Ge,Qe){var ye="_"+Ge;je.prototype[Ge]=function(){return void 0!==this[ye]?this[ye]:this[ye]=Qe.call(this)}},Be.parseBytes=function ve(je){return"string"==typeof je?Be.toArray(je,"hex"):je},Be.intFromLE=function xe(je){return new(v())(je,"hex","le")}}),x=P.getNAF,C=P.getJSF,N=P.assert;function k(He,ze){this.type=He,this.p=new(v())(ze.p,16),this.red=ze.prime?v().red(ze.prime):v().mont(this.p),this.zero=new(v())(0).toRed(this.red),this.one=new(v())(1).toRed(this.red),this.two=new(v())(2).toRed(this.red),this.n=ze.n&&new(v())(ze.n,16),this.g=ze.g&&this.pointFromJSON(ze.g,ze.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var Be=this.n&&this.p.div(this.n);!Be||Be.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var U=k;function z(He,ze){this.curve=He,this.type=ze,this.precomputed=null}k.prototype.point=function(){throw new Error("Not implemented")},k.prototype.validate=function(){throw new Error("Not implemented")},k.prototype._fixedNafMul=function(ze,Be){N(ze.precomputed);var Ze=ze._getDoubles(),ut=x(Be,1,this._bitLength),Me=(1<=xe;Ge--)je=(je<<1)+ut[Ge];ve.push(je)}for(var Qe=this.jpoint(null,null,null),ye=this.jpoint(null,null,null),ke=Me;ke>0;ke--){for(xe=0;xe=0;je--){for(var Ge=0;je>=0&&0===ve[je];je--)Ge++;if(je>=0&&Ge++,xe=xe.dblp(Ge),je<0)break;var Qe=ve[je];N(0!==Qe),xe="affine"===ze.type?Qe>0?xe.mixedAdd(Me[Qe-1>>1]):xe.mixedAdd(Me[-Qe-1>>1].neg()):Qe>0?xe.add(Me[Qe-1>>1]):xe.add(Me[-Qe-1>>1].neg())}return"affine"===ze.type?xe.toP():xe},k.prototype._wnafMulAdd=function(ze,Be,Ze,ut,Me){var Qe,ye,ke,ve=this._wnafT1,xe=this._wnafT2,je=this._wnafT3,Ge=0;for(Qe=0;Qe=1;Qe-=2){var qe=Qe-1,at=Qe;if(1===ve[qe]&&1===ve[at]){var bt=[Be[qe],null,null,Be[at]];0===Be[qe].y.cmp(Be[at].y)?(bt[1]=Be[qe].add(Be[at]),bt[2]=Be[qe].toJ().mixedAdd(Be[at].neg())):0===Be[qe].y.cmp(Be[at].y.redNeg())?(bt[1]=Be[qe].toJ().mixedAdd(Be[at]),bt[2]=Be[qe].add(Be[at].neg())):(bt[1]=Be[qe].toJ().mixedAdd(Be[at]),bt[2]=Be[qe].toJ().mixedAdd(Be[at].neg()));var pt=[-3,-1,-5,-7,0,7,5,1,3],xt=C(Ze[qe],Ze[at]);for(Ge=Math.max(xt[0].length,Ge),je[qe]=new Array(Ge),je[at]=new Array(Ge),ye=0;ye=0;Qe--){for(var Tt=0;Qe>=0;){var Pt=!0;for(ye=0;ye=0&&Tt++,Ot=Ot.dblp(Tt),Qe<0)break;for(ye=0;ye0?ke=xe[ye][Hn-1>>1]:Hn<0&&(ke=xe[ye][-Hn-1>>1].neg()),Ot="affine"===ke.type?Ot.mixedAdd(ke):Ot.add(ke))}}for(Qe=0;Qe=Math.ceil((ze.bitLength()+1)/Be.step)},z.prototype._getDoubles=function(ze,Be){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Ze=[this],ut=this,Me=0;Me=0&&(et=Ge,qe=Qe),ye.negative&&(ye=ye.neg(),ke=ke.neg()),et.negative&&(et=et.neg(),qe=qe.neg()),[{a:ye,b:ke},{a:et,b:qe}]},F.prototype._endoSplit=function(ze){var Be=this.endo.basis,Ze=Be[0],ut=Be[1],Me=ut.b.mul(ze).divRound(this.n),ve=Ze.b.neg().mul(ze).divRound(this.n),xe=Me.mul(Ze.a),je=ve.mul(ut.a),Ge=Me.mul(Ze.b),Qe=ve.mul(ut.b);return{k1:ze.sub(xe).sub(je),k2:Ge.add(Qe).neg()}},F.prototype.pointFromX=function(ze,Be){(ze=new(v())(ze,16)).red||(ze=ze.toRed(this.red));var Ze=ze.redSqr().redMul(ze).redIAdd(ze.redMul(this.a)).redIAdd(this.b),ut=Ze.redSqrt();if(0!==ut.redSqr().redSub(Ze).cmp(this.zero))throw new Error("invalid point");var Me=ut.fromRed().isOdd();return(Be&&!Me||!Be&&Me)&&(ut=ut.redNeg()),this.point(ze,ut)},F.prototype.validate=function(ze){if(ze.inf)return!0;var Be=ze.x,Ze=ze.y,ut=this.a.redMul(Be),Me=Be.redSqr().redMul(Be).redIAdd(ut).redIAdd(this.b);return 0===Ze.redSqr().redISub(Me).cmpn(0)},F.prototype._endoWnafMulAdd=function(ze,Be,Ze){for(var ut=this._endoWnafT1,Me=this._endoWnafT2,ve=0;ve":""},Z.prototype.isInfinity=function(){return this.inf},Z.prototype.add=function(ze){if(this.inf)return ze;if(ze.inf)return this;if(this.eq(ze))return this.dbl();if(this.neg().eq(ze))return this.curve.point(null,null);if(0===this.x.cmp(ze.x))return this.curve.point(null,null);var Be=this.y.redSub(ze.y);0!==Be.cmpn(0)&&(Be=Be.redMul(this.x.redSub(ze.x).redInvm()));var Ze=Be.redSqr().redISub(this.x).redISub(ze.x),ut=Be.redMul(this.x.redSub(Ze)).redISub(this.y);return this.curve.point(Ze,ut)},Z.prototype.dbl=function(){if(this.inf)return this;var ze=this.y.redAdd(this.y);if(0===ze.cmpn(0))return this.curve.point(null,null);var Be=this.curve.a,Ze=this.x.redSqr(),ut=ze.redInvm(),Me=Ze.redAdd(Ze).redIAdd(Ze).redIAdd(Be).redMul(ut),ve=Me.redSqr().redISub(this.x.redAdd(this.x)),xe=Me.redMul(this.x.redSub(ve)).redISub(this.y);return this.curve.point(ve,xe)},Z.prototype.getX=function(){return this.x.fromRed()},Z.prototype.getY=function(){return this.y.fromRed()},Z.prototype.mul=function(ze){return ze=new(v())(ze,16),this.isInfinity()?this:this._hasDoubles(ze)?this.curve._fixedNafMul(this,ze):this.curve.endo?this.curve._endoWnafMulAdd([this],[ze]):this.curve._wnafMul(this,ze)},Z.prototype.mulAdd=function(ze,Be,Ze){var ut=[this,Be],Me=[ze,Ze];return this.curve.endo?this.curve._endoWnafMulAdd(ut,Me):this.curve._wnafMulAdd(1,ut,Me,2)},Z.prototype.jmulAdd=function(ze,Be,Ze){var ut=[this,Be],Me=[ze,Ze];return this.curve.endo?this.curve._endoWnafMulAdd(ut,Me,!0):this.curve._wnafMulAdd(1,ut,Me,2,!0)},Z.prototype.eq=function(ze){return this===ze||this.inf===ze.inf&&(this.inf||0===this.x.cmp(ze.x)&&0===this.y.cmp(ze.y))},Z.prototype.neg=function(ze){if(this.inf)return this;var Be=this.curve.point(this.x,this.y.redNeg());if(ze&&this.precomputed){var Ze=this.precomputed,ut=function(Me){return Me.neg()};Be.precomputed={naf:Ze.naf&&{wnd:Ze.naf.wnd,points:Ze.naf.points.map(ut)},doubles:Ze.doubles&&{step:Ze.doubles.step,points:Ze.doubles.points.map(ut)}}}return Be},Z.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Y(T,U.BasePoint),F.prototype.jpoint=function(ze,Be,Ze){return new T(this,ze,Be,Ze)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var ze=this.z.redInvm(),Be=ze.redSqr(),Ze=this.x.redMul(Be),ut=this.y.redMul(Be).redMul(ze);return this.curve.point(Ze,ut)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(ze){if(this.isInfinity())return ze;if(ze.isInfinity())return this;var Be=ze.z.redSqr(),Ze=this.z.redSqr(),ut=this.x.redMul(Be),Me=ze.x.redMul(Ze),ve=this.y.redMul(Be.redMul(ze.z)),xe=ze.y.redMul(Ze.redMul(this.z)),je=ut.redSub(Me),Ge=ve.redSub(xe);if(0===je.cmpn(0))return 0!==Ge.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Qe=je.redSqr(),ye=Qe.redMul(je),ke=ut.redMul(Qe),et=Ge.redSqr().redIAdd(ye).redISub(ke).redISub(ke),qe=Ge.redMul(ke.redISub(et)).redISub(ve.redMul(ye)),at=this.z.redMul(ze.z).redMul(je);return this.curve.jpoint(et,qe,at)},T.prototype.mixedAdd=function(ze){if(this.isInfinity())return ze.toJ();if(ze.isInfinity())return this;var Be=this.z.redSqr(),Ze=this.x,ut=ze.x.redMul(Be),Me=this.y,ve=ze.y.redMul(Be).redMul(this.z),xe=Ze.redSub(ut),je=Me.redSub(ve);if(0===xe.cmpn(0))return 0!==je.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var Ge=xe.redSqr(),Qe=Ge.redMul(xe),ye=Ze.redMul(Ge),ke=je.redSqr().redIAdd(Qe).redISub(ye).redISub(ye),et=je.redMul(ye.redISub(ke)).redISub(Me.redMul(Qe)),qe=this.z.redMul(xe);return this.curve.jpoint(ke,et,qe)},T.prototype.dblp=function(ze){if(0===ze)return this;if(this.isInfinity())return this;if(!ze)return this.dbl();var Be;if(this.curve.zeroA||this.curve.threeA){var Ze=this;for(Be=0;Be=0)return!1;if(Ze.redIAdd(Me),0===this.x.cmp(Ze))return!0}},T.prototype.inspect=function(){return this.isInfinity()?"":""},T.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var o=y(function(He,ze){var Be=ze;Be.base=U,Be.short=j,Be.mont=null,Be.edwards=null}),h=y(function(He,ze){var ve,Be=ze,Ze=P.assert;function ut(xe){"short"===xe.type?this.curve=new o.short(xe):"edwards"===xe.type?this.curve=new o.edwards(xe):this.curve=new o.mont(xe),this.g=this.curve.g,this.n=this.curve.n,this.hash=xe.hash,Ze(this.g.validate(),"Invalid curve"),Ze(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function Me(xe,je){Object.defineProperty(Be,xe,{configurable:!0,enumerable:!0,get:function(){var Ge=new ut(je);return Object.defineProperty(Be,xe,{configurable:!0,enumerable:!0,value:Ge}),Ge}})}Be.PresetCurve=ut,Me("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:M().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),Me("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:M().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),Me("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:M().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),Me("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:M().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),Me("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:M().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),Me("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:M().sha256,gRed:!1,g:["9"]}),Me("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:M().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{ve=null.crash()}catch{ve=void 0}Me("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:M().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",ve]})});function w(He){if(!(this instanceof w))return new w(He);this.hash=He.hash,this.predResist=!!He.predResist,this.outLen=this.hash.outSize,this.minEntropy=He.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var ze=D.toArray(He.entropy,He.entropyEnc||"hex"),Be=D.toArray(He.nonce,He.nonceEnc||"hex"),Ze=D.toArray(He.pers,He.persEnc||"hex");S(ze.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(ze,Be,Ze)}var I=w;w.prototype._init=function(ze,Be,Ze){var ut=ze.concat(Be).concat(Ze);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var Me=0;Me=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(ze.concat(Ze||[])),this._reseed=1},w.prototype.generate=function(ze,Be,Ze,ut){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof Be&&(ut=Ze,Ze=Be,Be=null),Ze&&(Ze=D.toArray(Ze,ut||"hex"),this._update(Ze));for(var Me=[];Me.length"};var L=P.assert;function b(He,ze){if(He instanceof b)return He;this._importDER(He,ze)||(L(He.r&&He.s,"Signature without r or s"),this.r=new(v())(He.r,16),this.s=new(v())(He.s,16),void 0===He.recoveryParam?this.recoveryParam=null:this.recoveryParam=He.recoveryParam)}var B=b;function re(){this.place=0}function ne(He,ze){var Be=He[ze.place++];if(!(128&Be))return Be;var Ze=15&Be;if(0===Ze||Ze>4)return!1;for(var ut=0,Me=0,ve=ze.place;Me>>=0;return!(ut<=127)&&(ze.place=ve,ut)}function te(He){for(var ze=0,Be=He.length-1;!He[ze]&&!(128&He[ze+1])&&ze>>3);for(He.push(128|Be);--Be;)He.push(ze>>>(Be<<3)&255);He.push(ze)}}b.prototype._importDER=function(ze,Be){ze=P.toArray(ze,Be);var Ze=new re;if(48!==ze[Ze.place++])return!1;var ut=ne(ze,Ze);if(!1===ut||ut+Ze.place!==ze.length||2!==ze[Ze.place++])return!1;var Me=ne(ze,Ze);if(!1===Me)return!1;var ve=ze.slice(Ze.place,Me+Ze.place);if(Ze.place+=Me,2!==ze[Ze.place++])return!1;var xe=ne(ze,Ze);if(!1===xe||ze.length!==xe+Ze.place)return!1;var je=ze.slice(Ze.place,xe+Ze.place);if(0===ve[0]){if(!(128&ve[1]))return!1;ve=ve.slice(1)}if(0===je[0]){if(!(128&je[1]))return!1;je=je.slice(1)}return this.r=new(v())(ve),this.s=new(v())(je),this.recoveryParam=null,!0},b.prototype.toDER=function(ze){var Be=this.r.toArray(),Ze=this.s.toArray();for(128&Be[0]&&(Be=[0].concat(Be)),128&Ze[0]&&(Ze=[0].concat(Ze)),Be=te(Be),Ze=te(Ze);!(Ze[0]||128&Ze[1]);)Ze=Ze.slice(1);var ut=[2];ae(ut,Be.length),(ut=ut.concat(Be)).push(2),ae(ut,Ze.length);var Me=ut.concat(Ze),ve=[48];return ae(ve,Me.length),ve=ve.concat(Me),P.encode(ve,ze)};var ge=function(){throw new Error("unsupported")},pe=P.assert;function we(He){if(!(this instanceof we))return new we(He);"string"==typeof He&&(pe(Object.prototype.hasOwnProperty.call(h,He),"Unknown curve "+He),He=h[He]),He instanceof h.PresetCurve&&(He={curve:He}),this.curve=He.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=He.curve.g,this.g.precompute(He.curve.n.bitLength()+1),this.hash=He.hash||He.curve.hash}var ce=we;we.prototype.keyPair=function(ze){return new H(this,ze)},we.prototype.keyFromPrivate=function(ze,Be){return H.fromPrivate(this,ze,Be)},we.prototype.keyFromPublic=function(ze,Be){return H.fromPublic(this,ze,Be)},we.prototype.genKeyPair=function(ze){ze||(ze={});for(var Be=new I({hash:this.hash,pers:ze.pers,persEnc:ze.persEnc||"utf8",entropy:ze.entropy||ge(this.hash.hmacStrength),entropyEnc:ze.entropy&&ze.entropyEnc||"utf8",nonce:this.n.toArray()}),Ze=this.n.byteLength(),ut=this.n.sub(new(v())(2));;){var Me=new(v())(Be.generate(Ze));if(!(Me.cmp(ut)>0))return Me.iaddn(1),this.keyFromPrivate(Me)}},we.prototype._truncateToN=function(ze,Be){var Ze=8*ze.byteLength()-this.n.bitLength();return Ze>0&&(ze=ze.ushrn(Ze)),!Be&&ze.cmp(this.n)>=0?ze.sub(this.n):ze},we.prototype.sign=function(ze,Be,Ze,ut){"object"==typeof Ze&&(ut=Ze,Ze=null),ut||(ut={}),Be=this.keyFromPrivate(Be,Ze),ze=this._truncateToN(new(v())(ze,16));for(var Me=this.n.byteLength(),ve=Be.getPrivate().toArray("be",Me),xe=ze.toArray("be",Me),je=new I({hash:this.hash,entropy:ve,nonce:xe,pers:ut.pers,persEnc:ut.persEnc||"utf8"}),Ge=this.n.sub(new(v())(1)),Qe=0;;Qe++){var ye=ut.k?ut.k(Qe):new(v())(je.generate(this.n.byteLength()));if(!((ye=this._truncateToN(ye,!0)).cmpn(1)<=0||ye.cmp(Ge)>=0)){var ke=this.g.mul(ye);if(!ke.isInfinity()){var et=ke.getX(),qe=et.umod(this.n);if(0!==qe.cmpn(0)){var at=ye.invm(this.n).mul(qe.mul(Be.getPrivate()).iadd(ze));if(0!==(at=at.umod(this.n)).cmpn(0)){var bt=(ke.getY().isOdd()?1:0)|(0!==et.cmp(qe)?2:0);return ut.canonical&&at.cmp(this.nh)>0&&(at=this.n.sub(at),bt^=1),new B({r:qe,s:at,recoveryParam:bt})}}}}}},we.prototype.verify=function(ze,Be,Ze,ut){ze=this._truncateToN(new(v())(ze,16)),Ze=this.keyFromPublic(Ze,ut);var Me=(Be=new B(Be,"hex")).r,ve=Be.s;if(Me.cmpn(1)<0||Me.cmp(this.n)>=0||ve.cmpn(1)<0||ve.cmp(this.n)>=0)return!1;var Qe,xe=ve.invm(this.n),je=xe.mul(ze).umod(this.n),Ge=xe.mul(Me).umod(this.n);return this.curve._maxwellTrick?!(Qe=this.g.jmulAdd(je,Ze.getPublic(),Ge)).isInfinity()&&Qe.eqXToP(Me):!(Qe=this.g.mulAdd(je,Ze.getPublic(),Ge)).isInfinity()&&0===Qe.getX().umod(this.n).cmp(Me)},we.prototype.recoverPubKey=function(He,ze,Be,Ze){pe((3&Be)===Be,"The recovery param is more than two bits"),ze=new B(ze,Ze);var ut=this.n,Me=new(v())(He),ve=ze.r,xe=ze.s,je=1&Be,Ge=Be>>1;if(ve.cmp(this.curve.p.umod(this.curve.n))>=0&&Ge)throw new Error("Unable to find sencond key candinate");ve=Ge?this.curve.pointFromX(ve.add(this.curve.n),je):this.curve.pointFromX(ve,je);var Qe=ze.r.invm(ut),ye=ut.sub(Me).mul(Qe).umod(ut),ke=xe.mul(Qe).umod(ut);return this.g.mulAdd(ye,ve,ke)},we.prototype.getKeyRecoveryParam=function(He,ze,Be,Ze){if(null!==(ze=new B(ze,Ze)).recoveryParam)return ze.recoveryParam;for(var ut=0;ut<4;ut++){var Me;try{Me=this.recoverPubKey(He,ze,ut)}catch{continue}if(Me.eq(Be))return ut}throw new Error("Unable to find valid recovery factor")};var ue=y(function(He,ze){var Be=ze;Be.version="6.5.4",Be.utils=P,Be.rand=function(){throw new Error("unsupported")},Be.curve=o,Be.curves=h,Be.ec=ce,Be.eddsa=null}).ec,fe=u(10499),he=u(24325);const Re=new(u(88666).Logger)("signing-key/5.7.0");let ot=null;function nt(){return ot||(ot=new ue("secp256k1")),ot}class Ye{constructor(ze){(0,he.defineReadOnly)(this,"curve","secp256k1"),(0,he.defineReadOnly)(this,"privateKey",(0,fe.hexlify)(ze)),32!==(0,fe.hexDataLength)(this.privateKey)&&Re.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const Be=nt().keyFromPrivate((0,fe.arrayify)(this.privateKey));(0,he.defineReadOnly)(this,"publicKey","0x"+Be.getPublic(!1,"hex")),(0,he.defineReadOnly)(this,"compressedPublicKey","0x"+Be.getPublic(!0,"hex")),(0,he.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(ze){const Be=nt().keyFromPublic((0,fe.arrayify)(this.publicKey)),Ze=nt().keyFromPublic((0,fe.arrayify)(ze));return"0x"+Be.pub.add(Ze.pub).encodeCompressed("hex")}signDigest(ze){const Be=nt().keyFromPrivate((0,fe.arrayify)(this.privateKey)),Ze=(0,fe.arrayify)(ze);32!==Ze.length&&Re.throwArgumentError("bad digest length","digest",ze);const ut=Be.sign(Ze,{canonical:!0});return(0,fe.splitSignature)({recoveryParam:ut.recoveryParam,r:(0,fe.hexZeroPad)("0x"+ut.r.toString(16),32),s:(0,fe.hexZeroPad)("0x"+ut.s.toString(16),32)})}computeSharedSecret(ze){const Be=nt().keyFromPrivate((0,fe.arrayify)(this.privateKey)),Ze=nt().keyFromPublic((0,fe.arrayify)(st(ze)));return(0,fe.hexZeroPad)("0x"+Be.derive(Ze.getPublic()).toString(16),32)}static isSigningKey(ze){return!(!ze||!ze._isSigningKey)}}function It(He,ze){const Be=(0,fe.splitSignature)(ze),Ze={r:(0,fe.arrayify)(Be.r),s:(0,fe.arrayify)(Be.s)};return"0x"+nt().recoverPubKey((0,fe.arrayify)(He),Ze,Be.recoveryParam).encode("hex",!1)}function st(He,ze){const Be=(0,fe.arrayify)(He);if(32===Be.length){const Ze=new Ye(Be);return ze?"0x"+nt().keyFromPrivate(Be).getPublic(!0,"hex"):Ze.publicKey}return 33===Be.length?ze?(0,fe.hexlify)(Be):"0x"+nt().keyFromPublic(Be).getPublic(!1,"hex"):65===Be.length?ze?"0x"+nt().keyFromPublic(Be).getPublic(!0,"hex"):(0,fe.hexlify)(Be):Re.throwArgumentError("invalid public or private key","key","[REDACTED]")}},53363:(q,n,u)=>{"use strict";u.r(n),u.d(n,{keccak256:()=>P,pack:()=>D,sha256:()=>x});var l=u(52909),v=u(10499),E=u(92547),M=u(91871),s=u(63544),g=u(88666);const f=new RegExp("^bytes([0-9]+)$"),d=new RegExp("^(u?int)([0-9]*)$"),p=new RegExp("^(.*)\\[([0-9]*)\\]$"),m="0000000000000000000000000000000000000000000000000000000000000000",S=new g.Logger("solidity/5.7.0");function _(C,N,k){switch(C){case"address":return k?(0,v.zeroPad)(N,32):(0,v.arrayify)(N);case"string":return(0,s.Y0)(N);case"bytes":return(0,v.arrayify)(N);case"bool":return N=N?"0x01":"0x00",k?(0,v.zeroPad)(N,32):(0,v.arrayify)(N)}let U=C.match(d);if(U){let z=parseInt(U[2]||"256");return(U[2]&&String(z)!==U[2]||z%8!=0||0===z||z>256)&&S.throwArgumentError("invalid number type","type",C),k&&(z=256),N=l.O$.from(N).toTwos(z),(0,v.zeroPad)(N,z/8)}if(U=C.match(f),U){const z=parseInt(U[1]);return(String(z)!==U[1]||0===z||z>32)&&S.throwArgumentError("invalid bytes type","type",C),(0,v.arrayify)(N).byteLength!==z&&S.throwArgumentError(`invalid value for ${C}`,"value",N),k?(0,v.arrayify)((N+m).substring(0,66)):N}if(U=C.match(p),U&&Array.isArray(N)){const z=U[1];parseInt(U[2]||String(N.length))!=N.length&&S.throwArgumentError(`invalid array length for ${C}`,"value",N);const G=[];return N.forEach(function(F){G.push(_(z,F,!0))}),(0,v.concat)(G)}return S.throwArgumentError("invalid type","type",C)}function D(C,N){C.length!=N.length&&S.throwArgumentError("wrong number of values; expected ${ types.length }","values",N);const k=[];return C.forEach(function(U,z){k.push(_(U,N[z]))}),(0,v.hexlify)((0,v.concat)(k))}function P(C,N){return(0,E.keccak256)(D(C,N))}function x(C,N){return(0,M.JQ)(D(C,N))}},51768:(q,n,u)=>{"use strict";u.r(n),u.d(n,{UnicodeNormalizationForm:()=>E.Uj,Utf8ErrorFuncs:()=>E.te,Utf8ErrorReason:()=>E.Uw,_toEscapedUtf8String:()=>E.U$,formatBytes32String:()=>M,nameprep:()=>z,parseBytes32String:()=>s,toUtf8Bytes:()=>E.Y0,toUtf8CodePoints:()=>E.XL,toUtf8String:()=>E.ZN});var l=u(18663),v=u(10499),E=u(63544);function M(Y){const G=(0,E.Y0)(Y);if(G.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,v.hexlify)((0,v.concat)([G,l.R]).slice(0,32))}function s(Y){const G=(0,v.arrayify)(Y);if(32!==G.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==G[31])throw new Error("invalid bytes32 string - no null terminator");let F=31;for(;0===G[F-1];)F--;return(0,E.ZN)(G.slice(0,F))}function y(Y,G){G||(G=function(Z){return[parseInt(Z,16)]});let F=0,j={};return Y.split(",").forEach(Z=>{let T=Z.split(":");F+=parseInt(T[0],16),j[F]=G(T[1])}),j}function f(Y){let G=0;return Y.split(",").map(F=>{let j=F.split("-");1===j.length?j[1]="0":""===j[1]&&(j[1]="1");let Z=G+parseInt(j[0],16);return G=parseInt(j[1],16),{l:Z,h:G}})}function d(Y,G){let F=0;for(let j=0;j=F&&Y<=F+Z.h&&(Y-F)%(Z.d||1)==0){if(Z.e&&-1!==Z.e.indexOf(Y-F))continue;return Z}}return null}const p=f("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),m="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(Y=>parseInt(Y,16)),S=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],_=y("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),D=y("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),P=y("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",function g(Y){if(Y.length%4!=0)throw new Error("bad data");let G=[];for(let F=0;F(F.forEach(j=>{G.push(j)}),G),[])}(G.map(j=>{if(m.indexOf(j)>=0)return[];if(j>=65024&&j<=65039)return[];let Z=function k(Y){let G=d(Y,S);if(G)return[Y+G.s];let F=_[Y];if(F)return F;let j=D[Y];return j?[Y+j[0]]:P[Y]||null}(j);return Z||[j]})),G=(0,E.XL)((0,E.uu)(G),E.Uj.NFKC),G.forEach(j=>{if(function U(Y){return!!d(Y,x)}(j))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),G.forEach(j=>{if(function N(Y){return!!d(Y,p)}(j))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let F=(0,E.uu)(G);if("-"===F.substring(0,1)||"--"===F.substring(2,4)||"-"===F.substring(F.length-1))throw new Error("invalid hyphen");return F}},63544:(q,n,u)=>{"use strict";u.d(n,{Uj:()=>s,te:()=>p,Uw:()=>g,U$:()=>D,uu:()=>P,Y0:()=>S,XL:()=>C,ZN:()=>x});var l=u(10499);const M=new(u(88666).Logger)("strings/5.7.0");var s,N,g;function f(N,k,U,z,Y){if(N===g.BAD_PREFIX||N===g.UNEXPECTED_CONTINUE){let G=0;for(let F=k+1;F>6==2;F++)G++;return G}return N===g.OVERRUN?U.length-k-1:0}(N=s||(s={})).current="",N.NFC="NFC",N.NFD="NFD",N.NFKC="NFKC",N.NFKD="NFKD",function(N){N.UNEXPECTED_CONTINUE="unexpected continuation byte",N.BAD_PREFIX="bad codepoint prefix",N.OVERRUN="string overrun",N.MISSING_CONTINUE="missing continuation byte",N.OUT_OF_RANGE="out of UTF-8 range",N.UTF16_SURROGATE="UTF-16 surrogate",N.OVERLONG="overlong representation"}(g||(g={}));const p=Object.freeze({error:function y(N,k,U,z,Y){return M.throwArgumentError(`invalid codepoint at offset ${k}; ${N}`,"bytes",U)},ignore:f,replace:function d(N,k,U,z,Y){return N===g.OVERLONG?(z.push(Y),0):(z.push(65533),f(N,k,U))}});function m(N,k){null==k&&(k=p.error),N=(0,l.arrayify)(N);const U=[];let z=0;for(;z>7)){U.push(Y);continue}let G=null,F=null;if(192==(224&Y))G=1,F=127;else if(224==(240&Y))G=2,F=2047;else{if(240!=(248&Y)){z+=k(128==(192&Y)?g.UNEXPECTED_CONTINUE:g.BAD_PREFIX,z-1,N,U);continue}G=3,F=65535}if(z-1+G>=N.length){z+=k(g.OVERRUN,z-1,N,U);continue}let j=Y&(1<<8-G-1)-1;for(let Z=0;Z1114111){z+=k(g.OUT_OF_RANGE,z-1-G,N,U,j);continue}if(j>=55296&&j<=57343){z+=k(g.UTF16_SURROGATE,z-1-G,N,U,j);continue}if(j<=F){z+=k(g.OVERLONG,z-1-G,N,U,j);continue}U.push(j)}}return U}function S(N,k=s.current){k!=s.current&&(M.checkNormalize(),N=N.normalize(k));let U=[];for(let z=0;z>6|192),U.push(63&Y|128);else if(55296==(64512&Y)){z++;const G=N.charCodeAt(z);if(z>=N.length||56320!=(64512&G))throw new Error("invalid utf-8 string");const F=65536+((1023&Y)<<10)+(1023&G);U.push(F>>18|240),U.push(F>>12&63|128),U.push(F>>6&63|128),U.push(63&F|128)}else U.push(Y>>12|224),U.push(Y>>6&63|128),U.push(63&Y|128)}return(0,l.arrayify)(U)}function _(N){const k="0000"+N.toString(16);return"\\u"+k.substring(k.length-4)}function D(N,k){return'"'+m(N,k).map(U=>{if(U<256){switch(U){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(U>=32&&U<127)return String.fromCharCode(U)}return U<=65535?_(U):_(55296+((U-=65536)>>10&1023))+_(56320+(1023&U))}).join("")+'"'}function P(N){return N.map(k=>k<=65535?String.fromCharCode(k):(k-=65536,String.fromCharCode(55296+(k>>10&1023),56320+(1023&k)))).join("")}function x(N,k){return P(m(N,k))}function C(N,k=s.current){return m(S(N,k))}},71474:(q,n,u)=>{"use strict";u.r(n),u.d(n,{TransactionTypes:()=>S,accessListify:()=>z,computeAddress:()=>C,parse:()=>I,recoverAddress:()=>N,serialize:()=>Z});var l=u(28016),v=u(52909),E=u(10499),M=u(53037),s=u(92547),g=u(24325),y=u(70810),f=u(33126),d=u(88666);const m=new d.Logger("transactions/5.7.0");var S,R;function _(R){return"0x"===R?null:(0,l.getAddress)(R)}function D(R){return"0x"===R?M._Y:v.O$.from(R)}(R=S||(S={}))[R.legacy=0]="legacy",R[R.eip2930=1]="eip2930",R[R.eip1559=2]="eip1559";const P=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],x={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function C(R){const V=(0,f.computePublicKey)(R);return(0,l.getAddress)((0,E.hexDataSlice)((0,s.keccak256)((0,E.hexDataSlice)(V,1)),12))}function N(R,V){return C((0,f.recoverPublicKey)((0,E.arrayify)(R),V))}function k(R,V){const H=(0,E.stripZeros)(v.O$.from(R).toHexString());return H.length>32&&m.throwArgumentError("invalid length for "+V,"transaction:"+V,R),H}function U(R,V){return{address:(0,l.getAddress)(R),storageKeys:(V||[]).map((H,L)=>(32!==(0,E.hexDataLength)(H)&&m.throwArgumentError("invalid access list storageKey",`accessList[${R}:${L}]`,H),H.toLowerCase()))}}function z(R){if(Array.isArray(R))return R.map((H,L)=>Array.isArray(H)?(H.length>2&&m.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${L}]`,H),U(H[0],H[1])):U(H.address,H.storageKeys));const V=Object.keys(R).map(H=>{const L=R[H].reduce((b,B)=>(b[B]=!0,b),{});return U(H,Object.keys(L).sort())});return V.sort((H,L)=>H.address.localeCompare(L.address)),V}function Y(R){return z(R).map(V=>[V.address,V.storageKeys])}function G(R,V){if(null!=R.gasPrice){const L=v.O$.from(R.gasPrice),b=v.O$.from(R.maxFeePerGas||0);L.eq(b)||m.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:L,maxFeePerGas:b})}const H=[k(R.chainId||0,"chainId"),k(R.nonce||0,"nonce"),k(R.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),k(R.maxFeePerGas||0,"maxFeePerGas"),k(R.gasLimit||0,"gasLimit"),null!=R.to?(0,l.getAddress)(R.to):"0x",k(R.value||0,"value"),R.data||"0x",Y(R.accessList||[])];if(V){const L=(0,E.splitSignature)(V);H.push(k(L.recoveryParam,"recoveryParam")),H.push((0,E.stripZeros)(L.r)),H.push((0,E.stripZeros)(L.s))}return(0,E.hexConcat)(["0x02",y.encode(H)])}function F(R,V){const H=[k(R.chainId||0,"chainId"),k(R.nonce||0,"nonce"),k(R.gasPrice||0,"gasPrice"),k(R.gasLimit||0,"gasLimit"),null!=R.to?(0,l.getAddress)(R.to):"0x",k(R.value||0,"value"),R.data||"0x",Y(R.accessList||[])];if(V){const L=(0,E.splitSignature)(V);H.push(k(L.recoveryParam,"recoveryParam")),H.push((0,E.stripZeros)(L.r)),H.push((0,E.stripZeros)(L.s))}return(0,E.hexConcat)(["0x01",y.encode(H)])}function Z(R,V){if(null==R.type||0===R.type)return null!=R.accessList&&m.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",R),function j(R,V){(0,g.checkProperties)(R,x);const H=[];P.forEach(function(re){let ne=R[re.name]||[];const te={};re.numeric&&(te.hexPad="left"),ne=(0,E.arrayify)((0,E.hexlify)(ne,te)),re.length&&ne.length!==re.length&&ne.length>0&&m.throwArgumentError("invalid length for "+re.name,"transaction:"+re.name,ne),re.maxLength&&(ne=(0,E.stripZeros)(ne),ne.length>re.maxLength&&m.throwArgumentError("invalid length for "+re.name,"transaction:"+re.name,ne)),H.push((0,E.hexlify)(ne))});let L=0;if(null!=R.chainId?(L=R.chainId,"number"!=typeof L&&m.throwArgumentError("invalid transaction.chainId","transaction",R)):V&&!(0,E.isBytesLike)(V)&&V.v>28&&(L=Math.floor((V.v-35)/2)),0!==L&&(H.push((0,E.hexlify)(L)),H.push("0x"),H.push("0x")),!V)return y.encode(H);const b=(0,E.splitSignature)(V);let B=27+b.recoveryParam;return 0!==L?(H.pop(),H.pop(),H.pop(),B+=2*L+8,b.v>28&&b.v!==B&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",V)):b.v!==B&&m.throwArgumentError("transaction.chainId/signature.v mismatch","signature",V),H.push((0,E.hexlify)(B)),H.push((0,E.stripZeros)((0,E.arrayify)(b.r))),H.push((0,E.stripZeros)((0,E.arrayify)(b.s))),y.encode(H)}(R,V);switch(R.type){case 1:return F(R,V);case 2:return G(R,V)}return m.throwError(`unsupported transaction type: ${R.type}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:R.type})}function T(R,V,H){try{const L=D(V[0]).toNumber();if(0!==L&&1!==L)throw new Error("bad recid");R.v=L}catch{m.throwArgumentError("invalid v for transaction type: 1","v",V[0])}R.r=(0,E.hexZeroPad)(V[1],32),R.s=(0,E.hexZeroPad)(V[2],32);try{const L=(0,s.keccak256)(H(R));R.from=N(L,{r:R.r,s:R.s,recoveryParam:R.v})}catch{}}function I(R){const V=(0,E.arrayify)(R);if(V[0]>127)return function w(R){const V=y.decode(R);9!==V.length&&6!==V.length&&m.throwArgumentError("invalid raw transaction","rawTransaction",R);const H={nonce:D(V[0]).toNumber(),gasPrice:D(V[1]),gasLimit:D(V[2]),to:_(V[3]),value:D(V[4]),data:V[5],chainId:0};if(6===V.length)return H;try{H.v=v.O$.from(V[6]).toNumber()}catch{return H}if(H.r=(0,E.hexZeroPad)(V[7],32),H.s=(0,E.hexZeroPad)(V[8],32),v.O$.from(H.r).isZero()&&v.O$.from(H.s).isZero())H.chainId=H.v,H.v=0;else{H.chainId=Math.floor((H.v-35)/2),H.chainId<0&&(H.chainId=0);let L=H.v-27;const b=V.slice(0,6);0!==H.chainId&&(b.push((0,E.hexlify)(H.chainId)),b.push("0x"),b.push("0x"),L-=2*H.chainId+8);const B=(0,s.keccak256)(y.encode(b));try{H.from=N(B,{r:(0,E.hexlify)(H.r),s:(0,E.hexlify)(H.s),recoveryParam:L})}catch{}H.hash=(0,s.keccak256)(R)}return H.type=null,H}(V);switch(V[0]){case 1:return function h(R){const V=y.decode(R.slice(1));8!==V.length&&11!==V.length&&m.throwArgumentError("invalid component count for transaction type: 1","payload",(0,E.hexlify)(R));const H={type:1,chainId:D(V[0]).toNumber(),nonce:D(V[1]).toNumber(),gasPrice:D(V[2]),gasLimit:D(V[3]),to:_(V[4]),value:D(V[5]),data:V[6],accessList:z(V[7])};return 8===V.length||(H.hash=(0,s.keccak256)(R),T(H,V.slice(8),F)),H}(V);case 2:return function o(R){const V=y.decode(R.slice(1));9!==V.length&&12!==V.length&&m.throwArgumentError("invalid component count for transaction type: 2","payload",(0,E.hexlify)(R));const H=D(V[2]),L=D(V[3]),b={type:2,chainId:D(V[0]).toNumber(),nonce:D(V[1]).toNumber(),maxPriorityFeePerGas:H,maxFeePerGas:L,gasPrice:null,gasLimit:D(V[4]),to:_(V[5]),value:D(V[6]),data:V[7],accessList:z(V[8])};return 9===V.length||(b.hash=(0,s.keccak256)(R),T(b,V.slice(9),G)),b}(V)}return m.throwError(`unsupported transaction type: ${V[0]}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:V[0]})}},32064:(q,n,u)=>{"use strict";u.r(n),u.d(n,{commify:()=>z,formatEther:()=>F,formatUnits:()=>Y,parseEther:()=>j,parseUnits:()=>G});var l=u(10499),v=u(88666),E=u(37883),M=u(52909);const s=new v.Logger(E.i),g={},y=M.O$.from(0),f=M.O$.from(-1);function d(Z,T,o,h){const w={fault:T,operation:o};return void 0!==h&&(w.value=h),s.throwError(Z,v.Logger.errors.NUMERIC_FAULT,w)}let p="0";for(;p.length<256;)p+=p;function m(Z){if("number"!=typeof Z)try{Z=M.O$.from(Z).toNumber()}catch{}return"number"==typeof Z&&Z>=0&&Z<=256&&!(Z%1)?"1"+p.substring(0,Z):s.throwArgumentError("invalid decimal size","decimals",Z)}function S(Z,T){null==T&&(T=0);const o=m(T),h=(Z=M.O$.from(Z)).lt(y);h&&(Z=Z.mul(f));let w=Z.mod(o).toString();for(;w.length2&&s.throwArgumentError("too many decimal points","value",Z);let I=w[0],R=w[1];for(I||(I="0"),R||(R="0");"0"===R[R.length-1];)R=R.substring(0,R.length-1);for(R.length>o.length-1&&d("fractional component exceeds decimals","underflow","parseFixed"),""===R&&(R="0");R.lengthnull==T[R]?H:(typeof T[R]!==V&&s.throwArgumentError("invalid fixed format ("+R+" not "+V+")","format."+R,T[R]),T[R]);o=I("signed","boolean",o),h=I("width","number",h),w=I("decimals","number",w)}return h%8&&s.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",h),w>80&&s.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",w),new D(g,o,h,w)}}class P{constructor(T,o,h,w){T!==g&&s.throwError("cannot use FixedNumber constructor; use FixedNumber.from",v.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=w,this._hex=o,this._value=h,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(T){this.format.name!==T.format.name&&s.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",T)}addUnsafe(T){this._checkFormat(T);const o=_(this._value,this.format.decimals),h=_(T._value,T.format.decimals);return P.fromValue(o.add(h),this.format.decimals,this.format)}subUnsafe(T){this._checkFormat(T);const o=_(this._value,this.format.decimals),h=_(T._value,T.format.decimals);return P.fromValue(o.sub(h),this.format.decimals,this.format)}mulUnsafe(T){this._checkFormat(T);const o=_(this._value,this.format.decimals),h=_(T._value,T.format.decimals);return P.fromValue(o.mul(h).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(T){this._checkFormat(T);const o=_(this._value,this.format.decimals),h=_(T._value,T.format.decimals);return P.fromValue(o.mul(this.format._multiplier).div(h),this.format.decimals,this.format)}floor(){const T=this.toString().split(".");1===T.length&&T.push("0");let o=P.from(T[0],this.format);const h=!T[1].match(/^(0*)$/);return this.isNegative()&&h&&(o=o.subUnsafe(x.toFormat(o.format))),o}ceiling(){const T=this.toString().split(".");1===T.length&&T.push("0");let o=P.from(T[0],this.format);const h=!T[1].match(/^(0*)$/);return!this.isNegative()&&h&&(o=o.addUnsafe(x.toFormat(o.format))),o}round(T){null==T&&(T=0);const o=this.toString().split(".");if(1===o.length&&o.push("0"),(T<0||T>80||T%1)&&s.throwArgumentError("invalid decimal count","decimals",T),o[1].length<=T)return this;const h=P.from("1"+p.substring(0,T),this.format),w=C.toFormat(this.format);return this.mulUnsafe(h).addUnsafe(w).floor().divUnsafe(h)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(T){if(null==T)return this._hex;T%8&&s.throwArgumentError("invalid byte width","width",T);const o=M.O$.from(this._hex).fromTwos(this.format.width).toTwos(T).toHexString();return(0,l.hexZeroPad)(o,T/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(T){return P.fromString(this._value,T)}static fromValue(T,o,h){return null==h&&null!=o&&!(0,M.Zm)(o)&&(h=o,o=null),null==o&&(o=0),null==h&&(h="fixed"),P.fromString(S(T,o),D.from(h))}static fromString(T,o){null==o&&(o="fixed");const h=D.from(o),w=_(T,h.decimals);!h.signed&&w.lt(y)&&d("unsigned value cannot be negative","overflow","value",T);let I=null;h.signed?I=w.toTwos(h.width).toHexString():(I=w.toHexString(),I=(0,l.hexZeroPad)(I,h.width/8));const R=S(w,h.decimals);return new P(g,I,R,h)}static fromBytes(T,o){null==o&&(o="fixed");const h=D.from(o);if((0,l.arrayify)(T).length>h.width/8)throw new Error("overflow");let w=M.O$.from(T);h.signed&&(w=w.fromTwos(h.width));const I=w.toTwos((h.signed?0:1)+h.width).toHexString(),R=S(w,h.decimals);return new P(g,I,R,h)}static from(T,o){if("string"==typeof T)return P.fromString(T,o);if((0,l.isBytes)(T))return P.fromBytes(T,o);try{return P.fromValue(T,0,o)}catch(h){if(h.code!==v.Logger.errors.INVALID_ARGUMENT)throw h}return s.throwArgumentError("invalid FixedNumber value","value",T)}static isFixedNumber(T){return!(!T||!T._isFixedNumber)}}const x=P.from(1),C=P.from("0.5"),k=new v.Logger("units/5.7.0"),U=["wei","kwei","mwei","gwei","szabo","finney","ether"];function z(Z){const T=String(Z).split(".");(T.length>2||!T[0].match(/^-?[0-9]*$/)||T[1]&&!T[1].match(/^[0-9]*$/)||"."===Z||"-."===Z)&&k.throwArgumentError("invalid value","value",Z);let o=T[0],h="";for("-"===o.substring(0,1)&&(h="-",o=o.substring(1));"0"===o.substring(0,1);)o=o.substring(1);""===o&&(o="0");let w="";for(2===T.length&&(w="."+(T[1]||"0"));w.length>2&&"0"===w[w.length-1];)w=w.substring(0,w.length-1);const I=[];for(;o.length;){if(o.length<=3){I.unshift(o);break}{const R=o.length-3;I.unshift(o.substring(R)),o=o.substring(0,R)}}return h+I.join(",")+w}function Y(Z,T){if("string"==typeof T){const o=U.indexOf(T);-1!==o&&(T=3*o)}return S(Z,T??18)}function G(Z,T){if("string"!=typeof Z&&k.throwArgumentError("value must be a string","value",Z),"string"==typeof T){const o=U.indexOf(T);-1!==o&&(T=3*o)}return _(Z,T??18)}function F(Z){return Y(Z,18)}function j(Z){return G(Z,18)}},9813:(q,n,u)=>{"use strict";u.r(n),u.d(n,{Wallet:()=>z,verifyMessage:()=>Y,verifyTypedData:()=>G});var l=u(28016),v=u(58314),E=u(12748),M=u(10499),s=u(24660),g=u(90687),y=u(21516),f=u(92547),d=u(24325),p=u(41928),m=u(33126),S=u(91765),_=u(27591),D=u(71474),P=u(88666);var C=function(F,j,Z,T){return new(Z||(Z=Promise))(function(h,w){function I(H){try{V(T.next(H))}catch(L){w(L)}}function R(H){try{V(T.throw(H))}catch(L){w(L)}}function V(H){H.done?h(H.value):function o(h){return h instanceof Z?h:new Z(function(w){w(h)})}(H.value).then(I,R)}V((T=T.apply(F,j||[])).next())})};const N=new P.Logger("wallet/5.7.0");class z extends E.E{constructor(j,Z){if(super(),function k(F){return null!=F&&(0,M.isHexString)(F.privateKey,32)&&null!=F.address}(j)){const T=new m.SigningKey(j.privateKey);if((0,d.defineReadOnly)(this,"_signingKey",()=>T),(0,d.defineReadOnly)(this,"address",(0,D.computeAddress)(this.publicKey)),this.address!==(0,l.getAddress)(j.address)&&N.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function U(F){const j=F.mnemonic;return j&&j.phrase}(j)){const o=j.mnemonic;(0,d.defineReadOnly)(this,"_mnemonic",()=>({phrase:o.phrase,path:o.path||y.defaultPath,locale:o.locale||"en"}));const h=this.mnemonic,w=y.HDNode.fromMnemonic(h.phrase,null,h.locale).derivePath(h.path);(0,D.computeAddress)(w.privateKey)!==this.address&&N.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,d.defineReadOnly)(this,"_mnemonic",()=>null)}else{if(m.SigningKey.isSigningKey(j))"secp256k1"!==j.curve&&N.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,d.defineReadOnly)(this,"_signingKey",()=>j);else{"string"==typeof j&&j.match(/^[0-9a-f]*$/i)&&64===j.length&&(j="0x"+j);const T=new m.SigningKey(j);(0,d.defineReadOnly)(this,"_signingKey",()=>T)}(0,d.defineReadOnly)(this,"_mnemonic",()=>null),(0,d.defineReadOnly)(this,"address",(0,D.computeAddress)(this.publicKey))}Z&&!v.zt.isProvider(Z)&&N.throwArgumentError("invalid provider","provider",Z),(0,d.defineReadOnly)(this,"provider",Z||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(j){return new z(this,j)}signTransaction(j){return(0,d.resolveProperties)(j).then(Z=>{null!=Z.from&&((0,l.getAddress)(Z.from)!==this.address&&N.throwArgumentError("transaction from address mismatch","transaction.from",j.from),delete Z.from);const T=this._signingKey().signDigest((0,f.keccak256)((0,D.serialize)(Z)));return(0,D.serialize)(Z,T)})}signMessage(j){return C(this,void 0,void 0,function*(){return(0,M.joinSignature)(this._signingKey().signDigest((0,s.r)(j)))})}_signTypedData(j,Z,T){return C(this,void 0,void 0,function*(){const o=yield g.E.resolveNames(j,Z,T,h=>(null==this.provider&&N.throwError("cannot resolve ENS names without a provider",P.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:h}),this.provider.resolveName(h)));return(0,M.joinSignature)(this._signingKey().signDigest(g.E.hash(o.domain,Z,o.value)))})}encrypt(j,Z,T){if("function"==typeof Z&&!T&&(T=Z,Z={}),T&&"function"!=typeof T)throw new Error("invalid callback");return Z||(Z={}),(0,S.HI)(this,j,Z,T)}static createRandom(j){let Z=(0,p.O)(16);j||(j={}),j.extraEntropy&&(Z=(0,M.arrayify)((0,M.hexDataSlice)((0,f.keccak256)((0,M.concat)([Z,j.extraEntropy])),0,16)));const T=(0,y.entropyToMnemonic)(Z,j.locale);return z.fromMnemonic(T,j.path,j.locale)}static fromEncryptedJson(j,Z,T){return(0,_.decryptJsonWallet)(j,Z,T).then(o=>new z(o))}static fromEncryptedJsonSync(j,Z){return new z((0,_.decryptJsonWalletSync)(j,Z))}static fromMnemonic(j,Z,T){return Z||(Z=y.defaultPath),new z(y.HDNode.fromMnemonic(j,null,T).derivePath(Z))}}function Y(F,j){return(0,D.recoverAddress)((0,s.r)(F),j)}function G(F,j,Z,T){return(0,D.recoverAddress)(g.E.hash(F,j,Z),T)}},39851:(q,n,u)=>{"use strict";u.r(n),u.d(n,{_fetchData:()=>D,fetchJson:()=>P,poll:()=>x});var l=u(57836),v=u(10499),E=u(24325),M=u(63544),s=u(88666);var y=function(C,N,k,U){return new(k||(k=Promise))(function(Y,G){function F(T){try{Z(U.next(T))}catch(o){G(o)}}function j(T){try{Z(U.throw(T))}catch(o){G(o)}}function Z(T){T.done?Y(T.value):function z(Y){return Y instanceof k?Y:new k(function(G){G(Y)})}(T.value).then(F,j)}Z((U=U.apply(C,N||[])).next())})};function f(C,N){return y(this,void 0,void 0,function*(){null==N&&(N={});const k={method:N.method||"GET",headers:N.headers||{},body:N.body||void 0};if(!0!==N.skipFetchSetup&&(k.mode="cors",k.cache="no-cache",k.credentials="same-origin",k.redirect="follow",k.referrer="client"),null!=N.fetchOptions){const G=N.fetchOptions;G.mode&&(k.mode=G.mode),G.cache&&(k.cache=G.cache),G.credentials&&(k.credentials=G.credentials),G.redirect&&(k.redirect=G.redirect),G.referrer&&(k.referrer=G.referrer)}const U=yield fetch(C,k),z=yield U.arrayBuffer(),Y={};return U.headers.forEach?U.headers.forEach((G,F)=>{Y[F.toLowerCase()]=G}):U.headers.keys().forEach(G=>{Y[G.toLowerCase()]=U.headers.get(G)}),{headers:Y,statusCode:U.status,statusMessage:U.statusText,body:(0,v.arrayify)(new Uint8Array(z))}})}var d=function(C,N,k,U){return new(k||(k=Promise))(function(Y,G){function F(T){try{Z(U.next(T))}catch(o){G(o)}}function j(T){try{Z(U.throw(T))}catch(o){G(o)}}function Z(T){T.done?Y(T.value):function z(Y){return Y instanceof k?Y:new k(function(G){G(Y)})}(T.value).then(F,j)}Z((U=U.apply(C,N||[])).next())})};const p=new s.Logger("web/5.7.1");function m(C){return new Promise(N=>{setTimeout(N,C)})}function S(C,N){if(null==C)return null;if("string"==typeof C)return C;if((0,v.isBytesLike)(C)){if(N&&("text"===N.split("/")[0]||"application/json"===N.split(";")[0].trim()))try{return(0,M.ZN)(C)}catch{}return(0,v.hexlify)(C)}return C}function _(C){return(0,M.Y0)(C.replace(/%([0-9a-f][0-9a-f])/gi,(N,k)=>String.fromCharCode(parseInt(k,16))))}function D(C,N,k){const U="object"==typeof C&&null!=C.throttleLimit?C.throttleLimit:12;p.assertArgument(U>0&&U%1==0,"invalid connection throttle limit","connection.throttleLimit",U);const z="object"==typeof C?C.throttleCallback:null,Y="object"==typeof C&&"number"==typeof C.throttleSlotInterval?C.throttleSlotInterval:100;p.assertArgument(Y>0&&Y%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",Y);const G="object"==typeof C&&!!C.errorPassThrough,F={};let j=null;const Z={method:"GET"};let T=!1,o=12e4;if("string"==typeof C)j=C;else if("object"==typeof C){if((null==C||null==C.url)&&p.throwArgumentError("missing URL","connection.url",C),j=C.url,"number"==typeof C.timeout&&C.timeout>0&&(o=C.timeout),C.headers)for(const H in C.headers)F[H.toLowerCase()]={key:H,value:String(C.headers[H])},["if-none-match","if-modified-since"].indexOf(H.toLowerCase())>=0&&(T=!0);if(Z.allowGzip=!!C.allowGzip,null!=C.user&&null!=C.password){"https:"!==j.substring(0,6)&&!0!==C.allowInsecureAuthentication&&p.throwError("basic authentication requires a secure https url",s.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:j,user:C.user,password:"[REDACTED]"});const H=C.user+":"+C.password;F.authorization={key:"Authorization",value:"Basic "+(0,l.c)((0,M.Y0)(H))}}null!=C.skipFetchSetup&&(Z.skipFetchSetup=!!C.skipFetchSetup),null!=C.fetchOptions&&(Z.fetchOptions=(0,E.shallowCopy)(C.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),w=j?j.match(h):null;if(w)try{const H={statusCode:200,statusMessage:"OK",headers:{"content-type":w[1]||"text/plain"},body:w[2]?(0,l.J)(w[3]):_(w[3])};let L=H.body;return k&&(L=k(H.body,H)),Promise.resolve(L)}catch(H){p.throwError("processing response error",s.Logger.errors.SERVER_ERROR,{body:S(w[1],w[2]),error:H,requestBody:null,requestMethod:"GET",url:j})}N&&(Z.method="POST",Z.body=N,null==F["content-type"]&&(F["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==F["content-length"]&&(F["content-length"]={key:"Content-Length",value:String(N.length)}));const I={};Object.keys(F).forEach(H=>{const L=F[H];I[L.key]=L.value}),Z.headers=I;const R=function(){let H=null;return{promise:new Promise(function(B,re){o&&(H=setTimeout(()=>{null!=H&&(H=null,re(p.makeError("timeout",s.Logger.errors.TIMEOUT,{requestBody:S(Z.body,I["content-type"]),requestMethod:Z.method,timeout:o,url:j})))},o))}),cancel:function(){null!=H&&(clearTimeout(H),H=null)}}}(),V=function(){return d(this,void 0,void 0,function*(){for(let H=0;H=300)&&(R.cancel(),p.throwError("bad response",s.Logger.errors.SERVER_ERROR,{status:L.statusCode,headers:L.headers,body:S(b,L.headers?L.headers["content-type"]:null),requestBody:S(Z.body,I["content-type"]),requestMethod:Z.method,url:j})),k)try{const B=yield k(b,L);return R.cancel(),B}catch(B){if(B.throttleRetry&&H"content-type"===F.toLowerCase()).length||(Y.headers=(0,E.shallowCopy)(Y.headers),Y.headers["content-type"]="application/json"):Y.headers={"content-type":"application/json"},C=Y}return D(C,z,(Y,G)=>{let F=null;if(null!=Y)try{F=JSON.parse((0,M.ZN)(Y))}catch(j){p.throwError("invalid JSON",s.Logger.errors.SERVER_ERROR,{body:Y,error:j})}return k&&(F=k(F,G)),F})}function x(C,N){return N||(N={}),null==(N=(0,E.shallowCopy)(N)).floor&&(N.floor=0),null==N.ceiling&&(N.ceiling=1e4),null==N.interval&&(N.interval=250),new Promise(function(k,U){let z=null,Y=!1;const G=()=>!Y&&(Y=!0,z&&clearTimeout(z),!0);N.timeout&&(z=setTimeout(()=>{G()&&U(new Error("timeout"))},N.timeout));const F=N.retryLimit;let j=0;!function Z(){return C().then(function(T){if(void 0!==T)G()&&k(T);else if(N.oncePoll)N.oncePoll.once("poll",Z);else if(N.onceBlock)N.onceBlock.once("block",Z);else if(!Y){if(j++,j>F)return void(G()&&U(new Error("retry limit reached")));let o=N.interval*parseInt(String(Math.random()*Math.pow(2,j)));oN.ceiling&&(o=N.ceiling),setTimeout(Z,o)}return null},function(T){G()&&U(T)})}()})}},56618:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(j,Z,T,o){return new(T||(T=Promise))(function(w,I){function R(L){try{H(o.next(L))}catch(b){I(b)}}function V(L){try{H(o.throw(L))}catch(b){I(b)}}function H(L){L.done?w(L.value):function h(w){return w instanceof T?w:new T(function(I){I(w)})}(L.value).then(R,V)}H((o=o.apply(j,Z||[])).next())})},v=this&&this.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;const E=u(79189),M=u(37906),s=u(60898),g=u(17527),y=u(41166),f=v(u(98538)),{addKey:d,createAccount:p,deleteAccount:m,deleteKey:S,deployContract:_,fullAccessKey:D,functionCall:P,functionCallAccessKey:x,stake:C,transfer:N}=s.actionCreators;function Y(j){return JSON.parse(Buffer.from(j).toString())}function G(j){return Buffer.from(JSON.stringify(j))}class F{constructor(Z,T){this.accessKeyByPublicKeyCache={},this.connection=Z,this.accountId=T}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(Z,T){return l(this,void 0,void 0,function*(){const o=yield this.findAccessKey(Z,T);if(!o)throw new g.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:h}=o,I=(yield this.connection.provider.block({finality:"final"})).header.hash,R=h.nonce.add(new f.default(1));return yield(0,s.signTransaction)(Z,R,T,(0,y.baseDecode)(I),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:Z,actions:T,returnError:o}){return l(this,void 0,void 0,function*(){let h,w;const I=yield(0,M.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[h,w]=yield this.signTransaction(Z,T);const R=w.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(w)}catch(V){if("InvalidNonce"===V.type)return y.Logger.warn(`Retrying transaction ${Z}:${(0,y.baseEncode)(h)} with new nonce.`),delete this.accessKeyByPublicKeyCache[R.toString()],null;if("Expired"===V.type)return y.Logger.warn(`Retrying transaction ${Z}:${(0,y.baseEncode)(h)} due to expired block hash`),null;throw V.context=new g.ErrorContext((0,y.baseEncode)(h)),V}}));if(!I)throw new g.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,y.printTxOutcomeLogsAndFailures)({contractId:w.transaction.receiverId,outcome:I}),!o&&"object"==typeof I.status&&"object"==typeof I.status.Failure&&null!==I.status.Failure)throw I.status.Failure.error_message&&I.status.Failure.error_type?new g.TypedError(`Transaction ${I.transaction_outcome.id} failed. ${I.status.Failure.error_message}`,I.status.Failure.error_type):(0,y.parseResultError)(I);return I})}findAccessKey(Z,T){return l(this,void 0,void 0,function*(){const o=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!o)throw new g.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const h=this.accessKeyByPublicKeyCache[o.toString()];if(void 0!==h)return{publicKey:o,accessKey:h};try{const w=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:o.toString(),finality:"optimistic"}),I=Object.assign(Object.assign({},w),{nonce:new f.default(w.nonce)});return this.accessKeyByPublicKeyCache[o.toString()]?{publicKey:o,accessKey:this.accessKeyByPublicKeyCache[o.toString()]}:(this.accessKeyByPublicKeyCache[o.toString()]=I,{publicKey:o,accessKey:I})}catch(w){if("AccessKeyDoesNotExist"==w.type)return null;throw w}})}createAndDeployContract(Z,T,o,h){return l(this,void 0,void 0,function*(){const w=D();return yield this.signAndSendTransaction({receiverId:Z,actions:[p(),N(h),d(E.PublicKey.from(T),w),_(o)]}),new F(this.connection,Z)})}sendMoney(Z,T){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:Z,actions:[N(T)]})})}createAccount(Z,T,o){return l(this,void 0,void 0,function*(){const h=D();return this.signAndSendTransaction({receiverId:Z,actions:[p(),N(o),d(E.PublicKey.from(T),h)]})})}deleteAccount(Z){return l(this,void 0,void 0,function*(){return y.Logger.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[m(Z)]})})}deployContract(Z){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[_(Z)]})})}encodeJSContractArgs(Z,T,o){return Buffer.concat([Buffer.from(Z),Buffer.from([0]),Buffer.from(T),Buffer.from([0]),Buffer.from(o)])}functionCall({contractId:Z,methodName:T,args:o={},gas:h=y.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:w,walletMeta:I,walletCallbackUrl:R,stringify:V,jsContract:H}){return l(this,void 0,void 0,function*(){let L;if(this.validateArgs(o),H)L=["call_js_contract",this.encodeJSContractArgs(Z,T,JSON.stringify(o)),h,w,null,!0];else{const b=void 0===V?s.stringifyJsonOrBytes:V;L=[T,o,h,w,b,!1]}return this.signAndSendTransaction({receiverId:H?this.connection.jsvmAccountId:Z,actions:[P.apply(void 0,L)],walletMeta:I,walletCallbackUrl:R})})}addKey(Z,T,o,h){return l(this,void 0,void 0,function*(){let w;return o||(o=[]),Array.isArray(o)||(o=[o]),w=T?x(T,o,h):D(),this.signAndSendTransaction({receiverId:this.accountId,actions:[d(E.PublicKey.from(Z),w)]})})}deleteKey(Z){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[S(E.PublicKey.from(Z))]})})}stake(Z,T){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[C(T,E.PublicKey.from(Z))]})})}signedDelegate({actions:Z,blockHeightTtl:T,receiverId:o}){return l(this,void 0,void 0,function*(){const{provider:h,signer:w}=this.connection,{header:I}=yield h.block({finality:"final"}),{accessKey:R,publicKey:V}=yield this.findAccessKey(null,null),H=(0,s.buildDelegateAction)({actions:Z,maxBlockHeight:new f.default(I.height).add(new f.default(T)),nonce:new f.default(R.nonce).add(new f.default(1)),publicKey:V,receiverId:o,senderId:this.accountId}),{signedDelegateAction:L}=yield(0,s.signDelegateAction)({delegateAction:H,signer:{sign:b=>l(this,void 0,void 0,function*(){const{signature:B}=yield w.signMessage(b,H.senderId,this.connection.networkId);return B})}});return L})}validateArgs(Z){if((void 0===Z.byteLength||Z.byteLength!==Z.length)&&(Array.isArray(Z)||"object"!=typeof Z))throw new g.PositionalArgsError}viewFunction({contractId:Z,methodName:T,args:o={},parse:h=Y,stringify:w=G,jsContract:I=!1,blockQuery:R={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let V;this.validateArgs(o),V=I?this.encodeJSContractArgs(Z,T,Object.keys(o).length>0?JSON.stringify(o):""):w(o);const H=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},R),{account_id:I?this.connection.jsvmAccountId:Z,method_name:I?"view_js_contract":T,args_base64:V.toString("base64")}));return H.logs&&(0,y.printTxOutcomeLogs)({contractId:Z,logs:H.logs}),H.result&&H.result.length>0&&h(Buffer.from(H.result))})}viewState(Z,T={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:o}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},T),{account_id:this.accountId,prefix_base64:Buffer.from(Z).toString("base64")}));return o.map(({key:h,value:w})=>({key:Buffer.from(h,"base64"),value:Buffer.from(w,"base64")}))})}getAccessKeys(){var Z;return l(this,void 0,void 0,function*(){const T=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(Z=T?.keys)||void 0===Z?void 0:Z.map(o=>Object.assign(Object.assign({},o),{access_key:Object.assign(Object.assign({},o.access_key),{nonce:new f.default(o.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(o=>"FullAccess"!==o.access_key.permission).map(o=>{const h=o.access_key.permission;return{contractId:h.FunctionCall.receiver_id,amount:h.FunctionCall.allowance,publicKey:o.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const Z=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),T=yield this.state(),o=new f.default(Z.runtime_config.storage_amount_per_byte),h=new f.default(T.storage_usage).mul(o),w=new f.default(T.locked),I=new f.default(T.amount).add(w),R=I.sub(f.default.max(w,h));return{total:I.toString(),stateStaked:h.toString(),staked:w.toString(),available:R.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const Z=yield this.connection.provider.block({finality:"final"}),T=Z.header.hash,o=Z.header.epoch_id,{current_validators:h,next_validators:w,current_proposals:I}=yield this.connection.provider.validators(o),R=new Set;[...h,...w,...I].forEach(re=>R.add(re.account_id));const V=[...R],H=V.map(re=>this.viewFunction({contractId:re,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:T}})),L=yield Promise.allSettled(H);if(L.some(re=>"rejected"===re.status&&"TimeoutError"===re.reason.type))throw new Error("Failed to get delegated stake balance");const B=L.reduce((re,ne,te)=>{const ae=V[te];if("fulfilled"===ne.status){const ge=new f.default(ne.value);if(!ge.isZero())return Object.assign(Object.assign({},re),{stakedValidators:[...re.stakedValidators,{validatorId:ae,amount:ge.toString()}],total:re.total.add(ge)})}return"rejected"===ne.status?Object.assign(Object.assign({},re),{failedValidators:[...re.failedValidators,{validatorId:ae,error:ne.reason}]}):re},{stakedValidators:[],failedValidators:[],total:new f.default(0)});return Object.assign(Object.assign({},B),{total:B.total.toString()})})}}n.Account=F},96629:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(U,z,Y,G){return new(Y||(Y=Promise))(function(j,Z){function T(w){try{h(G.next(w))}catch(I){Z(I)}}function o(w){try{h(G.throw(w))}catch(I){Z(I)}}function h(w){w.done?j(w.value):function F(j){return j instanceof Y?j:new Y(function(Z){Z(j)})}(w.value).then(T,o)}h((G=G.apply(U,z||[])).next())})},v=this&&this.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(n,"__esModule",{value:!0}),n.Account2FA=void 0;const E=u(79189),M=u(17527),s=u(37906),g=u(60898),y=u(41166),f=v(u(98538)),d=u(34763),p=u(96280),m=u(10757),{addKey:S,deleteKey:_,deployContract:D,fullAccessKey:P,functionCall:x,functionCallAccessKey:C}=g.actionCreators;class N extends d.AccountMultisig{constructor(z,Y,G){super(z,Y,G),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=G.helperUrl||this.helperUrl,this.storage=G.storage,this.sendCode=G.sendCode||this.sendCodeDefault,this.getCode=G.getCode||this.getCodeDefault,this.verifyCode=G.verifyCode||this.verifyCodeDefault,this.onConfirmResult=G.onConfirmResult}signAndSendTransaction({receiverId:z,actions:Y}){const G=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield G.signAndSendTransaction.call(this,{receiverId:z,actions:Y}),yield this.sendCode();const F=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(F)),F})}deployMultisig(z){const Y=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:G}=this,F=(yield this.getRecoveryMethods()).data.filter(({kind:I,publicKey:R})=>("phrase"===I||"ledger"===I)&&null!==R).map(I=>I.publicKey),j=(yield this.getAccessKeys()).filter(({public_key:I,access_key:{permission:R}})=>"FullAccess"===R&&!F.includes(I)).map(I=>I.public_key).map(k),Z=k((yield this.postSignedJson("/2fa/getAccessKey",{accountId:G})).publicKey),T=Buffer.from(JSON.stringify({num_confirmations:2})),o=[...j.map(I=>_(I)),...j.map(I=>S(I,C(G,p.MULTISIG_CHANGE_METHODS,null))),S(Z,C(G,p.MULTISIG_CONFIRM_METHODS,null)),D(z)],h=o.concat(x("new",T,p.MULTISIG_GAS,p.MULTISIG_DEPOSIT));y.Logger.log("deploying multisig contract for",G);const{stateStatus:w}=yield this.checkMultisigCodeAndStateStatus(z);switch(w){case m.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield Y.signAndSendTransactionWithAccount.call(this,G,h);case m.MultisigStateStatus.VALID_STATE:return yield Y.signAndSendTransactionWithAccount.call(this,G,o);case m.MultisigStateStatus.INVALID_STATE:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:z,cleanupContractBytes:Y}){return l(this,void 0,void 0,function*(){let G=[];Y&&(yield this.deleteAllRequests().catch(T=>T),G=yield this.get2faDisableCleanupActions(Y));const F=yield this.get2faDisableKeyConversionActions(),j=[...G,...F,D(z)],Z=yield this.findAccessKey(this.accountId,j);if(Z&&Z.accessKey&&"FullAccess"!==Z.accessKey.permission)throw new M.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,j)})}get2faDisableCleanupActions(z){return l(this,void 0,void 0,function*(){const Y=yield this.viewState("").catch(F=>{const j=F.cause&&F.cause.name;if("NO_CONTRACT_CODE"==j)return[];throw"TOO_LARGE_CONTRACT_STATE"==j?new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):F}),G=Y.map(({key:F})=>F.toString("base64"));return Y.length?[D(z),x("clean",{keys:G},p.MULTISIG_GAS,new f.default("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:z}=this,G=(yield this.getAccessKeys()).filter(({access_key:j})=>"FullAccess"!==j.permission).filter(({access_key:j})=>{const Z=j.permission.FunctionCall;return Z.receiver_id===z&&4===Z.method_names.length&&Z.method_names.includes("add_request_and_confirm")}),F=E.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:z})).publicKey);return[_(F),...G.map(({public_key:j})=>_(E.PublicKey.from(j))),...G.map(({public_key:j})=>S(E.PublicKey.from(j),P()))]})}disable(z,Y){return l(this,void 0,void 0,function*(){const{stateStatus:G}=yield this.checkMultisigCodeAndStateStatus();if(G!==m.MultisigStateStatus.VALID_STATE&&G!==m.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let F;yield this.deleteAllRequests().catch(T=>F=T);const Z=[...yield this.get2faDisableCleanupActions(Y).catch(T=>{throw"ContractHasExistingState"===T.type&&F||T}),...yield this.get2faDisableKeyConversionActions(),D(z)];return y.Logger.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:Z})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:z}=this,{requestId:Y}=this.getRequest(),G=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:z,method:G,requestId:Y}),Y})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const z=yield this.get2faMethod(),Y=yield this.getCode(z);try{return yield this.verifyCode(Y)}catch(G){if(y.Logger.warn("Error validating security code:",G),G.toString().includes("invalid 2fa code provided")||G.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw G}})}verifyCodeDefault(z){return l(this,void 0,void 0,function*(){const{accountId:Y}=this,G=this.getRequest();if(!G)throw new Error("no request pending");const{requestId:F}=G;return yield this.postSignedJson("/2fa/verify",{accountId:Y,securityCode:z,requestId:F})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:z}=this;return{accountId:z,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:z})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:z}=yield this.getRecoveryMethods();if(z&&z.length&&(z=z.find(F=>0===F.kind.indexOf("2fa-"))),!z)return null;const{kind:Y,detail:G}=z;return{kind:Y,detail:G}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:z}=this,G=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),F=yield this.connection.signer.signMessage(Buffer.from(G),z,this.connection.networkId);return{blockNumber:G,blockNumberSignature:Buffer.from(F.signature).toString("base64")}})}postSignedJson(z,Y){return l(this,void 0,void 0,function*(){return yield(0,s.fetchJson)(this.helperUrl+z,JSON.stringify(Object.assign(Object.assign({},Y),yield this.signatureFor())))})}}n.Account2FA=N;const k=U=>E.PublicKey.from(U)},96891:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;const v=u(37906);class E{}n.AccountCreator=E;n.LocalAccountCreator=class M extends E{constructor(y,f){super(),this.masterAccount=y,this.initialBalance=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,f,this.initialBalance)})}};n.UrlAccountCreator=class s extends E{constructor(y,f){super(),this.connection=y,this.helperUrl=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield(0,v.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:f.toString()}))})}}},34763:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountMultisig=void 0;const v=u(60898),E=u(41166),M=u(56618),s=u(96280),g=u(10757),{deployContract:y,functionCall:f}=v.actionCreators;var d,D;(D=d||(d={}))[D.INVALID_CODE=0]="INVALID_CODE",D[D.VALID_CODE=1]="VALID_CODE",D[D.UNKNOWN_CODE=2]="UNKNOWN_CODE";const p={[s.MULTISIG_STORAGE_KEY]:null};class m extends M.Account{constructor(P,x,C){super(P,x),this.storage=C.storage,this.onAddRequestResult=C.onAddRequestResult}signAndSendTransactionWithAccount(P,x){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return C.signAndSendTransaction.call(this,{receiverId:P,actions:x})})}signAndSendTransaction({receiverId:P,actions:x}){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:N}=this,k=Buffer.from(JSON.stringify({request:{receiver_id:P,actions:_(x,N,P)}}));let U;try{U=yield C.signAndSendTransaction.call(this,{receiverId:N,actions:[f("add_request_and_confirm",k,s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch(Y){if(Y.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:P,actions:x});throw Y}if(!U.status)throw new Error("Request failed");const z=Object.assign({},U.status);if(!z.SuccessValue||"string"!=typeof z.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:N,actions:x,requestId:parseInt(Buffer.from(z.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(U)),this.deleteUnconfirmedRequests(),U})}checkMultisigCodeAndStateStatus(P){const x=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const N=P?d.UNKNOWN_CODE:d.VALID_CODE;try{return P?yield x.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y(P),f("delete_request",{request_id:4294967295},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:d.VALID_CODE,stateStatus:g.MultisigStateStatus.VALID_STATE}}catch(k){if(new RegExp(g.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.INVALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(g.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.VALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(k&&k.message))return{codeStatus:d.INVALID_CODE,stateStatus:g.MultisigStateStatus.UNKNOWN_STATE};throw k}})}deleteRequest(P){return super.signAndSendTransaction({receiverId:this.accountId,actions:[f("delete_request",{request_id:P},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const P=yield this.getRequestIds();P.length&&(yield Promise.all(P.map(x=>this.deleteRequest(x))))})}deleteUnconfirmedRequests(){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const x=yield this.getRequestIds(),{requestId:C}=this.getRequest();for(const N of x)if(N!=C)try{yield P.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[f("delete_request",{request_id:N},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch{E.Logger.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(s.MULTISIG_STORAGE_KEY)||"{}"):p[s.MULTISIG_STORAGE_KEY]}setRequest(P){if(this.storage)return this.storage.setItem(s.MULTISIG_STORAGE_KEY,JSON.stringify(P));p[s.MULTISIG_STORAGE_KEY]=P}}n.AccountMultisig=m;const S=D=>D.toString().replace("ed25519:",""),_=(D,P,x)=>D.map(C=>{const N=C.enum,{gas:k,publicKey:U,methodName:z,args:Y,deposit:G,accessKey:F,code:j}=C[N],Z={type:N[0].toUpperCase()+N.substr(1),gas:k&&k.toString()||void 0,public_key:U&&S(U)||void 0,method_name:z,args:Y&&Buffer.from(Y).toString("base64")||void 0,code:j&&Buffer.from(j).toString("base64")||void 0,amount:G&&G.toString()||void 0,deposit:G&&G.toString()||"0",permission:void 0};if(F&&(x===P&&"fullAccess"!==F.permission.enum&&(Z.permission={receiver_id:P,allowance:s.MULTISIG_ALLOWANCE.toString(),method_names:s.MULTISIG_CHANGE_METHODS}),"functionCall"===F.permission.enum)){const{receiverId:T,methodNames:o,allowance:h}=F.permission.functionCall;Z.permission={receiver_id:T,allowance:h&&h.toString()||void 0,method_names:o}}return Z})},14533:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;const l=u(76999),v=u(37906);class s{constructor(y,f,d,p){this.networkId=y,this.provider=f,this.signer=d,this.jsvmAccountId=p}static fromConfig(y){const f=function E(g){switch(g.type){case void 0:return g;case"JsonRpcProvider":return new v.JsonRpcProvider(Object.assign({},g.args));default:throw new Error(`Unknown provider type ${g.type}`)}}(y.provider),d=function M(g){switch(g.type){case void 0:return g;case"InMemorySigner":return new l.InMemorySigner(g.keyStore);default:throw new Error(`Unknown signer type ${g.type}`)}}(y.signer);return new s(y.networkId,f,d,y.jsvmAccountId)}}n.Connection=s},96280:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(n,"__esModule",{value:!0}),n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=void 0;const v=u(41166),E=l(u(98538));n.MULTISIG_STORAGE_KEY="__multisigRequest",n.MULTISIG_ALLOWANCE=new E.default((0,v.parseNearAmount)("1")),n.MULTISIG_GAS=new E.default("100000000000000"),n.MULTISIG_DEPOSIT=new E.default("0"),n.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],n.MULTISIG_CONFIRM_METHODS=["confirm"]},21257:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(k,U,z,Y){return new(z||(z=Promise))(function(F,j){function Z(h){try{o(Y.next(h))}catch(w){j(w)}}function T(h){try{o(Y.throw(h))}catch(w){j(w)}}function o(h){h.done?F(h.value):function G(F){return F instanceof z?F:new z(function(j){j(F)})}(h.value).then(Z,T)}o((Y=Y.apply(k,U||[])).next())})},v=this&&this.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;const E=u(41166),M=u(17527),s=u(95089),g=v(u(87258)),y=v(u(26474)),f=v(u(98538)),d=v(u(89176)),p=u(84778),m=u(89706);function S(k,U){return{[k]:(...z)=>U(...z)}[k]}function _(k,U,z,Y){var G;if(!x(k))return;if(U.params&&U.params.serialization_type!==p.AbiSerializationType.Json)throw new m.UnsupportedSerializationError(U.name,U.params.serialization_type);if(U.result&&U.result.serialization_type!==p.AbiSerializationType.Json)throw new m.UnsupportedSerializationError(U.name,U.result.serialization_type);const F=(null===(G=U.params)||void 0===G?void 0:G.args)||[];for(const j of F){const Z=k[j.name],T=j.type_schema;T.definitions=Y.body.root_schema.definitions;const o=z.compile(T);if(!o(Z))throw new m.ArgumentSchemaError(j.name,o.errors)}for(const j of Object.keys(k))if(!F.find(T=>T.name===j))throw new m.UnknownArgumentError(j,F.map(T=>T.name))}const P=k=>k&&void 0!==k.byteLength&&k.byteLength===k.length,x=k=>"[object Object]"===Object.prototype.toString.call(k);n.Contract=class C{constructor(U,z,Y){this.account=U,this.contractId=z,this.lve=new s.LocalViewExecution(U);const{viewMethods:G=[],changeMethods:F=[],abi:j,useLocalViewExecution:Z}=Y;let T=G.map(w=>({name:w,abi:null})),o=F.map(w=>({name:w,abi:null}));if(j){if(T.length>0||o.length>0)throw new m.ConflictingOptions;T=j.body.functions.filter(w=>w.kind===p.AbiFunctionKind.View).map(w=>({name:w.name,abi:w})),o=j.body.functions.filter(w=>w.kind===p.AbiFunctionKind.Call).map(w=>({name:w.name,abi:w}))}const h=function D(){const k=new g.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,y.default)(k),k}();T.forEach(({name:w,abi:I})=>{Object.defineProperty(this,w,{writable:!1,enumerable:!0,value:S(w,(R={},V={},...H)=>l(this,void 0,void 0,function*(){if(H.length||!x(R)&&!P(R)||!x(V))throw new M.PositionalArgsError;if(I&&_(R,I,h,j),Z)try{return yield this.lve.viewFunction(Object.assign({contractId:this.contractId,methodName:w,args:R},V))}catch(L){E.Logger.warn(`Local view execution failed with: "${L.message}"`),E.Logger.warn("Fallback to normal RPC call")}return this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:w,args:R},V))}))})}),o.forEach(({name:w,abi:I})=>{Object.defineProperty(this,w,{writable:!1,enumerable:!0,value:S(w,(...R)=>l(this,void 0,void 0,function*(){if(R.length&&(R.length>3||!x(R[0])&&!P(R[0])))throw new M.PositionalArgsError;return(R.length>1||!(R[0]&&R[0].args))&&((0,d.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),R[0]={args:R[0],gas:R[1],amount:R[2]}),I&&_(R[0].args,I,h,j),this._changeMethod(Object.assign({methodName:w},R[0]))}))})})}_changeMethod({args:U,methodName:z,gas:Y,amount:G,meta:F,callbackUrl:j}){return l(this,void 0,void 0,function*(){!function N(k){const U="number, decimal string or BN";for(const z of Object.keys(k)){const Y=k[z];if(Y&&!f.default.isBN(Y)&&isNaN(Y))throw new M.ArgumentTypeError(z,U,Y)}}({gas:Y,amount:G});const Z=yield this.account.functionCall({contractId:this.contractId,methodName:z,args:U,gas:Y,attachedDeposit:G,walletMeta:F,walletCallbackUrl:j});return(0,E.getTransactionLastResult)(Z)})}}},89706:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConflictingOptions=n.ArgumentSchemaError=n.UnknownArgumentError=n.UnsupportedSerializationError=void 0;class u extends Error{constructor(s,g){super(`Contract method '${s}' is using an unsupported serialization type ${g}`)}}n.UnsupportedSerializationError=u;class l extends Error{constructor(s,g){super(`Unrecognized argument '${s}', expected '${JSON.stringify(g)}'`)}}n.UnknownArgumentError=l;class v extends Error{constructor(s,g){super(`Argument '${s}' does not conform to the specified ABI schema: '${JSON.stringify(g)}'`)}}n.ArgumentSchemaError=v;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}n.ConflictingOptions=E},33052:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=n.Contract=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.Connection=n.AccountMultisig=n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=n.Account2FA=n.Account=void 0;var l=u(56618);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}});var v=u(96629);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return v.Account2FA}});var E=u(96891);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var M=u(34763);Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var s=u(14533);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return s.Connection}});var g=u(96280);Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return g.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return g.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return g.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return g.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CONFIRM_METHODS}});var y=u(21257);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return y.Contract}});var f=u(89706);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return f.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return f.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return f.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return f.UnsupportedSerializationError}});var d=u(10757);Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return d.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return d.MultisigStateStatus}})},95089:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})},v=this&&this.__rest||function(y,f){var d={};for(var p in y)Object.prototype.hasOwnProperty.call(y,p)&&f.indexOf(p)<0&&(d[p]=y[p]);if(null!=y&&"function"==typeof Object.getOwnPropertySymbols){var m=0;for(p=Object.getOwnPropertySymbols(y);m()=>{throw new Error("method not implemented: "+y)},s=y=>()=>{throw new Error("method not available for view calls: "+y)};n.Runtime=class g{constructor(f){var{contractCode:d}=f,p=v(f,["contractCode"]);this.context=p,this.wasm=this.prepareWASM(Buffer.from(d,"base64")),this.memory=new WebAssembly.Memory({initial:1024,maximum:2048}),this.registers={},this.logs=[],this.result=Buffer.from([])}readUTF16CStr(f){const d=[],p=new Uint16Array(this.memory.buffer);let m=Number(f)/2;for(;0!=p[m];)d.push(p[m]),m++;return Buffer.from(Uint16Array.from(d).buffer).toString("ucs2")}readUTF8CStr(f,d){const p=[],m=new Uint8Array(this.memory.buffer);let S=Number(d);for(let _=0;_0===Buffer.compare(S.key,p)).map(S=>S.value);return 0===m.length?null:m.length>1?m:m[0]}prepareWASM(f){const d=[];if("\0asm"!==f.subarray(0,4).toString("utf8"))throw new Error("Invalid magic number");const m=f.readUInt32LE(4);if(1!=m)throw new Error("Invalid version: "+m);let S=8;function _(){let U,N=0,k=0;do{U=f[S++],N|=(127&U)<>=7)&&(U|=128),k.push(U)}while(0!==N);return Buffer.from(k)}function C(N){const k=Buffer.from(N,"utf8");return Buffer.concat([x(k.length),k])}d.push(f.subarray(0,S));do{const N=S,k=f.readUInt8(S);S++;const U=_(),z=S+U;if(5==k)d.push(Buffer.from([5,1,0]));else if(2==k){const Y=[],G=_();for(let Z=0;Zthis.panic("explicit guest panic"),panic_utf8:(f,d)=>this.panic(this.readUTF8CStr(f,d)),epoch_height:M("epoch_height"),storage_usage:M("storage_usage"),account_balance:M("account_balance"),account_locked_balance:M("account_locked_balance"),random_seed:M("random_seed"),ripemd160:M("ripemd160"),keccak256:M("keccak256"),keccak512:M("keccak512"),ecrecover:M("ecrecover"),validator_stake:M("validator_stake"),validator_total_stake:M("validator_total_stake"),write_register:s("write_register"),signer_account_id:s("signer_account_id"),signer_account_pk:s("signer_account_pk"),predecessor_account_id:s("predecessor_account_id"),attached_deposit:s("attached_deposit"),prepaid_gas:s("prepaid_gas"),used_gas:s("used_gas"),promise_create:s("promise_create"),promise_then:s("promise_then"),promise_and:s("promise_and"),promise_batch_create:s("promise_batch_create"),promise_batch_then:s("promise_batch_then"),promise_batch_action_create_account:s("promise_batch_action_create_account"),promise_batch_action_deploy_contract:s("promise_batch_action_deploy_contract"),promise_batch_action_function_call:s("promise_batch_action_function_call"),promise_batch_action_function_call_weight:s("promise_batch_action_function_call_weight"),promise_batch_action_transfer:s("promise_batch_action_transfer"),promise_batch_action_stake:s("promise_batch_action_stake"),promise_batch_action_add_key_with_full_access:s("promise_batch_action_add_key_with_full_access"),promise_batch_action_add_key_with_function_call:s("promise_batch_action_add_key_with_function_call"),promise_batch_action_delete_key:s("promise_batch_action_delete_key"),promise_batch_action_delete_account:s("promise_batch_action_delete_account"),promise_results_count:s("promise_results_count"),promise_result:s("promise_result"),promise_return:s("promise_return"),storage_write:s("storage_write"),storage_remove:s("storage_remove")}}execute(f){return l(this,void 0,void 0,function*(){const d=yield WebAssembly.compile(this.wasm),m=(yield WebAssembly.instantiate(d,{env:Object.assign(Object.assign({},this.getHostImports()),{memory:this.memory})})).exports[f];if(null==m)throw new Error(`Contract method '${f}' does not exists in contract ${this.context.contractId} for block id ${this.context.blockHeight}`);return m(),{result:this.result,logs:this.logs}})}}},21345:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Storage=void 0;const l=u(54689);class v{constructor(M={max:v.MAX_ELEMENTS}){this.cache=new l.LRUMap(M.max),this.blockHeights=new Map}load(M){if(!("blockId"in M))return;let g=M.blockId;return 44==g.toString().length&&(g=this.blockHeights.get(g.toString())),this.cache.get(g)}save(M,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f}){this.blockHeights.set(M,s),this.cache.set(s,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f})}}n.Storage=v,v.MAX_ELEMENTS=100},10757:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=void 0,(v=n.MultisigDeleteRequestRejectionError||(n.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",v.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",v.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",v.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",v.METHOD_NOT_FOUND="Contract method is not found",function(v){v[v.INVALID_STATE=0]="INVALID_STATE",v[v.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",v[v.VALID_STATE=2]="VALID_STATE",v[v.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(n.MultisigStateStatus||(n.MultisigStateStatus={}))},29167:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},79189:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(29167);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(94785);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(21866);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(39941);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},94785:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(31116),v=u(21866);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},31116:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},21866:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(41166),E=u(35434),M=l(u(53753)),s=u(29167),g=u(31116),y=u(39941);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(S);this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},39941:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(41166),E=u(35434),M=u(29167);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},30114:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;const v=u(79189),E=u(69170);class s extends E.KeyStore{constructor(y=window.localStorage,f="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=f}setKey(y,f,d){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,f),d.toString())})}getKey(y,f){return l(this,void 0,void 0,function*(){const d=this.localStorage.getItem(this.storageKeyForSecretKey(y,f));return d?v.KeyPair.fromString(d):null})}removeKey(y,f){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,f))})}clear(){return l(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return l(this,void 0,void 0,function*(){const y=new Set;for(const f of this.storageKeys())if(f.startsWith(this.prefix)){const d=f.substring(this.prefix.length).split(":");y.add(d[1])}return Array.from(y.values())})}getAccounts(y){return l(this,void 0,void 0,function*(){const f=new Array;for(const d of this.storageKeys())if(d.startsWith(this.prefix)){const p=d.substring(this.prefix.length).split(":");p[1]===y&&f.push(p[0])}return f})}storageKeyForSecretKey(y,f){return`${this.prefix}${f}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(30114);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},15119:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};function v(E){return new Promise(M=>setTimeout(M,E))}Object.defineProperty(n,"__esModule",{value:!0}),n.exponentialBackoff=void 0,n.exponentialBackoff=function l(E,M,s,g){return u(this,void 0,void 0,function*(){let y=E;for(let f=0;fM(this,void 0,void 0,function*(){var N;try{const k=yield(null!==(N=global.fetch)&&void 0!==N?N:(yield Promise.resolve().then(()=>E(u(11098)))).default)(x.url,{method:P?"POST":"GET",body:P||void 0,headers:Object.assign(Object.assign({},x.headers),{"Content-Type":"application/json"})});if(!k.ok){if(503===k.status)return y.Logger.warn(`Retrying HTTP request for ${x.url} as it's not available now`),null;if(408===k.status)return y.Logger.warn(`Retrying HTTP request for ${x.url} as the previous connection was unused for some time`),null;throw(0,f.default)(k.status,yield k.text())}return k}catch(k){if(k.toString().includes("FetchError")||k.toString().includes("Failed to fetch"))return y.Logger.warn(`Retrying HTTP request for ${x.url} because of error: ${k}`),null;throw k}}));if(!C)throw new g.TypedError(`Exceeded ${S} attempts for ${x.url}.`,"RetriesExceeded");return yield C.json()})}},37906:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=n.Provider=n.JsonRpcProvider=n.exponentialBackoff=void 0;var l=u(15119);Object.defineProperty(n,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var v=u(74452);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}});var E=u(10709);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return E.Provider}});var M=u(33444);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},74452:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})},v=this&&this.__rest||function(D,P){var x={};for(var C in D)Object.prototype.hasOwnProperty.call(D,C)&&P.indexOf(C)<0&&(x[C]=D[C]);if(null!=D&&"function"==typeof Object.getOwnPropertySymbols){var N=0;for(C=Object.getOwnPropertySymbols(D);Nl(this,void 0,void 0,function*(){var k;try{const U={method:P,params:x,id:S++,jsonrpc:"2.0"},z=yield(0,f.fetchJson)(this.connection,JSON.stringify(U));if(z.error){if("object"==typeof z.error.data)throw"string"==typeof z.error.data.error_message&&"string"==typeof z.error.data.error_type?new M.TypedError(z.error.data.error_message,z.error.data.error_type):(0,E.parseRpcError)(z.error.data);{const Y=`[${z.error.code}] ${z.error.message}: ${z.error.data}`;if("Timeout"===z.error.data||Y.includes("Timeout error")||Y.includes("query has timed out"))throw new M.TypedError(Y,"TimeoutError");const G=(0,E.getErrorTypeFromErrorMessage)(z.error.data,"");throw G?new M.TypedError((0,E.formatError)(G,x),G):new M.TypedError(Y,z.error.name)}}if("string"==typeof(null===(k=z.result)||void 0===k?void 0:k.error)){const Y=(0,E.getErrorTypeFromErrorMessage)(z.result.error,"");if(Y)throw new E.ServerError((0,E.formatError)(Y,x),Y)}return z}catch(U){if("TimeoutError"===U.type)return E.Logger.warn(`Retrying request to ${P} as it has timed out`,x),null;throw U}})),{result:N}=C;if(typeof N>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${P}.`,"RetriesExceeded");return N})}}n.JsonRpcProvider=_},10709:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Provider=void 0;n.Provider=class u{}},20012:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.InMemorySigner=void 0;const v=u(79189),E=u(69170),M=u(21837),s=u(83738);class g extends s.Signer{constructor(f){super(),this.keyStore=f}static fromKeyPair(f,d,p){return l(this,void 0,void 0,function*(){const m=new E.InMemoryKeyStore;return yield m.setKey(f,d,p),new g(m)})}createKey(f,d){return l(this,void 0,void 0,function*(){const p=v.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(d,f,p),p.getPublicKey()})}getPublicKey(f,d){return l(this,void 0,void 0,function*(){const p=yield this.keyStore.getKey(d,f);return null===p?null:p.getPublicKey()})}signMessage(f,d,p){return l(this,void 0,void 0,function*(){const m=new Uint8Array((0,M.sha256)(f));if(!d)throw new Error("InMemorySigner requires provided account id");const S=yield this.keyStore.getKey(p,d);if(null===S)throw new Error(`Key for ${d} not found in ${p}`);return S.sign(m)})}toString(){return`InMemorySigner(${this.keyStore})`}}n.InMemorySigner=g},76999:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(20012);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var v=u(83738);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return v.Signer}})},83738:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=void 0;n.Signer=class u{}},27371:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(n,"__esModule",{value:!0}),n.actionCreators=n.stringifyJsonOrBytes=void 0;const v=l(u(98538)),E=u(30681);function f(x){return void 0!==x.byteLength&&x.byteLength===x.length?x:Buffer.from(JSON.stringify(x))}n.stringifyJsonOrBytes=f,n.actionCreators={addKey:function S(x,C){return new E.Action({addKey:new E.AddKey({publicKey:x,accessKey:C})})},createAccount:function g(){return new E.Action({createAccount:new E.CreateAccount({})})},deleteAccount:function D(x){return new E.Action({deleteAccount:new E.DeleteAccount({beneficiaryId:x})})},deleteKey:function _(x){return new E.Action({deleteKey:new E.DeleteKey({publicKey:x})})},deployContract:function y(x){return new E.Action({deployContract:new E.DeployContract({code:x})})},fullAccessKey:function M(){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({fullAccess:new E.FullAccessPermission({})})})},functionCall:function d(x,C,N=new v.default(0),k=new v.default(0),U=f,z=!1){return z?new E.Action({functionCall:new E.FunctionCall({methodName:x,args:C,gas:N,deposit:k})}):new E.Action({functionCall:new E.FunctionCall({methodName:x,args:U(C),gas:N,deposit:k})})},functionCallAccessKey:function s(x,C,N){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({functionCall:new E.FunctionCallPermission({receiverId:x,allowance:N,methodNames:C})})})},signedDelegate:function P({delegateAction:x,signature:C}){return new E.Action({signedDelegate:new E.SignedDelegate({delegateAction:x,signature:C})})},stake:function m(x=new v.default(0),C){return new E.Action({stake:new E.Stake({stake:x,publicKey:C})})},transfer:function p(x=new v.default(0)){return new E.Action({transfer:new E.Transfer({deposit:x})})}}},30681:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Action=n.SignedDelegate=n.DeleteAccount=n.DeleteKey=n.AddKey=n.Stake=n.Transfer=n.FunctionCall=n.DeployContract=n.CreateAccount=n.IAction=n.AccessKey=n.AccessKeyPermission=n.FullAccessPermission=n.FunctionCallPermission=void 0;const l=u(17527);class v{constructor(k){if(1!==Object.keys(k).length)throw new Error("Enum can only take single value");Object.keys(k).map(U=>{this[U]=k[U],this.enum=U})}}class E extends l.Assignable{}n.FunctionCallPermission=E;class M extends l.Assignable{}n.FullAccessPermission=M;n.AccessKeyPermission=class s extends v{};class g extends l.Assignable{}n.AccessKey=g;class y extends l.Assignable{}n.IAction=y;n.CreateAccount=class f extends y{};n.DeployContract=class d extends y{};n.FunctionCall=class p extends y{};n.Transfer=class m extends y{};n.Stake=class S extends y{};n.AddKey=class _ extends y{};n.DeleteKey=class D extends y{};n.DeleteAccount=class P extends y{};n.SignedDelegate=class x extends y{};n.Action=class C extends v{}},51753:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(n,"__esModule",{value:!0}),n.createTransaction=void 0;const v=l(u(98538)),E=u(538);n.createTransaction=function M(s,g,y,f,d,p){return new E.Transaction({signerId:s,publicKey:g,nonce:new v.default(f),receiverId:y,actions:d,blockHash:p})}},36574:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildDelegateAction=n.DelegateAction=void 0;const l=u(17527),v=u(27371),{addKey:E,createAccount:M,deleteAccount:s,deleteKey:g,deployContract:y,functionCall:f,stake:d,transfer:p}=v.actionCreators;class m extends l.Assignable{}n.DelegateAction=m,n.buildDelegateAction=function S({actions:_,maxBlockHeight:D,nonce:P,publicKey:x,receiverId:C,senderId:N}){return new m({senderId:N,receiverId:C,actions:_.map(k=>{if(!k.type&&!k.params)return k;switch(k.type){case"AddKey":{const{publicKey:U,accessKey:z}=k.params;return E(U,z)}case"CreateAccount":return M(k.params.createAccount);case"DeleteAccount":return s(k.params.deleteAccount);case"DeleteKey":return g(k.params.publicKey);case"DeployContract":return y(k.params.code);case"FunctionCall":{const{methodName:U,args:z,gas:Y,deposit:G}=k.params;return f(U,z,Y,G)}case"Stake":return d(k.params.stake,k.params.publicKey);case"Transfer":{const{deposit:U}=k.params;return p(U)}}throw new Error("Unrecognized action")}),nonce:P,maxBlockHeight:D,publicKey:x})}},60898:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(27371),n),v(u(30681),n),v(u(51753),n),v(u(36574),n),v(u(538),n),v(u(46411),n),v(u(11700),n)},10437:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateActionPrefix=void 0;const l=u(17527),v=Math.pow(2,30),E_MetaTransactions=366;class M extends l.Assignable{}class s extends M{constructor(f){super({prefix:v+f})}}n.DelegateActionPrefix=class g extends s{constructor(){super(E_MetaTransactions)}}},538:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA=n.SignedTransaction=n.Transaction=n.decodeSignedTransaction=n.decodeTransaction=n.encodeTransaction=n.encodeSignedDelegate=n.encodeDelegateAction=void 0;const l=u(17527),v=u(3576),E=u(10437);function g(m){const S=m instanceof p?n.SCHEMA.SignedTransaction:n.SCHEMA.Transaction;return(0,v.serialize)(S,m)}function y(m){return new d((0,v.deserialize)(n.SCHEMA.Transaction,m))}function f(m){return new p((0,v.deserialize)(n.SCHEMA.SignedTransaction,m))}n.encodeDelegateAction=function M(m){return new Uint8Array([...(0,v.serialize)(n.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,v.serialize)(n.SCHEMA.DelegateAction,m)])},n.encodeSignedDelegate=function s(m){return(0,v.serialize)(n.SCHEMA.SignedDelegate,m)},n.encodeTransaction=g,n.decodeTransaction=y,n.decodeSignedTransaction=f;class d extends l.Assignable{encode(){return g(this)}static decode(S){return y(S)}}n.Transaction=d;class p extends l.Assignable{encode(){return g(this)}static decode(S){return f(S)}}n.SignedTransaction=p,n.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},46411:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.signDelegateAction=n.signTransaction=void 0;const v=u(21837),E=u(30681),M=u(51753),s=u(538),g=u(11700);function y(p,m,S,_){return l(this,void 0,void 0,function*(){const D=(0,s.encodeTransaction)(p),P=new Uint8Array((0,v.sha256)(D)),x=yield m.signMessage(D,S,_);return[P,new s.SignedTransaction({transaction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:x.signature})})]})}n.signTransaction=function f(...p){return l(this,void 0,void 0,function*(){if(p[0].constructor===s.Transaction){const[m,S,_,D]=p;return y(m,S,_,D)}{const[m,S,_,D,P,x,C]=p,N=yield P.getPublicKey(x,C);return y((0,M.createTransaction)(x,N,m,S,_,D),P,x,C)}})},n.signDelegateAction=function d({delegateAction:p,signer:m}){return l(this,void 0,void 0,function*(){const S=(0,s.encodeDelegateAction)(p),_=yield m.sign(S),D=new E.SignedDelegate({delegateAction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:_})});return{hash:new Uint8Array((0,v.sha256)(S)),signedDelegateAction:D}})}},11700:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signature=void 0;const l=u(17527);class v extends l.Assignable{}n.Signature=v},85014:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},91824:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(65727),v=u(85014),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},17473:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(65727);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=void 0;var l=u(6516);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}});var v=u(34472);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return v.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return v.WalletConnection}})},6516:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})},v=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;const E=u(33052),M=v(u(98538));n.Near=class s{constructor(y){var f;if(this.config=y,this.connection=E.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(f=y.deps)||void 0===f?void 0:f.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const d=y.initialBalance?new M.default(y.initialBalance):new M.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,y.masterAccount),d)}else y.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,y)})}createAccount(y,f){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,f),new E.Account(this.connection,y)})}}},34472:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(P,x,C,N){return new(C||(C=Promise))(function(U,z){function Y(j){try{F(N.next(j))}catch(Z){z(Z)}}function G(j){try{F(N.throw(j))}catch(Z){z(Z)}}function F(j){j.done?U(j.value):function k(U){return U instanceof C?U:new C(function(z){z(U)})}(j.value).then(Y,G)}F((N=N.apply(P,x||[])).next())})},v=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectedWalletAccount=n.WalletConnection=void 0;const E=u(33052),M=u(79189),s=u(41166),g=u(60898),y=v(u(98538)),f=u(80067),S="pending_key";n.WalletConnection=class _{constructor(x,C){if("string"!=typeof C)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(U,z)=>"isSignedIn"===z?()=>!1:"getAccountId"===z?()=>"":U[z]&&"function"==typeof U[z]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:U[z]});this._near=x;const N=C+"_wallet_auth_key",k=JSON.parse(window.localStorage.getItem(N));this._networkId=x.config.networkId,this._walletBaseUrl=x.config.walletUrl,C=C||x.config.contractName||"default",this._keyStore=x.connection.signer.keyStore,this._authData=k||{allKeys:[]},this._authDataKey=N,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignInUrl({contractId:x,methodNames:C,successUrl:N,failureUrl:k}){return l(this,void 0,void 0,function*(){const U=new URL(window.location.href),z=new URL(this._walletBaseUrl+"/login/");if(z.searchParams.set("success_url",N||U.href),z.searchParams.set("failure_url",k||U.href),x){yield(yield this._near.account(x)).state(),z.searchParams.set("contract_id",x);const G=M.KeyPair.fromRandom("ed25519");z.searchParams.set("public_key",G.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,S+G.getPublicKey(),G)}return C&&C.forEach(Y=>{z.searchParams.append("methodNames",Y)}),z.toString()})}requestSignIn(x){return l(this,void 0,void 0,function*(){const C=yield this.requestSignInUrl(x);window.location.assign(C)})}requestSignTransactionsUrl({transactions:x,meta:C,callbackUrl:N}){const k=new URL(window.location.href),U=new URL("sign",this._walletBaseUrl);return U.searchParams.set("transactions",x.map(z=>(0,f.serialize)(g.SCHEMA.Transaction,z)).map(z=>Buffer.from(z).toString("base64")).join(",")),U.searchParams.set("callbackUrl",N||k.href),C&&U.searchParams.set("meta",C),U.toString()}requestSignTransactions(x){const C=this.requestSignTransactionsUrl(x);window.location.assign(C)}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const x=new URL(window.location.href),C=x.searchParams.get("public_key")||"",N=(x.searchParams.get("all_keys")||"").split(","),k=x.searchParams.get("account_id")||"";if(k){const U={accountId:k,allKeys:N};window.localStorage.setItem(this._authDataKey,JSON.stringify(U)),C&&(yield this._moveKeyFromTempToPermanent(k,C)),this._authData=U}x.searchParams.delete("public_key"),x.searchParams.delete("all_keys"),x.searchParams.delete("account_id"),x.searchParams.delete("meta"),x.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,x.toString())})}_moveKeyFromTempToPermanent(x,C){return l(this,void 0,void 0,function*(){const N=yield this._keyStore.getKey(this._networkId,S+C);yield this._keyStore.setKey(this._networkId,x,N),yield this._keyStore.removeKey(this._networkId,S+C)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new D(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class D extends E.Account{constructor(x,C,N){super(C,N),this.walletConnection=x}signAndSendTransaction({receiverId:x,actions:C,walletMeta:N,walletCallbackUrl:k=window.location.href}){const U=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const z=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let Y=yield this.accessKeyForTransaction(x,C,z);if(!Y)throw new Error(`Cannot find matching key for transaction sent to ${x}`);if(z&&z.toString()===Y.public_key)try{return yield U.signAndSendTransaction.call(this,{receiverId:x,actions:C})}catch(o){if("NotEnoughAllowance"!==o.type)throw o;Y=yield this.accessKeyForTransaction(x,C)}const G=yield this.connection.provider.block({finality:"final"}),F=(0,s.baseDecode)(G.header.hash),j=M.PublicKey.from(Y.public_key),Z=Y.access_key.nonce.add(new y.default(1)),T=(0,g.createTransaction)(this.accountId,j,x,Z,C,F);return yield this.walletConnection.requestSignTransactions({transactions:[T],meta:N,callbackUrl:k}),new Promise((o,h)=>{setTimeout(()=>{h(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(x,C,N){return l(this,void 0,void 0,function*(){const{access_key:{permission:k}}=x;if("FullAccess"===k)return!0;if(k.FunctionCall){const{receiver_id:U,method_names:z}=k.FunctionCall;if(U===this.accountId&&z.includes("add_request_and_confirm"))return!0;if(U===C){if(1!==N.length)return!1;const[{functionCall:Y}]=N;return Y&&(!Y.deposit||"0"===Y.deposit.toString())&&(0===z.length||z.includes(Y.methodName))}}return!1})}accessKeyForTransaction(x,C,N){return l(this,void 0,void 0,function*(){const k=yield this.getAccessKeys();if(N){const z=k.find(Y=>Y.public_key.toString()===N.toString());if(z&&(yield this.accessKeyMatchesTransaction(z,x,C)))return z}const U=this.walletConnection._authData.allKeys;for(const z of k)if(-1!==U.indexOf(z.public_key)&&(yield this.accessKeyMatchesTransaction(z,x,C)))return z;return null})}}n.ConnectedWalletAccount=D},95669:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},33873:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(74234),v=u(95669),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},75343:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(74234);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{"use strict";function u(f){if(!Number.isSafeInteger(f)||f<0)throw new Error(`Wrong positive integer: ${f}`)}function l(f){if("boolean"!=typeof f)throw new Error(`Expected boolean, not ${f}`)}function E(f,...d){if(!function v(f){return f instanceof Uint8Array||null!=f&&"object"==typeof f&&"Uint8Array"===f.constructor.name}(f))throw new Error("Expected Uint8Array");if(d.length>0&&!d.includes(f.length))throw new Error(`Expected Uint8Array of length ${d}, not of length=${f.length}`)}function M(f){if("function"!=typeof f||"function"!=typeof f.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");u(f.outputLen),u(f.blockLen)}function s(f,d=!0){if(f.destroyed)throw new Error("Hash instance has been destroyed");if(d&&f.finished)throw new Error("Hash#digest() has already been called")}function g(f,d){E(f);const p=d.outputLen;if(f.length{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const l=u(49929),v=u(66601);class M extends v.Hash{constructor(g,y,f,d){super(),this.blockLen=g,this.outputLen=y,this.padOffset=f,this.isLE=d,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(g),this.view=(0,v.createView)(this.buffer)}update(g){(0,l.exists)(this);const{view:y,buffer:f,blockLen:d}=this,p=(g=(0,v.toBytes)(g)).length;for(let m=0;md-m&&(this.process(f,0),m=0);for(let x=m;x>d&p),S=Number(y&p),_=f?4:0,D=f?0:4;s.setUint32(g+_,m,f),s.setUint32(g+D,S,f)})(f,d-8,BigInt(8*this.length),p),this.process(f,0);const S=(0,v.createView)(g),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const D=_/4,P=this.get();if(D>P.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},21837:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const l=u(60959),v=u(66601),E=(p,m,S)=>p&m^~p&S,M=(p,m,S)=>p&m^p&S^m&S,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),g=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64);class f extends l.SHA2{constructor(){super(64,32,8,!1),this.A=0|g[0],this.B=0|g[1],this.C=0|g[2],this.D=0|g[3],this.E=0|g[4],this.F=0|g[5],this.G=0|g[6],this.H=0|g[7]}get(){const{A:m,B:S,C:_,D,E:P,F:x,G:C,H:N}=this;return[m,S,_,D,P,x,C,N]}set(m,S,_,D,P,x,C,N){this.A=0|m,this.B=0|S,this.C=0|_,this.D=0|D,this.E=0|P,this.F=0|x,this.G=0|C,this.H=0|N}process(m,S){for(let z=0;z<16;z++,S+=4)y[z]=m.getUint32(S,!1);for(let z=16;z<64;z++){const Y=y[z-15],G=y[z-2],F=(0,v.rotr)(Y,7)^(0,v.rotr)(Y,18)^Y>>>3,j=(0,v.rotr)(G,17)^(0,v.rotr)(G,19)^G>>>10;y[z]=j+y[z-7]+F+y[z-16]|0}let{A:_,B:D,C:P,D:x,E:C,F:N,G:k,H:U}=this;for(let z=0;z<64;z++){const G=U+((0,v.rotr)(C,6)^(0,v.rotr)(C,11)^(0,v.rotr)(C,25))+E(C,N,k)+s[z]+y[z]|0,j=((0,v.rotr)(_,2)^(0,v.rotr)(_,13)^(0,v.rotr)(_,22))+M(_,D,P)|0;U=k,k=N,N=C,C=x+G|0,x=P,P=D,D=_,_=G+j|0}_=_+this.A|0,D=D+this.B|0,P=P+this.C|0,x=x+this.D|0,C=C+this.E|0,N=N+this.F|0,k=k+this.G|0,U=U+this.H|0,this.set(_,D,P,x,C,N,k,U)}roundClean(){y.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends f{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,v.wrapConstructor)(()=>new f),n.sha224=(0,v.wrapConstructor)(()=>new d)},66601:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const v=u(36868);n.u8=Z=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);function s(Z){return Z instanceof Uint8Array||null!=Z&&"object"==typeof Z&&"Uint8Array"===Z.constructor.name}n.u32=Z=>new Uint32Array(Z.buffer,Z.byteOffset,Math.floor(Z.byteLength/4));n.createView=Z=>new DataView(Z.buffer,Z.byteOffset,Z.byteLength);if(n.rotr=(Z,T)=>Z<<32-T|Z>>>T,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const f=Array.from({length:256},(Z,T)=>T.toString(16).padStart(2,"0"));n.bytesToHex=function d(Z){if(!s(Z))throw new Error("Uint8Array expected");let T="";for(let o=0;o=p._0&&Z<=p._9?Z-p._0:Z>=p._A&&Z<=p._F?Z-(p._A-10):Z>=p._a&&Z<=p._f?Z-(p._a-10):void 0}n.hexToBytes=function S(Z){if("string"!=typeof Z)throw new Error("hex string expected, got "+typeof Z);const T=Z.length,o=T/2;if(T%2)throw new Error("padded hex string expected, got unpadded hex of length "+T);const h=new Uint8Array(o);for(let w=0,I=0;w=0&&IZ().update(C(h)).digest(),o=Z();return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=()=>Z(),T},n.wrapConstructorWithOpts=function G(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.wrapXOFConstructorWithOpts=function F(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.randomBytes=function j(Z=32){if(v.crypto&&"function"==typeof v.crypto.getRandomValues)return v.crypto.getRandomValues(new Uint8Array(Z));throw new Error("crypto.getRandomValues must be defined")}},87258:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;const l=u(10616),v=u(45502),E=u(37703),M=u(87088),s=["/properties"],g="http://json-schema.org/draft-07/schema";class y extends l.default{_addVocabularies(){super._addVocabularies(),v.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(E.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(M,s):M;this.addMetaSchema(_,g,!1),this.refs["http://json-schema.org/schema"]=g}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(g)?g:void 0)}}q.exports=n=y,Object.defineProperty(n,"__esModule",{value:!0}),n.default=y;var f=u(41161);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=u(33987);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=u(64861);Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=u(74827);Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},8010:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class u{}n._CodeOrName=u,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends u{constructor(C){if(super(),!n.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=l;class v extends u{constructor(C){super(),this._items="string"==typeof C?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return""===C||'""'===C}get str(){var C;return null!==(C=this._str)&&void 0!==C?C:this._str=this._items.reduce((N,k)=>`${N}${k}`,"")}get names(){var C;return null!==(C=this._names)&&void 0!==C?C:this._names=this._items.reduce((N,k)=>(k instanceof l&&(N[k.str]=(N[k.str]||0)+1),N),{})}}function E(x,...C){const N=[x[0]];let k=0;for(;k{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const l=u(8010),v=u(87505);var E=u(8010);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return E.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return E.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return E.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return E.Name}});var M=u(87505);Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return M.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return M.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return M.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return M.varKinds}}),n.operators={GT:new l._Code(">"),GTE:new l._Code(">="),LT:new l._Code("<"),LTE:new l._Code("<="),EQ:new l._Code("==="),NEQ:new l._Code("!=="),NOT:new l._Code("!"),OR:new l._Code("||"),AND:new l._Code("&&"),ADD:new l._Code("+")};class s{optimizeNodes(){return this}optimizeNames(te,ae){return this}}class g extends s{constructor(te,ae,ge){super(),this.varKind=te,this.name=ae,this.rhs=ge}render({es5:te,_n:ae}){const ge=te?v.varKinds.var:this.varKind,pe=void 0===this.rhs?"":` = ${this.rhs}`;return`${ge} ${this.name}${pe};`+ae}optimizeNames(te,ae){if(te[this.name.str])return this.rhs&&(this.rhs=w(this.rhs,te,ae)),this}get names(){return this.rhs instanceof l._CodeOrName?this.rhs.names:{}}}class y extends s{constructor(te,ae,ge){super(),this.lhs=te,this.rhs=ae,this.sideEffects=ge}render({_n:te}){return`${this.lhs} = ${this.rhs};`+te}optimizeNames(te,ae){if(!(this.lhs instanceof l.Name)||te[this.lhs.str]||this.sideEffects)return this.rhs=w(this.rhs,te,ae),this}get names(){return h(this.lhs instanceof l.Name?{}:{...this.lhs.names},this.rhs)}}class f extends y{constructor(te,ae,ge,pe){super(te,ge,pe),this.op=ae}render({_n:te}){return`${this.lhs} ${this.op}= ${this.rhs};`+te}}class d extends s{constructor(te){super(),this.label=te,this.names={}}render({_n:te}){return`${this.label}:`+te}}class p extends s{constructor(te){super(),this.label=te,this.names={}}render({_n:te}){return`break${this.label?` ${this.label}`:""};`+te}}class m extends s{constructor(te){super(),this.error=te}render({_n:te}){return`throw ${this.error};`+te}get names(){return this.error.names}}class S extends s{constructor(te){super(),this.code=te}render({_n:te}){return`${this.code};`+te}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(te,ae){return this.code=w(this.code,te,ae),this}get names(){return this.code instanceof l._CodeOrName?this.code.names:{}}}class _ extends s{constructor(te=[]){super(),this.nodes=te}render(te){return this.nodes.reduce((ae,ge)=>ae+ge.render(te),"")}optimizeNodes(){const{nodes:te}=this;let ae=te.length;for(;ae--;){const ge=te[ae].optimizeNodes();Array.isArray(ge)?te.splice(ae,1,...ge):ge?te[ae]=ge:te.splice(ae,1)}return te.length>0?this:void 0}optimizeNames(te,ae){const{nodes:ge}=this;let pe=ge.length;for(;pe--;){const we=ge[pe];we.optimizeNames(te,ae)||(I(te,we.names),ge.splice(pe,1))}return ge.length>0?this:void 0}get names(){return this.nodes.reduce((te,ae)=>o(te,ae.names),{})}}class D extends _{render(te){return"{"+te._n+super.render(te)+"}"+te._n}}class P extends _{}class x extends D{}x.kind="else";class C extends D{constructor(te,ae){super(ae),this.condition=te}render(te){let ae=`if(${this.condition})`+super.render(te);return this.else&&(ae+="else "+this.else.render(te)),ae}optimizeNodes(){super.optimizeNodes();const te=this.condition;if(!0===te)return this.nodes;let ae=this.else;if(ae){const ge=ae.optimizeNodes();ae=this.else=Array.isArray(ge)?new x(ge):ge}return ae?!1===te?ae instanceof C?ae:ae.nodes:this.nodes.length?this:new C(R(te),ae instanceof C?[ae]:ae.nodes):!1!==te&&this.nodes.length?this:void 0}optimizeNames(te,ae){var ge;if(this.else=null===(ge=this.else)||void 0===ge?void 0:ge.optimizeNames(te,ae),super.optimizeNames(te,ae)||this.else)return this.condition=w(this.condition,te,ae),this}get names(){const te=super.names;return h(te,this.condition),this.else&&o(te,this.else.names),te}}C.kind="if";class N extends D{}N.kind="for";class k extends N{constructor(te){super(),this.iteration=te}render(te){return`for(${this.iteration})`+super.render(te)}optimizeNames(te,ae){if(super.optimizeNames(te,ae))return this.iteration=w(this.iteration,te,ae),this}get names(){return o(super.names,this.iteration.names)}}class U extends N{constructor(te,ae,ge,pe){super(),this.varKind=te,this.name=ae,this.from=ge,this.to=pe}render(te){const ae=te.es5?v.varKinds.var:this.varKind,{name:ge,from:pe,to:we}=this;return`for(${ae} ${ge}=${pe}; ${ge}<${we}; ${ge}++)`+super.render(te)}get names(){const te=h(super.names,this.from);return h(te,this.to)}}class z extends N{constructor(te,ae,ge,pe){super(),this.loop=te,this.varKind=ae,this.name=ge,this.iterable=pe}render(te){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(te)}optimizeNames(te,ae){if(super.optimizeNames(te,ae))return this.iterable=w(this.iterable,te,ae),this}get names(){return o(super.names,this.iterable.names)}}class Y extends D{constructor(te,ae,ge){super(),this.name=te,this.args=ae,this.async=ge}render(te){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(te)}}Y.kind="func";class G extends _{render(te){return"return "+super.render(te)}}G.kind="return";class F extends D{render(te){let ae="try"+super.render(te);return this.catch&&(ae+=this.catch.render(te)),this.finally&&(ae+=this.finally.render(te)),ae}optimizeNodes(){var te,ae;return super.optimizeNodes(),null===(te=this.catch)||void 0===te||te.optimizeNodes(),null===(ae=this.finally)||void 0===ae||ae.optimizeNodes(),this}optimizeNames(te,ae){var ge,pe;return super.optimizeNames(te,ae),null===(ge=this.catch)||void 0===ge||ge.optimizeNames(te,ae),null===(pe=this.finally)||void 0===pe||pe.optimizeNames(te,ae),this}get names(){const te=super.names;return this.catch&&o(te,this.catch.names),this.finally&&o(te,this.finally.names),te}}class j extends D{constructor(te){super(),this.error=te}render(te){return`catch(${this.error})`+super.render(te)}}j.kind="catch";class Z extends D{render(te){return"finally"+super.render(te)}}Z.kind="finally";function o(ne,te){for(const ae in te)ne[ae]=(ne[ae]||0)+(te[ae]||0);return ne}function h(ne,te){return te instanceof l._CodeOrName?o(ne,te.names):ne}function w(ne,te,ae){return ne instanceof l.Name?ge(ne):function pe(we){return we instanceof l._Code&&we._items.some(ce=>ce instanceof l.Name&&1===te[ce.str]&&void 0!==ae[ce.str])}(ne)?new l._Code(ne._items.reduce((we,ce)=>(ce instanceof l.Name&&(ce=ge(ce)),ce instanceof l._Code?we.push(...ce._items):we.push(ce),we),[])):ne;function ge(we){const ce=ae[we.str];return void 0===ce||1!==te[we.str]?we:(delete te[we.str],ce)}}function I(ne,te){for(const ae in te)ne[ae]=(ne[ae]||0)-(te[ae]||0)}function R(ne){return"boolean"==typeof ne||"number"==typeof ne||null===ne?!ne:l._`!${re(ne)}`}n.CodeGen=class T{constructor(te,ae={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ae,_n:ae.lines?"\n":""},this._extScope=te,this._scope=new v.Scope({parent:te}),this._nodes=[new P]}toString(){return this._root.render(this.opts)}name(te){return this._scope.name(te)}scopeName(te){return this._extScope.name(te)}scopeValue(te,ae){const ge=this._extScope.value(te,ae);return(this._values[ge.prefix]||(this._values[ge.prefix]=new Set)).add(ge),ge}getScopeValue(te,ae){return this._extScope.getValue(te,ae)}scopeRefs(te){return this._extScope.scopeRefs(te,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(te,ae,ge,pe){const we=this._scope.toName(ae);return void 0!==ge&&pe&&(this._constants[we.str]=ge),this._leafNode(new g(te,we,ge)),we}const(te,ae,ge){return this._def(v.varKinds.const,te,ae,ge)}let(te,ae,ge){return this._def(v.varKinds.let,te,ae,ge)}var(te,ae,ge){return this._def(v.varKinds.var,te,ae,ge)}assign(te,ae,ge){return this._leafNode(new y(te,ae,ge))}add(te,ae){return this._leafNode(new f(te,n.operators.ADD,ae))}code(te){return"function"==typeof te?te():te!==l.nil&&this._leafNode(new S(te)),this}object(...te){const ae=["{"];for(const[ge,pe]of te)ae.length>1&&ae.push(","),ae.push(ge),(ge!==pe||this.opts.es5)&&(ae.push(":"),(0,l.addCodeArg)(ae,pe));return ae.push("}"),new l._Code(ae)}if(te,ae,ge){if(this._blockNode(new C(te)),ae&&ge)this.code(ae).else().code(ge).endIf();else if(ae)this.code(ae).endIf();else if(ge)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(te){return this._elseNode(new C(te))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(C,x)}_for(te,ae){return this._blockNode(te),ae&&this.code(ae).endFor(),this}for(te,ae){return this._for(new k(te),ae)}forRange(te,ae,ge,pe,we=(this.opts.es5?v.varKinds.var:v.varKinds.let)){const ce=this._scope.toName(te);return this._for(new U(we,ce,ae,ge),()=>pe(ce))}forOf(te,ae,ge,pe=v.varKinds.const){const we=this._scope.toName(te);if(this.opts.es5){const ce=ae instanceof l.Name?ae:this.var("_arr",ae);return this.forRange("_i",0,l._`${ce}.length`,le=>{this.var(we,l._`${ce}[${le}]`),ge(we)})}return this._for(new z("of",pe,we,ae),()=>ge(we))}forIn(te,ae,ge,pe=(this.opts.es5?v.varKinds.var:v.varKinds.const)){if(this.opts.ownProperties)return this.forOf(te,l._`Object.keys(${ae})`,ge);const we=this._scope.toName(te);return this._for(new z("in",pe,we,ae),()=>ge(we))}endFor(){return this._endBlockNode(N)}label(te){return this._leafNode(new d(te))}break(te){return this._leafNode(new p(te))}return(te){const ae=new G;if(this._blockNode(ae),this.code(te),1!==ae.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(G)}try(te,ae,ge){if(!ae&&!ge)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new F;if(this._blockNode(pe),this.code(te),ae){const we=this.name("e");this._currNode=pe.catch=new j(we),ae(we)}return ge&&(this._currNode=pe.finally=new Z,this.code(ge)),this._endBlockNode(j,Z)}throw(te){return this._leafNode(new m(te))}block(te,ae){return this._blockStarts.push(this._nodes.length),te&&this.code(te).endBlock(ae),this}endBlock(te){const ae=this._blockStarts.pop();if(void 0===ae)throw new Error("CodeGen: not in self-balancing block");const ge=this._nodes.length-ae;if(ge<0||void 0!==te&&ge!==te)throw new Error(`CodeGen: wrong number of nodes: ${ge} vs ${te} expected`);return this._nodes.length=ae,this}func(te,ae=l.nil,ge,pe){return this._blockNode(new Y(te,ae,ge)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(Y)}optimize(te=1){for(;te-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(te){return this._currNode.nodes.push(te),this}_blockNode(te){this._currNode.nodes.push(te),this._nodes.push(te)}_endBlockNode(te,ae){const ge=this._currNode;if(ge instanceof te||ae&&ge instanceof ae)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ae?`${te.kind}/${ae.kind}`:te.kind}"`)}_elseNode(te){const ae=this._currNode;if(!(ae instanceof C))throw new Error('CodeGen: "else" without "if"');return this._currNode=ae.else=te,this}get _root(){return this._nodes[0]}get _currNode(){const te=this._nodes;return te[te.length-1]}set _currNode(te){const ae=this._nodes;ae[ae.length-1]=te}},n.not=R;const V=B(n.operators.AND);n.and=function H(...ne){return ne.reduce(V)};const L=B(n.operators.OR);function B(ne){return(te,ae)=>te===l.nil?ae:ae===l.nil?te:l._`${re(te)} ${ne} ${re(ae)}`}function re(ne){return ne instanceof l.Name?ne:l._`(${ne})`}n.or=function b(...ne){return ne.reduce(L)}},87505:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;const l=u(8010);class v extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var E,f;(f=E=n.UsedValueState||(n.UsedValueState={}))[f.Started=0]="Started",f[f.Completed=1]="Completed",n.varKinds={const:new l.Name("const"),let:new l.Name("let"),var:new l.Name("var")};class M{constructor({prefixes:d,parent:p}={}){this._names={},this._prefixes=d,this._parent=p}toName(d){return d instanceof l.Name?d:this.name(d)}name(d){return new l.Name(this._newName(d))}_newName(d){return`${d}${(this._names[d]||this._nameGroup(d)).index++}`}_nameGroup(d){var p,m;if(null!==(m=null===(p=this._parent)||void 0===p?void 0:p._prefixes)&&void 0!==m&&m.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}n.Scope=M;class s extends l.Name{constructor(d,p){super(p),this.prefix=d}setValue(d,{property:p,itemIndex:m}){this.value=d,this.scopePath=l._`.${new l.Name(p)}[${m}]`}}n.ValueScopeName=s;const g=l._`\n`;n.ValueScope=class y extends M{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?g:l.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,p){var m;if(void 0===p.ref)throw new Error("CodeGen: ref must be passed in value");const S=this.toName(d),{prefix:_}=S,D=null!==(m=p.key)&&void 0!==m?m:p.ref;let P=this._values[_];if(P){const N=P.get(D);if(N)return N}else P=this._values[_]=new Map;P.set(D,S);const x=this._scope[_]||(this._scope[_]=[]),C=x.length;return x[C]=p.ref,S.setValue(p,{property:_,itemIndex:C}),S}getValue(d,p){const m=this._values[d];if(m)return m.get(p)}scopeRefs(d,p=this._values){return this._reduceValues(p,m=>{if(void 0===m.scopePath)throw new Error(`CodeGen: name "${m}" has no value`);return l._`${d}${m.scopePath}`})}scopeCode(d=this._values,p,m){return this._reduceValues(d,S=>{if(void 0===S.value)throw new Error(`CodeGen: name "${S}" has no value`);return S.value.code},p,m)}_reduceValues(d,p,m={},S){let _=l.nil;for(const D in d){const P=d[D];if(!P)continue;const x=m[D]=m[D]||new Map;P.forEach(C=>{if(x.has(C))return;x.set(C,E.Started);let N=p(C);if(N){const k=this.opts.es5?n.varKinds.var:n.varKinds.const;_=l._`${_}${k} ${C} = ${N};${this.opts._n}`}else{if(!(N=S?.(C)))throw new v(C);_=l._`${_}${N}${this.opts._n}`}x.set(C,E.Completed)})}return _}}},58935:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const l=u(33987),v=u(37012),E=u(32861);function f(x,C){const N=x.const("err",C);x.if(l._`${E.default.vErrors} === null`,()=>x.assign(E.default.vErrors,l._`[${N}]`),l._`${E.default.vErrors}.push(${N})`),x.code(l._`${E.default.errors}++`)}function d(x,C){const{gen:N,validateName:k,schemaEnv:U}=x;U.$async?N.throw(l._`new ${x.ValidationError}(${C})`):(N.assign(l._`${k}.errors`,C),N.return(!1))}n.keywordError={message:({keyword:x})=>l.str`must pass "${x}" keyword validation`},n.keyword$DataError={message:({keyword:x,schemaType:C})=>C?l.str`"${x}" keyword must be ${C} ($data)`:l.str`"${x}" keyword is invalid ($data)`},n.reportError=function M(x,C=n.keywordError,N,k){const{it:U}=x,{gen:z,compositeRule:Y,allErrors:G}=U,F=m(x,C,N);k??(Y||G)?f(z,F):d(U,l._`[${F}]`)},n.reportExtraError=function s(x,C=n.keywordError,N){const{it:k}=x,{gen:U,compositeRule:z,allErrors:Y}=k;f(U,m(x,C,N)),z||Y||d(k,E.default.vErrors)},n.resetErrorsCount=function g(x,C){x.assign(E.default.errors,C),x.if(l._`${E.default.vErrors} !== null`,()=>x.if(C,()=>x.assign(l._`${E.default.vErrors}.length`,C),()=>x.assign(E.default.vErrors,null)))},n.extendErrors=function y({gen:x,keyword:C,schemaValue:N,data:k,errsCount:U,it:z}){if(void 0===U)throw new Error("ajv implementation error");const Y=x.name("err");x.forRange("i",U,E.default.errors,G=>{x.const(Y,l._`${E.default.vErrors}[${G}]`),x.if(l._`${Y}.instancePath === undefined`,()=>x.assign(l._`${Y}.instancePath`,(0,l.strConcat)(E.default.instancePath,z.errorPath))),x.assign(l._`${Y}.schemaPath`,l.str`${z.errSchemaPath}/${C}`),z.opts.verbose&&(x.assign(l._`${Y}.schema`,N),x.assign(l._`${Y}.data`,k))})};const p={keyword:new l.Name("keyword"),schemaPath:new l.Name("schemaPath"),params:new l.Name("params"),propertyName:new l.Name("propertyName"),message:new l.Name("message"),schema:new l.Name("schema"),parentSchema:new l.Name("parentSchema")};function m(x,C,N){const{createErrors:k}=x.it;return!1===k?l._`{}`:function S(x,C,N={}){const{gen:k,it:U}=x,z=[_(U,N),D(x,N)];return function P(x,{params:C,message:N},k){const{keyword:U,data:z,schemaValue:Y,it:G}=x,{opts:F,propertyName:j,topSchemaRef:Z,schemaPath:T}=G;k.push([p.keyword,U],[p.params,"function"==typeof C?C(x):C||l._`{}`]),F.messages&&k.push([p.message,"function"==typeof N?N(x):N]),F.verbose&&k.push([p.schema,Y],[p.parentSchema,l._`${Z}${T}`],[E.default.data,z]),j&&k.push([p.propertyName,j])}(x,C,z),k.object(...z)}(x,C,N)}function _({errorPath:x},{instancePath:C}){const N=C?l.str`${x}${(0,v.getErrorPath)(C,v.Type.Str)}`:x;return[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,N)]}function D({keyword:x,it:{errSchemaPath:C}},{schemaPath:N,parentSchema:k}){let U=k?C:l.str`${C}/${x}`;return N&&(U=l.str`${U}${(0,v.getErrorPath)(N,v.Type.Str)}`),[p.schemaPath,U]}},13427:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveSchema=n.getCompilingSchema=n.resolveRef=n.compileSchema=n.SchemaEnv=void 0;const l=u(33987),v=u(64861),E=u(32861),M=u(95508),s=u(37012),g=u(41161);class y{constructor(N){var k;let U;this.refs={},this.dynamicAnchors={},"object"==typeof N.schema&&(U=N.schema),this.schema=N.schema,this.schemaId=N.schemaId,this.root=N.root||this,this.baseId=null!==(k=N.baseId)&&void 0!==k?k:(0,M.normalizeId)(U?.[N.schemaId||"$id"]),this.schemaPath=N.schemaPath,this.localRefs=N.localRefs,this.meta=N.meta,this.$async=U?.$async,this.refs={}}}function f(C){const N=m.call(this,C);if(N)return N;const k=(0,M.getFullPath)(this.opts.uriResolver,C.root.baseId),{es5:U,lines:z}=this.opts.code,{ownProperties:Y}=this.opts,G=new l.CodeGen(this.scope,{es5:U,lines:z,ownProperties:Y});let F;C.$async&&(F=G.scopeValue("Error",{ref:v.default,code:l._`require("ajv/dist/runtime/validation_error").default`}));const j=G.scopeName("validate");C.validateName=j;const Z={gen:G,allErrors:this.opts.allErrors,data:E.default.data,parentData:E.default.parentData,parentDataProperty:E.default.parentDataProperty,dataNames:[E.default.data],dataPathArr:[l.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:G.scopeValue("schema",!0===this.opts.code.source?{ref:C.schema,code:(0,l.stringify)(C.schema)}:{ref:C.schema}),validateName:j,ValidationError:F,schema:C.schema,schemaEnv:C,rootId:k,baseId:C.baseId||k,schemaPath:l.nil,errSchemaPath:C.schemaPath||(this.opts.jtd?"":"#"),errorPath:l._`""`,opts:this.opts,self:this};let T;try{this._compilations.add(C),(0,g.validateFunctionCode)(Z),G.optimize(this.opts.code.optimize);const o=G.toString();T=`${G.scopeRefs(E.default.scope)}return ${o}`,this.opts.code.process&&(T=this.opts.code.process(T,C));const w=new Function(`${E.default.self}`,`${E.default.scope}`,T)(this,this.scope.get());if(this.scope.value(j,{ref:w}),w.errors=null,w.schema=C.schema,w.schemaEnv=C,C.$async&&(w.$async=!0),!0===this.opts.code.source&&(w.source={validateName:j,validateCode:o,scopeValues:G._values}),this.opts.unevaluated){const{props:I,items:R}=Z;w.evaluated={props:I instanceof l.Name?void 0:I,items:R instanceof l.Name?void 0:R,dynamicProps:I instanceof l.Name,dynamicItems:R instanceof l.Name},w.source&&(w.source.evaluated=(0,l.stringify)(w.evaluated))}return C.validate=w,C}catch(o){throw delete C.validate,delete C.validateName,T&&this.logger.error("Error compiling schema, function code:",T),o}finally{this._compilations.delete(C)}}function p(C){return(0,M.inlineRef)(C.schema,this.opts.inlineRefs)?C.schema:C.validate?C:f.call(this,C)}function m(C){for(const N of this._compilations)if(S(N,C))return N}function S(C,N){return C.schema===N.schema&&C.root===N.root&&C.baseId===N.baseId}function _(C,N){let k;for(;"string"==typeof(k=this.refs[N]);)N=k;return k||this.schemas[N]||D.call(this,C,N)}function D(C,N){const k=this.opts.uriResolver.parse(N),U=(0,M._getFullPath)(this.opts.uriResolver,k);let z=(0,M.getFullPath)(this.opts.uriResolver,C.baseId,void 0);if(Object.keys(C.schema).length>0&&U===z)return x.call(this,k,C);const Y=(0,M.normalizeId)(U),G=this.refs[Y]||this.schemas[Y];if("string"==typeof G){const F=D.call(this,C,G);return"object"!=typeof F?.schema?void 0:x.call(this,k,F)}if("object"==typeof G?.schema){if(G.validate||f.call(this,G),Y===(0,M.normalizeId)(N)){const{schema:F}=G,{schemaId:j}=this.opts,Z=F[j];return Z&&(z=(0,M.resolveUrl)(this.opts.uriResolver,z,Z)),new y({schema:F,schemaId:j,root:C,baseId:z})}return x.call(this,k,G)}}n.SchemaEnv=y,n.compileSchema=f,n.resolveRef=function d(C,N,k){var U;k=(0,M.resolveUrl)(this.opts.uriResolver,N,k);const z=C.refs[k];if(z)return z;let Y=_.call(this,C,k);if(void 0===Y){const G=null===(U=C.localRefs)||void 0===U?void 0:U[k],{schemaId:F}=this.opts;G&&(Y=new y({schema:G,schemaId:F,root:C,baseId:N}))}return void 0!==Y?C.refs[k]=p.call(this,Y):void 0},n.getCompilingSchema=m,n.resolveSchema=D;const P=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function x(C,{baseId:N,schema:k,root:U}){var z;if("/"!==(null===(z=C.fragment)||void 0===z?void 0:z[0]))return;for(const F of C.fragment.slice(1).split("/")){if("boolean"==typeof k)return;const j=k[(0,s.unescapeFragment)(F)];if(void 0===j)return;const Z="object"==typeof(k=j)&&k[this.opts.schemaId];!P.has(F)&&Z&&(N=(0,M.resolveUrl)(this.opts.uriResolver,N,Z))}let Y;if("boolean"!=typeof k&&k.$ref&&!(0,s.schemaHasRulesButRef)(k,this.RULES)){const F=(0,M.resolveUrl)(this.opts.uriResolver,N,k.$ref);Y=D.call(this,U,F)}const{schemaId:G}=this.opts;return Y=Y||new y({schema:k,schemaId:G,root:U,baseId:N}),Y.schema!==Y.root.schema?Y:void 0}},32861:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v={data:new l.Name("data"),valCxt:new l.Name("valCxt"),instancePath:new l.Name("instancePath"),parentData:new l.Name("parentData"),parentDataProperty:new l.Name("parentDataProperty"),rootData:new l.Name("rootData"),dynamicAnchors:new l.Name("dynamicAnchors"),vErrors:new l.Name("vErrors"),errors:new l.Name("errors"),this:new l.Name("this"),self:new l.Name("self"),scope:new l.Name("scope"),json:new l.Name("json"),jsonPos:new l.Name("jsonPos"),jsonLen:new l.Name("jsonLen"),jsonPart:new l.Name("jsonPart")};n.default=v},74827:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(95508);class v extends Error{constructor(M,s,g,y){super(y||`can't resolve reference ${g} from id ${s}`),this.missingRef=(0,l.resolveUrl)(M,s,g),this.missingSchema=(0,l.normalizeId)((0,l.getFullPath)(M,this.missingRef))}}n.default=v},95508:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSchemaRefs=n.resolveUrl=n.normalizeId=n._getFullPath=n.getFullPath=n.inlineRef=void 0;const l=u(37012),v=u(12559),E=u(23366),M=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);n.inlineRef=function s(x,C=!0){return"boolean"==typeof x||(!0===C?!y(x):!!C&&f(x)<=C)};const g=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y(x){for(const C in x){if(g.has(C))return!0;const N=x[C];if(Array.isArray(N)&&N.some(y)||"object"==typeof N&&y(N))return!0}return!1}function f(x){let C=0;for(const N in x){if("$ref"===N)return 1/0;if(C++,!M.has(N)&&("object"==typeof x[N]&&(0,l.eachItem)(x[N],k=>C+=f(k)),C===1/0))return 1/0}return C}function d(x,C="",N){!1!==N&&(C=S(C));const k=x.parse(C);return p(x,k)}function p(x,C){return x.serialize(C).split("#")[0]+"#"}n.getFullPath=d,n._getFullPath=p;const m=/#\/?$/;function S(x){return x?x.replace(m,""):""}n.normalizeId=S,n.resolveUrl=function _(x,C,N){return N=S(N),x.resolve(C,N)};const D=/^[a-z_][-a-z0-9._]*$/i;n.getSchemaRefs=function P(x,C){if("boolean"==typeof x)return{};const{schemaId:N,uriResolver:k}=this.opts,U=S(x[N]||C),z={"":U},Y=d(k,U,!1),G={},F=new Set;return E(x,{allKeys:!0},(T,o,h,w)=>{if(void 0===w)return;const I=Y+o;let R=z[w];function V(L){const b=this.opts.uriResolver.resolve;if(L=S(R?b(R,L):L),F.has(L))throw Z(L);F.add(L);let B=this.refs[L];return"string"==typeof B&&(B=this.refs[B]),"object"==typeof B?j(T,B.schema,L):L!==S(I)&&("#"===L[0]?(j(T,G[L],L),G[L]=T):this.refs[L]=I),L}function H(L){if("string"==typeof L){if(!D.test(L))throw new Error(`invalid anchor "${L}"`);V.call(this,`#${L}`)}}"string"==typeof T[N]&&(R=V.call(this,T[N])),H.call(this,T.$anchor),H.call(this,T.$dynamicAnchor),z[o]=R}),G;function j(T,o,h){if(void 0!==o&&!v(T,o))throw Z(h)}function Z(T){return new Error(`reference "${T}" resolves to more than one schema`)}}},85175:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRules=n.isJSONType=void 0;const l=new Set(["string","number","integer","boolean","null","object","array"]);n.isJSONType=function v(M){return"string"==typeof M&&l.has(M)},n.getRules=function E(){const M={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...M,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},M.number,M.string,M.array,M.object],post:{rules:[]},all:{},keywords:{}}}},37012:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;const l=u(33987),v=u(8010);function s(Y,G=Y.schema){const{opts:F,self:j}=Y;if(!F.strictSchema||"boolean"==typeof G)return;const Z=j.RULES.keywords;for(const T in G)Z[T]||z(Y,`unknown keyword: "${T}"`)}function g(Y,G){if("boolean"==typeof Y)return!Y;for(const F in Y)if(G[F])return!0;return!1}function m(Y){return"number"==typeof Y?`${Y}`:Y.replace(/~/g,"~0").replace(/\//g,"~1")}function S(Y){return Y.replace(/~1/g,"/").replace(/~0/g,"~")}function D({mergeNames:Y,mergeToName:G,mergeValues:F,resultToName:j}){return(Z,T,o,h)=>{const w=void 0===o?T:o instanceof l.Name?(T instanceof l.Name?Y(Z,T,o):G(Z,T,o),o):T instanceof l.Name?(G(Z,o,T),T):F(T,o);return h!==l.Name||w instanceof l.Name?w:j(Z,w)}}function P(Y,G){if(!0===G)return Y.var("props",!0);const F=Y.var("props",l._`{}`);return void 0!==G&&x(Y,F,G),F}function x(Y,G,F){Object.keys(F).forEach(j=>Y.assign(l._`${G}${(0,l.getProperty)(j)}`,!0))}n.toHash=function E(Y){const G={};for(const F of Y)G[F]=!0;return G},n.alwaysValidSchema=function M(Y,G){return"boolean"==typeof G?G:0===Object.keys(G).length||(s(Y,G),!g(G,Y.self.RULES.all))},n.checkUnknownRules=s,n.schemaHasRules=g,n.schemaHasRulesButRef=function y(Y,G){if("boolean"==typeof Y)return!Y;for(const F in Y)if("$ref"!==F&&G.all[F])return!0;return!1},n.schemaRefOrVal=function f({topSchemaRef:Y,schemaPath:G},F,j,Z){if(!Z){if("number"==typeof F||"boolean"==typeof F)return F;if("string"==typeof F)return l._`${F}`}return l._`${Y}${G}${(0,l.getProperty)(j)}`},n.unescapeFragment=function d(Y){return S(decodeURIComponent(Y))},n.escapeFragment=function p(Y){return encodeURIComponent(m(Y))},n.escapeJsonPointer=m,n.unescapeJsonPointer=S,n.eachItem=function _(Y,G){if(Array.isArray(Y))for(const F of Y)G(F);else G(Y)},n.mergeEvaluated={props:D({mergeNames:(Y,G,F)=>Y.if(l._`${F} !== true && ${G} !== undefined`,()=>{Y.if(l._`${G} === true`,()=>Y.assign(F,!0),()=>Y.assign(F,l._`${F} || {}`).code(l._`Object.assign(${F}, ${G})`))}),mergeToName:(Y,G,F)=>Y.if(l._`${F} !== true`,()=>{!0===G?Y.assign(F,!0):(Y.assign(F,l._`${F} || {}`),x(Y,F,G))}),mergeValues:(Y,G)=>!0===Y||{...Y,...G},resultToName:P}),items:D({mergeNames:(Y,G,F)=>Y.if(l._`${F} !== true && ${G} !== undefined`,()=>Y.assign(F,l._`${G} === true ? true : ${F} > ${G} ? ${F} : ${G}`)),mergeToName:(Y,G,F)=>Y.if(l._`${F} !== true`,()=>Y.assign(F,!0===G||l._`${F} > ${G} ? ${F} : ${G}`)),mergeValues:(Y,G)=>!0===Y||Math.max(Y,G),resultToName:(Y,G)=>Y.var("items",G)})},n.evaluatedPropsToName=P,n.setEvaluated=x;const C={};var k,Y;function z(Y,G,F=Y.opts.strictSchema){if(F){if(G=`strict mode: ${G}`,!0===F)throw new Error(G);Y.self.logger.warn(G)}}n.useFunc=function N(Y,G){return Y.scopeValue("func",{ref:G,code:C[G.code]||(C[G.code]=new v._Code(G.code))})},(Y=k=n.Type||(n.Type={}))[Y.Num=0]="Num",Y[Y.Str=1]="Str",n.getErrorPath=function U(Y,G,F){if(Y instanceof l.Name){const j=G===k.Num;return F?j?l._`"[" + ${Y} + "]"`:l._`"['" + ${Y} + "']"`:j?l._`"/" + ${Y}`:l._`"/" + ${Y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return F?(0,l.getProperty)(Y).toString():"/"+m(Y)},n.checkStrictMode=z},3283:(q,n)=>{"use strict";function l(E,M){return M.rules.some(s=>v(E,s))}function v(E,M){var s;return void 0!==E[M.keyword]||(null===(s=M.definition.implements)||void 0===s?void 0:s.some(g=>void 0!==E[g]))}Object.defineProperty(n,"__esModule",{value:!0}),n.shouldUseRule=n.shouldUseGroup=n.schemaHasRulesForType=void 0,n.schemaHasRulesForType=function u({schema:E,self:M},s){const g=M.RULES.types[s];return g&&!0!==g&&l(E,g)},n.shouldUseGroup=l,n.shouldUseRule=v},92137:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.boolOrEmptySchema=n.topBoolOrEmptySchema=void 0;const l=u(58935),v=u(33987),E=u(32861),M={message:"boolean schema is false"};function y(f,d){const{gen:p,data:m}=f,S={gen:p,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,l.reportError)(S,M,void 0,d)}n.topBoolOrEmptySchema=function s(f){const{gen:d,schema:p,validateName:m}=f;!1===p?y(f,!1):"object"==typeof p&&!0===p.$async?d.return(E.default.data):(d.assign(v._`${m}.errors`,null),d.return(!0))},n.boolOrEmptySchema=function g(f,d){const{gen:p,schema:m}=f;!1===m?(p.var(d,!1),y(f)):p.var(d,!0)}},86258:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;const l=u(85175),v=u(3283),E=u(58935),M=u(33987),s=u(37012);var g,k;function f(k){const U=Array.isArray(k)?k:k?[k]:[];if(U.every(l.isJSONType))return U;throw new Error("type must be JSONType or JSONType[]: "+U.join(","))}(k=g=n.DataType||(n.DataType={}))[k.Correct=0]="Correct",k[k.Wrong=1]="Wrong",n.getSchemaTypes=function y(k){const U=f(k.type);if(U.includes("null")){if(!1===k.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!U.length&&void 0!==k.nullable)throw new Error('"nullable" cannot be used without "type"');!0===k.nullable&&U.push("null")}return U},n.getJSONTypes=f,n.coerceAndCheckDataType=function d(k,U){const{gen:z,data:Y,opts:G}=k,F=function m(k,U){return U?k.filter(z=>p.has(z)||"array"===U&&"array"===z):[]}(U,G.coerceTypes),j=U.length>0&&!(0===F.length&&1===U.length&&(0,v.schemaHasRulesForType)(k,U[0]));if(j){const Z=P(U,Y,G.strictNumbers,g.Wrong);z.if(Z,()=>{F.length?function S(k,U,z){const{gen:Y,data:G,opts:F}=k,j=Y.let("dataType",M._`typeof ${G}`),Z=Y.let("coerced",M._`undefined`);"array"===F.coerceTypes&&Y.if(M._`${j} == 'object' && Array.isArray(${G}) && ${G}.length == 1`,()=>Y.assign(G,M._`${G}[0]`).assign(j,M._`typeof ${G}`).if(P(U,G,F.strictNumbers),()=>Y.assign(Z,G))),Y.if(M._`${Z} !== undefined`);for(const o of z)(p.has(o)||"array"===o&&"array"===F.coerceTypes)&&T(o);function T(o){switch(o){case"string":return void Y.elseIf(M._`${j} == "number" || ${j} == "boolean"`).assign(Z,M._`"" + ${G}`).elseIf(M._`${G} === null`).assign(Z,M._`""`);case"number":return void Y.elseIf(M._`${j} == "boolean" || ${G} === null + || (${j} == "string" && ${G} && ${G} == +${G})`).assign(Z,M._`+${G}`);case"integer":return void Y.elseIf(M._`${j} === "boolean" || ${G} === null + || (${j} === "string" && ${G} && ${G} == +${G} && !(${G} % 1))`).assign(Z,M._`+${G}`);case"boolean":return void Y.elseIf(M._`${G} === "false" || ${G} === 0 || ${G} === null`).assign(Z,!1).elseIf(M._`${G} === "true" || ${G} === 1`).assign(Z,!0);case"null":return Y.elseIf(M._`${G} === "" || ${G} === 0 || ${G} === false`),void Y.assign(Z,null);case"array":Y.elseIf(M._`${j} === "string" || ${j} === "number" + || ${j} === "boolean" || ${G} === null`).assign(Z,M._`[${G}]`)}}Y.else(),C(k),Y.endIf(),Y.if(M._`${Z} !== undefined`,()=>{Y.assign(G,Z),function _({gen:k,parentData:U,parentDataProperty:z},Y){k.if(M._`${U} !== undefined`,()=>k.assign(M._`${U}[${z}]`,Y))}(k,Z)})}(k,U,F):C(k)})}return j};const p=new Set(["string","number","integer","boolean","null"]);function D(k,U,z,Y=g.Correct){const G=Y===g.Correct?M.operators.EQ:M.operators.NEQ;let F;switch(k){case"null":return M._`${U} ${G} null`;case"array":F=M._`Array.isArray(${U})`;break;case"object":F=M._`${U} && typeof ${U} == "object" && !Array.isArray(${U})`;break;case"integer":F=j(M._`!(${U} % 1) && !isNaN(${U})`);break;case"number":F=j();break;default:return M._`typeof ${U} ${G} ${k}`}return Y===g.Correct?F:(0,M.not)(F);function j(Z=M.nil){return(0,M.and)(M._`typeof ${U} == "number"`,Z,z?M._`isFinite(${U})`:M.nil)}}function P(k,U,z,Y){if(1===k.length)return D(k[0],U,z,Y);let G;const F=(0,s.toHash)(k);if(F.array&&F.object){const j=M._`typeof ${U} != "object"`;G=F.null?j:M._`!${U} || ${j}`,delete F.null,delete F.array,delete F.object}else G=M.nil;F.number&&delete F.integer;for(const j in F)G=(0,M.and)(G,D(j,U,z,Y));return G}n.checkDataType=D,n.checkDataTypes=P;const x={message:({schema:k})=>`must be ${k}`,params:({schema:k,schemaValue:U})=>"string"==typeof k?M._`{type: ${k}}`:M._`{type: ${U}}`};function C(k){const U=function N(k){const{gen:U,data:z,schema:Y}=k,G=(0,s.schemaRefOrVal)(k,Y,"type");return{gen:U,keyword:"type",data:z,schema:Y.type,schemaCode:G,schemaValue:G,parentSchema:Y,params:{},it:k}}(k);(0,E.reportError)(U,x)}n.reportTypeError=C},81009:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assignDefaults=void 0;const l=u(33987),v=u(37012);function M(s,g,y){const{gen:f,compositeRule:d,data:p,opts:m}=s;if(void 0===y)return;const S=l._`${p}${(0,l.getProperty)(g)}`;if(d)return void(0,v.checkStrictMode)(s,`default is ignored for: ${S}`);let _=l._`${S} === undefined`;"empty"===m.useDefaults&&(_=l._`${_} || ${S} === null || ${S} === ""`),f.if(_,l._`${S} = ${(0,l.stringify)(y)}`)}n.assignDefaults=function E(s,g){const{properties:y,items:f}=s.schema;if("object"===g&&y)for(const d in y)M(s,d,y[d].default);else"array"===g&&Array.isArray(f)&&f.forEach((d,p)=>M(s,p,d.default))}},41161:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getData=n.KeywordCxt=n.validateFunctionCode=void 0;const l=u(92137),v=u(86258),E=u(3283),M=u(86258),s=u(81009),g=u(28423),y=u(31651),f=u(33987),d=u(32861),p=u(95508),m=u(37012),S=u(58935);function D({gen:ue,validateName:fe,schema:he,schemaEnv:Ae,opts:Pe},Re){Pe.code.es5?ue.func(fe,f._`${d.default.data}, ${d.default.valCxt}`,Ae.$async,()=>{ue.code(f._`"use strict"; ${k(he,Pe)}`),function x(ue,fe){ue.if(d.default.valCxt,()=>{ue.var(d.default.instancePath,f._`${d.default.valCxt}.${d.default.instancePath}`),ue.var(d.default.parentData,f._`${d.default.valCxt}.${d.default.parentData}`),ue.var(d.default.parentDataProperty,f._`${d.default.valCxt}.${d.default.parentDataProperty}`),ue.var(d.default.rootData,f._`${d.default.valCxt}.${d.default.rootData}`),fe.dynamicRef&&ue.var(d.default.dynamicAnchors,f._`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{ue.var(d.default.instancePath,f._`""`),ue.var(d.default.parentData,f._`undefined`),ue.var(d.default.parentDataProperty,f._`undefined`),ue.var(d.default.rootData,d.default.data),fe.dynamicRef&&ue.var(d.default.dynamicAnchors,f._`{}`)})}(ue,Pe),ue.code(Re)}):ue.func(fe,f._`${d.default.data}, ${function P(ue){return f._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${ue.dynamicRef?f._`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}(Pe)}`,Ae.$async,()=>ue.code(k(he,Pe)).code(Re))}function k(ue,fe){const he="object"==typeof ue&&ue[fe.schemaId];return he&&(fe.code.source||fe.code.process)?f._`/*# sourceURL=${he} */`:f.nil}function U(ue,fe){Y(ue)&&(F(ue),z(ue))?function G(ue,fe){const{schema:he,gen:Ae,opts:Pe}=ue;Pe.$comment&&he.$comment&&w(ue),function o(ue){const fe=ue.schema[ue.opts.schemaId];fe&&(ue.baseId=(0,p.resolveUrl)(ue.opts.uriResolver,ue.baseId,fe))}(ue),function h(ue){if(ue.schema.$async&&!ue.schemaEnv.$async)throw new Error("async schema in sync schema")}(ue);const Re=Ae.const("_errs",d.default.errors);j(ue,Re),Ae.var(fe,f._`${Re} === ${d.default.errors}`)}(ue,fe):(0,l.boolOrEmptySchema)(ue,fe)}function z({schema:ue,self:fe}){if("boolean"==typeof ue)return!ue;for(const he in ue)if(fe.RULES.all[he])return!0;return!1}function Y(ue){return"boolean"!=typeof ue.schema}function F(ue){(0,m.checkUnknownRules)(ue),function Z(ue){const{schema:fe,errSchemaPath:he,opts:Ae,self:Pe}=ue;fe.$ref&&Ae.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(fe,Pe.RULES)&&Pe.logger.warn(`$ref: keywords ignored in schema at path "${he}"`)}(ue)}function j(ue,fe){if(ue.opts.jtd)return V(ue,[],!1,fe);const he=(0,v.getSchemaTypes)(ue.schema);V(ue,he,!(0,v.coerceAndCheckDataType)(ue,he),fe)}function w({gen:ue,schemaEnv:fe,schema:he,errSchemaPath:Ae,opts:Pe}){const Re=he.$comment;if(!0===Pe.$comment)ue.code(f._`${d.default.self}.logger.log(${Re})`);else if("function"==typeof Pe.$comment){const ot=f.str`${Ae}/$comment`,nt=ue.scopeValue("root",{ref:fe.root});ue.code(f._`${d.default.self}.opts.$comment(${Re}, ${ot}, ${nt}.schema)`)}}function V(ue,fe,he,Ae){const{gen:Pe,schema:Re,data:ot,allErrors:nt,opts:Ye,self:It}=ue,{RULES:st}=It;function He(ze){(0,E.shouldUseGroup)(Re,ze)&&(ze.type?(Pe.if((0,M.checkDataType)(ze.type,ot,Ye.strictNumbers)),H(ue,ze),1===fe.length&&fe[0]===ze.type&&he&&(Pe.else(),(0,M.reportTypeError)(ue)),Pe.endIf()):H(ue,ze),nt||Pe.if(f._`${d.default.errors} === ${Ae||0}`))}!Re.$ref||!Ye.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(Re,st)?(Ye.jtd||function L(ue,fe){ue.schemaEnv.meta||!ue.opts.strictTypes||(function b(ue,fe){if(fe.length){if(!ue.dataTypes.length)return void(ue.dataTypes=fe);fe.forEach(he=>{te(ue.dataTypes,he)||ae(ue,`type "${he}" not allowed by context "${ue.dataTypes.join(",")}"`)}),ue.dataTypes=ue.dataTypes.filter(he=>te(fe,he))}}(ue,fe),ue.opts.allowUnionTypes||function B(ue,fe){fe.length>1&&(2!==fe.length||!fe.includes("null"))&&ae(ue,"use allowUnionTypes to allow union type keyword")}(ue,fe),function re(ue,fe){const he=ue.self.RULES.all;for(const Ae in he){const Pe=he[Ae];if("object"==typeof Pe&&(0,E.shouldUseRule)(ue.schema,Pe)){const{type:Re}=Pe.definition;Re.length&&!Re.some(ot=>ne(fe,ot))&&ae(ue,`missing type "${Re.join(",")}" for keyword "${Ae}"`)}}}(ue,ue.dataTypes))}(ue,fe),Pe.block(()=>{for(const ze of st.rules)He(ze);He(st.post)})):Pe.block(()=>pe(ue,"$ref",st.all.$ref.definition))}function H(ue,fe){const{gen:he,schema:Ae,opts:{useDefaults:Pe}}=ue;Pe&&(0,s.assignDefaults)(ue,fe.type),he.block(()=>{for(const Re of fe.rules)(0,E.shouldUseRule)(Ae,Re)&&pe(ue,Re.keyword,Re.definition,fe.type)})}function ne(ue,fe){return ue.includes(fe)||"number"===fe&&ue.includes("integer")}function te(ue,fe){return ue.includes(fe)||"integer"===fe&&ue.includes("number")}function ae(ue,fe){fe+=` at "${ue.schemaEnv.baseId+ue.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(ue,fe,ue.opts.strictTypes)}n.validateFunctionCode=function _(ue){Y(ue)&&(F(ue),z(ue))?function C(ue){const{schema:fe,opts:he,gen:Ae}=ue;D(ue,()=>{he.$comment&&fe.$comment&&w(ue),function T(ue){const{schema:fe,opts:he}=ue;void 0!==fe.default&&he.useDefaults&&he.strictSchema&&(0,m.checkStrictMode)(ue,"default is ignored in the schema root")}(ue),Ae.let(d.default.vErrors,null),Ae.let(d.default.errors,0),he.unevaluated&&function N(ue){const{gen:fe,validateName:he}=ue;ue.evaluated=fe.const("evaluated",f._`${he}.evaluated`),fe.if(f._`${ue.evaluated}.dynamicProps`,()=>fe.assign(f._`${ue.evaluated}.props`,f._`undefined`)),fe.if(f._`${ue.evaluated}.dynamicItems`,()=>fe.assign(f._`${ue.evaluated}.items`,f._`undefined`))}(ue),j(ue),function I(ue){const{gen:fe,schemaEnv:he,validateName:Ae,ValidationError:Pe,opts:Re}=ue;he.$async?fe.if(f._`${d.default.errors} === 0`,()=>fe.return(d.default.data),()=>fe.throw(f._`new ${Pe}(${d.default.vErrors})`)):(fe.assign(f._`${Ae}.errors`,d.default.vErrors),Re.unevaluated&&function R({gen:ue,evaluated:fe,props:he,items:Ae}){he instanceof f.Name&&ue.assign(f._`${fe}.props`,he),Ae instanceof f.Name&&ue.assign(f._`${fe}.items`,Ae)}(ue),fe.return(f._`${d.default.errors} === 0`))}(ue)})}(ue):D(ue,()=>(0,l.topBoolOrEmptySchema)(ue))};class ge{constructor(fe,he,Ae){if((0,g.validateKeywordUsage)(fe,he,Ae),this.gen=fe.gen,this.allErrors=fe.allErrors,this.keyword=Ae,this.data=fe.data,this.schema=fe.schema[Ae],this.$data=he.$data&&fe.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(fe,this.schema,Ae,this.$data),this.schemaType=he.schemaType,this.parentSchema=fe.schema,this.params={},this.it=fe,this.def=he,this.$data)this.schemaCode=fe.gen.const("vSchema",le(this.$data,fe));else if(this.schemaCode=this.schemaValue,!(0,g.validSchemaType)(this.schema,he.schemaType,he.allowUndefined))throw new Error(`${Ae} value must be ${JSON.stringify(he.schemaType)}`);("code"in he?he.trackErrors:!1!==he.errors)&&(this.errsCount=fe.gen.const("_errs",d.default.errors))}result(fe,he,Ae){this.failResult((0,f.not)(fe),he,Ae)}failResult(fe,he,Ae){this.gen.if(fe),Ae?Ae():this.error(),he?(this.gen.else(),he(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(fe,he){this.failResult((0,f.not)(fe),void 0,he)}fail(fe){if(void 0===fe)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(fe),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(fe){if(!this.$data)return this.fail(fe);const{schemaCode:he}=this;this.fail(f._`${he} !== undefined && (${(0,f.or)(this.invalid$data(),fe)})`)}error(fe,he,Ae){if(he)return this.setParams(he),this._error(fe,Ae),void this.setParams({});this._error(fe,Ae)}_error(fe,he){(fe?S.reportExtraError:S.reportError)(this,this.def.error,he)}$dataError(){(0,S.reportError)(this,this.def.$dataError||S.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,S.resetErrorsCount)(this.gen,this.errsCount)}ok(fe){this.allErrors||this.gen.if(fe)}setParams(fe,he){he?Object.assign(this.params,fe):this.params=fe}block$data(fe,he,Ae=f.nil){this.gen.block(()=>{this.check$data(fe,Ae),he()})}check$data(fe=f.nil,he=f.nil){if(!this.$data)return;const{gen:Ae,schemaCode:Pe,schemaType:Re,def:ot}=this;Ae.if((0,f.or)(f._`${Pe} === undefined`,he)),fe!==f.nil&&Ae.assign(fe,!0),(Re.length||ot.validateSchema)&&(Ae.elseIf(this.invalid$data()),this.$dataError(),fe!==f.nil&&Ae.assign(fe,!1)),Ae.else()}invalid$data(){const{gen:fe,schemaCode:he,schemaType:Ae,def:Pe,it:Re}=this;return(0,f.or)(function ot(){if(Ae.length){if(!(he instanceof f.Name))throw new Error("ajv implementation error");const Ye=Array.isArray(Ae)?Ae:[Ae];return f._`${(0,M.checkDataTypes)(Ye,he,Re.opts.strictNumbers,M.DataType.Wrong)}`}return f.nil}(),function nt(){if(Pe.validateSchema){const Ye=fe.scopeValue("validate$data",{ref:Pe.validateSchema});return f._`!${Ye}(${he})`}return f.nil}())}subschema(fe,he){const Ae=(0,y.getSubschema)(this.it,fe);(0,y.extendSubschemaData)(Ae,this.it,fe),(0,y.extendSubschemaMode)(Ae,fe);const Pe={...this.it,...Ae,items:void 0,props:void 0};return U(Pe,he),Pe}mergeEvaluated(fe,he){const{it:Ae,gen:Pe}=this;Ae.opts.unevaluated&&(!0!==Ae.props&&void 0!==fe.props&&(Ae.props=m.mergeEvaluated.props(Pe,fe.props,Ae.props,he)),!0!==Ae.items&&void 0!==fe.items&&(Ae.items=m.mergeEvaluated.items(Pe,fe.items,Ae.items,he)))}mergeValidEvaluated(fe,he){const{it:Ae,gen:Pe}=this;if(Ae.opts.unevaluated&&(!0!==Ae.props||!0!==Ae.items))return Pe.if(he,()=>this.mergeEvaluated(fe,f.Name)),!0}}function pe(ue,fe,he,Ae){const Pe=new ge(ue,he,fe);"code"in he?he.code(Pe,Ae):Pe.$data&&he.validate?(0,g.funcKeywordCode)(Pe,he):"macro"in he?(0,g.macroKeywordCode)(Pe,he):(he.compile||he.validate)&&(0,g.funcKeywordCode)(Pe,he)}n.KeywordCxt=ge;const we=/^\/(?:[^~]|~0|~1)*$/,ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(ue,{dataLevel:fe,dataNames:he,dataPathArr:Ae}){let Pe,Re;if(""===ue)return d.default.rootData;if("/"===ue[0]){if(!we.test(ue))throw new Error(`Invalid JSON-pointer: ${ue}`);Pe=ue,Re=d.default.rootData}else{const It=ce.exec(ue);if(!It)throw new Error(`Invalid JSON-pointer: ${ue}`);const st=+It[1];if(Pe=It[2],"#"===Pe){if(st>=fe)throw new Error(Ye("property/index",st));return Ae[fe-st]}if(st>fe)throw new Error(Ye("data",st));if(Re=he[fe-st],!Pe)return Re}let ot=Re;const nt=Pe.split("/");for(const It of nt)It&&(Re=f._`${Re}${(0,f.getProperty)((0,m.unescapeJsonPointer)(It))}`,ot=f._`${ot} && ${Re}`);return ot;function Ye(It,st){return`Cannot access ${It} ${st} levels up, current level is ${fe}`}}n.getData=le},28423:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateKeywordUsage=n.validSchemaType=n.funcKeywordCode=n.macroKeywordCode=void 0;const l=u(33987),v=u(32861),E=u(99306),M=u(58935);function y(_){const{gen:D,data:P,it:x}=_;D.if(x.parentData,()=>D.assign(P,l._`${x.parentData}[${x.parentDataProperty}]`))}function p(_,D,P){if(void 0===P)throw new Error(`keyword "${D}" failed to compile`);return _.scopeValue("keyword","function"==typeof P?{ref:P}:{ref:P,code:(0,l.stringify)(P)})}n.macroKeywordCode=function s(_,D){const{gen:P,keyword:x,schema:C,parentSchema:N,it:k}=_,U=D.macro.call(k.self,C,N,k),z=p(P,x,U);!1!==k.opts.validateSchema&&k.self.validateSchema(U,!0);const Y=P.name("valid");_.subschema({schema:U,schemaPath:l.nil,errSchemaPath:`${k.errSchemaPath}/${x}`,topSchemaRef:z,compositeRule:!0},Y),_.pass(Y,()=>_.error(!0))},n.funcKeywordCode=function g(_,D){var P;const{gen:x,keyword:C,schema:N,parentSchema:k,$data:U,it:z}=_;!function d({schemaEnv:_},D){if(D.async&&!_.$async)throw new Error("async keyword in sync schema")}(z,D);const Y=!U&&D.compile?D.compile.call(z.self,N,k,z):D.validate,G=p(x,C,Y),F=x.let("valid");function o(w=(D.async?l._`await `:l.nil)){const I=z.opts.passContext?v.default.this:v.default.self,R=!("compile"in D&&!U||!1===D.schema);x.assign(F,l._`${w}${(0,E.callValidateCode)(_,G,I,R)}`,D.modifying)}function h(w){var I;x.if((0,l.not)(null!==(I=D.valid)&&void 0!==I?I:F),w)}_.block$data(F,function j(){if(!1===D.errors)o(),D.modifying&&y(_),h(()=>_.error());else{const w=D.async?function Z(){const w=x.let("ruleErrs",null);return x.try(()=>o(l._`await `),I=>x.assign(F,!1).if(l._`${I} instanceof ${z.ValidationError}`,()=>x.assign(w,l._`${I}.errors`),()=>x.throw(I))),w}():function T(){const w=l._`${G}.errors`;return x.assign(w,null),o(l.nil),w}();D.modifying&&y(_),h(()=>function f(_,D){const{gen:P}=_;P.if(l._`Array.isArray(${D})`,()=>{P.assign(v.default.vErrors,l._`${v.default.vErrors} === null ? ${D} : ${v.default.vErrors}.concat(${D})`).assign(v.default.errors,l._`${v.default.vErrors}.length`),(0,M.extendErrors)(_)},()=>_.error())}(_,w))}}),_.ok(null!==(P=D.valid)&&void 0!==P?P:F)},n.validSchemaType=function m(_,D,P=!1){return!D.length||D.some(x=>"array"===x?Array.isArray(_):"object"===x?_&&"object"==typeof _&&!Array.isArray(_):typeof _==x||P&&typeof _>"u")},n.validateKeywordUsage=function S({schema:_,opts:D,self:P,errSchemaPath:x},C,N){if(Array.isArray(C.keyword)?!C.keyword.includes(N):C.keyword!==N)throw new Error("ajv implementation error");const k=C.dependencies;if(k?.some(U=>!Object.prototype.hasOwnProperty.call(_,U)))throw new Error(`parent schema must have dependencies of ${N}: ${k.join(",")}`);if(C.validateSchema&&!C.validateSchema(_[N])){const z=`keyword "${N}" value is invalid at path "${x}": `+P.errorsText(C.validateSchema.errors);if("log"!==D.validateSchema)throw new Error(z);P.logger.error(z)}}},31651:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendSubschemaMode=n.extendSubschemaData=n.getSubschema=void 0;const l=u(33987),v=u(37012);n.getSubschema=function E(g,{keyword:y,schemaProp:f,schema:d,schemaPath:p,errSchemaPath:m,topSchemaRef:S}){if(void 0!==y&&void 0!==d)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==y){const _=g.schema[y];return void 0===f?{schema:_,schemaPath:l._`${g.schemaPath}${(0,l.getProperty)(y)}`,errSchemaPath:`${g.errSchemaPath}/${y}`}:{schema:_[f],schemaPath:l._`${g.schemaPath}${(0,l.getProperty)(y)}${(0,l.getProperty)(f)}`,errSchemaPath:`${g.errSchemaPath}/${y}/${(0,v.escapeFragment)(f)}`}}if(void 0!==d){if(void 0===p||void 0===m||void 0===S)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:p,topSchemaRef:S,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')},n.extendSubschemaData=function M(g,y,{dataProp:f,dataPropType:d,data:p,dataTypes:m,propertyName:S}){if(void 0!==p&&void 0!==f)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=y;if(void 0!==f){const{errorPath:P,dataPathArr:x,opts:C}=y;D(_.let("data",l._`${y.data}${(0,l.getProperty)(f)}`,!0)),g.errorPath=l.str`${P}${(0,v.getErrorPath)(f,d,C.jsPropertySyntax)}`,g.parentDataProperty=l._`${f}`,g.dataPathArr=[...x,g.parentDataProperty]}if(void 0!==p){D(p instanceof l.Name?p:_.let("data",p,!0)),void 0!==S&&(g.propertyName=S)}function D(P){g.data=P,g.dataLevel=y.dataLevel+1,g.dataTypes=[],y.definedProperties=new Set,g.parentData=y.data,g.dataNames=[...y.dataNames,P]}m&&(g.dataTypes=m)},n.extendSubschemaMode=function s(g,{jtdDiscriminator:y,jtdMetadata:f,compositeRule:d,createErrors:p,allErrors:m}){void 0!==d&&(g.compositeRule=d),void 0!==p&&(g.createErrors=p),void 0!==m&&(g.allErrors=m),g.jtdDiscriminator=y,g.jtdMetadata=f}},10616:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var v=u(41161);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return v.KeywordCxt}});var E=u(33987);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});const M=u(64861),s=u(74827),g=u(85175),y=u(13427),f=u(33987),d=u(95508),p=u(86258),m=u(37012),S=u(54615),_=u(4382),D=(B,re)=>new RegExp(B,re);D.code="new RegExp";const P=["removeAdditional","useDefaults","coerceTypes"],x=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),C={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},N={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},k=200;function U(B){var re,ne,te,ae,ge,pe,we,ce,le,ue,fe,he,Ae,Pe,Re,ot,nt,Ye,It,st,He,ze,Be,Ze,ut;const Me=B.strict,ve=null===(re=B.code)||void 0===re?void 0:re.optimize,xe=!0===ve||void 0===ve?1:ve||0,je=null!==(te=null===(ne=B.code)||void 0===ne?void 0:ne.regExp)&&void 0!==te?te:D,Ge=null!==(ae=B.uriResolver)&&void 0!==ae?ae:_.default;return{strictSchema:null===(pe=null!==(ge=B.strictSchema)&&void 0!==ge?ge:Me)||void 0===pe||pe,strictNumbers:null===(ce=null!==(we=B.strictNumbers)&&void 0!==we?we:Me)||void 0===ce||ce,strictTypes:null!==(ue=null!==(le=B.strictTypes)&&void 0!==le?le:Me)&&void 0!==ue?ue:"log",strictTuples:null!==(he=null!==(fe=B.strictTuples)&&void 0!==fe?fe:Me)&&void 0!==he?he:"log",strictRequired:null!==(Pe=null!==(Ae=B.strictRequired)&&void 0!==Ae?Ae:Me)&&void 0!==Pe&&Pe,code:B.code?{...B.code,optimize:xe,regExp:je}:{optimize:xe,regExp:je},loopRequired:null!==(Re=B.loopRequired)&&void 0!==Re?Re:k,loopEnum:null!==(ot=B.loopEnum)&&void 0!==ot?ot:k,meta:null===(nt=B.meta)||void 0===nt||nt,messages:null===(Ye=B.messages)||void 0===Ye||Ye,inlineRefs:null===(It=B.inlineRefs)||void 0===It||It,schemaId:null!==(st=B.schemaId)&&void 0!==st?st:"$id",addUsedSchema:null===(He=B.addUsedSchema)||void 0===He||He,validateSchema:null===(ze=B.validateSchema)||void 0===ze||ze,validateFormats:null===(Be=B.validateFormats)||void 0===Be||Be,unicodeRegExp:null===(Ze=B.unicodeRegExp)||void 0===Ze||Ze,int32range:null===(ut=B.int32range)||void 0===ut||ut,uriResolver:Ge}}class z{constructor(re={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,re=this.opts={...re,...U(re)};const{es5:ne,lines:te}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:x,es5:ne,lines:te}),this.logger=function h(B){if(!1===B)return o;if(void 0===B)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}(re.logger);const ae=re.validateFormats;re.validateFormats=!1,this.RULES=(0,g.getRules)(),Y.call(this,C,re,"NOT SUPPORTED"),Y.call(this,N,re,"DEPRECATED","warn"),this._metaOpts=T.call(this),re.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),re.keywords&&Z.call(this,re.keywords),"object"==typeof re.meta&&this.addMetaSchema(re.meta),F.call(this),re.validateFormats=ae}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:re,meta:ne,schemaId:te}=this.opts;let ae=S;"id"===te&&(ae={...S},ae.id=ae.$id,delete ae.$id),ne&&re&&this.addMetaSchema(ae,ae[te],!1)}defaultMeta(){const{meta:re,schemaId:ne}=this.opts;return this.opts.defaultMeta="object"==typeof re?re[ne]||re:void 0}validate(re,ne){let te;if("string"==typeof re){if(te=this.getSchema(re),!te)throw new Error(`no schema with key or ref "${re}"`)}else te=this.compile(re);const ae=te(ne);return"$async"in te||(this.errors=te.errors),ae}compile(re,ne){const te=this._addSchema(re,ne);return te.validate||this._compileSchemaEnv(te)}compileAsync(re,ne){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:te}=this.opts;return ae.call(this,re,ne);function ae(Re,ot){return ge.apply(this,arguments)}function ge(){return(ge=l(function*(Re,ot){yield pe.call(this,Re.$schema);const nt=this._addSchema(Re,ot);return nt.validate||ce.call(this,nt)})).apply(this,arguments)}function pe(Re){return we.apply(this,arguments)}function we(){return(we=l(function*(Re){Re&&!this.getSchema(Re)&&(yield ae.call(this,{$ref:Re},!0))})).apply(this,arguments)}function ce(Re){return le.apply(this,arguments)}function le(){return(le=l(function*(Re){try{return this._compileSchemaEnv(Re)}catch(ot){if(!(ot instanceof s.default))throw ot;return ue.call(this,ot),yield fe.call(this,ot.missingSchema),ce.call(this,Re)}})).apply(this,arguments)}function ue({missingSchema:Re,missingRef:ot}){if(this.refs[Re])throw new Error(`AnySchema ${Re} is loaded but ${ot} cannot be resolved`)}function fe(Re){return he.apply(this,arguments)}function he(){return(he=l(function*(Re){const ot=yield Ae.call(this,Re);this.refs[Re]||(yield pe.call(this,ot.$schema)),this.refs[Re]||this.addSchema(ot,Re,ne)})).apply(this,arguments)}function Ae(Re){return Pe.apply(this,arguments)}function Pe(){return(Pe=l(function*(Re){const ot=this._loading[Re];if(ot)return ot;try{return yield this._loading[Re]=te(Re)}finally{delete this._loading[Re]}})).apply(this,arguments)}}addSchema(re,ne,te,ae=this.opts.validateSchema){if(Array.isArray(re)){for(const pe of re)this.addSchema(pe,void 0,te,ae);return this}let ge;if("object"==typeof re){const{schemaId:pe}=this.opts;if(ge=re[pe],void 0!==ge&&"string"!=typeof ge)throw new Error(`schema ${pe} must be string`)}return ne=(0,d.normalizeId)(ne||ge),this._checkUnique(ne),this.schemas[ne]=this._addSchema(re,te,ne,ae,!0),this}addMetaSchema(re,ne,te=this.opts.validateSchema){return this.addSchema(re,ne,!0,te),this}validateSchema(re,ne){if("boolean"==typeof re)return!0;let te;if(te=re.$schema,void 0!==te&&"string"!=typeof te)throw new Error("$schema must be a string");if(te=te||this.opts.defaultMeta||this.defaultMeta(),!te)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const ae=this.validate(te,re);if(!ae&&ne){const ge="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(ge);this.logger.error(ge)}return ae}getSchema(re){let ne;for(;"string"==typeof(ne=G.call(this,re));)re=ne;if(void 0===ne){const{schemaId:te}=this.opts,ae=new y.SchemaEnv({schema:{},schemaId:te});if(ne=y.resolveSchema.call(this,ae,re),!ne)return;this.refs[re]=ne}return ne.validate||this._compileSchemaEnv(ne)}removeSchema(re){if(re instanceof RegExp)return this._removeAllSchemas(this.schemas,re),this._removeAllSchemas(this.refs,re),this;switch(typeof re){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ne=G.call(this,re);return"object"==typeof ne&&this._cache.delete(ne.schema),delete this.schemas[re],delete this.refs[re],this}case"object":{const ne=re;this._cache.delete(ne);let te=re[this.opts.schemaId];return te&&(te=(0,d.normalizeId)(te),delete this.schemas[te],delete this.refs[te]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(re){for(const ne of re)this.addKeyword(ne);return this}addKeyword(re,ne){let te;if("string"==typeof re)te=re,"object"==typeof ne&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ne.keyword=te);else{if("object"!=typeof re||void 0!==ne)throw new Error("invalid addKeywords parameters");if(te=(ne=re).keyword,Array.isArray(te)&&!te.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(I.call(this,te,ne),!ne)return(0,m.eachItem)(te,ge=>R.call(this,ge)),this;H.call(this,ne);const ae={...ne,type:(0,p.getJSONTypes)(ne.type),schemaType:(0,p.getJSONTypes)(ne.schemaType)};return(0,m.eachItem)(te,0===ae.type.length?ge=>R.call(this,ge,ae):ge=>ae.type.forEach(pe=>R.call(this,ge,ae,pe))),this}getKeyword(re){const ne=this.RULES.all[re];return"object"==typeof ne?ne.definition:!!ne}removeKeyword(re){const{RULES:ne}=this;delete ne.keywords[re],delete ne.all[re];for(const te of ne.rules){const ae=te.rules.findIndex(ge=>ge.keyword===re);ae>=0&&te.rules.splice(ae,1)}return this}addFormat(re,ne){return"string"==typeof ne&&(ne=new RegExp(ne)),this.formats[re]=ne,this}errorsText(re=this.errors,{separator:ne=", ",dataVar:te="data"}={}){return re&&0!==re.length?re.map(ae=>`${te}${ae.instancePath} ${ae.message}`).reduce((ae,ge)=>ae+ne+ge):"No errors"}$dataMetaSchema(re,ne){const te=this.RULES.all;re=JSON.parse(JSON.stringify(re));for(const ae of ne){const ge=ae.split("/").slice(1);let pe=re;for(const we of ge)pe=pe[we];for(const we in te){const ce=te[we];if("object"!=typeof ce)continue;const{$data:le}=ce.definition,ue=pe[we];le&&ue&&(pe[we]=b(ue))}}return re}_removeAllSchemas(re,ne){for(const te in re){const ae=re[te];(!ne||ne.test(te))&&("string"==typeof ae?delete re[te]:ae&&!ae.meta&&(this._cache.delete(ae.schema),delete re[te]))}}_addSchema(re,ne,te,ae=this.opts.validateSchema,ge=this.opts.addUsedSchema){let pe;const{schemaId:we}=this.opts;if("object"==typeof re)pe=re[we];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof re)throw new Error("schema must be object or boolean")}let ce=this._cache.get(re);if(void 0!==ce)return ce;te=(0,d.normalizeId)(pe||te);const le=d.getSchemaRefs.call(this,re,te);return ce=new y.SchemaEnv({schema:re,schemaId:we,meta:ne,baseId:te,localRefs:le}),this._cache.set(ce.schema,ce),ge&&!te.startsWith("#")&&(te&&this._checkUnique(te),this.refs[te]=ce),ae&&this.validateSchema(re,!0),ce}_checkUnique(re){if(this.schemas[re]||this.refs[re])throw new Error(`schema with key or id "${re}" already exists`)}_compileSchemaEnv(re){if(re.meta?this._compileMetaSchema(re):y.compileSchema.call(this,re),!re.validate)throw new Error("ajv implementation error");return re.validate}_compileMetaSchema(re){const ne=this.opts;this.opts=this._metaOpts;try{y.compileSchema.call(this,re)}finally{this.opts=ne}}}function Y(B,re,ne,te="error"){for(const ae in B){const ge=ae;ge in re&&this.logger[te](`${ne}: option ${ae}. ${B[ge]}`)}}function G(B){return B=(0,d.normalizeId)(B),this.schemas[B]||this.refs[B]}function F(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const re in B)this.addSchema(B[re],re)}function j(){for(const B in this.opts.formats){const re=this.opts.formats[B];re&&this.addFormat(B,re)}}function Z(B){if(Array.isArray(B))this.addVocabulary(B);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const re in B){const ne=B[re];ne.keyword||(ne.keyword=re),this.addKeyword(ne)}}}function T(){const B={...this.opts};for(const re of P)delete B[re];return B}n.default=z,z.ValidationError=M.default,z.MissingRefError=s.default;const o={log(){},warn(){},error(){}};const w=/^[a-z_$][a-z0-9_$:-]*$/i;function I(B,re){const{RULES:ne}=this;if((0,m.eachItem)(B,te=>{if(ne.keywords[te])throw new Error(`Keyword ${te} is already defined`);if(!w.test(te))throw new Error(`Keyword ${te} has invalid name`)}),re&&re.$data&&!("code"in re)&&!("validate"in re))throw new Error('$data keyword must have "code" or "validate" function')}function R(B,re,ne){var te;const ae=re?.post;if(ne&&ae)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:ge}=this;let pe=ae?ge.post:ge.rules.find(({type:ce})=>ce===ne);if(pe||(pe={type:ne,rules:[]},ge.rules.push(pe)),ge.keywords[B]=!0,!re)return;const we={keyword:B,definition:{...re,type:(0,p.getJSONTypes)(re.type),schemaType:(0,p.getJSONTypes)(re.schemaType)}};re.before?V.call(this,pe,we,re.before):pe.rules.push(we),ge.all[B]=we,null===(te=re.implements)||void 0===te||te.forEach(ce=>this.addKeyword(ce))}function V(B,re,ne){const te=B.rules.findIndex(ae=>ae.keyword===ne);te>=0?B.rules.splice(te,0,re):(B.rules.push(re),this.logger.warn(`rule ${ne} is not defined`))}function H(B){let{metaSchema:re}=B;void 0!==re&&(B.$data&&this.opts.$data&&(re=b(re)),B.validateSchema=this.compile(re,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function b(B){return{anyOf:[B,L]}}},86947:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(12559);l.code='require("ajv/dist/runtime/equal").default',n.default=l},75603:(q,n)=>{"use strict";function u(l){const v=l.length;let s,E=0,M=0;for(;M=55296&&s<=56319&&M{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(96482);l.code='require("ajv/dist/runtime/uri").default',n.default=l},64861:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});class u extends Error{constructor(v){super("validation failed"),this.errors=v,this.ajv=this.validation=!0}}n.default=u},96185:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAdditionalItems=void 0;const l=u(33987),v=u(37012),M={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:g}})=>l.str`must NOT have more than ${g} items`,params:({params:{len:g}})=>l._`{limit: ${g}}`},code(g){const{parentSchema:y,it:f}=g,{items:d}=y;Array.isArray(d)?s(g,d):(0,v.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(g,y){const{gen:f,schema:d,data:p,keyword:m,it:S}=g;S.items=!0;const _=f.const("len",l._`${p}.length`);if(!1===d)g.setParams({len:y.length}),g.pass(l._`${_} <= ${y.length}`);else if("object"==typeof d&&!(0,v.alwaysValidSchema)(S,d)){const P=f.var("valid",l._`${_} <= ${y.length}`);f.if((0,l.not)(P),()=>function D(P){f.forRange("i",y.length,_,x=>{g.subschema({keyword:m,dataProp:x,dataPropType:v.Type.Num},P),S.allErrors||f.if((0,l.not)(P),()=>f.break())})}(P)),g.ok(P)}}n.validateAdditionalItems=s,n.default=M},73086:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(99306),v=u(33987),E=u(32861),M=u(37012),g={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:y})=>v._`{additionalProperty: ${y.additionalProperty}}`},code(y){const{gen:f,schema:d,parentSchema:p,data:m,errsCount:S,it:_}=y;if(!S)throw new Error("ajv implementation error");const{allErrors:D,opts:P}=_;if(_.props=!0,"all"!==P.removeAdditional&&(0,M.alwaysValidSchema)(_,d))return;const x=(0,l.allSchemaProperties)(p.properties),C=(0,l.allSchemaProperties)(p.patternProperties);function U(G){f.code(v._`delete ${m}[${G}]`)}function z(G){if("all"===P.removeAdditional||P.removeAdditional&&!1===d)U(G);else{if(!1===d)return y.setParams({additionalProperty:G}),y.error(),void(D||f.break());if("object"==typeof d&&!(0,M.alwaysValidSchema)(_,d)){const F=f.name("valid");"failing"===P.removeAdditional?(Y(G,F,!1),f.if((0,v.not)(F),()=>{y.reset(),U(G)})):(Y(G,F),D||f.if((0,v.not)(F),()=>f.break()))}}}function Y(G,F,j){const Z={keyword:"additionalProperties",dataProp:G,dataPropType:M.Type.Str};!1===j&&Object.assign(Z,{compositeRule:!0,createErrors:!1,allErrors:!1}),y.subschema(Z,F)}(function N(){f.forIn("key",m,G=>{x.length||C.length?f.if(function k(G){let F;if(x.length>8){const j=(0,M.schemaRefOrVal)(_,p.properties,"properties");F=(0,l.isOwnProperty)(f,j,G)}else F=x.length?(0,v.or)(...x.map(j=>v._`${G} === ${j}`)):v.nil;return C.length&&(F=(0,v.or)(F,...C.map(j=>v._`${(0,l.usePattern)(y,j)}.test(${G})`))),(0,v.not)(F)}(G),()=>z(G)):z(G)})})(),y.ok(v._`${S} === ${E.default.errors}`)}};n.default=g},84397:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(37012),v={keyword:"allOf",schemaType:"array",code(E){const{gen:M,schema:s,it:g}=E;if(!Array.isArray(s))throw new Error("ajv implementation error");const y=M.name("valid");s.forEach((f,d)=>{if((0,l.alwaysValidSchema)(g,f))return;const p=E.subschema({keyword:"allOf",schemaProp:d},y);E.ok(y),E.mergeEvaluated(p)})}};n.default=v},79839:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const v={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:u(99306).validateUnion,error:{message:"must match a schema in anyOf"}};n.default=v},64247:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),M={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:g}})=>void 0===g?l.str`must contain at least ${s} valid item(s)`:l.str`must contain at least ${s} and no more than ${g} valid item(s)`,params:({params:{min:s,max:g}})=>void 0===g?l._`{minContains: ${s}}`:l._`{minContains: ${s}, maxContains: ${g}}`},code(s){const{gen:g,schema:y,parentSchema:f,data:d,it:p}=s;let m,S;const{minContains:_,maxContains:D}=f;p.opts.next?(m=void 0===_?1:_,S=D):m=1;const P=g.const("len",l._`${d}.length`);if(s.setParams({min:m,max:S}),void 0===S&&0===m)return void(0,v.checkStrictMode)(p,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==S&&m>S)return(0,v.checkStrictMode)(p,'"minContains" > "maxContains" is always invalid'),void s.fail();if((0,v.alwaysValidSchema)(p,y)){let U=l._`${P} >= ${m}`;return void 0!==S&&(U=l._`${U} && ${P} <= ${S}`),void s.pass(U)}p.items=!0;const x=g.name("valid");function C(){const U=g.name("_valid"),z=g.let("count",0);N(U,()=>g.if(U,()=>function k(U){g.code(l._`${U}++`),void 0===S?g.if(l._`${U} >= ${m}`,()=>g.assign(x,!0).break()):(g.if(l._`${U} > ${S}`,()=>g.assign(x,!1).break()),1===m?g.assign(x,!0):g.if(l._`${U} >= ${m}`,()=>g.assign(x,!0)))}(z)))}function N(U,z){g.forRange("i",0,P,Y=>{s.subschema({keyword:"contains",dataProp:Y,dataPropType:v.Type.Num,compositeRule:!0},U),z()})}void 0===S&&1===m?N(x,()=>g.if(x,()=>g.break())):0===m?(g.let(x,!0),void 0!==S&&g.if(l._`${d}.length > 0`,C)):(g.let(x,!1),C()),s.result(x,()=>s.reset())}};n.default=M},67959:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const l=u(33987),v=u(37012),E=u(99306);n.error={message:({params:{property:f,depsCount:d,deps:p}})=>{const m=1===d?"property":"properties";return l.str`must have ${m} ${p} when property ${f} is present`},params:({params:{property:f,depsCount:d,deps:p,missingProperty:m}})=>l._`{property: ${f}, + missingProperty: ${m}, + depsCount: ${d}, + deps: ${p}}`};const M={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(f){const[d,p]=function s({schema:f}){const d={},p={};for(const m in f){if("__proto__"===m)continue;(Array.isArray(f[m])?d:p)[m]=f[m]}return[d,p]}(f);g(f,d),y(f,p)}};function g(f,d=f.schema){const{gen:p,data:m,it:S}=f;if(0===Object.keys(d).length)return;const _=p.let("missing");for(const D in d){const P=d[D];if(0===P.length)continue;const x=(0,E.propertyInData)(p,m,D,S.opts.ownProperties);f.setParams({property:D,depsCount:P.length,deps:P.join(", ")}),S.allErrors?p.if(x,()=>{for(const C of P)(0,E.checkReportMissingProp)(f,C)}):(p.if(l._`${x} && (${(0,E.checkMissingProp)(f,P,_)})`),(0,E.reportMissingProp)(f,_),p.else())}}function y(f,d=f.schema){const{gen:p,data:m,keyword:S,it:_}=f,D=p.name("valid");for(const P in d)(0,v.alwaysValidSchema)(_,d[P])||(p.if((0,E.propertyInData)(p,m,P,_.opts.ownProperties),()=>{const x=f.subschema({keyword:S,schemaProp:P},D);f.mergeValidEvaluated(x,D)},()=>p.var(D,!0)),f.ok(D))}n.validatePropertyDeps=g,n.validateSchemaDeps=y,n.default=M},45100:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),M={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:g})=>l.str`must match "${g.ifClause}" schema`,params:({params:g})=>l._`{failingKeyword: ${g.ifClause}}`},code(g){const{gen:y,parentSchema:f,it:d}=g;void 0===f.then&&void 0===f.else&&(0,v.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const p=s(d,"then"),m=s(d,"else");if(!p&&!m)return;const S=y.let("valid",!0),_=y.name("_valid");if(function D(){const x=g.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);g.mergeEvaluated(x)}(),g.reset(),p&&m){const x=y.let("ifClause");g.setParams({ifClause:x}),y.if(_,P("then",x),P("else",x))}else p?y.if(_,P("then")):y.if((0,l.not)(_),P("else"));function P(x,C){return()=>{const N=g.subschema({keyword:x},_);y.assign(S,_),g.mergeValidEvaluated(N,S),C?y.assign(C,l._`${x}`):g.setParams({ifClause:x})}}g.pass(S,()=>g.error(!0))}};function s(g,y){const f=g.schema[y];return void 0!==f&&!(0,v.alwaysValidSchema)(g,f)}n.default=M},35860:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(96185),v=u(99469),E=u(45608),M=u(87819),s=u(64247),g=u(67959),y=u(95417),f=u(73086),d=u(16141),p=u(4947),m=u(39858),S=u(79839),_=u(29533),D=u(84397),P=u(45100),x=u(35510);n.default=function C(N=!1){const k=[m.default,S.default,_.default,D.default,P.default,x.default,y.default,f.default,g.default,d.default,p.default];return N?k.push(v.default,M.default):k.push(l.default,E.default),k.push(s.default),k}},45608:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateTuple=void 0;const l=u(33987),v=u(37012),E=u(99306),M={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(g){const{schema:y,it:f}=g;if(Array.isArray(y))return s(g,"additionalItems",y);f.items=!0,!(0,v.alwaysValidSchema)(f,y)&&g.ok((0,E.validateArray)(g))}};function s(g,y,f=g.schema){const{gen:d,parentSchema:p,data:m,keyword:S,it:_}=g;(function x(C){const{opts:N,errSchemaPath:k}=_,U=f.length,z=U===C.minItems&&(U===C.maxItems||!1===C[y]);if(N.strictTuples&&!z){const Y=`"${S}" is ${U}-tuple, but minItems or maxItems/${y} are not specified or different at path "${k}"`;(0,v.checkStrictMode)(_,Y,N.strictTuples)}})(p),_.opts.unevaluated&&f.length&&!0!==_.items&&(_.items=v.mergeEvaluated.items(d,f.length,_.items));const D=d.name("valid"),P=d.const("len",l._`${m}.length`);f.forEach((C,N)=>{(0,v.alwaysValidSchema)(_,C)||(d.if(l._`${P} > ${N}`,()=>g.subschema({keyword:S,schemaProp:N,dataProp:N},D)),g.ok(D))})}n.validateTuple=s,n.default=M},87819:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),E=u(99306),M=u(96185),g={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:y}})=>l.str`must NOT have more than ${y} items`,params:({params:{len:y}})=>l._`{limit: ${y}}`},code(y){const{schema:f,parentSchema:d,it:p}=y,{prefixItems:m}=d;p.items=!0,!(0,v.alwaysValidSchema)(p,f)&&(m?(0,M.validateAdditionalItems)(y,m):y.ok((0,E.validateArray)(y)))}};n.default=g},39858:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(37012),v={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(E){const{gen:M,schema:s,it:g}=E;if((0,l.alwaysValidSchema)(g,s))return void E.fail();const y=M.name("valid");E.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},y),E.failResult(y,()=>E.reset(),()=>E.error())},error:{message:"must NOT be valid"}};n.default=v},29533:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),M={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>l._`{passingSchemas: ${s.passing}}`},code(s){const{gen:g,schema:y,parentSchema:f,it:d}=s;if(!Array.isArray(y))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const p=y,m=g.let("valid",!1),S=g.let("passing",null),_=g.name("_valid");s.setParams({passing:S}),g.block(function D(){p.forEach((P,x)=>{let C;(0,v.alwaysValidSchema)(d,P)?g.var(_,!0):C=s.subschema({keyword:"oneOf",schemaProp:x,compositeRule:!0},_),x>0&&g.if(l._`${_} && ${m}`).assign(m,!1).assign(S,l._`[${S}, ${x}]`).else(),g.if(_,()=>{g.assign(m,!0),g.assign(S,x),C&&s.mergeEvaluated(C,l.Name)})})}),s.result(m,()=>s.reset(),()=>s.error(!0))}};n.default=M},4947:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(99306),v=u(33987),E=u(37012),M=u(37012),s={keyword:"patternProperties",type:"object",schemaType:"object",code(g){const{gen:y,schema:f,data:d,parentSchema:p,it:m}=g,{opts:S}=m,_=(0,l.allSchemaProperties)(f),D=_.filter(z=>(0,E.alwaysValidSchema)(m,f[z]));if(0===_.length||D.length===_.length&&(!m.opts.unevaluated||!0===m.props))return;const P=S.strictSchema&&!S.allowMatchingProperties&&p.properties,x=y.name("valid");!0!==m.props&&!(m.props instanceof v.Name)&&(m.props=(0,M.evaluatedPropsToName)(y,m.props));const{props:C}=m;function k(z){for(const Y in P)new RegExp(z).test(Y)&&(0,E.checkStrictMode)(m,`property ${Y} matches pattern ${z} (use allowMatchingProperties)`)}function U(z){y.forIn("key",d,Y=>{y.if(v._`${(0,l.usePattern)(g,z)}.test(${Y})`,()=>{const G=D.includes(z);G||g.subschema({keyword:"patternProperties",schemaProp:z,dataProp:Y,dataPropType:M.Type.Str},x),m.opts.unevaluated&&!0!==C?y.assign(v._`${C}[${Y}]`,!0):!G&&!m.allErrors&&y.if((0,v.not)(x),()=>y.break())})})}!function N(){for(const z of _)P&&k(z),m.allErrors?U(z):(y.var(x,!0),U(z),y.if(x))}()}};n.default=s},99469:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(45608),v={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:E=>(0,l.validateTuple)(E,"items")};n.default=v},16141:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(41161),v=u(99306),E=u(37012),M=u(73086),s={keyword:"properties",type:"object",schemaType:"object",code(g){const{gen:y,schema:f,parentSchema:d,data:p,it:m}=g;"all"===m.opts.removeAdditional&&void 0===d.additionalProperties&&M.default.code(new l.KeywordCxt(m,M.default,"additionalProperties"));const S=(0,v.allSchemaProperties)(f);for(const C of S)m.definedProperties.add(C);m.opts.unevaluated&&S.length&&!0!==m.props&&(m.props=E.mergeEvaluated.props(y,(0,E.toHash)(S),m.props));const _=S.filter(C=>!(0,E.alwaysValidSchema)(m,f[C]));if(0===_.length)return;const D=y.name("valid");for(const C of _)P(C)?x(C):(y.if((0,v.propertyInData)(y,p,C,m.opts.ownProperties)),x(C),m.allErrors||y.else().var(D,!0),y.endIf()),g.it.definedProperties.add(C),g.ok(D);function P(C){return m.opts.useDefaults&&!m.compositeRule&&void 0!==f[C].default}function x(C){g.subschema({keyword:"properties",schemaProp:C,dataProp:C},D)}}};n.default=s},95417:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),M={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>l._`{propertyName: ${s.propertyName}}`},code(s){const{gen:g,schema:y,data:f,it:d}=s;if((0,v.alwaysValidSchema)(d,y))return;const p=g.name("valid");g.forIn("key",f,m=>{s.setParams({propertyName:m}),s.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},p),g.if((0,l.not)(p),()=>{s.error(!0),d.allErrors||g.break()})}),s.ok(p)}};n.default=M},35510:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(37012),v={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:E,parentSchema:M,it:s}){void 0===M.if&&(0,l.checkStrictMode)(s,`"${E}" without "if" is ignored`)}};n.default=v},99306:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateUnion=n.validateArray=n.usePattern=n.callValidateCode=n.schemaProperties=n.allSchemaProperties=n.noPropertyInData=n.propertyInData=n.isOwnProperty=n.hasPropFunc=n.reportMissingProp=n.checkMissingProp=n.checkReportMissingProp=void 0;const l=u(33987),v=u(37012),E=u(32861),M=u(37012);function f(k){return k.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:l._`Object.prototype.hasOwnProperty`})}function d(k,U,z){return l._`${f(k)}.call(${U}, ${z})`}function m(k,U,z,Y){const G=l._`${U}${(0,l.getProperty)(z)} === undefined`;return Y?(0,l.or)(G,(0,l.not)(d(k,U,z))):G}function S(k){return k?Object.keys(k).filter(U=>"__proto__"!==U):[]}n.checkReportMissingProp=function s(k,U){const{gen:z,data:Y,it:G}=k;z.if(m(z,Y,U,G.opts.ownProperties),()=>{k.setParams({missingProperty:l._`${U}`},!0),k.error()})},n.checkMissingProp=function g({gen:k,data:U,it:{opts:z}},Y,G){return(0,l.or)(...Y.map(F=>(0,l.and)(m(k,U,F,z.ownProperties),l._`${G} = ${F}`)))},n.reportMissingProp=function y(k,U){k.setParams({missingProperty:U},!0),k.error()},n.hasPropFunc=f,n.isOwnProperty=d,n.propertyInData=function p(k,U,z,Y){const G=l._`${U}${(0,l.getProperty)(z)} !== undefined`;return Y?l._`${G} && ${d(k,U,z)}`:G},n.noPropertyInData=m,n.allSchemaProperties=S,n.schemaProperties=function _(k,U){return S(U).filter(z=>!(0,v.alwaysValidSchema)(k,U[z]))},n.callValidateCode=function D({schemaCode:k,data:U,it:{gen:z,topSchemaRef:Y,schemaPath:G,errorPath:F},it:j},Z,T,o){const h=o?l._`${k}, ${U}, ${Y}${G}`:U,w=[[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,F)],[E.default.parentData,j.parentData],[E.default.parentDataProperty,j.parentDataProperty],[E.default.rootData,E.default.rootData]];j.opts.dynamicRef&&w.push([E.default.dynamicAnchors,E.default.dynamicAnchors]);const I=l._`${h}, ${z.object(...w)}`;return T!==l.nil?l._`${Z}.call(${T}, ${I})`:l._`${Z}(${I})`};const P=l._`new RegExp`;n.usePattern=function x({gen:k,it:{opts:U}},z){const Y=U.unicodeRegExp?"u":"",{regExp:G}=U.code,F=G(z,Y);return k.scopeValue("pattern",{key:F.toString(),ref:F,code:l._`${"new RegExp"===G.code?P:(0,M.useFunc)(k,G)}(${z}, ${Y})`})},n.validateArray=function C(k){const{gen:U,data:z,keyword:Y,it:G}=k,F=U.name("valid");if(G.allErrors){const Z=U.let("valid",!0);return j(()=>U.assign(Z,!1)),Z}return U.var(F,!0),j(()=>U.break()),F;function j(Z){const T=U.const("len",l._`${z}.length`);U.forRange("i",0,T,o=>{k.subschema({keyword:Y,dataProp:o,dataPropType:v.Type.Num},F),U.if((0,l.not)(F),Z)})}},n.validateUnion=function N(k){const{gen:U,schema:z,keyword:Y,it:G}=k;if(!Array.isArray(z))throw new Error("ajv implementation error");if(z.some(T=>(0,v.alwaysValidSchema)(G,T))&&!G.opts.unevaluated)return;const j=U.let("valid",!1),Z=U.name("_valid");U.block(()=>z.forEach((T,o)=>{const h=k.subschema({keyword:Y,schemaProp:o,compositeRule:!0},Z);U.assign(j,l._`${j} || ${Z}`),k.mergeValidEvaluated(h,Z)||U.if((0,l.not)(j))})),k.result(j,()=>k.reset(),()=>k.error(!0))}},2079:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const u={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};n.default=u},34943:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(2079),v=u(46848),E=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",l.default,v.default];n.default=E},46848:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.callRef=n.getValidate=void 0;const l=u(74827),v=u(99306),E=u(33987),M=u(32861),s=u(13427),g=u(37012),y={keyword:"$ref",schemaType:"string",code(p){const{gen:m,schema:S,it:_}=p,{baseId:D,schemaEnv:P,validateName:x,opts:C,self:N}=_,{root:k}=P;if(("#"===S||"#/"===S)&&D===k.baseId)return function z(){if(P===k)return d(p,x,P,P.$async);const F=m.scopeValue("root",{ref:k});return d(p,E._`${F}.validate`,k,k.$async)}();const U=s.resolveRef.call(N,k,D,S);if(void 0===U)throw new l.default(_.opts.uriResolver,D,S);return U instanceof s.SchemaEnv?function Y(F){const j=f(p,F);d(p,j,F,F.$async)}(U):function G(F){const j=m.scopeValue("schema",!0===C.code.source?{ref:F,code:(0,E.stringify)(F)}:{ref:F}),Z=m.name("valid"),T=p.subschema({schema:F,dataTypes:[],schemaPath:E.nil,topSchemaRef:j,errSchemaPath:S},Z);p.mergeEvaluated(T),p.ok(Z)}(U)}};function f(p,m){const{gen:S}=p;return m.validate?S.scopeValue("validate",{ref:m.validate}):E._`${S.scopeValue("wrapper",{ref:m})}.validate`}function d(p,m,S,_){const{gen:D,it:P}=p,{allErrors:x,schemaEnv:C,opts:N}=P,k=N.passContext?M.default.this:E.nil;function Y(F){const j=E._`${F}.errors`;D.assign(M.default.vErrors,E._`${M.default.vErrors} === null ? ${j} : ${M.default.vErrors}.concat(${j})`),D.assign(M.default.errors,E._`${M.default.vErrors}.length`)}function G(F){var j;if(!P.opts.unevaluated)return;const Z=null===(j=S?.validate)||void 0===j?void 0:j.evaluated;if(!0!==P.props)if(Z&&!Z.dynamicProps)void 0!==Z.props&&(P.props=g.mergeEvaluated.props(D,Z.props,P.props));else{const T=D.var("props",E._`${F}.evaluated.props`);P.props=g.mergeEvaluated.props(D,T,P.props,E.Name)}if(!0!==P.items)if(Z&&!Z.dynamicItems)void 0!==Z.items&&(P.items=g.mergeEvaluated.items(D,Z.items,P.items));else{const T=D.var("items",E._`${F}.evaluated.items`);P.items=g.mergeEvaluated.items(D,T,P.items,E.Name)}}_?function U(){if(!C.$async)throw new Error("async schema referenced by sync schema");const F=D.let("valid");D.try(()=>{D.code(E._`await ${(0,v.callValidateCode)(p,m,k)}`),G(m),x||D.assign(F,!0)},j=>{D.if(E._`!(${j} instanceof ${P.ValidationError})`,()=>D.throw(j)),Y(j),x||D.assign(F,!1)}),p.ok(F)}():function z(){p.result((0,v.callValidateCode)(p,m,k),()=>G(m),()=>Y(m))}()}n.getValidate=f,n.callRef=d,n.default=y},37703:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(56814),E=u(13427),M=u(37012),g={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:y,tagName:f}})=>y===v.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:y,tag:f,tagName:d}})=>l._`{error: ${y}, tag: ${d}, tagValue: ${f}}`},code(y){const{gen:f,data:d,schema:p,parentSchema:m,it:S}=y,{oneOf:_}=m;if(!S.opts.discriminator)throw new Error("discriminator: requires discriminator option");const D=p.propertyName;if("string"!=typeof D)throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!_)throw new Error("discriminator: requires oneOf keyword");const P=f.let("valid",!1),x=f.const("tag",l._`${d}${(0,l.getProperty)(D)}`);function N(U){const z=f.name("valid"),Y=y.subschema({keyword:"oneOf",schemaProp:U},z);return y.mergeEvaluated(Y,l.Name),z}f.if(l._`typeof ${x} == "string"`,()=>function C(){const U=function k(){var U;const z={},Y=F(m);let G=!0;for(let T=0;T<_.length;T++){let o=_[T];o?.$ref&&!(0,M.schemaHasRulesButRef)(o,S.self.RULES)&&(o=E.resolveRef.call(S.self,S.schemaEnv.root,S.baseId,o?.$ref),o instanceof E.SchemaEnv&&(o=o.schema));const h=null===(U=o?.properties)||void 0===U?void 0:U[D];if("object"!=typeof h)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${D}"`);G=G&&(Y||F(o)),j(h,T)}if(!G)throw new Error(`discriminator: "${D}" must be required`);return z;function F({required:T}){return Array.isArray(T)&&T.includes(D)}function j(T,o){if(T.const)Z(T.const,o);else{if(!T.enum)throw new Error(`discriminator: "properties/${D}" must have "const" or "enum"`);for(const h of T.enum)Z(h,o)}}function Z(T,o){if("string"!=typeof T||T in z)throw new Error(`discriminator: "${D}" values must be unique strings`);z[T]=o}}();f.if(!1);for(const z in U)f.elseIf(l._`${x} === ${z}`),f.assign(P,N(U[z]));f.else(),y.error(!1,{discrError:v.DiscrError.Mapping,tag:x,tagName:D}),f.endIf()}(),()=>y.error(!1,{discrError:v.DiscrError.Tag,tag:x,tagName:D})),y.ok(P)}};n.default=g},56814:(q,n)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,(l=n.DiscrError||(n.DiscrError={})).Tag="tag",l.Mapping="mapping"},45502:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(34943),v=u(78353),E=u(35860),M=u(11562),s=u(19355),g=[l.default,v.default,(0,E.default)(),M.default,s.metadataVocabulary,s.contentVocabulary];n.default=g},95615:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:M})=>l.str`must match format "${M}"`,params:({schemaCode:M})=>l._`{format: ${M}}`},code(M,s){const{gen:g,data:y,$data:f,schema:d,schemaCode:p,it:m}=M,{opts:S,errSchemaPath:_,schemaEnv:D,self:P}=m;S.validateFormats&&(f?function x(){const N=g.scopeValue("formats",{ref:P.formats,code:S.code.formats}),k=g.const("fDef",l._`${N}[${p}]`),U=g.let("fType"),z=g.let("format");g.if(l._`typeof ${k} == "object" && !(${k} instanceof RegExp)`,()=>g.assign(U,l._`${k}.type || "string"`).assign(z,l._`${k}.validate`),()=>g.assign(U,l._`"string"`).assign(z,k)),M.fail$data((0,l.or)(function Y(){return!1===S.strictSchema?l.nil:l._`${p} && !${z}`}(),function G(){const F=D.$async?l._`(${k}.async ? await ${z}(${y}) : ${z}(${y}))`:l._`${z}(${y})`,j=l._`(typeof ${z} == "function" ? ${F} : ${z}.test(${y}))`;return l._`${z} && ${z} !== true && ${U} === ${s} && !${j}`}()))}():function C(){const N=P.formats[d];if(!N)return void function Y(){if(!1===S.strictSchema)return void P.logger.warn(j());throw new Error(j());function j(){return`unknown format "${d}" ignored in schema at path "${_}"`}}();if(!0===N)return;const[k,U,z]=function G(j){const Z=j instanceof RegExp?(0,l.regexpCode)(j):S.code.formats?l._`${S.code.formats}${(0,l.getProperty)(d)}`:void 0,T=g.scopeValue("formats",{key:d,ref:j,code:Z});return"object"!=typeof j||j instanceof RegExp?["string",j,T]:[j.type||"string",j.validate,l._`${T}.validate`]}(N);k===s&&M.pass(function F(){if("object"==typeof N&&!(N instanceof RegExp)&&N.async){if(!D.$async)throw new Error("async format in sync schema");return l._`await ${z}(${y})`}return"function"==typeof U?l._`${z}(${y})`:l._`${z}.test(${y})`}())}())}};n.default=E},11562:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const v=[u(95615).default];n.default=v},19355:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.contentVocabulary=n.metadataVocabulary=void 0,n.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],n.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},94118:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),E=u(86947),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:g})=>l._`{allowedValue: ${g}}`},code(g){const{gen:y,data:f,$data:d,schemaCode:p,schema:m}=g;d||m&&"object"==typeof m?g.fail$data(l._`!${(0,v.useFunc)(y,E.default)}(${f}, ${p})`):g.fail(l._`${m} !== ${f}`)}};n.default=s},61905:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),E=u(86947),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:g})=>l._`{allowedValues: ${g}}`},code(g){const{gen:y,data:f,$data:d,schema:p,schemaCode:m,it:S}=g;if(!d&&0===p.length)throw new Error("enum must have non-empty array");const _=p.length>=S.opts.loopEnum;let D;const P=()=>D??(D=(0,v.useFunc)(y,E.default));let x;if(_||d)x=y.let("valid"),g.block$data(x,function C(){y.assign(x,!1),y.forOf("v",m,k=>y.if(l._`${P()}(${f}, ${k})`,()=>y.assign(x,!0).break()))});else{if(!Array.isArray(p))throw new Error("ajv implementation error");const k=y.const("vSchema",m);x=(0,l.or)(...p.map((U,z)=>function N(k,U){const z=p[U];return"object"==typeof z&&null!==z?l._`${P()}(${f}, ${k}[${U}])`:l._`${f} === ${z}`}(k,z)))}g.pass(x)}};n.default=s},78353:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(98588),v=u(35389),E=u(82383),M=u(99082),s=u(13981),g=u(93590),y=u(78062),f=u(9754),d=u(94118),p=u(61905),m=[l.default,v.default,E.default,M.default,s.default,g.default,y.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];n.default=m},78062:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),E={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:s}){const g="maxItems"===M?"more":"fewer";return l.str`must NOT have ${g} than ${s} items`},params:({schemaCode:M})=>l._`{limit: ${M}}`},code(M){const{keyword:s,data:g,schemaCode:y}=M,f="maxItems"===s?l.operators.GT:l.operators.LT;M.fail$data(l._`${g}.length ${f} ${y}`)}};n.default=E},82383:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=u(37012),E=u(75603),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:g,schemaCode:y}){const f="maxLength"===g?"more":"fewer";return l.str`must NOT have ${f} than ${y} characters`},params:({schemaCode:g})=>l._`{limit: ${g}}`},code(g){const{keyword:y,data:f,schemaCode:d,it:p}=g,m="maxLength"===y?l.operators.GT:l.operators.LT,S=!1===p.opts.unicode?l._`${f}.length`:l._`${(0,v.useFunc)(g.gen,E.default)}(${f})`;g.fail$data(l._`${S} ${m} ${d}`)}};n.default=s},98588:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),v=l.operators,E={maximum:{okStr:"<=",ok:v.LTE,fail:v.GT},minimum:{okStr:">=",ok:v.GTE,fail:v.LT},exclusiveMaximum:{okStr:"<",ok:v.LT,fail:v.GTE},exclusiveMinimum:{okStr:">",ok:v.GT,fail:v.LTE}},M={message:({keyword:g,schemaCode:y})=>l.str`must be ${E[g].okStr} ${y}`,params:({keyword:g,schemaCode:y})=>l._`{comparison: ${E[g].okStr}, limit: ${y}}`},s={keyword:Object.keys(E),type:"number",schemaType:"number",$data:!0,error:M,code(g){const{keyword:y,data:f,schemaCode:d}=g;g.fail$data(l._`${f} ${E[y].fail} ${d} || isNaN(${f})`)}};n.default=s},13981:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),E={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:s}){const g="maxProperties"===M?"more":"fewer";return l.str`must NOT have ${g} than ${s} properties`},params:({schemaCode:M})=>l._`{limit: ${M}}`},code(M){const{keyword:s,data:g,schemaCode:y}=M,f="maxProperties"===s?l.operators.GT:l.operators.LT;M.fail$data(l._`Object.keys(${g}).length ${f} ${y}`)}};n.default=E},35389:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(33987),E={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:M})=>l.str`must be multiple of ${M}`,params:({schemaCode:M})=>l._`{multipleOf: ${M}}`},code(M){const{gen:s,data:g,schemaCode:y,it:f}=M,d=f.opts.multipleOfPrecision,p=s.let("res"),m=d?l._`Math.abs(Math.round(${p}) - ${p}) > 1e-${d}`:l._`${p} !== parseInt(${p})`;M.fail$data(l._`(${y} === 0 || (${p} = ${g}/${y}, ${m}))`)}};n.default=E},99082:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(99306),v=u(33987),M={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>v.str`must match pattern "${s}"`,params:({schemaCode:s})=>v._`{pattern: ${s}}`},code(s){const{data:g,$data:y,schema:f,schemaCode:d,it:p}=s,m=p.opts.unicodeRegExp?"u":"",S=y?v._`(new RegExp(${d}, ${m}))`:(0,l.usePattern)(s,f);s.fail$data(v._`!${S}.test(${g})`)}};n.default=M},93590:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(99306),v=u(33987),E=u(37012),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:g}})=>v.str`must have required property '${g}'`,params:({params:{missingProperty:g}})=>v._`{missingProperty: ${g}}`},code(g){const{gen:y,schema:f,schemaCode:d,data:p,$data:m,it:S}=g,{opts:_}=S;if(!m&&0===f.length)return;const D=f.length>=_.loopRequired;if(S.allErrors?function P(){if(D||m)g.block$data(v.nil,C);else for(const k of f)(0,l.checkReportMissingProp)(g,k)}():function x(){const k=y.let("missing");if(D||m){const U=y.let("valid",!0);g.block$data(U,()=>function N(k,U){g.setParams({missingProperty:k}),y.forOf(k,d,()=>{y.assign(U,(0,l.propertyInData)(y,p,k,_.ownProperties)),y.if((0,v.not)(U),()=>{g.error(),y.break()})},v.nil)}(k,U)),g.ok(U)}else y.if((0,l.checkMissingProp)(g,f,k)),(0,l.reportMissingProp)(g,k),y.else()}(),_.strictRequired){const k=g.parentSchema.properties,{definedProperties:U}=g.it;for(const z of f)if(void 0===k?.[z]&&!U.has(z)){const G=`required property "${z}" is not defined at "${S.schemaEnv.baseId+S.errSchemaPath}" (strictRequired)`;(0,E.checkStrictMode)(S,G,S.opts.strictRequired)}}function C(){y.forOf("prop",d,k=>{g.setParams({missingProperty:k}),y.if((0,l.noPropertyInData)(y,p,k,_.ownProperties),()=>g.error())})}}};n.default=s},9754:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(86258),v=u(33987),E=u(37012),M=u(86947),g={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:y,j:f}})=>v.str`must NOT have duplicate items (items ## ${f} and ${y} are identical)`,params:({params:{i:y,j:f}})=>v._`{i: ${y}, j: ${f}}`},code(y){const{gen:f,data:d,$data:p,schema:m,parentSchema:S,schemaCode:_,it:D}=y;if(!p&&!m)return;const P=f.let("valid"),x=S.items?(0,l.getSchemaTypes)(S.items):[];function k(z,Y){const G=f.name("item"),F=(0,l.checkDataTypes)(x,G,D.opts.strictNumbers,l.DataType.Wrong),j=f.const("indices",v._`{}`);f.for(v._`;${z}--;`,()=>{f.let(G,v._`${d}[${z}]`),f.if(F,v._`continue`),x.length>1&&f.if(v._`typeof ${G} == "string"`,v._`${G} += "_"`),f.if(v._`typeof ${j}[${G}] == "number"`,()=>{f.assign(Y,v._`${j}[${G}]`),y.error(),f.assign(P,!1).break()}).code(v._`${j}[${G}] = ${z}`)})}function U(z,Y){const G=(0,E.useFunc)(f,M.default),F=f.name("outer");f.label(F).for(v._`;${z}--;`,()=>f.for(v._`${Y} = ${z}; ${Y}--;`,()=>f.if(v._`${G}(${d}[${z}], ${d}[${Y}])`,()=>{y.error(),f.assign(P,!1).break(F)})))}y.block$data(P,function C(){const z=f.let("i",v._`${d}.length`),Y=f.let("j");y.setParams({i:z,j:Y}),f.assign(P,!0),f.if(v._`${z} > 1`,()=>(function N(){return x.length>0&&!x.some(z=>"object"===z||"array"===z)}()?k:U)(z,Y))},v._`${_} === false`),y.ok(P)}};n.default=g},96846:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;var l=u(33052);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}})},42694:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;var l=u(33052);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},444:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.AccountMultisig=n.Account2FA=void 0;var l=u(33052);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},46507:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.connect=void 0;const v=u(54576);n.connect=function E(M){return l(this,void 0,void 0,function*(){return new v.Near(M)})}},82692:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(s,g,y,f){void 0===f&&(f=y);var d=Object.getOwnPropertyDescriptor(g,y);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(s,f,d)}:function(s,g,y,f){void 0===f&&(f=y),s[f]=g[y]}),v=this&&this.__setModuleDefault||(Object.create?function(s,g){Object.defineProperty(s,"default",{enumerable:!0,value:g})}:function(s,g){s.default=g}),E=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var g={};if(null!=s)for(var y in s)"default"!==y&&Object.prototype.hasOwnProperty.call(s,y)&&l(g,s,y);return v(g,s),g},M=this&&this.__exportStar||function(s,g){for(var y in s)"default"!==y&&!Object.prototype.hasOwnProperty.call(g,y)&&l(g,s,y)};Object.defineProperty(n,"__esModule",{value:!0}),n.keyStores=void 0,n.keyStores=E(u(28753)),M(u(14293),n),M(u(46507),n)},14293:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(C,N,k,U){void 0===U&&(U=k);var z=Object.getOwnPropertyDescriptor(N,k);(!z||("get"in z?!N.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return N[k]}}),Object.defineProperty(C,U,z)}:function(C,N,k,U){void 0===U&&(U=k),C[U]=N[k]}),v=this&&this.__setModuleDefault||(Object.create?function(C,N){Object.defineProperty(C,"default",{enumerable:!0,value:N})}:function(C,N){C.default=N}),E=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var N={};if(null!=C)for(var k in C)"default"!==k&&Object.prototype.hasOwnProperty.call(C,k)&&l(N,C,k);return v(N,C),N};Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=n.KeyPair=n.Signer=n.InMemorySigner=n.Contract=n.Connection=n.Account=n.multisig=n.validators=n.transactions=n.utils=n.providers=n.accountCreator=void 0;const M=E(u(91398));n.providers=M;const s=E(u(55183));n.utils=s;const g=E(u(63094));n.transactions=g;const y=E(u(81840));n.validators=y;const f=u(96846);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return f.Account}});const d=E(u(444));n.multisig=d;const p=E(u(42694));n.accountCreator=p;const m=u(78025);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return m.Connection}});const S=u(85647);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return S.Signer}}),Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return S.InMemorySigner}});const _=u(77396);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return _.Contract}});const D=u(35802);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});const P=u(54576);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return P.Near}});const x=u(49899);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return x.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return x.WalletConnection}})},78025:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;var l=u(33052);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return l.Connection}})},77396:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;var l=u(33052);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return l.Contract}})},28753:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.BrowserLocalStorageKeyStore=n.InMemoryKeyStore=n.KeyStore=void 0;const l=u(123);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const v=u(27257);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return v.InMemoryKeyStore}});const E=u(89065);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const M=u(50999);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},89065:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(99322);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},27257:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.InMemoryKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},123:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyStore=void 0;var l=u(69170);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},50999:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},54576:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;var l=u(44802);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}})},91398:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorContext=n.TypedError=n.getTransactionLastResult=n.FinalExecutionStatusBasic=n.JsonRpcProvider=n.Provider=void 0;const l=u(57821);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const v=u(90520);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}})},90520:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcProvider=n.TypedError=n.ErrorContext=void 0;var l=u(17527);Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var v=u(37906);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}})},57821:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=n.IdType=n.Provider=n.getTransactionLastResult=void 0;var l=u(41166);Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var v=u(37906);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return v.Provider}});var E=u(17527);Object.defineProperty(n,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(n,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},85647:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(76999);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return l.Signer}})},63094:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transfer=n.stake=n.functionCallAccessKey=n.functionCall=n.fullAccessKey=n.deployContract=n.deleteKey=n.deleteAccount=n.createAccount=n.addKey=n.encodeDelegateAction=n.encodeSignedDelegate=n.Transaction=n.SignedTransaction=n.Signature=n.signTransaction=n.createTransaction=n.SCHEMA=n.Transfer=n.Stake=n.FunctionCallPermission=n.FunctionCall=n.FullAccessPermission=n.DeployContract=n.DeleteKey=n.DeleteAccount=n.CreateAccount=n.AddKey=n.AccessKeyPermission=n.AccessKey=n.Action=n.stringifyJsonOrBytes=void 0;var l=u(60898);Object.defineProperty(n,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(n,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(n,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(n,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(n,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(n,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(n,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(n,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(n,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(n,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(n,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(n,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(n,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(n,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(n,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(n,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(n,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(n,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(n,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(n,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(n,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const v=u(60898);n.addKey=(_,D)=>v.actionCreators.addKey(_,D);n.createAccount=()=>v.actionCreators.createAccount();n.deleteAccount=_=>v.actionCreators.deleteAccount(_);n.deleteKey=_=>v.actionCreators.deleteKey(_);n.deployContract=_=>v.actionCreators.deployContract(_);n.fullAccessKey=()=>v.actionCreators.fullAccessKey();n.functionCall=(_,D,P,x,C,N)=>v.actionCreators.functionCall(_,D,P,x,C,N);n.functionCallAccessKey=(_,D,P)=>v.actionCreators.functionCallAccessKey(_,D,P);n.stake=(_,D)=>v.actionCreators.stake(_,D);n.transfer=_=>v.actionCreators.transfer(_)},12524:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Enum=n.Assignable=void 0;var l=u(17527);Object.defineProperty(n,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});n.Enum=class v{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(s=>{this[s]=M[s],this.enum=s})}}},72064:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.TypedError=n.PositionalArgsError=n.ErrorContext=n.ArgumentTypeError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=void 0;var l=u(33052);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var v=u(17527);Object.defineProperty(n,"ArgumentTypeError",{enumerable:!0,get:function(){return v.ArgumentTypeError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}}),Object.defineProperty(n,"PositionalArgsError",{enumerable:!0,get:function(){return v.PositionalArgsError}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}});var E=u(41166);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},53174:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION_EXP=n.NEAR_NOMINATION=void 0;var l=u(41166);Object.defineProperty(n,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(n,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(n,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(n,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},55183:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(_,D,P,x){void 0===x&&(x=P);var C=Object.getOwnPropertyDescriptor(D,P);(!C||("get"in C?!D.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return D[P]}}),Object.defineProperty(_,x,C)}:function(_,D,P,x){void 0===x&&(x=P),_[x]=D[P]}),v=this&&this.__setModuleDefault||(Object.create?function(_,D){Object.defineProperty(_,"default",{enumerable:!0,value:D})}:function(_,D){_.default=D}),E=this&&this.__importStar||function(_){if(_&&_.__esModule)return _;var D={};if(null!=_)for(var P in _)"default"!==P&&Object.prototype.hasOwnProperty.call(_,P)&&l(D,_,P);return v(D,_),D};Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=n.logWarning=n.rpc_errors=n.KeyPairEd25519=n.KeyPair=n.PublicKey=n.format=n.enums=n.web=n.serialize=n.key_pair=void 0;const M=E(u(35802));n.key_pair=M;const s=E(u(41327));n.serialize=s;const g=E(u(86332));n.web=g;const y=E(u(12524));n.enums=y;const f=E(u(53174));n.format=f;const d=E(u(25678));n.rpc_errors=d;const p=u(35802);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}}),Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}});const m=u(72064);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return m.logWarning}});const S=u(74920);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return S.Logger}})},35802:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyType=n.KeyPairEd25519=n.KeyPair=void 0;var l=u(79189);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},74920:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(41166);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},25678:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ServerError=n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=void 0;var l=u(41166);Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},41327:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base_decode=n.base_encode=n.deserialize=n.serialize=void 0;var l=u(51814);Object.defineProperty(n,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(n,"deserialize",{enumerable:!0,get:function(){return l.deserialize}});var v=u(41166);Object.defineProperty(n,"base_encode",{enumerable:!0,get:function(){return v.baseEncode}}),Object.defineProperty(n,"base_decode",{enumerable:!0,get:function(){return v.baseDecode}})},86332:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=void 0;var l=u(37906);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},81840:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findSeatPrice=n.diffEpochValidators=void 0;var l=u(41166);Object.defineProperty(n,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(n,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},49899:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=void 0;var l=u(44802);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},77131:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},77227:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(65399),v=u(77131),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},29624:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(65399);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{"use strict";var l=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof l<"u")return l;throw new Error("unable to locate global object")}();q.exports=n=l.fetch,l.fetch&&(n.default=l.fetch.bind(l)),n.Headers=l.Headers,n.Request=l.Request,n.Response=l.Response},35469:q=>{"use strict";q.exports=function n({mustBeMetaMask:u=!1,silent:l=!1,timeout:v=3e3}={}){!function M(){if("boolean"!=typeof u)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof l)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof v)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let E=!1;return new Promise(s=>{function g(){if(E)return;E=!0,window.removeEventListener("ethereum#initialized",g);const{ethereum:y}=window;!y||u&&!y.isMetaMask?(!l&&console.error("@metamask/detect-provider:",u&&y?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),s(null)):s(y)}window.ethereum?g():(window.addEventListener("ethereum#initialized",g,{once:!0}),setTimeout(()=>{g()},v))})}},51560:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.setupBitteWallet=void 0;const v=u(28067),E=u(52107),M="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOTUiIGhlaWdodD0iOTUiIHZpZXdCb3g9IjAgMCA5NSA5NSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xLjc3NjE3IDU5LjE4MjZMNjIuNzIyNyA2My4zMTNDNjMuMTE4NSA2My40MzA5IDYzLjQ3ODggNjMuNjQ1NiA2My43NzA4IDYzLjkzNzdDNjQuMDYyOSA2NC4yMjk3IDY0LjI3NzUgNjQuNTg5OSA2NC4zOTU0IDY0Ljk4NThMNjguNTI1OSA3OC44NTU1QzY4LjY3ODcgNzkuMzY4NiA2OC45OTMyIDc5LjgxODYgNjkuNDIyNCA4MC4xMzg3QzY5Ljg1MTYgODAuNDU4NyA3MC4zNzI3IDgwLjYzMTYgNzAuOTA4MiA4MC42MzE2QzcxLjQ0MzYgODAuNjMxNiA3MS45NjQ3IDgwLjQ1ODcgNzIuMzkzOSA4MC4xMzg3QzcyLjgyMzEgNzkuODE4NiA3My4xMzc2IDc5LjM2ODYgNzMuMjkwNCA3OC44NTU1TDc3LjQyMDkgNjQuOTg1OEM3Ny41Mzg4IDY0LjU4OTkgNzcuNzUzNCA2NC4yMjk3IDc4LjA0NTUgNjMuOTM3N0M3OC4zMzc2IDYzLjY0NTYgNzguNjk3OCA2My40MzA5IDc5LjA5MzYgNjMuMzEzTDkyLjk2MzMgNTkuMTgyNkM5My40NzY0IDU5LjAyOTcgOTMuOTI2NSA1OC43MTUzIDk0LjI0NjYgNTguMjg2MUM5NC41NjY2IDU3Ljg1NjggOTQuNzM5NSA1Ny4zMzU3IDk0LjczOTUgNTYuODAwM0M5NC43Mzk1IDU2LjI2NDkgOTQuNTY2NiA1NS43NDM4IDk0LjI0NjYgNTUuMzE0NkM5My45MjY1IDU0Ljg4NTMgOTMuNDc2NCA1NC41NzA5IDkyLjk2MzMgNTQuNDE4MUw3OS4wOTM3IDUwLjI4NzZDNzguNjk3OCA1MC4xNjk3IDc4LjMzNzYgNDkuOTU1IDc4LjA0NTUgNDkuNjYzQzc3Ljc1MzUgNDkuMzcwOSA3Ny41Mzg4IDQ5LjAxMDcgNzcuNDIwOSA0OC42MTQ4TDczLjI5MDQgMzQuNzQ1MkM3My4xMzc2IDM0LjIzMiA3Mi44MjMyIDMzLjc4MTkgNzIuMzkzOSAzMy40NjE5QzcxLjk2NDcgMzMuMTQxOSA3MS40NDM2IDMyLjk2OSA3MC45MDgyIDMyLjk2OUM3MC4zNzI4IDMyLjk2OSA2OS44NTE3IDMzLjE0MTkgNjkuNDIyNCAzMy40NjE5QzY4Ljk5MzIgMzMuNzgxOSA2OC42Nzg4IDM0LjIzMiA2OC41MjYgMzQuNzQ1Mkw2NC4zOTU0IDQ4LjYxNDhDNjQuMjc3NiA0OS4wMTA3IDY0LjA2MjkgNDkuMzcwOSA2My43NzA4IDQ5LjY2M0M2My40Nzg4IDQ5Ljk1NSA2My4xMTg1IDUwLjE2OTcgNjIuNzIyNyA1MC4yODc2TDEuNzc2MTggNTQuNDE4MUMxLjI2MzA1IDU0LjU3MDkgMC44MTI5NTYgNTQuODg1MyAwLjQ5MjkyIDU1LjMxNDZDMC4xNzI4ODQgNTUuNzQzOCAyLjI0NzU1ZS0wNiA1Ni4yNjQ5IDAgNTYuODAwM0MtMi4yNDc1MWUtMDYgNTcuMzM1NyAwLjE3Mjg4NyA1Ny44NTY4IDAuNDkyOTIgNTguMjg2MUMwLjgxMjk1MyA1OC43MTUzIDEuMjYzMDMgNTkuMDI5NyAxLjc3NjE3IDU5LjE4MjZaIiBmaWxsPSJibGFjayIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMyLjE2MzcgMjkuNDg2OEw0MC4zNTc4IDMxLjkyNzFDNDAuNTkxNyAzMS45OTY3IDQwLjgwNDUgMzIuMTIzNiA0MC45NzcgMzIuMjk2MUM0MS4xNDk2IDMyLjQ2ODcgNDEuMjc2NCAzMi42ODE1IDQxLjM0NjEgMzIuOTE1NEw0My43ODYzIDQxLjEwOTVDNDMuODc2NiA0MS40MTI2IDQ0LjA2MjQgNDEuNjc4NSA0NC4zMTYgNDEuODY3NkM0NC41Njk2IDQyLjA1NjcgNDQuODc3NCA0Mi4xNTg4IDQ1LjE5MzcgNDIuMTU4OEM0NS41MTAxIDQyLjE1ODggNDUuODE3OSA0Mi4wNTY3IDQ2LjA3MTUgNDEuODY3NkM0Ni4zMjUxIDQxLjY3ODUgNDYuNTEwOSA0MS40MTI2IDQ2LjYwMTEgNDEuMTA5NUw0OS4wNDE0IDMyLjkxNTRDNDkuMTExMSAzMi42ODE1IDQ5LjIzNzkgMzIuNDY4NyA0OS40MTA0IDMyLjI5NjFDNDkuNTgzIDMyLjEyMzYgNDkuNzk1OCAzMS45OTY3IDUwLjAyOTcgMzEuOTI3MUw1OC4yMjM4IDI5LjQ4NjhDNTguNTI2OSAyOS4zOTY2IDU4Ljc5MjggMjkuMjEwOCA1OC45ODE5IDI4Ljk1NzJDNTkuMTcxIDI4LjcwMzYgNTkuMjczMSAyOC4zOTU4IDU5LjI3MzEgMjguMDc5NEM1OS4yNzMxIDI3Ljc2MzEgNTkuMTcxIDI3LjQ1NTMgNTguOTgxOSAyNy4yMDE3QzU4Ljc5MjggMjYuOTQ4MSA1OC41MjY5IDI2Ljc2MjMgNTguMjIzOCAyNi42NzJMNTAuMDI5NiAyNC4yMzE3QzQ5Ljc5NTggMjQuMTYyMSA0OS41ODI5IDI0LjAzNTIgNDkuNDEwNCAyMy44NjI3QzQ5LjIzNzkgMjMuNjkwMiA0OS4xMTEgMjMuNDc3MyA0OS4wNDE0IDIzLjI0MzRMNDYuNjAxMSAxNS4wNDkzQzQ2LjUxMDggMTQuNzQ2MiA0Ni4zMjUgMTQuNDgwMyA0Ni4wNzE1IDE0LjI5MTJDNDUuODE3OSAxNC4xMDIxIDQ1LjUxIDE0IDQ1LjE5MzcgMTRDNDQuODc3NCAxNCA0NC41Njk1IDE0LjEwMjEgNDQuMzE1OSAxNC4yOTEyQzQ0LjA2MjMgMTQuNDgwMyA0My44NzY2IDE0Ljc0NjIgNDMuNzg2MyAxNS4wNDkzTDQxLjM0NiAyMy4yNDM0QzQxLjI3NjQgMjMuNDc3MyA0MS4xNDk1IDIzLjY5MDIgNDAuOTc3IDIzLjg2MjdDNDAuODA0NCAyNC4wMzUyIDQwLjU5MTYgMjQuMTYyMSA0MC4zNTc4IDI0LjIzMTdMMzIuMTYzNyAyNi42NzJDMzEuODYwNSAyNi43NjIyIDMxLjU5NDYgMjYuOTQ4IDMxLjQwNTUgMjcuMjAxNkMzMS4yMTY0IDI3LjQ1NTIgMzEuMTE0MyAyNy43NjMxIDMxLjExNDMgMjguMDc5NEMzMS4xMTQzIDI4LjM5NTggMzEuMjE2NCAyOC43MDM3IDMxLjQwNTUgMjguOTU3MkMzMS41OTQ2IDI5LjIxMDggMzEuODYwNSAyOS4zOTY2IDMyLjE2MzcgMjkuNDg2OFoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=";n.setupBitteWallet=function s({walletUrl:g="",deprecated:y=!1,successUrl:f="",failureUrl:d="",callbackUrl:p="",contractId:m=""}={}){return S=>l(this,void 0,void 0,function*(){return{id:"bitte-wallet",type:"browser",metadata:{name:"Bitte Wallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:M,deprecated:y,available:!0,successUrl:f,failureUrl:d,walletUrl:(0,E.resolveBitteWallet)(S.options.network.networkId,g)},init:D=>(0,v.BitteWallet)(Object.assign({callback:p,networkId:S.options.network.networkId,successUrl:f,failureUrl:d,contractId:m},D))}})}},28067:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(p,m,S,_){void 0===_&&(_=S);var D=Object.getOwnPropertyDescriptor(m,S);(!D||("get"in D?!m.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return m[S]}}),Object.defineProperty(p,_,D)}:function(p,m,S,_){void 0===_&&(_=S),p[_]=m[S]}),v=this&&this.__setModuleDefault||(Object.create?function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}:function(p,m){p.default=m}),E=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var m={};if(null!=p)for(var S in p)"default"!==S&&Object.prototype.hasOwnProperty.call(p,S)&&l(m,p,S);return v(m,p),m},M=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BitteWallet=n.TransactionSuccessEnum=void 0;const s=E(u(36237)),g=u(52107),y=u(32184);var p;(p=n.TransactionSuccessEnum||(n.TransactionSuccessEnum={})).MINT="mint",p.TRANSFER="transfer",p.BURN="burn",p.DEPLOY_STORE="deploy-store",p.MAKE_OFFER="make-offer",p.REVOKE_MINTER="revoke-minter",p.ADD_MINTER="add-minter",p.TRANSFER_STORE_OWNERSHIP="transfer-store-ownership",p.AUCTION_LIST="list",p.SIMPLE_SALE_LIST="simple-sale-list",p.UNLIST="unlist",p.TAKE_OFFER="take-offer",p.WITHDRAW_OFFER="withdraw-offer";n.BitteWallet=({metadata:p,options:m,successUrl:S,failureUrl:_,contractId:D,callback:P,networkId:x})=>M(void 0,void 0,void 0,function*(){const N=yield M(void 0,void 0,void 0,function*(){if(void 0!==typeof window){const{connect:H,WalletConnection:L,keyStores:b}=s,B={networkId:x,keyStore:new b.BrowserLocalStorageKeyStore,nodeUrl:m.network.nodeUrl,walletUrl:p.walletUrl,headers:{}},ne=new URL(window.location.href).searchParams.get("account_id");ne&&!D&&localStorage.setItem("mintbase-wallet_wallet_auth_key",JSON.stringify({accountId:ne,allKeys:[]}));const ae=new L(yield H(B),"mintbase-wallet");return localStorage.setItem("mintbase-wallet:callback_url",P),{wallet:ae}}return null});let k;const F=H=>{if(H&&H!==N.wallet.getAccountId())throw new Error(`Cannot sign transactions for ${H} while signed in as ${k}`)},I=()=>M(void 0,void 0,void 0,function*(){var H;const L=N.wallet.getAccountId(),b=N.wallet.account();if(!L||!b)return[];const B=window.localStorage.getItem("mintbase-wallet:account-creation-data");return[{accountId:L,publicKey:null===(H=JSON.parse(B))||void 0===H?void 0:H.devicePublicKey}]}),V=H=>(k=H,window.localStorage.setItem("mintbase-wallet:activeAccountId",H),null);return{getAccountId:()=>k,isSignedIn:()=>M(void 0,void 0,void 0,function*(){return!!k}),signIn:()=>M(void 0,void 0,void 0,function*(){var H;const L=yield I(),b=encodeURI(null===(H=window?.location)||void 0===H?void 0:H.href);return L.length?L:(yield N.wallet.requestSignIn({methodNames:[],successUrl:S||b,failureUrl:_||b,contractId:D}),I())}),signOut:()=>M(void 0,void 0,void 0,function*(){window.localStorage.removeItem("mintbase-wallet:account-data"),N.wallet.isSignedIn()&&N.wallet.signOut()}),signAndSendTransaction:({receiverId:H,actions:L,signerId:b,callbackUrl:B})=>M(void 0,void 0,void 0,function*(){if(F(b),!H&&!D)throw new Error("No receiver found to send the transaction to");const{cbUrl:re}=(0,g.getCallbackUrl)(B??""),ne=re||S;if(!D){const ae=new URL(`${p.walletUrl}/sign-transaction`),ge=JSON.stringify([{receiverId:H,signerId:b,actions:L}]),pe=encodeURIComponent(ge);ae.searchParams.set("transactions_data",pe),ae.searchParams.set("callback_url",ne),window.location.assign(ae.toString())}return N.wallet.account().signAndSendTransaction({receiverId:H||D,actions:L.map(ae=>(0,y.createAction)(ae)),walletCallbackUrl:ne})}),verifyOwner:()=>M(void 0,void 0,void 0,function*(){throw new Error(`The verifyOwner method is not supported by ${p.name}`)}),signMessage:({message:H,nonce:L,recipient:b,callbackUrl:B})=>M(void 0,void 0,void 0,function*(){const{cbUrl:re}=(0,g.getCallbackUrl)(B??""),ne=new URL(`${p.walletUrl}/sign-message`);ne.searchParams.set("message",H),ne.searchParams.set("nonce",L),ne.searchParams.set("recipient",b),ne.searchParams.set("callbackUrl",re),window.location.assign(ne.toString())}),getAvailableBalance:()=>M(void 0,void 0,void 0,function*(){throw`The getAvailableBalance method is not supported by ${p.name}`}),getAccounts:I,switchAccount:H=>M(void 0,void 0,void 0,function*(){return V(H),null}),signAndSendTransactions:({transactions:H,callbackUrl:L})=>M(void 0,void 0,void 0,function*(){if(!N.wallet.isSignedIn())throw new Error("Wallet not signed in");const{cbUrl:b}=(0,g.getCallbackUrl)(L??"");for(const{signerId:te}of H)F(te);const B=JSON.stringify(H),re=encodeURIComponent(B),ne=new URL(`${p.walletUrl}/sign-transaction`);ne.searchParams.set("transactions_data",re),ne.searchParams.set("callback_url",b),window.location.assign(ne.toString())}),verifyMessage:({accountId:H,publicKey:L,signature:b,message:B,nonce:re,recipient:ne,callbackUrl:te})=>M(void 0,void 0,void 0,function*(){const ae=new URL(`${p.walletUrl}/api/verify-message`);ae.searchParams.set("message",B),ae.searchParams.set("accountId",H),ae.searchParams.set("publicKey",L),ae.searchParams.set("signature",b),ae.searchParams.set("nonce",re),ae.searchParams.set("recipient",ne),ae.searchParams.set("callbackUrl",te);try{const pe=yield(yield fetch(ae.toString())).json(),{isValid:we}=pe;return we}catch{return!1}})}})},73597:(q,n,u)=>{"use strict";n.h4=n.uC=void 0;var v=u(51560);Object.defineProperty(n,"uC",{enumerable:!0,get:function(){return v.setupBitteWallet}});var E=u(1310);Object.defineProperty(n,"h4",{enumerable:!0,get:function(){return E.setupMintbaseWallet}})},25697:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(p,m,S,_){void 0===_&&(_=S);var D=Object.getOwnPropertyDescriptor(m,S);(!D||("get"in D?!m.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return m[S]}}),Object.defineProperty(p,_,D)}:function(p,m,S,_){void 0===_&&(_=S),p[_]=m[S]}),v=this&&this.__setModuleDefault||(Object.create?function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}:function(p,m){p.default=m}),E=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var m={};if(null!=p)for(var S in p)"default"!==S&&Object.prototype.hasOwnProperty.call(p,S)&&l(m,p,S);return v(m,p),m},M=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.MintbaseWallet=n.TransactionSuccessEnum=void 0;const s=E(u(36237)),g=u(52107),y=u(32184);var p;(p=n.TransactionSuccessEnum||(n.TransactionSuccessEnum={})).MINT="mint",p.TRANSFER="transfer",p.BURN="burn",p.DEPLOY_STORE="deploy-store",p.MAKE_OFFER="make-offer",p.REVOKE_MINTER="revoke-minter",p.ADD_MINTER="add-minter",p.TRANSFER_STORE_OWNERSHIP="transfer-store-ownership",p.AUCTION_LIST="list",p.SIMPLE_SALE_LIST="simple-sale-list",p.UNLIST="unlist",p.TAKE_OFFER="take-offer",p.WITHDRAW_OFFER="withdraw-offer";n.MintbaseWallet=({metadata:p,options:m,successUrl:S,failureUrl:_,contractId:D,callback:P,networkId:x})=>M(void 0,void 0,void 0,function*(){const N=yield M(void 0,void 0,void 0,function*(){if(void 0!==typeof window){const{connect:H,WalletConnection:L,keyStores:b}=s,B={networkId:x,keyStore:new b.BrowserLocalStorageKeyStore,nodeUrl:m.network.nodeUrl,walletUrl:p.walletUrl,headers:{}},ne=new URL(window.location.href).searchParams.get("account_id");ne&&!D&&localStorage.setItem("mintbase-wallet_wallet_auth_key",JSON.stringify({accountId:ne,allKeys:[]}));const ae=new L(yield H(B),"mintbase-wallet");return localStorage.setItem("mintbase-wallet:callback_url",P),{wallet:ae}}return null});let k;const F=H=>{if(H&&H!==N.wallet.getAccountId())throw new Error(`Cannot sign transactions for ${H} while signed in as ${k}`)},I=()=>M(void 0,void 0,void 0,function*(){var H;const L=N.wallet.getAccountId(),b=N.wallet.account();if(!L||!b)return[];const B=window.localStorage.getItem("mintbase-wallet:account-creation-data");return[{accountId:L,publicKey:null===(H=JSON.parse(B))||void 0===H?void 0:H.devicePublicKey}]}),V=H=>(k=H,window.localStorage.setItem("mintbase-wallet:activeAccountId",H),null);return{getAccountId:()=>k,isSignedIn:()=>M(void 0,void 0,void 0,function*(){return!!k}),signIn:()=>M(void 0,void 0,void 0,function*(){var H;const L=yield I(),b=encodeURI(null===(H=window?.location)||void 0===H?void 0:H.href);return L.length?L:(yield N.wallet.requestSignIn({methodNames:[],successUrl:S||b,failureUrl:_||b,contractId:D}),I())}),signOut:()=>M(void 0,void 0,void 0,function*(){window.localStorage.removeItem("mintbase-wallet:account-data"),N.wallet.isSignedIn()&&N.wallet.signOut()}),signAndSendTransaction:({receiverId:H,actions:L,signerId:b,callbackUrl:B})=>M(void 0,void 0,void 0,function*(){if(F(b),!H&&!D)throw new Error("No receiver found to send the transaction to");const{cbUrl:re}=(0,g.getCallbackUrl)(B??""),ne=re||S;if(!D){const ae=new URL(`${p.walletUrl}/sign-transaction`),ge=JSON.stringify([{receiverId:H,signerId:b,actions:L}]),pe=encodeURIComponent(ge);ae.searchParams.set("transactions_data",pe),ae.searchParams.set("callback_url",ne),window.location.assign(ae.toString())}return N.wallet.account().signAndSendTransaction({receiverId:H||D,actions:L.map(ae=>(0,y.createAction)(ae)),walletCallbackUrl:ne})}),verifyOwner:()=>M(void 0,void 0,void 0,function*(){throw new Error(`The verifyOwner method is not supported by ${p.name}`)}),signMessage:({message:H,nonce:L,recipient:b,callbackUrl:B})=>M(void 0,void 0,void 0,function*(){const{cbUrl:re}=(0,g.getCallbackUrl)(B??""),ne=new URL(`${p.walletUrl}/sign-message`);ne.searchParams.set("message",H),ne.searchParams.set("nonce",L),ne.searchParams.set("recipient",b),ne.searchParams.set("callbackUrl",re),window.location.assign(ne.toString())}),getAvailableBalance:()=>M(void 0,void 0,void 0,function*(){throw`The getAvailableBalance method is not supported by ${p.name}`}),getAccounts:I,switchAccount:H=>M(void 0,void 0,void 0,function*(){return V(H),null}),signAndSendTransactions:({transactions:H,callbackUrl:L})=>M(void 0,void 0,void 0,function*(){if(!N.wallet.isSignedIn())throw new Error("Wallet not signed in");const{cbUrl:b}=(0,g.getCallbackUrl)(L??"");for(const{signerId:te}of H)F(te);const B=JSON.stringify(H),re=encodeURIComponent(B),ne=new URL(`${p.walletUrl}/sign-transaction`);ne.searchParams.set("transactions_data",re),ne.searchParams.set("callback_url",b),window.location.assign(ne.toString())}),verifyMessage:({accountId:H,publicKey:L,signature:b,message:B,nonce:re,recipient:ne,callbackUrl:te})=>M(void 0,void 0,void 0,function*(){const ae=new URL(`${p.walletUrl}/api/verify-message`);ae.searchParams.set("message",B),ae.searchParams.set("accountId",H),ae.searchParams.set("publicKey",L),ae.searchParams.set("signature",b),ae.searchParams.set("nonce",re),ae.searchParams.set("recipient",ne),ae.searchParams.set("callbackUrl",te);try{const pe=yield(yield fetch(ae.toString())).json(),{isValid:we}=pe;return we}catch{return!1}})}})},1310:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.setupMintbaseWallet=void 0;const v=u(25697),E=u(52107),M="data:image/png;base64,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";n.setupMintbaseWallet=function s({walletUrl:g="",deprecated:y=!1,successUrl:f="",failureUrl:d="",callbackUrl:p="",contractId:m=""}={}){return S=>l(this,void 0,void 0,function*(){return{id:"mintbase-wallet",type:"browser",metadata:{name:"Mintbase Wallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:M,deprecated:y,available:!0,successUrl:f,failureUrl:d,walletUrl:(0,E.resolveWalletUrl)(S.options.network.networkId,g)},init:D=>(0,v.MintbaseWallet)(Object.assign({callback:p,networkId:S.options.network.networkId,successUrl:f,failureUrl:d,contractId:m},D))}})}},52107:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveWalletUrl=n.resolveBitteWallet=n.getCallbackUrl=n.checkCallbackUrl=void 0;const u=M=>{function s(g){return/^(https?|ftp|http?):\/\/[^\s/$.?#].[^\s]*$/.test(g)}if(!(null!==M&&M.length>0)){const g=localStorage.getItem("mintbase-wallet:callback_url");return s(g)?g:(console.warn("We recommend you to set the callbackUrl property on setupMintbaseWallet \n read more here: \n https://docs.mintbase.xyz/dev/mintbase-sdk-ref/wallet#setupmintbasewallet \n \n further help available on our telegram channel: \n https://t.me/mintdev"),new URL(window.location.href).toString())}return s(M)?M.startsWith("https://")||M.startsWith("http://")?M.endsWith("/")?M.slice(0,-1):M:new URL(window.location.href).toString():(console.error("callbackUrl set with wrong format. please use an URL with http:// or https:// instead.Further help available on our telegram channel: https://t.me/mintdev"),new URL(window.location.href).toString())};n.checkCallbackUrl=u;n.getCallbackUrl=M=>{var s,g,y,f,d,p;if(void 0!==typeof window){let m="";null!==(g=null===(s=window?.mbjs)||void 0===s?void 0:s.keys)&&void 0!==g&&g.callbackUrl&&(null===(f=null===(y=window?.mbjs)||void 0===y?void 0:y.keys)||void 0===f?void 0:f.callbackUrl.length)>0&&(m=null===(p=null===(d=window?.mbjs)||void 0===d?void 0:d.keys)||void 0===p?void 0:p.callbackUrl);const S=(null==localStorage?void 0:localStorage.getItem("mintbase-wallet:callback_url"))||m;return{cbUrl:u(M??S)}}return null};n.resolveWalletUrl=(M,s)=>{if(s)return s;switch(M){case"mainnet":return"https://wallet.mintbase.xyz";case"testnet":return"https://testnet.wallet.mintbase.xyz/";default:throw new Error("Invalid wallet url")}};n.resolveBitteWallet=(M,s)=>{if(s)return s;switch(M){case"mainnet":return"https://wallet.bitte.ai";case"testnet":return"https://testnet.wallet.bitte.ai/";default:throw new Error("Invalid wallet url")}}},34035:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;const v=u(29761),E=u(69170);class s extends E.KeyStore{constructor(y=window.localStorage,f="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=f}setKey(y,f,d){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,f),d.toString())})}getKey(y,f){return l(this,void 0,void 0,function*(){const d=this.localStorage.getItem(this.storageKeyForSecretKey(y,f));return d?v.KeyPair.fromString(d):null})}removeKey(y,f){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,f))})}clear(){return l(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return l(this,void 0,void 0,function*(){const y=new Set;for(const f of this.storageKeys())if(f.startsWith(this.prefix)){const d=f.substring(this.prefix.length).split(":");y.add(d[1])}return Array.from(y.values())})}getAccounts(y){return l(this,void 0,void 0,function*(){const f=new Array;for(const d of this.storageKeys())if(d.startsWith(this.prefix)){const p=d.substring(this.prefix.length).split(":");p[1]===y&&f.push(p[0])}return f})}storageKeyForSecretKey(y,f){return`${this.prefix}${f}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(34035);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},89645:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};function v(E){return new Promise(M=>setTimeout(M,E))}Object.defineProperty(n,"__esModule",{value:!0}),n.exponentialBackoff=void 0,n.exponentialBackoff=function l(E,M,s,g){return u(this,void 0,void 0,function*(){let y=E;for(let f=0;f!process.env.NEAR_NO_LOGS&&console.warn(...D);n.fetchJson=function _(D,P){return M(this,void 0,void 0,function*(){let x={url:null};"string"==typeof D?x.url=D:x=D;const C=yield(0,f.exponentialBackoff)(d,m,p,()=>M(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(u(11681)))).default);const N=yield global.fetch(x.url,{method:P?"POST":"GET",body:P||void 0,headers:Object.assign(Object.assign({},x.headers),{"Content-Type":"application/json"})});if(!N.ok){if(503===N.status)return S(`Retrying HTTP request for ${x.url} as it's not available now`),null;throw(0,y.default)(N.status,yield N.text())}return N}catch(N){if(N.toString().includes("FetchError")||N.toString().includes("Failed to fetch"))return S(`Retrying HTTP request for ${x.url} because of error: ${N}`),null;throw N}}));if(!C)throw new g.TypedError(`Exceeded ${m} attempts for ${x.url}.`,"RetriesExceeded");return yield C.json()})}},50242:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=n.Provider=n.JsonRpcProvider=n.exponentialBackoff=void 0;var l=u(89645);Object.defineProperty(n,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var v=u(86748);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}});var E=u(40961);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return E.Provider}});var M=u(68226);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},86748:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(P,x,C,N){return new(C||(C=Promise))(function(U,z){function Y(j){try{F(N.next(j))}catch(Z){z(Z)}}function G(j){try{F(N.throw(j))}catch(Z){z(Z)}}function F(j){j.done?U(j.value):function k(U){return U instanceof C?U:new C(function(z){z(U)})}(j.value).then(Y,G)}F((N=N.apply(P,x||[])).next())})},v=this&&this.__rest||function(P,x){var C={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&x.indexOf(N)<0&&(C[N]=P[N]);if(null!=P&&"function"==typeof Object.getOwnPropertySymbols){var k=0;for(N=Object.getOwnPropertySymbols(P);kl(this,void 0,void 0,function*(){try{const U={method:x,params:C,id:_++,jsonrpc:"2.0"},z=yield(0,d.fetchJson)(this.connection,JSON.stringify(U));if(z.error){if("object"==typeof z.error.data)throw"string"==typeof z.error.data.error_message&&"string"==typeof z.error.data.error_type?new M.TypedError(z.error.data.error_message,z.error.data.error_type):(0,E.parseRpcError)(z.error.data);{const Y=`[${z.error.code}] ${z.error.message}: ${z.error.data}`;throw"Timeout"===z.error.data||Y.includes("Timeout error")||Y.includes("query has timed out")?new M.TypedError(Y,"TimeoutError"):new M.TypedError(Y,(0,E.getErrorTypeFromErrorMessage)(z.error.data,z.error.name))}}return z}catch(U){if("TimeoutError"===U.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${x} as it has timed out`,C),null;throw U}})),{result:k}=N;if(typeof k>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${x}.`,"RetriesExceeded");return k})}}n.JsonRpcProvider=D},40961:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Provider=void 0;n.Provider=class u{}},35298:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0;const v=l(u(98538));n.DEFAULT_FUNCTION_CALL_GAS=new v.default("30000000000000")},8778:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0,n.logWarning=function u(...l){process.env.NEAR_NO_LOGS||console.warn(...l)}},89364:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(8778);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(63176);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},63176:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(24806)),M=u(58907),s=l(u(37520)),g=l(u(63902)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},58907:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(98538));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=new v.default("10",10).pow(new v.default(n.NEAR_NOMINATION_EXP,10));const E=[],M=new v.default(10);for(let m=0,S=new v.default(5);m0&&_.iadd(E[x])}const D=(m=_.toString()).substring(0,m.length-n.NEAR_NOMINATION_EXP)||"0",P=m.substring(m.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,S);return function f(m){return m.replace(/\.?0*$/,"")}(`${function p(m){const S=/(-?\d+)(\d{3})/;for(;S.test(m);)m=m.replace(S,"$1,$2");return m}(D)}.${P}`)},n.parseNearAmount=function g(m){if(!m)return null;const S=(m=function y(m){return m.replace(/,/g,"").trim()}(m)).split("."),_=S[0],D=S[1]||"";if(S.length>2||D.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${m}' as NEAR amount`);return function d(m){return m=m.replace(/^0+/,""),""===m?"0":m}(_+D.padEnd(n.NEAR_NOMINATION_EXP,"0"))}},80343:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(35298),n),v(u(89364),n),v(u(58907),n),v(u(84765),n),v(u(98899),n),v(u(51100),n)},84765:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(89364),v=!!process.env.NEAR_NO_LOGS;function M({contractId:s,logs:g,prefix:y=""}){if(!v)for(const f of g)console.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){if(v)return;const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)console.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&console.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},98899:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},51100:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(98538)),E=l(u(89176));n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>new v.default(P.stake,10)).sort((P,x)=>P.cmp(x)),m=new v.default(d),S=p.reduce((P,x)=>P.add(x));if(S.lt(m))throw new Error("Stakes are below seats");let _=new v.default(1),D=S.add(new v.default(1));for(;!_.eq(D.sub(new v.default(1)));){const P=_.add(D).div(new v.default(2));let x=!1,C=new v.default(0);for(let N=0;Nnew v.default(_.stake,10)).sort((_,D)=>_.cmp(D)),S=m.reduce((_,D)=>_.add(D));return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},15167:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=void 0;var l=u(59640);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}});var v=u(51409);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return v.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return v.WalletConnection}})},59640:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})},v=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;const E=u(74931),M=v(u(98538));n.Near=class s{constructor(y){var f;if(this.config=y,this.connection=E.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(f=y.deps)||void 0===f?void 0:f.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const d=y.initialBalance?new M.default(y.initialBalance):new M.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,y.masterAccount),d)}else y.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,y)})}createAccount(y,f){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,f),new E.Account(this.connection,y)})}}},51409:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})},v=this&&this.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectedWalletAccount=n.WalletConnection=void 0;const E=u(74931),M=u(29761),s=u(38445),g=v(u(98538)),y=u(21531),m="pending_key";n.WalletConnection=class S{constructor(P,x){if("string"!=typeof x)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(k,U)=>"isSignedIn"===U?()=>!1:"getAccountId"===U?()=>"":k[U]&&"function"==typeof k[U]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:k[U]});this._near=P;const C=x+"_wallet_auth_key",N=JSON.parse(window.localStorage.getItem(C));this._networkId=P.config.networkId,this._walletBaseUrl=P.config.walletUrl,x=x||P.config.contractName||"default",this._keyStore=P.connection.signer.keyStore,this._authData=N||{allKeys:[]},this._authDataKey=C,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:P,methodNames:x,successUrl:C,failureUrl:N}){return l(this,void 0,void 0,function*(){const k=new URL(window.location.href),U=new URL(this._walletBaseUrl+"/login/");if(U.searchParams.set("success_url",C||k.href),U.searchParams.set("failure_url",N||k.href),P){yield(yield this._near.account(P)).state(),U.searchParams.set("contract_id",P);const Y=M.KeyPair.fromRandom("ed25519");U.searchParams.set("public_key",Y.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,m+Y.getPublicKey(),Y)}x&&x.forEach(z=>{U.searchParams.append("methodNames",z)}),window.location.assign(U.toString())})}requestSignTransactions({transactions:P,meta:x,callbackUrl:C}){return l(this,void 0,void 0,function*(){const N=new URL(window.location.href),k=new URL("sign",this._walletBaseUrl);k.searchParams.set("transactions",P.map(U=>(0,y.serialize)(s.SCHEMA,U)).map(U=>Buffer.from(U).toString("base64")).join(",")),k.searchParams.set("callbackUrl",C||N.href),x&&k.searchParams.set("meta",x),window.location.assign(k.toString())})}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const P=new URL(window.location.href),x=P.searchParams.get("public_key")||"",C=(P.searchParams.get("all_keys")||"").split(","),N=P.searchParams.get("account_id")||"";if(N){const k={accountId:N,allKeys:C};window.localStorage.setItem(this._authDataKey,JSON.stringify(k)),x&&(yield this._moveKeyFromTempToPermanent(N,x)),this._authData=k}P.searchParams.delete("public_key"),P.searchParams.delete("all_keys"),P.searchParams.delete("account_id"),P.searchParams.delete("meta"),P.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,P.toString())})}_moveKeyFromTempToPermanent(P,x){return l(this,void 0,void 0,function*(){const C=yield this._keyStore.getKey(this._networkId,m+x);yield this._keyStore.setKey(this._networkId,P,C),yield this._keyStore.removeKey(this._networkId,m+x)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new _(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class _ extends E.Account{constructor(P,x,C){super(x,C),this.walletConnection=P}signAndSendTransaction({receiverId:P,actions:x,walletMeta:C,walletCallbackUrl:N=window.location.href}){const k=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const U=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let z=yield this.accessKeyForTransaction(P,x,U);if(!z)throw new Error(`Cannot find matching key for transaction sent to ${P}`);if(U&&U.toString()===z.public_key)try{return yield k.signAndSendTransaction.call(this,{receiverId:P,actions:x})}catch(T){if("NotEnoughAllowance"!==T.type)throw T;z=yield this.accessKeyForTransaction(P,x)}const Y=yield this.connection.provider.block({finality:"final"}),G=(0,y.baseDecode)(Y.header.hash),F=M.PublicKey.from(z.public_key),j=z.access_key.nonce.add(new g.default(1)),Z=(0,s.createTransaction)(this.accountId,F,P,j,x,G);return yield this.walletConnection.requestSignTransactions({transactions:[Z],meta:C,callbackUrl:N}),new Promise((T,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(P,x,C){return l(this,void 0,void 0,function*(){const{access_key:{permission:N}}=P;if("FullAccess"===N)return!0;if(N.FunctionCall){const{receiver_id:k,method_names:U}=N.FunctionCall;if(k===this.accountId&&U.includes("add_request_and_confirm"))return!0;if(k===x){if(1!==C.length)return!1;const[{functionCall:z}]=C;return z&&(!z.deposit||"0"===z.deposit.toString())&&(0===U.length||U.includes(z.methodName))}}return!1})}accessKeyForTransaction(P,x,C){return l(this,void 0,void 0,function*(){const N=yield this.getAccessKeys();if(C){const U=N.find(z=>z.public_key.toString()===C.toString());if(U&&(yield this.accessKeyMatchesTransaction(U,P,x)))return U}const k=this.walletConnection._authData.allKeys;for(const U of N)if(-1!==k.indexOf(U.public_key)&&(yield this.accessKeyMatchesTransaction(U,P,x)))return U;return null})}}n.ConnectedWalletAccount=_},91226:(q,n,u)=>{"use strict";var l=u(63216)("http-errors"),v=u(1106),E=u(25890),M=u(83894),s=u(77721);function g(P){return Number(String(P).charAt(0)+"00")}function S(P,x){var C=Object.getOwnPropertyDescriptor(P,"name");C&&C.configurable&&(C.value=x,Object.defineProperty(P,"name",C))}function D(P){return"Error"!==P.substr(-5)?P+"Error":P}q.exports=function y(){for(var P,x,C=500,N={},k=0;k=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof C||!E[C]&&(C<400||C>=600))&&(C=500);var z=y[C]||y[g(C)];for(var Y in P||(P=z?new z(x):new Error(x||E[C]),Error.captureStackTrace(P,y)),(!z||!(P instanceof z)||P.status!==C)&&(P.expose=C<500,P.status=P.statusCode=C),N)"status"!==Y&&"statusCode"!==Y&&(P[Y]=N[Y]);return P},q.exports.HttpError=function f(){function P(){throw new TypeError("cannot construct abstract class")}return M(P,Error),P}(),q.exports.isHttpError=function p(P){return function(C){return!(!C||"object"!=typeof C)&&(C instanceof P||C instanceof Error&&"boolean"==typeof C.expose&&"number"==typeof C.statusCode&&C.status===C.statusCode)}}(q.exports.HttpError),function _(P,x,C){x.forEach(function(k){var U,z=s(E[k]);switch(g(k)){case 400:U=function d(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!0,k}(C,z,k);break;case 500:U=function m(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!1,k}(C,z,k)}U&&(P[k]=U,P[z]=U)}),P["I'mateapot"]=l.function(P.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(q.exports,E.codes,q.exports.HttpError)},63216:q=>{"use strict";function u(v,E){if("function"!=typeof v)throw new TypeError("argument fn must be a function");return v}function l(v,E,M){if(!v||"object"!=typeof v&&"function"!=typeof v)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(v,E);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable")}q.exports=function n(v){if(!v)throw new TypeError("argument namespace is required");function E(M){}return E._file=void 0,E._ignored=!0,E._namespace=v,E._traced=!1,E._warned=Object.create(null),E.function=u,E.property=l,E}},24806:function(q){q.exports=function(){"use strict";var n=Object.prototype.toString,u=Array.isArray||function(Z){return"[object Array]"===n.call(Z)};function l(j){return"function"==typeof j}function v(j){return u(j)?"array":typeof j}function E(j){return j.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function M(j,Z){return null!=j&&"object"==typeof j&&Z in j}function s(j,Z){return null!=j&&"object"!=typeof j&&j.hasOwnProperty&&j.hasOwnProperty(Z)}var g=RegExp.prototype.test;function y(j,Z){return g.call(j,Z)}var f=/\S/;function d(j){return!y(f,j)}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function m(j){return String(j).replace(/[&<>"'`=\/]/g,function(T){return p[T]})}var S=/\s*/,_=/\s+/,D=/\s*=/,P=/\s*\}/,x=/#|\^|\/|>|\{|&|=|!/;function C(j,Z){if(!j)return[];var b,B,re,T=!1,o=[],h=[],w=[],I=!1,R=!1,V="",H=0;function L(){if(I&&!R)for(;w.length;)delete h[w.pop()];else w=[];I=!1,R=!1}function ne(he){if("string"==typeof he&&(he=he.split(_,2)),!u(he)||2!==he.length)throw new Error("Invalid tags: "+he);b=new RegExp(E(he[0])+"\\s*"),B=new RegExp("\\s*"+E(he[1])),re=new RegExp("\\s*"+E("}"+he[1]))}ne(Z||G.tags);for(var ae,ge,pe,we,ce,le,te=new U(j);!te.eos();){if(ae=te.pos,pe=te.scanUntil(b))for(var ue=0,fe=pe.length;ue0?o[o.length-1][4]:Z;break;default:T.push(h)}return Z}function U(j){this.string=j,this.tail=j,this.pos=0}function z(j,Z){this.view=j,this.cache={".":this.view},this.parent=Z}function Y(){this.templateCache={_cache:{},set:function(Z,T){this._cache[Z]=T},get:function(Z){return this._cache[Z]},clear:function(){this._cache={}}}}U.prototype.eos=function(){return""===this.tail},U.prototype.scan=function(Z){var T=this.tail.match(Z);if(!T||0!==T.index)return"";var o=T[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},U.prototype.scanUntil=function(Z){var o,T=this.tail.search(Z);switch(T){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,T),this.tail=this.tail.substring(T)}return this.pos+=o.length,o},z.prototype.push=function(Z){return new z(Z,this)},z.prototype.lookup=function(Z){var o,T=this.cache;if(T.hasOwnProperty(Z))o=T[Z];else{for(var w,I,R,h=this,V=!1;h;){if(Z.indexOf(".")>0)for(w=h.view,I=Z.split("."),R=0;null!=w&&R"===V?H=this.renderPartial(R,T,o,w):"&"===V?H=this.unescapedValue(R,T):"name"===V?H=this.escapedValue(R,T,w):"text"===V&&(H=this.rawValue(R)),void 0!==H&&(I+=H);return I},Y.prototype.renderSection=function(Z,T,o,h,w){var I=this,R="",V=T.lookup(Z[1]);function H(B){return I.render(B,T,o,w)}if(V){if(u(V))for(var L=0,b=V.length;L0||!o)&&(w[I]=h+w[I]);return w.join("\n")},Y.prototype.renderPartial=function(Z,T,o,h){if(o){var w=this.getConfigTags(h),I=l(o)?o(Z[1]):o[Z[1]];if(null!=I){var R=Z[6],V=Z[5],H=Z[4],L=I;0==V&&H&&(L=this.indentPartial(I,H,R));var b=this.parse(L,w);return this.renderTokens(b,T,o,L,h)}}},Y.prototype.unescapedValue=function(Z,T){var o=T.lookup(Z[1]);if(null!=o)return o},Y.prototype.escapedValue=function(Z,T,o){var h=this.getConfigEscape(o)||G.escape,w=T.lookup(Z[1]);if(null!=w)return"number"==typeof w&&h===G.escape?String(w):h(w)},Y.prototype.rawValue=function(Z){return Z[1]},Y.prototype.getConfigTags=function(Z){return u(Z)?Z:Z&&"object"==typeof Z?Z.tags:void 0},Y.prototype.getConfigEscape=function(Z){if(Z&&"object"==typeof Z&&!u(Z))return Z.escape};var G={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(j){F.templateCache=j},get templateCache(){return F.templateCache}},F=new Y;return G.clearCache=function(){return F.clearCache()},G.parse=function(Z,T){return F.parse(Z,T)},G.render=function(Z,T,o,h){if("string"!=typeof Z)throw new TypeError('Invalid template! Template should be a "string" but "'+v(Z)+'" was given as the first argument for mustache#render(template, view, partials)');return F.render(Z,T,o,h)},G.escape=m,G.Scanner=U,G.Context=z,G.Writer=Y,G}()},29472:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;var l=u(74931);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}})},69645:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;var l=u(74931);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},87509:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.AccountMultisig=n.Account2FA=void 0;var l=u(74931);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},58050:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.connect=void 0;const v=u(49990);n.connect=function E(M){return l(this,void 0,void 0,function*(){return new v.Near(M)})}},36237:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(s,g,y,f){void 0===f&&(f=y);var d=Object.getOwnPropertyDescriptor(g,y);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(s,f,d)}:function(s,g,y,f){void 0===f&&(f=y),s[f]=g[y]}),v=this&&this.__setModuleDefault||(Object.create?function(s,g){Object.defineProperty(s,"default",{enumerable:!0,value:g})}:function(s,g){s.default=g}),E=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var g={};if(null!=s)for(var y in s)"default"!==y&&Object.prototype.hasOwnProperty.call(s,y)&&l(g,s,y);return v(g,s),g},M=this&&this.__exportStar||function(s,g){for(var y in s)"default"!==y&&!Object.prototype.hasOwnProperty.call(g,y)&&l(g,s,y)};Object.defineProperty(n,"__esModule",{value:!0}),n.keyStores=void 0,n.keyStores=E(u(8823)),M(u(18929),n),M(u(58050),n),u(4073)},18929:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(C,N,k,U){void 0===U&&(U=k);var z=Object.getOwnPropertyDescriptor(N,k);(!z||("get"in z?!N.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return N[k]}}),Object.defineProperty(C,U,z)}:function(C,N,k,U){void 0===U&&(U=k),C[U]=N[k]}),v=this&&this.__setModuleDefault||(Object.create?function(C,N){Object.defineProperty(C,"default",{enumerable:!0,value:N})}:function(C,N){C.default=N}),E=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var N={};if(null!=C)for(var k in C)"default"!==k&&Object.prototype.hasOwnProperty.call(C,k)&&l(N,C,k);return v(N,C),N};Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=n.KeyPair=n.Signer=n.InMemorySigner=n.Contract=n.Connection=n.Account=n.multisig=n.validators=n.transactions=n.utils=n.providers=n.accountCreator=void 0;const M=E(u(97812));n.providers=M;const s=E(u(61016));n.utils=s;const g=E(u(11889));n.transactions=g;const y=E(u(68182));n.validators=y;const f=u(29472);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return f.Account}});const d=E(u(87509));n.multisig=d;const p=E(u(69645));n.accountCreator=p;const m=u(44596);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return m.Connection}});const S=u(64193);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return S.Signer}}),Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return S.InMemorySigner}});const _=u(34);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return _.Contract}});const D=u(44625);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});const P=u(49990);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return P.Near}});const x=u(17567);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return x.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return x.WalletConnection}})},44596:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;var l=u(74931);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return l.Connection}})},34:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;var l=u(74931);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return l.Contract}})},8823:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.BrowserLocalStorageKeyStore=n.InMemoryKeyStore=n.KeyStore=void 0;const l=u(84827);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const v=u(90718);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return v.InMemoryKeyStore}});const E=u(18781);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const M=u(46724);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},18781:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(27579);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},90718:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.InMemoryKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},84827:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyStore=void 0;var l=u(69170);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},46724:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},49990:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;var l=u(15167);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}})},97812:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorContext=n.TypedError=n.getTransactionLastResult=n.FinalExecutionStatusBasic=n.JsonRpcProvider=n.Provider=void 0;const l=u(99637);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const v=u(91504);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}})},91504:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcProvider=n.TypedError=n.ErrorContext=void 0;var l=u(17527);Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var v=u(50242);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}})},99637:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=n.IdType=n.Provider=n.getTransactionLastResult=void 0;var l=u(80343);Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var v=u(50242);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return v.Provider}});var E=u(17527);Object.defineProperty(n,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(n,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},64193:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(82613);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return l.Signer}})},11889:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transfer=n.stake=n.functionCallAccessKey=n.functionCall=n.fullAccessKey=n.deployContract=n.deleteKey=n.deleteAccount=n.createAccount=n.addKey=n.encodeDelegateAction=n.encodeSignedDelegate=n.Transaction=n.SignedTransaction=n.Signature=n.signTransaction=n.createTransaction=n.SCHEMA=n.Transfer=n.Stake=n.FunctionCallPermission=n.FunctionCall=n.FullAccessPermission=n.DeployContract=n.DeleteKey=n.DeleteAccount=n.CreateAccount=n.AddKey=n.AccessKeyPermission=n.AccessKey=n.Action=n.stringifyJsonOrBytes=void 0;var l=u(38445);Object.defineProperty(n,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(n,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(n,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(n,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(n,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(n,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(n,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(n,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(n,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(n,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(n,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(n,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(n,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(n,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(n,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(n,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(n,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(n,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(n,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(n,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(n,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const v=u(38445);n.addKey=(_,D)=>v.actionCreators.addKey(_,D);n.createAccount=()=>v.actionCreators.createAccount();n.deleteAccount=_=>v.actionCreators.deleteAccount(_);n.deleteKey=_=>v.actionCreators.deleteKey(_);n.deployContract=_=>v.actionCreators.deployContract(_);n.fullAccessKey=()=>v.actionCreators.fullAccessKey();n.functionCall=(_,D,P,x,C,N)=>v.actionCreators.functionCall(_,D,P,x,C,N);n.functionCallAccessKey=(_,D,P)=>v.actionCreators.functionCallAccessKey(_,D,P);n.stake=(_,D)=>v.actionCreators.stake(_,D);n.transfer=_=>v.actionCreators.transfer(_)},84539:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Enum=n.Assignable=void 0;var l=u(17527);Object.defineProperty(n,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});n.Enum=class v{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(s=>{this[s]=M[s],this.enum=s})}}},14427:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.TypedError=n.PositionalArgsError=n.ErrorContext=n.ArgumentTypeError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=void 0;var l=u(74931);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var v=u(17527);Object.defineProperty(n,"ArgumentTypeError",{enumerable:!0,get:function(){return v.ArgumentTypeError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}}),Object.defineProperty(n,"PositionalArgsError",{enumerable:!0,get:function(){return v.PositionalArgsError}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}});var E=u(80343);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},5782:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION_EXP=n.NEAR_NOMINATION=void 0;var l=u(80343);Object.defineProperty(n,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(n,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(n,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(n,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},61016:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(S,_,D,P){void 0===P&&(P=D);var x=Object.getOwnPropertyDescriptor(_,D);(!x||("get"in x?!_.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return _[D]}}),Object.defineProperty(S,P,x)}:function(S,_,D,P){void 0===P&&(P=D),S[P]=_[D]}),v=this&&this.__setModuleDefault||(Object.create?function(S,_){Object.defineProperty(S,"default",{enumerable:!0,value:_})}:function(S,_){S.default=_}),E=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var _={};if(null!=S)for(var D in S)"default"!==D&&Object.prototype.hasOwnProperty.call(S,D)&&l(_,S,D);return v(_,S),_};Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.rpc_errors=n.KeyPairEd25519=n.KeyPair=n.PublicKey=n.format=n.enums=n.web=n.serialize=n.key_pair=void 0;const M=E(u(44625));n.key_pair=M;const s=E(u(74500));n.serialize=s;const g=E(u(65073));n.web=g;const y=E(u(84539));n.enums=y;const f=E(u(5782));n.format=f;const d=E(u(56098));n.rpc_errors=d;const p=u(44625);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}}),Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}});const m=u(14427);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return m.logWarning}})},44625:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyType=n.KeyPairEd25519=n.KeyPair=void 0;var l=u(29761);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},56098:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ServerError=n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=void 0;var l=u(80343);Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},74500:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BinaryReader=n.BinaryWriter=n.BorshError=n.deserialize=n.serialize=n.base_decode=n.base_encode=void 0;var l=u(21531);Object.defineProperty(n,"base_encode",{enumerable:!0,get:function(){return l.baseEncode}}),Object.defineProperty(n,"base_decode",{enumerable:!0,get:function(){return l.baseDecode}}),Object.defineProperty(n,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(n,"deserialize",{enumerable:!0,get:function(){return l.deserialize}}),Object.defineProperty(n,"BorshError",{enumerable:!0,get:function(){return l.BorshError}}),Object.defineProperty(n,"BinaryWriter",{enumerable:!0,get:function(){return l.BinaryWriter}}),Object.defineProperty(n,"BinaryReader",{enumerable:!0,get:function(){return l.BinaryReader}})},65073:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=void 0;var l=u(50242);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},68182:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findSeatPrice=n.diffEpochValidators=void 0;var l=u(80343);Object.defineProperty(n,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(n,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},17567:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=void 0;var l=u(15167);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},25890:(q,n,u)=>{"use strict";var l=u(88546);function E(M){if("number"==typeof M){if(!E[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var s=parseInt(M,10);if(!isNaN(s)){if(!E[s])throw new Error("invalid status code: "+s);return s}if(!(s=E[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return s}q.exports=E,E.STATUS_CODES=l,E.codes=function v(M,s){var g=[];return Object.keys(s).forEach(function(f){var d=s[f],p=Number(f);M[p]=d,M[d]=p,M[d.toLowerCase()]=p,g.push(p)}),g}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},15139:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(Z,T,o,h){return new(o||(o=Promise))(function(I,R){function V(b){try{L(h.next(b))}catch(B){R(B)}}function H(b){try{L(h.throw(b))}catch(B){R(B)}}function L(b){b.done?I(b.value):function w(I){return I instanceof o?I:new o(function(R){R(I)})}(b.value).then(V,H)}L((h=h.apply(Z,T||[])).next())})},v=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;const E=u(29761),M=u(89870),s=u(38445),g=u(17527),y=u(1088),f=v(u(98538)),d=u(21531),{addKey:p,createAccount:m,deleteAccount:S,deleteKey:_,deployContract:D,fullAccessKey:P,functionCall:x,functionCallAccessKey:C,stake:N,transfer:k}=s.actionCreators;function G(Z){return JSON.parse(Buffer.from(Z).toString())}function F(Z){return Buffer.from(JSON.stringify(Z))}class j{constructor(T,o){this.accessKeyByPublicKeyCache={},this.connection=T,this.accountId=o}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(T,o){return l(this,void 0,void 0,function*(){const h=yield this.findAccessKey(T,o);if(!h)throw new g.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:w}=h,R=(yield this.connection.provider.block({finality:"final"})).header.hash,V=w.nonce.add(new f.default(1));return yield(0,s.signTransaction)(T,V,o,(0,d.baseDecode)(R),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:T,actions:o,returnError:h}){return l(this,void 0,void 0,function*(){let w,I;const R=yield(0,M.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[w,I]=yield this.signTransaction(T,o);const V=I.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(I)}catch(H){if("InvalidNonce"===H.type)return(0,y.logWarning)(`Retrying transaction ${T}:${(0,d.baseEncode)(w)} with new nonce.`),delete this.accessKeyByPublicKeyCache[V.toString()],null;if("Expired"===H.type)return(0,y.logWarning)(`Retrying transaction ${T}:${(0,d.baseEncode)(w)} due to expired block hash`),null;throw H.context=new g.ErrorContext((0,d.baseEncode)(w)),H}}));if(!R)throw new g.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,y.printTxOutcomeLogsAndFailures)({contractId:I.transaction.receiverId,outcome:R}),!h&&"object"==typeof R.status&&"object"==typeof R.status.Failure&&null!==R.status.Failure)throw R.status.Failure.error_message&&R.status.Failure.error_type?new g.TypedError(`Transaction ${R.transaction_outcome.id} failed. ${R.status.Failure.error_message}`,R.status.Failure.error_type):(0,y.parseResultError)(R);return R})}findAccessKey(T,o){return l(this,void 0,void 0,function*(){const h=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!h)throw new g.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const w=this.accessKeyByPublicKeyCache[h.toString()];if(void 0!==w)return{publicKey:h,accessKey:w};try{const I=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:h.toString(),finality:"optimistic"}),R=Object.assign(Object.assign({},I),{nonce:new f.default(I.nonce)});return this.accessKeyByPublicKeyCache[h.toString()]?{publicKey:h,accessKey:this.accessKeyByPublicKeyCache[h.toString()]}:(this.accessKeyByPublicKeyCache[h.toString()]=R,{publicKey:h,accessKey:R})}catch(I){if("AccessKeyDoesNotExist"==I.type)return null;throw I}})}createAndDeployContract(T,o,h,w){return l(this,void 0,void 0,function*(){const I=P();return yield this.signAndSendTransaction({receiverId:T,actions:[m(),k(w),p(E.PublicKey.from(o),I),D(h)]}),new j(this.connection,T)})}sendMoney(T,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:T,actions:[k(o)]})})}createAccount(T,o,h){return l(this,void 0,void 0,function*(){const w=P();return this.signAndSendTransaction({receiverId:T,actions:[m(),k(h),p(E.PublicKey.from(o),w)]})})}deleteAccount(T){return l(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[S(T)]})})}deployContract(T){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[D(T)]})})}encodeJSContractArgs(T,o,h){return Buffer.concat([Buffer.from(T),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(h)])}functionCall({contractId:T,methodName:o,args:h={},gas:w=y.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:I,walletMeta:R,walletCallbackUrl:V,stringify:H,jsContract:L}){return l(this,void 0,void 0,function*(){let b;if(this.validateArgs(h),L)b=["call_js_contract",this.encodeJSContractArgs(T,o,JSON.stringify(h)),w,I,null,!0];else{const B=void 0===H?s.stringifyJsonOrBytes:H;b=[o,h,w,I,B,!1]}return this.signAndSendTransaction({receiverId:L?this.connection.jsvmAccountId:T,actions:[x.apply(void 0,b)],walletMeta:R,walletCallbackUrl:V})})}addKey(T,o,h,w){return l(this,void 0,void 0,function*(){let I;return h||(h=[]),Array.isArray(h)||(h=[h]),I=o?C(o,h,w):P(),this.signAndSendTransaction({receiverId:this.accountId,actions:[p(E.PublicKey.from(T),I)]})})}deleteKey(T){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[_(E.PublicKey.from(T))]})})}stake(T,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[N(o,E.PublicKey.from(T))]})})}signedDelegate({actions:T,blockHeightTtl:o,receiverId:h}){return l(this,void 0,void 0,function*(){const{provider:w,signer:I}=this.connection,{header:R}=yield w.block({finality:"final"}),{accessKey:V,publicKey:H}=yield this.findAccessKey(null,null),L=(0,s.buildDelegateAction)({actions:T,maxBlockHeight:new f.default(R.height).add(new f.default(o)),nonce:new f.default(V.nonce).add(new f.default(1)),publicKey:H,receiverId:h,senderId:this.accountId}),{signedDelegateAction:b}=yield(0,s.signDelegateAction)({delegateAction:L,signer:{sign:B=>l(this,void 0,void 0,function*(){const{signature:re}=yield I.signMessage(B,L.senderId,this.connection.networkId);return re})}});return b})}validateArgs(T){if((void 0===T.byteLength||T.byteLength!==T.length)&&(Array.isArray(T)||"object"!=typeof T))throw new g.PositionalArgsError}viewFunction({contractId:T,methodName:o,args:h={},parse:w=G,stringify:I=F,jsContract:R=!1,blockQuery:V={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let H;this.validateArgs(h),H=R?this.encodeJSContractArgs(T,o,Object.keys(h).length>0?JSON.stringify(h):""):I(h);const L=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},V),{account_id:R?this.connection.jsvmAccountId:T,method_name:R?"view_js_contract":o,args_base64:H.toString("base64")}));return L.logs&&(0,y.printTxOutcomeLogs)({contractId:T,logs:L.logs}),L.result&&L.result.length>0&&w(Buffer.from(L.result))})}viewState(T,o={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:h}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(T).toString("base64")}));return h.map(({key:w,value:I})=>({key:Buffer.from(w,"base64"),value:Buffer.from(I,"base64")}))})}getAccessKeys(){var T;return l(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(T=o?.keys)||void 0===T?void 0:T.map(h=>Object.assign(Object.assign({},h),{access_key:Object.assign(Object.assign({},h.access_key),{nonce:new f.default(h.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(h=>"FullAccess"!==h.access_key.permission).map(h=>{const w=h.access_key.permission;return{contractId:w.FunctionCall.receiver_id,amount:w.FunctionCall.allowance,publicKey:h.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const T=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),h=new f.default(T.runtime_config.storage_amount_per_byte),w=new f.default(o.storage_usage).mul(h),I=new f.default(o.locked),R=new f.default(o.amount).add(I),V=R.sub(f.default.max(I,w));return{total:R.toString(),stateStaked:w.toString(),staked:I.toString(),available:V.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const T=yield this.connection.provider.block({finality:"final"}),o=T.header.hash,h=T.header.epoch_id,{current_validators:w,next_validators:I,current_proposals:R}=yield this.connection.provider.validators(h),V=new Set;[...w,...I,...R].forEach(ne=>V.add(ne.account_id));const H=[...V],L=H.map(ne=>this.viewFunction({contractId:ne,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),b=yield Promise.allSettled(L);if(b.some(ne=>"rejected"===ne.status&&"TimeoutError"===ne.reason.type))throw new Error("Failed to get delegated stake balance");const re=b.reduce((ne,te,ae)=>{const ge=H[ae];if("fulfilled"===te.status){const pe=new f.default(te.value);if(!pe.isZero())return Object.assign(Object.assign({},ne),{stakedValidators:[...ne.stakedValidators,{validatorId:ge,amount:pe.toString()}],total:ne.total.add(pe)})}return"rejected"===te.status?Object.assign(Object.assign({},ne),{failedValidators:[...ne.failedValidators,{validatorId:ge,error:te.reason}]}):ne},{stakedValidators:[],failedValidators:[],total:new f.default(0)});return Object.assign(Object.assign({},re),{total:re.total.toString()})})}}n.Account=j},46398:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(k,U,z,Y){return new(z||(z=Promise))(function(F,j){function Z(h){try{o(Y.next(h))}catch(w){j(w)}}function T(h){try{o(Y.throw(h))}catch(w){j(w)}}function o(h){h.done?F(h.value):function G(F){return F instanceof z?F:new z(function(j){j(F)})}(h.value).then(Z,T)}o((Y=Y.apply(k,U||[])).next())})},v=this&&this.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(n,"__esModule",{value:!0}),n.Account2FA=void 0;const E=u(29761),M=u(17527),s=u(89870),g=u(38445),y=v(u(98538)),f=u(64706),d=u(69865),p=u(3725),{addKey:m,deleteKey:S,deployContract:_,fullAccessKey:D,functionCall:P,functionCallAccessKey:x}=g.actionCreators;class C extends f.AccountMultisig{constructor(U,z,Y){super(U,z,Y),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Y.helperUrl||this.helperUrl,this.storage=Y.storage,this.sendCode=Y.sendCode||this.sendCodeDefault,this.getCode=Y.getCode||this.getCodeDefault,this.verifyCode=Y.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Y.onConfirmResult}signAndSendTransaction({receiverId:U,actions:z}){const Y=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield Y.signAndSendTransaction.call(this,{receiverId:U,actions:z}),yield this.sendCode();const G=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(G)),G})}deployMultisig(U){const z=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:Y}=this,G=(yield this.getRecoveryMethods()).data.filter(({kind:w,publicKey:I})=>("phrase"===w||"ledger"===w)&&null!==I).map(w=>w.publicKey),F=(yield this.getAccessKeys()).filter(({public_key:w,access_key:{permission:I}})=>"FullAccess"===I&&!G.includes(w)).map(w=>w.public_key).map(N),j=N((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey),Z=Buffer.from(JSON.stringify({num_confirmations:2})),T=[...F.map(w=>S(w)),...F.map(w=>m(w,x(Y,d.MULTISIG_CHANGE_METHODS,null))),m(j,x(Y,d.MULTISIG_CONFIRM_METHODS,null)),_(U)],o=T.concat(P("new",Z,d.MULTISIG_GAS,d.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",Y);const{stateStatus:h}=yield this.checkMultisigCodeAndStateStatus(U);switch(h){case p.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield z.signAndSendTransactionWithAccount.call(this,Y,o);case p.MultisigStateStatus.VALID_STATE:return yield z.signAndSendTransactionWithAccount.call(this,Y,T);case p.MultisigStateStatus.INVALID_STATE:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:U,cleanupContractBytes:z}){return l(this,void 0,void 0,function*(){let Y=[];z&&(yield this.deleteAllRequests().catch(Z=>Z),Y=yield this.get2faDisableCleanupActions(z));const G=yield this.get2faDisableKeyConversionActions(),F=[...Y,...G,_(U)],j=yield this.findAccessKey(this.accountId,F);if(j&&j.accessKey&&"FullAccess"!==j.accessKey.permission)throw new M.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,F)})}get2faDisableCleanupActions(U){return l(this,void 0,void 0,function*(){const z=yield this.viewState("").catch(G=>{const F=G.cause&&G.cause.name;if("NO_CONTRACT_CODE"==F)return[];throw"TOO_LARGE_CONTRACT_STATE"==F?new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):G}),Y=z.map(({key:G})=>G.toString("base64"));return z.length?[_(U),P("clean",{keys:Y},d.MULTISIG_GAS,new y.default("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:U}=this,Y=(yield this.getAccessKeys()).filter(({access_key:F})=>"FullAccess"!==F.permission).filter(({access_key:F})=>{const j=F.permission.FunctionCall;return j.receiver_id===U&&4===j.method_names.length&&j.method_names.includes("add_request_and_confirm")}),G=E.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:U})).publicKey);return[S(G),...Y.map(({public_key:F})=>S(E.PublicKey.from(F))),...Y.map(({public_key:F})=>m(E.PublicKey.from(F),D()))]})}disable(U,z){return l(this,void 0,void 0,function*(){const{stateStatus:Y}=yield this.checkMultisigCodeAndStateStatus();if(Y!==p.MultisigStateStatus.VALID_STATE&&Y!==p.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new M.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let G;yield this.deleteAllRequests().catch(Z=>G=Z);const j=[...yield this.get2faDisableCleanupActions(z).catch(Z=>{throw"ContractHasExistingState"===Z.type&&G||Z}),...yield this.get2faDisableKeyConversionActions(),_(U)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:j})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:U}=this,{requestId:z}=this.getRequest(),Y=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:U,method:Y,requestId:z}),z})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const U=yield this.get2faMethod(),z=yield this.getCode(U);try{return yield this.verifyCode(z)}catch(Y){if(console.warn("Error validating security code:",Y),Y.toString().includes("invalid 2fa code provided")||Y.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Y}})}verifyCodeDefault(U){return l(this,void 0,void 0,function*(){const{accountId:z}=this,Y=this.getRequest();if(!Y)throw new Error("no request pending");const{requestId:G}=Y;return yield this.postSignedJson("/2fa/verify",{accountId:z,securityCode:U,requestId:G})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:U}=this;return{accountId:U,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:U})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:U}=yield this.getRecoveryMethods();if(U&&U.length&&(U=U.find(G=>0===G.kind.indexOf("2fa-"))),!U)return null;const{kind:z,detail:Y}=U;return{kind:z,detail:Y}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:U}=this,Y=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),G=yield this.connection.signer.signMessage(Buffer.from(Y),U,this.connection.networkId);return{blockNumber:Y,blockNumberSignature:Buffer.from(G.signature).toString("base64")}})}postSignedJson(U,z){return l(this,void 0,void 0,function*(){return yield(0,s.fetchJson)(this.helperUrl+U,JSON.stringify(Object.assign(Object.assign({},z),yield this.signatureFor())))})}}n.Account2FA=C;const N=k=>E.PublicKey.from(k)},53683:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;const v=u(89870);class E{}n.AccountCreator=E;n.LocalAccountCreator=class M extends E{constructor(y,f){super(),this.masterAccount=y,this.initialBalance=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,f,this.initialBalance)})}};n.UrlAccountCreator=class s extends E{constructor(y,f){super(),this.connection=y,this.helperUrl=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield(0,v.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:f.toString()}))})}}},64706:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(_,D,P,x){return new(P||(P=Promise))(function(N,k){function U(G){try{Y(x.next(G))}catch(F){k(F)}}function z(G){try{Y(x.throw(G))}catch(F){k(F)}}function Y(G){G.done?N(G.value):function C(N){return N instanceof P?N:new P(function(k){k(N)})}(G.value).then(U,z)}Y((x=x.apply(_,D||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountMultisig=void 0;const v=u(38445),E=u(15139),M=u(69865),s=u(3725),{deployContract:g,functionCall:y}=v.actionCreators;var f,_;(_=f||(f={}))[_.INVALID_CODE=0]="INVALID_CODE",_[_.VALID_CODE=1]="VALID_CODE",_[_.UNKNOWN_CODE=2]="UNKNOWN_CODE";const d={[M.MULTISIG_STORAGE_KEY]:null};class p extends E.Account{constructor(D,P,x){super(D,P),this.storage=x.storage,this.onAddRequestResult=x.onAddRequestResult}signAndSendTransactionWithAccount(D,P){const x=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return x.signAndSendTransaction.call(this,{receiverId:D,actions:P})})}signAndSendTransaction({receiverId:D,actions:P}){const x=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:C}=this,N=Buffer.from(JSON.stringify({request:{receiver_id:D,actions:S(P,C,D)}}));let k;try{k=yield x.signAndSendTransaction.call(this,{receiverId:C,actions:[y("add_request_and_confirm",N,M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch(z){if(z.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:D,actions:P});throw z}if(!k.status)throw new Error("Request failed");const U=Object.assign({},k.status);if(!U.SuccessValue||"string"!=typeof U.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:C,actions:P,requestId:parseInt(Buffer.from(U.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(k)),this.deleteUnconfirmedRequests(),k})}checkMultisigCodeAndStateStatus(D){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const C=D?f.UNKNOWN_CODE:f.VALID_CODE;try{return D?yield P.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g(D),y("delete_request",{request_id:4294967295},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:f.VALID_CODE,stateStatus:s.MultisigStateStatus.VALID_STATE}}catch(N){if(new RegExp(s.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(N&&N.kind&&N.kind.ExecutionError))return{codeStatus:C,stateStatus:s.MultisigStateStatus.INVALID_STATE};if(new RegExp(s.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(N&&N.kind&&N.kind.ExecutionError))return{codeStatus:C,stateStatus:s.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(s.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(N&&N.kind&&N.kind.ExecutionError))return{codeStatus:C,stateStatus:s.MultisigStateStatus.VALID_STATE};if(new RegExp(s.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(N&&N.message))return{codeStatus:f.INVALID_CODE,stateStatus:s.MultisigStateStatus.UNKNOWN_STATE};throw N}})}deleteRequest(D){return super.signAndSendTransaction({receiverId:this.accountId,actions:[y("delete_request",{request_id:D},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const D=yield this.getRequestIds();D.length&&(yield Promise.all(D.map(P=>this.deleteRequest(P))))})}deleteUnconfirmedRequests(){const D=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const P=yield this.getRequestIds(),{requestId:x}=this.getRequest();for(const C of P)if(C!=x)try{yield D.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y("delete_request",{request_id:C},M.MULTISIG_GAS,M.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(M.MULTISIG_STORAGE_KEY)||"{}"):d[M.MULTISIG_STORAGE_KEY]}setRequest(D){if(this.storage)return this.storage.setItem(M.MULTISIG_STORAGE_KEY,JSON.stringify(D));d[M.MULTISIG_STORAGE_KEY]=D}}n.AccountMultisig=p;const m=_=>_.toString().replace("ed25519:",""),S=(_,D,P)=>_.map(x=>{const C=x.enum,{gas:N,publicKey:k,methodName:U,args:z,deposit:Y,accessKey:G,code:F}=x[C],j={type:C[0].toUpperCase()+C.substr(1),gas:N&&N.toString()||void 0,public_key:k&&m(k)||void 0,method_name:U,args:z&&Buffer.from(z).toString("base64")||void 0,code:F&&Buffer.from(F).toString("base64")||void 0,amount:Y&&Y.toString()||void 0,deposit:Y&&Y.toString()||"0",permission:void 0};if(G&&(P===D&&"fullAccess"!==G.permission.enum&&(j.permission={receiver_id:D,allowance:M.MULTISIG_ALLOWANCE.toString(),method_names:M.MULTISIG_CHANGE_METHODS}),"functionCall"===G.permission.enum)){const{receiverId:Z,methodNames:T,allowance:o}=G.permission.functionCall;j.permission={receiver_id:Z,allowance:o&&o.toString()||void 0,method_names:T}}return j})},52357:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;const l=u(82613),v=u(89870);class s{constructor(y,f,d,p){this.networkId=y,this.provider=f,this.signer=d,this.jsvmAccountId=p}static fromConfig(y){const f=function E(g){switch(g.type){case void 0:return g;case"JsonRpcProvider":return new v.JsonRpcProvider(Object.assign({},g.args));default:throw new Error(`Unknown provider type ${g.type}`)}}(y.provider),d=function M(g){switch(g.type){case void 0:return g;case"InMemorySigner":return new l.InMemorySigner(g.keyStore);default:throw new Error(`Unknown signer type ${g.type}`)}}(y.signer);return new s(y.networkId,f,d,y.jsvmAccountId)}}n.Connection=s},69865:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(n,"__esModule",{value:!0}),n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=void 0;const v=u(1088),E=l(u(98538));n.MULTISIG_STORAGE_KEY="__multisigRequest",n.MULTISIG_ALLOWANCE=new E.default((0,v.parseNearAmount)("1")),n.MULTISIG_GAS=new E.default("100000000000000"),n.MULTISIG_DEPOSIT=new E.default("0"),n.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],n.MULTISIG_CONFIRM_METHODS=["confirm"]},44575:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(N,k,U,z){return new(U||(U=Promise))(function(G,F){function j(o){try{T(z.next(o))}catch(h){F(h)}}function Z(o){try{T(z.throw(o))}catch(h){F(h)}}function T(o){o.done?G(o.value):function Y(G){return G instanceof U?G:new U(function(F){F(G)})}(o.value).then(j,Z)}T((z=z.apply(N,k||[])).next())})},v=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;const E=u(1088),M=u(17527),s=v(u(74411)),g=v(u(26474)),y=v(u(98538)),f=v(u(89176)),d=u(84778),p=u(43506);function m(N,k){return{[N]:(...U)=>k(...U)}[N]}function S(N,k,U,z){var Y;if(!P(N))return;if(k.params&&k.params.serialization_type!==d.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.params.serialization_type);if(k.result&&k.result.serialization_type!==d.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.result.serialization_type);const G=(null===(Y=k.params)||void 0===Y?void 0:Y.args)||[];for(const F of G){const j=N[F.name],Z=F.type_schema;Z.definitions=z.body.root_schema.definitions;const T=U.compile(Z);if(!T(j))throw new p.ArgumentSchemaError(F.name,T.errors)}for(const F of Object.keys(N))if(!G.find(Z=>Z.name===F))throw new p.UnknownArgumentError(F,G.map(Z=>Z.name))}const D=N=>N&&void 0!==N.byteLength&&N.byteLength===N.length,P=N=>"[object Object]"===Object.prototype.toString.call(N);n.Contract=class x{constructor(k,U,z){this.account=k,this.contractId=U;const{viewMethods:Y=[],changeMethods:G=[],abi:F}=z;let j=Y.map(o=>({name:o,abi:null})),Z=G.map(o=>({name:o,abi:null}));if(F){if(j.length>0||Z.length>0)throw new p.ConflictingOptions;j=F.body.functions.filter(o=>o.kind===d.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),Z=F.body.functions.filter(o=>o.kind===d.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const T=function _(){const N=new s.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,g.default)(N),N}();j.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:m(o,(w={},I={},...R)=>l(this,void 0,void 0,function*(){if(R.length||!P(w)&&!D(w)||!P(I))throw new M.PositionalArgsError;return h&&S(w,h,T,F),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:w},I))}))})}),Z.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:m(o,(...w)=>l(this,void 0,void 0,function*(){if(w.length&&(w.length>3||!P(w[0])&&!D(w[0])))throw new M.PositionalArgsError;return(w.length>1||!(w[0]&&w[0].args))&&((0,f.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),w[0]={args:w[0],gas:w[1],amount:w[2]}),h&&S(w[0].args,h,T,F),this._changeMethod(Object.assign({methodName:o},w[0]))}))})})}_changeMethod({args:k,methodName:U,gas:z,amount:Y,meta:G,callbackUrl:F}){return l(this,void 0,void 0,function*(){!function C(N){const k="number, decimal string or BN";for(const U of Object.keys(N)){const z=N[U];if(z&&!y.default.isBN(z)&&isNaN(z))throw new M.ArgumentTypeError(U,k,z)}}({gas:z,amount:Y});const j=yield this.account.functionCall({contractId:this.contractId,methodName:U,args:k,gas:z,attachedDeposit:Y,walletMeta:G,walletCallbackUrl:F});return(0,E.getTransactionLastResult)(j)})}}},43506:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConflictingOptions=n.ArgumentSchemaError=n.UnknownArgumentError=n.UnsupportedSerializationError=void 0;class u extends Error{constructor(s,g){super(`Contract method '${s}' is using an unsupported serialization type ${g}`)}}n.UnsupportedSerializationError=u;class l extends Error{constructor(s,g){super(`Unrecognized argument '${s}', expected '${JSON.stringify(g)}'`)}}n.UnknownArgumentError=l;class v extends Error{constructor(s,g){super(`Argument '${s}' does not conform to the specified ABI schema: '${JSON.stringify(g)}'`)}}n.ArgumentSchemaError=v;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}n.ConflictingOptions=E},74931:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=n.Contract=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.Connection=n.AccountMultisig=n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=n.Account2FA=n.Account=void 0;var l=u(15139);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}});var v=u(46398);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return v.Account2FA}});var E=u(53683);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var M=u(64706);Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var s=u(52357);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return s.Connection}});var g=u(69865);Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return g.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return g.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return g.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return g.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CONFIRM_METHODS}});var y=u(44575);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return y.Contract}});var f=u(43506);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return f.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return f.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return f.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return f.UnsupportedSerializationError}});var d=u(3725);Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return d.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return d.MultisigStateStatus}})},3725:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=void 0,(v=n.MultisigDeleteRequestRejectionError||(n.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",v.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",v.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",v.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",v.METHOD_NOT_FOUND="Contract method is not found",function(v){v[v.INVALID_STATE=0]="INVALID_STATE",v[v.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",v[v.VALID_STATE=2]="VALID_STATE",v[v.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(n.MultisigStateStatus||(n.MultisigStateStatus={}))},57250:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};function v(E){return new Promise(M=>setTimeout(M,E))}Object.defineProperty(n,"__esModule",{value:!0}),n.exponentialBackoff=void 0,n.exponentialBackoff=function l(E,M,s,g){return u(this,void 0,void 0,function*(){let y=E;for(let f=0;f!process.env.NEAR_NO_LOGS&&console.warn(...D);n.fetchJson=function _(D,P){return M(this,void 0,void 0,function*(){let x={url:null};"string"==typeof D?x.url=D:x=D;const C=yield(0,f.exponentialBackoff)(d,m,p,()=>M(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(u(2174)))).default);const N=yield global.fetch(x.url,{method:P?"POST":"GET",body:P||void 0,headers:Object.assign(Object.assign({},x.headers),{"Content-Type":"application/json"})});if(!N.ok){if(503===N.status)return S(`Retrying HTTP request for ${x.url} as it's not available now`),null;throw(0,y.default)(N.status,yield N.text())}return N}catch(N){if(N.toString().includes("FetchError")||N.toString().includes("Failed to fetch"))return S(`Retrying HTTP request for ${x.url} because of error: ${N}`),null;throw N}}));if(!C)throw new g.TypedError(`Exceeded ${m} attempts for ${x.url}.`,"RetriesExceeded");return yield C.json()})}},89870:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=n.Provider=n.JsonRpcProvider=n.exponentialBackoff=void 0;var l=u(57250);Object.defineProperty(n,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var v=u(90352);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}});var E=u(95384);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return E.Provider}});var M=u(48836);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},90352:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(P,x,C,N){return new(C||(C=Promise))(function(U,z){function Y(j){try{F(N.next(j))}catch(Z){z(Z)}}function G(j){try{F(N.throw(j))}catch(Z){z(Z)}}function F(j){j.done?U(j.value):function k(U){return U instanceof C?U:new C(function(z){z(U)})}(j.value).then(Y,G)}F((N=N.apply(P,x||[])).next())})},v=this&&this.__rest||function(P,x){var C={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&x.indexOf(N)<0&&(C[N]=P[N]);if(null!=P&&"function"==typeof Object.getOwnPropertySymbols){var k=0;for(N=Object.getOwnPropertySymbols(P);kl(this,void 0,void 0,function*(){try{const U={method:x,params:C,id:_++,jsonrpc:"2.0"},z=yield(0,d.fetchJson)(this.connection,JSON.stringify(U));if(z.error){if("object"==typeof z.error.data)throw"string"==typeof z.error.data.error_message&&"string"==typeof z.error.data.error_type?new M.TypedError(z.error.data.error_message,z.error.data.error_type):(0,E.parseRpcError)(z.error.data);{const Y=`[${z.error.code}] ${z.error.message}: ${z.error.data}`;throw"Timeout"===z.error.data||Y.includes("Timeout error")||Y.includes("query has timed out")?new M.TypedError(Y,"TimeoutError"):new M.TypedError(Y,(0,E.getErrorTypeFromErrorMessage)(z.error.data,z.error.name))}}return z}catch(U){if("TimeoutError"===U.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${x} as it has timed out`,C),null;throw U}})),{result:k}=N;if(typeof k>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${x}.`,"RetriesExceeded");return k})}}n.JsonRpcProvider=D},95384:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Provider=void 0;n.Provider=class u{}},25429:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0;const v=l(u(98538));n.DEFAULT_FUNCTION_CALL_GAS=new v.default("30000000000000")},95267:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0,n.logWarning=function u(...l){process.env.NEAR_NO_LOGS||console.warn(...l)}},51358:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(95267);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(27165);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},27165:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(74350)),M=u(32044),s=l(u(63478)),g=l(u(66117)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},32044:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(98538));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=new v.default("10",10).pow(new v.default(n.NEAR_NOMINATION_EXP,10));const E=[],M=new v.default(10);for(let m=0,S=new v.default(5);m0&&_.iadd(E[x])}const D=(m=_.toString()).substring(0,m.length-n.NEAR_NOMINATION_EXP)||"0",P=m.substring(m.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,S);return function f(m){return m.replace(/\.?0*$/,"")}(`${function p(m){const S=/(-?\d+)(\d{3})/;for(;S.test(m);)m=m.replace(S,"$1,$2");return m}(D)}.${P}`)},n.parseNearAmount=function g(m){if(!m)return null;const S=(m=function y(m){return m.replace(/,/g,"").trim()}(m)).split("."),_=S[0],D=S[1]||"";if(S.length>2||D.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${m}' as NEAR amount`);return function d(m){return m=m.replace(/^0+/,""),""===m?"0":m}(_+D.padEnd(n.NEAR_NOMINATION_EXP,"0"))}},1088:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(25429),n),v(u(51358),n),v(u(32044),n),v(u(86636),n),v(u(50975),n),v(u(60686),n)},86636:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(51358),v=!!process.env.NEAR_NO_LOGS;function M({contractId:s,logs:g,prefix:y=""}){if(!v)for(const f of g)console.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){if(v)return;const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)console.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&console.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},50975:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},60686:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(98538)),E=l(u(89176));n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>new v.default(P.stake,10)).sort((P,x)=>P.cmp(x)),m=new v.default(d),S=p.reduce((P,x)=>P.add(x));if(S.lt(m))throw new Error("Stakes are below seats");let _=new v.default(1),D=S.add(new v.default(1));for(;!_.eq(D.sub(new v.default(1)));){const P=_.add(D).div(new v.default(2));let x=!1,C=new v.default(0);for(let N=0;Nnew v.default(_.stake,10)).sort((_,D)=>_.cmp(D)),S=m.reduce((_,D)=>_.add(D));return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},82097:(q,n,u)=>{"use strict";var l=u(20163)("http-errors"),v=u(1106),E=u(27449),M=u(83894),s=u(77721);function g(P){return Number(String(P).charAt(0)+"00")}function S(P,x){var C=Object.getOwnPropertyDescriptor(P,"name");C&&C.configurable&&(C.value=x,Object.defineProperty(P,"name",C))}function D(P){return"Error"!==P.substr(-5)?P+"Error":P}q.exports=function y(){for(var P,x,C=500,N={},k=0;k=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof C||!E[C]&&(C<400||C>=600))&&(C=500);var z=y[C]||y[g(C)];for(var Y in P||(P=z?new z(x):new Error(x||E[C]),Error.captureStackTrace(P,y)),(!z||!(P instanceof z)||P.status!==C)&&(P.expose=C<500,P.status=P.statusCode=C),N)"status"!==Y&&"statusCode"!==Y&&(P[Y]=N[Y]);return P},q.exports.HttpError=function f(){function P(){throw new TypeError("cannot construct abstract class")}return M(P,Error),P}(),q.exports.isHttpError=function p(P){return function(C){return!(!C||"object"!=typeof C)&&(C instanceof P||C instanceof Error&&"boolean"==typeof C.expose&&"number"==typeof C.statusCode&&C.status===C.statusCode)}}(q.exports.HttpError),function _(P,x,C){x.forEach(function(k){var U,z=s(E[k]);switch(g(k)){case 400:U=function d(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!0,k}(C,z,k);break;case 500:U=function m(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!1,k}(C,z,k)}U&&(P[k]=U,P[z]=U)}),P["I'mateapot"]=l.function(P.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(q.exports,E.codes,q.exports.HttpError)},20163:q=>{"use strict";function u(v,E){if("function"!=typeof v)throw new TypeError("argument fn must be a function");return v}function l(v,E,M){if(!v||"object"!=typeof v&&"function"!=typeof v)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(v,E);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable")}q.exports=function n(v){if(!v)throw new TypeError("argument namespace is required");function E(M){}return E._file=void 0,E._ignored=!0,E._namespace=v,E._traced=!1,E._warned=Object.create(null),E.function=u,E.property=l,E}},74350:function(q){q.exports=function(){"use strict";var n=Object.prototype.toString,u=Array.isArray||function(Z){return"[object Array]"===n.call(Z)};function l(j){return"function"==typeof j}function v(j){return u(j)?"array":typeof j}function E(j){return j.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function M(j,Z){return null!=j&&"object"==typeof j&&Z in j}function s(j,Z){return null!=j&&"object"!=typeof j&&j.hasOwnProperty&&j.hasOwnProperty(Z)}var g=RegExp.prototype.test;function y(j,Z){return g.call(j,Z)}var f=/\S/;function d(j){return!y(f,j)}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function m(j){return String(j).replace(/[&<>"'`=\/]/g,function(T){return p[T]})}var S=/\s*/,_=/\s+/,D=/\s*=/,P=/\s*\}/,x=/#|\^|\/|>|\{|&|=|!/;function C(j,Z){if(!j)return[];var b,B,re,T=!1,o=[],h=[],w=[],I=!1,R=!1,V="",H=0;function L(){if(I&&!R)for(;w.length;)delete h[w.pop()];else w=[];I=!1,R=!1}function ne(he){if("string"==typeof he&&(he=he.split(_,2)),!u(he)||2!==he.length)throw new Error("Invalid tags: "+he);b=new RegExp(E(he[0])+"\\s*"),B=new RegExp("\\s*"+E(he[1])),re=new RegExp("\\s*"+E("}"+he[1]))}ne(Z||G.tags);for(var ae,ge,pe,we,ce,le,te=new U(j);!te.eos();){if(ae=te.pos,pe=te.scanUntil(b))for(var ue=0,fe=pe.length;ue0?o[o.length-1][4]:Z;break;default:T.push(h)}return Z}function U(j){this.string=j,this.tail=j,this.pos=0}function z(j,Z){this.view=j,this.cache={".":this.view},this.parent=Z}function Y(){this.templateCache={_cache:{},set:function(Z,T){this._cache[Z]=T},get:function(Z){return this._cache[Z]},clear:function(){this._cache={}}}}U.prototype.eos=function(){return""===this.tail},U.prototype.scan=function(Z){var T=this.tail.match(Z);if(!T||0!==T.index)return"";var o=T[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},U.prototype.scanUntil=function(Z){var o,T=this.tail.search(Z);switch(T){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,T),this.tail=this.tail.substring(T)}return this.pos+=o.length,o},z.prototype.push=function(Z){return new z(Z,this)},z.prototype.lookup=function(Z){var o,T=this.cache;if(T.hasOwnProperty(Z))o=T[Z];else{for(var w,I,R,h=this,V=!1;h;){if(Z.indexOf(".")>0)for(w=h.view,I=Z.split("."),R=0;null!=w&&R"===V?H=this.renderPartial(R,T,o,w):"&"===V?H=this.unescapedValue(R,T):"name"===V?H=this.escapedValue(R,T,w):"text"===V&&(H=this.rawValue(R)),void 0!==H&&(I+=H);return I},Y.prototype.renderSection=function(Z,T,o,h,w){var I=this,R="",V=T.lookup(Z[1]);function H(B){return I.render(B,T,o,w)}if(V){if(u(V))for(var L=0,b=V.length;L0||!o)&&(w[I]=h+w[I]);return w.join("\n")},Y.prototype.renderPartial=function(Z,T,o,h){if(o){var w=this.getConfigTags(h),I=l(o)?o(Z[1]):o[Z[1]];if(null!=I){var R=Z[6],V=Z[5],H=Z[4],L=I;0==V&&H&&(L=this.indentPartial(I,H,R));var b=this.parse(L,w);return this.renderTokens(b,T,o,L,h)}}},Y.prototype.unescapedValue=function(Z,T){var o=T.lookup(Z[1]);if(null!=o)return o},Y.prototype.escapedValue=function(Z,T,o){var h=this.getConfigEscape(o)||G.escape,w=T.lookup(Z[1]);if(null!=w)return"number"==typeof w&&h===G.escape?String(w):h(w)},Y.prototype.rawValue=function(Z){return Z[1]},Y.prototype.getConfigTags=function(Z){return u(Z)?Z:Z&&"object"==typeof Z?Z.tags:void 0},Y.prototype.getConfigEscape=function(Z){if(Z&&"object"==typeof Z&&!u(Z))return Z.escape};var G={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(j){F.templateCache=j},get templateCache(){return F.templateCache}},F=new Y;return G.clearCache=function(){return F.clearCache()},G.parse=function(Z,T){return F.parse(Z,T)},G.render=function(Z,T,o,h){if("string"!=typeof Z)throw new TypeError('Invalid template! Template should be a "string" but "'+v(Z)+'" was given as the first argument for mustache#render(template, view, partials)');return F.render(Z,T,o,h)},G.escape=m,G.Scanner=U,G.Context=z,G.Writer=Y,G}()},27449:(q,n,u)=>{"use strict";var l=u(38512);function E(M){if("number"==typeof M){if(!E[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var s=parseInt(M,10);if(!isNaN(s)){if(!E[s])throw new Error("invalid status code: "+s);return s}if(!(s=E[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return s}q.exports=E,E.STATUS_CODES=l,E.codes=function v(M,s){var g=[];return Object.keys(s).forEach(function(f){var d=s[f],p=Number(f);M[p]=d,M[d]=p,M[d.toLowerCase()]=p,g.push(p)}),g}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},15932:(q,n)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.KeyType=void 0,(l=n.KeyType||(n.KeyType={}))[l.ED25519=0]="ED25519"},29761:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(15932);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(82568);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(56510);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(987);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},82568:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(98475),v=u(56510);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},98475:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},56510:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(21531),E=l(u(40489)),M=u(15932),s=u(98475),g=u(987);class y extends s.KeyPairBase{constructor(d){super();const p=E.default.sign.keyPair.fromSecretKey((0,v.baseDecode)(d));this.publicKey=new g.PublicKey({keyType:M.KeyType.ED25519,data:p.publicKey}),this.secretKey=d}static fromRandom(){const d=E.default.sign.keyPair();return new y((0,v.baseEncode)(d.secretKey))}sign(d){return{signature:E.default.sign.detached(d,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(d,p){return this.publicKey.verify(d,p)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=y},987:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const v=u(17527),E=u(21531),M=l(u(40489)),s=u(15932);class f extends v.Assignable{static from(p){return"string"==typeof p?f.fromString(p):p}static fromString(p){const m=p.split(":");let S,_=s.KeyType.ED25519;if(1===m.length)S=m[0];else{if(2!==m.length)throw new Error("Invalid encoded key format, must be :");S=m[1],_=function y(d){if("ed25519"===d.toLowerCase())return s.KeyType.ED25519;throw new Error(`Unknown key type ${d}`)}(m[0])}const D=(0,E.baseDecode)(S);if(D.length!==M.default.box.publicKeyLength)throw new Error(`Invalid public key size (${D.length}), must be ${M.default.box.publicKeyLength}`);return new f({keyType:_,data:D})}toString(){return`${function g(d){if(d===s.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${d}`)}(this.keyType)}:${(0,E.baseEncode)(this.data)}`}verify(p,m){if(this.keyType===s.KeyType.ED25519)return M.default.sign.detached.verify(p,m,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=f},9454:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;const v=u(37803),E=u(69170);class s extends E.KeyStore{constructor(y=window.localStorage,f="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=f}setKey(y,f,d){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,f),d.toString())})}getKey(y,f){return l(this,void 0,void 0,function*(){const d=this.localStorage.getItem(this.storageKeyForSecretKey(y,f));return d?v.KeyPair.fromString(d):null})}removeKey(y,f){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,f))})}clear(){return l(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return l(this,void 0,void 0,function*(){const y=new Set;for(const f of this.storageKeys())if(f.startsWith(this.prefix)){const d=f.substring(this.prefix.length).split(":");y.add(d[1])}return Array.from(y.values())})}getAccounts(y){return l(this,void 0,void 0,function*(){const f=new Array;for(const d of this.storageKeys())if(d.startsWith(this.prefix)){const p=d.substring(this.prefix.length).split(":");p[1]===y&&f.push(p[0])}return f})}storageKeyForSecretKey(y,f){return`${this.prefix}${f}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(9454);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},43406:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},37803:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(43406);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(23298);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(25333);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(5329);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},23298:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(41643),v=u(25333);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},41643:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},25333:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(83507),E=u(35434),M=l(u(53753)),s=u(43406),g=u(41643),y=u(5329);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(new Uint8Array(S));this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},5329:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(83507),E=u(35434),M=u(43406);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},86958:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},96362:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(53424);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},68438:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(96362);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(59867);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},59867:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(86091),s=l(u(22701)),g=l(u(83584)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},86091:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(76791));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},83507:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(86958),n),v(u(68438),n),v(u(86091),n),v(u(99070),n),v(u(71703),n),v(u(66159),n),v(u(53424),n),v(u(61097),n)},66408:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},53424:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(43387);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},43387:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(66408),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},99070:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(68438),v=u(53424);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},71703:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},61097:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},66159:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(61097);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},41819:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},76791:(q,n,u)=>{var l=u(41819);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},55738:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnencryptedFileSystemKeyStore=n.readKeyFile=void 0;var l=u(2252);Object.defineProperty(n,"readKeyFile",{enumerable:!0,get:function(){return l.readKeyFile}}),Object.defineProperty(n,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return l.UnencryptedFileSystemKeyStore}})},2252:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(k,U,z,Y){return new(z||(z=Promise))(function(F,j){function Z(h){try{o(Y.next(h))}catch(w){j(w)}}function T(h){try{o(Y.throw(h))}catch(w){j(w)}}function o(h){h.done?F(h.value):function G(F){return F instanceof z?F:new z(function(j){j(F)})}(h.value).then(Z,T)}o((Y=Y.apply(k,U||[])).next())})},v=this&&this.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(n,"__esModule",{value:!0}),n.UnencryptedFileSystemKeyStore=n.readKeyFile=void 0;const E=u(59333),M=u(69170),s=v(u(6581)),g=v(u(63928)),y=u(26788),f=k=>k?(0,y.promisify)(k):()=>{throw new Error("Trying to use unimplemented function. `fs` module not available in web build?")},d=f(s.default.exists),p=f(s.default.readFile),m=f(s.default.writeFile),S=f(s.default.unlink),_=f(s.default.readdir),D=f(s.default.mkdir);function C(k){return l(this,void 0,void 0,function*(){const U=yield function P(k){return l(this,void 0,void 0,function*(){const U=yield p(k);return JSON.parse(U.toString())})}(k);let z=U.private_key;return!z&&U.secret_key&&(z=U.secret_key),[U.account_id,E.KeyPair.fromString(z)]})}n.readKeyFile=C;class N extends M.KeyStore{constructor(U){super(),this.keyDir=g.default.resolve(U)}setKey(U,z,Y){return l(this,void 0,void 0,function*(){yield function x(k){return l(this,void 0,void 0,function*(){try{yield D(k,{recursive:!0})}catch(U){if("EEXIST"!==U.code)throw U}})}(`${this.keyDir}/${U}`);const G={account_id:z,public_key:Y.getPublicKey().toString(),private_key:Y.toString()};yield m(this.getKeyFilePath(U,z),JSON.stringify(G),{mode:384})})}getKey(U,z){return l(this,void 0,void 0,function*(){return(yield d(this.getKeyFilePath(U,z)))?(yield C(this.getKeyFilePath(U,z)))[1]:null})}removeKey(U,z){return l(this,void 0,void 0,function*(){(yield d(this.getKeyFilePath(U,z)))&&(yield S(this.getKeyFilePath(U,z)))})}clear(){return l(this,void 0,void 0,function*(){for(const U of yield this.getNetworks())for(const z of yield this.getAccounts(U))yield this.removeKey(U,z)})}getKeyFilePath(U,z){return`${this.keyDir}/${U}/${z}.json`}getNetworks(){return l(this,void 0,void 0,function*(){const U=yield _(this.keyDir),z=new Array;return U.forEach(Y=>{z.push(Y)}),z})}getAccounts(U){return l(this,void 0,void 0,function*(){return(yield d(`${this.keyDir}/${U}`))?(yield _(`${this.keyDir}/${U}`)).filter(Y=>Y.endsWith(".json")).map(Y=>Y.replace(/.json$/,"")):[]})}toString(){return`UnencryptedFileSystemKeyStore(${this.keyDir})`}}n.UnencryptedFileSystemKeyStore=N},1014:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},59333:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(1014);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(1284);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(22032);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(72874);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},1284:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(7642),v=u(22032);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},7642:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},22032:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(65704),E=u(35434),M=l(u(53753)),s=u(1014),g=u(7642),y=u(72874);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(new Uint8Array(S));this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},72874:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(65704),E=u(35434),M=u(1014);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},4741:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},88944:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(79061);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},91242:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(88944);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(81460);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},81460:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(55382),s=l(u(77994)),g=l(u(30888)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},55382:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(96024));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},65704:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(4741),n),v(u(91242),n),v(u(55382),n),v(u(41322),n),v(u(24858),n),v(u(81762),n),v(u(79061),n),v(u(76050),n)},45735:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},79061:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(29018);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},29018:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(45735),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},41322:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(91242),v=u(79061);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},24858:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},76050:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},81762:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(76050);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},85194:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},96024:(q,n,u)=>{var l=u(85194);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},14484:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(s,g,y,f){return new(y||(y=Promise))(function(p,m){function S(P){try{D(f.next(P))}catch(x){m(x)}}function _(P){try{D(f.throw(P))}catch(x){m(x)}}function D(P){P.done?p(P.value):function d(p){return p instanceof y?p:new y(function(m){m(p)})}(P.value).then(S,_)}D((f=f.apply(s,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.InMemoryKeyStore=void 0;const v=u(94719),E=u(99749);class M extends E.KeyStore{constructor(){super(),this.keys={}}setKey(g,y,f){return l(this,void 0,void 0,function*(){this.keys[`${y}:${g}`]=f.toString()})}getKey(g,y){return l(this,void 0,void 0,function*(){const f=this.keys[`${y}:${g}`];return f?v.KeyPair.fromString(f):null})}removeKey(g,y){return l(this,void 0,void 0,function*(){delete this.keys[`${y}:${g}`]})}clear(){return l(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return l(this,void 0,void 0,function*(){const g=new Set;return Object.keys(this.keys).forEach(y=>{const f=y.split(":");g.add(f[1])}),Array.from(g.values())})}getAccounts(g){return l(this,void 0,void 0,function*(){const y=new Array;return Object.keys(this.keys).forEach(f=>{const d=f.split(":");d[d.length-1]===g&&y.push(d.slice(0,d.length-1).join(":"))}),y})}toString(){return"InMemoryKeyStore"}}n.InMemoryKeyStore=M},69170:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.KeyStore=n.InMemoryKeyStore=void 0;var l=u(14484);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}});var v=u(99749);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return v.KeyStore}});var E=u(93669);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},99749:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyStore=void 0;n.KeyStore=class u{}},93669:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=void 0;const v=u(99749);class E extends v.KeyStore{constructor(s,g={writeKeyStoreIndex:0}){super(),this.options=g,this.keyStores=s}setKey(s,g,y){return l(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(s,g,y)})}getKey(s,g){return l(this,void 0,void 0,function*(){for(const y of this.keyStores){const f=yield y.getKey(s,g);if(f)return f}return null})}removeKey(s,g){return l(this,void 0,void 0,function*(){for(const y of this.keyStores)yield y.removeKey(s,g)})}clear(){return l(this,void 0,void 0,function*(){for(const s of this.keyStores)yield s.clear()})}getNetworks(){return l(this,void 0,void 0,function*(){const s=new Set;for(const g of this.keyStores)for(const y of yield g.getNetworks())s.add(y);return Array.from(s)})}getAccounts(s){return l(this,void 0,void 0,function*(){const g=new Set;for(const y of this.keyStores)for(const f of yield y.getAccounts(s))g.add(f);return Array.from(g)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}n.MergeKeyStore=E},29393:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},94719:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(29393);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(40166);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(12374);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(71800);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},40166:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(15085),v=u(12374);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},15085:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},12374:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(76963),E=u(35434),M=l(u(53753)),s=u(29393),g=u(15085),y=u(71800);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(new Uint8Array(S));this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},71800:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(76963),E=u(35434),M=u(29393);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},74288:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},34828:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(65962);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},46805:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(34828);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(49267);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},49267:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(32692),s=l(u(8424)),g=l(u(81217)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},32692:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(70938));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},76963:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(74288),n),v(u(46805),n),v(u(32692),n),v(u(47520),n),v(u(2825),n),v(u(8871),n),v(u(65962),n),v(u(24237),n)},99621:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},65962:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(8141);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},8141:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(99621),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},47520:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(46805),v=u(65962);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},2825:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},24237:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},8871:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(24237);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},5891:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},70938:(q,n,u)=>{var l=u(5891);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},82420:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};function v(E){return new Promise(M=>setTimeout(M,E))}Object.defineProperty(n,"__esModule",{value:!0}),n.exponentialBackoff=void 0,n.exponentialBackoff=function l(E,M,s,g){return u(this,void 0,void 0,function*(){let y=E;for(let f=0;fy.status())})}sendTransactionUntil(y,f){return l(this,void 0,void 0,function*(){return this.withBackoff(d=>d.sendTransactionUntil(y,f))})}sendTransaction(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.sendTransaction(y))})}sendTransactionAsync(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.sendTransactionAsync(y))})}txStatus(y,f,d){return l(this,void 0,void 0,function*(){return this.withBackoff(p=>p.txStatus(y,f,d))})}txStatusReceipts(y,f,d){return l(this,void 0,void 0,function*(){return this.withBackoff(p=>p.txStatusReceipts(y,f,d))})}query(y,f){return l(this,void 0,void 0,function*(){return f?this.withBackoff(d=>d.query(y,f)):this.withBackoff(d=>d.query(y))})}block(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.block(y))})}blockChanges(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.blockChanges(y))})}chunk(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.chunk(y))})}validators(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.validators(y))})}experimental_protocolConfig(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.experimental_protocolConfig(y))})}lightClientProof(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.lightClientProof(y))})}nextLightClientBlock(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.nextLightClientBlock(y))})}accessKeyChanges(y,f){return l(this,void 0,void 0,function*(){return this.withBackoff(d=>d.accessKeyChanges(y,f))})}singleAccessKeyChanges(y,f){return l(this,void 0,void 0,function*(){return this.withBackoff(d=>d.singleAccessKeyChanges(y,f))})}accountChanges(y,f){return l(this,void 0,void 0,function*(){return this.withBackoff(d=>d.accountChanges(y,f))})}contractStateChanges(y,f,d=""){return l(this,void 0,void 0,function*(){return this.withBackoff(p=>p.contractStateChanges(y,f,d))})}contractCodeChanges(y,f){return l(this,void 0,void 0,function*(){return this.withBackoff(d=>d.contractCodeChanges(y,f))})}gasPrice(y){return l(this,void 0,void 0,function*(){return this.withBackoff(f=>f.gasPrice(y))})}}n.FailoverRpcProvider=s},60778:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0});const v=l(u(43913)),E=l(u(74216)),M=l(u(8806)),s=new E.default.Agent({keepAlive:!0}),g=new M.default.Agent({keepAlive:!0});function y(d){return"http:"===d.protocol?s:g}n.default=function f(d,p){return(0,v.default)(d,Object.assign({agent:y(new URL(d.toString()))},p))}},22292:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(D,P,x,C){void 0===C&&(C=x);var N=Object.getOwnPropertyDescriptor(P,x);(!N||("get"in N?!P.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return P[x]}}),Object.defineProperty(D,C,N)}:function(D,P,x,C){void 0===C&&(C=x),D[C]=P[x]}),v=this&&this.__setModuleDefault||(Object.create?function(D,P){Object.defineProperty(D,"default",{enumerable:!0,value:P})}:function(D,P){D.default=P}),E=this&&this.__importStar||function(D){if(D&&D.__esModule)return D;var P={};if(null!=D)for(var x in D)"default"!==x&&Object.prototype.hasOwnProperty.call(D,x)&&l(P,D,x);return v(P,D),P},M=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})},s=this&&this.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=void 0;const g=u(17527),y=u(15492),f=s(u(13104)),d=u(82420),p=1e3,m=1.5,S=10;n.fetchJson=function _(D,P){return M(this,void 0,void 0,function*(){let x={url:null};"string"==typeof D?x.url=D:x=D;const C=yield(0,d.exponentialBackoff)(p,S,m,()=>M(this,void 0,void 0,function*(){var N;try{const k=yield(null!==(N=global.fetch)&&void 0!==N?N:(yield Promise.resolve().then(()=>E(u(60778)))).default)(x.url,{method:P?"POST":"GET",body:P||void 0,headers:Object.assign(Object.assign({},x.headers),{"Content-Type":"application/json"})});if(!k.ok){if(503===k.status)return y.Logger.warn(`Retrying HTTP request for ${x.url} as it's not available now`),null;if(408===k.status)return y.Logger.warn(`Retrying HTTP request for ${x.url} as the previous connection was unused for some time`),null;throw(0,f.default)(k.status,yield k.text())}return k}catch(k){if(k.toString().includes("FetchError")||k.toString().includes("Failed to fetch"))return y.Logger.warn(`Retrying HTTP request for ${x.url} because of error: ${k}`),null;throw k}}));if(!C)throw new g.TypedError(`Exceeded ${S} attempts for ${x.url}.`,"RetriesExceeded");return yield C.json()})}},1656:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=n.Provider=n.FailoverRpcProvider=n.JsonRpcProvider=n.exponentialBackoff=void 0;var l=u(82420);Object.defineProperty(n,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var v=u(71935);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}});var E=u(97429);Object.defineProperty(n,"FailoverRpcProvider",{enumerable:!0,get:function(){return E.FailoverRpcProvider}});var M=u(10488);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return M.Provider}});var s=u(22292);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return s.fetchJson}})},71935:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})},v=this&&this.__rest||function(D,P){var x={};for(var C in D)Object.prototype.hasOwnProperty.call(D,C)&&P.indexOf(C)<0&&(x[C]=D[C]);if(null!=D&&"function"==typeof Object.getOwnPropertySymbols){var N=0;for(C=Object.getOwnPropertySymbols(D);Nl(this,void 0,void 0,function*(){var k;try{const U={method:P,params:x,id:S++,jsonrpc:"2.0"},z=yield(0,f.fetchJson)(this.connection,JSON.stringify(U));if(z.error){if("object"==typeof z.error.data)throw"string"==typeof z.error.data.error_message&&"string"==typeof z.error.data.error_type?new M.TypedError(z.error.data.error_message,z.error.data.error_type):(0,E.parseRpcError)(z.error.data);{const Y=`[${z.error.code}] ${z.error.message}: ${z.error.data}`;if("Timeout"===z.error.data||Y.includes("Timeout error")||Y.includes("query has timed out"))throw new M.TypedError(Y,"TimeoutError");const G=(0,E.getErrorTypeFromErrorMessage)(z.error.data,"");throw G?new M.TypedError((0,E.formatError)(G,x),G):new M.TypedError(Y,z.error.name)}}if("string"==typeof(null===(k=z.result)||void 0===k?void 0:k.error)){const Y=(0,E.getErrorTypeFromErrorMessage)(z.result.error,"");if(Y)throw new E.ServerError((0,E.formatError)(Y,x),Y)}return z}catch(U){if("TimeoutError"===U.type)return E.Logger.warn(`Retrying request to ${P} as it has timed out`,x),null;throw U}})),{result:N}=C;if(typeof N>"u")throw new M.TypedError(`Exceeded ${this.options.retries} attempts for request to ${P}.`,"RetriesExceeded");return N})}}n.JsonRpcProvider=_},10488:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Provider=void 0;n.Provider=class u{}},82786:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.actionCreators=n.stringifyJsonOrBytes=void 0;const l=u(80304);function g(D){return void 0!==D.byteLength&&D.byteLength===D.length?D:Buffer.from(JSON.stringify(D))}n.stringifyJsonOrBytes=g,n.actionCreators={addKey:function p(D,P){return new l.Action({addKey:new l.AddKey({publicKey:D,accessKey:P})})},createAccount:function M(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function S(D){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:D})})},deleteKey:function m(D){return new l.Action({deleteKey:new l.DeleteKey({publicKey:D})})},deployContract:function s(D){return new l.Action({deployContract:new l.DeployContract({code:D})})},fullAccessKey:function v(){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function y(D,P,x=BigInt(0),C=BigInt(0),N=g,k=!1){return k?new l.Action({functionCall:new l.FunctionCall({methodName:D,args:P,gas:x,deposit:C})}):new l.Action({functionCall:new l.FunctionCall({methodName:D,args:N(P),gas:x,deposit:C})})},functionCallAccessKey:function E(D,P,x){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:D,allowance:x,methodNames:P})})})},signedDelegate:function _({delegateAction:D,signature:P}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:D,signature:P})})},stake:function d(D=BigInt(0),P){return new l.Action({stake:new l.Stake({stake:D,publicKey:P})})},transfer:function f(D=BigInt(0)){return new l.Action({transfer:new l.Transfer({deposit:D})})}}},80304:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Action=n.SignedDelegate=n.DeleteAccount=n.DeleteKey=n.AddKey=n.Stake=n.Transfer=n.FunctionCall=n.DeployContract=n.CreateAccount=n.IAction=n.AccessKey=n.AccessKeyPermission=n.FullAccessPermission=n.FunctionCallPermission=void 0;const l=u(17527);class v{constructor(k){if(1!==Object.keys(k).length)throw new Error("Enum can only take single value");Object.keys(k).map(U=>{this[U]=k[U],this.enum=U})}}class E extends l.Assignable{}n.FunctionCallPermission=E;class M extends l.Assignable{}n.FullAccessPermission=M;n.AccessKeyPermission=class s extends v{};class g extends l.Assignable{}n.AccessKey=g;class y extends l.Assignable{}n.IAction=y;n.CreateAccount=class f extends y{};n.DeployContract=class d extends y{};n.FunctionCall=class p extends y{};n.Transfer=class m extends y{};n.Stake=class S extends y{};n.AddKey=class _ extends y{};n.DeleteKey=class D extends y{};n.DeleteAccount=class P extends y{};n.SignedDelegate=class x extends y{};n.Action=class C extends v{}},21380:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTransaction=void 0;const l=u(56363);n.createTransaction=function v(E,M,s,g,y,f){const d="bigint"==typeof g?g:BigInt(g);return new l.Transaction({signerId:E,publicKey:M,nonce:d,receiverId:s,actions:y,blockHash:f})}},17984:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildDelegateAction=n.DelegateAction=void 0;const l=u(17527),v=u(82786),{addKey:E,createAccount:M,deleteAccount:s,deleteKey:g,deployContract:y,functionCall:f,stake:d,transfer:p}=v.actionCreators;class m extends l.Assignable{}n.DelegateAction=m,n.buildDelegateAction=function S({actions:_,maxBlockHeight:D,nonce:P,publicKey:x,receiverId:C,senderId:N}){return new m({senderId:N,receiverId:C,actions:_.map(k=>{if(!k.type&&!k.params)return k;switch(k.type){case"AddKey":{const{publicKey:U,accessKey:z}=k.params;return E(U,z)}case"CreateAccount":return M(k.params.createAccount);case"DeleteAccount":return s(k.params.deleteAccount);case"DeleteKey":return g(k.params.publicKey);case"DeployContract":return y(k.params.code);case"FunctionCall":{const{methodName:U,args:z,gas:Y,deposit:G}=k.params;return f(U,z,Y,G)}case"Stake":return d(k.params.stake,k.params.publicKey);case"Transfer":{const{deposit:U}=k.params;return p(U)}}throw new Error("Unrecognized action")}),nonce:P,maxBlockHeight:D,publicKey:x})}},47362:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(82786),n),v(u(80304),n),v(u(21380),n),v(u(17984),n),v(u(56363),n),v(u(8674),n),v(u(23922),n)},1139:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateActionPrefix=void 0;const l=u(17527),v=Math.pow(2,30),E_MetaTransactions=366;class M extends l.Assignable{}class s extends M{constructor(f){super({prefix:v+f})}}n.DelegateActionPrefix=class g extends s{constructor(){super(E_MetaTransactions)}}},56363:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA=n.SignedTransaction=n.Transaction=n.decodeSignedTransaction=n.decodeTransaction=n.encodeTransaction=n.encodeSignedDelegate=n.encodeDelegateAction=void 0;const l=u(17527),v=u(36685),E=u(1139);function g(m){const S=m instanceof p?n.SCHEMA.SignedTransaction:n.SCHEMA.Transaction;return(0,v.serialize)(S,m)}function y(m){return new d((0,v.deserialize)(n.SCHEMA.Transaction,m))}function f(m){return new p((0,v.deserialize)(n.SCHEMA.SignedTransaction,m))}n.encodeDelegateAction=function M(m){return new Uint8Array([...(0,v.serialize)(n.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,v.serialize)(n.SCHEMA.DelegateAction,m)])},n.encodeSignedDelegate=function s(m){return(0,v.serialize)(n.SCHEMA.SignedDelegate,m)},n.encodeTransaction=g,n.decodeTransaction=y,n.decodeSignedTransaction=f;class d extends l.Assignable{encode(){return g(this)}static decode(S){return y(S)}}n.Transaction=d;class p extends l.Assignable{encode(){return g(this)}static decode(S){return f(S)}}n.SignedTransaction=p,n.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},8674:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.signDelegateAction=n.signTransaction=void 0;const v=u(28326),E=u(80304),M=u(21380),s=u(56363),g=u(23922);function y(p,m,S,_){return l(this,void 0,void 0,function*(){const D=(0,s.encodeTransaction)(p),P=new Uint8Array((0,v.sha256)(D)),x=yield m.signMessage(D,S,_);return[P,new s.SignedTransaction({transaction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:x.signature})})]})}n.signTransaction=function f(...p){return l(this,void 0,void 0,function*(){if(p[0].constructor===s.Transaction){const[m,S,_,D]=p;return y(m,S,_,D)}{const[m,S,_,D,P,x,C]=p,N=yield P.getPublicKey(x,C);return y((0,M.createTransaction)(x,N,m,S,_,D),P,x,C)}})},n.signDelegateAction=function d({delegateAction:p,signer:m}){return l(this,void 0,void 0,function*(){const S=(0,s.encodeDelegateAction)(p),_=yield m.sign(S),D=new E.SignedDelegate({delegateAction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:_})});return{hash:new Uint8Array((0,v.sha256)(S)),signedDelegateAction:D}})}},23922:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signature=void 0;const l=u(17527);class v extends l.Assignable{}n.Signature=v},61671:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},11229:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(83132);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},63375:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(11229);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(58298);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},58298:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(27044),s=l(u(86164)),g=l(u(3427)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},27044:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(65863));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},15492:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(61671),n),v(u(63375),n),v(u(27044),n),v(u(14907),n),v(u(79835),n),v(u(42563),n),v(u(83132),n),v(u(2485),n)},56820:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},83132:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(55304);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},55304:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(56820),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},14907:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(63375),v=u(83132);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},79835:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},2485:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},42563:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(2485);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},19529:(q,n)=>{"use strict";function u(f){if(!Number.isSafeInteger(f)||f<0)throw new Error(`Wrong positive integer: ${f}`)}function l(f){if("boolean"!=typeof f)throw new Error(`Expected boolean, not ${f}`)}function E(f,...d){if(!function v(f){return f instanceof Uint8Array||null!=f&&"object"==typeof f&&"Uint8Array"===f.constructor.name}(f))throw new Error("Expected Uint8Array");if(d.length>0&&!d.includes(f.length))throw new Error(`Expected Uint8Array of length ${d}, not of length=${f.length}`)}function M(f){if("function"!=typeof f||"function"!=typeof f.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");u(f.outputLen),u(f.blockLen)}function s(f,d=!0){if(f.destroyed)throw new Error("Hash instance has been destroyed");if(d&&f.finished)throw new Error("Hash#digest() has already been called")}function g(f,d){E(f);const p=d.outputLen;if(f.length{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const l=u(19529),v=u(53039);class M extends v.Hash{constructor(g,y,f,d){super(),this.blockLen=g,this.outputLen=y,this.padOffset=f,this.isLE=d,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(g),this.view=(0,v.createView)(this.buffer)}update(g){(0,l.exists)(this);const{view:y,buffer:f,blockLen:d}=this,p=(g=(0,v.toBytes)(g)).length;for(let m=0;md-m&&(this.process(f,0),m=0);for(let x=m;x>d&p),S=Number(y&p),_=f?4:0,D=f?0:4;s.setUint32(g+_,m,f),s.setUint32(g+D,S,f)})(f,d-8,BigInt(8*this.length),p),this.process(f,0);const S=(0,v.createView)(g),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const D=_/4,P=this.get();if(D>P.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},28326:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const l=u(81301),v=u(53039),E=(p,m,S)=>p&m^~p&S,M=(p,m,S)=>p&m^p&S^m&S,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),g=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64);class f extends l.SHA2{constructor(){super(64,32,8,!1),this.A=0|g[0],this.B=0|g[1],this.C=0|g[2],this.D=0|g[3],this.E=0|g[4],this.F=0|g[5],this.G=0|g[6],this.H=0|g[7]}get(){const{A:m,B:S,C:_,D,E:P,F:x,G:C,H:N}=this;return[m,S,_,D,P,x,C,N]}set(m,S,_,D,P,x,C,N){this.A=0|m,this.B=0|S,this.C=0|_,this.D=0|D,this.E=0|P,this.F=0|x,this.G=0|C,this.H=0|N}process(m,S){for(let z=0;z<16;z++,S+=4)y[z]=m.getUint32(S,!1);for(let z=16;z<64;z++){const Y=y[z-15],G=y[z-2],F=(0,v.rotr)(Y,7)^(0,v.rotr)(Y,18)^Y>>>3,j=(0,v.rotr)(G,17)^(0,v.rotr)(G,19)^G>>>10;y[z]=j+y[z-7]+F+y[z-16]|0}let{A:_,B:D,C:P,D:x,E:C,F:N,G:k,H:U}=this;for(let z=0;z<64;z++){const G=U+((0,v.rotr)(C,6)^(0,v.rotr)(C,11)^(0,v.rotr)(C,25))+E(C,N,k)+s[z]+y[z]|0,j=((0,v.rotr)(_,2)^(0,v.rotr)(_,13)^(0,v.rotr)(_,22))+M(_,D,P)|0;U=k,k=N,N=C,C=x+G|0,x=P,P=D,D=_,_=G+j|0}_=_+this.A|0,D=D+this.B|0,P=P+this.C|0,x=x+this.D|0,C=C+this.E|0,N=N+this.F|0,k=k+this.G|0,U=U+this.H|0,this.set(_,D,P,x,C,N,k,U)}roundClean(){y.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends f{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,v.wrapConstructor)(()=>new f),n.sha224=(0,v.wrapConstructor)(()=>new d)},53039:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const v=u(25269);n.u8=Z=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);function s(Z){return Z instanceof Uint8Array||null!=Z&&"object"==typeof Z&&"Uint8Array"===Z.constructor.name}n.u32=Z=>new Uint32Array(Z.buffer,Z.byteOffset,Math.floor(Z.byteLength/4));n.createView=Z=>new DataView(Z.buffer,Z.byteOffset,Z.byteLength);if(n.rotr=(Z,T)=>Z<<32-T|Z>>>T,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const f=Array.from({length:256},(Z,T)=>T.toString(16).padStart(2,"0"));n.bytesToHex=function d(Z){if(!s(Z))throw new Error("Uint8Array expected");let T="";for(let o=0;o=p._0&&Z<=p._9?Z-p._0:Z>=p._A&&Z<=p._F?Z-(p._A-10):Z>=p._a&&Z<=p._f?Z-(p._a-10):void 0}n.hexToBytes=function S(Z){if("string"!=typeof Z)throw new Error("hex string expected, got "+typeof Z);const T=Z.length,o=T/2;if(T%2)throw new Error("padded hex string expected, got unpadded hex of length "+T);const h=new Uint8Array(o);for(let w=0,I=0;w=0&&IZ().update(C(h)).digest(),o=Z();return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=()=>Z(),T},n.wrapConstructorWithOpts=function G(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.wrapXOFConstructorWithOpts=function F(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.randomBytes=function j(Z=32){if(v.crypto&&"function"==typeof v.crypto.getRandomValues)return v.crypto.getRandomValues(new Uint8Array(Z));throw new Error("crypto.getRandomValues must be defined")}},44310:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},14685:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},80873:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(7763),v=u(14685),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},33404:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(7763);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{var l=u(44310);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},43913:(q,n)=>{"use strict";var l=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof l<"u")return l;throw new Error("unable to locate global object")}();q.exports=n=l.fetch,l.fetch&&(n.default=l.fetch.bind(l)),n.Headers=l.Headers,n.Request=l.Request,n.Response=l.Response},68492:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(f,d,p,m){return new(p||(p=Promise))(function(_,D){function P(N){try{C(m.next(N))}catch(k){D(k)}}function x(N){try{C(m.throw(N))}catch(k){D(k)}}function C(N){N.done?_(N.value):function S(_){return _ instanceof p?_:new p(function(D){D(_)})}(N.value).then(P,x)}C((m=m.apply(f,d||[])).next())})},v=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.InMemorySigner=void 0;const E=u(29761),M=u(69170),s=v(u(1520)),g=u(2345);class y extends g.Signer{constructor(d){super(),this.keyStore=d}static fromKeyPair(d,p,m){return l(this,void 0,void 0,function*(){const S=new M.InMemoryKeyStore;return yield S.setKey(d,p,m),new y(S)})}createKey(d,p){return l(this,void 0,void 0,function*(){const m=E.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(p,d,m),m.getPublicKey()})}getPublicKey(d,p){return l(this,void 0,void 0,function*(){const m=yield this.keyStore.getKey(p,d);return null===m?null:m.getPublicKey()})}signMessage(d,p,m){return l(this,void 0,void 0,function*(){const S=new Uint8Array(s.default.sha256.array(d));if(!p)throw new Error("InMemorySigner requires provided account id");const _=yield this.keyStore.getKey(m,p);if(null===_)throw new Error(`Key for ${p} not found in ${m}`);return _.sign(S)})}toString(){return`InMemorySigner(${this.keyStore})`}}n.InMemorySigner=y},82613:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(68492);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var v=u(2345);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return v.Signer}})},2345:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=void 0;n.Signer=class u{}},39779:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.actionCreators=n.stringifyJsonOrBytes=void 0;const l=u(83407);function g(D){return void 0!==D.byteLength&&D.byteLength===D.length?D:Buffer.from(JSON.stringify(D))}n.stringifyJsonOrBytes=g,n.actionCreators={addKey:function p(D,P){return new l.Action({addKey:new l.AddKey({publicKey:D,accessKey:P})})},createAccount:function M(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function S(D){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:D})})},deleteKey:function m(D){return new l.Action({deleteKey:new l.DeleteKey({publicKey:D})})},deployContract:function s(D){return new l.Action({deployContract:new l.DeployContract({code:D})})},fullAccessKey:function v(){return new l.AccessKey({permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function y(D,P,x,C,N=g,k=!1){return k?new l.Action({functionCall:new l.FunctionCall({methodName:D,args:P,gas:x,deposit:C})}):new l.Action({functionCall:new l.FunctionCall({methodName:D,args:N(P),gas:x,deposit:C})})},functionCallAccessKey:function E(D,P,x){return new l.AccessKey({permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:D,allowance:x,methodNames:P})})})},signedDelegate:function _({delegateAction:D,signature:P}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:D,signature:P})})},stake:function d(D,P){return new l.Action({stake:new l.Stake({stake:D,publicKey:P})})},transfer:function f(D){return new l.Action({transfer:new l.Transfer({deposit:D})})}}},83407:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Action=n.SignedDelegate=n.DeleteAccount=n.DeleteKey=n.AddKey=n.Stake=n.Transfer=n.FunctionCall=n.DeployContract=n.CreateAccount=n.IAction=n.AccessKey=n.AccessKeyPermission=n.FullAccessPermission=n.FunctionCallPermission=void 0;const l=u(17527);class v{constructor(k){if(1!==Object.keys(k).length)throw new Error("Enum can only take single value");Object.keys(k).map(U=>{this[U]=k[U],this.enum=U})}}class E extends l.Assignable{}n.FunctionCallPermission=E;class M extends l.Assignable{}n.FullAccessPermission=M;n.AccessKeyPermission=class s extends v{};class g extends l.Assignable{}n.AccessKey=g;class y extends l.Assignable{}n.IAction=y;n.CreateAccount=class f extends y{};n.DeployContract=class d extends y{};n.FunctionCall=class p extends y{};n.Transfer=class m extends y{};n.Stake=class S extends y{};n.AddKey=class _ extends y{};n.DeleteKey=class D extends y{};n.DeleteAccount=class P extends y{};n.SignedDelegate=class x extends y{};n.Action=class C extends v{}},71354:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTransaction=void 0;const l=u(73315);n.createTransaction=function v(E,M,s,g,y,f){return new l.Transaction({signerId:E,publicKey:M,nonce:g,receiverId:s,actions:y,blockHash:f})}},91396:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildDelegateAction=n.DelegateAction=void 0;const l=u(17527),v=u(39779),{addKey:E,createAccount:M,deleteAccount:s,deleteKey:g,deployContract:y,functionCall:f,stake:d,transfer:p}=v.actionCreators;class m extends l.Assignable{}n.DelegateAction=m,n.buildDelegateAction=function S({actions:_,maxBlockHeight:D,nonce:P,publicKey:x,receiverId:C,senderId:N}){return new m({senderId:N,receiverId:C,actions:_.map(k=>{if(!k.type&&!k.params)return k;switch(k.type){case"AddKey":{const{publicKey:U,accessKey:z}=k.params;return E(U,z)}case"CreateAccount":return M(k.params.createAccount);case"DeleteAccount":return s(k.params.deleteAccount);case"DeleteKey":return g(k.params.publicKey);case"DeployContract":return y(k.params.code);case"FunctionCall":{const{methodName:U,args:z,gas:Y,deposit:G}=k.params;return f(U,z,Y,G)}case"Stake":return d(k.params.stake,k.params.publicKey);case"Transfer":{const{deposit:U}=k.params;return p(U)}}throw new Error("Unrecognized action")}),nonce:P,maxBlockHeight:D,publicKey:x})}},38445:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(39779),n),v(u(83407),n),v(u(71354),n),v(u(91396),n),v(u(73315),n),v(u(20373),n),v(u(95758),n)},11739:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateActionPrefix=void 0;const l=u(17527),v=Math.pow(2,30),E_MetaTransactions=366;class M extends l.Assignable{}class s extends M{constructor(f){super({prefix:v+f})}}n.DelegateActionPrefix=class g extends s{constructor(){super(E_MetaTransactions)}}},73315:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA=n.SignedTransaction=n.Transaction=n.decodeSignedTransaction=n.decodeTransaction=n.encodeTransaction=n.encodeSignedDelegate=n.encodeDelegateAction=void 0;const l=u(29761),v=u(17527),E=u(21531),M=u(83407),s=u(91396),g=u(11739),y=u(95758);function p(P){return(0,E.serialize)(n.SCHEMA,P)}function m(P){return(0,E.deserialize)(n.SCHEMA,_,P)}function S(P){return(0,E.deserialize)(n.SCHEMA,D,P)}n.encodeDelegateAction=function f(P){return new Uint8Array([...(0,E.serialize)(n.SCHEMA,new g.DelegateActionPrefix),...(0,E.serialize)(n.SCHEMA,P)])},n.encodeSignedDelegate=function d(P){return(0,E.serialize)(n.SCHEMA,P)},n.encodeTransaction=p,n.decodeTransaction=m,n.decodeSignedTransaction=S;class _ extends v.Assignable{encode(){return p(this)}static decode(x){return m(x)}}n.Transaction=_;class D extends v.Assignable{encode(){return p(this)}static decode(x){return S(x)}}n.SignedTransaction=D,n.SCHEMA=new Map([[y.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[D,{kind:"struct",fields:[["transaction",_],["signature",y.Signature]]}],[_,{kind:"struct",fields:[["signerId","string"],["publicKey",l.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[M.Action]]]}],[l.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[M.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",M.AccessKeyPermission]]}],[M.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",M.FunctionCallPermission],["fullAccess",M.FullAccessPermission]]}],[M.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[M.FullAccessPermission,{kind:"struct",fields:[]}],[M.Action,{kind:"enum",field:"enum",values:[["createAccount",M.CreateAccount],["deployContract",M.DeployContract],["functionCall",M.FunctionCall],["transfer",M.Transfer],["stake",M.Stake],["addKey",M.AddKey],["deleteKey",M.DeleteKey],["deleteAccount",M.DeleteAccount],["signedDelegate",M.SignedDelegate]]}],[M.CreateAccount,{kind:"struct",fields:[]}],[M.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[M.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[M.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[M.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",l.PublicKey]]}],[M.AddKey,{kind:"struct",fields:[["publicKey",l.PublicKey],["accessKey",M.AccessKey]]}],[M.DeleteKey,{kind:"struct",fields:[["publicKey",l.PublicKey]]}],[M.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[s.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[M.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",l.PublicKey]]}],[g.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[M.SignedDelegate,{kind:"struct",fields:[["delegateAction",s.DelegateAction],["signature",y.Signature]]}]])},20373:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(m,S,_,D){return new(_||(_=Promise))(function(x,C){function N(z){try{U(D.next(z))}catch(Y){C(Y)}}function k(z){try{U(D.throw(z))}catch(Y){C(Y)}}function U(z){z.done?x(z.value):function P(x){return x instanceof _?x:new _(function(C){C(x)})}(z.value).then(N,k)}U((D=D.apply(m,S||[])).next())})},v=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.signDelegateAction=n.signTransaction=void 0;const E=v(u(1520)),M=u(83407),s=u(71354),g=u(73315),y=u(95758);function f(m,S,_,D){return l(this,void 0,void 0,function*(){const P=(0,g.encodeTransaction)(m),x=new Uint8Array(E.default.sha256.array(P)),C=yield S.signMessage(P,_,D);return[x,new g.SignedTransaction({transaction:m,signature:new y.Signature({keyType:m.publicKey.keyType,data:C.signature})})]})}n.signTransaction=function d(...m){return l(this,void 0,void 0,function*(){if(m[0].constructor===g.Transaction){const[S,_,D,P]=m;return f(S,_,D,P)}{const[S,_,D,P,x,C,N]=m,k=yield x.getPublicKey(C,N);return f((0,s.createTransaction)(C,k,S,_,D,P),x,C,N)}})},n.signDelegateAction=function p({delegateAction:m,signer:S}){return l(this,void 0,void 0,function*(){const _=(0,g.encodeDelegateAction)(m),D=yield S.sign(_),P=new M.SignedDelegate({delegateAction:m,signature:new y.Signature({keyType:m.publicKey.keyType,data:D})});return{hash:new Uint8Array(E.default.sha256.array(_)),signedDelegateAction:P}})}},95758:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signature=void 0;const l=u(17527);class v extends l.Assignable{}n.Signature=v},32272:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Assignable=void 0;n.Assignable=class u{constructor(v){Object.keys(v).map(E=>{this[E]=v[E]})}}},27876:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorContext=n.TypedError=n.ArgumentTypeError=n.PositionalArgsError=void 0;class u extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}n.PositionalArgsError=u;class l extends Error{constructor(s,g,y){super(`Expected ${g} for '${s}' argument, but got '${JSON.stringify(y)}'`)}}n.ArgumentTypeError=l;class v extends Error{constructor(s,g,y){super(s),this.type=g||"UntypedError",this.context=y}}n.TypedError=v;n.ErrorContext=class E{constructor(s){this.transactionHash=s}}},17527:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(32272),n),v(u(27876),n),v(u(39077),n)},39077:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=n.IdType=void 0;var l=u(16365);Object.defineProperty(n,"IdType",{enumerable:!0,get:function(){return l.IdType}});var v=u(83706);Object.defineProperty(n,"ExecutionStatusBasic",{enumerable:!0,get:function(){return v.ExecutionStatusBasic}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return v.FinalExecutionStatusBasic}})},16365:(q,n)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.IdType=void 0,(l=n.IdType||(n.IdType={})).Transaction="transaction",l.Receipt="receipt"},83706:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=void 0,(v=n.ExecutionStatusBasic||(n.ExecutionStatusBasic={})).Unknown="Unknown",v.Pending="Pending",v.Failure="Failure",function(v){v.NotStarted="NotStarted",v.Started="Started",v.Failure="Failure"}(n.FinalExecutionStatusBasic||(n.FinalExecutionStatusBasic={}))},73215:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0;const v=l(u(98538));n.DEFAULT_FUNCTION_CALL_GAS=new v.default("30000000000000")},38668:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(67173);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},359:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(38668);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(97217);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},97217:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(67112),s=l(u(56584)),g=l(u(96747)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},67112:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(98538)),E=l(u(28353));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=new v.default("10",10).pow(new v.default(n.NEAR_NOMINATION_EXP,10));const M=[],s=new v.default(10);for(let D=0,P=new v.default(5);D0&&x.iadd(M[k])}const C=(D=x.toString()).substring(0,D.length-n.NEAR_NOMINATION_EXP)||"0",N=D.substring(D.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,P);return function d(D){return D.replace(/\.?0*$/,"")}(`${function m(D){const P=/(-?\d+)(\d{3})/;for(;P.test(D);)D=D.replace(P,"$1,$2");return D}(C)}.${N}`)},n.parseNearAmount=function y(D){if(!D)return null;const P=(D=function f(D){return D.replace(/,/g,"").trim()}(D)).split("."),x=P[0],C=P[1]||"";if(P.length>2||C.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${D}' as NEAR amount`);return function p(D){return D=D.replace(/^0+/,""),""===D?"0":D}(x+C.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function S(D){if("string"==typeof D){const P=[];for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},67173:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(12099);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},12099:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(63452),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},30279:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(359),v=u(67173);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},11305:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},85406:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(98538)),E=l(u(89176));n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>new v.default(P.stake,10)).sort((P,x)=>P.cmp(x)),m=new v.default(d),S=p.reduce((P,x)=>P.add(x));if(S.lt(m))throw new Error("Stakes are below seats");let _=new v.default(1),D=S.add(new v.default(1));for(;!_.eq(D.sub(new v.default(1)));){const P=_.add(D).div(new v.default(2));let x=!1,C=new v.default(0);for(let N=0;Nnew v.default(_.stake,10)).sort((_,D)=>_.cmp(D)),S=m.reduce((_,D)=>_.add(D));return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},66630:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},28353:(q,n,u)=>{var l=u(66630);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},9855:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=void 0;var l=u(75754);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}});var v=u(55859);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return v.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return v.WalletConnection}})},75754:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;const v=u(12094);n.Near=class E{constructor(s){var g;if(this.config=s,this.connection=v.Connection.fromConfig({networkId:s.networkId,provider:s.provider||{type:"JsonRpcProvider",args:{url:s.nodeUrl,headers:s.headers}},signer:s.signer||{type:"InMemorySigner",keyStore:s.keyStore||(null===(g=s.deps)||void 0===g?void 0:g.keyStore)},jsvmAccountId:s.jsvmAccountId||`jsvm.${s.networkId}`}),s.masterAccount){const y=s.initialBalance?BigInt(s.initialBalance):BigInt("500000000000000000000000000");this.accountCreator=new v.LocalAccountCreator(new v.Account(this.connection,s.masterAccount),y)}else s.helperUrl?this.accountCreator=new v.UrlAccountCreator(this.connection,s.helperUrl):this.accountCreator=null}account(s){return l(this,void 0,void 0,function*(){return new v.Account(this.connection,s)})}createAccount(s,g){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(s,g),new v.Account(this.connection,s)})}}},55859:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(_,D,P,x){return new(P||(P=Promise))(function(N,k){function U(G){try{Y(x.next(G))}catch(F){k(F)}}function z(G){try{Y(x.throw(G))}catch(F){k(F)}}function Y(G){G.done?N(G.value):function C(N){return N instanceof P?N:new P(function(k){k(N)})}(G.value).then(U,z)}Y((x=x.apply(_,D||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectedWalletAccount=n.WalletConnection=void 0;const v=u(12094),E=u(50780),M=u(1340),s=u(45401),g=u(31800),p="pending_key";n.WalletConnection=class m{constructor(D,P){if("string"!=typeof P)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(N,k)=>"isSignedIn"===k?()=>!1:"getAccountId"===k?()=>"":N[k]&&"function"==typeof N[k]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:N[k]});this._near=D;const x=P+"_wallet_auth_key",C=JSON.parse(window.localStorage.getItem(x));this._networkId=D.config.networkId,this._walletBaseUrl=D.config.walletUrl,P=P||D.config.contractName||"default",this._keyStore=D.connection.signer.keyStore,this._authData=C||{allKeys:[]},this._authDataKey=x,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignInUrl({contractId:D,methodNames:P,successUrl:x,failureUrl:C}){return l(this,void 0,void 0,function*(){const N=new URL(window.location.href),k=new URL(this._walletBaseUrl+"/login/");if(k.searchParams.set("success_url",x||N.href),k.searchParams.set("failure_url",C||N.href),D){yield(yield this._near.account(D)).state(),k.searchParams.set("contract_id",D);const z=E.KeyPair.fromRandom("ed25519");k.searchParams.set("public_key",z.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,p+z.getPublicKey(),z)}return P&&P.forEach(U=>{k.searchParams.append("methodNames",U)}),k.toString()})}requestSignIn(D){return l(this,void 0,void 0,function*(){const P=yield this.requestSignInUrl(D);window.location.assign(P)})}requestSignTransactionsUrl({transactions:D,meta:P,callbackUrl:x}){const C=new URL(window.location.href),N=new URL("sign",this._walletBaseUrl);return N.searchParams.set("transactions",D.map(k=>(0,g.serialize)(s.SCHEMA.Transaction,k)).map(k=>Buffer.from(k).toString("base64")).join(",")),N.searchParams.set("callbackUrl",x||C.href),P&&N.searchParams.set("meta",P),N.toString()}requestSignTransactions(D){const P=this.requestSignTransactionsUrl(D);window.location.assign(P)}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const D=new URL(window.location.href),P=D.searchParams.get("public_key")||"",x=(D.searchParams.get("all_keys")||"").split(","),C=D.searchParams.get("account_id")||"";if(C){const N={accountId:C,allKeys:x};window.localStorage.setItem(this._authDataKey,JSON.stringify(N)),P&&(yield this._moveKeyFromTempToPermanent(C,P)),this._authData=N}D.searchParams.delete("public_key"),D.searchParams.delete("all_keys"),D.searchParams.delete("account_id"),D.searchParams.delete("meta"),D.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,D.toString())})}_moveKeyFromTempToPermanent(D,P){return l(this,void 0,void 0,function*(){const x=yield this._keyStore.getKey(this._networkId,p+P);yield this._keyStore.setKey(this._networkId,D,x),yield this._keyStore.removeKey(this._networkId,p+P)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new S(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class S extends v.Account{constructor(D,P,x){super(P,x),this.walletConnection=D}signAndSendTransaction({receiverId:D,actions:P,walletMeta:x,walletCallbackUrl:C=window.location.href}){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const k=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let U=yield this.accessKeyForTransaction(D,P,k);if(!U)throw new Error(`Cannot find matching key for transaction sent to ${D}`);if(k&&k.toString()===U.public_key)try{return yield N.signAndSendTransaction.call(this,{receiverId:D,actions:P})}catch(Z){if("NotEnoughAllowance"!==Z.type)throw Z;U=yield this.accessKeyForTransaction(D,P)}const z=yield this.connection.provider.block({finality:"final"}),Y=(0,M.baseDecode)(z.header.hash),G=E.PublicKey.from(U.public_key),F=U.access_key.nonce+BigInt(1),j=(0,s.createTransaction)(this.accountId,G,D,F,P,Y);return yield this.walletConnection.requestSignTransactions({transactions:[j],meta:x,callbackUrl:C}),new Promise((Z,T)=>{setTimeout(()=>{T(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(D,P,x){return l(this,void 0,void 0,function*(){const{access_key:{permission:C}}=D;if("FullAccess"===C)return!0;if(C.FunctionCall){const{receiver_id:N,method_names:k}=C.FunctionCall;if(N===this.accountId&&k.includes("add_request_and_confirm"))return!0;if(N===P){if(1!==x.length)return!1;const[{functionCall:U}]=x;return U&&(!U.deposit||"0"===U.deposit.toString())&&(0===k.length||k.includes(U.methodName))}}return!1})}accessKeyForTransaction(D,P,x){return l(this,void 0,void 0,function*(){const C=yield this.getAccessKeys();if(x){const k=C.find(U=>U.public_key.toString()===x.toString());if(k&&(yield this.accessKeyMatchesTransaction(k,D,P)))return k}const N=this.walletConnection._authData.allKeys;for(const k of C)if(-1!==N.indexOf(k.public_key)&&(yield this.accessKeyMatchesTransaction(k,D,P)))return k;return null})}}n.ConnectedWalletAccount=S},13629:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(Y,G,F,j){return new(F||(F=Promise))(function(T,o){function h(R){try{I(j.next(R))}catch(V){o(V)}}function w(R){try{I(j.throw(R))}catch(V){o(V)}}function I(R){R.done?T(R.value):function Z(T){return T instanceof F?T:new F(function(o){o(T)})}(R.value).then(h,w)}I((j=j.apply(Y,G||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;const v=u(50780),E=u(1656),M=u(45401),s=u(17527),g=u(1340),y=u(87309),{addKey:f,createAccount:d,deleteAccount:p,deleteKey:m,deployContract:S,fullAccessKey:_,functionCall:D,functionCallAccessKey:P,stake:x,transfer:C}=M.actionCreators;class z{constructor(G,F){this.accessKeyByPublicKeyCache={},this.connection=G,this.accountId=F}getConnection(){return this.connection}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(G,F){return l(this,void 0,void 0,function*(){const j=yield this.findAccessKey(G,F);if(!j)throw new s.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:Z}=j,o=(yield this.connection.provider.block({finality:"final"})).header.hash,h=Z.nonce+BigInt(1);return yield(0,M.signTransaction)(G,h,F,(0,g.baseDecode)(o),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:G,actions:F,returnError:j}){return l(this,void 0,void 0,function*(){let Z,T;const o=yield(0,E.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[Z,T]=yield this.signTransaction(G,F);const h=T.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(T)}catch(w){if("InvalidNonce"===w.type)return g.Logger.warn(`Retrying transaction ${G}:${(0,g.baseEncode)(Z)} with new nonce.`),delete this.accessKeyByPublicKeyCache[h.toString()],null;if("Expired"===w.type)return g.Logger.warn(`Retrying transaction ${G}:${(0,g.baseEncode)(Z)} due to expired block hash`),null;throw w.context=new s.ErrorContext((0,g.baseEncode)(Z)),w}}));if(!o)throw new s.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:T.transaction.receiverId,outcome:o}),!j&&"object"==typeof o.status&&"object"==typeof o.status.Failure&&null!==o.status.Failure)throw o.status.Failure.error_message&&o.status.Failure.error_type?new s.TypedError(`Transaction ${o.transaction_outcome.id} failed. ${o.status.Failure.error_message}`,o.status.Failure.error_type):(0,g.parseResultError)(o);return o})}findAccessKey(G,F){return l(this,void 0,void 0,function*(){const j=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!j)throw new s.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const Z=this.accessKeyByPublicKeyCache[j.toString()];if(void 0!==Z)return{publicKey:j,accessKey:Z};try{const T=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:j.toString(),finality:"optimistic"}),o=Object.assign(Object.assign({},T),{nonce:BigInt(T.nonce||0)});return this.accessKeyByPublicKeyCache[j.toString()]?{publicKey:j,accessKey:this.accessKeyByPublicKeyCache[j.toString()]}:(this.accessKeyByPublicKeyCache[j.toString()]=o,{publicKey:j,accessKey:o})}catch(T){if("AccessKeyDoesNotExist"==T.type)return null;throw T}})}createAndDeployContract(G,F,j,Z){return l(this,void 0,void 0,function*(){const T=_();return yield this.signAndSendTransaction({receiverId:G,actions:[d(),C(Z),f(v.PublicKey.from(F),T),S(j)]}),new z(this.connection,G)})}sendMoney(G,F){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:G,actions:[C(F)]})})}createAccount(G,F,j){return l(this,void 0,void 0,function*(){const Z=_();return this.signAndSendTransaction({receiverId:G,actions:[d(),C(j),f(v.PublicKey.from(F),Z)]})})}deleteAccount(G){return l(this,void 0,void 0,function*(){return g.Logger.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[p(G)]})})}deployContract(G){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[S(G)]})})}encodeJSContractArgs(G,F,j){return Buffer.concat([Buffer.from(G),Buffer.from([0]),Buffer.from(F),Buffer.from([0]),Buffer.from(j)])}functionCall({contractId:G,methodName:F,args:j={},gas:Z=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:T,walletMeta:o,walletCallbackUrl:h,stringify:w,jsContract:I}){return l(this,void 0,void 0,function*(){let R;if(this.validateArgs(j),I)R=["call_js_contract",this.encodeJSContractArgs(G,F,JSON.stringify(j)),Z,T,null,!0];else{const V=void 0===w?M.stringifyJsonOrBytes:w;R=[F,j,Z,T,V,!1]}return this.signAndSendTransaction({receiverId:I?this.connection.jsvmAccountId:G,actions:[D.apply(void 0,R)],walletMeta:o,walletCallbackUrl:h})})}addKey(G,F,j,Z){return l(this,void 0,void 0,function*(){let T;return j||(j=[]),Array.isArray(j)||(j=[j]),T=F?P(F,j,Z):_(),this.signAndSendTransaction({receiverId:this.accountId,actions:[f(v.PublicKey.from(G),T)]})})}deleteKey(G){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[m(v.PublicKey.from(G))]})})}stake(G,F){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(F,v.PublicKey.from(G))]})})}signedDelegate({actions:G,blockHeightTtl:F,receiverId:j}){return l(this,void 0,void 0,function*(){const{provider:Z,signer:T}=this.connection,{header:o}=yield Z.block({finality:"final"}),{accessKey:h,publicKey:w}=yield this.findAccessKey(null,null),I=(0,M.buildDelegateAction)({actions:G,maxBlockHeight:BigInt(o.height)+BigInt(F),nonce:BigInt(h.nonce)+BigInt(1),publicKey:w,receiverId:j,senderId:this.accountId}),{signedDelegateAction:R}=yield(0,M.signDelegateAction)({delegateAction:I,signer:{sign:V=>l(this,void 0,void 0,function*(){const{signature:H}=yield T.signMessage(V,I.senderId,this.connection.networkId);return H})}});return R})}validateArgs(G){if((void 0===G.byteLength||G.byteLength!==G.length)&&(Array.isArray(G)||"object"!=typeof G))throw new s.PositionalArgsError}viewFunction(G){return l(this,void 0,void 0,function*(){return yield(0,y.viewFunction)(this.connection,G)})}viewState(G,F={finality:"optimistic"}){return l(this,void 0,void 0,function*(){return yield(0,y.viewState)(this.connection,this.accountId,G,F)})}getAccessKeys(){var G;return l(this,void 0,void 0,function*(){const F=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(G=F?.keys)||void 0===G?void 0:G.map(j=>Object.assign(Object.assign({},j),{access_key:Object.assign(Object.assign({},j.access_key),{nonce:BigInt(j.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(j=>"FullAccess"!==j.access_key.permission).map(j=>{const Z=j.access_key.permission;return{contractId:Z.FunctionCall.receiver_id,amount:Z.FunctionCall.allowance,publicKey:j.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const G=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),F=yield this.state(),j=BigInt(G.runtime_config.storage_amount_per_byte),Z=BigInt(F.storage_usage)*j,T=BigInt(F.locked),o=BigInt(F.amount)+T,h=o-(T>Z?T:Z);return{total:o.toString(),stateStaked:Z.toString(),staked:T.toString(),available:h.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const G=yield this.connection.provider.block({finality:"final"}),F=G.header.hash,j=G.header.epoch_id,{current_validators:Z,next_validators:T,current_proposals:o}=yield this.connection.provider.validators(j),h=new Set;[...Z,...T,...o].forEach(L=>h.add(L.account_id));const w=[...h],I=w.map(L=>this.viewFunction({contractId:L,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:F}})),R=yield Promise.allSettled(I);if(R.some(L=>"rejected"===L.status&&"TimeoutError"===L.reason.type))throw new Error("Failed to get delegated stake balance");const H=R.reduce((L,b,B)=>{const re=w[B];if("fulfilled"===b.status){const ne=BigInt(b.value);if(ne!==BigInt(0))return Object.assign(Object.assign({},L),{stakedValidators:[...L.stakedValidators,{validatorId:re,amount:ne.toString()}],total:L.total+ne})}return"rejected"===b.status?Object.assign(Object.assign({},L),{failedValidators:[...L.failedValidators,{validatorId:re,error:b.reason}]}):L},{stakedValidators:[],failedValidators:[],total:BigInt(0)});return Object.assign(Object.assign({},H),{total:H.total.toString()})})}}n.Account=z},59666:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(N,k,U,z){return new(U||(U=Promise))(function(G,F){function j(o){try{T(z.next(o))}catch(h){F(h)}}function Z(o){try{T(z.throw(o))}catch(h){F(h)}}function T(o){o.done?G(o.value):function Y(G){return G instanceof U?G:new U(function(F){F(G)})}(o.value).then(j,Z)}T((z=z.apply(N,k||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Account2FA=void 0;const v=u(50780),E=u(17527),M=u(1656),s=u(45401),g=u(1340),y=u(25407),f=u(61784),d=u(29386),{addKey:p,deleteKey:m,deployContract:S,fullAccessKey:_,functionCall:D,functionCallAccessKey:P}=s.actionCreators;class x extends y.AccountMultisig{constructor(k,U,z){super(k,U,z),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=z.helperUrl||this.helperUrl,this.storage=z.storage,this.sendCode=z.sendCode||this.sendCodeDefault,this.getCode=z.getCode||this.getCodeDefault,this.verifyCode=z.verifyCode||this.verifyCodeDefault,this.onConfirmResult=z.onConfirmResult}signAndSendTransaction({receiverId:k,actions:U}){const z=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield z.signAndSendTransaction.call(this,{receiverId:k,actions:U}),yield this.sendCode();const Y=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(Y)),Y})}deployMultisig(k){const U=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:z}=this,Y=(yield this.getRecoveryMethods()).data.filter(({kind:h,publicKey:w})=>("phrase"===h||"ledger"===h)&&null!==w).map(h=>h.publicKey),G=(yield this.getAccessKeys()).filter(({public_key:h,access_key:{permission:w}})=>"FullAccess"===w&&!Y.includes(h)).map(h=>h.public_key).map(C),F=C((yield this.postSignedJson("/2fa/getAccessKey",{accountId:z})).publicKey),j=Buffer.from(JSON.stringify({num_confirmations:2})),Z=[...G.map(h=>m(h)),...G.map(h=>p(h,P(z,f.MULTISIG_CHANGE_METHODS,null))),p(F,P(z,f.MULTISIG_CONFIRM_METHODS,null)),S(k)],T=Z.concat(D("new",j,f.MULTISIG_GAS,f.MULTISIG_DEPOSIT));g.Logger.log("deploying multisig contract for",z);const{stateStatus:o}=yield this.checkMultisigCodeAndStateStatus(k);switch(o){case d.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield U.signAndSendTransactionWithAccount.call(this,z,T);case d.MultisigStateStatus.VALID_STATE:return yield U.signAndSendTransactionWithAccount.call(this,z,Z);case d.MultisigStateStatus.INVALID_STATE:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:k,cleanupContractBytes:U}){return l(this,void 0,void 0,function*(){let z=[];U&&(yield this.deleteAllRequests().catch(j=>j),z=yield this.get2faDisableCleanupActions(U));const Y=yield this.get2faDisableKeyConversionActions(),G=[...z,...Y,S(k)],F=yield this.findAccessKey(this.accountId,G);if(F&&F.accessKey&&"FullAccess"!==F.accessKey.permission)throw new E.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,G)})}get2faDisableCleanupActions(k){return l(this,void 0,void 0,function*(){const U=yield this.viewState("").catch(Y=>{const G=Y.cause&&Y.cause.name;if("NO_CONTRACT_CODE"==G)return[];throw"TOO_LARGE_CONTRACT_STATE"==G?new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):Y}),z=U.map(({key:Y})=>Y.toString("base64"));return U.length?[S(k),D("clean",{keys:z},f.MULTISIG_GAS,BigInt("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,z=(yield this.getAccessKeys()).filter(({access_key:G})=>"FullAccess"!==G.permission).filter(({access_key:G})=>{const F=G.permission.FunctionCall;return F.receiver_id===k&&4===F.method_names.length&&F.method_names.includes("add_request_and_confirm")}),Y=v.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:k})).publicKey);return[m(Y),...z.map(({public_key:G})=>m(v.PublicKey.from(G))),...z.map(({public_key:G})=>p(v.PublicKey.from(G),_()))]})}disable(k,U){return l(this,void 0,void 0,function*(){const{stateStatus:z}=yield this.checkMultisigCodeAndStateStatus();if(z!==d.MultisigStateStatus.VALID_STATE&&z!==d.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let Y;yield this.deleteAllRequests().catch(j=>Y=j);const F=[...yield this.get2faDisableCleanupActions(U).catch(j=>{throw"ContractHasExistingState"===j.type&&Y||j}),...yield this.get2faDisableKeyConversionActions(),S(k)];return g.Logger.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:F})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,{requestId:U}=this.getRequest(),z=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:k,method:z,requestId:U}),U})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const k=yield this.get2faMethod(),U=yield this.getCode(k);try{return yield this.verifyCode(U)}catch(z){if(g.Logger.warn("Error validating security code:",z),z.toString().includes("invalid 2fa code provided")||z.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw z}})}verifyCodeDefault(k){return l(this,void 0,void 0,function*(){const{accountId:U}=this,z=this.getRequest();if(!z)throw new Error("no request pending");const{requestId:Y}=z;return yield this.postSignedJson("/2fa/verify",{accountId:U,securityCode:k,requestId:Y})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:k}=this;return{accountId:k,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:k})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:k}=yield this.getRecoveryMethods();if(k&&k.length&&(k=k.find(Y=>0===Y.kind.indexOf("2fa-"))),!k)return null;const{kind:U,detail:z}=k;return{kind:U,detail:z}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,z=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),Y=yield this.connection.signer.signMessage(Buffer.from(z),k,this.connection.networkId);return{blockNumber:z,blockNumberSignature:Buffer.from(Y.signature).toString("base64")}})}postSignedJson(k,U){return l(this,void 0,void 0,function*(){return yield(0,M.fetchJson)(this.helperUrl+k,JSON.stringify(Object.assign(Object.assign({},U),yield this.signatureFor())))})}}n.Account2FA=x;const C=N=>v.PublicKey.from(N)},69453:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;const v=u(1656);class E{}n.AccountCreator=E;n.LocalAccountCreator=class M extends E{constructor(y,f){super(),this.masterAccount=y,this.initialBalance=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,f,this.initialBalance)})}};n.UrlAccountCreator=class s extends E{constructor(y,f){super(),this.connection=y,this.helperUrl=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield(0,v.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:f.toString()}))})}}},25407:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountMultisig=void 0;const v=u(45401),E=u(1340),M=u(13629),s=u(61784),g=u(29386),{deployContract:y,functionCall:f}=v.actionCreators;var d,D;(D=d||(d={}))[D.INVALID_CODE=0]="INVALID_CODE",D[D.VALID_CODE=1]="VALID_CODE",D[D.UNKNOWN_CODE=2]="UNKNOWN_CODE";const p={[s.MULTISIG_STORAGE_KEY]:null};class m extends M.Account{constructor(P,x,C){super(P,x),this.storage=C.storage,this.onAddRequestResult=C.onAddRequestResult}signAndSendTransactionWithAccount(P,x){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return C.signAndSendTransaction.call(this,{receiverId:P,actions:x})})}signAndSendTransaction({receiverId:P,actions:x}){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:N}=this,k=Buffer.from(JSON.stringify({request:{receiver_id:P,actions:_(x,N,P)}}));let U;try{U=yield C.signAndSendTransaction.call(this,{receiverId:N,actions:[f("add_request_and_confirm",k,s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch(Y){if(Y.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:P,actions:x});throw Y}if(!U.status)throw new Error("Request failed");const z=Object.assign({},U.status);if(!z.SuccessValue||"string"!=typeof z.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:N,actions:x,requestId:parseInt(Buffer.from(z.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(U)),this.deleteUnconfirmedRequests(),U})}checkMultisigCodeAndStateStatus(P){const x=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const N=P?d.UNKNOWN_CODE:d.VALID_CODE;try{return P?yield x.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y(P),f("delete_request",{request_id:4294967295},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:d.VALID_CODE,stateStatus:g.MultisigStateStatus.VALID_STATE}}catch(k){if(new RegExp(g.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.INVALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(g.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.VALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(k&&k.message))return{codeStatus:d.INVALID_CODE,stateStatus:g.MultisigStateStatus.UNKNOWN_STATE};throw k}})}deleteRequest(P){return super.signAndSendTransaction({receiverId:this.accountId,actions:[f("delete_request",{request_id:P},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const P=yield this.getRequestIds();P.length&&(yield Promise.all(P.map(x=>this.deleteRequest(x))))})}deleteUnconfirmedRequests(){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const x=yield this.getRequestIds(),{requestId:C}=this.getRequest();for(const N of x)if(N!=C)try{yield P.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[f("delete_request",{request_id:N},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch{E.Logger.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(s.MULTISIG_STORAGE_KEY)||"{}"):p[s.MULTISIG_STORAGE_KEY]}setRequest(P){if(this.storage)return this.storage.setItem(s.MULTISIG_STORAGE_KEY,JSON.stringify(P));p[s.MULTISIG_STORAGE_KEY]=P}}n.AccountMultisig=m;const S=D=>D.toString().replace("ed25519:",""),_=(D,P,x)=>D.map(C=>{const N=C.enum,{gas:k,publicKey:U,methodName:z,args:Y,deposit:G,accessKey:F,code:j}=C[N],Z={type:N[0].toUpperCase()+N.substr(1),gas:k&&k.toString()||void 0,public_key:U&&S(U)||void 0,method_name:z,args:Y&&Buffer.from(Y).toString("base64")||void 0,code:j&&Buffer.from(j).toString("base64")||void 0,amount:G&&G.toString()||void 0,deposit:G&&G.toString()||"0",permission:void 0};if(F&&(x===P&&"fullAccess"!==F.permission.enum&&(Z.permission={receiver_id:P,allowance:s.MULTISIG_ALLOWANCE.toString(),method_names:s.MULTISIG_CHANGE_METHODS}),"functionCall"===F.permission.enum)){const{receiverId:T,methodNames:o,allowance:h}=F.permission.functionCall;Z.permission={receiver_id:T,allowance:h&&h.toString()||void 0,method_names:o}}return Z})},29525:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;const l=u(36566),v=u(1656);class s{constructor(y,f,d,p){this.networkId=y,this.provider=f,this.signer=d,this.jsvmAccountId=p}getConnection(){return this}static fromConfig(y){const f=function E(g){switch(g.type){case void 0:return g;case"JsonRpcProvider":return new v.JsonRpcProvider(Object.assign({},g.args));case"FailoverRpcProvider":{const y=(g?.args||[]).map(f=>new v.JsonRpcProvider(f));return new v.FailoverRpcProvider(y)}default:throw new Error(`Unknown provider type ${g.type}`)}}(y.provider),d=function M(g){switch(g.type){case void 0:return g;case"InMemorySigner":return new l.InMemorySigner(g.keyStore);default:throw new Error(`Unknown signer type ${g.type}`)}}(y.signer);return new s(y.networkId,f,d,y.jsvmAccountId)}}n.Connection=s},61784:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=void 0;const l=u(1340);n.MULTISIG_STORAGE_KEY="__multisigRequest",n.MULTISIG_ALLOWANCE=BigInt((0,l.parseNearAmount)("1")),n.MULTISIG_GAS=BigInt("100000000000000"),n.MULTISIG_DEPOSIT=BigInt("0"),n.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],n.MULTISIG_CONFIRM_METHODS=["confirm"]},38985:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(N,k,U,z){return new(U||(U=Promise))(function(G,F){function j(o){try{T(z.next(o))}catch(h){F(h)}}function Z(o){try{T(z.throw(o))}catch(h){F(h)}}function T(o){o.done?G(o.value):function Y(G){return G instanceof U?G:new U(function(F){F(G)})}(o.value).then(j,Z)}T((z=z.apply(N,k||[])).next())})},v=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;const E=u(1340),M=u(17527),s=u(67229),g=v(u(28167)),y=v(u(89176)),f=u(84778),d=u(13629),p=u(12306),m=u(87309);function S(N,k){return{[N]:(...U)=>k(...U)}[N]}function _(N,k,U){var z;if(!P(N))return;if(k.params&&k.params.serialization_type!==f.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.params.serialization_type);if(k.result&&k.result.serialization_type!==f.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.result.serialization_type);const Y=(null===(z=k.params)||void 0===z?void 0:z.args)||[];for(const G of Y){const F=N[G.name],j=G.type_schema;j.definitions=U.body.root_schema.definitions;const Z=(0,g.default)(j);if(!Z(F))throw new p.ArgumentSchemaError(G.name,Z.errors)}for(const G of Object.keys(N))if(!Y.find(j=>j.name===G))throw new p.UnknownArgumentError(G,Y.map(j=>j.name))}const D=N=>N&&void 0!==N.byteLength&&N.byteLength===N.length,P=N=>"[object Object]"===Object.prototype.toString.call(N);n.Contract=class x{constructor(k,U,z){this.connection=k.getConnection(),k instanceof d.Account&&((0,y.default)("new Contract(account, contractId, options)")("use `new Contract(connection, contractId, options)` instead"),this.account=k),this.contractId=U,this.lve=new s.LocalViewExecution(k);const{viewMethods:Y=[],changeMethods:G=[],abi:F,useLocalViewExecution:j}=z;let Z=Y.map(o=>({name:o,abi:null})),T=G.map(o=>({name:o,abi:null}));if(F){if(Z.length>0||T.length>0)throw new p.ConflictingOptions;Z=F.body.functions.filter(o=>o.kind===f.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),T=F.body.functions.filter(o=>o.kind===f.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}Z.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:S(o,(w={},I={},...R)=>l(this,void 0,void 0,function*(){if(R.length||!P(w)&&!D(w)||!P(I))throw new M.PositionalArgsError;if(h&&_(w,h,F),j)try{return yield this.lve.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:w},I))}catch(V){E.Logger.warn(`Local view execution failed with: "${V.message}"`),E.Logger.warn("Fallback to normal RPC call")}return this.account?this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:w},I)):(0,m.viewFunction)(this.connection,Object.assign({contractId:this.contractId,methodName:o,args:w},I))}))})}),T.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:S(o,(...w)=>l(this,void 0,void 0,function*(){if(w.length&&(w.length>3||!P(w[0])&&!D(w[0])))throw new M.PositionalArgsError;return(w.length>1||!(w[0]&&w[0].args))&&((0,y.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ signerAccount, args, gas?, amount?, callbackUrl?, meta? })` instead"),w[0]={args:w[0],gas:w[1],amount:w[2]}),h&&_(w[0].args,h,F),this._changeMethod(Object.assign({methodName:o},w[0]))}))})})}_changeMethod({signerAccount:k,args:U,methodName:z,gas:Y,amount:G,meta:F,callbackUrl:j}){return l(this,void 0,void 0,function*(){!function C(N){const k="number, decimal string or BigInt";for(const U of Object.keys(N)){const z=N[U];if(z&&"bigint"!=typeof z&&isNaN(z))throw new M.ArgumentTypeError(U,k,z)}}({gas:Y,amount:G});const Z=this.account||k;if(!Z)throw new Error("signerAccount must be specified");const T=yield Z.functionCall({contractId:this.contractId,methodName:z,args:U,gas:Y,attachedDeposit:G,walletMeta:F,walletCallbackUrl:j});return(0,E.getTransactionLastResult)(T)})}}},12306:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConflictingOptions=n.ArgumentSchemaError=n.UnknownArgumentError=n.UnsupportedSerializationError=void 0;class u extends Error{constructor(s,g){super(`Contract method '${s}' is using an unsupported serialization type ${g}`)}}n.UnsupportedSerializationError=u;class l extends Error{constructor(s,g){super(`Unrecognized argument '${s}', expected '${JSON.stringify(g)}'`)}}n.UnknownArgumentError=l;class v extends Error{constructor(s,g){super(`Argument '${s}' does not conform to the specified ABI schema: '${JSON.stringify(g)}'`)}}n.ArgumentSchemaError=v;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}n.ConflictingOptions=E},12094:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=n.Contract=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.Connection=n.AccountMultisig=n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=n.Account2FA=n.Account=void 0;var l=u(13629);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}});var v=u(59666);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return v.Account2FA}});var E=u(69453);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var M=u(25407);Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var s=u(29525);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return s.Connection}});var g=u(61784);Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return g.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return g.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return g.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return g.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CONFIRM_METHODS}});var y=u(38985);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return y.Contract}});var f=u(12306);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return f.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return f.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return f.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return f.UnsupportedSerializationError}});var d=u(29386);Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return d.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return d.MultisigStateStatus}})},67229:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(f,d,p,m){return new(p||(p=Promise))(function(_,D){function P(N){try{C(m.next(N))}catch(k){D(k)}}function x(N){try{C(m.throw(N))}catch(k){D(k)}}function C(N){N.done?_(N.value):function S(_){return _ instanceof p?_:new p(function(D){D(_)})}(N.value).then(P,x)}C((m=m.apply(f,d||[])).next())})},v=this&&this.__rest||function(f,d){var p={};for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&d.indexOf(m)<0&&(p[m]=f[m]);if(null!=f&&"function"==typeof Object.getOwnPropertySymbols){var S=0;for(m=Object.getOwnPropertySymbols(f);S()=>{throw new Error("method not implemented: "+y)},s=y=>()=>{throw new Error("method not available for view calls: "+y)};n.Runtime=class g{constructor(f){var{contractCode:d}=f,p=v(f,["contractCode"]);this.context=p,this.wasm=this.prepareWASM(Buffer.from(d,"base64")),this.memory=new WebAssembly.Memory({initial:1024,maximum:2048}),this.registers={},this.logs=[],this.result=Buffer.from([])}readUTF16CStr(f){const d=[],p=new Uint16Array(this.memory.buffer);let m=Number(f)/2;for(;0!=p[m];)d.push(p[m]),m++;return Buffer.from(Uint16Array.from(d).buffer).toString("ucs2")}readUTF8CStr(f,d){const p=[],m=new Uint8Array(this.memory.buffer);let S=Number(d);for(let _=0;_0===Buffer.compare(S.key,p)).map(S=>S.value);return 0===m.length?null:m.length>1?m:m[0]}prepareWASM(f){const d=[];if("\0asm"!==f.subarray(0,4).toString("utf8"))throw new Error("Invalid magic number");const m=f.readUInt32LE(4);if(1!=m)throw new Error("Invalid version: "+m);let S=8;function _(){let U,N=0,k=0;do{U=f[S++],N|=(127&U)<>=7)&&(U|=128),k.push(U)}while(0!==N);return Buffer.from(k)}function C(N){const k=Buffer.from(N,"utf8");return Buffer.concat([x(k.length),k])}d.push(f.subarray(0,S));do{const N=S,k=f.readUInt8(S);S++;const U=_(),z=S+U;if(5==k)d.push(Buffer.from([5,1,0]));else if(2==k){const Y=[],G=_();for(let Z=0;Zthis.panic("explicit guest panic"),panic_utf8:(f,d)=>this.panic(this.readUTF8CStr(f,d)),epoch_height:M("epoch_height"),storage_usage:M("storage_usage"),account_balance:M("account_balance"),account_locked_balance:M("account_locked_balance"),random_seed:M("random_seed"),ripemd160:M("ripemd160"),keccak256:M("keccak256"),keccak512:M("keccak512"),ecrecover:M("ecrecover"),validator_stake:M("validator_stake"),validator_total_stake:M("validator_total_stake"),write_register:s("write_register"),signer_account_id:s("signer_account_id"),signer_account_pk:s("signer_account_pk"),predecessor_account_id:s("predecessor_account_id"),attached_deposit:s("attached_deposit"),prepaid_gas:s("prepaid_gas"),used_gas:s("used_gas"),promise_create:s("promise_create"),promise_then:s("promise_then"),promise_and:s("promise_and"),promise_batch_create:s("promise_batch_create"),promise_batch_then:s("promise_batch_then"),promise_batch_action_create_account:s("promise_batch_action_create_account"),promise_batch_action_deploy_contract:s("promise_batch_action_deploy_contract"),promise_batch_action_function_call:s("promise_batch_action_function_call"),promise_batch_action_function_call_weight:s("promise_batch_action_function_call_weight"),promise_batch_action_transfer:s("promise_batch_action_transfer"),promise_batch_action_stake:s("promise_batch_action_stake"),promise_batch_action_add_key_with_full_access:s("promise_batch_action_add_key_with_full_access"),promise_batch_action_add_key_with_function_call:s("promise_batch_action_add_key_with_function_call"),promise_batch_action_delete_key:s("promise_batch_action_delete_key"),promise_batch_action_delete_account:s("promise_batch_action_delete_account"),promise_results_count:s("promise_results_count"),promise_result:s("promise_result"),promise_return:s("promise_return"),storage_write:s("storage_write"),storage_remove:s("storage_remove")}}execute(f){return l(this,void 0,void 0,function*(){const d=yield WebAssembly.compile(this.wasm),m=(yield WebAssembly.instantiate(d,{env:Object.assign(Object.assign({},this.getHostImports()),{memory:this.memory})})).exports[f];if(null==m)throw new Error(`Contract method '${f}' does not exists in contract ${this.context.contractId} for block id ${this.context.blockHeight}`);return m(),{result:this.result,logs:this.logs}})}}},20015:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Storage=void 0;const l=u(54689);class v{constructor(M={max:v.MAX_ELEMENTS}){this.cache=new l.LRUMap(M.max),this.blockHeights=new Map}load(M){if(!("blockId"in M))return;let g=M.blockId;return 44==g.toString().length&&(g=this.blockHeights.get(g.toString())),this.cache.get(g)}save(M,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f}){this.blockHeights.set(M,s),this.cache.set(s,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f})}}n.Storage=v,v.MAX_ELEMENTS=100},29386:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=void 0,(v=n.MultisigDeleteRequestRejectionError||(n.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",v.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",v.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",v.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",v.METHOD_NOT_FOUND="Contract method is not found",function(v){v[v.INVALID_STATE=0]="INVALID_STATE",v[v.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",v[v.VALID_STATE=2]="VALID_STATE",v[v.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(n.MultisigStateStatus||(n.MultisigStateStatus={}))},87309:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.viewFunction=n.viewState=n.encodeJSContractArgs=n.validateArgs=void 0;const v=u(17527),E=u(1340);function M(p){return JSON.parse(Buffer.from(p).toString())}function s(p){return Buffer.from(JSON.stringify(p))}function g(p){if((void 0===p.byteLength||p.byteLength!==p.length)&&(Array.isArray(p)||"object"!=typeof p))throw new v.PositionalArgsError}function y(p,m,S){return Buffer.concat([Buffer.from(p),Buffer.from([0]),Buffer.from(m),Buffer.from([0]),Buffer.from(S)])}n.validateArgs=g,n.encodeJSContractArgs=y,n.viewState=function f(p,m,S,_={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:D}=yield p.provider.query(Object.assign(Object.assign({request_type:"view_state"},_),{account_id:m,prefix_base64:Buffer.from(S).toString("base64")}));return D.map(({key:P,value:x})=>({key:Buffer.from(P,"base64"),value:Buffer.from(x,"base64")}))})},n.viewFunction=function d(p,{contractId:m,methodName:S,args:_={},parse:D=M,stringify:P=s,jsContract:x=!1,blockQuery:C={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let N;g(_),N=x?y(m,S,Object.keys(_).length>0?JSON.stringify(_):""):P(_);const k=yield p.provider.query(Object.assign(Object.assign({request_type:"call_function"},C),{account_id:x?p.jsvmAccountId:m,method_name:x?"view_js_contract":S,args_base64:N.toString("base64")}));return k.logs&&(0,E.printTxOutcomeLogs)({contractId:m,logs:k.logs}),k.result&&k.result.length>0&&D(Buffer.from(k.result))})}},81161:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},50780:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(81161);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(52043);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(80550);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(10399);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},52043:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(734),v=u(80550);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},734:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},80550:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(1340),E=u(35434),M=l(u(53753)),s=u(81161),g=u(734),y=u(10399);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(new Uint8Array(S));this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},10399:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(1340),E=u(35434),M=u(81161);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},65036:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.InMemorySigner=void 0;const v=u(50780),E=u(69170),M=u(54344),s=u(53360);class g extends s.Signer{constructor(f){super(),this.keyStore=f}static fromKeyPair(f,d,p){return l(this,void 0,void 0,function*(){const m=new E.InMemoryKeyStore;return yield m.setKey(f,d,p),new g(m)})}createKey(f,d){return l(this,void 0,void 0,function*(){const p=v.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(d,f,p),p.getPublicKey()})}getPublicKey(f,d){return l(this,void 0,void 0,function*(){const p=yield this.keyStore.getKey(d,f);return null===p?null:p.getPublicKey()})}signMessage(f,d,p){return l(this,void 0,void 0,function*(){const m=new Uint8Array((0,M.sha256)(f));if(!d)throw new Error("InMemorySigner requires provided account id");const S=yield this.keyStore.getKey(p,d);if(null===S)throw new Error(`Key for ${d} not found in ${p}`);return S.sign(m)})}toString(){return`InMemorySigner(${this.keyStore})`}}n.InMemorySigner=g},36566:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(65036);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var v=u(53360);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return v.Signer}})},53360:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=void 0;n.Signer=class u{}},16563:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.actionCreators=n.stringifyJsonOrBytes=void 0;const l=u(91503);function g(D){return void 0!==D.byteLength&&D.byteLength===D.length?D:Buffer.from(JSON.stringify(D))}n.stringifyJsonOrBytes=g,n.actionCreators={addKey:function p(D,P){return new l.Action({addKey:new l.AddKey({publicKey:D,accessKey:P})})},createAccount:function M(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function S(D){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:D})})},deleteKey:function m(D){return new l.Action({deleteKey:new l.DeleteKey({publicKey:D})})},deployContract:function s(D){return new l.Action({deployContract:new l.DeployContract({code:D})})},fullAccessKey:function v(){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function y(D,P,x=BigInt(0),C=BigInt(0),N=g,k=!1){return k?new l.Action({functionCall:new l.FunctionCall({methodName:D,args:P,gas:x,deposit:C})}):new l.Action({functionCall:new l.FunctionCall({methodName:D,args:N(P),gas:x,deposit:C})})},functionCallAccessKey:function E(D,P,x){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:D,allowance:x,methodNames:P})})})},signedDelegate:function _({delegateAction:D,signature:P}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:D,signature:P})})},stake:function d(D=BigInt(0),P){return new l.Action({stake:new l.Stake({stake:D,publicKey:P})})},transfer:function f(D=BigInt(0)){return new l.Action({transfer:new l.Transfer({deposit:D})})}}},91503:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Action=n.SignedDelegate=n.DeleteAccount=n.DeleteKey=n.AddKey=n.Stake=n.Transfer=n.FunctionCall=n.DeployContract=n.CreateAccount=n.IAction=n.AccessKey=n.AccessKeyPermission=n.FullAccessPermission=n.FunctionCallPermission=void 0;const l=u(17527);class v{constructor(k){if(1!==Object.keys(k).length)throw new Error("Enum can only take single value");Object.keys(k).map(U=>{this[U]=k[U],this.enum=U})}}class E extends l.Assignable{}n.FunctionCallPermission=E;class M extends l.Assignable{}n.FullAccessPermission=M;n.AccessKeyPermission=class s extends v{};class g extends l.Assignable{}n.AccessKey=g;class y extends l.Assignable{}n.IAction=y;n.CreateAccount=class f extends y{};n.DeployContract=class d extends y{};n.FunctionCall=class p extends y{};n.Transfer=class m extends y{};n.Stake=class S extends y{};n.AddKey=class _ extends y{};n.DeleteKey=class D extends y{};n.DeleteAccount=class P extends y{};n.SignedDelegate=class x extends y{};n.Action=class C extends v{}},51479:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTransaction=void 0;const l=u(91162);n.createTransaction=function v(E,M,s,g,y,f){const d="bigint"==typeof g?g:BigInt(g);return new l.Transaction({signerId:E,publicKey:M,nonce:d,receiverId:s,actions:y,blockHash:f})}},25782:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildDelegateAction=n.DelegateAction=void 0;const l=u(17527),v=u(16563),{addKey:E,createAccount:M,deleteAccount:s,deleteKey:g,deployContract:y,functionCall:f,stake:d,transfer:p}=v.actionCreators;class m extends l.Assignable{}n.DelegateAction=m,n.buildDelegateAction=function S({actions:_,maxBlockHeight:D,nonce:P,publicKey:x,receiverId:C,senderId:N}){return new m({senderId:N,receiverId:C,actions:_.map(k=>{if(!k.type&&!k.params)return k;switch(k.type){case"AddKey":{const{publicKey:U,accessKey:z}=k.params;return E(U,z)}case"CreateAccount":return M(k.params.createAccount);case"DeleteAccount":return s(k.params.deleteAccount);case"DeleteKey":return g(k.params.publicKey);case"DeployContract":return y(k.params.code);case"FunctionCall":{const{methodName:U,args:z,gas:Y,deposit:G}=k.params;return f(U,z,Y,G)}case"Stake":return d(k.params.stake,k.params.publicKey);case"Transfer":{const{deposit:U}=k.params;return p(U)}}throw new Error("Unrecognized action")}),nonce:P,maxBlockHeight:D,publicKey:x})}},45401:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(16563),n),v(u(91503),n),v(u(51479),n),v(u(25782),n),v(u(91162),n),v(u(44521),n),v(u(57698),n)},62272:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateActionPrefix=void 0;const l=u(17527),v=Math.pow(2,30),E_MetaTransactions=366;class M extends l.Assignable{}class s extends M{constructor(f){super({prefix:v+f})}}n.DelegateActionPrefix=class g extends s{constructor(){super(E_MetaTransactions)}}},91162:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA=n.SignedTransaction=n.Transaction=n.decodeSignedTransaction=n.decodeTransaction=n.encodeTransaction=n.encodeSignedDelegate=n.encodeDelegateAction=void 0;const l=u(17527),v=u(31800),E=u(62272);function g(m){const S=m instanceof p?n.SCHEMA.SignedTransaction:n.SCHEMA.Transaction;return(0,v.serialize)(S,m)}function y(m){return new d((0,v.deserialize)(n.SCHEMA.Transaction,m))}function f(m){return new p((0,v.deserialize)(n.SCHEMA.SignedTransaction,m))}n.encodeDelegateAction=function M(m){return new Uint8Array([...(0,v.serialize)(n.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,v.serialize)(n.SCHEMA.DelegateAction,m)])},n.encodeSignedDelegate=function s(m){return(0,v.serialize)(n.SCHEMA.SignedDelegate,m)},n.encodeTransaction=g,n.decodeTransaction=y,n.decodeSignedTransaction=f;class d extends l.Assignable{encode(){return g(this)}static decode(S){return y(S)}}n.Transaction=d;class p extends l.Assignable{encode(){return g(this)}static decode(S){return f(S)}}n.SignedTransaction=p,n.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},44521:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.signDelegateAction=n.signTransaction=void 0;const v=u(54344),E=u(91503),M=u(51479),s=u(91162),g=u(57698);function y(p,m,S,_){return l(this,void 0,void 0,function*(){const D=(0,s.encodeTransaction)(p),P=new Uint8Array((0,v.sha256)(D)),x=yield m.signMessage(D,S,_);return[P,new s.SignedTransaction({transaction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:x.signature})})]})}n.signTransaction=function f(...p){return l(this,void 0,void 0,function*(){if(p[0].constructor===s.Transaction){const[m,S,_,D]=p;return y(m,S,_,D)}{const[m,S,_,D,P,x,C]=p,N=yield P.getPublicKey(x,C);return y((0,M.createTransaction)(x,N,m,S,_,D),P,x,C)}})},n.signDelegateAction=function d({delegateAction:p,signer:m}){return l(this,void 0,void 0,function*(){const S=(0,s.encodeDelegateAction)(p),_=yield m.sign(S),D=new E.SignedDelegate({delegateAction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:_})});return{hash:new Uint8Array((0,v.sha256)(S)),signedDelegateAction:D}})}},57698:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signature=void 0;const l=u(17527);class v extends l.Assignable{}n.Signature=v},58075:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},99584:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(87933);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},787:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(99584);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(17459);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},17459:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(23229),s=l(u(97092)),g=l(u(41355)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},23229:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(62323));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},1340:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(58075),n),v(u(787),n),v(u(23229),n),v(u(18535),n),v(u(82465),n),v(u(97871),n),v(u(87933),n),v(u(31851),n)},60420:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},87933:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(3653);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},3653:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(60420),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},18535:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(787),v=u(87933);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},82465:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},31851:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},97871:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(31851);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},13991:(q,n)=>{"use strict";function u(f){if(!Number.isSafeInteger(f)||f<0)throw new Error(`Wrong positive integer: ${f}`)}function l(f){if("boolean"!=typeof f)throw new Error(`Expected boolean, not ${f}`)}function E(f,...d){if(!function v(f){return f instanceof Uint8Array||null!=f&&"object"==typeof f&&"Uint8Array"===f.constructor.name}(f))throw new Error("Expected Uint8Array");if(d.length>0&&!d.includes(f.length))throw new Error(`Expected Uint8Array of length ${d}, not of length=${f.length}`)}function M(f){if("function"!=typeof f||"function"!=typeof f.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");u(f.outputLen),u(f.blockLen)}function s(f,d=!0){if(f.destroyed)throw new Error("Hash instance has been destroyed");if(d&&f.finished)throw new Error("Hash#digest() has already been called")}function g(f,d){E(f);const p=d.outputLen;if(f.length{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const l=u(13991),v=u(5748);class M extends v.Hash{constructor(g,y,f,d){super(),this.blockLen=g,this.outputLen=y,this.padOffset=f,this.isLE=d,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(g),this.view=(0,v.createView)(this.buffer)}update(g){(0,l.exists)(this);const{view:y,buffer:f,blockLen:d}=this,p=(g=(0,v.toBytes)(g)).length;for(let m=0;md-m&&(this.process(f,0),m=0);for(let x=m;x>d&p),S=Number(y&p),_=f?4:0,D=f?0:4;s.setUint32(g+_,m,f),s.setUint32(g+D,S,f)})(f,d-8,BigInt(8*this.length),p),this.process(f,0);const S=(0,v.createView)(g),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const D=_/4,P=this.get();if(D>P.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},54344:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const l=u(2238),v=u(5748),E=(p,m,S)=>p&m^~p&S,M=(p,m,S)=>p&m^p&S^m&S,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),g=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64);class f extends l.SHA2{constructor(){super(64,32,8,!1),this.A=0|g[0],this.B=0|g[1],this.C=0|g[2],this.D=0|g[3],this.E=0|g[4],this.F=0|g[5],this.G=0|g[6],this.H=0|g[7]}get(){const{A:m,B:S,C:_,D,E:P,F:x,G:C,H:N}=this;return[m,S,_,D,P,x,C,N]}set(m,S,_,D,P,x,C,N){this.A=0|m,this.B=0|S,this.C=0|_,this.D=0|D,this.E=0|P,this.F=0|x,this.G=0|C,this.H=0|N}process(m,S){for(let z=0;z<16;z++,S+=4)y[z]=m.getUint32(S,!1);for(let z=16;z<64;z++){const Y=y[z-15],G=y[z-2],F=(0,v.rotr)(Y,7)^(0,v.rotr)(Y,18)^Y>>>3,j=(0,v.rotr)(G,17)^(0,v.rotr)(G,19)^G>>>10;y[z]=j+y[z-7]+F+y[z-16]|0}let{A:_,B:D,C:P,D:x,E:C,F:N,G:k,H:U}=this;for(let z=0;z<64;z++){const G=U+((0,v.rotr)(C,6)^(0,v.rotr)(C,11)^(0,v.rotr)(C,25))+E(C,N,k)+s[z]+y[z]|0,j=((0,v.rotr)(_,2)^(0,v.rotr)(_,13)^(0,v.rotr)(_,22))+M(_,D,P)|0;U=k,k=N,N=C,C=x+G|0,x=P,P=D,D=_,_=G+j|0}_=_+this.A|0,D=D+this.B|0,P=P+this.C|0,x=x+this.D|0,C=C+this.E|0,N=N+this.F|0,k=k+this.G|0,U=U+this.H|0,this.set(_,D,P,x,C,N,k,U)}roundClean(){y.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends f{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,v.wrapConstructor)(()=>new f),n.sha224=(0,v.wrapConstructor)(()=>new d)},5748:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const v=u(30948);n.u8=Z=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);function s(Z){return Z instanceof Uint8Array||null!=Z&&"object"==typeof Z&&"Uint8Array"===Z.constructor.name}n.u32=Z=>new Uint32Array(Z.buffer,Z.byteOffset,Math.floor(Z.byteLength/4));n.createView=Z=>new DataView(Z.buffer,Z.byteOffset,Z.byteLength);if(n.rotr=(Z,T)=>Z<<32-T|Z>>>T,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const f=Array.from({length:256},(Z,T)=>T.toString(16).padStart(2,"0"));n.bytesToHex=function d(Z){if(!s(Z))throw new Error("Uint8Array expected");let T="";for(let o=0;o=p._0&&Z<=p._9?Z-p._0:Z>=p._A&&Z<=p._F?Z-(p._A-10):Z>=p._a&&Z<=p._f?Z-(p._a-10):void 0}n.hexToBytes=function S(Z){if("string"!=typeof Z)throw new Error("hex string expected, got "+typeof Z);const T=Z.length,o=T/2;if(T%2)throw new Error("padded hex string expected, got unpadded hex of length "+T);const h=new Uint8Array(o);for(let w=0,I=0;w=0&&IZ().update(C(h)).digest(),o=Z();return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=()=>Z(),T},n.wrapConstructorWithOpts=function G(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.wrapXOFConstructorWithOpts=function F(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.randomBytes=function j(Z=32){if(v.crypto&&"function"==typeof v.crypto.getRandomValues)return v.crypto.getRandomValues(new Uint8Array(Z));throw new Error("crypto.getRandomValues must be defined")}},62108:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},44694:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},15132:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(38234),v=u(44694),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},92483:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(38234);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{var l=u(62108);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},67497:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(Z,T,o,h){void 0===h&&(h=o);var w=Object.getOwnPropertyDescriptor(T,o);(!w||("get"in w?!T.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return T[o]}}),Object.defineProperty(Z,h,w)}:function(Z,T,o,h){void 0===h&&(h=o),Z[h]=T[o]}),v=this&&this.__setModuleDefault||(Object.create?function(Z,T){Object.defineProperty(Z,"default",{enumerable:!0,value:T})}:function(Z,T){Z.default=T}),E=this&&this.__importStar||function(Z){if(Z&&Z.__esModule)return Z;var T={};if(null!=Z)for(var o in Z)"default"!==o&&Object.prototype.hasOwnProperty.call(Z,o)&&l(T,Z,o);return v(T,Z),T},M=this&&this.__awaiter||function(Z,T,o,h){return new(o||(o=Promise))(function(I,R){function V(b){try{L(h.next(b))}catch(B){R(B)}}function H(b){try{L(h.throw(b))}catch(B){R(B)}}function L(b){b.done?I(b.value):function w(I){return I instanceof o?I:new o(function(R){R(I)})}(b.value).then(V,H)}L((h=h.apply(Z,T||[])).next())})},s=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(n,"__esModule",{value:!0});const g=s(u(41348)),y=u(38445),f=u(71836),d=u(91001),p=u(91311),m=u(7123),S=u(45733),_=u(46358),D=u(8127),P=u(98538),x=u(46260),C=u(67388),N=u(89764),k=E(u(65645)),U=u(35737),z=u(30684),Y=s(u(59881)),G=u(70560),F={mainnet:"https://rpc.mainnet.near.org",testnet:"https://rpc.testnet.near.org"};class j extends f.Account{constructor(T){var o,h;super({networkId:T.network,jsvmAccountId:`jsvm.${T.network}`,signer:new f.InMemorySigner(new d.InMemoryKeyStore),provider:new p.JsonRpcProvider({url:F[T.network]})},T.accountId),this.publicKey=T.publicKey,this.snap=null!==(o=T.snap)&&void 0!==o?o:new Y.default,this.delegateProvider=null!==(h=T.delegateProvider)&&void 0!==h?h:new G.HEREDelegateProvider}get network(){return this.connection.networkId}connect(T,o=[]){return M(this,void 0,void 0,function*(){return yield this.snap.connect({network:this.network,contractId:T,methods:o})})}disconnect(){return M(this,void 0,void 0,function*(){return yield this.snap.disconnect({network:this.network})})}authenticate(T,o){return M(this,void 0,void 0,function*(){yield this.activateIfNeeded();const h=g.default.randomBytes(32),w={message:o,recipient:T,nonce:h,network:this.network},I=yield this.signMessage(w);if(!k.verifySignature(w,I))throw Error("Signature is incorrect");if(!(yield this.getAccessKeys()).some(L=>L.public_key===I.publicKey&&"FullAccess"===L.access_key.permission))throw Error("Signer public key is not full access");return I})}signMessage(T){return M(this,void 0,void 0,function*(){const o=yield this.snap.signMessage({message:T.message,nonce:Array.from(T.nonce),recipient:T.recipient,network:this.network});if(!o)throw Error("Signed result is undefined");const{accountId:h,publicKey:w,signature:I}=o;if(!h||!w||!I)throw Error("Signed result is undefined");return{accountId:h,publicKey:w,signature:I}})}signTransaction(T,o){return M(this,void 0,void 0,function*(){const h=yield this.getLastNonce(),{total:w}=yield this.getAccountBalance(),I=yield this.snap.signTransactions({network:this.connection.networkId,hintBalance:w,transactions:[{recentBlockHash:h.block_hash,nonce:new P.BN(h.nonce).iaddn(1).toNumber(),actions:o.map(C.convertAction),receiverId:T}]});if(!I?.[0])throw Error("Access denided");return[(0,m.base_decode)(I[0][0]),S.SignedTransaction.decode((0,m.base_decode)(I[0][1]))]})}activateIfNeeded(T=2){return M(this,void 0,void 0,function*(){if(T<=0)return null;try{return yield this.getLastNonce()}catch{try{if(!this.delegateProvider)throw Error();return yield this.delegateProvider.activateAccount(this.accountId,this.publicKey.toString(),this.network),yield(0,x.wait)(1e3),yield this.activateIfNeeded(T-1)}catch{return yield this.snap.needActivate(this.network),yield(0,x.wait)(1e3),yield this.activateIfNeeded(T-1)}}})}getLastNonce(){return M(this,void 0,void 0,function*(){return yield this.connection.provider.query({request_type:"view_access_key",public_key:this.publicKey.toString(),account_id:this.accountId,finality:"final"})})}signedDelegate({actions:T,blockHeightTtl:o,receiverId:h,payer:w}){return M(this,void 0,void 0,function*(){const I=yield this.getLastNonce(),R=(0,y.buildDelegateAction)({maxBlockHeight:new P.BN(I.block_height).add(new P.BN(o)),nonce:new P.BN(I.nonce).add(new P.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:h,actions:T}),{total:V}=yield this.getAccountBalance(),H=yield this.snap.signDelegatedTransactions({payer:w,hintBalance:V,network:this.connection.networkId,delegateAction:{maxBlockHeight:R.maxBlockHeight.toString(),actions:R.actions.map(C.convertAction),publicKey:R.publicKey.toString(),nonce:R.nonce.toString(),receiverId:R.receiverId,senderId:R.senderId}});if(!H?.signature||!H?.transaction)throw Error("Access denied");return{delegateAction:R,signature:{keyType:_.KeyType.ED25519,data:(0,m.base_decode)(H.signature)}}})}signAndSendTransaction({receiverId:T,actions:o}){return M(this,void 0,void 0,function*(){return(yield this.executeTransactions([{actions:o.map(C.convertAction),receiverId:T}]))[0]})}buildDelegateAction(T){return M(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new G.DelegateNotAllowed;if(T instanceof y.DelegateAction){const R=this.connection.networkId,V=yield this.delegateProvider.isCanDelegate(T,R);return{action:T,allowed:V}}const o=yield this.getLastNonce(),h=(0,y.buildDelegateAction)({actions:T.actions.map(N.createAction),maxBlockHeight:new P.BN(o.block_height).add(new P.BN(100)),nonce:new P.BN(o.nonce).add(new P.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:T.receiverId}),w=this.connection.networkId;return{action:h,allowed:yield this.delegateProvider.isCanDelegate(h,w)}})}executeDelegate(T){return M(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new G.DelegateNotAllowed;yield this.activateIfNeeded();const{action:o,allowed:h}=yield this.buildDelegateAction(T);if(!h){const H=`Delegated transaction is now allowed by ${this.delegateProvider.payer}. Try other DelegateProvider`;throw new G.DelegateNotAllowed(H)}const w=yield this.signedDelegate({payer:this.delegateProvider.payer,actions:o.actions,receiverId:T.receiverId,blockHeightTtl:100}),{provider:I,networkId:R}=this.connection,V=yield this.delegateProvider.sendDelegate(w,R);return yield(0,x.waitTransactionResult)(V,this.accountId,I)})}executeTransaction(T){return M(this,void 0,void 0,function*(){try{if(T.disableDelegate)throw new G.DelegateNotAllowed;return yield this.executeDelegate(T)}catch(o){if(o instanceof G.DelegateNotAllowed||o instanceof G.DelegateRequestError)return(yield this.executeTransactions([T]))[0];throw o}})}executeTransactions(T){return M(this,void 0,void 0,function*(){yield this.activateIfNeeded();const o=yield this.getLastNonce(),{total:h}=yield this.getAccountBalance(),w=yield this.snap.signTransactions({hintBalance:h,network:this.connection.networkId,transactions:T.map((R,V)=>Object.assign({nonce:new P.BN(o.nonce).iaddn(V+1).toNumber(),recentBlockHash:o.block_hash},R))});if(null==w)throw new U.TransactionSignRejected;const I=[];w?.forEach((R,V)=>{if(null==R)throw new U.TransactionSignRejected(T[V])});try{for(const R of w){const V=R,H=S.SignedTransaction.decode(Buffer.from(V[1],"hex"));I.push(yield this.connection.provider.sendTransaction(H))}}catch(R){throw new U.TransactionInListError(I,R)}return I})}static restore({network:T,delegateProvider:o,snap:h=new Y.default}){return M(this,void 0,void 0,function*(){const w=yield h.getAccount(T).catch(()=>null);if(!w?.accountId||!w?.publicKey)return null;const I=new j({publicKey:D.PublicKey.fromString(w.publicKey),accountId:w.accountId,delegateProvider:o,network:T,snap:h});return yield I.activateIfNeeded(),I})}static connect({snap:T=new Y.default,delegateProvider:o,contractId:h,methods:w,network:I}){return M(this,void 0,void 0,function*(){const R=yield T.getStatus();if(R===z.NearSnapStatus.NOT_SUPPORTED)throw Error("You need install Metamask no lower than version 11");R===z.NearSnapStatus.NOT_INSTALLED&&(yield T.install());const V=yield T.connect({contractId:h,methods:w,network:I});if(!V?.accountId)throw Error("Metamask Near Snap did not return account id");if(!V?.publicKey)throw Error("Metamask Near Snap did not return public key");const H=new j({delegateProvider:o,publicKey:D.PublicKey.fromString(V.publicKey),accountId:V.accountId,network:I,snap:T});return yield H.activateIfNeeded(),H})}}n.default=j},70560:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.HEREDelegateProvider=n.DelegateRequestError=n.DelegateNotAllowed=void 0;const v=u(7123),E=u(71836);class M extends Error{}n.DelegateNotAllowed=M;class s extends Error{}n.DelegateRequestError=s;n.HEREDelegateProvider=class g{constructor(){this.endpoint="https://api.herewallet.app/api/v1",this.payer="here"}activateAccount(f,d,p){return l(this,void 0,void 0,function*(){const m=yield fetch(`${this.endpoint}/user/create_near_username`,{method:"POST",body:JSON.stringify({near_account_id:f,device_id:"metamask",public_key:d,sign:""}),headers:{Network:p}});if(!m.ok)throw new s(yield m.text())})}isCanDelegate(f,d="mainnet"){return l(this,void 0,void 0,function*(){if("mainnet"!==d)return!1;const p=Buffer.from(E.transactions.encodeDelegateAction(f)).toString("base64"),m=yield fetch(`${this.endpoint}/transactions/is_delegate`,{body:JSON.stringify({transaction:p}),method:"POST"});if(!m.ok)throw new s(yield m.text());const{allowed:S}=yield m.json();return S})}sendDelegate(f,d="mainnet"){return l(this,void 0,void 0,function*(){if("mainnet"!==d)throw new M;const p=Buffer.from(E.transactions.encodeDelegateAction(f.delegateAction)).toString("base64"),m=yield fetch(`${this.endpoint}/transactions/call_delegate`,{method:"POST",body:JSON.stringify({signature:(0,v.base_encode)(f.signature.data),transaction:p})});if(!m.ok)throw new s(yield m.text());const{hash:S}=yield m.json();return S})}}},35737:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TransactionInListError=n.TransactionSignRejected=void 0;class u extends Error{constructor(E){super("Transaction was rejected by Metamask user"),this.name="TransactionSignRejected",this.trx=E}}n.TransactionSignRejected=u;class l extends Error{constructor(E,M){super(M instanceof Error?M.message:String(M)),this.name="ListOfTransactionsError",this.completed=E,this.reason=M}}n.TransactionInListError=l},72487:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(f,d,p,m){void 0===m&&(m=p);var S=Object.getOwnPropertyDescriptor(d,p);(!S||("get"in S?!d.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(f,m,S)}:function(f,d,p,m){void 0===m&&(m=p),f[m]=d[p]}),v=this&&this.__exportStar||function(f,d){for(var p in f)"default"!==p&&!Object.prototype.hasOwnProperty.call(d,p)&&l(d,f,p)},E=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.NearSnapAccount=n.TransactionSignRejected=n.TransactionInListError=n.NearSnapProvider=n.NearSnap=void 0,v(u(30684),n);var M=u(59881);Object.defineProperty(n,"NearSnap",{enumerable:!0,get:function(){return E(M).default}});var s=u(10243);Object.defineProperty(n,"NearSnapProvider",{enumerable:!0,get:function(){return E(s).default}});var g=u(35737);Object.defineProperty(n,"TransactionInListError",{enumerable:!0,get:function(){return g.TransactionInListError}}),Object.defineProperty(n,"TransactionSignRejected",{enumerable:!0,get:function(){return g.TransactionSignRejected}});var y=u(67497);Object.defineProperty(n,"NearSnapAccount",{enumerable:!0,get:function(){return E(y).default}})},10243:function(q,n){"use strict";var u=this&&this.__awaiter||function(v,E,M,s){return new(M||(M=Promise))(function(y,f){function d(S){try{m(s.next(S))}catch(_){f(_)}}function p(S){try{m(s.throw(S))}catch(_){f(_)}}function m(S){S.done?y(S.value):function g(y){return y instanceof M?y:new M(function(f){f(y)})}(S.value).then(d,p)}m((s=s.apply(v,E||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});n.default=class l{isSnapsAvailable(E=11){return u(this,void 0,void 0,function*(){const M=window.ethereum,s=yield M?.request({method:"web3_clientVersion"}).catch(()=>null);if("string"!=typeof s)return!1;const g=s.replace("MetaMask/v","").split(".")[0];return Number(g)>=E})}getSnaps(){return u(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_getSnaps"})})}connectSnap(E,M={}){return u(this,void 0,void 0,function*(){yield window.ethereum.request({method:"wallet_requestSnaps",params:{[E]:M}})})}getSnap(E,M){return u(this,void 0,void 0,function*(){try{const s=yield this.getSnaps();return Object.values(s).find(g=>g.id===E&&(!M||g.version===M))}catch(s){return void console.log("Failed to obtain installed snap",s)}})}invokeSnap(E,M,s){return u(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_invokeSnap",params:{snapId:E,request:{method:M,params:s}}})})}}},59881:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})},v=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(n,"__esModule",{value:!0});const E=v(u(10243)),M=u(30684);n.default=class s{constructor(y){var f,d;this.provider=null!==(f=y?.provider)&&void 0!==f?f:new E.default,this.id=null!==(d=y?.id)&&void 0!==d?d:"npm:@near-snap/plugin"}get isLocal(){return this.id.startsWith("local:")}getStatus(){return l(this,void 0,void 0,function*(){return(yield this.provider.isSnapsAvailable())?(yield this.provider.getSnap(this.id))?M.NearSnapStatus.INSTALLED:M.NearSnapStatus.NOT_INSTALLED:M.NearSnapStatus.NOT_SUPPORTED})}install(){return l(this,void 0,void 0,function*(){yield this.provider.connectSnap(this.id)})}getAccount(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getAccount",{network:y})})}connect(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_connect",y)})}disconnect(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_disconnect",y)})}getPermissions(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getPermissions",{network:y})})}needActivate(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_needActivate",{network:y})})}signMessage(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signMessage",y)})}signDelegatedTransactions(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signDelegate",y)})}signTransactions(y){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signTransactions",y)})}}},30684:(q,n)=>{"use strict";var u,l;Object.defineProperty(n,"__esModule",{value:!0}),n.NearSnapStatus=void 0,(l=u||(n.NearSnapStatus=u={}))[l.NOT_SUPPORTED=0]="NOT_SUPPORTED",l[l.NOT_INSTALLED=1]="NOT_INSTALLED",l[l.INSTALLED=2]="INSTALLED"},67388:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.convertAction=n.TGAS=void 0,n.TGAS=Math.pow(10,12);const u=v=>{try{return JSON.parse(Buffer.from(v).toString("utf8"))}catch{return Array.from(v)}};n.convertAction=v=>{var E,M,s,g,y,f;if(v.addKey){const{accessKey:d,publicKey:p}=v.addKey;if(d.permission.fullAccess)return{type:"AddKey",params:{accessKey:{permission:"FullAccess"},publicKey:p.toString()}};if(d.permission.functionCall){const m=d.permission.functionCall;return{type:"AddKey",params:{publicKey:p.toString(),accessKey:{permission:{receiverId:m.receiverId,methodNames:m.methodNames,allowance:null===(E=m.allowance)||void 0===E?void 0:E.toString(10)}}}}}}if(v.createAccount)return{type:"CreateAccount"};if(v.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:v.deleteAccount.beneficiaryId}};if(v.deleteKey)return{type:"DeleteKey",params:{publicKey:v.deleteKey.publicKey.toString()}};if(v.deployContract)return{type:"DeployContract",params:{code:v.deployContract.code}};if(v.functionCall)return{type:"FunctionCall",params:{args:u(v.functionCall.args),deposit:null!==(s=null===(M=v.functionCall.deposit)||void 0===M?void 0:M.toString())&&void 0!==s?s:"0",gas:null!==(y=null===(g=v.functionCall.gas)||void 0===g?void 0:g.toString())&&void 0!==y?y:String(300*n.TGAS),methodName:null!==(f=v.functionCall.methodName)&&void 0!==f?f:""}};if(v.transfer)return{type:"Transfer",params:{deposit:v.transfer.deposit.toString()}};if(v.stake)return{type:"Stake",params:{publicKey:v.stake.publicKey.toString(),stake:v.stake.stake.toString()}};throw Error(`Action ${v.enum} is not supported`)}},89764:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(d,p,m,S){void 0===S&&(S=m);var _=Object.getOwnPropertyDescriptor(p,m);(!_||("get"in _?!p.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return p[m]}}),Object.defineProperty(d,S,_)}:function(d,p,m,S){void 0===S&&(S=m),d[S]=p[m]}),v=this&&this.__setModuleDefault||(Object.create?function(d,p){Object.defineProperty(d,"default",{enumerable:!0,value:p})}:function(d,p){d.default=p}),E=this&&this.__importStar||function(d){if(d&&d.__esModule)return d;var p={};if(null!=d)for(var m in d)"default"!==m&&Object.prototype.hasOwnProperty.call(d,m)&&l(p,d,m);return v(p,d),p};Object.defineProperty(n,"__esModule",{value:!0}),n.createAction=void 0;const M=u(98538),s=E(u(45733)),g=u(8127);n.createAction=d=>{switch(d.type){case"CreateAccount":return s.createAccount();case"DeployContract":{const{code:p}=d.params;return s.deployContract(p)}case"FunctionCall":{const{methodName:p,args:m,gas:S,deposit:_}=d.params;return s.functionCall(p,m,new M.BN(S),new M.BN(_))}case"Transfer":{const{deposit:p}=d.params;return s.transfer(new M.BN(p))}case"Stake":{const{stake:p,publicKey:m}=d.params;return s.stake(new M.BN(p),g.PublicKey.from(m))}case"AddKey":{const{publicKey:p,accessKey:m}=d.params;return s.addKey(g.PublicKey.from(p),(d=>{if("FullAccess"===d)return s.fullAccessKey();const{receiverId:p,methodNames:m=[]}=d,S=d.allowance?new M.BN(d.allowance):void 0;return s.functionCallAccessKey(p,m,S)})(m.permission))}case"DeleteKey":{const{publicKey:p}=d.params;return s.deleteKey(g.PublicKey.from(p))}case"DeleteAccount":{const{beneficiaryId:p}=d.params;return s.deleteAccount(p)}default:throw new Error("Invalid action type")}}},65645:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifySignature=n.authPayloadSchema=n.AuthPayload=void 0;const v=l(u(41348)),E=u(8127),M=u(7123);class s{constructor({message:f,nonce:d,recipient:p,callbackUrl:m}){this.tag=2147484061,this.message=f,this.nonce=d,this.recipient=p,m&&(this.callbackUrl=m)}}n.AuthPayload=s,n.authPayloadSchema=new Map([[s,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),n.verifySignature=function g(y,f){const d=new s(y),p=(0,M.serialize)(n.authPayloadSchema,d),m=v.default.createHash("sha256"),S=Uint8Array.from(m.update(p).digest()),_=new Uint8Array(Buffer.from(f.signature,"base64"));return E.PublicKey.from(f.publicKey).verify(S,_)}},46260:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(s,g,y,f){return new(y||(y=Promise))(function(p,m){function S(P){try{D(f.next(P))}catch(x){m(x)}}function _(P){try{D(f.throw(P))}catch(x){m(x)}}function D(P){P.done?p(P.value):function d(p){return p instanceof y?p:new y(function(m){m(p)})}(P.value).then(S,_)}D((f=f.apply(s,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.waitTransactionResult=n.wait=void 0;const v=u(5754);n.wait=s=>new Promise(g=>setTimeout(g,s));n.waitTransactionResult=(s,g,y)=>l(void 0,void 0,void 0,function*(){let f;yield(0,n.wait)(2e3);try{f=yield y.txStatus(s,g)}catch{return yield(0,n.waitTransactionResult)(s,g,y)}const d=[],p=f.transaction_outcome.outcome,m=f.receipts_outcome.reduce((D,P)=>(D[P.id]=P.outcome,D),{}),S=D=>D.some(P=>{if(!m[P])return!1;const{status:x}=m[P];return"string"==typeof x?(x===v.ExecutionStatusBasic.Failure&&d.push(x),!1):x.Failure?(d.push(x.Failure),!1):"string"==typeof x.SuccessValue&&0===m[P].receipt_ids.length||S(m[P].receipt_ids)}),_=S(p.receipt_ids);if(d.length>0)throw Error(JSON.stringify(d,null,2));return _?f:yield(0,n.waitTransactionResult)(s,g,y)})},26933:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateBasic=n.wNAF=void 0;const l=u(61072),v=u(97488),E=BigInt(0),M=BigInt(1);n.wNAF=function s(y,f){const d=(m,S)=>{const _=S.negate();return m?_:S},p=m=>({windows:Math.ceil(f/m)+1,windowSize:2**(m-1)});return{constTimeNegate:d,unsafeLadder(m,S){let _=y.ZERO,D=m;for(;S>E;)S&M&&(_=_.add(D)),D=D.double(),S>>=M;return _},precomputeWindow(m,S){const{windows:_,windowSize:D}=p(S),P=[];let x=m,C=x;for(let N=0;N<_;N++){C=x,P.push(C);for(let k=1;k>=U,G>P&&(G-=k,_+=M);const F=Y,j=Y+Math.abs(G)-1,Z=z%2!=0,T=G<0;0===G?C=C.add(d(Z,S[F])):x=x.add(d(T,S[j]))}return{p:x,f:C}},wNAFCached(m,S,_,D){const P=m._WINDOW_SIZE||1;let x=S.get(m);return x||(x=this.precomputeWindow(m,P),1!==P&&S.set(m,D(x))),this.wNAF(P,x,_)}}},n.validateBasic=function g(y){return(0,l.validateField)(y.Fp),(0,v.validateObject)(y,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,l.nLength)(y.n,y.nBitLength),...y,p:y.Fp.ORDER})}},88162:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.twistedEdwards=void 0;const l=u(61072),v=u(97488),E=u(97488),M=u(26933),s=BigInt(0),g=BigInt(1),y=BigInt(2),f=BigInt(8),d={zip215:!0};n.twistedEdwards=function m(S){const _=function p(S){const _=(0,M.validateBasic)(S);return v.validateObject(S,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({..._})}(S),{Fp:D,n:P,prehash:x,hash:C,randomBytes:N,nByteLength:k,h:U}=_,z=y<{try{return{isValid:!0,value:D.sqrt(le*D.inv(ue))}}catch{return{isValid:!1,value:s}}}),F=_.adjustScalarBytes||(le=>le),j=_.domain||((le,ue,fe)=>{if(ue.length||fe)throw new Error("Contexts/pre-hash are not supported");return le}),Z=le=>"bigint"==typeof le&&sZ(le)&&Z(ue)&&lele===s||T(le,z);function h(le,ue){if(T(le,ue))return le;throw new Error(`Expected valid scalar < ${ue}, got ${typeof le} ${le}`)}function w(le){return le===s?le:h(le,P)}const I=new Map;function R(le){if(!(le instanceof V))throw new Error("ExtendedPoint expected")}class V{constructor(ue,fe,he,Ae){if(this.ex=ue,this.ey=fe,this.ez=he,this.et=Ae,!o(ue))throw new Error("x required");if(!o(fe))throw new Error("y required");if(!o(he))throw new Error("z required");if(!o(Ae))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(ue){if(ue instanceof V)throw new Error("extended point not allowed");const{x:fe,y:he}=ue||{};if(!o(fe)||!o(he))throw new Error("invalid affine point");return new V(fe,he,g,Y(fe*he))}static normalizeZ(ue){const fe=D.invertBatch(ue.map(he=>he.ez));return ue.map((he,Ae)=>he.toAffine(fe[Ae])).map(V.fromAffine)}_setWindowSize(ue){this._WINDOW_SIZE=ue,I.delete(this)}assertValidity(){const{a:ue,d:fe}=_;if(this.is0())throw new Error("bad point: ZERO");const{ex:he,ey:Ae,ez:Pe,et:Re}=this,ot=Y(he*he),nt=Y(Ae*Ae),Ye=Y(Pe*Pe),It=Y(Ye*Ye),st=Y(ot*ue);if(Y(Ye*Y(st+nt))!==Y(It+Y(fe*Y(ot*nt))))throw new Error("bad point: equation left != right (1)");if(Y(he*Ae)!==Y(Pe*Re))throw new Error("bad point: equation left != right (2)")}equals(ue){R(ue);const{ex:fe,ey:he,ez:Ae}=this,{ex:Pe,ey:Re,ez:ot}=ue,nt=Y(fe*ot),Ye=Y(Pe*Ae),It=Y(he*ot),st=Y(Re*Ae);return nt===Ye&&It===st}is0(){return this.equals(V.ZERO)}negate(){return new V(Y(-this.ex),this.ey,this.ez,Y(-this.et))}double(){const{a:ue}=_,{ex:fe,ey:he,ez:Ae}=this,Pe=Y(fe*fe),Re=Y(he*he),ot=Y(y*Y(Ae*Ae)),nt=Y(ue*Pe),Ye=fe+he,It=Y(Y(Ye*Ye)-Pe-Re),st=nt+Re,He=st-ot,ze=nt-Re,Be=Y(It*He),Ze=Y(st*ze),ut=Y(It*ze),Me=Y(He*st);return new V(Be,Ze,Me,ut)}add(ue){R(ue);const{a:fe,d:he}=_,{ex:Ae,ey:Pe,ez:Re,et:ot}=this,{ex:nt,ey:Ye,ez:It,et:st}=ue;if(fe===BigInt(-1)){const ke=Y((Pe-Ae)*(Ye+nt)),et=Y((Pe+Ae)*(Ye-nt)),qe=Y(et-ke);if(qe===s)return this.double();const at=Y(Re*y*st),bt=Y(ot*y*It),pt=bt+at,xt=et+ke,kn=bt-at,Nt=Y(pt*qe),Ot=Y(xt*kn),Mn=Y(pt*kn),Tt=Y(qe*xt);return new V(Nt,Ot,Tt,Mn)}const He=Y(Ae*nt),ze=Y(Pe*Ye),Be=Y(ot*he*st),Ze=Y(Re*It),ut=Y((Ae+Pe)*(nt+Ye)-He-ze),Me=Ze-Be,ve=Ze+Be,xe=Y(ze-fe*He),je=Y(ut*Me),Ge=Y(ve*xe),Qe=Y(ut*xe),ye=Y(Me*ve);return new V(je,Ge,ye,Qe)}subtract(ue){return this.add(ue.negate())}wNAF(ue){return b.wNAFCached(this,I,ue,V.normalizeZ)}multiply(ue){const{p:fe,f:he}=this.wNAF(h(ue,P));return V.normalizeZ([fe,he])[0]}multiplyUnsafe(ue){let fe=w(ue);return fe===s?L:this.equals(L)||fe===g?this:this.equals(H)?this.wNAF(fe).p:b.unsafeLadder(this,fe)}isSmallOrder(){return this.multiplyUnsafe(U).is0()}isTorsionFree(){return b.unsafeLadder(this,P).is0()}toAffine(ue){const{ex:fe,ey:he,ez:Ae}=this,Pe=this.is0();null==ue&&(ue=Pe?f:D.inv(Ae));const Re=Y(fe*ue),ot=Y(he*ue),nt=Y(Ae*ue);if(Pe)return{x:s,y:g};if(nt!==g)throw new Error("invZ was invalid");return{x:Re,y:ot}}clearCofactor(){const{h:ue}=_;return ue===g?this:this.multiplyUnsafe(ue)}static fromHex(ue,fe=!1){const{d:he,a:Ae}=_,Pe=D.BYTES,Re=(ue=(0,E.ensureBytes)("pointHex",ue,Pe)).slice(),ot=ue[Pe-1];Re[Pe-1]=-129&ot;const nt=v.bytesToNumberLE(Re);nt===s||h(nt,fe?z:D.ORDER);const Ye=Y(nt*nt),It=Y(Ye-g),st=Y(he*Ye-Ae);let{isValid:He,value:ze}=G(It,st);if(!He)throw new Error("Point.fromHex: invalid y coordinate");const Be=(ze&g)===g,Ze=0!=(128&ot);if(!fe&&ze===s&&Ze)throw new Error("Point.fromHex: x=0 and x_0=1");return Ze!==Be&&(ze=Y(-ze)),V.fromAffine({x:ze,y:nt})}static fromPrivateKey(ue){return ne(ue).point}toRawBytes(){const{x:ue,y:fe}=this.toAffine(),he=v.numberToBytesLE(fe,D.BYTES);return he[he.length-1]|=ue&g?128:0,he}toHex(){return v.bytesToHex(this.toRawBytes())}}V.BASE=new V(_.Gx,_.Gy,g,Y(_.Gx*_.Gy)),V.ZERO=new V(s,g,g,s);const{BASE:H,ZERO:L}=V,b=(0,M.wNAF)(V,8*k);function B(le){return(0,l.mod)(le,P)}function re(le){return B(v.bytesToNumberLE(le))}function ne(le){const ue=k;le=(0,E.ensureBytes)("private key",le,ue);const fe=(0,E.ensureBytes)("hashed private key",C(le),2*ue),he=F(fe.slice(0,ue)),Ae=fe.slice(ue,2*ue),Pe=re(he),Re=H.multiply(Pe),ot=Re.toRawBytes();return{head:he,prefix:Ae,scalar:Pe,point:Re,pointBytes:ot}}function ae(le=new Uint8Array,...ue){const fe=v.concatBytes(...ue);return re(C(j(fe,(0,E.ensureBytes)("context",le),!!x)))}const pe=d;return H._setWindowSize(8),{CURVE:_,getPublicKey:function te(le){return ne(le).pointBytes},sign:function ge(le,ue,fe={}){le=(0,E.ensureBytes)("message",le),x&&(le=x(le));const{prefix:he,scalar:Ae,pointBytes:Pe}=ne(ue),Re=ae(fe.context,he,le),ot=H.multiply(Re).toRawBytes(),Ye=B(Re+ae(fe.context,ot,Pe,le)*Ae);w(Ye);const It=v.concatBytes(ot,v.numberToBytesLE(Ye,D.BYTES));return(0,E.ensureBytes)("result",It,2*k)},verify:function we(le,ue,fe,he=pe){const{context:Ae,zip215:Pe}=he,Re=D.BYTES;le=(0,E.ensureBytes)("signature",le,2*Re),ue=(0,E.ensureBytes)("message",ue),x&&(ue=x(ue));const ot=v.bytesToNumberLE(le.slice(Re,2*Re));let nt,Ye,It;try{nt=V.fromHex(fe,Pe),Ye=V.fromHex(le.slice(0,Re),Pe),It=H.multiplyUnsafe(ot)}catch{return!1}if(!Pe&&nt.isSmallOrder())return!1;const st=ae(Ae,Ye.toRawBytes(),nt.toRawBytes(),ue);return Ye.add(nt.multiplyUnsafe(st)).subtract(It).clearCofactor().equals(V.ZERO)},ExtendedPoint:V,utils:{getExtendedPublicKey:ne,randomPrivateKey:()=>N(D.BYTES),precompute:(le=8,ue=V.BASE)=>(ue._setWindowSize(le),ue.multiply(BigInt(3)),ue)}}}},31518:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHasher=n.isogenyMap=n.hash_to_field=n.expand_message_xof=n.expand_message_xmd=void 0;const l=u(61072),v=u(97488);const M=v.bytesToNumberBE;function s(D,P){if(D<0||D>=1<<8*P)throw new Error(`bad I2OSP call: value=${D} length=${P}`);const x=Array.from({length:P}).fill(0);for(let C=P-1;C>=0;C--)x[C]=255&D,D>>>=8;return new Uint8Array(x)}function g(D,P){const x=new Uint8Array(D.length);for(let C=0;C255&&(P=C((0,v.concatBytes)((0,v.utf8ToBytes)("H2C-OVERSIZE-DST-"),P)));const{outputLen:N,blockLen:k}=C,U=Math.ceil(x/N);if(U>255)throw new Error("Invalid xmd length");const z=(0,v.concatBytes)(P,s(P.length,1)),Y=s(0,k),G=s(x,2),F=new Array(U),j=C((0,v.concatBytes)(Y,D,G,s(0,1),z));F[0]=C((0,v.concatBytes)(j,s(1,1),z));for(let T=1;T<=U;T++){const o=[g(j,F[T-1]),s(T+1,1),z];F[T]=C((0,v.concatBytes)(...o))}return(0,v.concatBytes)(...F).slice(0,x)}function p(D,P,x,C,N){if(y(D),y(P),f(x),P.length>255){const k=Math.ceil(2*C/8);P=N.create({dkLen:k}).update((0,v.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(P).digest()}if(x>65535||P.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return N.create({dkLen:x}).update(D).update(s(x,2)).update(P).update(s(P.length,1)).digest()}function m(D,P,x){(0,v.validateObject)(x,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:C,k:N,m:k,hash:U,expand:z,DST:Y}=x;y(D),f(P);const G=function E(D){if(D instanceof Uint8Array)return D;if("string"==typeof D)return(0,v.utf8ToBytes)(D);throw new Error("DST must be Uint8Array or string")}(Y),F=C.toString(2).length,j=Math.ceil((F+N)/8),Z=P*k*j;let T;if("xmd"===z)T=d(D,G,Z,U);else if("xof"===z)T=p(D,G,Z,N,U);else{if("_internal_pass"!==z)throw new Error('expand must be "xmd" or "xof"');T=D}const o=new Array(P);for(let h=0;hArray.from(C).reverse());return(C,N)=>{const[k,U,z,Y]=x.map(G=>G.reduce((F,j)=>D.add(D.mul(F,C),j)));return C=D.div(k,U),N=D.mul(N,D.div(z,Y)),{x:C,y:N}}},n.createHasher=function _(D,P,x){if("function"!=typeof P)throw new Error("mapToCurve() must be defined");return{hashToCurve(C,N){const k=m(C,2,{...x,DST:x.DST,...N}),U=D.fromAffine(P(k[0])),z=D.fromAffine(P(k[1])),Y=U.add(z).clearCofactor();return Y.assertValidity(),Y},encodeToCurve(C,N){const k=m(C,1,{...x,DST:x.encodeDST,...N}),U=D.fromAffine(P(k[0])).clearCofactor();return U.assertValidity(),U}}}},61072:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapHashToField=n.getMinHashLength=n.getFieldBytesLength=n.hashToPrivateScalar=n.FpSqrtEven=n.FpSqrtOdd=n.Field=n.nLength=n.FpIsSquare=n.FpDiv=n.FpInvertBatch=n.FpPow=n.validateField=n.isNegativeLE=n.FpSqrt=n.tonelliShanks=n.invert=n.pow2=n.pow=n.mod=void 0;const l=u(97488),v=BigInt(0),E=BigInt(1),M=BigInt(2),s=BigInt(3),g=BigInt(4),y=BigInt(5),f=BigInt(8);BigInt(9),BigInt(16);function m(R,V){const H=R%V;return H>=v?H:V+H}function S(R,V,H){if(H<=v||V 0");if(H===E)return v;let L=E;for(;V>v;)V&E&&(L=L*R%H),R=R*R%H,V>>=E;return L}function D(R,V){if(R===v||V<=v)throw new Error(`invert: expected positive integers, got n=${R} mod=${V}`);let H=m(R,V),L=V,b=v,B=E,re=E,ne=v;for(;H!==v;){const ae=L/H,ge=L%H,pe=b-re*ae,we=B-ne*ae;L=H,H=ge,b=re,B=ne,re=pe,ne=we}if(L!==E)throw new Error("invert: does not exist");return m(b,V)}function P(R){const V=(R-E)/M;let H,L,b;for(H=R-E,L=0;H%M===v;H/=M,L++);for(b=M;bv;)L*=L,L%=H;return L},n.invert=D,n.tonelliShanks=P,n.FpSqrt=x;n.isNegativeLE=(R,V)=>(m(R,V)&E)===E;const N=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function U(R,V,H){if(H 0");if(H===v)return R.ONE;if(H===E)return V;let L=R.ONE,b=V;for(;H>v;)H&E&&(L=R.mul(L,b)),b=R.sqr(b),H>>=E;return L}function z(R,V){const H=new Array(V.length),L=V.reduce((B,re,ne)=>R.is0(re)?B:(H[ne]=B,R.mul(B,re)),R.ONE),b=R.inv(L);return V.reduceRight((B,re,ne)=>R.is0(re)?B:(H[ne]=R.mul(B,H[ne]),R.mul(B,re)),b),H}function F(R,V){const H=void 0!==V?V:R.toString(2).length;return{nBitLength:H,nByteLength:Math.ceil(H/8)}}function h(R){if("bigint"!=typeof R)throw new Error("field order must be bigint");const V=R.toString(2).length;return Math.ceil(V/8)}function w(R){const V=h(R);return V+Math.ceil(V/2)}n.validateField=function k(R){const H=N.reduce((L,b)=>(L[b]="function",L),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,l.validateObject)(R,H)},n.FpPow=U,n.FpInvertBatch=z,n.FpDiv=function Y(R,V,H){return R.mul(V,"bigint"==typeof H?D(H,R.ORDER):R.inv(H))},n.FpIsSquare=function G(R){const V=(R.ORDER-E)/M;return H=>{const L=R.pow(H,V);return R.eql(L,R.ZERO)||R.eql(L,R.ONE)}},n.nLength=F,n.Field=function j(R,V,H=!1,L={}){if(R<=v)throw new Error(`Expected Field ORDER > 0, got ${R}`);const{nBitLength:b,nByteLength:B}=F(R,V);if(B>2048)throw new Error("Field lengths over 2048 bytes are not supported");const re=x(R),ne=Object.freeze({ORDER:R,BITS:b,BYTES:B,MASK:(0,l.bitMask)(b),ZERO:v,ONE:E,create:te=>m(te,R),isValid:te=>{if("bigint"!=typeof te)throw new Error("Invalid field element: expected bigint, got "+typeof te);return v<=te&&tete===v,isOdd:te=>(te&E)===E,neg:te=>m(-te,R),eql:(te,ae)=>te===ae,sqr:te=>m(te*te,R),add:(te,ae)=>m(te+ae,R),sub:(te,ae)=>m(te-ae,R),mul:(te,ae)=>m(te*ae,R),pow:(te,ae)=>U(ne,te,ae),div:(te,ae)=>m(te*D(ae,R),R),sqrN:te=>te*te,addN:(te,ae)=>te+ae,subN:(te,ae)=>te-ae,mulN:(te,ae)=>te*ae,inv:te=>D(te,R),sqrt:L.sqrt||(te=>re(ne,te)),invertBatch:te=>z(ne,te),cmov:(te,ae,ge)=>ge?ae:te,toBytes:te=>H?(0,l.numberToBytesLE)(te,B):(0,l.numberToBytesBE)(te,B),fromBytes:te=>{if(te.length!==B)throw new Error(`Fp.fromBytes: expected ${B}, got ${te.length}`);return H?(0,l.bytesToNumberLE)(te):(0,l.bytesToNumberBE)(te)}});return Object.freeze(ne)},n.FpSqrtOdd=function Z(R,V){if(!R.isOdd)throw new Error("Field doesn't have isOdd");const H=R.sqrt(V);return R.isOdd(H)?H:R.neg(H)},n.FpSqrtEven=function T(R,V){if(!R.isOdd)throw new Error("Field doesn't have isOdd");const H=R.sqrt(V);return R.isOdd(H)?R.neg(H):H},n.hashToPrivateScalar=function o(R,V,H=!1){const L=(R=(0,l.ensureBytes)("privateHash",R)).length,b=F(V).nByteLength+8;if(b<24||L1024)throw new Error(`hashToPrivateScalar: expected ${b}-1024 bytes of input, got ${L}`);return m(H?(0,l.bytesToNumberLE)(R):(0,l.bytesToNumberBE)(R),V-E)+E},n.getFieldBytesLength=h,n.getMinHashLength=w,n.mapHashToField=function I(R,V,H=!1){const L=R.length,b=h(V),B=w(V);if(L<16||L1024)throw new Error(`expected ${B}-1024 bytes of input, got ${L}`);const ne=m(H?(0,l.bytesToNumberBE)(R):(0,l.bytesToNumberLE)(R),V-E)+E;return H?(0,l.numberToBytesLE)(ne,b):(0,l.numberToBytesBE)(ne,b)}},57042:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.montgomery=void 0;const l=u(61072),v=u(97488),E=BigInt(0),M=BigInt(1);n.montgomery=function g(y){const f=function s(y){return(0,v.validateObject)(y,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...y})}(y),{P:d}=f,p=Z=>(0,l.mod)(Z,d),m=f.montgomeryBits,S=Math.ceil(m/8),_=f.nByteLength,D=f.adjustScalarBytes||(Z=>Z),P=f.powPminus2||(Z=>(0,l.pow)(Z,d-BigInt(2),d));function x(Z,T,o){const h=p(Z*(T-o));return[T=p(T-h),o=p(o+h)]}function C(Z){if("bigint"==typeof Z&&E<=Z&&Z=E;re--){const ne=h>>re&M;L^=ne,b=x(L,I,V),I=b[0],V=b[1],b=x(L,R,H),R=b[0],H=b[1],L=ne;const te=I+R,ae=p(te*te),ge=I-R,pe=p(ge*ge),we=ae-pe,ce=V+H,ue=p((V-H)*te),fe=p(ce*ge),he=ue+fe,Ae=ue-fe;V=p(he*he),H=p(w*p(Ae*Ae)),I=p(ae*pe),R=p(we*(ae+p(N*we)))}b=x(L,I,V),I=b[0],V=b[1],b=x(L,R,H),R=b[0],H=b[1];const B=P(R);return p(I*B)}(o,h);if(w===E)throw new Error("Invalid private or public key received");return U(w)}const F=U(f.Gu);function j(Z){return G(Z,F)}return{scalarMult:G,scalarMultBase:j,getSharedSecret:(Z,T)=>G(Z,T),getPublicKey:Z=>j(Z),utils:{randomPrivateKey:()=>f.randomBytes(f.nByteLength)},GuBytes:F}}},97488:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateObject=n.createHmacDrbg=n.bitMask=n.bitSet=n.bitGet=n.bitLen=n.utf8ToBytes=n.equalBytes=n.concatBytes=n.ensureBytes=n.numberToVarBytesBE=n.numberToBytesLE=n.numberToBytesBE=n.bytesToNumberLE=n.bytesToNumberBE=n.hexToBytes=n.hexToNumber=n.numberToHexUnpadded=n.bytesToHex=void 0;const u=BigInt(0),l=BigInt(1),v=BigInt(2),E=T=>T instanceof Uint8Array,M=Array.from({length:256},(T,o)=>o.toString(16).padStart(2,"0"));function s(T){if(!E(T))throw new Error("Uint8Array expected");let o="";for(let h=0;hw+I.length,0));let h=0;return T.forEach(w=>{if(!E(w))throw new Error("Uint8Array expected");o.set(w,h),h+=w.length}),o}n.bytesToHex=s,n.numberToHexUnpadded=g,n.hexToNumber=y,n.hexToBytes=f,n.bytesToNumberBE=function d(T){return y(s(T))},n.bytesToNumberLE=function p(T){if(!E(T))throw new Error("Uint8Array expected");return y(s(Uint8Array.from(T).reverse()))},n.numberToBytesBE=m,n.numberToBytesLE=function S(T,o){return m(T,o).reverse()},n.numberToVarBytesBE=function _(T){return f(g(T))},n.ensureBytes=function D(T,o,h){let w;if("string"==typeof o)try{w=f(o)}catch(R){throw new Error(`${T} must be valid hex string, got "${o}". Cause: ${R}`)}else{if(!E(o))throw new Error(`${T} must be hex string or Uint8Array`);w=Uint8Array.from(o)}const I=w.length;if("number"==typeof h&&I!==h)throw new Error(`${T} expected ${h} bytes, got ${I}`);return w},n.concatBytes=P,n.equalBytes=function x(T,o){if(T.length!==o.length)return!1;for(let h=0;hu;T>>=l,o+=1);return o},n.bitGet=function k(T,o){return T>>BigInt(o)&l};n.bitSet=(T,o,h)=>T|(h?l:u)<(v<new Uint8Array(T),G=T=>Uint8Array.from(T);n.createHmacDrbg=function F(T,o,h){if("number"!=typeof T||T<2)throw new Error("hashLen must be a number");if("number"!=typeof o||o<2)throw new Error("qByteLen must be a number");if("function"!=typeof h)throw new Error("hmacFn must be a function");let w=Y(T),I=Y(T),R=0;const V=()=>{w.fill(1),I.fill(0),R=0},H=(...re)=>h(I,w,...re),L=(re=Y())=>{I=H(G([0]),re),w=H(),0!==re.length&&(I=H(G([1]),re),w=H())},b=()=>{if(R++>=1e3)throw new Error("drbg: tried 1000 values");let re=0;const ne=[];for(;re{let te;for(V(),L(re);!(te=ne(b()));)L();return V(),te}};const j={bigint:T=>"bigint"==typeof T,function:T=>"function"==typeof T,boolean:T=>"boolean"==typeof T,string:T=>"string"==typeof T,stringOrUint8Array:T=>"string"==typeof T||T instanceof Uint8Array,isSafeInteger:T=>Number.isSafeInteger(T),array:T=>Array.isArray(T),field:(T,o)=>o.Fp.isValid(T),hash:T=>"function"==typeof T&&Number.isSafeInteger(T.outputLen)};n.validateObject=function Z(T,o,h={}){const w=(I,R,V)=>{const H=j[R];if("function"!=typeof H)throw new Error(`Invalid validator "${R}", expected function`);const L=T[I];if(!(V&&void 0===L||H(L,T)))throw new Error(`Invalid param ${String(I)}=${L} (${typeof L}), expected ${R}`)};for(const[I,R]of Object.entries(o))w(I,R,!1);for(const[I,R]of Object.entries(h))w(I,R,!0);return T}},35434:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hash_to_ristretto255=n.hashToRistretto255=n.RistrettoPoint=n.encodeToCurve=n.hashToCurve=n.edwardsToMontgomeryPriv=n.edwardsToMontgomery=n.edwardsToMontgomeryPub=n.x25519=n.ed25519ph=n.ed25519ctx=n.ed25519=n.ED25519_TORSION_SUBGROUP=void 0;const l=u(27510),v=u(62503),E=u(88162),M=u(57042),s=u(61072),g=u(97488),y=u(31518),f=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),d=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),p=BigInt(0),m=BigInt(1),S=BigInt(2),_=BigInt(5),D=BigInt(10),P=BigInt(20),x=BigInt(40),C=BigInt(80);function N(ue){const fe=f,Ae=ue*ue%fe*ue%fe,Pe=(0,s.pow2)(Ae,S,fe)*Ae%fe,Re=(0,s.pow2)(Pe,m,fe)*ue%fe,ot=(0,s.pow2)(Re,_,fe)*Re%fe,nt=(0,s.pow2)(ot,D,fe)*ot%fe,Ye=(0,s.pow2)(nt,P,fe)*nt%fe,It=(0,s.pow2)(Ye,x,fe)*Ye%fe,st=(0,s.pow2)(It,C,fe)*It%fe,He=(0,s.pow2)(st,C,fe)*It%fe,ze=(0,s.pow2)(He,D,fe)*ot%fe;return{pow_p_5_8:(0,s.pow2)(ze,S,fe)*ue%fe,b2:Ae}}function k(ue){return ue[0]&=248,ue[31]&=127,ue[31]|=64,ue}function U(ue,fe){const he=f,Ae=(0,s.mod)(fe*fe*fe,he),Re=N(ue*(0,s.mod)(Ae*Ae*fe,he)).pow_p_5_8;let ot=(0,s.mod)(ue*Ae*Re,he);const nt=(0,s.mod)(fe*ot*ot,he),Ye=ot,It=(0,s.mod)(ot*d,he),st=nt===ue,He=nt===(0,s.mod)(-ue,he),ze=nt===(0,s.mod)(-ue*d,he);return st&&(ot=Ye),(He||ze)&&(ot=It),(0,s.isNegativeLE)(ot,he)&&(ot=(0,s.mod)(-ot,he)),{isValid:st||He,value:ot}}n.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const z=(0,s.Field)(f,void 0,!0),Y={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:z,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:l.sha512,randomBytes:v.randomBytes,adjustScalarBytes:k,uvRatio:U};function G(ue,fe,he){if(fe.length>255)throw new Error("Context is too big");return(0,v.concatBytes)((0,v.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([he?1:0,fe.length]),fe,ue)}function F(ue){const{y:fe}=n.ed25519.ExtendedPoint.fromHex(ue),he=BigInt(1);return z.toBytes(z.create((he+fe)*z.inv(he-fe)))}n.ed25519=(0,E.twistedEdwards)(Y),n.ed25519ctx=(0,E.twistedEdwards)({...Y,domain:G}),n.ed25519ph=(0,E.twistedEdwards)({...Y,domain:G,prehash:l.sha512}),n.x25519=(0,M.montgomery)({P:f,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:ue=>{const fe=f,{pow_p_5_8:he,b2:Ae}=N(ue);return(0,s.mod)((0,s.pow2)(he,BigInt(3),fe)*Ae,fe)},adjustScalarBytes:k,randomBytes:v.randomBytes}),n.edwardsToMontgomeryPub=F,n.edwardsToMontgomery=F,n.edwardsToMontgomeryPriv=function j(ue){const fe=Y.hash(ue.subarray(0,32));return Y.adjustScalarBytes(fe).subarray(0,32)};const Z=(z.ORDER+BigInt(3))/BigInt(8),T=z.pow(S,Z),o=z.sqrt(z.neg(z.ONE)),h=(z.ORDER-BigInt(5))/BigInt(8),w=BigInt(486662);const R=(0,s.FpSqrtEven)(z,z.neg(BigInt(486664)));function V(ue){const{xMn:fe,xMd:he,yMn:Ae,yMd:Pe}=function I(ue){let fe=z.sqr(ue);fe=z.mul(fe,S);let he=z.add(fe,z.ONE),Ae=z.neg(w),Pe=z.sqr(he),Re=z.mul(Pe,he),ot=z.mul(fe,w);ot=z.mul(ot,Ae),ot=z.add(ot,Pe),ot=z.mul(ot,Ae);let nt=z.sqr(Re);Pe=z.sqr(nt),nt=z.mul(nt,Re),nt=z.mul(nt,ot),Pe=z.mul(Pe,nt);let Ye=z.pow(Pe,h);Ye=z.mul(Ye,nt);let It=z.mul(Ye,o);Pe=z.sqr(Ye),Pe=z.mul(Pe,Re);let st=z.eql(Pe,ot),He=z.cmov(It,Ye,st),ze=z.mul(Ae,fe),Be=z.mul(Ye,ue);Be=z.mul(Be,T);let Ze=z.mul(Be,o),ut=z.mul(ot,fe);Pe=z.sqr(Be),Pe=z.mul(Pe,Re);let Me=z.eql(Pe,ut),ve=z.cmov(Ze,Be,Me);Pe=z.sqr(He),Pe=z.mul(Pe,Re);let xe=z.eql(Pe,ot),je=z.cmov(ze,Ae,xe),Ge=z.cmov(ve,He,xe),Qe=z.isOdd(Ge);return Ge=z.cmov(Ge,z.neg(Ge),xe!==Qe),{xMn:je,xMd:he,yMn:Ge,yMd:m}}(ue);let Re=z.mul(fe,Pe);Re=z.mul(Re,R);let ot=z.mul(he,Ae),nt=z.sub(fe,he),Ye=z.add(fe,he),It=z.mul(ot,Ye),st=z.eql(It,z.ZERO);Re=z.cmov(Re,z.ZERO,st),ot=z.cmov(ot,z.ONE,st),nt=z.cmov(nt,z.ONE,st),Ye=z.cmov(Ye,z.ONE,st);const He=z.invertBatch([ot,Ye]);return{x:z.mul(Re,He[0]),y:z.mul(nt,He[1])}}const H=(()=>(0,y.createHasher)(n.ed25519.ExtendedPoint,ue=>V(ue[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:z.ORDER,m:1,k:128,expand:"xmd",hash:l.sha512}))();function L(ue){if(!(ue instanceof ce))throw new Error("RistrettoPoint expected")}n.hashToCurve=H.hashToCurve,n.encodeToCurve=H.encodeToCurve;const b=d,B=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),re=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),ne=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),te=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),ae=ue=>U(m,ue),ge=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),pe=ue=>n.ed25519.CURVE.Fp.create((0,g.bytesToNumberLE)(ue)&ge);function we(ue){const{d:fe}=n.ed25519.CURVE,he=n.ed25519.CURVE.Fp.ORDER,Ae=n.ed25519.CURVE.Fp.create,Pe=Ae(b*ue*ue),Re=Ae((Pe+m)*ne);let ot=BigInt(-1);const nt=Ae((ot-fe*Pe)*Ae(Pe+fe));let{isValid:Ye,value:It}=U(Re,nt),st=Ae(It*ue);(0,s.isNegativeLE)(st,he)||(st=Ae(-st)),Ye||(It=st),Ye||(ot=Pe);const He=Ae(ot*(Pe-m)*te-nt),ze=It*It,Be=Ae((It+It)*nt),Ze=Ae(He*B),ut=Ae(m-ze),Me=Ae(m+ze);return new n.ed25519.ExtendedPoint(Ae(Be*Me),Ae(ut*Ze),Ae(Ze*Me),Ae(Be*ut))}class ce{constructor(fe){this.ep=fe}static fromAffine(fe){return new ce(n.ed25519.ExtendedPoint.fromAffine(fe))}static hashToCurve(fe){fe=(0,g.ensureBytes)("ristrettoHash",fe,64);const Ae=we(pe(fe.slice(0,32))),Re=we(pe(fe.slice(32,64)));return new ce(Ae.add(Re))}static fromHex(fe){fe=(0,g.ensureBytes)("ristrettoHex",fe,32);const{a:he,d:Ae}=n.ed25519.CURVE,Pe=n.ed25519.CURVE.Fp.ORDER,Re=n.ed25519.CURVE.Fp.create,ot="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",nt=pe(fe);if(!(0,g.equalBytes)((0,g.numberToBytesLE)(nt,32),fe)||(0,s.isNegativeLE)(nt,Pe))throw new Error(ot);const Ye=Re(nt*nt),It=Re(m+he*Ye),st=Re(m-he*Ye),He=Re(It*It),ze=Re(st*st),Be=Re(he*Ae*He-ze),{isValid:Ze,value:ut}=ae(Re(Be*ze)),Me=Re(ut*st),ve=Re(ut*Me*Be);let xe=Re((nt+nt)*Me);(0,s.isNegativeLE)(xe,Pe)&&(xe=Re(-xe));const je=Re(It*ve),Ge=Re(xe*je);if(!Ze||(0,s.isNegativeLE)(Ge,Pe)||je===p)throw new Error(ot);return new ce(new n.ed25519.ExtendedPoint(xe,je,m,Ge))}toRawBytes(){let{ex:fe,ey:he,ez:Ae,et:Pe}=this.ep;const Re=n.ed25519.CURVE.Fp.ORDER,ot=n.ed25519.CURVE.Fp.create,nt=ot(ot(Ae+he)*ot(Ae-he)),Ye=ot(fe*he),It=ot(Ye*Ye),{value:st}=ae(ot(nt*It)),He=ot(st*nt),ze=ot(st*Ye),Be=ot(He*ze*Pe);let Ze;if((0,s.isNegativeLE)(Pe*Be,Re)){let Me=ot(he*b),ve=ot(fe*b);fe=Me,he=ve,Ze=ot(He*re)}else Ze=ze;(0,s.isNegativeLE)(fe*Be,Re)&&(he=ot(-he));let ut=ot((Ae-he)*Ze);return(0,s.isNegativeLE)(ut,Re)&&(ut=ot(-ut)),(0,g.numberToBytesLE)(ut,32)}toHex(){return(0,g.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(fe){L(fe);const{ex:he,ey:Ae}=this.ep,{ex:Pe,ey:Re}=fe.ep,ot=n.ed25519.CURVE.Fp.create,nt=ot(he*Re)===ot(Ae*Pe),Ye=ot(Ae*Re)===ot(he*Pe);return nt||Ye}add(fe){return L(fe),new ce(this.ep.add(fe.ep))}subtract(fe){return L(fe),new ce(this.ep.subtract(fe.ep))}multiply(fe){return new ce(this.ep.multiply(fe))}multiplyUnsafe(fe){return new ce(this.ep.multiplyUnsafe(fe))}}n.RistrettoPoint=(ce.BASE||(ce.BASE=new ce(n.ed25519.ExtendedPoint.BASE)),ce.ZERO||(ce.ZERO=new ce(n.ed25519.ExtendedPoint.ZERO)),ce);n.hashToRistretto255=(ue,fe)=>{const he=fe.DST,Ae="string"==typeof he?(0,v.utf8ToBytes)(he):he,Pe=(0,y.expand_message_xmd)(ue,Ae,64,l.sha512);return ce.hashToCurve(Pe)},n.hash_to_ristretto255=n.hashToRistretto255},53219:(q,n)=>{"use strict";function u(y){if(!Number.isSafeInteger(y)||y<0)throw new Error(`Wrong positive integer: ${y}`)}function l(y){if("boolean"!=typeof y)throw new Error(`Expected boolean, not ${y}`)}function v(y,...f){if(!(y instanceof Uint8Array))throw new Error("Expected Uint8Array");if(f.length>0&&!f.includes(y.length))throw new Error(`Expected Uint8Array of length ${f}, not of length=${y.length}`)}function E(y){if("function"!=typeof y||"function"!=typeof y.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");u(y.outputLen),u(y.blockLen)}function M(y,f=!0){if(y.destroyed)throw new Error("Hash instance has been destroyed");if(f&&y.finished)throw new Error("Hash#digest() has already been called")}function s(y,f){v(y);const d=f.outputLen;if(y.length{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const l=u(53219),v=u(62503);class M extends v.Hash{constructor(g,y,f,d){super(),this.blockLen=g,this.outputLen=y,this.padOffset=f,this.isLE=d,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(g),this.view=(0,v.createView)(this.buffer)}update(g){(0,l.exists)(this);const{view:y,buffer:f,blockLen:d}=this,p=(g=(0,v.toBytes)(g)).length;for(let m=0;md-m&&(this.process(f,0),m=0);for(let x=m;x>d&p),S=Number(y&p),_=f?4:0,D=f?0:4;s.setUint32(g+_,m,f),s.setUint32(g+D,S,f)})(f,d-8,BigInt(8*this.length),p),this.process(f,0);const S=(0,v.createView)(g),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const D=_/4,P=this.get();if(D>P.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.add=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=n.split=n.fromBig=void 0;const u=BigInt(2**32-1),l=BigInt(32);function v(j,Z=!1){return Z?{h:Number(j&u),l:Number(j>>l&u)}:{h:0|Number(j>>l&u),l:0|Number(j&u)}}function E(j,Z=!1){let T=new Uint32Array(j.length),o=new Uint32Array(j.length);for(let h=0;hBigInt(j>>>0)<>>0);n.toBig=M;const s=(j,Z,T)=>j>>>T;n.shrSH=s;const g=(j,Z,T)=>j<<32-T|Z>>>T;n.shrSL=g;const y=(j,Z,T)=>j>>>T|Z<<32-T;n.rotrSH=y;const f=(j,Z,T)=>j<<32-T|Z>>>T;n.rotrSL=f;const d=(j,Z,T)=>j<<64-T|Z>>>T-32;n.rotrBH=d;const p=(j,Z,T)=>j>>>T-32|Z<<64-T;n.rotrBL=p;const m=(j,Z)=>Z;n.rotr32H=m;const S=(j,Z)=>j;n.rotr32L=S;const _=(j,Z,T)=>j<>>32-T;n.rotlSH=_;const D=(j,Z,T)=>Z<>>32-T;n.rotlSL=D;const P=(j,Z,T)=>Z<>>64-T;n.rotlBH=P;const x=(j,Z,T)=>j<>>64-T;function C(j,Z,T,o){const h=(Z>>>0)+(o>>>0);return{h:j+T+(h/2**32|0)|0,l:0|h}}n.rotlBL=x,n.add=C;const N=(j,Z,T)=>(j>>>0)+(Z>>>0)+(T>>>0);n.add3L=N;const k=(j,Z,T,o)=>Z+T+o+(j/2**32|0)|0;n.add3H=k;const U=(j,Z,T,o)=>(j>>>0)+(Z>>>0)+(T>>>0)+(o>>>0);n.add4L=U;const z=(j,Z,T,o,h)=>Z+T+o+h+(j/2**32|0)|0;n.add4H=z;const Y=(j,Z,T,o,h)=>(j>>>0)+(Z>>>0)+(T>>>0)+(o>>>0)+(h>>>0);n.add5L=Y;const G=(j,Z,T,o,h,w)=>Z+T+o+h+w+(j/2**32|0)|0;n.add5H=G;const F={fromBig:v,split:E,toBig:M,shrSH:s,shrSL:g,rotrSH:y,rotrSL:f,rotrBH:d,rotrBL:p,rotr32H:m,rotr32L:S,rotlSH:_,rotlSL:D,rotlBH:P,rotlBL:x,add:C,add3L:N,add3H:k,add4L:U,add4H:z,add5H:G,add5L:Y};n.default=F},47099:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},27510:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA512=void 0;const l=u(53090),v=u(51424),E=u(62503),[M,s]=(()=>v.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(S=>BigInt(S))))(),g=new Uint32Array(80),y=new Uint32Array(80);class f extends l.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:_,Al:D,Bh:P,Bl:x,Ch:C,Cl:N,Dh:k,Dl:U,Eh:z,El:Y,Fh:G,Fl:F,Gh:j,Gl:Z,Hh:T,Hl:o}=this;return[_,D,P,x,C,N,k,U,z,Y,G,F,j,Z,T,o]}set(_,D,P,x,C,N,k,U,z,Y,G,F,j,Z,T,o){this.Ah=0|_,this.Al=0|D,this.Bh=0|P,this.Bl=0|x,this.Ch=0|C,this.Cl=0|N,this.Dh=0|k,this.Dl=0|U,this.Eh=0|z,this.El=0|Y,this.Fh=0|G,this.Fl=0|F,this.Gh=0|j,this.Gl=0|Z,this.Hh=0|T,this.Hl=0|o}process(_,D){for(let I=0;I<16;I++,D+=4)g[I]=_.getUint32(D),y[I]=_.getUint32(D+=4);for(let I=16;I<80;I++){const R=0|g[I-15],V=0|y[I-15],H=v.default.rotrSH(R,V,1)^v.default.rotrSH(R,V,8)^v.default.shrSH(R,V,7),L=v.default.rotrSL(R,V,1)^v.default.rotrSL(R,V,8)^v.default.shrSL(R,V,7),b=0|g[I-2],B=0|y[I-2],re=v.default.rotrSH(b,B,19)^v.default.rotrBH(b,B,61)^v.default.shrSH(b,B,6),ne=v.default.rotrSL(b,B,19)^v.default.rotrBL(b,B,61)^v.default.shrSL(b,B,6),te=v.default.add4L(L,ne,y[I-7],y[I-16]),ae=v.default.add4H(te,H,re,g[I-7],g[I-16]);g[I]=0|ae,y[I]=0|te}let{Ah:P,Al:x,Bh:C,Bl:N,Ch:k,Cl:U,Dh:z,Dl:Y,Eh:G,El:F,Fh:j,Fl:Z,Gh:T,Gl:o,Hh:h,Hl:w}=this;for(let I=0;I<80;I++){const R=v.default.rotrSH(G,F,14)^v.default.rotrSH(G,F,18)^v.default.rotrBH(G,F,41),V=v.default.rotrSL(G,F,14)^v.default.rotrSL(G,F,18)^v.default.rotrBL(G,F,41),H=G&j^~G&T,L=F&Z^~F&o,b=v.default.add5L(w,V,L,s[I],y[I]),B=v.default.add5H(b,h,R,H,M[I],g[I]),re=0|b,ne=v.default.rotrSH(P,x,28)^v.default.rotrBH(P,x,34)^v.default.rotrBH(P,x,39),te=v.default.rotrSL(P,x,28)^v.default.rotrBL(P,x,34)^v.default.rotrBL(P,x,39),ae=P&C^P&k^C&k,ge=x&N^x&U^N&U;h=0|T,w=0|o,T=0|j,o=0|Z,j=0|G,Z=0|F,({h:G,l:F}=v.default.add(0|z,0|Y,0|B,0|re)),z=0|k,Y=0|U,k=0|C,U=0|N,C=0|P,N=0|x;const pe=v.default.add3L(re,te,ge);P=v.default.add3H(pe,B,ne,ae),x=0|pe}({h:P,l:x}=v.default.add(0|this.Ah,0|this.Al,0|P,0|x)),({h:C,l:N}=v.default.add(0|this.Bh,0|this.Bl,0|C,0|N)),({h:k,l:U}=v.default.add(0|this.Ch,0|this.Cl,0|k,0|U)),({h:z,l:Y}=v.default.add(0|this.Dh,0|this.Dl,0|z,0|Y)),({h:G,l:F}=v.default.add(0|this.Eh,0|this.El,0|G,0|F)),({h:j,l:Z}=v.default.add(0|this.Fh,0|this.Fl,0|j,0|Z)),({h:T,l:o}=v.default.add(0|this.Gh,0|this.Gl,0|T,0|o)),({h,l:w}=v.default.add(0|this.Hh,0|this.Hl,0|h,0|w)),this.set(P,x,C,N,k,U,z,Y,G,F,j,Z,T,o,h,w)}roundClean(){g.fill(0),y.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}n.SHA512=f;class d extends f{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class p extends f{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class m extends f{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.sha512=(0,E.wrapConstructor)(()=>new f),n.sha512_224=(0,E.wrapConstructor)(()=>new d),n.sha512_256=(0,E.wrapConstructor)(()=>new p),n.sha384=(0,E.wrapConstructor)(()=>new m)},62503:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const v=u(47099),E=F=>F instanceof Uint8Array;n.u8=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);n.u32=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));n.createView=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);if(n.rotr=(F,j)=>F<<32-j|F>>>j,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const f=Array.from({length:256},(F,j)=>j.toString(16).padStart(2,"0"));n.bytesToHex=function d(F){if(!E(F))throw new Error("Uint8Array expected");let j="";for(let Z=0;Z=0&&hT+o.length,0));let Z=0;return F.forEach(T=>{if(!E(T))throw new Error("Uint8Array expected");j.set(T,Z),Z+=T.length}),j};n.Hash=class C{clone(){return this._cloneInto()}};const N={}.toString;n.checkOpts=function k(F,j){if(void 0!==j&&"[object Object]"!==N.call(j))throw new Error("Options should be object or undefined");return Object.assign(F,j)},n.wrapConstructor=function U(F){const j=T=>F().update(P(T)).digest(),Z=F();return j.outputLen=Z.outputLen,j.blockLen=Z.blockLen,j.create=()=>F(),j},n.wrapConstructorWithOpts=function z(F){const j=(T,o)=>F(o).update(P(T)).digest(),Z=F({});return j.outputLen=Z.outputLen,j.blockLen=Z.blockLen,j.create=T=>F(T),j},n.wrapXOFConstructorWithOpts=function Y(F){const j=(T,o)=>F(o).update(P(T)).digest(),Z=F({});return j.outputLen=Z.outputLen,j.blockLen=Z.blockLen,j.create=T=>F(T),j},n.randomBytes=function G(F=32){if(v.crypto&&"function"==typeof v.crypto.getRandomValues)return v.crypto.getRandomValues(new Uint8Array(F));throw new Error("crypto.getRandomValues must be defined")}},76913:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(n,"__esModule",{value:!0});const v=l(u(87908)),E=l(u(93224)),M=l(u(50539)),s=l(u(13917)),g=l(u(15247)),y={development:Object.assign(Object.assign({},M.default),v.default),test:Object.assign({},E.default),staging:Object.assign(Object.assign({},M.default),g.default),production:Object.assign(Object.assign({},M.default),s.default)},f=process.env.CONFIG_ENV||"production";if(!(f in y))throw new Error(`${f} is not a valid env config`);const d=y[f];n.default=d},863:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(n,"__esModule",{value:!0}),n.createAction=n.parseArgs=void 0;const v=u(8597),E=l(u(98538));n.parseArgs=y=>"string"==typeof y?Buffer.from(y,"base64"):y;n.createAction=y=>{switch(y.type){case"CreateAccount":return v.transactions.createAccount();case"DeployContract":{const{code:f}=y.params;return v.transactions.deployContract(f)}case"FunctionCall":{const{methodName:f,args:d,gas:p,deposit:m}=y.params;return v.transactions.functionCall(f,(0,n.parseArgs)(d),new E.default(p),new E.default(m))}case"Transfer":{const{deposit:f}=y.params;return v.transactions.transfer(new E.default(f))}case"Stake":{const{stake:f,publicKey:d}=y.params;return v.transactions.stake(new E.default(f),v.utils.PublicKey.from(d))}case"AddKey":{const{publicKey:f,accessKey:d}=y.params;return v.transactions.addKey(v.utils.PublicKey.from(f),(y=>{if("FullAccess"===y)return v.transactions.fullAccessKey();const{receiverId:f,methodNames:d=[]}=y,p=y.allowance?new E.default(y.allowance):void 0;return v.transactions.functionCallAccessKey(f,d,p)})(d.permission))}case"DeleteKey":{const{publicKey:f}=y.params;return v.transactions.deleteKey(v.utils.PublicKey.from(f))}case"DeleteAccount":{const{beneficiaryId:f}=y.params;return v.transactions.deleteAccount(f)}default:throw new Error("Invalid action type")}}},23183:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isValidAccessKey=void 0;n.isValidAccessKey=(l,v,E,M)=>{if(v.public_key===E)return!0;const{permission:s}=v.access_key;if("FullAccess"===s)return!0;if(M&&s.FunctionCall){const{receiver_id:g,method_names:y}=s.FunctionCall;if(g===l&&y.includes("add_request_and_confirm"))return!0;if(g===M.receiverId)return 1===M.actions.length&&M.actions.every(f=>"FunctionCall"===f.type&&((!f.params.deposit||"0"===f.params.deposit.toString())&&(0===y.length||y.includes(f.params.methodName))))}return!1}},33492:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(y,f,d,p){void 0===p&&(p=d);var m=Object.getOwnPropertyDescriptor(f,d);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[d]}}),Object.defineProperty(y,p,m)}:function(y,f,d,p){void 0===p&&(p=d),y[p]=f[d]}),v=this&&this.__setModuleDefault||(Object.create?function(y,f){Object.defineProperty(y,"default",{enumerable:!0,value:f})}:function(y,f){y.default=f}),E=this&&this.__importStar||function(y){if(y&&y.__esModule)return y;var f={};if(null!=y)for(var d in y)"default"!==d&&Object.prototype.hasOwnProperty.call(y,d)&&l(f,y,d);return v(f,y),f},M=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});const s=E(u(27682));n.default=function g(y,f,d={}){let p,m=!1;const _=(()=>M(this,void 0,void 0,function*(){const{delay:D=1e3,maxIterations:P,timeout:x}=d;let k,C=0,N=!1;function U(){return M(this,void 0,void 0,function*(){N=!1;try{return yield void 0!==x?(0,s.default)(y(),x):y()}catch(z){if(!(z instanceof s.TimeoutPromiseError))throw z;N=!0}})}for(k=yield U();!m&&(N||f(k));){if(C===P)throw new Error("Polling executed the maximum number iterations");yield new Promise(z=>{p=setTimeout(()=>M(this,void 0,void 0,function*(){C++,k=yield U(),z()}),D)})}return k}))();return _.abort=()=>{m=!0,clearTimeout(p)},_}},27682:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.TimeoutPromiseError=void 0;class l extends Error{constructor(){super("Promise timeout")}}n.TimeoutPromiseError=l,n.default=function v(E,M){return u(this,void 0,void 0,function*(){let s;const g=new Promise((f,d)=>{s=setTimeout(()=>{d(new l)},M)}),y=yield Promise.race([E,g]);return clearTimeout(s),y})}},39825:(q,n)=>{"use strict";var u,l;Object.defineProperty(n,"__esModule",{value:!0}),n.SignerRequestStatus=void 0,(l=u||(n.SignerRequestStatus=u={})).PENDING="pending",l.APPROVED="approved",l.REJECTED="rejected"},96299:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ApiError=void 0;class u extends Error{constructor(v,E,M){super(M),this.name="ApiError",this.url=E.url,this.status=E.status,this.statusText=E.statusText,this.body=E.body,this.request=v}}n.ApiError=u},43868:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CancelablePromise=n.CancelError=void 0;class u extends Error{constructor(E){super(E),this.name="CancelError"}get isCancelled(){return!0}}n.CancelError=u;n.CancelablePromise=class l{constructor(E){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((M,s)=>{this._resolve=M,this._reject=s;const f=d=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(d)};return Object.defineProperty(f,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(f,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(f,"isCancelled",{get:()=>this._isCancelled}),E(d=>{var p;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,null===(p=this._resolve)||void 0===p||p.call(this,d))},d=>{var p;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,null===(p=this._reject)||void 0===p||p.call(this,d))},f)})}then(E,M){return this._promise.then(E,M)}catch(E){return this._promise.catch(E)}finally(E){return this._promise.finally(E)}cancel(){var E;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const M of this._cancelHandlers)M()}catch(M){return void console.warn("Cancellation threw an error",M)}this._cancelHandlers.length=0,null===(E=this._reject)||void 0===E||E.call(this,new u("Request aborted"))}}get isCancelled(){return this._isCancelled}}},75023:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(n,"__esModule",{value:!0}),n.OpenAPI=void 0;const v=l(u(76913));n.OpenAPI={BASE:v.default.proxyUrl,VERSION:"0.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},51022:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(z,Y,G,F){return new(G||(G=Promise))(function(Z,T){function o(I){try{w(F.next(I))}catch(R){T(R)}}function h(I){try{w(F.throw(I))}catch(R){T(R)}}function w(I){I.done?Z(I.value):function j(Z){return Z instanceof G?Z:new G(function(T){T(Z)})}(I.value).then(o,h)}w((F=F.apply(z,Y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.request=n.sendRequest=void 0;const v=u(96299),E=u(43868),M=z=>null!=z,s=z=>"string"==typeof z,g=z=>s(z)&&""!==z,y=z=>"object"==typeof z&&"string"==typeof z.type&&"function"==typeof z.stream&&"function"==typeof z.arrayBuffer&&"function"==typeof z.constructor&&"string"==typeof z.constructor.name&&/^(Blob|File)$/.test(z.constructor.name)&&/^(Blob|File)$/.test(z[Symbol.toStringTag]),f=z=>z instanceof FormData,p=z=>{const Y=[],F=(j,Z)=>{M(Z)&&(Array.isArray(Z)?Z.forEach(T=>{F(j,T)}):"object"==typeof Z?Object.entries(Z).forEach(([T,o])=>{F(`${j}[${T}]`,o)}):((j,Z)=>{Y.push(`${encodeURIComponent(j)}=${encodeURIComponent(String(Z))}`)})(j,Z))};return Object.entries(z).forEach(([j,Z])=>{F(j,Z)}),Y.length>0?`?${Y.join("&")}`:""},_=(z,Y)=>l(void 0,void 0,void 0,function*(){return"function"==typeof Y?Y(z):Y}),D=(z,Y)=>l(void 0,void 0,void 0,function*(){const G=yield _(Y,z.TOKEN),F=yield _(Y,z.USERNAME),j=yield _(Y,z.PASSWORD),Z=yield _(Y,z.HEADERS),T=Object.entries(Object.assign(Object.assign({Accept:"application/json"},Z),Y.headers)).filter(([o,h])=>M(h)).reduce((o,[h,w])=>Object.assign(Object.assign({},o),{[h]:String(w)}),{});if(g(G)&&(T.Authorization=`Bearer ${G}`),g(F)&&g(j)){const o=(z=>{try{return btoa(z)}catch{return Buffer.from(z).toString("base64")}})(`${F}:${j}`);T.Authorization=`Basic ${o}`}return Y.body&&(Y.mediaType?T["Content-Type"]=Y.mediaType:y(Y.body)?T["Content-Type"]=Y.body.type||"application/octet-stream":s(Y.body)?T["Content-Type"]="text/plain":f(Y.body)||(T["Content-Type"]="application/json")),new Headers(T)});n.sendRequest=(z,Y,G,F,j,Z,T)=>l(void 0,void 0,void 0,function*(){const o=new AbortController,h={headers:Z,body:F??j,method:Y.method,signal:o.signal};return z.WITH_CREDENTIALS&&(h.credentials=z.CREDENTIALS),T(()=>o.abort()),yield fetch(G,h)});n.request=(z,Y)=>new E.CancelablePromise((G,F,j)=>l(void 0,void 0,void 0,function*(){try{const Z=((z,Y)=>{const G=z.ENCODE_PATH||encodeURI,F=Y.url.replace("{api-version}",z.VERSION).replace(/{(.*?)}/g,(Z,T)=>{var o;return null!==(o=Y.path)&&void 0!==o&&o.hasOwnProperty(T)?G(String(Y.path[T])):Z}),j=`${z.BASE}${F}`;return Y.query?`${j}${p(Y.query)}`:j})(z,Y),T=(z=>{if(z.formData){const Y=new FormData,G=(F,j)=>{s(j)||y(j)?Y.append(F,j):Y.append(F,JSON.stringify(j))};return Object.entries(z.formData).filter(([F,j])=>M(j)).forEach(([F,j])=>{Array.isArray(j)?j.forEach(Z=>G(F,Z)):G(F,j)}),Y}})(Y),o=(z=>{var Y;if(z.body)return null!==(Y=z.mediaType)&&void 0!==Y&&Y.includes("/json")?JSON.stringify(z.body):s(z.body)||y(z.body)||f(z.body)?z.body:JSON.stringify(z.body)})(Y),h=yield D(z,Y);if(!j.isCancelled){const w=yield(0,n.sendRequest)(z,Y,Z,o,T,h,j),I=yield(z=>l(void 0,void 0,void 0,function*(){if(204!==z.status)try{const Y=z.headers.get("Content-Type");if(Y)return Y.toLowerCase().startsWith("application/json")?yield z.json():yield z.text()}catch(Y){console.error(Y)}}))(w),R=((z,Y)=>{if(Y){const G=z.headers.get(Y);if(s(G))return G}})(w,Y.responseHeader),V={url:Z,ok:w.ok,status:w.status,statusText:w.statusText,body:R??I};((z,Y)=>{const F=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},z.errors)[Y.status];if(F)throw new v.ApiError(z,Y,F);if(!Y.ok)throw new v.ApiError(z,Y,"Generic Error")})(Y,V),G(V.body)}}catch(Z){F(Z)}}))},9273:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SignerRequestApi=n.$SignRequest=n.$SignMessageRequestPayload=n.$SignMessageRequestDto=n.$SignerTransactionDto=n.$SignerRequestStatusDto=n.$SignerRequestDto=n.$DAppMetadatRequest=n.$DAppMetadataDto=n.$CreateSignMessageRequest=n.$CreateSignerRequest=n.OpenAPI=n.CancelError=n.CancelablePromise=n.ApiError=void 0;var l=u(96299);Object.defineProperty(n,"ApiError",{enumerable:!0,get:function(){return l.ApiError}});var v=u(43868);Object.defineProperty(n,"CancelablePromise",{enumerable:!0,get:function(){return v.CancelablePromise}}),Object.defineProperty(n,"CancelError",{enumerable:!0,get:function(){return v.CancelError}});var E=u(75023);Object.defineProperty(n,"OpenAPI",{enumerable:!0,get:function(){return E.OpenAPI}});var M=u(16588);Object.defineProperty(n,"$CreateSignerRequest",{enumerable:!0,get:function(){return M.$CreateSignerRequest}});var s=u(82988);Object.defineProperty(n,"$CreateSignMessageRequest",{enumerable:!0,get:function(){return s.$CreateSignMessageRequest}});var g=u(57470);Object.defineProperty(n,"$DAppMetadataDto",{enumerable:!0,get:function(){return g.$DAppMetadataDto}});var y=u(71482);Object.defineProperty(n,"$DAppMetadatRequest",{enumerable:!0,get:function(){return y.$DAppMetadatRequest}});var f=u(48322);Object.defineProperty(n,"$SignerRequestDto",{enumerable:!0,get:function(){return f.$SignerRequestDto}});var d=u(47282);Object.defineProperty(n,"$SignerRequestStatusDto",{enumerable:!0,get:function(){return d.$SignerRequestStatusDto}});var p=u(34652);Object.defineProperty(n,"$SignerTransactionDto",{enumerable:!0,get:function(){return p.$SignerTransactionDto}});var m=u(25654);Object.defineProperty(n,"$SignMessageRequestDto",{enumerable:!0,get:function(){return m.$SignMessageRequestDto}});var S=u(93089);Object.defineProperty(n,"$SignMessageRequestPayload",{enumerable:!0,get:function(){return S.$SignMessageRequestPayload}});var _=u(53951);Object.defineProperty(n,"$SignRequest",{enumerable:!0,get:function(){return _.$SignRequest}});var D=u(61123);Object.defineProperty(n,"SignerRequestApi",{enumerable:!0,get:function(){return D.SignerRequestApi}})},82988:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$CreateSignMessageRequest=void 0,n.$CreateSignMessageRequest={properties:{network:{type:"Enum",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},receiverMetadata:{type:"DAppMetadatRequest"}}}},16588:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$CreateSignerRequest=void 0,n.$CreateSignerRequest={properties:{network:{type:"Enum",isRequired:!0},transactions:{type:"array",contains:{type:"one-of",contains:[{type:"SignerTransactionDto"}]},isRequired:!0},dAppMetadata:{type:"DAppMetadatRequest"}}}},71482:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$DAppMetadatRequest=void 0,n.$DAppMetadatRequest={properties:{}}},57470:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$DAppMetadataDto=void 0,n.$DAppMetadataDto={properties:{name:{type:"string",isRequired:!0},logoUrl:{type:"string",isRequired:!0},url:{type:"string"}}}},25654:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignMessageRequestDto=void 0,n.$SignMessageRequestDto={properties:{id:{type:"string",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},network:{type:"Enum",isRequired:!0},response:{properties:{},isRequired:!0},receiverMetadata:{type:"DAppMetadataDto"},status:{type:"Enum",isRequired:!0}}}},93089:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignMessageRequestPayload=void 0,n.$SignMessageRequestPayload={properties:{accountId:{type:"string",isRequired:!0},signature:{type:"string",isRequired:!0},publicKey:{type:"string",isRequired:!0}}}},53951:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignRequest=void 0,n.$SignRequest={properties:{signerAccountId:{type:"string",isRequired:!0},txHash:{type:"array",contains:{type:"string"},isRequired:!0}}}},48322:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignerRequestDto=void 0,n.$SignerRequestDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0},network:{type:"Enum",isRequired:!0},signerAccountId:{type:"string",isRequired:!0},requests:{type:"array",contains:{properties:{}},isRequired:!0},dAppMetadata:{type:"DAppMetadataDto"},txHash:{type:"array",contains:{type:"string"}},createdAt:{type:"string",isRequired:!0,format:"date-time"},updatedAt:{type:"string",isRequired:!0,format:"date-time"}}}},47282:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignerRequestStatusDto=void 0,n.$SignerRequestStatusDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0}}}},34652:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.$SignerTransactionDto=void 0,n.$SignerTransactionDto={properties:{signerId:{type:"string"},receiverId:{type:"string"},actions:{type:"array",contains:{properties:{}},isRequired:!0}}}},61123:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SignerRequestApi=void 0;const l=u(75023),v=u(51022);n.SignerRequestApi=class E{static createSignerRequest(s){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request",body:s,mediaType:"application/json"})}static getSignerRequestStatus(s){return(0,v.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/{id}/status",path:{id:s}})}static approveSignerRequest(s,g){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/approve",path:{id:s},body:g,mediaType:"application/json"})}static rejectSignerRequest(s){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/reject",path:{id:s}})}static getSignerRequest(s){return(0,v.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/{id}",path:{id:s}})}static createSignMessageRequest(s){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message",body:s,mediaType:"application/json"})}static getSignMessageRequest(s){return(0,v.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/message/{id}",path:{id:s}})}static signMessageRequest(s,g){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/sign",path:{id:s},body:g,mediaType:"application/json"})}static rejectMessageRequest(s){return(0,v.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/reject",path:{id:s}})}}},2199:(q,n)=>{"use strict";var u,l;Object.defineProperty(n,"__esModule",{value:!0}),n.RepositoryErrorCodes=n.SessionRepositoryErrorCodes=void 0,(l=u||(n.SessionRepositoryErrorCodes=u={})).INVALID_ACCOUNT_ID="INVALID_ACCOUNT_ID",l.ACCOUNT_KEY_NOT_FOUND="ACCOUNT_KEY_NOT_FOUND",n.RepositoryErrorCodes=u},21251:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(69560),n)},45358:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.SessionRepository=void 0;const v=u(82687),E=u(2199),M=u(8597);class s extends v.WindowLocalStorageRepository{constructor(){super("session"),this.loadSessionState()}loadSessionState(){return l(this,void 0,void 0,function*(){(yield this.get())||(yield this.set({mainnet:{activeAccount:null,accounts:{}},testnet:{activeAccount:null,accounts:{}}}))})}getKey(y,f){var d;return l(this,void 0,void 0,function*(){const m=null===(d=(yield this.get())[y])||void 0===d?void 0:d.accounts[f];if(!m)throw new Error(E.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return M.KeyPair.fromString(m)})}setKey(y,f,d){return l(this,void 0,void 0,function*(){const p=yield this.get();p[y].accounts[f]=d.toString(),yield this.set(p)})}removeKey(y,f){return l(this,void 0,void 0,function*(){const d=yield this.get();d[y].activeAccount===f&&(d[y].activeAccount=null),delete d[y].accounts[f],yield this.set(d)})}getActiveAccount(y){return l(this,void 0,void 0,function*(){return(yield this.get())[y].activeAccount})}setActiveAccount(y,f){return l(this,void 0,void 0,function*(){const d=yield this.get();if(!Object.keys(d[y].accounts).includes(f))throw new Error(E.RepositoryErrorCodes.INVALID_ACCOUNT_ID);d[y].activeAccount=f,yield this.set(d)})}getAccounts(y){return l(this,void 0,void 0,function*(){const d=(yield this.get())[y].accounts;return Object.keys(d)})}getNetworks(){return l(this,void 0,void 0,function*(){const y=yield this.get();return Object.keys(y)})}clear(){return l(this,void 0,void 0,function*(){yield this.clear()})}}n.SessionRepository=s},98494:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(45358),n)},61439:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Repository=void 0;n.Repository=class u{constructor(v){this.projectName="near-mobile-signer",this.key=`${this.projectName}:${v}`}}},82687:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WindowLocalStorageRepository=void 0;const l=u(61439);class v extends l.Repository{set(M){return Promise.resolve(window.localStorage.setItem(this.key,JSON.stringify(M)))}get(){const M=window.localStorage.getItem(this.key);return Promise.resolve(M?JSON.parse(M):void 0)}clear(){return Promise.resolve(window.localStorage.removeItem(this.key))}}n.WindowLocalStorageRepository=v},75729:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WindowLocalStorageRepository=n.Repository=void 0;var l=u(61439);Object.defineProperty(n,"Repository",{enumerable:!0,get:function(){return l.Repository}});var v=u(82687);Object.defineProperty(n,"WindowLocalStorageRepository",{enumerable:!0,get:function(){return v.WindowLocalStorageRepository}})},69560:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(98494),n),v(u(75729),n)},96105:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.NearMobileWallet=void 0;const v=u(8597),E=u(87974),M=u(97186),s=u(12139),g=u(39825),y=u(23183),f=u(863),d=u(93730),p=u(21251),m=u(94196),S=u(2199);n.NearMobileWallet=class _{handleRequestStatus(P){var x,C,N,k;P===g.SignerRequestStatus.APPROVED?null===(C=(x=this.defaultStrategy).onApproved)||void 0===C||C.call(x):P===g.SignerRequestStatus.REJECTED&&(null===(k=(N=this.defaultStrategy).onError)||void 0===k||k.call(N))}loadConnection(P,x){const C=new v.InMemorySigner(this.sessionRepository),N=new E.JsonRpcProvider({url:P??`https://rpc.${x}.near.org`});this.connection=v.Connection.fromConfig({jsvmAccountId:`jsvm.${x}`,provider:N,network:x,signer:C})}retryTransaction({requests:P}){var x,C,N,k;return l(this,void 0,void 0,function*(){try{const{id:U,network:z,requests:Y}=yield this.defaultProvider.createRequest(this.network,P,this.dAppMetadata);null===(C=(x=this.defaultStrategy).onRequested)||void 0===C||C.call(x,U,{network:z,request:Y});const{status:G}=yield this.defaultProvider.awaitActionSignatureResolution(U);this.handleRequestStatus(G);const{signerAccountId:F,txHash:j}=yield this.defaultProvider.getRequest(U);if(!F||!j)throw new Error(d.WalletErrors.REQUEST_NOT_SIGNED);if(1===j.length)return yield this.rpc.txStatus(j[0],F);throw new Error(d.WalletErrors.OPERATION_FAILED)}catch(U){throw null===(k=(N=this.defaultStrategy).onError)||void 0===k||k.call(N),new Error(U)}})}constructor({nodeUrl:P,network:x="testnet",sessionRepository:C=new p.SessionRepository,metadata:N}={}){this.network=x,this.sessionRepository=C,this.defaultStrategy=new M.WidgetStrategy,this.defaultProvider=new s.NearMobileSignerProxy,this.dAppMetadata=N,this.loadConnection(P,x)}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}getAccounts(){return l(this,void 0,void 0,function*(){return this.sessionRepository.getAccounts(this.network)})}isSignedIn(P){return l(this,void 0,void 0,function*(){try{const x=yield this.sessionRepository.getActiveAccount(this.network);if(P&&x!==P||null===x)return!1;const C=yield this.sessionRepository.getKey(this.network,x);if(null===C)throw new Error(S.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return void 0!==(yield(yield this.account(x)).getAccessKeys()).find(z=>z.public_key===C.getPublicKey().toString())}catch(x){if(x.message===S.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND)return!1;throw new Error(x)}})}signOut(){return l(this,void 0,void 0,function*(){const P=yield this.isSignedIn(),x=yield this.sessionRepository.getActiveAccount(this.network);if(!P)return void(yield this.sessionRepository.removeKey(this.network,x));const C=yield this.sessionRepository.getKey(this.network,x);if(null===C)throw new Error(d.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const N=C.getPublicKey().toString();try{yield this.silentSignAndSendTransaction({signerId:x,receiverId:x,actions:[{type:"DeleteKey",params:{publicKey:N}}]}),yield this.sessionRepository.removeKey(this.network,x)}catch{yield this.retryTransaction({requests:[{actions:[{type:"DeleteKey",params:{publicKey:N}}],signerId:x,receiverId:x}]}),yield this.sessionRepository.removeKey(this.network,x)}})}signIn({contractId:P,allowance:x,methodNames:C=[]}){var N,k;return l(this,void 0,void 0,function*(){try{const U=v.KeyPair.fromRandom("ed25519"),z={receiverId:P,methodNames:C,allowance:x},Y=[{actions:[{type:"AddKey",params:{publicKey:U.getPublicKey().toString(),accessKey:{permission:z}}}]}],{id:G,network:F,requests:j}=yield this.defaultProvider.createRequest(this.network,Y,this.dAppMetadata),Z=()=>l(this,void 0,void 0,function*(){return yield this.defaultProvider.rejectSignerRequest(G)});null===(k=(N=this.defaultStrategy).onRequested)||void 0===k||k.call(N,G,{network:F,request:j},Z);const{status:T}=yield this.defaultProvider.awaitActionSignatureResolution(G);this.handleRequestStatus(T);const{signerAccountId:o}=yield this.defaultProvider.getRequest(G);if(!o)throw new Error(d.WalletErrors.REQUEST_NOT_SIGNED);return yield this.sessionRepository.setKey(this.network,o,U),yield this.sessionRepository.setActiveAccount(this.network,o),o}catch(U){throw new Error(U)}})}account(P){return l(this,void 0,void 0,function*(){const x=P??(yield this.sessionRepository.getActiveAccount(this.network));if(null===x)throw new Error(d.WalletErrors.NO_ACTIVE_ACCOUNT);return new v.Account(this.connection,x)})}silentSignAndSendTransaction({signerId:P,receiverId:x,actions:C}){return l(this,void 0,void 0,function*(){const N=yield this.account(P),k=yield this.sessionRepository.getKey(this.network,N.accountId);if(null===k)throw new Error(d.WalletErrors.NO_ACTIVE_ACCOUNT);if(!(yield this.isSignedIn(N.accountId)))throw new Error(d.WalletErrors.NO_ACTIVE_ACCOUNT);const z=k.getPublicKey().toString(),Y=yield N.getAccessKeys(),G={receiverId:x,actions:C};if(!Y.some(j=>(0,y.isValidAccessKey)(N.accountId,j,z,G)))throw new Error(d.WalletErrors.INVALID_ACCESS_KEY);return yield N.signAndSendTransaction({actions:C.map(j=>(0,f.createAction)(j)),receiverId:x??N.accountId})})}signAndSendTransaction({signerId:P,receiverId:x,actions:C}){var N,k;return l(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(P)))throw yield this.sessionRepository.removeKey(this.network,P),new Error(d.WalletErrors.NO_ACTIVE_ACCOUNT);const z=yield this.silentSignAndSendTransaction({signerId:P,receiverId:x,actions:C});return null===(k=(N=this.defaultStrategy).onSuccess)||void 0===k||k.call(N),z}catch(U){if(U.message===d.WalletErrors.NO_ACTIVE_ACCOUNT)throw new Error(U);return yield this.retryTransaction({requests:[{actions:C,receiverId:x,signerId:P}]})}})}signAndSendTransactions({transactions:P}){var x,C,N,k;return l(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(P[0].signerId)))throw yield this.sessionRepository.removeKey(this.network,P[0].signerId),new Error(d.WalletErrors.NO_ACTIVE_ACCOUNT);const{id:z,network:Y,requests:G}=yield this.defaultProvider.createRequest(this.network,P,this.dAppMetadata);null===(C=(x=this.defaultStrategy).onRequested)||void 0===C||C.call(x,z,{network:Y,request:G});const{status:F}=yield this.defaultProvider.awaitActionSignatureResolution(z);this.handleRequestStatus(F);const{signerAccountId:j,txHash:Z}=yield this.defaultProvider.getRequest(z);if(!j||!Z)throw new Error(d.WalletErrors.REQUEST_NOT_SIGNED);const T=[];for(const o of Z){const h=yield this.rpc.txStatus(o,j);T.push(h)}return T}catch(U){throw null===(k=(N=this.defaultStrategy).onError)||void 0===k||k.call(N),new Error(U)}})}signMessage({message:P,receiver:x,nonce:C,callbackUrl:N}){var k,U,z,Y,G,F;return l(this,void 0,void 0,function*(){const{id:j}=yield this.defaultProvider.createSignMessage(this.network,P,x,C,N,this.dAppMetadata);null===(U=(k=this.defaultStrategy).onRequested)||void 0===U||U.call(k,j,{network:this.network,message:P,receiver:x,nonce:C,callbackUrl:N});const{response:Z,status:T}=yield this.defaultProvider.awaitMessageSignatureResolution(j);if(this.handleRequestStatus(T),!Z&&T!==g.SignerRequestStatus.APPROVED)throw new Error(d.WalletErrors.NO_SIGNATURE);try{const{publicKey:o,signature:h,accountId:w}=Z;if(!(0,m.verifySignature)({publicKey:o,signature:h,message:P,nonce:Buffer.from(C),recipient:x}))throw new Error(d.WalletErrors.INVALID_SIGNATURE);if(!(yield(yield this.account(w)).getAccessKeys()).some(L=>!(L.public_key!==o||"FullAccess"!==L.access_key.permission)))throw Error(d.WalletErrors.INVALID_ACCESS_KEY);return null===(Y=(z=this.defaultStrategy).onSuccess)||void 0===Y||Y.call(z),{signature:h,publicKey:o,message:P,accountId:w,receiver:x,nonce:C,callbackUrl:N}}catch(o){throw null===(F=(G=this.defaultStrategy).onError)||void 0===F||F.call(G),new Error(o)}})}}},93730:(q,n)=>{"use strict";var u,l;Object.defineProperty(n,"__esModule",{value:!0}),n.WalletErrors=void 0,(l=u||(n.WalletErrors=u={})).NO_ACTIVE_ACCOUNT="NO_ACTIVE_ACCOUNT",l.NO_ACCOUNT_LOCAL_KEY="NO_ACCOUNT_LOCAL_KEY",l.INVALID_ACCESS_KEY="INVALID_ACCESS_KEY",l.NO_SIGNER_ACCOUNT_ID="NO_SIGNER_ACCOUNT_ID",l.REQUEST_NOT_SIGNED="REQUEST_NOT_SIGNED",l.NO_SIGNATURE="NO_SIGNATURE",l.INVALID_SIGNATURE="INVALID_SIGNATURE",l.OPERATION_FAILED="OPERATION_FAILED"},12139:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(f,d,p,m){return new(p||(p=Promise))(function(_,D){function P(N){try{C(m.next(N))}catch(k){D(k)}}function x(N){try{C(m.throw(N))}catch(k){D(k)}}function C(N){N.done?_(N.value):function S(_){return _ instanceof p?_:new p(function(D){D(_)})}(N.value).then(P,x)}C((m=m.apply(f,d||[])).next())})},v=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.NearMobileSignerProxy=void 0;const E=v(u(76913)),M=v(u(33492)),s=u(39825),g=u(9273);n.NearMobileSignerProxy=class y{createRequest(d,p,m){return l(this,void 0,void 0,function*(){return yield g.SignerRequestApi.createSignerRequest({network:d,transactions:p,dAppMetadata:m})})}awaitActionSignatureResolution(d){return l(this,void 0,void 0,function*(){return yield(0,M.default)(()=>g.SignerRequestApi.getSignerRequestStatus(d),({status:p})=>p===s.SignerRequestStatus.PENDING,{maxIterations:E.default.polling.maxIterations})})}getRequest(d){return l(this,void 0,void 0,function*(){return yield g.SignerRequestApi.getSignerRequest(d)})}createSignMessage(d,p,m,S,_,D){return l(this,void 0,void 0,function*(){return yield g.SignerRequestApi.createSignMessageRequest({network:d,message:p,receiver:m,nonce:S,callbackUrl:_,receiverMetadata:D})})}awaitMessageSignatureResolution(d){return l(this,void 0,void 0,function*(){return yield(0,M.default)(()=>g.SignerRequestApi.getSignMessageRequest(d),({response:p,status:m})=>!p&&m===s.SignerRequestStatus.PENDING,{maxIterations:E.default.polling.maxIterations})})}rejectSignerRequest(d){return l(this,void 0,void 0,function*(){yield g.SignerRequestApi.rejectSignerRequest(d)})}}},97186:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetStrategy=void 0;const v=l(u(76913));class M{constructor(){this.widgetUrl=v.default.widgetUrl,null==M.connector&&(M.connector=(s=>{const g=document.createElement("iframe");return g.src=s,g.style.border="none",g.style.zIndex="10000",g.style.position="fixed",g.style.display="none",g.style.top="0",g.style.left="0",g.style.width="100%",g.style.height="100%",document.body.appendChild(g),g})(this.widgetUrl),M.connector.addEventListener("load",()=>{M.isLoaded=!0}))}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),null!=M.connector&&(M.connector.style.display="none")}onRequested(g,y,f){if(null==M.connector)return;M.connector.style.display="block";const d=()=>{var p,m;M.connector.removeEventListener("load",d);const S="message"in y?"message":"request",_=`${v.default.nearMobileWalletUrl}/${S}/${g}`;null===(m=null===(p=M.connector)||void 0===p?void 0:p.contentWindow)||void 0===m||m.postMessage({requestUrl:_,isNearMobile:!!window.isNearMobile},new URL(this.widgetUrl).origin)};M.isLoaded?d():M.connector.addEventListener("load",d),this.messageHandler=p=>{p.origin===new URL(this.widgetUrl).origin&&"close"===p.data&&(f?.(),this.onError())},window.addEventListener("message",this.messageHandler)}onApproved(){this.close()}onSuccess(){this.close()}onError(){this.close()}}n.WidgetStrategy=M,M.isLoaded=!1},99868:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.payloadSchema=n.Payload=void 0;class u{constructor(v){this.tag=2147484061,this.message=v.message,this.nonce=v.nonce,this.recipient=v.recipient,v.callbackUrl&&(this.callbackUrl=v.callbackUrl)}}n.Payload=u,n.payloadSchema=new Map([[u,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]])},94196:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.verifySignature=void 0;const l=u(8597),v=u(21531),E=u(1520),M=u(99868);n.verifySignature=({publicKey:g,signature:y,message:f,nonce:d,recipient:p,callbackUrl:m})=>{const S=new M.Payload({message:f,nonce:d,recipient:p,callbackUrl:m}),_=(0,v.serialize)(M.payloadSchema,S),D=Uint8Array.from(E.sha256.array(_)),P=Buffer.from(y,"base64");return l.utils.PublicKey.from(g).verify(D,P)}},85051:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;const v=u(29761),E=u(69170);class s extends E.KeyStore{constructor(y=window.localStorage,f="near-api-js:keystore:"){super(),this.localStorage=y,this.prefix=f}setKey(y,f,d){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(y,f),d.toString())})}getKey(y,f){return l(this,void 0,void 0,function*(){const d=this.localStorage.getItem(this.storageKeyForSecretKey(y,f));return d?v.KeyPair.fromString(d):null})}removeKey(y,f){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(y,f))})}clear(){return l(this,void 0,void 0,function*(){for(const y of this.storageKeys())y.startsWith(this.prefix)&&this.localStorage.removeItem(y)})}getNetworks(){return l(this,void 0,void 0,function*(){const y=new Set;for(const f of this.storageKeys())if(f.startsWith(this.prefix)){const d=f.substring(this.prefix.length).split(":");y.add(d[1])}return Array.from(y.values())})}getAccounts(y){return l(this,void 0,void 0,function*(){const f=new Array;for(const d of this.storageKeys())if(d.startsWith(this.prefix)){const p=d.substring(this.prefix.length).split(":");p[1]===y&&f.push(p[0])}return f})}storageKeyForSecretKey(y,f){return`${this.prefix}${f}:${y}`}*storageKeys(){for(let y=0;y{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(85051);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},35103:function(q,n){"use strict";var u=this&&this.__awaiter||function(E,M,s,g){return new(s||(s=Promise))(function(f,d){function p(_){try{S(g.next(_))}catch(D){d(D)}}function m(_){try{S(g.throw(_))}catch(D){d(D)}}function S(_){_.done?f(_.value):function y(f){return f instanceof s?f:new s(function(d){d(f)})}(_.value).then(p,m)}S((g=g.apply(E,M||[])).next())})};function v(E){return new Promise(M=>setTimeout(M,E))}Object.defineProperty(n,"__esModule",{value:!0}),n.exponentialBackoff=void 0,n.exponentialBackoff=function l(E,M,s,g){return u(this,void 0,void 0,function*(){let y=E;for(let f=0;f!process.env.NEAR_NO_LOGS&&console.warn(...D);n.fetchJson=function _(D,P){return M(this,void 0,void 0,function*(){let x={url:null};"string"==typeof D?x.url=D:x=D;const C=yield(0,f.exponentialBackoff)(d,m,p,()=>M(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(u(75645)))).default);const N=yield global.fetch(x.url,{method:P?"POST":"GET",body:P||void 0,headers:Object.assign(Object.assign({},x.headers),{"Content-Type":"application/json"})});if(!N.ok){if(503===N.status)return S(`Retrying HTTP request for ${x.url} as it's not available now`),null;throw(0,y.default)(N.status,yield N.text())}return N}catch(N){if(N.toString().includes("FetchError")||N.toString().includes("Failed to fetch"))return S(`Retrying HTTP request for ${x.url} because of error: ${N}`),null;throw N}}));if(!C)throw new g.TypedError(`Exceeded ${m} attempts for ${x.url}.`,"RetriesExceeded");return yield C.json()})}},1739:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=n.Provider=n.JsonRpcProvider=n.exponentialBackoff=void 0;var l=u(35103);Object.defineProperty(n,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var v=u(44459);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}});var E=u(95326);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return E.Provider}});var M=u(243);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return M.fetchJson}})},44459:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(P,x,C,N){return new(C||(C=Promise))(function(U,z){function Y(j){try{F(N.next(j))}catch(Z){z(Z)}}function G(j){try{F(N.throw(j))}catch(Z){z(Z)}}function F(j){j.done?U(j.value):function k(U){return U instanceof C?U:new C(function(z){z(U)})}(j.value).then(Y,G)}F((N=N.apply(P,x||[])).next())})},v=this&&this.__rest||function(P,x){var C={};for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&x.indexOf(N)<0&&(C[N]=P[N]);if(null!=P&&"function"==typeof Object.getOwnPropertySymbols){var k=0;for(N=Object.getOwnPropertySymbols(P);kl(this,void 0,void 0,function*(){try{const U={method:x,params:C,id:_++,jsonrpc:"2.0"},z=yield(0,d.fetchJson)(this.connection,JSON.stringify(U));if(z.error){if("object"==typeof z.error.data)throw"string"==typeof z.error.data.error_message&&"string"==typeof z.error.data.error_type?new M.TypedError(z.error.data.error_message,z.error.data.error_type):(0,E.parseRpcError)(z.error.data);{const Y=`[${z.error.code}] ${z.error.message}: ${z.error.data}`;throw"Timeout"===z.error.data||Y.includes("Timeout error")||Y.includes("query has timed out")?new M.TypedError(Y,"TimeoutError"):new M.TypedError(Y,(0,E.getErrorTypeFromErrorMessage)(z.error.data,z.error.name))}}return z}catch(U){if("TimeoutError"===U.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${x} as it has timed out`,C),null;throw U}})),{result:k}=N;if(typeof k>"u")throw new M.TypedError(`Exceeded 12 attempts for request to ${x}.`,"RetriesExceeded");return k})}}n.JsonRpcProvider=D},95326:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Provider=void 0;n.Provider=class u{}},62047:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0;const v=l(u(98538));n.DEFAULT_FUNCTION_CALL_GAS=new v.default("30000000000000")},83622:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0,n.logWarning=function u(...l){process.env.NEAR_NO_LOGS||console.warn(...l)}},41248:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(83622);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(75233);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},75233:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(48001)),M=u(25873),s=l(u(19472)),g=l(u(5027)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},25873:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(98538));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=new v.default("10",10).pow(new v.default(n.NEAR_NOMINATION_EXP,10));const E=[],M=new v.default(10);for(let m=0,S=new v.default(5);m0&&_.iadd(E[x])}const D=(m=_.toString()).substring(0,m.length-n.NEAR_NOMINATION_EXP)||"0",P=m.substring(m.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,S);return function f(m){return m.replace(/\.?0*$/,"")}(`${function p(m){const S=/(-?\d+)(\d{3})/;for(;S.test(m);)m=m.replace(S,"$1,$2");return m}(D)}.${P}`)},n.parseNearAmount=function g(m){if(!m)return null;const S=(m=function y(m){return m.replace(/,/g,"").trim()}(m)).split("."),_=S[0],D=S[1]||"";if(S.length>2||D.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${m}' as NEAR amount`);return function d(m){return m=m.replace(/^0+/,""),""===m?"0":m}(_+D.padEnd(n.NEAR_NOMINATION_EXP,"0"))}},32114:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(62047),n),v(u(41248),n),v(u(25873),n),v(u(89505),n),v(u(97151),n),v(u(78970),n)},89505:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(41248),v=!!process.env.NEAR_NO_LOGS;function M({contractId:s,logs:g,prefix:y=""}){if(!v)for(const f of g)console.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){if(v)return;const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)console.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&console.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},97151:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},78970:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(98538)),E=l(u(89176));n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>new v.default(P.stake,10)).sort((P,x)=>P.cmp(x)),m=new v.default(d),S=p.reduce((P,x)=>P.add(x));if(S.lt(m))throw new Error("Stakes are below seats");let _=new v.default(1),D=S.add(new v.default(1));for(;!_.eq(D.sub(new v.default(1)));){const P=_.add(D).div(new v.default(2));let x=!1,C=new v.default(0);for(let N=0;Nnew v.default(_.stake,10)).sort((_,D)=>_.cmp(D)),S=m.reduce((_,D)=>_.add(D));return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},52596:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=void 0;var l=u(56557);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}});var v=u(55193);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return v.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return v.WalletConnection}})},56557:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})},v=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;const E=u(74931),M=v(u(98538));n.Near=class s{constructor(y){var f;if(this.config=y,this.connection=E.Connection.fromConfig({networkId:y.networkId,provider:{type:"JsonRpcProvider",args:{url:y.nodeUrl,headers:y.headers}},signer:y.signer||{type:"InMemorySigner",keyStore:y.keyStore||(null===(f=y.deps)||void 0===f?void 0:f.keyStore)},jsvmAccountId:y.jsvmAccountId||`jsvm.${y.networkId}`}),y.masterAccount){const d=y.initialBalance?new M.default(y.initialBalance):new M.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,y.masterAccount),d)}else y.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,y.helperUrl):this.accountCreator=null}account(y){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,y)})}createAccount(y,f){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(y,f),new E.Account(this.connection,y)})}}},55193:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})},v=this&&this.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectedWalletAccount=n.WalletConnection=void 0;const E=u(74931),M=u(29761),s=u(38445),g=v(u(98538)),y=u(21531),m="pending_key";n.WalletConnection=class S{constructor(P,x){if("string"!=typeof x)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(k,U)=>"isSignedIn"===U?()=>!1:"getAccountId"===U?()=>"":k[U]&&"function"==typeof k[U]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:k[U]});this._near=P;const C=x+"_wallet_auth_key",N=JSON.parse(window.localStorage.getItem(C));this._networkId=P.config.networkId,this._walletBaseUrl=P.config.walletUrl,x=x||P.config.contractName||"default",this._keyStore=P.connection.signer.keyStore,this._authData=N||{allKeys:[]},this._authDataKey=C,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:P,methodNames:x,successUrl:C,failureUrl:N}){return l(this,void 0,void 0,function*(){const k=new URL(window.location.href),U=new URL(this._walletBaseUrl+"/login/");if(U.searchParams.set("success_url",C||k.href),U.searchParams.set("failure_url",N||k.href),P){yield(yield this._near.account(P)).state(),U.searchParams.set("contract_id",P);const Y=M.KeyPair.fromRandom("ed25519");U.searchParams.set("public_key",Y.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,m+Y.getPublicKey(),Y)}x&&x.forEach(z=>{U.searchParams.append("methodNames",z)}),window.location.assign(U.toString())})}requestSignTransactions({transactions:P,meta:x,callbackUrl:C}){return l(this,void 0,void 0,function*(){const N=new URL(window.location.href),k=new URL("sign",this._walletBaseUrl);k.searchParams.set("transactions",P.map(U=>(0,y.serialize)(s.SCHEMA,U)).map(U=>Buffer.from(U).toString("base64")).join(",")),k.searchParams.set("callbackUrl",C||N.href),x&&k.searchParams.set("meta",x),window.location.assign(k.toString())})}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const P=new URL(window.location.href),x=P.searchParams.get("public_key")||"",C=(P.searchParams.get("all_keys")||"").split(","),N=P.searchParams.get("account_id")||"";if(N){const k={accountId:N,allKeys:C};window.localStorage.setItem(this._authDataKey,JSON.stringify(k)),x&&(yield this._moveKeyFromTempToPermanent(N,x)),this._authData=k}P.searchParams.delete("public_key"),P.searchParams.delete("all_keys"),P.searchParams.delete("account_id"),P.searchParams.delete("meta"),P.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,P.toString())})}_moveKeyFromTempToPermanent(P,x){return l(this,void 0,void 0,function*(){const C=yield this._keyStore.getKey(this._networkId,m+x);yield this._keyStore.setKey(this._networkId,P,C),yield this._keyStore.removeKey(this._networkId,m+x)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new _(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class _ extends E.Account{constructor(P,x,C){super(x,C),this.walletConnection=P}signAndSendTransaction({receiverId:P,actions:x,walletMeta:C,walletCallbackUrl:N=window.location.href}){const k=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const U=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let z=yield this.accessKeyForTransaction(P,x,U);if(!z)throw new Error(`Cannot find matching key for transaction sent to ${P}`);if(U&&U.toString()===z.public_key)try{return yield k.signAndSendTransaction.call(this,{receiverId:P,actions:x})}catch(T){if("NotEnoughAllowance"!==T.type)throw T;z=yield this.accessKeyForTransaction(P,x)}const Y=yield this.connection.provider.block({finality:"final"}),G=(0,y.baseDecode)(Y.header.hash),F=M.PublicKey.from(z.public_key),j=z.access_key.nonce.add(new g.default(1)),Z=(0,s.createTransaction)(this.accountId,F,P,j,x,G);return yield this.walletConnection.requestSignTransactions({transactions:[Z],meta:C,callbackUrl:N}),new Promise((T,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(P,x,C){return l(this,void 0,void 0,function*(){const{access_key:{permission:N}}=P;if("FullAccess"===N)return!0;if(N.FunctionCall){const{receiver_id:k,method_names:U}=N.FunctionCall;if(k===this.accountId&&U.includes("add_request_and_confirm"))return!0;if(k===x){if(1!==C.length)return!1;const[{functionCall:z}]=C;return z&&(!z.deposit||"0"===z.deposit.toString())&&(0===U.length||U.includes(z.methodName))}}return!1})}accessKeyForTransaction(P,x,C){return l(this,void 0,void 0,function*(){const N=yield this.getAccessKeys();if(C){const U=N.find(z=>z.public_key.toString()===C.toString());if(U&&(yield this.accessKeyMatchesTransaction(U,P,x)))return U}const k=this.walletConnection._authData.allKeys;for(const U of N)if(-1!==k.indexOf(U.public_key)&&(yield this.accessKeyMatchesTransaction(U,P,x)))return U;return null})}}n.ConnectedWalletAccount=_},52602:(q,n,u)=>{"use strict";var l=u(9028)("http-errors"),v=u(1106),E=u(31831),M=u(83894),s=u(77721);function g(P){return Number(String(P).charAt(0)+"00")}function S(P,x){var C=Object.getOwnPropertyDescriptor(P,"name");C&&C.configurable&&(C.value=x,Object.defineProperty(P,"name",C))}function D(P){return"Error"!==P.substr(-5)?P+"Error":P}q.exports=function y(){for(var P,x,C=500,N={},k=0;k=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof C||!E[C]&&(C<400||C>=600))&&(C=500);var z=y[C]||y[g(C)];for(var Y in P||(P=z?new z(x):new Error(x||E[C]),Error.captureStackTrace(P,y)),(!z||!(P instanceof z)||P.status!==C)&&(P.expose=C<500,P.status=P.statusCode=C),N)"status"!==Y&&"statusCode"!==Y&&(P[Y]=N[Y]);return P},q.exports.HttpError=function f(){function P(){throw new TypeError("cannot construct abstract class")}return M(P,Error),P}(),q.exports.isHttpError=function p(P){return function(C){return!(!C||"object"!=typeof C)&&(C instanceof P||C instanceof Error&&"boolean"==typeof C.expose&&"number"==typeof C.statusCode&&C.status===C.statusCode)}}(q.exports.HttpError),function _(P,x,C){x.forEach(function(k){var U,z=s(E[k]);switch(g(k)){case 400:U=function d(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!0,k}(C,z,k);break;case 500:U=function m(P,x,C){var N=D(x);function k(U){var z=U??E[C],Y=new Error(z);return Error.captureStackTrace(Y,k),v(Y,k.prototype),Object.defineProperty(Y,"message",{enumerable:!0,configurable:!0,value:z,writable:!0}),Object.defineProperty(Y,"name",{enumerable:!1,configurable:!0,value:N,writable:!0}),Y}return M(k,P),S(k,N),k.prototype.status=C,k.prototype.statusCode=C,k.prototype.expose=!1,k}(C,z,k)}U&&(P[k]=U,P[z]=U)}),P["I'mateapot"]=l.function(P.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(q.exports,E.codes,q.exports.HttpError)},9028:q=>{"use strict";function u(v,E){if("function"!=typeof v)throw new TypeError("argument fn must be a function");return v}function l(v,E,M){if(!v||"object"!=typeof v&&"function"!=typeof v)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(v,E);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable")}q.exports=function n(v){if(!v)throw new TypeError("argument namespace is required");function E(M){}return E._file=void 0,E._ignored=!0,E._namespace=v,E._traced=!1,E._warned=Object.create(null),E.function=u,E.property=l,E}},48001:function(q){q.exports=function(){"use strict";var n=Object.prototype.toString,u=Array.isArray||function(Z){return"[object Array]"===n.call(Z)};function l(j){return"function"==typeof j}function v(j){return u(j)?"array":typeof j}function E(j){return j.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function M(j,Z){return null!=j&&"object"==typeof j&&Z in j}function s(j,Z){return null!=j&&"object"!=typeof j&&j.hasOwnProperty&&j.hasOwnProperty(Z)}var g=RegExp.prototype.test;function y(j,Z){return g.call(j,Z)}var f=/\S/;function d(j){return!y(f,j)}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function m(j){return String(j).replace(/[&<>"'`=\/]/g,function(T){return p[T]})}var S=/\s*/,_=/\s+/,D=/\s*=/,P=/\s*\}/,x=/#|\^|\/|>|\{|&|=|!/;function C(j,Z){if(!j)return[];var b,B,re,T=!1,o=[],h=[],w=[],I=!1,R=!1,V="",H=0;function L(){if(I&&!R)for(;w.length;)delete h[w.pop()];else w=[];I=!1,R=!1}function ne(he){if("string"==typeof he&&(he=he.split(_,2)),!u(he)||2!==he.length)throw new Error("Invalid tags: "+he);b=new RegExp(E(he[0])+"\\s*"),B=new RegExp("\\s*"+E(he[1])),re=new RegExp("\\s*"+E("}"+he[1]))}ne(Z||G.tags);for(var ae,ge,pe,we,ce,le,te=new U(j);!te.eos();){if(ae=te.pos,pe=te.scanUntil(b))for(var ue=0,fe=pe.length;ue0?o[o.length-1][4]:Z;break;default:T.push(h)}return Z}function U(j){this.string=j,this.tail=j,this.pos=0}function z(j,Z){this.view=j,this.cache={".":this.view},this.parent=Z}function Y(){this.templateCache={_cache:{},set:function(Z,T){this._cache[Z]=T},get:function(Z){return this._cache[Z]},clear:function(){this._cache={}}}}U.prototype.eos=function(){return""===this.tail},U.prototype.scan=function(Z){var T=this.tail.match(Z);if(!T||0!==T.index)return"";var o=T[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},U.prototype.scanUntil=function(Z){var o,T=this.tail.search(Z);switch(T){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,T),this.tail=this.tail.substring(T)}return this.pos+=o.length,o},z.prototype.push=function(Z){return new z(Z,this)},z.prototype.lookup=function(Z){var o,T=this.cache;if(T.hasOwnProperty(Z))o=T[Z];else{for(var w,I,R,h=this,V=!1;h;){if(Z.indexOf(".")>0)for(w=h.view,I=Z.split("."),R=0;null!=w&&R"===V?H=this.renderPartial(R,T,o,w):"&"===V?H=this.unescapedValue(R,T):"name"===V?H=this.escapedValue(R,T,w):"text"===V&&(H=this.rawValue(R)),void 0!==H&&(I+=H);return I},Y.prototype.renderSection=function(Z,T,o,h,w){var I=this,R="",V=T.lookup(Z[1]);function H(B){return I.render(B,T,o,w)}if(V){if(u(V))for(var L=0,b=V.length;L0||!o)&&(w[I]=h+w[I]);return w.join("\n")},Y.prototype.renderPartial=function(Z,T,o,h){if(o){var w=this.getConfigTags(h),I=l(o)?o(Z[1]):o[Z[1]];if(null!=I){var R=Z[6],V=Z[5],H=Z[4],L=I;0==V&&H&&(L=this.indentPartial(I,H,R));var b=this.parse(L,w);return this.renderTokens(b,T,o,L,h)}}},Y.prototype.unescapedValue=function(Z,T){var o=T.lookup(Z[1]);if(null!=o)return o},Y.prototype.escapedValue=function(Z,T,o){var h=this.getConfigEscape(o)||G.escape,w=T.lookup(Z[1]);if(null!=w)return"number"==typeof w&&h===G.escape?String(w):h(w)},Y.prototype.rawValue=function(Z){return Z[1]},Y.prototype.getConfigTags=function(Z){return u(Z)?Z:Z&&"object"==typeof Z?Z.tags:void 0},Y.prototype.getConfigEscape=function(Z){if(Z&&"object"==typeof Z&&!u(Z))return Z.escape};var G={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(j){F.templateCache=j},get templateCache(){return F.templateCache}},F=new Y;return G.clearCache=function(){return F.clearCache()},G.parse=function(Z,T){return F.parse(Z,T)},G.render=function(Z,T,o,h){if("string"!=typeof Z)throw new TypeError('Invalid template! Template should be a "string" but "'+v(Z)+'" was given as the first argument for mustache#render(template, view, partials)');return F.render(Z,T,o,h)},G.escape=m,G.Scanner=U,G.Context=z,G.Writer=Y,G}()},60144:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;var l=u(74931);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}})},30115:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;var l=u(74931);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},32164:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.AccountMultisig=n.Account2FA=void 0;var l=u(74931);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},76207:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.connect=void 0;const v=u(33906);n.connect=function E(M){return l(this,void 0,void 0,function*(){return new v.Near(M)})}},8597:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(s,g,y,f){void 0===f&&(f=y);var d=Object.getOwnPropertyDescriptor(g,y);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(s,f,d)}:function(s,g,y,f){void 0===f&&(f=y),s[f]=g[y]}),v=this&&this.__setModuleDefault||(Object.create?function(s,g){Object.defineProperty(s,"default",{enumerable:!0,value:g})}:function(s,g){s.default=g}),E=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var g={};if(null!=s)for(var y in s)"default"!==y&&Object.prototype.hasOwnProperty.call(s,y)&&l(g,s,y);return v(g,s),g},M=this&&this.__exportStar||function(s,g){for(var y in s)"default"!==y&&!Object.prototype.hasOwnProperty.call(g,y)&&l(g,s,y)};Object.defineProperty(n,"__esModule",{value:!0}),n.keyStores=void 0,n.keyStores=E(u(46015)),M(u(29424),n),M(u(76207),n),u(4073)},29424:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(C,N,k,U){void 0===U&&(U=k);var z=Object.getOwnPropertyDescriptor(N,k);(!z||("get"in z?!N.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return N[k]}}),Object.defineProperty(C,U,z)}:function(C,N,k,U){void 0===U&&(U=k),C[U]=N[k]}),v=this&&this.__setModuleDefault||(Object.create?function(C,N){Object.defineProperty(C,"default",{enumerable:!0,value:N})}:function(C,N){C.default=N}),E=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var N={};if(null!=C)for(var k in C)"default"!==k&&Object.prototype.hasOwnProperty.call(C,k)&&l(N,C,k);return v(N,C),N};Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=n.KeyPair=n.Signer=n.InMemorySigner=n.Contract=n.Connection=n.Account=n.multisig=n.validators=n.transactions=n.utils=n.providers=n.accountCreator=void 0;const M=E(u(87974));n.providers=M;const s=E(u(75141));n.utils=s;const g=E(u(41468));n.transactions=g;const y=E(u(90744));n.validators=y;const f=u(60144);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return f.Account}});const d=E(u(32164));n.multisig=d;const p=E(u(30115));n.accountCreator=p;const m=u(60177);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return m.Connection}});const S=u(96519);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return S.Signer}}),Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return S.InMemorySigner}});const _=u(20866);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return _.Contract}});const D=u(93633);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});const P=u(33906);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return P.Near}});const x=u(85091);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return x.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return x.WalletConnection}})},60177:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;var l=u(74931);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return l.Connection}})},20866:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;var l=u(74931);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return l.Contract}})},46015:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.BrowserLocalStorageKeyStore=n.InMemoryKeyStore=n.KeyStore=void 0;const l=u(60987);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const v=u(21473);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return v.InMemoryKeyStore}});const E=u(94974);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const M=u(26523);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},94974:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(82540);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},21473:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.InMemoryKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},60987:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyStore=void 0;var l=u(69170);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},26523:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},33906:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;var l=u(52596);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}})},87974:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorContext=n.TypedError=n.getTransactionLastResult=n.FinalExecutionStatusBasic=n.JsonRpcProvider=n.Provider=void 0;const l=u(71308);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const v=u(21355);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}})},21355:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcProvider=n.TypedError=n.ErrorContext=void 0;var l=u(17527);Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var v=u(1739);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}})},71308:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=n.IdType=n.Provider=n.getTransactionLastResult=void 0;var l=u(32114);Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var v=u(1739);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return v.Provider}});var E=u(17527);Object.defineProperty(n,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(n,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},96519:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(82613);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return l.Signer}})},41468:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transfer=n.stake=n.functionCallAccessKey=n.functionCall=n.fullAccessKey=n.deployContract=n.deleteKey=n.deleteAccount=n.createAccount=n.addKey=n.encodeDelegateAction=n.encodeSignedDelegate=n.Transaction=n.SignedTransaction=n.Signature=n.signTransaction=n.createTransaction=n.SCHEMA=n.Transfer=n.Stake=n.FunctionCallPermission=n.FunctionCall=n.FullAccessPermission=n.DeployContract=n.DeleteKey=n.DeleteAccount=n.CreateAccount=n.AddKey=n.AccessKeyPermission=n.AccessKey=n.Action=n.stringifyJsonOrBytes=void 0;var l=u(38445);Object.defineProperty(n,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(n,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(n,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(n,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(n,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(n,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(n,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(n,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(n,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(n,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(n,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(n,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(n,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(n,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(n,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(n,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(n,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(n,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(n,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(n,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(n,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const v=u(38445);n.addKey=(_,D)=>v.actionCreators.addKey(_,D);n.createAccount=()=>v.actionCreators.createAccount();n.deleteAccount=_=>v.actionCreators.deleteAccount(_);n.deleteKey=_=>v.actionCreators.deleteKey(_);n.deployContract=_=>v.actionCreators.deployContract(_);n.fullAccessKey=()=>v.actionCreators.fullAccessKey();n.functionCall=(_,D,P,x,C,N)=>v.actionCreators.functionCall(_,D,P,x,C,N);n.functionCallAccessKey=(_,D,P)=>v.actionCreators.functionCallAccessKey(_,D,P);n.stake=(_,D)=>v.actionCreators.stake(_,D);n.transfer=_=>v.actionCreators.transfer(_)},64179:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Enum=n.Assignable=void 0;var l=u(17527);Object.defineProperty(n,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});n.Enum=class v{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(s=>{this[s]=M[s],this.enum=s})}}},342:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.TypedError=n.PositionalArgsError=n.ErrorContext=n.ArgumentTypeError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=void 0;var l=u(74931);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var v=u(17527);Object.defineProperty(n,"ArgumentTypeError",{enumerable:!0,get:function(){return v.ArgumentTypeError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}}),Object.defineProperty(n,"PositionalArgsError",{enumerable:!0,get:function(){return v.PositionalArgsError}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}});var E=u(32114);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},76185:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION_EXP=n.NEAR_NOMINATION=void 0;var l=u(32114);Object.defineProperty(n,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(n,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(n,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(n,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},75141:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(S,_,D,P){void 0===P&&(P=D);var x=Object.getOwnPropertyDescriptor(_,D);(!x||("get"in x?!_.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return _[D]}}),Object.defineProperty(S,P,x)}:function(S,_,D,P){void 0===P&&(P=D),S[P]=_[D]}),v=this&&this.__setModuleDefault||(Object.create?function(S,_){Object.defineProperty(S,"default",{enumerable:!0,value:_})}:function(S,_){S.default=_}),E=this&&this.__importStar||function(S){if(S&&S.__esModule)return S;var _={};if(null!=S)for(var D in S)"default"!==D&&Object.prototype.hasOwnProperty.call(S,D)&&l(_,S,D);return v(_,S),_};Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.rpc_errors=n.KeyPairEd25519=n.KeyPair=n.PublicKey=n.format=n.enums=n.web=n.serialize=n.key_pair=void 0;const M=E(u(93633));n.key_pair=M;const s=E(u(55822));n.serialize=s;const g=E(u(63770));n.web=g;const y=E(u(64179));n.enums=y;const f=E(u(76185));n.format=f;const d=E(u(1158));n.rpc_errors=d;const p=u(93633);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}}),Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}});const m=u(342);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return m.logWarning}})},93633:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyType=n.KeyPairEd25519=n.KeyPair=void 0;var l=u(29761);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},1158:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ServerError=n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=void 0;var l=u(32114);Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},55822:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BinaryReader=n.BinaryWriter=n.BorshError=n.deserialize=n.serialize=n.base_decode=n.base_encode=void 0;var l=u(21531);Object.defineProperty(n,"base_encode",{enumerable:!0,get:function(){return l.baseEncode}}),Object.defineProperty(n,"base_decode",{enumerable:!0,get:function(){return l.baseDecode}}),Object.defineProperty(n,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(n,"deserialize",{enumerable:!0,get:function(){return l.deserialize}}),Object.defineProperty(n,"BorshError",{enumerable:!0,get:function(){return l.BorshError}}),Object.defineProperty(n,"BinaryWriter",{enumerable:!0,get:function(){return l.BinaryWriter}}),Object.defineProperty(n,"BinaryReader",{enumerable:!0,get:function(){return l.BinaryReader}})},63770:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=void 0;var l=u(1739);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},90744:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findSeatPrice=n.diffEpochValidators=void 0;var l=u(32114);Object.defineProperty(n,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(n,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},85091:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=void 0;var l=u(52596);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},31831:(q,n,u)=>{"use strict";var l=u(31008);function E(M){if("number"==typeof M){if(!E[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var s=parseInt(M,10);if(!isNaN(s)){if(!E[s])throw new Error("invalid status code: "+s);return s}if(!(s=E[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return s}q.exports=E,E.STATUS_CODES=l,E.codes=function v(M,s){var g=[];return Object.keys(s).forEach(function(f){var d=s[f],p=Number(f);M[p]=d,M[d]=p,M[d.toLowerCase()]=p,g.push(p)}),g}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},54502:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var l=u(8046);function g(R,V,H){return void 0===V&&(V=new Uint8Array(2)),void 0===H&&(H=0),V[H+0]=R>>>8,V[H+1]=R>>>0,V}function y(R,V,H){return void 0===V&&(V=new Uint8Array(2)),void 0===H&&(H=0),V[H+0]=R>>>0,V[H+1]=R>>>8,V}function f(R,V){return void 0===V&&(V=0),R[V]<<24|R[V+1]<<16|R[V+2]<<8|R[V+3]}function d(R,V){return void 0===V&&(V=0),(R[V]<<24|R[V+1]<<16|R[V+2]<<8|R[V+3])>>>0}function p(R,V){return void 0===V&&(V=0),R[V+3]<<24|R[V+2]<<16|R[V+1]<<8|R[V]}function m(R,V){return void 0===V&&(V=0),(R[V+3]<<24|R[V+2]<<16|R[V+1]<<8|R[V])>>>0}function S(R,V,H){return void 0===V&&(V=new Uint8Array(4)),void 0===H&&(H=0),V[H+0]=R>>>24,V[H+1]=R>>>16,V[H+2]=R>>>8,V[H+3]=R>>>0,V}function _(R,V,H){return void 0===V&&(V=new Uint8Array(4)),void 0===H&&(H=0),V[H+0]=R>>>0,V[H+1]=R>>>8,V[H+2]=R>>>16,V[H+3]=R>>>24,V}function N(R,V,H){return void 0===V&&(V=new Uint8Array(8)),void 0===H&&(H=0),S(R/4294967296>>>0,V,H),S(R>>>0,V,H+4),V}function k(R,V,H){return void 0===V&&(V=new Uint8Array(8)),void 0===H&&(H=0),_(R>>>0,V,H),_(R/4294967296>>>0,V,H+4),V}n.readInt16BE=function v(R,V){return void 0===V&&(V=0),(R[V+0]<<8|R[V+1])<<16>>16},n.readUint16BE=function E(R,V){return void 0===V&&(V=0),(R[V+0]<<8|R[V+1])>>>0},n.readInt16LE=function M(R,V){return void 0===V&&(V=0),(R[V+1]<<8|R[V])<<16>>16},n.readUint16LE=function s(R,V){return void 0===V&&(V=0),(R[V+1]<<8|R[V])>>>0},n.writeUint16BE=g,n.writeInt16BE=g,n.writeUint16LE=y,n.writeInt16LE=y,n.readInt32BE=f,n.readUint32BE=d,n.readInt32LE=p,n.readUint32LE=m,n.writeUint32BE=S,n.writeInt32BE=S,n.writeUint32LE=_,n.writeInt32LE=_,n.readInt64BE=function D(R,V){void 0===V&&(V=0);var H=f(R,V),L=f(R,V+4);return 4294967296*H+L-4294967296*(L>>31)},n.readUint64BE=function P(R,V){return void 0===V&&(V=0),4294967296*d(R,V)+d(R,V+4)},n.readInt64LE=function x(R,V){void 0===V&&(V=0);var H=p(R,V);return 4294967296*p(R,V+4)+H-4294967296*(H>>31)},n.readUint64LE=function C(R,V){void 0===V&&(V=0);var H=m(R,V);return 4294967296*m(R,V+4)+H},n.writeUint64BE=N,n.writeInt64BE=N,n.writeUint64LE=k,n.writeInt64LE=k,n.readUintBE=function U(R,V,H){if(void 0===H&&(H=0),R%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(R/8>V.length-H)throw new Error("readUintBE: array is too short for the given bitLength");for(var L=0,b=1,B=R/8+H-1;B>=H;B--)L+=V[B]*b,b*=256;return L},n.readUintLE=function z(R,V,H){if(void 0===H&&(H=0),R%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(R/8>V.length-H)throw new Error("readUintLE: array is too short for the given bitLength");for(var L=0,b=1,B=H;B=L;B--)H[B]=V/b&255,b*=256;return H},n.writeUintLE=function G(R,V,H,L){if(void 0===H&&(H=new Uint8Array(R/8)),void 0===L&&(L=0),R%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!l.isSafeInteger(V))throw new Error("writeUintLE value must be an integer");for(var b=1,B=L;B{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var l=u(54502),v=u(69815),E=20;function M(f,d,p){for(var m=1634760805,S=857760878,_=2036477234,D=1797285236,P=p[3]<<24|p[2]<<16|p[1]<<8|p[0],x=p[7]<<24|p[6]<<16|p[5]<<8|p[4],C=p[11]<<24|p[10]<<16|p[9]<<8|p[8],N=p[15]<<24|p[14]<<16|p[13]<<8|p[12],k=p[19]<<24|p[18]<<16|p[17]<<8|p[16],U=p[23]<<24|p[22]<<16|p[21]<<8|p[20],z=p[27]<<24|p[26]<<16|p[25]<<8|p[24],Y=p[31]<<24|p[30]<<16|p[29]<<8|p[28],G=d[3]<<24|d[2]<<16|d[1]<<8|d[0],F=d[7]<<24|d[6]<<16|d[5]<<8|d[4],j=d[11]<<24|d[10]<<16|d[9]<<8|d[8],Z=d[15]<<24|d[14]<<16|d[13]<<8|d[12],T=m,o=S,h=_,w=D,I=P,R=x,V=C,H=N,L=k,b=U,B=z,re=Y,ne=G,te=F,ae=j,ge=Z,pe=0;pe>>16|ne<<16)|0)>>>20|I<<12,R=(R^=b=b+(te=(te^=o=o+R|0)>>>16|te<<16)|0)>>>20|R<<12,V=(V^=B=B+(ae=(ae^=h=h+V|0)>>>16|ae<<16)|0)>>>20|V<<12,H=(H^=re=re+(ge=(ge^=w=w+H|0)>>>16|ge<<16)|0)>>>20|H<<12,V=(V^=B=B+(ae=(ae^=h=h+V|0)>>>24|ae<<8)|0)>>>25|V<<7,H=(H^=re=re+(ge=(ge^=w=w+H|0)>>>24|ge<<8)|0)>>>25|H<<7,R=(R^=b=b+(te=(te^=o=o+R|0)>>>24|te<<8)|0)>>>25|R<<7,I=(I^=L=L+(ne=(ne^=T=T+I|0)>>>24|ne<<8)|0)>>>25|I<<7,R=(R^=B=B+(ge=(ge^=T=T+R|0)>>>16|ge<<16)|0)>>>20|R<<12,V=(V^=re=re+(ne=(ne^=o=o+V|0)>>>16|ne<<16)|0)>>>20|V<<12,H=(H^=L=L+(te=(te^=h=h+H|0)>>>16|te<<16)|0)>>>20|H<<12,I=(I^=b=b+(ae=(ae^=w=w+I|0)>>>16|ae<<16)|0)>>>20|I<<12,H=(H^=L=L+(te=(te^=h=h+H|0)>>>24|te<<8)|0)>>>25|H<<7,I=(I^=b=b+(ae=(ae^=w=w+I|0)>>>24|ae<<8)|0)>>>25|I<<7,V=(V^=re=re+(ne=(ne^=o=o+V|0)>>>24|ne<<8)|0)>>>25|V<<7,R=(R^=B=B+(ge=(ge^=T=T+R|0)>>>24|ge<<8)|0)>>>25|R<<7;l.writeUint32LE(T+m|0,f,0),l.writeUint32LE(o+S|0,f,4),l.writeUint32LE(h+_|0,f,8),l.writeUint32LE(w+D|0,f,12),l.writeUint32LE(I+P|0,f,16),l.writeUint32LE(R+x|0,f,20),l.writeUint32LE(V+C|0,f,24),l.writeUint32LE(H+N|0,f,28),l.writeUint32LE(L+k|0,f,32),l.writeUint32LE(b+U|0,f,36),l.writeUint32LE(B+z|0,f,40),l.writeUint32LE(re+Y|0,f,44),l.writeUint32LE(ne+G|0,f,48),l.writeUint32LE(te+F|0,f,52),l.writeUint32LE(ae+j|0,f,56),l.writeUint32LE(ge+Z|0,f,60)}function s(f,d,p,m,S){if(void 0===S&&(S=0),32!==f.length)throw new Error("ChaCha: key size must be 32 bytes");if(m.length>>=8,d++;if(m>0)throw new Error("ChaCha: counter overflow")}n.streamXOR=s,n.stream=function g(f,d,p,m){return void 0===m&&(m=0),v.wipe(p),s(f,d,p,p,m)}},95876:(q,n,u)=>{"use strict";var v=u(4484),E=u(60314),M=u(69815),s=u(54502),g=u(19976);n.Cv=32,n.WH=12,n.pg=16;var y=new Uint8Array(16),f=function(){function d(p){if(this.nonceLength=n.WH,this.tagLength=n.pg,p.length!==n.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(p)}return d.prototype.seal=function(p,m,S,_){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var D=new Uint8Array(16);D.set(p,D.length-p.length);var P=new Uint8Array(32);v.stream(this._key,D,P,4);var C,x=m.length+this.tagLength;if(_){if(_.length!==x)throw new Error("ChaCha20Poly1305: incorrect destination length");C=_}else C=new Uint8Array(x);return v.streamXOR(this._key,D,m,C,4),this._authenticate(C.subarray(C.length-this.tagLength,C.length),P,C.subarray(0,C.length-this.tagLength),S),M.wipe(D),C},d.prototype.open=function(p,m,S,_){if(p.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(m.length0&&D.update(y.subarray(_.length%16))),D.update(S),S.length%16>0&&D.update(y.subarray(S.length%16));var P=new Uint8Array(8);_&&s.writeUint64LE(_.length,P),D.update(P),s.writeUint64LE(S.length,P),D.update(P);for(var x=D.digest(),C=0;C{"use strict";function v(M,s){if(M.length!==s.length)return 0;for(var g=0,y=0;y>>8}Object.defineProperty(n,"__esModule",{value:!0}),n.select=function u(M,s,g){return~(M-1)&s|M-1&g},n.lessOrEqual=function l(M,s){return(0|M)-(0|s)-1>>>31&1},n.compare=v,n.equal=function E(M,s){return 0!==M.length&&0!==s.length&&0!==v(M,s)}},65553:(q,n,u)=>{"use strict";n.Xx=n._w=n.aP=n.KS=n.jQ=void 0;const v=u(5784),E=u(86375),M=u(69815);function s(we){const ce=new Float64Array(16);if(we)for(let le=0;le>16&1),le[Ae-1]&=65535;le[15]=ue[15]-32767-(le[14]>>16&1);const he=le[15]>>16&1;le[14]&=65535,x(ue,le,1-he)}for(let fe=0;fe<16;fe++)we[2*fe]=255&ue[fe],we[2*fe+1]=ue[fe]>>8}function N(we,ce){let le=0;for(let ue=0;ue<32;ue++)le|=we[ue]^ce[ue];return(1&le-1>>>8)-1}function k(we,ce){const le=new Uint8Array(32),ue=new Uint8Array(32);return C(le,we),C(ue,ce),N(le,ue)}function U(we){const ce=new Uint8Array(32);return C(ce,we),1&ce[0]}function Y(we,ce,le){for(let ue=0;ue<16;ue++)we[ue]=ce[ue]+le[ue]}function G(we,ce,le){for(let ue=0;ue<16;ue++)we[ue]=ce[ue]-le[ue]}function F(we,ce,le){let ue,fe,he=0,Ae=0,Pe=0,Re=0,ot=0,nt=0,Ye=0,It=0,st=0,He=0,ze=0,Be=0,Ze=0,ut=0,Me=0,ve=0,xe=0,je=0,Ge=0,Qe=0,ye=0,ke=0,et=0,qe=0,at=0,bt=0,pt=0,xt=0,kn=0,Nt=0,Ot=0,Mn=le[0],Tt=le[1],Pt=le[2],Hn=le[3],Bt=le[4],Kt=le[5],dr=le[6],Rt=le[7],Ut=le[8],Te=le[9],Se=le[10],Oe=le[11],_e=le[12],Le=le[13],Xe=le[14],At=le[15];ue=ce[0],he+=ue*Mn,Ae+=ue*Tt,Pe+=ue*Pt,Re+=ue*Hn,ot+=ue*Bt,nt+=ue*Kt,Ye+=ue*dr,It+=ue*Rt,st+=ue*Ut,He+=ue*Te,ze+=ue*Se,Be+=ue*Oe,Ze+=ue*_e,ut+=ue*Le,Me+=ue*Xe,ve+=ue*At,ue=ce[1],Ae+=ue*Mn,Pe+=ue*Tt,Re+=ue*Pt,ot+=ue*Hn,nt+=ue*Bt,Ye+=ue*Kt,It+=ue*dr,st+=ue*Rt,He+=ue*Ut,ze+=ue*Te,Be+=ue*Se,Ze+=ue*Oe,ut+=ue*_e,Me+=ue*Le,ve+=ue*Xe,xe+=ue*At,ue=ce[2],Pe+=ue*Mn,Re+=ue*Tt,ot+=ue*Pt,nt+=ue*Hn,Ye+=ue*Bt,It+=ue*Kt,st+=ue*dr,He+=ue*Rt,ze+=ue*Ut,Be+=ue*Te,Ze+=ue*Se,ut+=ue*Oe,Me+=ue*_e,ve+=ue*Le,xe+=ue*Xe,je+=ue*At,ue=ce[3],Re+=ue*Mn,ot+=ue*Tt,nt+=ue*Pt,Ye+=ue*Hn,It+=ue*Bt,st+=ue*Kt,He+=ue*dr,ze+=ue*Rt,Be+=ue*Ut,Ze+=ue*Te,ut+=ue*Se,Me+=ue*Oe,ve+=ue*_e,xe+=ue*Le,je+=ue*Xe,Ge+=ue*At,ue=ce[4],ot+=ue*Mn,nt+=ue*Tt,Ye+=ue*Pt,It+=ue*Hn,st+=ue*Bt,He+=ue*Kt,ze+=ue*dr,Be+=ue*Rt,Ze+=ue*Ut,ut+=ue*Te,Me+=ue*Se,ve+=ue*Oe,xe+=ue*_e,je+=ue*Le,Ge+=ue*Xe,Qe+=ue*At,ue=ce[5],nt+=ue*Mn,Ye+=ue*Tt,It+=ue*Pt,st+=ue*Hn,He+=ue*Bt,ze+=ue*Kt,Be+=ue*dr,Ze+=ue*Rt,ut+=ue*Ut,Me+=ue*Te,ve+=ue*Se,xe+=ue*Oe,je+=ue*_e,Ge+=ue*Le,Qe+=ue*Xe,ye+=ue*At,ue=ce[6],Ye+=ue*Mn,It+=ue*Tt,st+=ue*Pt,He+=ue*Hn,ze+=ue*Bt,Be+=ue*Kt,Ze+=ue*dr,ut+=ue*Rt,Me+=ue*Ut,ve+=ue*Te,xe+=ue*Se,je+=ue*Oe,Ge+=ue*_e,Qe+=ue*Le,ye+=ue*Xe,ke+=ue*At,ue=ce[7],It+=ue*Mn,st+=ue*Tt,He+=ue*Pt,ze+=ue*Hn,Be+=ue*Bt,Ze+=ue*Kt,ut+=ue*dr,Me+=ue*Rt,ve+=ue*Ut,xe+=ue*Te,je+=ue*Se,Ge+=ue*Oe,Qe+=ue*_e,ye+=ue*Le,ke+=ue*Xe,et+=ue*At,ue=ce[8],st+=ue*Mn,He+=ue*Tt,ze+=ue*Pt,Be+=ue*Hn,Ze+=ue*Bt,ut+=ue*Kt,Me+=ue*dr,ve+=ue*Rt,xe+=ue*Ut,je+=ue*Te,Ge+=ue*Se,Qe+=ue*Oe,ye+=ue*_e,ke+=ue*Le,et+=ue*Xe,qe+=ue*At,ue=ce[9],He+=ue*Mn,ze+=ue*Tt,Be+=ue*Pt,Ze+=ue*Hn,ut+=ue*Bt,Me+=ue*Kt,ve+=ue*dr,xe+=ue*Rt,je+=ue*Ut,Ge+=ue*Te,Qe+=ue*Se,ye+=ue*Oe,ke+=ue*_e,et+=ue*Le,qe+=ue*Xe,at+=ue*At,ue=ce[10],ze+=ue*Mn,Be+=ue*Tt,Ze+=ue*Pt,ut+=ue*Hn,Me+=ue*Bt,ve+=ue*Kt,xe+=ue*dr,je+=ue*Rt,Ge+=ue*Ut,Qe+=ue*Te,ye+=ue*Se,ke+=ue*Oe,et+=ue*_e,qe+=ue*Le,at+=ue*Xe,bt+=ue*At,ue=ce[11],Be+=ue*Mn,Ze+=ue*Tt,ut+=ue*Pt,Me+=ue*Hn,ve+=ue*Bt,xe+=ue*Kt,je+=ue*dr,Ge+=ue*Rt,Qe+=ue*Ut,ye+=ue*Te,ke+=ue*Se,et+=ue*Oe,qe+=ue*_e,at+=ue*Le,bt+=ue*Xe,pt+=ue*At,ue=ce[12],Ze+=ue*Mn,ut+=ue*Tt,Me+=ue*Pt,ve+=ue*Hn,xe+=ue*Bt,je+=ue*Kt,Ge+=ue*dr,Qe+=ue*Rt,ye+=ue*Ut,ke+=ue*Te,et+=ue*Se,qe+=ue*Oe,at+=ue*_e,bt+=ue*Le,pt+=ue*Xe,xt+=ue*At,ue=ce[13],ut+=ue*Mn,Me+=ue*Tt,ve+=ue*Pt,xe+=ue*Hn,je+=ue*Bt,Ge+=ue*Kt,Qe+=ue*dr,ye+=ue*Rt,ke+=ue*Ut,et+=ue*Te,qe+=ue*Se,at+=ue*Oe,bt+=ue*_e,pt+=ue*Le,xt+=ue*Xe,kn+=ue*At,ue=ce[14],Me+=ue*Mn,ve+=ue*Tt,xe+=ue*Pt,je+=ue*Hn,Ge+=ue*Bt,Qe+=ue*Kt,ye+=ue*dr,ke+=ue*Rt,et+=ue*Ut,qe+=ue*Te,at+=ue*Se,bt+=ue*Oe,pt+=ue*_e,xt+=ue*Le,kn+=ue*Xe,Nt+=ue*At,ue=ce[15],ve+=ue*Mn,xe+=ue*Tt,je+=ue*Pt,Ge+=ue*Hn,Qe+=ue*Bt,ye+=ue*Kt,ke+=ue*dr,et+=ue*Rt,qe+=ue*Ut,at+=ue*Te,bt+=ue*Se,pt+=ue*Oe,xt+=ue*_e,kn+=ue*Le,Nt+=ue*Xe,Ot+=ue*At,he+=38*xe,Ae+=38*je,Pe+=38*Ge,Re+=38*Qe,ot+=38*ye,nt+=38*ke,Ye+=38*et,It+=38*qe,st+=38*at,He+=38*bt,ze+=38*pt,Be+=38*xt,Ze+=38*kn,ut+=38*Nt,Me+=38*Ot,fe=1,ue=he+fe+65535,fe=Math.floor(ue/65536),he=ue-65536*fe,ue=Ae+fe+65535,fe=Math.floor(ue/65536),Ae=ue-65536*fe,ue=Pe+fe+65535,fe=Math.floor(ue/65536),Pe=ue-65536*fe,ue=Re+fe+65535,fe=Math.floor(ue/65536),Re=ue-65536*fe,ue=ot+fe+65535,fe=Math.floor(ue/65536),ot=ue-65536*fe,ue=nt+fe+65535,fe=Math.floor(ue/65536),nt=ue-65536*fe,ue=Ye+fe+65535,fe=Math.floor(ue/65536),Ye=ue-65536*fe,ue=It+fe+65535,fe=Math.floor(ue/65536),It=ue-65536*fe,ue=st+fe+65535,fe=Math.floor(ue/65536),st=ue-65536*fe,ue=He+fe+65535,fe=Math.floor(ue/65536),He=ue-65536*fe,ue=ze+fe+65535,fe=Math.floor(ue/65536),ze=ue-65536*fe,ue=Be+fe+65535,fe=Math.floor(ue/65536),Be=ue-65536*fe,ue=Ze+fe+65535,fe=Math.floor(ue/65536),Ze=ue-65536*fe,ue=ut+fe+65535,fe=Math.floor(ue/65536),ut=ue-65536*fe,ue=Me+fe+65535,fe=Math.floor(ue/65536),Me=ue-65536*fe,ue=ve+fe+65535,fe=Math.floor(ue/65536),ve=ue-65536*fe,he+=fe-1+37*(fe-1),fe=1,ue=he+fe+65535,fe=Math.floor(ue/65536),he=ue-65536*fe,ue=Ae+fe+65535,fe=Math.floor(ue/65536),Ae=ue-65536*fe,ue=Pe+fe+65535,fe=Math.floor(ue/65536),Pe=ue-65536*fe,ue=Re+fe+65535,fe=Math.floor(ue/65536),Re=ue-65536*fe,ue=ot+fe+65535,fe=Math.floor(ue/65536),ot=ue-65536*fe,ue=nt+fe+65535,fe=Math.floor(ue/65536),nt=ue-65536*fe,ue=Ye+fe+65535,fe=Math.floor(ue/65536),Ye=ue-65536*fe,ue=It+fe+65535,fe=Math.floor(ue/65536),It=ue-65536*fe,ue=st+fe+65535,fe=Math.floor(ue/65536),st=ue-65536*fe,ue=He+fe+65535,fe=Math.floor(ue/65536),He=ue-65536*fe,ue=ze+fe+65535,fe=Math.floor(ue/65536),ze=ue-65536*fe,ue=Be+fe+65535,fe=Math.floor(ue/65536),Be=ue-65536*fe,ue=Ze+fe+65535,fe=Math.floor(ue/65536),Ze=ue-65536*fe,ue=ut+fe+65535,fe=Math.floor(ue/65536),ut=ue-65536*fe,ue=Me+fe+65535,fe=Math.floor(ue/65536),Me=ue-65536*fe,ue=ve+fe+65535,fe=Math.floor(ue/65536),ve=ue-65536*fe,he+=fe-1+37*(fe-1),we[0]=he,we[1]=Ae,we[2]=Pe,we[3]=Re,we[4]=ot,we[5]=nt,we[6]=Ye,we[7]=It,we[8]=st,we[9]=He,we[10]=ze,we[11]=Be,we[12]=Ze,we[13]=ut,we[14]=Me,we[15]=ve}function j(we,ce){F(we,ce,ce)}function Z(we,ce){const le=s();let ue;for(ue=0;ue<16;ue++)le[ue]=ce[ue];for(ue=253;ue>=0;ue--)j(le,le),2!==ue&&4!==ue&&F(le,le,ce);for(ue=0;ue<16;ue++)we[ue]=le[ue]}function o(we,ce){const le=s(),ue=s(),fe=s(),he=s(),Ae=s(),Pe=s(),Re=s(),ot=s(),nt=s();G(le,we[1],we[0]),G(nt,ce[1],ce[0]),F(le,le,nt),Y(ue,we[0],we[1]),Y(nt,ce[0],ce[1]),F(ue,ue,nt),F(fe,we[3],ce[3]),F(fe,fe,p),F(he,we[2],ce[2]),Y(he,he,he),G(Ae,ue,le),G(Pe,he,fe),Y(Re,he,fe),Y(ot,ue,le),F(we[0],Ae,Pe),F(we[1],ot,Re),F(we[2],Re,Pe),F(we[3],Ae,ot)}function h(we,ce,le){for(let ue=0;ue<4;ue++)x(we[ue],ce[ue],le)}function w(we,ce){const le=s(),ue=s(),fe=s();Z(fe,ce[2]),F(le,ce[0],fe),F(ue,ce[1],fe),C(we,ue),we[31]^=U(le)<<7}function I(we,ce,le){D(we[0],y),D(we[1],f),D(we[2],f),D(we[3],y);for(let ue=255;ue>=0;--ue){const fe=le[ue/8|0]>>(7&ue)&1;h(we,ce,fe),o(ce,we),o(we,we),h(we,ce,fe)}}function R(we,ce){const le=[s(),s(),s(),s()];D(le[0],m),D(le[1],S),D(le[2],f),F(le[3],m,S),I(we,le,ce)}function V(we){if(we.length!==n.aP)throw new Error(`ed25519: seed must be ${n.aP} bytes`);const ce=(0,E.hash)(we);ce[0]&=248,ce[31]&=127,ce[31]|=64;const le=new Uint8Array(32),ue=[s(),s(),s(),s()];R(ue,ce),w(le,ue);const fe=new Uint8Array(64);return fe.set(we),fe.set(le,32),{publicKey:le,secretKey:fe}}n._w=V;const b=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function B(we,ce){let le,ue,fe,he;for(ue=63;ue>=32;--ue){for(le=0,fe=ue-32,he=ue-12;fe>4)*b[fe],le=ce[fe]>>8,ce[fe]&=255;for(fe=0;fe<32;fe++)ce[fe]-=le*b[fe];for(ue=0;ue<32;ue++)ce[ue+1]+=ce[ue]>>8,we[ue]=255&ce[ue]}function re(we){const ce=new Float64Array(64);for(let le=0;le<64;le++)ce[le]=we[le];for(let le=0;le<64;le++)we[le]=0;B(we,ce)}function te(we,ce){const le=s(),ue=s(),fe=s(),he=s(),Ae=s(),Pe=s(),Re=s();return D(we[2],f),function z(we,ce){for(let le=0;le<16;le++)we[le]=ce[2*le]+(ce[2*le+1]<<8);we[15]&=32767}(we[1],ce),j(fe,we[1]),F(he,fe,d),G(fe,fe,we[2]),Y(he,we[2],he),j(Ae,he),j(Pe,Ae),F(Re,Pe,Ae),F(le,Re,fe),F(le,le,he),function T(we,ce){const le=s();let ue;for(ue=0;ue<16;ue++)le[ue]=ce[ue];for(ue=250;ue>=0;ue--)j(le,le),1!==ue&&F(le,le,ce);for(ue=0;ue<16;ue++)we[ue]=le[ue]}(le,le),F(le,le,fe),F(le,le,he),F(le,le,he),F(we[0],le,he),j(ue,we[0]),F(ue,ue,he),k(ue,fe)&&F(we[0],we[0],_),j(ue,we[0]),F(ue,ue,he),k(ue,fe)?-1:(U(we[0])===ce[31]>>7&&G(we[0],y,we[0]),F(we[3],we[0],we[1]),0)}n.Xx=function ne(we,ce){const le=new Float64Array(64),ue=[s(),s(),s(),s()],fe=(0,E.hash)(we.subarray(0,32));fe[0]&=248,fe[31]&=127,fe[31]|=64;const he=new Uint8Array(64);he.set(fe.subarray(32),32);const Ae=new E.SHA512;Ae.update(he.subarray(32)),Ae.update(ce);const Pe=Ae.digest();Ae.clean(),re(Pe),R(ue,Pe),w(he,ue),Ae.reset(),Ae.update(he.subarray(0,32)),Ae.update(we.subarray(32)),Ae.update(ce);const Re=Ae.digest();re(Re);for(let ot=0;ot<32;ot++)le[ot]=Pe[ot];for(let ot=0;ot<32;ot++)for(let nt=0;nt<32;nt++)le[ot+nt]+=Re[ot]*fe[nt];return B(he.subarray(32),le),he}},35571:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isSerializableHash=function u(l){return typeof l.saveState<"u"&&typeof l.restoreState<"u"&&typeof l.cleanSavedState<"u"}},85705:(q,n,u)=>{"use strict";var v=u(54193),E=u(69815),M=function(){function s(g,y,f,d){void 0===f&&(f=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=g,this._info=d;var p=v.hmac(this._hash,f,y);this._hmac=new v.HMAC(g,p),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return s.prototype._fillBuffer=function(){this._counter[0]++;var g=this._counter[0];if(0===g)throw new Error("hkdf: cannot expand more");this._hmac.reset(),g>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},s.prototype.expand=function(g){for(var y=new Uint8Array(g),f=0;f{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var l=u(35571),v=u(19976),E=u(69815),M=function(){function g(y,f){this._finished=!1,this._inner=new y,this._outer=new y,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var d=new Uint8Array(this.blockSize);f.length>this.blockSize?this._inner.update(f).finish(d).clean():d.set(f);for(var p=0;p{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mul=Math.imul||function u(g,y){var d=65535&g,m=65535&y;return d*m+((g>>>16&65535)*m+d*(y>>>16&65535)<<16>>>0)|0},n.add=function l(g,y){return g+y|0},n.sub=function v(g,y){return g-y|0},n.rotl=function E(g,y){return g<>>32-y},n.rotr=function M(g,y){return g<<32-y|g>>>y},n.isInteger=Number.isInteger||function s(g){return"number"==typeof g&&isFinite(g)&&Math.floor(g)===g},n.MAX_SAFE_INTEGER=9007199254740991,n.isSafeInteger=function(g){return n.isInteger(g)&&g>=-n.MAX_SAFE_INTEGER&&g<=n.MAX_SAFE_INTEGER}},60314:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var l=u(19976),v=u(69815);n.DIGEST_LENGTH=16;var E=function(){function g(y){this.digestLength=n.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var f=y[0]|y[1]<<8;this._r[0]=8191&f;var d=y[2]|y[3]<<8;this._r[1]=8191&(f>>>13|d<<3);var p=y[4]|y[5]<<8;this._r[2]=7939&(d>>>10|p<<6);var m=y[6]|y[7]<<8;this._r[3]=8191&(p>>>7|m<<9);var S=y[8]|y[9]<<8;this._r[4]=255&(m>>>4|S<<12),this._r[5]=S>>>1&8190;var _=y[10]|y[11]<<8;this._r[6]=8191&(S>>>14|_<<2);var D=y[12]|y[13]<<8;this._r[7]=8065&(_>>>11|D<<5);var P=y[14]|y[15]<<8;this._r[8]=8191&(D>>>8|P<<8),this._r[9]=P>>>5&127,this._pad[0]=y[16]|y[17]<<8,this._pad[1]=y[18]|y[19]<<8,this._pad[2]=y[20]|y[21]<<8,this._pad[3]=y[22]|y[23]<<8,this._pad[4]=y[24]|y[25]<<8,this._pad[5]=y[26]|y[27]<<8,this._pad[6]=y[28]|y[29]<<8,this._pad[7]=y[30]|y[31]<<8}return g.prototype._blocks=function(y,f,d){for(var p=this._fin?0:2048,m=this._h[0],S=this._h[1],_=this._h[2],D=this._h[3],P=this._h[4],x=this._h[5],C=this._h[6],N=this._h[7],k=this._h[8],U=this._h[9],z=this._r[0],Y=this._r[1],G=this._r[2],F=this._r[3],j=this._r[4],Z=this._r[5],T=this._r[6],o=this._r[7],h=this._r[8],w=this._r[9];d>=16;){var I=y[f+0]|y[f+1]<<8;m+=8191&I;var R=y[f+2]|y[f+3]<<8;S+=8191&(I>>>13|R<<3);var V=y[f+4]|y[f+5]<<8;_+=8191&(R>>>10|V<<6);var H=y[f+6]|y[f+7]<<8;D+=8191&(V>>>7|H<<9);var L=y[f+8]|y[f+9]<<8;P+=8191&(H>>>4|L<<12),x+=L>>>1&8191;var b=y[f+10]|y[f+11]<<8;C+=8191&(L>>>14|b<<2);var B=y[f+12]|y[f+13]<<8;N+=8191&(b>>>11|B<<5);var re=y[f+14]|y[f+15]<<8,ne=0,te=ne;te+=m*z,te+=S*(5*w),te+=_*(5*h),te+=D*(5*o),ne=(te+=P*(5*T))>>>13,te&=8191,te+=x*(5*Z),te+=C*(5*j),te+=N*(5*F),te+=(k+=8191&(B>>>8|re<<8))*(5*G);var ae=ne+=(te+=(U+=re>>>5|p)*(5*Y))>>>13;ae+=m*Y,ae+=S*z,ae+=_*(5*w),ae+=D*(5*h),ne=(ae+=P*(5*o))>>>13,ae&=8191,ae+=x*(5*T),ae+=C*(5*Z),ae+=N*(5*j),ae+=k*(5*F),ne+=(ae+=U*(5*G))>>>13,ae&=8191;var ge=ne;ge+=m*G,ge+=S*Y,ge+=_*z,ge+=D*(5*w),ne=(ge+=P*(5*h))>>>13,ge&=8191,ge+=x*(5*o),ge+=C*(5*T),ge+=N*(5*Z),ge+=k*(5*j);var pe=ne+=(ge+=U*(5*F))>>>13;pe+=m*F,pe+=S*G,pe+=_*Y,pe+=D*z,ne=(pe+=P*(5*w))>>>13,pe&=8191,pe+=x*(5*h),pe+=C*(5*o),pe+=N*(5*T),pe+=k*(5*Z);var we=ne+=(pe+=U*(5*j))>>>13;we+=m*j,we+=S*F,we+=_*G,we+=D*Y,ne=(we+=P*z)>>>13,we&=8191,we+=x*(5*w),we+=C*(5*h),we+=N*(5*o),we+=k*(5*T);var ce=ne+=(we+=U*(5*Z))>>>13;ce+=m*Z,ce+=S*j,ce+=_*F,ce+=D*G,ne=(ce+=P*Y)>>>13,ce&=8191,ce+=x*z,ce+=C*(5*w),ce+=N*(5*h),ce+=k*(5*o);var le=ne+=(ce+=U*(5*T))>>>13;le+=m*T,le+=S*Z,le+=_*j,le+=D*F,ne=(le+=P*G)>>>13,le&=8191,le+=x*Y,le+=C*z,le+=N*(5*w),le+=k*(5*h);var ue=ne+=(le+=U*(5*o))>>>13;ue+=m*o,ue+=S*T,ue+=_*Z,ue+=D*j,ne=(ue+=P*F)>>>13,ue&=8191,ue+=x*G,ue+=C*Y,ue+=N*z,ue+=k*(5*w);var fe=ne+=(ue+=U*(5*h))>>>13;fe+=m*h,fe+=S*o,fe+=_*T,fe+=D*Z,ne=(fe+=P*j)>>>13,fe&=8191,fe+=x*F,fe+=C*G,fe+=N*Y,fe+=k*z;var he=ne+=(fe+=U*(5*w))>>>13;he+=m*w,he+=S*h,he+=_*o,he+=D*T,ne=(he+=P*Z)>>>13,he&=8191,he+=x*j,he+=C*F,he+=N*G,he+=k*Y,m=te=8191&(ne=(ne=((ne+=(he+=U*z)>>>13)<<2)+ne|0)+(te&=8191)|0),S=ae+=ne>>>=13,_=ge&=8191,D=pe&=8191,P=we&=8191,x=ce&=8191,C=le&=8191,N=ue&=8191,k=fe&=8191,U=he&=8191,f+=16,d-=16}this._h[0]=m,this._h[1]=S,this._h[2]=_,this._h[3]=D,this._h[4]=P,this._h[5]=x,this._h[6]=C,this._h[7]=N,this._h[8]=k,this._h[9]=U},g.prototype.finish=function(y,f){void 0===f&&(f=0);var p,m,S,_,d=new Uint16Array(10);if(this._leftover){for(_=this._leftover,this._buffer[_++]=1;_<16;_++)this._buffer[_]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(p=this._h[1]>>>13,this._h[1]&=8191,_=2;_<10;_++)this._h[_]+=p,p=this._h[_]>>>13,this._h[_]&=8191;for(this._h[0]+=5*p,p=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=p,p=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=p,d[0]=this._h[0]+5,p=d[0]>>>13,d[0]&=8191,_=1;_<10;_++)d[_]=this._h[_]+p,p=d[_]>>>13,d[_]&=8191;for(d[9]-=8192,m=(1^p)-1,_=0;_<10;_++)d[_]&=m;for(m=~m,_=0;_<10;_++)this._h[_]=this._h[_]&m|d[_];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),S=this._h[0]+this._pad[0],this._h[0]=65535&S,_=1;_<8;_++)S=(this._h[_]+this._pad[_]|0)+(S>>>16)|0,this._h[_]=65535&S;return y[f+0]=this._h[0]>>>0,y[f+1]=this._h[0]>>>8,y[f+2]=this._h[1]>>>0,y[f+3]=this._h[1]>>>8,y[f+4]=this._h[2]>>>0,y[f+5]=this._h[2]>>>8,y[f+6]=this._h[3]>>>0,y[f+7]=this._h[3]>>>8,y[f+8]=this._h[4]>>>0,y[f+9]=this._h[4]>>>8,y[f+10]=this._h[5]>>>0,y[f+11]=this._h[5]>>>8,y[f+12]=this._h[6]>>>0,y[f+13]=this._h[6]>>>8,y[f+14]=this._h[7]>>>0,y[f+15]=this._h[7]>>>8,this._finished=!0,this},g.prototype.update=function(y){var p,f=0,d=y.length;if(this._leftover){(p=16-this._leftover)>d&&(p=d);for(var m=0;m=16&&(p=d-d%16,this._blocks(y,f,p),f+=p,d-=p),d){for(m=0;m{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.randomStringForEntropy=n.randomString=n.randomUint32=n.randomBytes=n.defaultRandomSource=void 0;const l=u(59753),v=u(54502),E=u(69815);function M(d,p=n.defaultRandomSource){return p.randomBytes(d)}n.defaultRandomSource=new l.SystemRandomSource,n.randomBytes=M,n.randomUint32=function s(d=n.defaultRandomSource){const p=M(4,d),m=(0,v.readUint32LE)(p);return(0,E.wipe)(p),m};const g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function y(d,p=g,m=n.defaultRandomSource){if(p.length<2)throw new Error("randomString charset is too short");if(p.length>256)throw new Error("randomString charset is too long");let S="";const _=p.length,D=256-256%_;for(;d>0;){const P=M(Math.ceil(256*d/D),m);for(let x=0;x0;x++){const C=P[x];C{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserRandomSource=void 0;n.BrowserRandomSource=class l{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const E=typeof self<"u"?self.crypto||self.msCrypto:null;E&&void 0!==E.getRandomValues&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const M=new Uint8Array(E);for(let s=0;s{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NodeRandomSource=void 0;const l=u(69815);n.NodeRandomSource=class v{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const M=u(41348);M&&M.randomBytes&&(this._crypto=M,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(M){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let s=this._crypto.randomBytes(M);if(s.length!==M)throw new Error("NodeRandomSource: got fewer bytes than requested");const g=new Uint8Array(M);for(let y=0;y{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SystemRandomSource=void 0;const l=u(77170),v=u(1382);n.SystemRandomSource=class E{constructor(){return this.isAvailable=!1,this.name="",this._source=new l.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new v.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(s){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(s)}}},10893:(q,n,u)=>{"use strict";var v=u(54502),E=u(69815);n.k=32,n.cn=64;var M=function(){function f(){this.digestLength=n.k,this.blockSize=n.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return f.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},f.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},f.prototype.clean=function(){E.wipe(this._buffer),E.wipe(this._temp),this.reset()},f.prototype.update=function(d,p){if(void 0===p&&(p=d.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var m=0;if(this._bytesHashed+=p,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=d[m++],p--;this._bufferLength===this.blockSize&&(g(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(p>=this.blockSize&&(m=g(this._temp,this._state,d,m,p),p%=this.blockSize);p>0;)this._buffer[this._bufferLength++]=d[m++],p--;return this},f.prototype.finish=function(d){if(!this._finished){var p=this._bytesHashed,m=this._bufferLength,S=p/536870912|0,_=p<<3,D=p%64<56?64:128;this._buffer[m]=128;for(var P=m+1;P0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},f.prototype.restoreState=function(d){return this._state.set(d.state),this._bufferLength=d.bufferLength,d.buffer&&this._buffer.set(d.buffer),this._bytesHashed=d.bytesHashed,this._finished=!1,this},f.prototype.cleanSavedState=function(d){E.wipe(d.state),d.buffer&&E.wipe(d.buffer),d.bufferLength=0,d.bytesHashed=0},f}();n.mE=M;var s=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function g(f,d,p,m,S){for(;S>=64;){for(var _=d[0],D=d[1],P=d[2],x=d[3],C=d[4],N=d[5],k=d[6],U=d[7],z=0;z<16;z++){var Y=m+4*z;f[z]=v.readUint32BE(p,Y)}for(z=16;z<64;z++){var G=f[z-2],F=(G>>>17|G<<15)^(G>>>19|G<<13)^G>>>10,j=((G=f[z-15])>>>7|G<<25)^(G>>>18|G<<14)^G>>>3;f[z]=(F+f[z-7]|0)+(j+f[z-16]|0)}for(z=0;z<64;z++){F=(((C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))+(C&N^~C&k)|0)+(U+(s[z]+f[z]|0)|0)|0,j=((_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10))+(_&D^_&P^D&P)|0;U=k,k=N,N=C,C=x+F|0,x=P,P=D,D=_,_=F+j|0}d[0]+=_,d[1]+=D,d[2]+=P,d[3]+=x,d[4]+=C,d[5]+=N,d[6]+=k,d[7]+=U,m+=64,S-=64}return m}n.vp=function y(f){var d=new M;d.update(f);var p=d.digest();return d.clean(),p}},86375:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var l=u(54502),v=u(69815);n.DIGEST_LENGTH=64,n.BLOCK_SIZE=128;var E=function(){function y(){this.digestLength=n.DIGEST_LENGTH,this.blockSize=n.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){v.wipe(this._buffer),v.wipe(this._tempHi),v.wipe(this._tempLo),this.reset()},y.prototype.update=function(f,d){if(void 0===d&&(d=f.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var p=0;if(this._bytesHashed+=d,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=f[p++],d--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(d>=this.blockSize&&(p=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,f,p,d),d%=this.blockSize);d>0;)this._buffer[this._bufferLength++]=f[p++],d--;return this},y.prototype.finish=function(f){if(!this._finished){var d=this._bytesHashed,p=this._bufferLength,m=d/536870912|0,S=d<<3,_=d%128<112?128:256;this._buffer[p]=128;for(var D=p+1;D<_-8;D++)this._buffer[D]=0;l.writeUint32BE(m,this._buffer,_-8),l.writeUint32BE(S,this._buffer,_-4),s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,_),this._finished=!0}for(D=0;D0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(f){return this._stateHi.set(f.stateHi),this._stateLo.set(f.stateLo),this._bufferLength=f.bufferLength,f.buffer&&this._buffer.set(f.buffer),this._bytesHashed=f.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(f){v.wipe(f.stateHi),v.wipe(f.stateLo),f.buffer&&v.wipe(f.buffer),f.bufferLength=0,f.bytesHashed=0},y}();n.SHA512=E;var M=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(y,f,d,p,m,S,_){for(var w,I,R,V,H,L,b,B,D=d[0],P=d[1],x=d[2],C=d[3],N=d[4],k=d[5],U=d[6],z=d[7],Y=p[0],G=p[1],F=p[2],j=p[3],Z=p[4],T=p[5],o=p[6],h=p[7];_>=128;){for(var re=0;re<16;re++){var ne=8*re+S;y[re]=l.readUint32BE(m,ne),f[re]=l.readUint32BE(m,ne+4)}for(re=0;re<80;re++){var ue,Ye,te=D,ae=P,ge=x,pe=C,we=N,ce=k,le=U,fe=Y,he=G,Ae=F,Pe=j,Re=Z,ot=T,nt=o;if(H=65535&(I=h),L=I>>>16,b=65535&(w=z),B=w>>>16,H+=65535&(I=(Z>>>14|N<<18)^(Z>>>18|N<<14)^(N>>>9|Z<<23)),L+=I>>>16,b+=65535&(w=(N>>>14|Z<<18)^(N>>>18|Z<<14)^(Z>>>9|N<<23)),B+=w>>>16,H+=65535&(I=Z&T^~Z&o),L+=I>>>16,b+=65535&(w=N&k^~N&U),B+=w>>>16,w=M[2*re],H+=65535&(I=M[2*re+1]),L+=I>>>16,b+=65535&w,B+=w>>>16,w=y[re%16],L+=(I=f[re%16])>>>16,b+=65535&w,B+=w>>>16,b+=(L+=(H+=65535&I)>>>16)>>>16,H=65535&(I=V=65535&H|L<<16),L=I>>>16,b=65535&(w=R=65535&b|(B+=b>>>16)<<16),B=w>>>16,H+=65535&(I=(Y>>>28|D<<4)^(D>>>2|Y<<30)^(D>>>7|Y<<25)),L+=I>>>16,b+=65535&(w=(D>>>28|Y<<4)^(Y>>>2|D<<30)^(Y>>>7|D<<25)),B+=w>>>16,L+=(I=Y&G^Y&F^G&F)>>>16,b+=65535&(w=D&P^D&x^P&x),B+=w>>>16,ue=65535&(b+=(L+=(H+=65535&I)>>>16)>>>16)|(B+=b>>>16)<<16,Ye=65535&H|L<<16,H=65535&(I=Pe),L=I>>>16,b=65535&(w=pe),B=w>>>16,L+=(I=V)>>>16,b+=65535&(w=R),B+=w>>>16,P=te,x=ae,C=ge,N=pe=65535&(b+=(L+=(H+=65535&I)>>>16)>>>16)|(B+=b>>>16)<<16,k=we,U=ce,z=le,D=ue,G=fe,F=he,j=Ae,Z=Pe=65535&H|L<<16,T=Re,o=ot,h=nt,Y=Ye,re%16==15)for(ne=0;ne<16;ne++)w=y[ne],H=65535&(I=f[ne]),L=I>>>16,b=65535&w,B=w>>>16,w=y[(ne+9)%16],H+=65535&(I=f[(ne+9)%16]),L+=I>>>16,b+=65535&w,B+=w>>>16,R=y[(ne+1)%16],H+=65535&(I=((V=f[(ne+1)%16])>>>1|R<<31)^(V>>>8|R<<24)^(V>>>7|R<<25)),L+=I>>>16,b+=65535&(w=(R>>>1|V<<31)^(R>>>8|V<<24)^R>>>7),B+=w>>>16,R=y[(ne+14)%16],L+=(I=((V=f[(ne+14)%16])>>>19|R<<13)^(R>>>29|V<<3)^(V>>>6|R<<26))>>>16,b+=65535&(w=(R>>>19|V<<13)^(V>>>29|R<<3)^R>>>6),B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,y[ne]=65535&b|B<<16,f[ne]=65535&H|L<<16}H=65535&(I=Y),L=I>>>16,b=65535&(w=D),B=w>>>16,w=d[0],L+=(I=p[0])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[0]=D=65535&b|B<<16,p[0]=Y=65535&H|L<<16,H=65535&(I=G),L=I>>>16,b=65535&(w=P),B=w>>>16,w=d[1],L+=(I=p[1])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[1]=P=65535&b|B<<16,p[1]=G=65535&H|L<<16,H=65535&(I=F),L=I>>>16,b=65535&(w=x),B=w>>>16,w=d[2],L+=(I=p[2])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[2]=x=65535&b|B<<16,p[2]=F=65535&H|L<<16,H=65535&(I=j),L=I>>>16,b=65535&(w=C),B=w>>>16,w=d[3],L+=(I=p[3])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[3]=C=65535&b|B<<16,p[3]=j=65535&H|L<<16,H=65535&(I=Z),L=I>>>16,b=65535&(w=N),B=w>>>16,w=d[4],L+=(I=p[4])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[4]=N=65535&b|B<<16,p[4]=Z=65535&H|L<<16,H=65535&(I=T),L=I>>>16,b=65535&(w=k),B=w>>>16,w=d[5],L+=(I=p[5])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[5]=k=65535&b|B<<16,p[5]=T=65535&H|L<<16,H=65535&(I=o),L=I>>>16,b=65535&(w=U),B=w>>>16,w=d[6],L+=(I=p[6])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[6]=U=65535&b|B<<16,p[6]=o=65535&H|L<<16,H=65535&(I=h),L=I>>>16,b=65535&(w=z),B=w>>>16,w=d[7],L+=(I=p[7])>>>16,b+=65535&w,B+=w>>>16,B+=(b+=(L+=(H+=65535&I)>>>16)>>>16)>>>16,d[7]=z=65535&b|B<<16,p[7]=h=65535&H|L<<16,S+=128,_-=128}return S}n.hash=function g(y){var f=new E;f.update(y);var d=f.digest();return f.clean(),d}},69815:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wipe=function u(l){for(var v=0;v{"use strict";n.gi=n.Au=n.KS=n.kz=void 0;const v=u(5784),E=u(69815);function M(z){const Y=new Float64Array(16);if(z)for(let G=0;G=0;--H){const L=G[H>>>3]>>>(7&H)&1;f(j,Z,L),f(T,o,L),m(h,j,T),S(j,j,T),m(T,Z,o),S(Z,Z,o),D(o,h),D(w,j),_(j,T,j),_(T,Z,h),m(h,j,T),S(j,j,T),D(Z,j),S(T,o,w),_(j,T,g),m(j,j,o),_(T,T,j),_(j,o,w),_(o,Z,F),D(Z,h),f(j,Z,L),f(T,o,L)}for(let H=0;H<16;H++)F[H+16]=j[H],F[H+32]=T[H],F[H+48]=Z[H],F[H+64]=o[H];const I=F.subarray(32),R=F.subarray(16);(function P(z,Y){const G=M();for(let F=0;F<16;F++)G[F]=Y[F];for(let F=253;F>=0;F--)D(G,G),2!==F&&4!==F&&_(G,G,Y);for(let F=0;F<16;F++)z[F]=G[F]})(I,I),_(R,R,I);const V=new Uint8Array(32);return function d(z,Y){const G=M(),F=M();for(let j=0;j<16;j++)F[j]=Y[j];y(F),y(F),y(F);for(let j=0;j<2;j++){G[0]=F[0]-65517;for(let T=1;T<15;T++)G[T]=F[T]-65535-(G[T-1]>>16&1),G[T-1]&=65535;G[15]=F[15]-32767-(G[14]>>16&1);const Z=G[15]>>16&1;G[14]&=65535,f(F,G,1-Z)}for(let j=0;j<16;j++)z[2*j]=255&F[j],z[2*j+1]=F[j]>>8}(V,R),V}function C(z){return x(z,s)}function N(z){if(z.length!==n.KS)throw new Error(`x25519: seed must be ${n.KS} bytes`);const Y=new Uint8Array(z);return{publicKey:C(Y),secretKey:Y}}n.Au=function k(z){const Y=(0,v.randomBytes)(32,z),G=N(Y);return(0,E.wipe)(Y),G},n.gi=function U(z,Y,G=!1){if(z.length!==n.kz)throw new Error("X25519: incorrect secret key length");if(Y.length!==n.kz)throw new Error("X25519: incorrect public key length");const F=x(z,Y);if(G){let j=0;for(let Z=0;Z{"use strict";function u(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function l(){const E=u();return E.subtle||E.webkitSubtle}Object.defineProperty(n,"__esModule",{value:!0}),n.isBrowserCryptoAvailable=n.getSubtleCrypto=n.getBrowerCrypto=void 0,n.getBrowerCrypto=u,n.getSubtleCrypto=l,n.isBrowserCryptoAvailable=function v(){return!!u()&&!!l()}},32220:(q,n)=>{"use strict";function u(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function l(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(n,"__esModule",{value:!0}),n.isBrowser=n.isNode=n.isReactNative=void 0,n.isReactNative=u,n.isNode=l,n.isBrowser=function v(){return!u()&&!l()}},71948:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(34308);l.__exportStar(u(31688),n),l.__exportStar(u(32220),n)},42092:(q,n,u)=>{"use strict";u.d(n,{q:()=>l});class l{}},1252:(q,n,u)=>{"use strict";u.r(n),u.d(n,{IEvents:()=>l.q});var l=u(42092)},63510:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HEARTBEAT_EVENTS=n.HEARTBEAT_INTERVAL=void 0;const l=u(43961);n.HEARTBEAT_INTERVAL=l.FIVE_SECONDS,n.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},46844:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),u(39653).__exportStar(u(63510),n)},72271:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HeartBeat=void 0;const l=u(39653),v=u(59069),E=u(43961),M=u(76925),s=u(46844);class g extends M.IHeartBeat{constructor(f){super(f),this.events=new v.EventEmitter,this.interval=s.HEARTBEAT_INTERVAL,this.interval=f?.interval||s.HEARTBEAT_INTERVAL}static init(f){return l.__awaiter(this,void 0,void 0,function*(){const d=new g(f);return yield d.init(),d})}init(){return l.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(f,d){this.events.on(f,d)}once(f,d){this.events.once(f,d)}off(f,d){this.events.off(f,d)}removeListener(f,d){this.events.removeListener(f,d)}initialize(){return l.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),E.toMiliseconds(this.interval))})}pulse(){this.events.emit(s.HEARTBEAT_EVENTS.pulse)}}n.HeartBeat=g},72062:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(39653);l.__exportStar(u(72271),n),l.__exportStar(u(76925),n),l.__exportStar(u(46844),n)},88891:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IHeartBeat=void 0;const l=u(1252);class v extends l.IEvents{constructor(M){super()}}n.IHeartBeat=v},76925:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),u(39653).__exportStar(u(88891),n)},25504:q=>{"use strict";q.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},6375:()=>{},86205:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(30004);l.__exportStar(u(20725),n),l.__exportStar(u(48562),n)},20725:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ONE_THOUSAND=n.ONE_HUNDRED=void 0,n.ONE_HUNDRED=100,n.ONE_THOUSAND=1e3},48562:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ONE_YEAR=n.FOUR_WEEKS=n.THREE_WEEKS=n.TWO_WEEKS=n.ONE_WEEK=n.THIRTY_DAYS=n.SEVEN_DAYS=n.FIVE_DAYS=n.THREE_DAYS=n.ONE_DAY=n.TWENTY_FOUR_HOURS=n.TWELVE_HOURS=n.SIX_HOURS=n.THREE_HOURS=n.ONE_HOUR=n.SIXTY_MINUTES=n.THIRTY_MINUTES=n.TEN_MINUTES=n.FIVE_MINUTES=n.ONE_MINUTE=n.SIXTY_SECONDS=n.THIRTY_SECONDS=n.TEN_SECONDS=n.FIVE_SECONDS=n.ONE_SECOND=void 0,n.ONE_SECOND=1,n.FIVE_SECONDS=5,n.TEN_SECONDS=10,n.THIRTY_SECONDS=30,n.SIXTY_SECONDS=60,n.ONE_MINUTE=n.SIXTY_SECONDS,n.FIVE_MINUTES=5*n.ONE_MINUTE,n.TEN_MINUTES=10*n.ONE_MINUTE,n.THIRTY_MINUTES=30*n.ONE_MINUTE,n.SIXTY_MINUTES=60*n.ONE_MINUTE,n.ONE_HOUR=n.SIXTY_MINUTES,n.THREE_HOURS=3*n.ONE_HOUR,n.SIX_HOURS=6*n.ONE_HOUR,n.TWELVE_HOURS=12*n.ONE_HOUR,n.TWENTY_FOUR_HOURS=24*n.ONE_HOUR,n.ONE_DAY=n.TWENTY_FOUR_HOURS,n.THREE_DAYS=3*n.ONE_DAY,n.FIVE_DAYS=5*n.ONE_DAY,n.SEVEN_DAYS=7*n.ONE_DAY,n.THIRTY_DAYS=30*n.ONE_DAY,n.ONE_WEEK=n.SEVEN_DAYS,n.TWO_WEEKS=2*n.ONE_WEEK,n.THREE_WEEKS=3*n.ONE_WEEK,n.FOUR_WEEKS=4*n.ONE_WEEK,n.ONE_YEAR=365*n.ONE_DAY},43961:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(30004);l.__exportStar(u(64497),n),l.__exportStar(u(63509),n),l.__exportStar(u(43622),n),l.__exportStar(u(86205),n)},43622:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),u(30004).__exportStar(u(99761),n)},99761:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.IWatch=void 0;n.IWatch=class u{}},88784:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fromMiliseconds=n.toMiliseconds=void 0;const l=u(86205);n.toMiliseconds=function v(M){return M*l.ONE_THOUSAND},n.fromMiliseconds=function E(M){return Math.floor(M/l.ONE_THOUSAND)}},77657:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.delay=void 0,n.delay=function u(l){return new Promise(v=>{setTimeout(()=>{v(!0)},l)})}},64497:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(30004);l.__exportStar(u(77657),n),l.__exportStar(u(88784),n)},63509:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Watch=void 0;class u{constructor(){this.timestamps=new Map}start(v){if(this.timestamps.has(v))throw new Error(`Watch already started for label: ${v}`);this.timestamps.set(v,{started:Date.now()})}stop(v){const E=this.get(v);if(typeof E.elapsed<"u")throw new Error(`Watch already stopped for label: ${v}`);const M=Date.now()-E.started;this.timestamps.set(v,{started:E.started,elapsed:M})}get(v){const E=this.timestamps.get(v);if(typeof E>"u")throw new Error(`No timestamp found for label: ${v}`);return E}elapsed(v){const E=this.get(v);return E.elapsed||Date.now()-E.started}}n.Watch=u,n.default=u},6499:(q,n)=>{"use strict";function u(S){let _;return typeof window<"u"&&typeof window[S]<"u"&&(_=window[S]),_}function l(S){const _=u(S);if(!_)throw new Error(`${S} is not defined in Window`);return _}Object.defineProperty(n,"__esModule",{value:!0}),n.getLocalStorage=n.getLocalStorageOrThrow=n.getCrypto=n.getCryptoOrThrow=n.getLocation=n.getLocationOrThrow=n.getNavigator=n.getNavigatorOrThrow=n.getDocument=n.getDocumentOrThrow=n.getFromWindowOrThrow=n.getFromWindow=void 0,n.getFromWindow=u,n.getFromWindowOrThrow=l,n.getDocumentOrThrow=function v(){return l("document")},n.getDocument=function E(){return u("document")},n.getNavigatorOrThrow=function M(){return l("navigator")},n.getNavigator=function s(){return u("navigator")},n.getLocationOrThrow=function g(){return l("location")},n.getLocation=function y(){return u("location")},n.getCryptoOrThrow=function f(){return l("crypto")},n.getCrypto=function d(){return u("crypto")},n.getLocalStorageOrThrow=function p(){return l("localStorage")},n.getLocalStorage=function m(){return u("localStorage")}},30543:(q,n,u)=>{"use strict";n.D=void 0;const v=u(6499);n.D=function E(){let M,s;try{M=v.getDocumentOrThrow(),s=v.getLocationOrThrow()}catch{return null}function y(...P){const x=M.getElementsByTagName("meta");for(let C=0;CN.getAttribute(U)).filter(U=>!!U&&P.includes(U));if(k.length&&k){const U=N.getAttribute("content");if(U)return U}}return""}const p=function f(){let P=y("name","og:site_name","og:title","twitter:title");return P||(P=M.title),P}();return{description:function d(){return y("description","og:description","twitter:description","keywords")}(),url:s.origin,icons:function g(){const P=M.getElementsByTagName("link"),x=[];for(let C=0;C-1){const U=N.getAttribute("href");if(U)if(-1===U.toLowerCase().indexOf("https:")&&-1===U.toLowerCase().indexOf("http:")&&0!==U.indexOf("//")){let z=s.protocol+"//"+s.host;if(0===U.indexOf("/"))z+=U;else{const Y=s.pathname.split("/");Y.pop();z+=Y.join("/")+"/"+U}x.push(z)}else if(0===U.indexOf("//")){const z=s.protocol+U;x.push(z)}else x.push(U)}}return x}(),name:p}}},88599:q=>{function n(u){this._db=u,this._operations=[],this._written=!1}n.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},n.prototype.put=function(u,l){this._checkWritten();var v=this._db._checkKeyValue(u,"key",this._db._isBuffer);if(v||(v=this._db._checkKeyValue(l,"value",this._db._isBuffer)))throw v;return this._db._isBuffer(u)||(u=String(u)),this._db._isBuffer(l)||(l=String(l)),"function"==typeof this._put?this._put(u,l):this._operations.push({type:"put",key:u,value:l}),this},n.prototype.del=function(u){this._checkWritten();var l=this._db._checkKeyValue(u,"key",this._db._isBuffer);if(l)throw l;return this._db._isBuffer(u)||(u=String(u)),"function"==typeof this._del?this._del(u):this._operations.push({type:"del",key:u}),this},n.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},n.prototype.write=function(u,l){if(this._checkWritten(),"function"==typeof u&&(l=u),"function"!=typeof l)throw new Error("write() requires a callback argument");return"object"!=typeof u&&(u={}),this._written=!0,"function"==typeof this._write?this._write(l):"function"==typeof this._db._batch?this._db._batch(this._operations,u,l):void process.nextTick(l)},q.exports=n},14968:q=>{function n(u){this.db=u,this._ended=!1,this._nexting=!1}n.prototype.next=function(u){var l=this;if("function"!=typeof u)throw new Error("next() requires a callback argument");return l._ended?u(new Error("cannot call next() after end()")):l._nexting?u(new Error("cannot call next() before previous next() has completed")):(l._nexting=!0,"function"==typeof l._next?l._next(function(){l._nexting=!1,u.apply(null,arguments)}):void process.nextTick(function(){l._nexting=!1,u()}))},n.prototype.end=function(u){if("function"!=typeof u)throw new Error("end() requires a callback argument");return this._ended?u(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(u):void process.nextTick(u))},q.exports=n},30826:(q,n,u)=>{var v=u(98382),E=u(14968),M=u(88599);function s(g){if(!arguments.length||void 0===g)throw new Error("constructor requires at least a location argument");if("string"!=typeof g)throw new Error("constructor requires a location string argument");this.location=g}s.prototype.open=function(g,y){if("function"==typeof g&&(y=g),"function"!=typeof y)throw new Error("open() requires a callback argument");if("object"!=typeof g&&(g={}),"function"==typeof this._open)return this._open(g,y);process.nextTick(y)},s.prototype.close=function(g){if("function"!=typeof g)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(g);process.nextTick(g)},s.prototype.get=function(g,y,f){var d;if("function"==typeof y&&(f=y),"function"!=typeof f)throw new Error("get() requires a callback argument");return(d=this._checkKeyValue(g,"key",this._isBuffer))?f(d):(this._isBuffer(g)||(g=String(g)),"object"!=typeof y&&(y={}),"function"==typeof this._get?this._get(g,y,f):void process.nextTick(function(){f(new Error("NotFound"))}))},s.prototype.put=function(g,y,f,d){var p;if("function"==typeof f&&(d=f),"function"!=typeof d)throw new Error("put() requires a callback argument");return(p=this._checkKeyValue(g,"key",this._isBuffer))||(p=this._checkKeyValue(y,"value",this._isBuffer))?d(p):(this._isBuffer(g)||(g=String(g)),!this._isBuffer(y)&&!process.browser&&(y=String(y)),"object"!=typeof f&&(f={}),"function"==typeof this._put?this._put(g,y,f,d):void process.nextTick(d))},s.prototype.del=function(g,y,f){var d;if("function"==typeof y&&(f=y),"function"!=typeof f)throw new Error("del() requires a callback argument");return(d=this._checkKeyValue(g,"key",this._isBuffer))?f(d):(this._isBuffer(g)||(g=String(g)),"object"!=typeof y&&(y={}),"function"==typeof this._del?this._del(g,y,f):void process.nextTick(f))},s.prototype.batch=function(g,y,f){if(!arguments.length)return this._chainedBatch();if("function"==typeof y&&(f=y),"function"!=typeof f)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(g))return f(new Error("batch(array) requires an array argument"));"object"!=typeof y&&(y={});for(var m,S,d=0,p=g.length;d{q.exports=function n(){for(var u={},l=0;l255)return!1;return!0}function v(H,L){if(H.buffer&&ArrayBuffer.isView(H)&&"Uint8Array"===H.name)return L&&(H=H.slice?H.slice():Array.prototype.slice.call(H)),H;if(Array.isArray(H)){if(!l(H))throw new Error("Array contains invalid value: "+H);return new Uint8Array(H)}if(u(H.length)&&l(H))return new Uint8Array(H);throw new Error("unsupported array-like object")}function E(H){return new Uint8Array(H)}function M(H,L,b,B,re){(null!=B||null!=re)&&(H=H.slice?H.slice(B,re):Array.prototype.slice.call(H,B,re)),L.set(H,b)}var L,s={toBytes:function H(b){var B=[],re=0;for(b=encodeURI(b);re191&&ne<224?(B.push(String.fromCharCode((31&ne)<<6|63&b[re+1])),re+=2):(B.push(String.fromCharCode((15&ne)<<12|(63&b[re+1])<<6|63&b[re+2])),re+=3)}return B.join("")}},g=(L="0123456789abcdef",{toBytes:function H(B){for(var re=[],ne=0;ne>4]+L[15&te])}return re.join("")}}),y={16:10,24:12,32:14},f=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],S=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],_=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],D=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],P=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],x=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],C=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],N=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],k=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],U=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],z=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Y=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function G(H){for(var L=[],b=0;b>2,this._Ke[ne][L%4]=re[L],this._Kd[H-ne][L%4]=re[L];for(var ge,te=0,ae=B;ae>16&255]<<24^d[ge>>8&255]<<16^d[255&ge]<<8^d[ge>>24&255]^f[te]<<24,te+=1,8!=B)for(L=1;L>8&255]<<8^d[ge>>16&255]<<16^d[ge>>24&255]<<24;for(L=B/2+1;L>2,we=ae%4,this._Ke[pe][we]=re[L],this._Kd[H-pe][we]=re[L++],ae++}for(var pe=1;pe>24&255]^U[ge>>16&255]^z[ge>>8&255]^Y[255&ge]},F.prototype.encrypt=function(H){if(16!=H.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var L=this._Ke.length-1,b=[0,0,0,0],B=G(H),re=0;re<4;re++)B[re]^=this._Ke[0][re];for(var ne=1;ne>24&255]^S[B[(re+1)%4]>>16&255]^_[B[(re+2)%4]>>8&255]^D[255&B[(re+3)%4]]^this._Ke[ne][re];B=b.slice()}var ae,te=E(16);for(re=0;re<4;re++)ae=this._Ke[L][re],te[4*re]=255&(d[B[re]>>24&255]^ae>>24),te[4*re+1]=255&(d[B[(re+1)%4]>>16&255]^ae>>16),te[4*re+2]=255&(d[B[(re+2)%4]>>8&255]^ae>>8),te[4*re+3]=255&(d[255&B[(re+3)%4]]^ae);return te},F.prototype.decrypt=function(H){if(16!=H.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var L=this._Kd.length-1,b=[0,0,0,0],B=G(H),re=0;re<4;re++)B[re]^=this._Kd[0][re];for(var ne=1;ne>24&255]^x[B[(re+3)%4]>>16&255]^C[B[(re+2)%4]>>8&255]^N[255&B[(re+1)%4]]^this._Kd[ne][re];B=b.slice()}var ae,te=E(16);for(re=0;re<4;re++)ae=this._Kd[L][re],te[4*re]=255&(p[B[re]>>24&255]^ae>>24),te[4*re+1]=255&(p[B[(re+3)%4]>>16&255]^ae>>16),te[4*re+2]=255&(p[B[(re+2)%4]>>8&255]^ae>>8),te[4*re+3]=255&(p[255&B[(re+1)%4]]^ae);return te};var j=function(H){if(!(this instanceof j))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new F(H)};j.prototype.encrypt=function(H){if((H=v(H)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var L=E(H.length),b=E(16),B=0;B=0;--L)this._counter[L]=H%256,H>>=8},h.prototype.setBytes=function(H){if(16!=(H=v(H,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=H},h.prototype.increment=function(){for(var H=15;H>=0;H--){if(255!==this._counter[H]){this._counter[H]++;break}this._counter[H]=0}};var w=function(H,L){if(!(this instanceof w))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",L instanceof h||(L=new h(L)),this._counter=L,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new F(H)};w.prototype.encrypt=function(H){for(var L=v(H,!0),b=0;b16)throw new Error("PKCS#7 padding byte out of range");for(var b=H.length-L,B=0;B{"use strict";function u(F,j){return{validate:F,compare:j}}Object.defineProperty(n,"__esModule",{value:!0}),n.formatNames=n.fastFormats=n.fullFormats=void 0,n.fullFormats={date:u(M,s),time:u(y,f),"date-time":u(function p(F){const j=F.split(d);return 2===j.length&&M(j[0])&&y(j[1],!0)},m),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function D(F){return S.test(F)&&_.test(F)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function G(F){if(Y.test(F))return!1;try{return new RegExp(F),!0}catch{return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function x(F){return P.lastIndex=0,P.test(F)},int32:{type:"number",validate:function k(F){return Number.isInteger(F)&&F<=N&&F>=C}},int64:{type:"number",validate:function U(F){return Number.isInteger(F)}},float:{type:"number",validate:z},double:{type:"number",validate:z},password:!0,binary:!0},n.fastFormats={...n.fullFormats,date:u(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:u(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":u(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,m),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},n.formatNames=Object.keys(n.fullFormats);const v=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,E=[0,31,28,31,30,31,30,31,31,30,31,30,31];function M(F){const j=v.exec(F);if(!j)return!1;const Z=+j[1],T=+j[2],o=+j[3];return T>=1&&T<=12&&o>=1&&o<=(2===T&&function l(F){return F%4==0&&(F%100!=0||F%400==0)}(Z)?29:E[T])}function s(F,j){if(F&&j)return F>j?1:F(j=T[1]+T[2]+T[3]+(T[4]||""))?1:F{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(35180),v=u(65413),E=u(56382),M=new E.Name("fullFormats"),s=new E.Name("fastFormats"),g=(f,d={keywords:!0})=>{if(Array.isArray(d))return y(f,d,l.fullFormats,M),f;const[p,m]="fast"===d.mode?[l.fastFormats,s]:[l.fullFormats,M];return y(f,d.formats||l.formatNames,p,m),d.keywords&&v.default(f),f};function y(f,d,p,m){var S,_;null!==(S=(_=f.opts.code).formats)&&void 0!==S||(_.formats=E._`require("ajv-formats/dist/formats").${m}`);for(const D of d)f.addFormat(D,p[D])}g.get=(f,d="full")=>{const m=("fast"===d?l.fastFormats:l.fullFormats)[f];if(!m)throw new Error(`Unknown format "${f}"`);return m},q.exports=n=g,Object.defineProperty(n,"__esModule",{value:!0}),n.default=g},65413:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatLimitDefinition=void 0;const l=u(74411),v=u(56382),E=v.operators,M={formatMaximum:{okStr:"<=",ok:E.LTE,fail:E.GT},formatMinimum:{okStr:">=",ok:E.GTE,fail:E.LT},formatExclusiveMaximum:{okStr:"<",ok:E.LT,fail:E.GTE},formatExclusiveMinimum:{okStr:">",ok:E.GT,fail:E.LTE}},s={message:({keyword:y,schemaCode:f})=>v.str`should be ${M[y].okStr} ${f}`,params:({keyword:y,schemaCode:f})=>v._`{comparison: ${M[y].okStr}, limit: ${f}}`};n.formatLimitDefinition={keyword:Object.keys(M),type:"string",schemaType:"string",$data:!0,error:s,code(y){const{gen:f,data:d,schemaCode:p,keyword:m,it:S}=y,{opts:_,self:D}=S;if(!_.validateFormats)return;const P=new l.KeywordCxt(S,D.RULES.all.format.definition,"format");function N(k){return v._`${k}.compare(${d}, ${p}) ${M[m].fail} 0`}P.$data?function x(){const k=f.scopeValue("formats",{ref:D.formats,code:_.code.formats}),U=f.const("fmt",v._`${k}[${P.schemaCode}]`);y.fail$data(v.or(v._`typeof ${U} != "object"`,v._`${U} instanceof RegExp`,v._`typeof ${U}.compare != "function"`,N(U)))}():function C(){const k=P.schema,U=D.formats[k];if(!U||!0===U)return;if("object"!=typeof U||U instanceof RegExp||"function"!=typeof U.compare)throw new Error(`"${m}": format "${k}" does not define "compare" function`);const z=f.scopeValue("formats",{key:k,ref:U,code:_.code.formats?v._`${_.code.formats}${v.getProperty(k)}`:void 0});y.fail$data(N(z))}()},dependencies:["format"]};n.default=y=>(y.addKeyword(n.formatLimitDefinition),y)},74411:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MissingRefError=n.ValidationError=n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=n.Ajv=void 0;const l=u(25910),v=u(77032),E=u(81849),M=u(98),s=["/properties"],g="http://json-schema.org/draft-07/schema";class y extends l.default{_addVocabularies(){super._addVocabularies(),v.default.forEach(_=>this.addVocabulary(_)),this.opts.discriminator&&this.addKeyword(E.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _=this.opts.$data?this.$dataMetaSchema(M,s):M;this.addMetaSchema(_,g,!1),this.refs["http://json-schema.org/schema"]=g}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(g)?g:void 0)}}n.Ajv=y,q.exports=n=y,q.exports.Ajv=y,Object.defineProperty(n,"__esModule",{value:!0}),n.default=y;var f=u(66764);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var d=u(56382);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=u(20496);Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return p.default}});var m=u(80140);Object.defineProperty(n,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},26295:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.regexpCode=n.getEsmExportName=n.getProperty=n.safeStringify=n.stringify=n.strConcat=n.addCodeArg=n.str=n._=n.nil=n._Code=n.Name=n.IDENTIFIER=n._CodeOrName=void 0;class u{}n._CodeOrName=u,n.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends u{constructor(C){if(super(),!n.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}n.Name=l;class v extends u{constructor(C){super(),this._items="string"==typeof C?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return""===C||'""'===C}get str(){var C;return null!==(C=this._str)&&void 0!==C?C:this._str=this._items.reduce((N,k)=>`${N}${k}`,"")}get names(){var C;return null!==(C=this._names)&&void 0!==C?C:this._names=this._items.reduce((N,k)=>(k instanceof l&&(N[k.str]=(N[k.str]||0)+1),N),{})}}function E(x,...C){const N=[x[0]];let k=0;for(;k{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.or=n.and=n.not=n.CodeGen=n.operators=n.varKinds=n.ValueScopeName=n.ValueScope=n.Scope=n.Name=n.regexpCode=n.stringify=n.getProperty=n.nil=n.strConcat=n.str=n._=void 0;const l=u(26295),v=u(1917);var E=u(26295);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(n,"strConcat",{enumerable:!0,get:function(){return E.strConcat}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(n,"getProperty",{enumerable:!0,get:function(){return E.getProperty}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(n,"regexpCode",{enumerable:!0,get:function(){return E.regexpCode}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return E.Name}});var M=u(1917);Object.defineProperty(n,"Scope",{enumerable:!0,get:function(){return M.Scope}}),Object.defineProperty(n,"ValueScope",{enumerable:!0,get:function(){return M.ValueScope}}),Object.defineProperty(n,"ValueScopeName",{enumerable:!0,get:function(){return M.ValueScopeName}}),Object.defineProperty(n,"varKinds",{enumerable:!0,get:function(){return M.varKinds}}),n.operators={GT:new l._Code(">"),GTE:new l._Code(">="),LT:new l._Code("<"),LTE:new l._Code("<="),EQ:new l._Code("==="),NEQ:new l._Code("!=="),NOT:new l._Code("!"),OR:new l._Code("||"),AND:new l._Code("&&"),ADD:new l._Code("+")};class s{optimizeNodes(){return this}optimizeNames(te,ae){return this}}class g extends s{constructor(te,ae,ge){super(),this.varKind=te,this.name=ae,this.rhs=ge}render({es5:te,_n:ae}){const ge=te?v.varKinds.var:this.varKind,pe=void 0===this.rhs?"":` = ${this.rhs}`;return`${ge} ${this.name}${pe};`+ae}optimizeNames(te,ae){if(te[this.name.str])return this.rhs&&(this.rhs=w(this.rhs,te,ae)),this}get names(){return this.rhs instanceof l._CodeOrName?this.rhs.names:{}}}class y extends s{constructor(te,ae,ge){super(),this.lhs=te,this.rhs=ae,this.sideEffects=ge}render({_n:te}){return`${this.lhs} = ${this.rhs};`+te}optimizeNames(te,ae){if(!(this.lhs instanceof l.Name)||te[this.lhs.str]||this.sideEffects)return this.rhs=w(this.rhs,te,ae),this}get names(){return h(this.lhs instanceof l.Name?{}:{...this.lhs.names},this.rhs)}}class f extends y{constructor(te,ae,ge,pe){super(te,ge,pe),this.op=ae}render({_n:te}){return`${this.lhs} ${this.op}= ${this.rhs};`+te}}class d extends s{constructor(te){super(),this.label=te,this.names={}}render({_n:te}){return`${this.label}:`+te}}class p extends s{constructor(te){super(),this.label=te,this.names={}}render({_n:te}){return`break${this.label?` ${this.label}`:""};`+te}}class m extends s{constructor(te){super(),this.error=te}render({_n:te}){return`throw ${this.error};`+te}get names(){return this.error.names}}class S extends s{constructor(te){super(),this.code=te}render({_n:te}){return`${this.code};`+te}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(te,ae){return this.code=w(this.code,te,ae),this}get names(){return this.code instanceof l._CodeOrName?this.code.names:{}}}class _ extends s{constructor(te=[]){super(),this.nodes=te}render(te){return this.nodes.reduce((ae,ge)=>ae+ge.render(te),"")}optimizeNodes(){const{nodes:te}=this;let ae=te.length;for(;ae--;){const ge=te[ae].optimizeNodes();Array.isArray(ge)?te.splice(ae,1,...ge):ge?te[ae]=ge:te.splice(ae,1)}return te.length>0?this:void 0}optimizeNames(te,ae){const{nodes:ge}=this;let pe=ge.length;for(;pe--;){const we=ge[pe];we.optimizeNames(te,ae)||(I(te,we.names),ge.splice(pe,1))}return ge.length>0?this:void 0}get names(){return this.nodes.reduce((te,ae)=>o(te,ae.names),{})}}class D extends _{render(te){return"{"+te._n+super.render(te)+"}"+te._n}}class P extends _{}class x extends D{}x.kind="else";class C extends D{constructor(te,ae){super(ae),this.condition=te}render(te){let ae=`if(${this.condition})`+super.render(te);return this.else&&(ae+="else "+this.else.render(te)),ae}optimizeNodes(){super.optimizeNodes();const te=this.condition;if(!0===te)return this.nodes;let ae=this.else;if(ae){const ge=ae.optimizeNodes();ae=this.else=Array.isArray(ge)?new x(ge):ge}return ae?!1===te?ae instanceof C?ae:ae.nodes:this.nodes.length?this:new C(R(te),ae instanceof C?[ae]:ae.nodes):!1!==te&&this.nodes.length?this:void 0}optimizeNames(te,ae){var ge;if(this.else=null===(ge=this.else)||void 0===ge?void 0:ge.optimizeNames(te,ae),super.optimizeNames(te,ae)||this.else)return this.condition=w(this.condition,te,ae),this}get names(){const te=super.names;return h(te,this.condition),this.else&&o(te,this.else.names),te}}C.kind="if";class N extends D{}N.kind="for";class k extends N{constructor(te){super(),this.iteration=te}render(te){return`for(${this.iteration})`+super.render(te)}optimizeNames(te,ae){if(super.optimizeNames(te,ae))return this.iteration=w(this.iteration,te,ae),this}get names(){return o(super.names,this.iteration.names)}}class U extends N{constructor(te,ae,ge,pe){super(),this.varKind=te,this.name=ae,this.from=ge,this.to=pe}render(te){const ae=te.es5?v.varKinds.var:this.varKind,{name:ge,from:pe,to:we}=this;return`for(${ae} ${ge}=${pe}; ${ge}<${we}; ${ge}++)`+super.render(te)}get names(){const te=h(super.names,this.from);return h(te,this.to)}}class z extends N{constructor(te,ae,ge,pe){super(),this.loop=te,this.varKind=ae,this.name=ge,this.iterable=pe}render(te){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(te)}optimizeNames(te,ae){if(super.optimizeNames(te,ae))return this.iterable=w(this.iterable,te,ae),this}get names(){return o(super.names,this.iterable.names)}}class Y extends D{constructor(te,ae,ge){super(),this.name=te,this.args=ae,this.async=ge}render(te){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(te)}}Y.kind="func";class G extends _{render(te){return"return "+super.render(te)}}G.kind="return";class F extends D{render(te){let ae="try"+super.render(te);return this.catch&&(ae+=this.catch.render(te)),this.finally&&(ae+=this.finally.render(te)),ae}optimizeNodes(){var te,ae;return super.optimizeNodes(),null===(te=this.catch)||void 0===te||te.optimizeNodes(),null===(ae=this.finally)||void 0===ae||ae.optimizeNodes(),this}optimizeNames(te,ae){var ge,pe;return super.optimizeNames(te,ae),null===(ge=this.catch)||void 0===ge||ge.optimizeNames(te,ae),null===(pe=this.finally)||void 0===pe||pe.optimizeNames(te,ae),this}get names(){const te=super.names;return this.catch&&o(te,this.catch.names),this.finally&&o(te,this.finally.names),te}}class j extends D{constructor(te){super(),this.error=te}render(te){return`catch(${this.error})`+super.render(te)}}j.kind="catch";class Z extends D{render(te){return"finally"+super.render(te)}}Z.kind="finally";function o(ne,te){for(const ae in te)ne[ae]=(ne[ae]||0)+(te[ae]||0);return ne}function h(ne,te){return te instanceof l._CodeOrName?o(ne,te.names):ne}function w(ne,te,ae){return ne instanceof l.Name?ge(ne):function pe(we){return we instanceof l._Code&&we._items.some(ce=>ce instanceof l.Name&&1===te[ce.str]&&void 0!==ae[ce.str])}(ne)?new l._Code(ne._items.reduce((we,ce)=>(ce instanceof l.Name&&(ce=ge(ce)),ce instanceof l._Code?we.push(...ce._items):we.push(ce),we),[])):ne;function ge(we){const ce=ae[we.str];return void 0===ce||1!==te[we.str]?we:(delete te[we.str],ce)}}function I(ne,te){for(const ae in te)ne[ae]=(ne[ae]||0)-(te[ae]||0)}function R(ne){return"boolean"==typeof ne||"number"==typeof ne||null===ne?!ne:l._`!${re(ne)}`}n.CodeGen=class T{constructor(te,ae={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ae,_n:ae.lines?"\n":""},this._extScope=te,this._scope=new v.Scope({parent:te}),this._nodes=[new P]}toString(){return this._root.render(this.opts)}name(te){return this._scope.name(te)}scopeName(te){return this._extScope.name(te)}scopeValue(te,ae){const ge=this._extScope.value(te,ae);return(this._values[ge.prefix]||(this._values[ge.prefix]=new Set)).add(ge),ge}getScopeValue(te,ae){return this._extScope.getValue(te,ae)}scopeRefs(te){return this._extScope.scopeRefs(te,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(te,ae,ge,pe){const we=this._scope.toName(ae);return void 0!==ge&&pe&&(this._constants[we.str]=ge),this._leafNode(new g(te,we,ge)),we}const(te,ae,ge){return this._def(v.varKinds.const,te,ae,ge)}let(te,ae,ge){return this._def(v.varKinds.let,te,ae,ge)}var(te,ae,ge){return this._def(v.varKinds.var,te,ae,ge)}assign(te,ae,ge){return this._leafNode(new y(te,ae,ge))}add(te,ae){return this._leafNode(new f(te,n.operators.ADD,ae))}code(te){return"function"==typeof te?te():te!==l.nil&&this._leafNode(new S(te)),this}object(...te){const ae=["{"];for(const[ge,pe]of te)ae.length>1&&ae.push(","),ae.push(ge),(ge!==pe||this.opts.es5)&&(ae.push(":"),(0,l.addCodeArg)(ae,pe));return ae.push("}"),new l._Code(ae)}if(te,ae,ge){if(this._blockNode(new C(te)),ae&&ge)this.code(ae).else().code(ge).endIf();else if(ae)this.code(ae).endIf();else if(ge)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(te){return this._elseNode(new C(te))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(C,x)}_for(te,ae){return this._blockNode(te),ae&&this.code(ae).endFor(),this}for(te,ae){return this._for(new k(te),ae)}forRange(te,ae,ge,pe,we=(this.opts.es5?v.varKinds.var:v.varKinds.let)){const ce=this._scope.toName(te);return this._for(new U(we,ce,ae,ge),()=>pe(ce))}forOf(te,ae,ge,pe=v.varKinds.const){const we=this._scope.toName(te);if(this.opts.es5){const ce=ae instanceof l.Name?ae:this.var("_arr",ae);return this.forRange("_i",0,l._`${ce}.length`,le=>{this.var(we,l._`${ce}[${le}]`),ge(we)})}return this._for(new z("of",pe,we,ae),()=>ge(we))}forIn(te,ae,ge,pe=(this.opts.es5?v.varKinds.var:v.varKinds.const)){if(this.opts.ownProperties)return this.forOf(te,l._`Object.keys(${ae})`,ge);const we=this._scope.toName(te);return this._for(new z("in",pe,we,ae),()=>ge(we))}endFor(){return this._endBlockNode(N)}label(te){return this._leafNode(new d(te))}break(te){return this._leafNode(new p(te))}return(te){const ae=new G;if(this._blockNode(ae),this.code(te),1!==ae.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(G)}try(te,ae,ge){if(!ae&&!ge)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new F;if(this._blockNode(pe),this.code(te),ae){const we=this.name("e");this._currNode=pe.catch=new j(we),ae(we)}return ge&&(this._currNode=pe.finally=new Z,this.code(ge)),this._endBlockNode(j,Z)}throw(te){return this._leafNode(new m(te))}block(te,ae){return this._blockStarts.push(this._nodes.length),te&&this.code(te).endBlock(ae),this}endBlock(te){const ae=this._blockStarts.pop();if(void 0===ae)throw new Error("CodeGen: not in self-balancing block");const ge=this._nodes.length-ae;if(ge<0||void 0!==te&&ge!==te)throw new Error(`CodeGen: wrong number of nodes: ${ge} vs ${te} expected`);return this._nodes.length=ae,this}func(te,ae=l.nil,ge,pe){return this._blockNode(new Y(te,ae,ge)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(Y)}optimize(te=1){for(;te-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(te){return this._currNode.nodes.push(te),this}_blockNode(te){this._currNode.nodes.push(te),this._nodes.push(te)}_endBlockNode(te,ae){const ge=this._currNode;if(ge instanceof te||ae&&ge instanceof ae)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ae?`${te.kind}/${ae.kind}`:te.kind}"`)}_elseNode(te){const ae=this._currNode;if(!(ae instanceof C))throw new Error('CodeGen: "else" without "if"');return this._currNode=ae.else=te,this}get _root(){return this._nodes[0]}get _currNode(){const te=this._nodes;return te[te.length-1]}set _currNode(te){const ae=this._nodes;ae[ae.length-1]=te}},n.not=R;const V=B(n.operators.AND);n.and=function H(...ne){return ne.reduce(V)};const L=B(n.operators.OR);function B(ne){return(te,ae)=>te===l.nil?ae:ae===l.nil?te:l._`${re(te)} ${ne} ${re(ae)}`}function re(ne){return ne instanceof l.Name?ne:l._`(${ne})`}n.or=function b(...ne){return ne.reduce(L)}},1917:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ValueScope=n.ValueScopeName=n.Scope=n.varKinds=n.UsedValueState=void 0;const l=u(26295);class v extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.value}}var E,f;(f=E||(n.UsedValueState=E={}))[f.Started=0]="Started",f[f.Completed=1]="Completed",n.varKinds={const:new l.Name("const"),let:new l.Name("let"),var:new l.Name("var")};class M{constructor({prefixes:d,parent:p}={}){this._names={},this._prefixes=d,this._parent=p}toName(d){return d instanceof l.Name?d:this.name(d)}name(d){return new l.Name(this._newName(d))}_newName(d){return`${d}${(this._names[d]||this._nameGroup(d)).index++}`}_nameGroup(d){var p,m;if(null!==(m=null===(p=this._parent)||void 0===p?void 0:p._prefixes)&&void 0!==m&&m.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}n.Scope=M;class s extends l.Name{constructor(d,p){super(p),this.prefix=d}setValue(d,{property:p,itemIndex:m}){this.value=d,this.scopePath=l._`.${new l.Name(p)}[${m}]`}}n.ValueScopeName=s;const g=l._`\n`;n.ValueScope=class y extends M{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?g:l.nil}}get(){return this._scope}name(d){return new s(d,this._newName(d))}value(d,p){var m;if(void 0===p.ref)throw new Error("CodeGen: ref must be passed in value");const S=this.toName(d),{prefix:_}=S,D=null!==(m=p.key)&&void 0!==m?m:p.ref;let P=this._values[_];if(P){const N=P.get(D);if(N)return N}else P=this._values[_]=new Map;P.set(D,S);const x=this._scope[_]||(this._scope[_]=[]),C=x.length;return x[C]=p.ref,S.setValue(p,{property:_,itemIndex:C}),S}getValue(d,p){const m=this._values[d];if(m)return m.get(p)}scopeRefs(d,p=this._values){return this._reduceValues(p,m=>{if(void 0===m.scopePath)throw new Error(`CodeGen: name "${m}" has no value`);return l._`${d}${m.scopePath}`})}scopeCode(d=this._values,p,m){return this._reduceValues(d,S=>{if(void 0===S.value)throw new Error(`CodeGen: name "${S}" has no value`);return S.value.code},p,m)}_reduceValues(d,p,m={},S){let _=l.nil;for(const D in d){const P=d[D];if(!P)continue;const x=m[D]=m[D]||new Map;P.forEach(C=>{if(x.has(C))return;x.set(C,E.Started);let N=p(C);if(N){const k=this.opts.es5?n.varKinds.var:n.varKinds.const;_=l._`${_}${k} ${C} = ${N};${this.opts._n}`}else{if(!(N=S?.(C)))throw new v(C);_=l._`${_}${N}${this.opts._n}`}x.set(C,E.Completed)})}return _}}},75091:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendErrors=n.resetErrorsCount=n.reportExtraError=n.reportError=n.keyword$DataError=n.keywordError=void 0;const l=u(56382),v=u(97990),E=u(5976);function f(x,C){const N=x.const("err",C);x.if(l._`${E.default.vErrors} === null`,()=>x.assign(E.default.vErrors,l._`[${N}]`),l._`${E.default.vErrors}.push(${N})`),x.code(l._`${E.default.errors}++`)}function d(x,C){const{gen:N,validateName:k,schemaEnv:U}=x;U.$async?N.throw(l._`new ${x.ValidationError}(${C})`):(N.assign(l._`${k}.errors`,C),N.return(!1))}n.keywordError={message:({keyword:x})=>l.str`must pass "${x}" keyword validation`},n.keyword$DataError={message:({keyword:x,schemaType:C})=>C?l.str`"${x}" keyword must be ${C} ($data)`:l.str`"${x}" keyword is invalid ($data)`},n.reportError=function M(x,C=n.keywordError,N,k){const{it:U}=x,{gen:z,compositeRule:Y,allErrors:G}=U,F=m(x,C,N);k??(Y||G)?f(z,F):d(U,l._`[${F}]`)},n.reportExtraError=function s(x,C=n.keywordError,N){const{it:k}=x,{gen:U,compositeRule:z,allErrors:Y}=k;f(U,m(x,C,N)),z||Y||d(k,E.default.vErrors)},n.resetErrorsCount=function g(x,C){x.assign(E.default.errors,C),x.if(l._`${E.default.vErrors} !== null`,()=>x.if(C,()=>x.assign(l._`${E.default.vErrors}.length`,C),()=>x.assign(E.default.vErrors,null)))},n.extendErrors=function y({gen:x,keyword:C,schemaValue:N,data:k,errsCount:U,it:z}){if(void 0===U)throw new Error("ajv implementation error");const Y=x.name("err");x.forRange("i",U,E.default.errors,G=>{x.const(Y,l._`${E.default.vErrors}[${G}]`),x.if(l._`${Y}.instancePath === undefined`,()=>x.assign(l._`${Y}.instancePath`,(0,l.strConcat)(E.default.instancePath,z.errorPath))),x.assign(l._`${Y}.schemaPath`,l.str`${z.errSchemaPath}/${C}`),z.opts.verbose&&(x.assign(l._`${Y}.schema`,N),x.assign(l._`${Y}.data`,k))})};const p={keyword:new l.Name("keyword"),schemaPath:new l.Name("schemaPath"),params:new l.Name("params"),propertyName:new l.Name("propertyName"),message:new l.Name("message"),schema:new l.Name("schema"),parentSchema:new l.Name("parentSchema")};function m(x,C,N){const{createErrors:k}=x.it;return!1===k?l._`{}`:function S(x,C,N={}){const{gen:k,it:U}=x,z=[_(U,N),D(x,N)];return function P(x,{params:C,message:N},k){const{keyword:U,data:z,schemaValue:Y,it:G}=x,{opts:F,propertyName:j,topSchemaRef:Z,schemaPath:T}=G;k.push([p.keyword,U],[p.params,"function"==typeof C?C(x):C||l._`{}`]),F.messages&&k.push([p.message,"function"==typeof N?N(x):N]),F.verbose&&k.push([p.schema,Y],[p.parentSchema,l._`${Z}${T}`],[E.default.data,z]),j&&k.push([p.propertyName,j])}(x,C,z),k.object(...z)}(x,C,N)}function _({errorPath:x},{instancePath:C}){const N=C?l.str`${x}${(0,v.getErrorPath)(C,v.Type.Str)}`:x;return[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,N)]}function D({keyword:x,it:{errSchemaPath:C}},{schemaPath:N,parentSchema:k}){let U=k?C:l.str`${C}/${x}`;return N&&(U=l.str`${U}${(0,v.getErrorPath)(N,v.Type.Str)}`),[p.schemaPath,U]}},17140:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveSchema=n.getCompilingSchema=n.resolveRef=n.compileSchema=n.SchemaEnv=void 0;const l=u(56382),v=u(20496),E=u(5976),M=u(31880),s=u(97990),g=u(66764);class y{constructor(N){var k;let U;this.refs={},this.dynamicAnchors={},"object"==typeof N.schema&&(U=N.schema),this.schema=N.schema,this.schemaId=N.schemaId,this.root=N.root||this,this.baseId=null!==(k=N.baseId)&&void 0!==k?k:(0,M.normalizeId)(U?.[N.schemaId||"$id"]),this.schemaPath=N.schemaPath,this.localRefs=N.localRefs,this.meta=N.meta,this.$async=U?.$async,this.refs={}}}function f(C){const N=m.call(this,C);if(N)return N;const k=(0,M.getFullPath)(this.opts.uriResolver,C.root.baseId),{es5:U,lines:z}=this.opts.code,{ownProperties:Y}=this.opts,G=new l.CodeGen(this.scope,{es5:U,lines:z,ownProperties:Y});let F;C.$async&&(F=G.scopeValue("Error",{ref:v.default,code:l._`require("ajv/dist/runtime/validation_error").default`}));const j=G.scopeName("validate");C.validateName=j;const Z={gen:G,allErrors:this.opts.allErrors,data:E.default.data,parentData:E.default.parentData,parentDataProperty:E.default.parentDataProperty,dataNames:[E.default.data],dataPathArr:[l.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:G.scopeValue("schema",!0===this.opts.code.source?{ref:C.schema,code:(0,l.stringify)(C.schema)}:{ref:C.schema}),validateName:j,ValidationError:F,schema:C.schema,schemaEnv:C,rootId:k,baseId:C.baseId||k,schemaPath:l.nil,errSchemaPath:C.schemaPath||(this.opts.jtd?"":"#"),errorPath:l._`""`,opts:this.opts,self:this};let T;try{this._compilations.add(C),(0,g.validateFunctionCode)(Z),G.optimize(this.opts.code.optimize);const o=G.toString();T=`${G.scopeRefs(E.default.scope)}return ${o}`,this.opts.code.process&&(T=this.opts.code.process(T,C));const w=new Function(`${E.default.self}`,`${E.default.scope}`,T)(this,this.scope.get());if(this.scope.value(j,{ref:w}),w.errors=null,w.schema=C.schema,w.schemaEnv=C,C.$async&&(w.$async=!0),!0===this.opts.code.source&&(w.source={validateName:j,validateCode:o,scopeValues:G._values}),this.opts.unevaluated){const{props:I,items:R}=Z;w.evaluated={props:I instanceof l.Name?void 0:I,items:R instanceof l.Name?void 0:R,dynamicProps:I instanceof l.Name,dynamicItems:R instanceof l.Name},w.source&&(w.source.evaluated=(0,l.stringify)(w.evaluated))}return C.validate=w,C}catch(o){throw delete C.validate,delete C.validateName,T&&this.logger.error("Error compiling schema, function code:",T),o}finally{this._compilations.delete(C)}}function p(C){return(0,M.inlineRef)(C.schema,this.opts.inlineRefs)?C.schema:C.validate?C:f.call(this,C)}function m(C){for(const N of this._compilations)if(S(N,C))return N}function S(C,N){return C.schema===N.schema&&C.root===N.root&&C.baseId===N.baseId}function _(C,N){let k;for(;"string"==typeof(k=this.refs[N]);)N=k;return k||this.schemas[N]||D.call(this,C,N)}function D(C,N){const k=this.opts.uriResolver.parse(N),U=(0,M._getFullPath)(this.opts.uriResolver,k);let z=(0,M.getFullPath)(this.opts.uriResolver,C.baseId,void 0);if(Object.keys(C.schema).length>0&&U===z)return x.call(this,k,C);const Y=(0,M.normalizeId)(U),G=this.refs[Y]||this.schemas[Y];if("string"==typeof G){const F=D.call(this,C,G);return"object"!=typeof F?.schema?void 0:x.call(this,k,F)}if("object"==typeof G?.schema){if(G.validate||f.call(this,G),Y===(0,M.normalizeId)(N)){const{schema:F}=G,{schemaId:j}=this.opts,Z=F[j];return Z&&(z=(0,M.resolveUrl)(this.opts.uriResolver,z,Z)),new y({schema:F,schemaId:j,root:C,baseId:z})}return x.call(this,k,G)}}n.SchemaEnv=y,n.compileSchema=f,n.resolveRef=function d(C,N,k){var U;k=(0,M.resolveUrl)(this.opts.uriResolver,N,k);const z=C.refs[k];if(z)return z;let Y=_.call(this,C,k);if(void 0===Y){const G=null===(U=C.localRefs)||void 0===U?void 0:U[k],{schemaId:F}=this.opts;G&&(Y=new y({schema:G,schemaId:F,root:C,baseId:N}))}return void 0!==Y?C.refs[k]=p.call(this,Y):void 0},n.getCompilingSchema=m,n.resolveSchema=D;const P=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function x(C,{baseId:N,schema:k,root:U}){var z;if("/"!==(null===(z=C.fragment)||void 0===z?void 0:z[0]))return;for(const F of C.fragment.slice(1).split("/")){if("boolean"==typeof k)return;const j=k[(0,s.unescapeFragment)(F)];if(void 0===j)return;const Z="object"==typeof(k=j)&&k[this.opts.schemaId];!P.has(F)&&Z&&(N=(0,M.resolveUrl)(this.opts.uriResolver,N,Z))}let Y;if("boolean"!=typeof k&&k.$ref&&!(0,s.schemaHasRulesButRef)(k,this.RULES)){const F=(0,M.resolveUrl)(this.opts.uriResolver,N,k.$ref);Y=D.call(this,U,F)}const{schemaId:G}=this.opts;return Y=Y||new y({schema:k,schemaId:G,root:U,baseId:N}),Y.schema!==Y.root.schema?Y:void 0}},5976:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v={data:new l.Name("data"),valCxt:new l.Name("valCxt"),instancePath:new l.Name("instancePath"),parentData:new l.Name("parentData"),parentDataProperty:new l.Name("parentDataProperty"),rootData:new l.Name("rootData"),dynamicAnchors:new l.Name("dynamicAnchors"),vErrors:new l.Name("vErrors"),errors:new l.Name("errors"),this:new l.Name("this"),self:new l.Name("self"),scope:new l.Name("scope"),json:new l.Name("json"),jsonPos:new l.Name("jsonPos"),jsonLen:new l.Name("jsonLen"),jsonPart:new l.Name("jsonPart")};n.default=v},80140:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(31880);class v extends Error{constructor(M,s,g,y){super(y||`can't resolve reference ${g} from id ${s}`),this.missingRef=(0,l.resolveUrl)(M,s,g),this.missingSchema=(0,l.normalizeId)((0,l.getFullPath)(M,this.missingRef))}}n.default=v},31880:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSchemaRefs=n.resolveUrl=n.normalizeId=n._getFullPath=n.getFullPath=n.inlineRef=void 0;const l=u(97990),v=u(12559),E=u(23366),M=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);n.inlineRef=function s(x,C=!0){return"boolean"==typeof x||(!0===C?!y(x):!!C&&f(x)<=C)};const g=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y(x){for(const C in x){if(g.has(C))return!0;const N=x[C];if(Array.isArray(N)&&N.some(y)||"object"==typeof N&&y(N))return!0}return!1}function f(x){let C=0;for(const N in x){if("$ref"===N)return 1/0;if(C++,!M.has(N)&&("object"==typeof x[N]&&(0,l.eachItem)(x[N],k=>C+=f(k)),C===1/0))return 1/0}return C}function d(x,C="",N){!1!==N&&(C=S(C));const k=x.parse(C);return p(x,k)}function p(x,C){return x.serialize(C).split("#")[0]+"#"}n.getFullPath=d,n._getFullPath=p;const m=/#\/?$/;function S(x){return x?x.replace(m,""):""}n.normalizeId=S,n.resolveUrl=function _(x,C,N){return N=S(N),x.resolve(C,N)};const D=/^[a-z_][-a-z0-9._]*$/i;n.getSchemaRefs=function P(x,C){if("boolean"==typeof x)return{};const{schemaId:N,uriResolver:k}=this.opts,U=S(x[N]||C),z={"":U},Y=d(k,U,!1),G={},F=new Set;return E(x,{allKeys:!0},(T,o,h,w)=>{if(void 0===w)return;const I=Y+o;let R=z[w];function V(L){const b=this.opts.uriResolver.resolve;if(L=S(R?b(R,L):L),F.has(L))throw Z(L);F.add(L);let B=this.refs[L];return"string"==typeof B&&(B=this.refs[B]),"object"==typeof B?j(T,B.schema,L):L!==S(I)&&("#"===L[0]?(j(T,G[L],L),G[L]=T):this.refs[L]=I),L}function H(L){if("string"==typeof L){if(!D.test(L))throw new Error(`invalid anchor "${L}"`);V.call(this,`#${L}`)}}"string"==typeof T[N]&&(R=V.call(this,T[N])),H.call(this,T.$anchor),H.call(this,T.$dynamicAnchor),z[o]=R}),G;function j(T,o,h){if(void 0!==o&&!v(T,o))throw Z(h)}function Z(T){return new Error(`reference "${T}" resolves to more than one schema`)}}},62848:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRules=n.isJSONType=void 0;const l=new Set(["string","number","integer","boolean","null","object","array"]);n.isJSONType=function v(M){return"string"==typeof M&&l.has(M)},n.getRules=function E(){const M={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...M,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},M.number,M.string,M.array,M.object],post:{rules:[]},all:{},keywords:{}}}},97990:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkStrictMode=n.getErrorPath=n.Type=n.useFunc=n.setEvaluated=n.evaluatedPropsToName=n.mergeEvaluated=n.eachItem=n.unescapeJsonPointer=n.escapeJsonPointer=n.escapeFragment=n.unescapeFragment=n.schemaRefOrVal=n.schemaHasRulesButRef=n.schemaHasRules=n.checkUnknownRules=n.alwaysValidSchema=n.toHash=void 0;const l=u(56382),v=u(26295);function s(Y,G=Y.schema){const{opts:F,self:j}=Y;if(!F.strictSchema||"boolean"==typeof G)return;const Z=j.RULES.keywords;for(const T in G)Z[T]||z(Y,`unknown keyword: "${T}"`)}function g(Y,G){if("boolean"==typeof Y)return!Y;for(const F in Y)if(G[F])return!0;return!1}function m(Y){return"number"==typeof Y?`${Y}`:Y.replace(/~/g,"~0").replace(/\//g,"~1")}function S(Y){return Y.replace(/~1/g,"/").replace(/~0/g,"~")}function D({mergeNames:Y,mergeToName:G,mergeValues:F,resultToName:j}){return(Z,T,o,h)=>{const w=void 0===o?T:o instanceof l.Name?(T instanceof l.Name?Y(Z,T,o):G(Z,T,o),o):T instanceof l.Name?(G(Z,o,T),T):F(T,o);return h!==l.Name||w instanceof l.Name?w:j(Z,w)}}function P(Y,G){if(!0===G)return Y.var("props",!0);const F=Y.var("props",l._`{}`);return void 0!==G&&x(Y,F,G),F}function x(Y,G,F){Object.keys(F).forEach(j=>Y.assign(l._`${G}${(0,l.getProperty)(j)}`,!0))}n.toHash=function E(Y){const G={};for(const F of Y)G[F]=!0;return G},n.alwaysValidSchema=function M(Y,G){return"boolean"==typeof G?G:0===Object.keys(G).length||(s(Y,G),!g(G,Y.self.RULES.all))},n.checkUnknownRules=s,n.schemaHasRules=g,n.schemaHasRulesButRef=function y(Y,G){if("boolean"==typeof Y)return!Y;for(const F in Y)if("$ref"!==F&&G.all[F])return!0;return!1},n.schemaRefOrVal=function f({topSchemaRef:Y,schemaPath:G},F,j,Z){if(!Z){if("number"==typeof F||"boolean"==typeof F)return F;if("string"==typeof F)return l._`${F}`}return l._`${Y}${G}${(0,l.getProperty)(j)}`},n.unescapeFragment=function d(Y){return S(decodeURIComponent(Y))},n.escapeFragment=function p(Y){return encodeURIComponent(m(Y))},n.escapeJsonPointer=m,n.unescapeJsonPointer=S,n.eachItem=function _(Y,G){if(Array.isArray(Y))for(const F of Y)G(F);else G(Y)},n.mergeEvaluated={props:D({mergeNames:(Y,G,F)=>Y.if(l._`${F} !== true && ${G} !== undefined`,()=>{Y.if(l._`${G} === true`,()=>Y.assign(F,!0),()=>Y.assign(F,l._`${F} || {}`).code(l._`Object.assign(${F}, ${G})`))}),mergeToName:(Y,G,F)=>Y.if(l._`${F} !== true`,()=>{!0===G?Y.assign(F,!0):(Y.assign(F,l._`${F} || {}`),x(Y,F,G))}),mergeValues:(Y,G)=>!0===Y||{...Y,...G},resultToName:P}),items:D({mergeNames:(Y,G,F)=>Y.if(l._`${F} !== true && ${G} !== undefined`,()=>Y.assign(F,l._`${G} === true ? true : ${F} > ${G} ? ${F} : ${G}`)),mergeToName:(Y,G,F)=>Y.if(l._`${F} !== true`,()=>Y.assign(F,!0===G||l._`${F} > ${G} ? ${F} : ${G}`)),mergeValues:(Y,G)=>!0===Y||Math.max(Y,G),resultToName:(Y,G)=>Y.var("items",G)})},n.evaluatedPropsToName=P,n.setEvaluated=x;const C={};var k,Y;function z(Y,G,F=Y.opts.strictSchema){if(F){if(G=`strict mode: ${G}`,!0===F)throw new Error(G);Y.self.logger.warn(G)}}n.useFunc=function N(Y,G){return Y.scopeValue("func",{ref:G,code:C[G.code]||(C[G.code]=new v._Code(G.code))})},(Y=k||(n.Type=k={}))[Y.Num=0]="Num",Y[Y.Str=1]="Str",n.getErrorPath=function U(Y,G,F){if(Y instanceof l.Name){const j=G===k.Num;return F?j?l._`"[" + ${Y} + "]"`:l._`"['" + ${Y} + "']"`:j?l._`"/" + ${Y}`:l._`"/" + ${Y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return F?(0,l.getProperty)(Y).toString():"/"+m(Y)},n.checkStrictMode=z},20368:(q,n)=>{"use strict";function l(E,M){return M.rules.some(s=>v(E,s))}function v(E,M){var s;return void 0!==E[M.keyword]||(null===(s=M.definition.implements)||void 0===s?void 0:s.some(g=>void 0!==E[g]))}Object.defineProperty(n,"__esModule",{value:!0}),n.shouldUseRule=n.shouldUseGroup=n.schemaHasRulesForType=void 0,n.schemaHasRulesForType=function u({schema:E,self:M},s){const g=M.RULES.types[s];return g&&!0!==g&&l(E,g)},n.shouldUseGroup=l,n.shouldUseRule=v},8007:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.boolOrEmptySchema=n.topBoolOrEmptySchema=void 0;const l=u(75091),v=u(56382),E=u(5976),M={message:"boolean schema is false"};function y(f,d){const{gen:p,data:m}=f,S={gen:p,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:f};(0,l.reportError)(S,M,void 0,d)}n.topBoolOrEmptySchema=function s(f){const{gen:d,schema:p,validateName:m}=f;!1===p?y(f,!1):"object"==typeof p&&!0===p.$async?d.return(E.default.data):(d.assign(v._`${m}.errors`,null),d.return(!0))},n.boolOrEmptySchema=function g(f,d){const{gen:p,schema:m}=f;!1===m?(p.var(d,!1),y(f)):p.var(d,!0)}},59078:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.reportTypeError=n.checkDataTypes=n.checkDataType=n.coerceAndCheckDataType=n.getJSONTypes=n.getSchemaTypes=n.DataType=void 0;const l=u(62848),v=u(20368),E=u(75091),M=u(56382),s=u(97990);var g,k;function f(k){const U=Array.isArray(k)?k:k?[k]:[];if(U.every(l.isJSONType))return U;throw new Error("type must be JSONType or JSONType[]: "+U.join(","))}(k=g||(n.DataType=g={}))[k.Correct=0]="Correct",k[k.Wrong=1]="Wrong",n.getSchemaTypes=function y(k){const U=f(k.type);if(U.includes("null")){if(!1===k.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!U.length&&void 0!==k.nullable)throw new Error('"nullable" cannot be used without "type"');!0===k.nullable&&U.push("null")}return U},n.getJSONTypes=f,n.coerceAndCheckDataType=function d(k,U){const{gen:z,data:Y,opts:G}=k,F=function m(k,U){return U?k.filter(z=>p.has(z)||"array"===U&&"array"===z):[]}(U,G.coerceTypes),j=U.length>0&&!(0===F.length&&1===U.length&&(0,v.schemaHasRulesForType)(k,U[0]));if(j){const Z=P(U,Y,G.strictNumbers,g.Wrong);z.if(Z,()=>{F.length?function S(k,U,z){const{gen:Y,data:G,opts:F}=k,j=Y.let("dataType",M._`typeof ${G}`),Z=Y.let("coerced",M._`undefined`);"array"===F.coerceTypes&&Y.if(M._`${j} == 'object' && Array.isArray(${G}) && ${G}.length == 1`,()=>Y.assign(G,M._`${G}[0]`).assign(j,M._`typeof ${G}`).if(P(U,G,F.strictNumbers),()=>Y.assign(Z,G))),Y.if(M._`${Z} !== undefined`);for(const o of z)(p.has(o)||"array"===o&&"array"===F.coerceTypes)&&T(o);function T(o){switch(o){case"string":return void Y.elseIf(M._`${j} == "number" || ${j} == "boolean"`).assign(Z,M._`"" + ${G}`).elseIf(M._`${G} === null`).assign(Z,M._`""`);case"number":return void Y.elseIf(M._`${j} == "boolean" || ${G} === null + || (${j} == "string" && ${G} && ${G} == +${G})`).assign(Z,M._`+${G}`);case"integer":return void Y.elseIf(M._`${j} === "boolean" || ${G} === null + || (${j} === "string" && ${G} && ${G} == +${G} && !(${G} % 1))`).assign(Z,M._`+${G}`);case"boolean":return void Y.elseIf(M._`${G} === "false" || ${G} === 0 || ${G} === null`).assign(Z,!1).elseIf(M._`${G} === "true" || ${G} === 1`).assign(Z,!0);case"null":return Y.elseIf(M._`${G} === "" || ${G} === 0 || ${G} === false`),void Y.assign(Z,null);case"array":Y.elseIf(M._`${j} === "string" || ${j} === "number" + || ${j} === "boolean" || ${G} === null`).assign(Z,M._`[${G}]`)}}Y.else(),C(k),Y.endIf(),Y.if(M._`${Z} !== undefined`,()=>{Y.assign(G,Z),function _({gen:k,parentData:U,parentDataProperty:z},Y){k.if(M._`${U} !== undefined`,()=>k.assign(M._`${U}[${z}]`,Y))}(k,Z)})}(k,U,F):C(k)})}return j};const p=new Set(["string","number","integer","boolean","null"]);function D(k,U,z,Y=g.Correct){const G=Y===g.Correct?M.operators.EQ:M.operators.NEQ;let F;switch(k){case"null":return M._`${U} ${G} null`;case"array":F=M._`Array.isArray(${U})`;break;case"object":F=M._`${U} && typeof ${U} == "object" && !Array.isArray(${U})`;break;case"integer":F=j(M._`!(${U} % 1) && !isNaN(${U})`);break;case"number":F=j();break;default:return M._`typeof ${U} ${G} ${k}`}return Y===g.Correct?F:(0,M.not)(F);function j(Z=M.nil){return(0,M.and)(M._`typeof ${U} == "number"`,Z,z?M._`isFinite(${U})`:M.nil)}}function P(k,U,z,Y){if(1===k.length)return D(k[0],U,z,Y);let G;const F=(0,s.toHash)(k);if(F.array&&F.object){const j=M._`typeof ${U} != "object"`;G=F.null?j:M._`!${U} || ${j}`,delete F.null,delete F.array,delete F.object}else G=M.nil;F.number&&delete F.integer;for(const j in F)G=(0,M.and)(G,D(j,U,z,Y));return G}n.checkDataType=D,n.checkDataTypes=P;const x={message:({schema:k})=>`must be ${k}`,params:({schema:k,schemaValue:U})=>"string"==typeof k?M._`{type: ${k}}`:M._`{type: ${U}}`};function C(k){const U=function N(k){const{gen:U,data:z,schema:Y}=k,G=(0,s.schemaRefOrVal)(k,Y,"type");return{gen:U,keyword:"type",data:z,schema:Y.type,schemaCode:G,schemaValue:G,parentSchema:Y,params:{},it:k}}(k);(0,E.reportError)(U,x)}n.reportTypeError=C},57866:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assignDefaults=void 0;const l=u(56382),v=u(97990);function M(s,g,y){const{gen:f,compositeRule:d,data:p,opts:m}=s;if(void 0===y)return;const S=l._`${p}${(0,l.getProperty)(g)}`;if(d)return void(0,v.checkStrictMode)(s,`default is ignored for: ${S}`);let _=l._`${S} === undefined`;"empty"===m.useDefaults&&(_=l._`${_} || ${S} === null || ${S} === ""`),f.if(_,l._`${S} = ${(0,l.stringify)(y)}`)}n.assignDefaults=function E(s,g){const{properties:y,items:f}=s.schema;if("object"===g&&y)for(const d in y)M(s,d,y[d].default);else"array"===g&&Array.isArray(f)&&f.forEach((d,p)=>M(s,p,d.default))}},66764:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getData=n.KeywordCxt=n.validateFunctionCode=void 0;const l=u(8007),v=u(59078),E=u(20368),M=u(59078),s=u(57866),g=u(22707),y=u(62639),f=u(56382),d=u(5976),p=u(31880),m=u(97990),S=u(75091);function D({gen:fe,validateName:he,schema:Ae,schemaEnv:Pe,opts:Re},ot){Re.code.es5?fe.func(he,f._`${d.default.data}, ${d.default.valCxt}`,Pe.$async,()=>{fe.code(f._`"use strict"; ${k(Ae,Re)}`),function x(fe,he){fe.if(d.default.valCxt,()=>{fe.var(d.default.instancePath,f._`${d.default.valCxt}.${d.default.instancePath}`),fe.var(d.default.parentData,f._`${d.default.valCxt}.${d.default.parentData}`),fe.var(d.default.parentDataProperty,f._`${d.default.valCxt}.${d.default.parentDataProperty}`),fe.var(d.default.rootData,f._`${d.default.valCxt}.${d.default.rootData}`),he.dynamicRef&&fe.var(d.default.dynamicAnchors,f._`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{fe.var(d.default.instancePath,f._`""`),fe.var(d.default.parentData,f._`undefined`),fe.var(d.default.parentDataProperty,f._`undefined`),fe.var(d.default.rootData,d.default.data),he.dynamicRef&&fe.var(d.default.dynamicAnchors,f._`{}`)})}(fe,Re),fe.code(ot)}):fe.func(he,f._`${d.default.data}, ${function P(fe){return f._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${fe.dynamicRef?f._`, ${d.default.dynamicAnchors}={}`:f.nil}}={}`}(Re)}`,Pe.$async,()=>fe.code(k(Ae,Re)).code(ot))}function k(fe,he){const Ae="object"==typeof fe&&fe[he.schemaId];return Ae&&(he.code.source||he.code.process)?f._`/*# sourceURL=${Ae} */`:f.nil}function U(fe,he){Y(fe)&&(F(fe),z(fe))?function G(fe,he){const{schema:Ae,gen:Pe,opts:Re}=fe;Re.$comment&&Ae.$comment&&w(fe),function o(fe){const he=fe.schema[fe.opts.schemaId];he&&(fe.baseId=(0,p.resolveUrl)(fe.opts.uriResolver,fe.baseId,he))}(fe),function h(fe){if(fe.schema.$async&&!fe.schemaEnv.$async)throw new Error("async schema in sync schema")}(fe);const ot=Pe.const("_errs",d.default.errors);j(fe,ot),Pe.var(he,f._`${ot} === ${d.default.errors}`)}(fe,he):(0,l.boolOrEmptySchema)(fe,he)}function z({schema:fe,self:he}){if("boolean"==typeof fe)return!fe;for(const Ae in fe)if(he.RULES.all[Ae])return!0;return!1}function Y(fe){return"boolean"!=typeof fe.schema}function F(fe){(0,m.checkUnknownRules)(fe),function Z(fe){const{schema:he,errSchemaPath:Ae,opts:Pe,self:Re}=fe;he.$ref&&Pe.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(he,Re.RULES)&&Re.logger.warn(`$ref: keywords ignored in schema at path "${Ae}"`)}(fe)}function j(fe,he){if(fe.opts.jtd)return V(fe,[],!1,he);const Ae=(0,v.getSchemaTypes)(fe.schema);V(fe,Ae,!(0,v.coerceAndCheckDataType)(fe,Ae),he)}function w({gen:fe,schemaEnv:he,schema:Ae,errSchemaPath:Pe,opts:Re}){const ot=Ae.$comment;if(!0===Re.$comment)fe.code(f._`${d.default.self}.logger.log(${ot})`);else if("function"==typeof Re.$comment){const nt=f.str`${Pe}/$comment`,Ye=fe.scopeValue("root",{ref:he.root});fe.code(f._`${d.default.self}.opts.$comment(${ot}, ${nt}, ${Ye}.schema)`)}}function V(fe,he,Ae,Pe){const{gen:Re,schema:ot,data:nt,allErrors:Ye,opts:It,self:st}=fe,{RULES:He}=st;function ze(Be){(0,E.shouldUseGroup)(ot,Be)&&(Be.type?(Re.if((0,M.checkDataType)(Be.type,nt,It.strictNumbers)),H(fe,Be),1===he.length&&he[0]===Be.type&&Ae&&(Re.else(),(0,M.reportTypeError)(fe)),Re.endIf()):H(fe,Be),Ye||Re.if(f._`${d.default.errors} === ${Pe||0}`))}!ot.$ref||!It.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(ot,He)?(It.jtd||function L(fe,he){fe.schemaEnv.meta||!fe.opts.strictTypes||(function b(fe,he){if(he.length){if(!fe.dataTypes.length)return void(fe.dataTypes=he);he.forEach(Ae=>{te(fe.dataTypes,Ae)||ge(fe,`type "${Ae}" not allowed by context "${fe.dataTypes.join(",")}"`)}),function ae(fe,he){const Ae=[];for(const Pe of fe.dataTypes)te(he,Pe)?Ae.push(Pe):he.includes("integer")&&"number"===Pe&&Ae.push("integer");fe.dataTypes=Ae}(fe,he)}}(fe,he),fe.opts.allowUnionTypes||function B(fe,he){he.length>1&&(2!==he.length||!he.includes("null"))&&ge(fe,"use allowUnionTypes to allow union type keyword")}(fe,he),function re(fe,he){const Ae=fe.self.RULES.all;for(const Pe in Ae){const Re=Ae[Pe];if("object"==typeof Re&&(0,E.shouldUseRule)(fe.schema,Re)){const{type:ot}=Re.definition;ot.length&&!ot.some(nt=>ne(he,nt))&&ge(fe,`missing type "${ot.join(",")}" for keyword "${Pe}"`)}}}(fe,fe.dataTypes))}(fe,he),Re.block(()=>{for(const Be of He.rules)ze(Be);ze(He.post)})):Re.block(()=>we(fe,"$ref",He.all.$ref.definition))}function H(fe,he){const{gen:Ae,schema:Pe,opts:{useDefaults:Re}}=fe;Re&&(0,s.assignDefaults)(fe,he.type),Ae.block(()=>{for(const ot of he.rules)(0,E.shouldUseRule)(Pe,ot)&&we(fe,ot.keyword,ot.definition,he.type)})}function ne(fe,he){return fe.includes(he)||"number"===he&&fe.includes("integer")}function te(fe,he){return fe.includes(he)||"integer"===he&&fe.includes("number")}function ge(fe,he){he+=` at "${fe.schemaEnv.baseId+fe.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(fe,he,fe.opts.strictTypes)}n.validateFunctionCode=function _(fe){Y(fe)&&(F(fe),z(fe))?function C(fe){const{schema:he,opts:Ae,gen:Pe}=fe;D(fe,()=>{Ae.$comment&&he.$comment&&w(fe),function T(fe){const{schema:he,opts:Ae}=fe;void 0!==he.default&&Ae.useDefaults&&Ae.strictSchema&&(0,m.checkStrictMode)(fe,"default is ignored in the schema root")}(fe),Pe.let(d.default.vErrors,null),Pe.let(d.default.errors,0),Ae.unevaluated&&function N(fe){const{gen:he,validateName:Ae}=fe;fe.evaluated=he.const("evaluated",f._`${Ae}.evaluated`),he.if(f._`${fe.evaluated}.dynamicProps`,()=>he.assign(f._`${fe.evaluated}.props`,f._`undefined`)),he.if(f._`${fe.evaluated}.dynamicItems`,()=>he.assign(f._`${fe.evaluated}.items`,f._`undefined`))}(fe),j(fe),function I(fe){const{gen:he,schemaEnv:Ae,validateName:Pe,ValidationError:Re,opts:ot}=fe;Ae.$async?he.if(f._`${d.default.errors} === 0`,()=>he.return(d.default.data),()=>he.throw(f._`new ${Re}(${d.default.vErrors})`)):(he.assign(f._`${Pe}.errors`,d.default.vErrors),ot.unevaluated&&function R({gen:fe,evaluated:he,props:Ae,items:Pe}){Ae instanceof f.Name&&fe.assign(f._`${he}.props`,Ae),Pe instanceof f.Name&&fe.assign(f._`${he}.items`,Pe)}(fe),he.return(f._`${d.default.errors} === 0`))}(fe)})}(fe):D(fe,()=>(0,l.topBoolOrEmptySchema)(fe))};class pe{constructor(he,Ae,Pe){if((0,g.validateKeywordUsage)(he,Ae,Pe),this.gen=he.gen,this.allErrors=he.allErrors,this.keyword=Pe,this.data=he.data,this.schema=he.schema[Pe],this.$data=Ae.$data&&he.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(he,this.schema,Pe,this.$data),this.schemaType=Ae.schemaType,this.parentSchema=he.schema,this.params={},this.it=he,this.def=Ae,this.$data)this.schemaCode=he.gen.const("vSchema",ue(this.$data,he));else if(this.schemaCode=this.schemaValue,!(0,g.validSchemaType)(this.schema,Ae.schemaType,Ae.allowUndefined))throw new Error(`${Pe} value must be ${JSON.stringify(Ae.schemaType)}`);("code"in Ae?Ae.trackErrors:!1!==Ae.errors)&&(this.errsCount=he.gen.const("_errs",d.default.errors))}result(he,Ae,Pe){this.failResult((0,f.not)(he),Ae,Pe)}failResult(he,Ae,Pe){this.gen.if(he),Pe?Pe():this.error(),Ae?(this.gen.else(),Ae(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(he,Ae){this.failResult((0,f.not)(he),void 0,Ae)}fail(he){if(void 0===he)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(he),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(he){if(!this.$data)return this.fail(he);const{schemaCode:Ae}=this;this.fail(f._`${Ae} !== undefined && (${(0,f.or)(this.invalid$data(),he)})`)}error(he,Ae,Pe){if(Ae)return this.setParams(Ae),this._error(he,Pe),void this.setParams({});this._error(he,Pe)}_error(he,Ae){(he?S.reportExtraError:S.reportError)(this,this.def.error,Ae)}$dataError(){(0,S.reportError)(this,this.def.$dataError||S.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,S.resetErrorsCount)(this.gen,this.errsCount)}ok(he){this.allErrors||this.gen.if(he)}setParams(he,Ae){Ae?Object.assign(this.params,he):this.params=he}block$data(he,Ae,Pe=f.nil){this.gen.block(()=>{this.check$data(he,Pe),Ae()})}check$data(he=f.nil,Ae=f.nil){if(!this.$data)return;const{gen:Pe,schemaCode:Re,schemaType:ot,def:nt}=this;Pe.if((0,f.or)(f._`${Re} === undefined`,Ae)),he!==f.nil&&Pe.assign(he,!0),(ot.length||nt.validateSchema)&&(Pe.elseIf(this.invalid$data()),this.$dataError(),he!==f.nil&&Pe.assign(he,!1)),Pe.else()}invalid$data(){const{gen:he,schemaCode:Ae,schemaType:Pe,def:Re,it:ot}=this;return(0,f.or)(function nt(){if(Pe.length){if(!(Ae instanceof f.Name))throw new Error("ajv implementation error");const It=Array.isArray(Pe)?Pe:[Pe];return f._`${(0,M.checkDataTypes)(It,Ae,ot.opts.strictNumbers,M.DataType.Wrong)}`}return f.nil}(),function Ye(){if(Re.validateSchema){const It=he.scopeValue("validate$data",{ref:Re.validateSchema});return f._`!${It}(${Ae})`}return f.nil}())}subschema(he,Ae){const Pe=(0,y.getSubschema)(this.it,he);(0,y.extendSubschemaData)(Pe,this.it,he),(0,y.extendSubschemaMode)(Pe,he);const Re={...this.it,...Pe,items:void 0,props:void 0};return U(Re,Ae),Re}mergeEvaluated(he,Ae){const{it:Pe,gen:Re}=this;Pe.opts.unevaluated&&(!0!==Pe.props&&void 0!==he.props&&(Pe.props=m.mergeEvaluated.props(Re,he.props,Pe.props,Ae)),!0!==Pe.items&&void 0!==he.items&&(Pe.items=m.mergeEvaluated.items(Re,he.items,Pe.items,Ae)))}mergeValidEvaluated(he,Ae){const{it:Pe,gen:Re}=this;if(Pe.opts.unevaluated&&(!0!==Pe.props||!0!==Pe.items))return Re.if(Ae,()=>this.mergeEvaluated(he,f.Name)),!0}}function we(fe,he,Ae,Pe){const Re=new pe(fe,Ae,he);"code"in Ae?Ae.code(Re,Pe):Re.$data&&Ae.validate?(0,g.funcKeywordCode)(Re,Ae):"macro"in Ae?(0,g.macroKeywordCode)(Re,Ae):(Ae.compile||Ae.validate)&&(0,g.funcKeywordCode)(Re,Ae)}n.KeywordCxt=pe;const ce=/^\/(?:[^~]|~0|~1)*$/,le=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ue(fe,{dataLevel:he,dataNames:Ae,dataPathArr:Pe}){let Re,ot;if(""===fe)return d.default.rootData;if("/"===fe[0]){if(!ce.test(fe))throw new Error(`Invalid JSON-pointer: ${fe}`);Re=fe,ot=d.default.rootData}else{const st=le.exec(fe);if(!st)throw new Error(`Invalid JSON-pointer: ${fe}`);const He=+st[1];if(Re=st[2],"#"===Re){if(He>=he)throw new Error(It("property/index",He));return Pe[he-He]}if(He>he)throw new Error(It("data",He));if(ot=Ae[he-He],!Re)return ot}let nt=ot;const Ye=Re.split("/");for(const st of Ye)st&&(ot=f._`${ot}${(0,f.getProperty)((0,m.unescapeJsonPointer)(st))}`,nt=f._`${nt} && ${ot}`);return nt;function It(st,He){return`Cannot access ${st} ${He} levels up, current level is ${he}`}}n.getData=ue},22707:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateKeywordUsage=n.validSchemaType=n.funcKeywordCode=n.macroKeywordCode=void 0;const l=u(56382),v=u(5976),E=u(92812),M=u(75091);function y(_){const{gen:D,data:P,it:x}=_;D.if(x.parentData,()=>D.assign(P,l._`${x.parentData}[${x.parentDataProperty}]`))}function p(_,D,P){if(void 0===P)throw new Error(`keyword "${D}" failed to compile`);return _.scopeValue("keyword","function"==typeof P?{ref:P}:{ref:P,code:(0,l.stringify)(P)})}n.macroKeywordCode=function s(_,D){const{gen:P,keyword:x,schema:C,parentSchema:N,it:k}=_,U=D.macro.call(k.self,C,N,k),z=p(P,x,U);!1!==k.opts.validateSchema&&k.self.validateSchema(U,!0);const Y=P.name("valid");_.subschema({schema:U,schemaPath:l.nil,errSchemaPath:`${k.errSchemaPath}/${x}`,topSchemaRef:z,compositeRule:!0},Y),_.pass(Y,()=>_.error(!0))},n.funcKeywordCode=function g(_,D){var P;const{gen:x,keyword:C,schema:N,parentSchema:k,$data:U,it:z}=_;!function d({schemaEnv:_},D){if(D.async&&!_.$async)throw new Error("async keyword in sync schema")}(z,D);const Y=!U&&D.compile?D.compile.call(z.self,N,k,z):D.validate,G=p(x,C,Y),F=x.let("valid");function o(w=(D.async?l._`await `:l.nil)){const I=z.opts.passContext?v.default.this:v.default.self,R=!("compile"in D&&!U||!1===D.schema);x.assign(F,l._`${w}${(0,E.callValidateCode)(_,G,I,R)}`,D.modifying)}function h(w){var I;x.if((0,l.not)(null!==(I=D.valid)&&void 0!==I?I:F),w)}_.block$data(F,function j(){if(!1===D.errors)o(),D.modifying&&y(_),h(()=>_.error());else{const w=D.async?function Z(){const w=x.let("ruleErrs",null);return x.try(()=>o(l._`await `),I=>x.assign(F,!1).if(l._`${I} instanceof ${z.ValidationError}`,()=>x.assign(w,l._`${I}.errors`),()=>x.throw(I))),w}():function T(){const w=l._`${G}.errors`;return x.assign(w,null),o(l.nil),w}();D.modifying&&y(_),h(()=>function f(_,D){const{gen:P}=_;P.if(l._`Array.isArray(${D})`,()=>{P.assign(v.default.vErrors,l._`${v.default.vErrors} === null ? ${D} : ${v.default.vErrors}.concat(${D})`).assign(v.default.errors,l._`${v.default.vErrors}.length`),(0,M.extendErrors)(_)},()=>_.error())}(_,w))}}),_.ok(null!==(P=D.valid)&&void 0!==P?P:F)},n.validSchemaType=function m(_,D,P=!1){return!D.length||D.some(x=>"array"===x?Array.isArray(_):"object"===x?_&&"object"==typeof _&&!Array.isArray(_):typeof _==x||P&&typeof _>"u")},n.validateKeywordUsage=function S({schema:_,opts:D,self:P,errSchemaPath:x},C,N){if(Array.isArray(C.keyword)?!C.keyword.includes(N):C.keyword!==N)throw new Error("ajv implementation error");const k=C.dependencies;if(k?.some(U=>!Object.prototype.hasOwnProperty.call(_,U)))throw new Error(`parent schema must have dependencies of ${N}: ${k.join(",")}`);if(C.validateSchema&&!C.validateSchema(_[N])){const z=`keyword "${N}" value is invalid at path "${x}": `+P.errorsText(C.validateSchema.errors);if("log"!==D.validateSchema)throw new Error(z);P.logger.error(z)}}},62639:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.extendSubschemaMode=n.extendSubschemaData=n.getSubschema=void 0;const l=u(56382),v=u(97990);n.getSubschema=function E(g,{keyword:y,schemaProp:f,schema:d,schemaPath:p,errSchemaPath:m,topSchemaRef:S}){if(void 0!==y&&void 0!==d)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==y){const _=g.schema[y];return void 0===f?{schema:_,schemaPath:l._`${g.schemaPath}${(0,l.getProperty)(y)}`,errSchemaPath:`${g.errSchemaPath}/${y}`}:{schema:_[f],schemaPath:l._`${g.schemaPath}${(0,l.getProperty)(y)}${(0,l.getProperty)(f)}`,errSchemaPath:`${g.errSchemaPath}/${y}/${(0,v.escapeFragment)(f)}`}}if(void 0!==d){if(void 0===p||void 0===m||void 0===S)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:p,topSchemaRef:S,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')},n.extendSubschemaData=function M(g,y,{dataProp:f,dataPropType:d,data:p,dataTypes:m,propertyName:S}){if(void 0!==p&&void 0!==f)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:_}=y;if(void 0!==f){const{errorPath:P,dataPathArr:x,opts:C}=y;D(_.let("data",l._`${y.data}${(0,l.getProperty)(f)}`,!0)),g.errorPath=l.str`${P}${(0,v.getErrorPath)(f,d,C.jsPropertySyntax)}`,g.parentDataProperty=l._`${f}`,g.dataPathArr=[...x,g.parentDataProperty]}if(void 0!==p){D(p instanceof l.Name?p:_.let("data",p,!0)),void 0!==S&&(g.propertyName=S)}function D(P){g.data=P,g.dataLevel=y.dataLevel+1,g.dataTypes=[],y.definedProperties=new Set,g.parentData=y.data,g.dataNames=[...y.dataNames,P]}m&&(g.dataTypes=m)},n.extendSubschemaMode=function s(g,{jtdDiscriminator:y,jtdMetadata:f,compositeRule:d,createErrors:p,allErrors:m}){void 0!==d&&(g.compositeRule=d),void 0!==p&&(g.createErrors=p),void 0!==m&&(g.allErrors=m),g.jtdDiscriminator=y,g.jtdMetadata=f}},25910:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.CodeGen=n.Name=n.nil=n.stringify=n.str=n._=n.KeywordCxt=void 0;var v=u(66764);Object.defineProperty(n,"KeywordCxt",{enumerable:!0,get:function(){return v.KeywordCxt}});var E=u(56382);Object.defineProperty(n,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(n,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(n,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(n,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(n,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});const M=u(20496),s=u(80140),g=u(62848),y=u(17140),f=u(56382),d=u(31880),p=u(59078),m=u(97990),S=u(64775),_=u(51364),D=(B,re)=>new RegExp(B,re);D.code="new RegExp";const P=["removeAdditional","useDefaults","coerceTypes"],x=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),C={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},N={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},k=200;function U(B){var re,ne,te,ae,ge,pe,we,ce,le,ue,fe,he,Ae,Pe,Re,ot,nt,Ye,It,st,He,ze,Be,Ze,ut;const Me=B.strict,ve=null===(re=B.code)||void 0===re?void 0:re.optimize,xe=!0===ve||void 0===ve?1:ve||0,je=null!==(te=null===(ne=B.code)||void 0===ne?void 0:ne.regExp)&&void 0!==te?te:D,Ge=null!==(ae=B.uriResolver)&&void 0!==ae?ae:_.default;return{strictSchema:null===(pe=null!==(ge=B.strictSchema)&&void 0!==ge?ge:Me)||void 0===pe||pe,strictNumbers:null===(ce=null!==(we=B.strictNumbers)&&void 0!==we?we:Me)||void 0===ce||ce,strictTypes:null!==(ue=null!==(le=B.strictTypes)&&void 0!==le?le:Me)&&void 0!==ue?ue:"log",strictTuples:null!==(he=null!==(fe=B.strictTuples)&&void 0!==fe?fe:Me)&&void 0!==he?he:"log",strictRequired:null!==(Pe=null!==(Ae=B.strictRequired)&&void 0!==Ae?Ae:Me)&&void 0!==Pe&&Pe,code:B.code?{...B.code,optimize:xe,regExp:je}:{optimize:xe,regExp:je},loopRequired:null!==(Re=B.loopRequired)&&void 0!==Re?Re:k,loopEnum:null!==(ot=B.loopEnum)&&void 0!==ot?ot:k,meta:null===(nt=B.meta)||void 0===nt||nt,messages:null===(Ye=B.messages)||void 0===Ye||Ye,inlineRefs:null===(It=B.inlineRefs)||void 0===It||It,schemaId:null!==(st=B.schemaId)&&void 0!==st?st:"$id",addUsedSchema:null===(He=B.addUsedSchema)||void 0===He||He,validateSchema:null===(ze=B.validateSchema)||void 0===ze||ze,validateFormats:null===(Be=B.validateFormats)||void 0===Be||Be,unicodeRegExp:null===(Ze=B.unicodeRegExp)||void 0===Ze||Ze,int32range:null===(ut=B.int32range)||void 0===ut||ut,uriResolver:Ge}}class z{constructor(re={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,re=this.opts={...re,...U(re)};const{es5:ne,lines:te}=this.opts.code;this.scope=new f.ValueScope({scope:{},prefixes:x,es5:ne,lines:te}),this.logger=function h(B){if(!1===B)return o;if(void 0===B)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}(re.logger);const ae=re.validateFormats;re.validateFormats=!1,this.RULES=(0,g.getRules)(),Y.call(this,C,re,"NOT SUPPORTED"),Y.call(this,N,re,"DEPRECATED","warn"),this._metaOpts=T.call(this),re.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),re.keywords&&Z.call(this,re.keywords),"object"==typeof re.meta&&this.addMetaSchema(re.meta),F.call(this),re.validateFormats=ae}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:re,meta:ne,schemaId:te}=this.opts;let ae=S;"id"===te&&(ae={...S},ae.id=ae.$id,delete ae.$id),ne&&re&&this.addMetaSchema(ae,ae[te],!1)}defaultMeta(){const{meta:re,schemaId:ne}=this.opts;return this.opts.defaultMeta="object"==typeof re?re[ne]||re:void 0}validate(re,ne){let te;if("string"==typeof re){if(te=this.getSchema(re),!te)throw new Error(`no schema with key or ref "${re}"`)}else te=this.compile(re);const ae=te(ne);return"$async"in te||(this.errors=te.errors),ae}compile(re,ne){const te=this._addSchema(re,ne);return te.validate||this._compileSchemaEnv(te)}compileAsync(re,ne){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:te}=this.opts;return ae.call(this,re,ne);function ae(Re,ot){return ge.apply(this,arguments)}function ge(){return(ge=l(function*(Re,ot){yield pe.call(this,Re.$schema);const nt=this._addSchema(Re,ot);return nt.validate||ce.call(this,nt)})).apply(this,arguments)}function pe(Re){return we.apply(this,arguments)}function we(){return(we=l(function*(Re){Re&&!this.getSchema(Re)&&(yield ae.call(this,{$ref:Re},!0))})).apply(this,arguments)}function ce(Re){return le.apply(this,arguments)}function le(){return(le=l(function*(Re){try{return this._compileSchemaEnv(Re)}catch(ot){if(!(ot instanceof s.default))throw ot;return ue.call(this,ot),yield fe.call(this,ot.missingSchema),ce.call(this,Re)}})).apply(this,arguments)}function ue({missingSchema:Re,missingRef:ot}){if(this.refs[Re])throw new Error(`AnySchema ${Re} is loaded but ${ot} cannot be resolved`)}function fe(Re){return he.apply(this,arguments)}function he(){return(he=l(function*(Re){const ot=yield Ae.call(this,Re);this.refs[Re]||(yield pe.call(this,ot.$schema)),this.refs[Re]||this.addSchema(ot,Re,ne)})).apply(this,arguments)}function Ae(Re){return Pe.apply(this,arguments)}function Pe(){return(Pe=l(function*(Re){const ot=this._loading[Re];if(ot)return ot;try{return yield this._loading[Re]=te(Re)}finally{delete this._loading[Re]}})).apply(this,arguments)}}addSchema(re,ne,te,ae=this.opts.validateSchema){if(Array.isArray(re)){for(const pe of re)this.addSchema(pe,void 0,te,ae);return this}let ge;if("object"==typeof re){const{schemaId:pe}=this.opts;if(ge=re[pe],void 0!==ge&&"string"!=typeof ge)throw new Error(`schema ${pe} must be string`)}return ne=(0,d.normalizeId)(ne||ge),this._checkUnique(ne),this.schemas[ne]=this._addSchema(re,te,ne,ae,!0),this}addMetaSchema(re,ne,te=this.opts.validateSchema){return this.addSchema(re,ne,!0,te),this}validateSchema(re,ne){if("boolean"==typeof re)return!0;let te;if(te=re.$schema,void 0!==te&&"string"!=typeof te)throw new Error("$schema must be a string");if(te=te||this.opts.defaultMeta||this.defaultMeta(),!te)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const ae=this.validate(te,re);if(!ae&&ne){const ge="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(ge);this.logger.error(ge)}return ae}getSchema(re){let ne;for(;"string"==typeof(ne=G.call(this,re));)re=ne;if(void 0===ne){const{schemaId:te}=this.opts,ae=new y.SchemaEnv({schema:{},schemaId:te});if(ne=y.resolveSchema.call(this,ae,re),!ne)return;this.refs[re]=ne}return ne.validate||this._compileSchemaEnv(ne)}removeSchema(re){if(re instanceof RegExp)return this._removeAllSchemas(this.schemas,re),this._removeAllSchemas(this.refs,re),this;switch(typeof re){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ne=G.call(this,re);return"object"==typeof ne&&this._cache.delete(ne.schema),delete this.schemas[re],delete this.refs[re],this}case"object":{const ne=re;this._cache.delete(ne);let te=re[this.opts.schemaId];return te&&(te=(0,d.normalizeId)(te),delete this.schemas[te],delete this.refs[te]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(re){for(const ne of re)this.addKeyword(ne);return this}addKeyword(re,ne){let te;if("string"==typeof re)te=re,"object"==typeof ne&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ne.keyword=te);else{if("object"!=typeof re||void 0!==ne)throw new Error("invalid addKeywords parameters");if(te=(ne=re).keyword,Array.isArray(te)&&!te.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(I.call(this,te,ne),!ne)return(0,m.eachItem)(te,ge=>R.call(this,ge)),this;H.call(this,ne);const ae={...ne,type:(0,p.getJSONTypes)(ne.type),schemaType:(0,p.getJSONTypes)(ne.schemaType)};return(0,m.eachItem)(te,0===ae.type.length?ge=>R.call(this,ge,ae):ge=>ae.type.forEach(pe=>R.call(this,ge,ae,pe))),this}getKeyword(re){const ne=this.RULES.all[re];return"object"==typeof ne?ne.definition:!!ne}removeKeyword(re){const{RULES:ne}=this;delete ne.keywords[re],delete ne.all[re];for(const te of ne.rules){const ae=te.rules.findIndex(ge=>ge.keyword===re);ae>=0&&te.rules.splice(ae,1)}return this}addFormat(re,ne){return"string"==typeof ne&&(ne=new RegExp(ne)),this.formats[re]=ne,this}errorsText(re=this.errors,{separator:ne=", ",dataVar:te="data"}={}){return re&&0!==re.length?re.map(ae=>`${te}${ae.instancePath} ${ae.message}`).reduce((ae,ge)=>ae+ne+ge):"No errors"}$dataMetaSchema(re,ne){const te=this.RULES.all;re=JSON.parse(JSON.stringify(re));for(const ae of ne){const ge=ae.split("/").slice(1);let pe=re;for(const we of ge)pe=pe[we];for(const we in te){const ce=te[we];if("object"!=typeof ce)continue;const{$data:le}=ce.definition,ue=pe[we];le&&ue&&(pe[we]=b(ue))}}return re}_removeAllSchemas(re,ne){for(const te in re){const ae=re[te];(!ne||ne.test(te))&&("string"==typeof ae?delete re[te]:ae&&!ae.meta&&(this._cache.delete(ae.schema),delete re[te]))}}_addSchema(re,ne,te,ae=this.opts.validateSchema,ge=this.opts.addUsedSchema){let pe;const{schemaId:we}=this.opts;if("object"==typeof re)pe=re[we];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof re)throw new Error("schema must be object or boolean")}let ce=this._cache.get(re);if(void 0!==ce)return ce;te=(0,d.normalizeId)(pe||te);const le=d.getSchemaRefs.call(this,re,te);return ce=new y.SchemaEnv({schema:re,schemaId:we,meta:ne,baseId:te,localRefs:le}),this._cache.set(ce.schema,ce),ge&&!te.startsWith("#")&&(te&&this._checkUnique(te),this.refs[te]=ce),ae&&this.validateSchema(re,!0),ce}_checkUnique(re){if(this.schemas[re]||this.refs[re])throw new Error(`schema with key or id "${re}" already exists`)}_compileSchemaEnv(re){if(re.meta?this._compileMetaSchema(re):y.compileSchema.call(this,re),!re.validate)throw new Error("ajv implementation error");return re.validate}_compileMetaSchema(re){const ne=this.opts;this.opts=this._metaOpts;try{y.compileSchema.call(this,re)}finally{this.opts=ne}}}function Y(B,re,ne,te="error"){for(const ae in B){const ge=ae;ge in re&&this.logger[te](`${ne}: option ${ae}. ${B[ge]}`)}}function G(B){return B=(0,d.normalizeId)(B),this.schemas[B]||this.refs[B]}function F(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const re in B)this.addSchema(B[re],re)}function j(){for(const B in this.opts.formats){const re=this.opts.formats[B];re&&this.addFormat(B,re)}}function Z(B){if(Array.isArray(B))this.addVocabulary(B);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const re in B){const ne=B[re];ne.keyword||(ne.keyword=re),this.addKeyword(ne)}}}function T(){const B={...this.opts};for(const re of P)delete B[re];return B}z.ValidationError=M.default,z.MissingRefError=s.default,n.default=z;const o={log(){},warn(){},error(){}};const w=/^[a-z_$][a-z0-9_$:-]*$/i;function I(B,re){const{RULES:ne}=this;if((0,m.eachItem)(B,te=>{if(ne.keywords[te])throw new Error(`Keyword ${te} is already defined`);if(!w.test(te))throw new Error(`Keyword ${te} has invalid name`)}),re&&re.$data&&!("code"in re)&&!("validate"in re))throw new Error('$data keyword must have "code" or "validate" function')}function R(B,re,ne){var te;const ae=re?.post;if(ne&&ae)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:ge}=this;let pe=ae?ge.post:ge.rules.find(({type:ce})=>ce===ne);if(pe||(pe={type:ne,rules:[]},ge.rules.push(pe)),ge.keywords[B]=!0,!re)return;const we={keyword:B,definition:{...re,type:(0,p.getJSONTypes)(re.type),schemaType:(0,p.getJSONTypes)(re.schemaType)}};re.before?V.call(this,pe,we,re.before):pe.rules.push(we),ge.all[B]=we,null===(te=re.implements)||void 0===te||te.forEach(ce=>this.addKeyword(ce))}function V(B,re,ne){const te=B.rules.findIndex(ae=>ae.keyword===ne);te>=0?B.rules.splice(te,0,re):(B.rules.push(re),this.logger.warn(`rule ${ne} is not defined`))}function H(B){let{metaSchema:re}=B;void 0!==re&&(B.$data&&this.opts.$data&&(re=b(re)),B.validateSchema=this.compile(re,!0))}const L={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function b(B){return{anyOf:[B,L]}}},40834:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(12559);l.code='require("ajv/dist/runtime/equal").default',n.default=l},26344:(q,n)=>{"use strict";function u(l){const v=l.length;let s,E=0,M=0;for(;M=55296&&s<=56319&&M{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(96482);l.code='require("ajv/dist/runtime/uri").default',n.default=l},20496:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});class u extends Error{constructor(v){super("validation failed"),this.errors=v,this.ajv=this.validation=!0}}n.default=u},29282:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAdditionalItems=void 0;const l=u(56382),v=u(97990),M={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:g}})=>l.str`must NOT have more than ${g} items`,params:({params:{len:g}})=>l._`{limit: ${g}}`},code(g){const{parentSchema:y,it:f}=g,{items:d}=y;Array.isArray(d)?s(g,d):(0,v.checkStrictMode)(f,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(g,y){const{gen:f,schema:d,data:p,keyword:m,it:S}=g;S.items=!0;const _=f.const("len",l._`${p}.length`);if(!1===d)g.setParams({len:y.length}),g.pass(l._`${_} <= ${y.length}`);else if("object"==typeof d&&!(0,v.alwaysValidSchema)(S,d)){const P=f.var("valid",l._`${_} <= ${y.length}`);f.if((0,l.not)(P),()=>function D(P){f.forRange("i",y.length,_,x=>{g.subschema({keyword:m,dataProp:x,dataPropType:v.Type.Num},P),S.allErrors||f.if((0,l.not)(P),()=>f.break())})}(P)),g.ok(P)}}n.validateAdditionalItems=s,n.default=M},75459:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(92812),v=u(56382),E=u(5976),M=u(97990),g={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:y})=>v._`{additionalProperty: ${y.additionalProperty}}`},code(y){const{gen:f,schema:d,parentSchema:p,data:m,errsCount:S,it:_}=y;if(!S)throw new Error("ajv implementation error");const{allErrors:D,opts:P}=_;if(_.props=!0,"all"!==P.removeAdditional&&(0,M.alwaysValidSchema)(_,d))return;const x=(0,l.allSchemaProperties)(p.properties),C=(0,l.allSchemaProperties)(p.patternProperties);function U(G){f.code(v._`delete ${m}[${G}]`)}function z(G){if("all"===P.removeAdditional||P.removeAdditional&&!1===d)U(G);else{if(!1===d)return y.setParams({additionalProperty:G}),y.error(),void(D||f.break());if("object"==typeof d&&!(0,M.alwaysValidSchema)(_,d)){const F=f.name("valid");"failing"===P.removeAdditional?(Y(G,F,!1),f.if((0,v.not)(F),()=>{y.reset(),U(G)})):(Y(G,F),D||f.if((0,v.not)(F),()=>f.break()))}}}function Y(G,F,j){const Z={keyword:"additionalProperties",dataProp:G,dataPropType:M.Type.Str};!1===j&&Object.assign(Z,{compositeRule:!0,createErrors:!1,allErrors:!1}),y.subschema(Z,F)}(function N(){f.forIn("key",m,G=>{x.length||C.length?f.if(function k(G){let F;if(x.length>8){const j=(0,M.schemaRefOrVal)(_,p.properties,"properties");F=(0,l.isOwnProperty)(f,j,G)}else F=x.length?(0,v.or)(...x.map(j=>v._`${G} === ${j}`)):v.nil;return C.length&&(F=(0,v.or)(F,...C.map(j=>v._`${(0,l.usePattern)(y,j)}.test(${G})`))),(0,v.not)(F)}(G),()=>z(G)):z(G)})})(),y.ok(v._`${S} === ${E.default.errors}`)}};n.default=g},46186:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(97990),v={keyword:"allOf",schemaType:"array",code(E){const{gen:M,schema:s,it:g}=E;if(!Array.isArray(s))throw new Error("ajv implementation error");const y=M.name("valid");s.forEach((f,d)=>{if((0,l.alwaysValidSchema)(g,f))return;const p=E.subschema({keyword:"allOf",schemaProp:d},y);E.ok(y),E.mergeEvaluated(p)})}};n.default=v},60290:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const v={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:u(92812).validateUnion,error:{message:"must match a schema in anyOf"}};n.default=v},25738:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),M={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:g}})=>void 0===g?l.str`must contain at least ${s} valid item(s)`:l.str`must contain at least ${s} and no more than ${g} valid item(s)`,params:({params:{min:s,max:g}})=>void 0===g?l._`{minContains: ${s}}`:l._`{minContains: ${s}, maxContains: ${g}}`},code(s){const{gen:g,schema:y,parentSchema:f,data:d,it:p}=s;let m,S;const{minContains:_,maxContains:D}=f;p.opts.next?(m=void 0===_?1:_,S=D):m=1;const P=g.const("len",l._`${d}.length`);if(s.setParams({min:m,max:S}),void 0===S&&0===m)return void(0,v.checkStrictMode)(p,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==S&&m>S)return(0,v.checkStrictMode)(p,'"minContains" > "maxContains" is always invalid'),void s.fail();if((0,v.alwaysValidSchema)(p,y)){let U=l._`${P} >= ${m}`;return void 0!==S&&(U=l._`${U} && ${P} <= ${S}`),void s.pass(U)}p.items=!0;const x=g.name("valid");function C(){const U=g.name("_valid"),z=g.let("count",0);N(U,()=>g.if(U,()=>function k(U){g.code(l._`${U}++`),void 0===S?g.if(l._`${U} >= ${m}`,()=>g.assign(x,!0).break()):(g.if(l._`${U} > ${S}`,()=>g.assign(x,!1).break()),1===m?g.assign(x,!0):g.if(l._`${U} >= ${m}`,()=>g.assign(x,!0)))}(z)))}function N(U,z){g.forRange("i",0,P,Y=>{s.subschema({keyword:"contains",dataProp:Y,dataPropType:v.Type.Num,compositeRule:!0},U),z()})}void 0===S&&1===m?N(x,()=>g.if(x,()=>g.break())):0===m?(g.let(x,!0),void 0!==S&&g.if(l._`${d}.length > 0`,C)):(g.let(x,!1),C()),s.result(x,()=>s.reset())}};n.default=M},1886:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSchemaDeps=n.validatePropertyDeps=n.error=void 0;const l=u(56382),v=u(97990),E=u(92812);n.error={message:({params:{property:f,depsCount:d,deps:p}})=>{const m=1===d?"property":"properties";return l.str`must have ${m} ${p} when property ${f} is present`},params:({params:{property:f,depsCount:d,deps:p,missingProperty:m}})=>l._`{property: ${f}, + missingProperty: ${m}, + depsCount: ${d}, + deps: ${p}}`};const M={keyword:"dependencies",type:"object",schemaType:"object",error:n.error,code(f){const[d,p]=function s({schema:f}){const d={},p={};for(const m in f){if("__proto__"===m)continue;(Array.isArray(f[m])?d:p)[m]=f[m]}return[d,p]}(f);g(f,d),y(f,p)}};function g(f,d=f.schema){const{gen:p,data:m,it:S}=f;if(0===Object.keys(d).length)return;const _=p.let("missing");for(const D in d){const P=d[D];if(0===P.length)continue;const x=(0,E.propertyInData)(p,m,D,S.opts.ownProperties);f.setParams({property:D,depsCount:P.length,deps:P.join(", ")}),S.allErrors?p.if(x,()=>{for(const C of P)(0,E.checkReportMissingProp)(f,C)}):(p.if(l._`${x} && (${(0,E.checkMissingProp)(f,P,_)})`),(0,E.reportMissingProp)(f,_),p.else())}}function y(f,d=f.schema){const{gen:p,data:m,keyword:S,it:_}=f,D=p.name("valid");for(const P in d)(0,v.alwaysValidSchema)(_,d[P])||(p.if((0,E.propertyInData)(p,m,P,_.opts.ownProperties),()=>{const x=f.subschema({keyword:S,schemaProp:P},D);f.mergeValidEvaluated(x,D)},()=>p.var(D,!0)),f.ok(D))}n.validatePropertyDeps=g,n.validateSchemaDeps=y,n.default=M},43632:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),M={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:g})=>l.str`must match "${g.ifClause}" schema`,params:({params:g})=>l._`{failingKeyword: ${g.ifClause}}`},code(g){const{gen:y,parentSchema:f,it:d}=g;void 0===f.then&&void 0===f.else&&(0,v.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const p=s(d,"then"),m=s(d,"else");if(!p&&!m)return;const S=y.let("valid",!0),_=y.name("_valid");if(function D(){const x=g.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},_);g.mergeEvaluated(x)}(),g.reset(),p&&m){const x=y.let("ifClause");g.setParams({ifClause:x}),y.if(_,P("then",x),P("else",x))}else p?y.if(_,P("then")):y.if((0,l.not)(_),P("else"));function P(x,C){return()=>{const N=g.subschema({keyword:x},_);y.assign(S,_),g.mergeValidEvaluated(N,S),C?y.assign(C,l._`${x}`):g.setParams({ifClause:x})}}g.pass(S,()=>g.error(!0))}};function s(g,y){const f=g.schema[y];return void 0!==f&&!(0,v.alwaysValidSchema)(g,f)}n.default=M},17737:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(29282),v=u(84947),E=u(69180),M=u(41785),s=u(25738),g=u(1886),y=u(37947),f=u(75459),d=u(68415),p=u(50896),m=u(36330),S=u(60290),_=u(92337),D=u(46186),P=u(43632),x=u(71344);n.default=function C(N=!1){const k=[m.default,S.default,_.default,D.default,P.default,x.default,y.default,f.default,g.default,d.default,p.default];return N?k.push(v.default,M.default):k.push(l.default,E.default),k.push(s.default),k}},69180:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateTuple=void 0;const l=u(56382),v=u(97990),E=u(92812),M={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(g){const{schema:y,it:f}=g;if(Array.isArray(y))return s(g,"additionalItems",y);f.items=!0,!(0,v.alwaysValidSchema)(f,y)&&g.ok((0,E.validateArray)(g))}};function s(g,y,f=g.schema){const{gen:d,parentSchema:p,data:m,keyword:S,it:_}=g;(function x(C){const{opts:N,errSchemaPath:k}=_,U=f.length,z=U===C.minItems&&(U===C.maxItems||!1===C[y]);if(N.strictTuples&&!z){const Y=`"${S}" is ${U}-tuple, but minItems or maxItems/${y} are not specified or different at path "${k}"`;(0,v.checkStrictMode)(_,Y,N.strictTuples)}})(p),_.opts.unevaluated&&f.length&&!0!==_.items&&(_.items=v.mergeEvaluated.items(d,f.length,_.items));const D=d.name("valid"),P=d.const("len",l._`${m}.length`);f.forEach((C,N)=>{(0,v.alwaysValidSchema)(_,C)||(d.if(l._`${P} > ${N}`,()=>g.subschema({keyword:S,schemaProp:N,dataProp:N},D)),g.ok(D))})}n.validateTuple=s,n.default=M},41785:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),E=u(92812),M=u(29282),g={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:y}})=>l.str`must NOT have more than ${y} items`,params:({params:{len:y}})=>l._`{limit: ${y}}`},code(y){const{schema:f,parentSchema:d,it:p}=y,{prefixItems:m}=d;p.items=!0,!(0,v.alwaysValidSchema)(p,f)&&(m?(0,M.validateAdditionalItems)(y,m):y.ok((0,E.validateArray)(y)))}};n.default=g},36330:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(97990),v={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(E){const{gen:M,schema:s,it:g}=E;if((0,l.alwaysValidSchema)(g,s))return void E.fail();const y=M.name("valid");E.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},y),E.failResult(y,()=>E.reset(),()=>E.error())},error:{message:"must NOT be valid"}};n.default=v},92337:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),M={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>l._`{passingSchemas: ${s.passing}}`},code(s){const{gen:g,schema:y,parentSchema:f,it:d}=s;if(!Array.isArray(y))throw new Error("ajv implementation error");if(d.opts.discriminator&&f.discriminator)return;const p=y,m=g.let("valid",!1),S=g.let("passing",null),_=g.name("_valid");s.setParams({passing:S}),g.block(function D(){p.forEach((P,x)=>{let C;(0,v.alwaysValidSchema)(d,P)?g.var(_,!0):C=s.subschema({keyword:"oneOf",schemaProp:x,compositeRule:!0},_),x>0&&g.if(l._`${_} && ${m}`).assign(m,!1).assign(S,l._`[${S}, ${x}]`).else(),g.if(_,()=>{g.assign(m,!0),g.assign(S,x),C&&s.mergeEvaluated(C,l.Name)})})}),s.result(m,()=>s.reset(),()=>s.error(!0))}};n.default=M},50896:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(92812),v=u(56382),E=u(97990),M=u(97990),s={keyword:"patternProperties",type:"object",schemaType:"object",code(g){const{gen:y,schema:f,data:d,parentSchema:p,it:m}=g,{opts:S}=m,_=(0,l.allSchemaProperties)(f),D=_.filter(z=>(0,E.alwaysValidSchema)(m,f[z]));if(0===_.length||D.length===_.length&&(!m.opts.unevaluated||!0===m.props))return;const P=S.strictSchema&&!S.allowMatchingProperties&&p.properties,x=y.name("valid");!0!==m.props&&!(m.props instanceof v.Name)&&(m.props=(0,M.evaluatedPropsToName)(y,m.props));const{props:C}=m;function k(z){for(const Y in P)new RegExp(z).test(Y)&&(0,E.checkStrictMode)(m,`property ${Y} matches pattern ${z} (use allowMatchingProperties)`)}function U(z){y.forIn("key",d,Y=>{y.if(v._`${(0,l.usePattern)(g,z)}.test(${Y})`,()=>{const G=D.includes(z);G||g.subschema({keyword:"patternProperties",schemaProp:z,dataProp:Y,dataPropType:M.Type.Str},x),m.opts.unevaluated&&!0!==C?y.assign(v._`${C}[${Y}]`,!0):!G&&!m.allErrors&&y.if((0,v.not)(x),()=>y.break())})})}!function N(){for(const z of _)P&&k(z),m.allErrors?U(z):(y.var(x,!0),U(z),y.if(x))}()}};n.default=s},84947:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(69180),v={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:E=>(0,l.validateTuple)(E,"items")};n.default=v},68415:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(66764),v=u(92812),E=u(97990),M=u(75459),s={keyword:"properties",type:"object",schemaType:"object",code(g){const{gen:y,schema:f,parentSchema:d,data:p,it:m}=g;"all"===m.opts.removeAdditional&&void 0===d.additionalProperties&&M.default.code(new l.KeywordCxt(m,M.default,"additionalProperties"));const S=(0,v.allSchemaProperties)(f);for(const C of S)m.definedProperties.add(C);m.opts.unevaluated&&S.length&&!0!==m.props&&(m.props=E.mergeEvaluated.props(y,(0,E.toHash)(S),m.props));const _=S.filter(C=>!(0,E.alwaysValidSchema)(m,f[C]));if(0===_.length)return;const D=y.name("valid");for(const C of _)P(C)?x(C):(y.if((0,v.propertyInData)(y,p,C,m.opts.ownProperties)),x(C),m.allErrors||y.else().var(D,!0),y.endIf()),g.it.definedProperties.add(C),g.ok(D);function P(C){return m.opts.useDefaults&&!m.compositeRule&&void 0!==f[C].default}function x(C){g.subschema({keyword:"properties",schemaProp:C,dataProp:C},D)}}};n.default=s},37947:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),M={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>l._`{propertyName: ${s.propertyName}}`},code(s){const{gen:g,schema:y,data:f,it:d}=s;if((0,v.alwaysValidSchema)(d,y))return;const p=g.name("valid");g.forIn("key",f,m=>{s.setParams({propertyName:m}),s.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},p),g.if((0,l.not)(p),()=>{s.error(!0),d.allErrors||g.break()})}),s.ok(p)}};n.default=M},71344:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(97990),v={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:E,parentSchema:M,it:s}){void 0===M.if&&(0,l.checkStrictMode)(s,`"${E}" without "if" is ignored`)}};n.default=v},92812:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateUnion=n.validateArray=n.usePattern=n.callValidateCode=n.schemaProperties=n.allSchemaProperties=n.noPropertyInData=n.propertyInData=n.isOwnProperty=n.hasPropFunc=n.reportMissingProp=n.checkMissingProp=n.checkReportMissingProp=void 0;const l=u(56382),v=u(97990),E=u(5976),M=u(97990);function f(k){return k.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:l._`Object.prototype.hasOwnProperty`})}function d(k,U,z){return l._`${f(k)}.call(${U}, ${z})`}function m(k,U,z,Y){const G=l._`${U}${(0,l.getProperty)(z)} === undefined`;return Y?(0,l.or)(G,(0,l.not)(d(k,U,z))):G}function S(k){return k?Object.keys(k).filter(U=>"__proto__"!==U):[]}n.checkReportMissingProp=function s(k,U){const{gen:z,data:Y,it:G}=k;z.if(m(z,Y,U,G.opts.ownProperties),()=>{k.setParams({missingProperty:l._`${U}`},!0),k.error()})},n.checkMissingProp=function g({gen:k,data:U,it:{opts:z}},Y,G){return(0,l.or)(...Y.map(F=>(0,l.and)(m(k,U,F,z.ownProperties),l._`${G} = ${F}`)))},n.reportMissingProp=function y(k,U){k.setParams({missingProperty:U},!0),k.error()},n.hasPropFunc=f,n.isOwnProperty=d,n.propertyInData=function p(k,U,z,Y){const G=l._`${U}${(0,l.getProperty)(z)} !== undefined`;return Y?l._`${G} && ${d(k,U,z)}`:G},n.noPropertyInData=m,n.allSchemaProperties=S,n.schemaProperties=function _(k,U){return S(U).filter(z=>!(0,v.alwaysValidSchema)(k,U[z]))},n.callValidateCode=function D({schemaCode:k,data:U,it:{gen:z,topSchemaRef:Y,schemaPath:G,errorPath:F},it:j},Z,T,o){const h=o?l._`${k}, ${U}, ${Y}${G}`:U,w=[[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,F)],[E.default.parentData,j.parentData],[E.default.parentDataProperty,j.parentDataProperty],[E.default.rootData,E.default.rootData]];j.opts.dynamicRef&&w.push([E.default.dynamicAnchors,E.default.dynamicAnchors]);const I=l._`${h}, ${z.object(...w)}`;return T!==l.nil?l._`${Z}.call(${T}, ${I})`:l._`${Z}(${I})`};const P=l._`new RegExp`;n.usePattern=function x({gen:k,it:{opts:U}},z){const Y=U.unicodeRegExp?"u":"",{regExp:G}=U.code,F=G(z,Y);return k.scopeValue("pattern",{key:F.toString(),ref:F,code:l._`${"new RegExp"===G.code?P:(0,M.useFunc)(k,G)}(${z}, ${Y})`})},n.validateArray=function C(k){const{gen:U,data:z,keyword:Y,it:G}=k,F=U.name("valid");if(G.allErrors){const Z=U.let("valid",!0);return j(()=>U.assign(Z,!1)),Z}return U.var(F,!0),j(()=>U.break()),F;function j(Z){const T=U.const("len",l._`${z}.length`);U.forRange("i",0,T,o=>{k.subschema({keyword:Y,dataProp:o,dataPropType:v.Type.Num},F),U.if((0,l.not)(F),Z)})}},n.validateUnion=function N(k){const{gen:U,schema:z,keyword:Y,it:G}=k;if(!Array.isArray(z))throw new Error("ajv implementation error");if(z.some(T=>(0,v.alwaysValidSchema)(G,T))&&!G.opts.unevaluated)return;const j=U.let("valid",!1),Z=U.name("_valid");U.block(()=>z.forEach((T,o)=>{const h=k.subschema({keyword:Y,schemaProp:o,compositeRule:!0},Z);U.assign(j,l._`${j} || ${Z}`),k.mergeValidEvaluated(h,Z)||U.if((0,l.not)(j))})),k.result(j,()=>k.reset(),()=>k.error(!0))}},11167:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const u={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};n.default=u},31093:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(11167),v=u(64703),E=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",l.default,v.default];n.default=E},64703:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.callRef=n.getValidate=void 0;const l=u(80140),v=u(92812),E=u(56382),M=u(5976),s=u(17140),g=u(97990),y={keyword:"$ref",schemaType:"string",code(p){const{gen:m,schema:S,it:_}=p,{baseId:D,schemaEnv:P,validateName:x,opts:C,self:N}=_,{root:k}=P;if(("#"===S||"#/"===S)&&D===k.baseId)return function z(){if(P===k)return d(p,x,P,P.$async);const F=m.scopeValue("root",{ref:k});return d(p,E._`${F}.validate`,k,k.$async)}();const U=s.resolveRef.call(N,k,D,S);if(void 0===U)throw new l.default(_.opts.uriResolver,D,S);return U instanceof s.SchemaEnv?function Y(F){const j=f(p,F);d(p,j,F,F.$async)}(U):function G(F){const j=m.scopeValue("schema",!0===C.code.source?{ref:F,code:(0,E.stringify)(F)}:{ref:F}),Z=m.name("valid"),T=p.subschema({schema:F,dataTypes:[],schemaPath:E.nil,topSchemaRef:j,errSchemaPath:S},Z);p.mergeEvaluated(T),p.ok(Z)}(U)}};function f(p,m){const{gen:S}=p;return m.validate?S.scopeValue("validate",{ref:m.validate}):E._`${S.scopeValue("wrapper",{ref:m})}.validate`}function d(p,m,S,_){const{gen:D,it:P}=p,{allErrors:x,schemaEnv:C,opts:N}=P,k=N.passContext?M.default.this:E.nil;function Y(F){const j=E._`${F}.errors`;D.assign(M.default.vErrors,E._`${M.default.vErrors} === null ? ${j} : ${M.default.vErrors}.concat(${j})`),D.assign(M.default.errors,E._`${M.default.vErrors}.length`)}function G(F){var j;if(!P.opts.unevaluated)return;const Z=null===(j=S?.validate)||void 0===j?void 0:j.evaluated;if(!0!==P.props)if(Z&&!Z.dynamicProps)void 0!==Z.props&&(P.props=g.mergeEvaluated.props(D,Z.props,P.props));else{const T=D.var("props",E._`${F}.evaluated.props`);P.props=g.mergeEvaluated.props(D,T,P.props,E.Name)}if(!0!==P.items)if(Z&&!Z.dynamicItems)void 0!==Z.items&&(P.items=g.mergeEvaluated.items(D,Z.items,P.items));else{const T=D.var("items",E._`${F}.evaluated.items`);P.items=g.mergeEvaluated.items(D,T,P.items,E.Name)}}_?function U(){if(!C.$async)throw new Error("async schema referenced by sync schema");const F=D.let("valid");D.try(()=>{D.code(E._`await ${(0,v.callValidateCode)(p,m,k)}`),G(m),x||D.assign(F,!0)},j=>{D.if(E._`!(${j} instanceof ${P.ValidationError})`,()=>D.throw(j)),Y(j),x||D.assign(F,!1)}),p.ok(F)}():function z(){p.result((0,v.callValidateCode)(p,m,k),()=>G(m),()=>Y(m))}()}n.getValidate=f,n.callRef=d,n.default=y},81849:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(60797),E=u(17140),M=u(80140),s=u(97990),y={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:f,tagName:d}})=>f===v.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:f,tag:d,tagName:p}})=>l._`{error: ${f}, tag: ${p}, tagValue: ${d}}`},code(f){const{gen:d,data:p,schema:m,parentSchema:S,it:_}=f,{oneOf:D}=S;if(!_.opts.discriminator)throw new Error("discriminator: requires discriminator option");const P=m.propertyName;if("string"!=typeof P)throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!D)throw new Error("discriminator: requires oneOf keyword");const x=d.let("valid",!1),C=d.const("tag",l._`${p}${(0,l.getProperty)(P)}`);function k(z){const Y=d.name("valid"),G=f.subschema({keyword:"oneOf",schemaProp:z},Y);return f.mergeEvaluated(G,l.Name),Y}d.if(l._`typeof ${C} == "string"`,()=>function N(){const z=function U(){var z;const Y={},G=j(S);let F=!0;for(let o=0;of.error(!1,{discrError:v.DiscrError.Tag,tag:C,tagName:P})),f.ok(x)}};n.default=y},60797:(q,n)=>{"use strict";var u,l;Object.defineProperty(n,"__esModule",{value:!0}),n.DiscrError=void 0,(l=u||(n.DiscrError=u={})).Tag="tag",l.Mapping="mapping"},77032:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(31093),v=u(77887),E=u(17737),M=u(57447),s=u(10760),g=[l.default,v.default,(0,E.default)(),M.default,s.metadataVocabulary,s.contentVocabulary];n.default=g},22364:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:M})=>l.str`must match format "${M}"`,params:({schemaCode:M})=>l._`{format: ${M}}`},code(M,s){const{gen:g,data:y,$data:f,schema:d,schemaCode:p,it:m}=M,{opts:S,errSchemaPath:_,schemaEnv:D,self:P}=m;S.validateFormats&&(f?function x(){const N=g.scopeValue("formats",{ref:P.formats,code:S.code.formats}),k=g.const("fDef",l._`${N}[${p}]`),U=g.let("fType"),z=g.let("format");g.if(l._`typeof ${k} == "object" && !(${k} instanceof RegExp)`,()=>g.assign(U,l._`${k}.type || "string"`).assign(z,l._`${k}.validate`),()=>g.assign(U,l._`"string"`).assign(z,k)),M.fail$data((0,l.or)(function Y(){return!1===S.strictSchema?l.nil:l._`${p} && !${z}`}(),function G(){const F=D.$async?l._`(${k}.async ? await ${z}(${y}) : ${z}(${y}))`:l._`${z}(${y})`,j=l._`(typeof ${z} == "function" ? ${F} : ${z}.test(${y}))`;return l._`${z} && ${z} !== true && ${U} === ${s} && !${j}`}()))}():function C(){const N=P.formats[d];if(!N)return void function Y(){if(!1===S.strictSchema)return void P.logger.warn(j());throw new Error(j());function j(){return`unknown format "${d}" ignored in schema at path "${_}"`}}();if(!0===N)return;const[k,U,z]=function G(j){const Z=j instanceof RegExp?(0,l.regexpCode)(j):S.code.formats?l._`${S.code.formats}${(0,l.getProperty)(d)}`:void 0,T=g.scopeValue("formats",{key:d,ref:j,code:Z});return"object"!=typeof j||j instanceof RegExp?["string",j,T]:[j.type||"string",j.validate,l._`${T}.validate`]}(N);k===s&&M.pass(function F(){if("object"==typeof N&&!(N instanceof RegExp)&&N.async){if(!D.$async)throw new Error("async format in sync schema");return l._`await ${z}(${y})`}return"function"==typeof U?l._`${z}(${y})`:l._`${z}.test(${y})`}())}())}};n.default=E},57447:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const v=[u(22364).default];n.default=v},10760:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.contentVocabulary=n.metadataVocabulary=void 0,n.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],n.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},37677:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),E=u(40834),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:g})=>l._`{allowedValue: ${g}}`},code(g){const{gen:y,data:f,$data:d,schemaCode:p,schema:m}=g;d||m&&"object"==typeof m?g.fail$data(l._`!${(0,v.useFunc)(y,E.default)}(${f}, ${p})`):g.fail(l._`${m} !== ${f}`)}};n.default=s},38373:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),E=u(40834),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:g})=>l._`{allowedValues: ${g}}`},code(g){const{gen:y,data:f,$data:d,schema:p,schemaCode:m,it:S}=g;if(!d&&0===p.length)throw new Error("enum must have non-empty array");const _=p.length>=S.opts.loopEnum;let D;const P=()=>D??(D=(0,v.useFunc)(y,E.default));let x;if(_||d)x=y.let("valid"),g.block$data(x,function C(){y.assign(x,!1),y.forOf("v",m,k=>y.if(l._`${P()}(${f}, ${k})`,()=>y.assign(x,!0).break()))});else{if(!Array.isArray(p))throw new Error("ajv implementation error");const k=y.const("vSchema",m);x=(0,l.or)(...p.map((U,z)=>function N(k,U){const z=p[U];return"object"==typeof z&&null!==z?l._`${P()}(${f}, ${k}[${U}])`:l._`${f} === ${z}`}(k,z)))}g.pass(x)}};n.default=s},77887:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(37126),v=u(52018),E=u(56230),M=u(58455),s=u(25608),g=u(70109),y=u(45132),f=u(74097),d=u(37677),p=u(38373),m=[l.default,v.default,E.default,M.default,s.default,g.default,y.default,f.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,p.default];n.default=m},45132:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),E={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:s}){const g="maxItems"===M?"more":"fewer";return l.str`must NOT have ${g} than ${s} items`},params:({schemaCode:M})=>l._`{limit: ${M}}`},code(M){const{keyword:s,data:g,schemaCode:y}=M,f="maxItems"===s?l.operators.GT:l.operators.LT;M.fail$data(l._`${g}.length ${f} ${y}`)}};n.default=E},56230:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=u(97990),E=u(26344),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:g,schemaCode:y}){const f="maxLength"===g?"more":"fewer";return l.str`must NOT have ${f} than ${y} characters`},params:({schemaCode:g})=>l._`{limit: ${g}}`},code(g){const{keyword:y,data:f,schemaCode:d,it:p}=g,m="maxLength"===y?l.operators.GT:l.operators.LT,S=!1===p.opts.unicode?l._`${f}.length`:l._`${(0,v.useFunc)(g.gen,E.default)}(${f})`;g.fail$data(l._`${S} ${m} ${d}`)}};n.default=s},37126:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),v=l.operators,E={maximum:{okStr:"<=",ok:v.LTE,fail:v.GT},minimum:{okStr:">=",ok:v.GTE,fail:v.LT},exclusiveMaximum:{okStr:"<",ok:v.LT,fail:v.GTE},exclusiveMinimum:{okStr:">",ok:v.GT,fail:v.LTE}},M={message:({keyword:g,schemaCode:y})=>l.str`must be ${E[g].okStr} ${y}`,params:({keyword:g,schemaCode:y})=>l._`{comparison: ${E[g].okStr}, limit: ${y}}`},s={keyword:Object.keys(E),type:"number",schemaType:"number",$data:!0,error:M,code(g){const{keyword:y,data:f,schemaCode:d}=g;g.fail$data(l._`${f} ${E[y].fail} ${d} || isNaN(${f})`)}};n.default=s},25608:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),E={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:M,schemaCode:s}){const g="maxProperties"===M?"more":"fewer";return l.str`must NOT have ${g} than ${s} properties`},params:({schemaCode:M})=>l._`{limit: ${M}}`},code(M){const{keyword:s,data:g,schemaCode:y}=M,f="maxProperties"===s?l.operators.GT:l.operators.LT;M.fail$data(l._`Object.keys(${g}).length ${f} ${y}`)}};n.default=E},52018:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(56382),E={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:M})=>l.str`must be multiple of ${M}`,params:({schemaCode:M})=>l._`{multipleOf: ${M}}`},code(M){const{gen:s,data:g,schemaCode:y,it:f}=M,d=f.opts.multipleOfPrecision,p=s.let("res"),m=d?l._`Math.abs(Math.round(${p}) - ${p}) > 1e-${d}`:l._`${p} !== parseInt(${p})`;M.fail$data(l._`(${y} === 0 || (${p} = ${g}/${y}, ${m}))`)}};n.default=E},58455:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(92812),v=u(56382),M={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:s})=>v.str`must match pattern "${s}"`,params:({schemaCode:s})=>v._`{pattern: ${s}}`},code(s){const{data:g,$data:y,schema:f,schemaCode:d,it:p}=s,m=p.opts.unicodeRegExp?"u":"",S=y?v._`(new RegExp(${d}, ${m}))`:(0,l.usePattern)(s,f);s.fail$data(v._`!${S}.test(${g})`)}};n.default=M},70109:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(92812),v=u(56382),E=u(97990),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:g}})=>v.str`must have required property '${g}'`,params:({params:{missingProperty:g}})=>v._`{missingProperty: ${g}}`},code(g){const{gen:y,schema:f,schemaCode:d,data:p,$data:m,it:S}=g,{opts:_}=S;if(!m&&0===f.length)return;const D=f.length>=_.loopRequired;if(S.allErrors?function P(){if(D||m)g.block$data(v.nil,C);else for(const k of f)(0,l.checkReportMissingProp)(g,k)}():function x(){const k=y.let("missing");if(D||m){const U=y.let("valid",!0);g.block$data(U,()=>function N(k,U){g.setParams({missingProperty:k}),y.forOf(k,d,()=>{y.assign(U,(0,l.propertyInData)(y,p,k,_.ownProperties)),y.if((0,v.not)(U),()=>{g.error(),y.break()})},v.nil)}(k,U)),g.ok(U)}else y.if((0,l.checkMissingProp)(g,f,k)),(0,l.reportMissingProp)(g,k),y.else()}(),_.strictRequired){const k=g.parentSchema.properties,{definedProperties:U}=g.it;for(const z of f)if(void 0===k?.[z]&&!U.has(z)){const G=`required property "${z}" is not defined at "${S.schemaEnv.baseId+S.errSchemaPath}" (strictRequired)`;(0,E.checkStrictMode)(S,G,S.opts.strictRequired)}}function C(){y.forOf("prop",d,k=>{g.setParams({missingProperty:k}),y.if((0,l.noPropertyInData)(y,p,k,_.ownProperties),()=>g.error())})}}};n.default=s},74097:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const l=u(59078),v=u(56382),E=u(97990),M=u(40834),g={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:y,j:f}})=>v.str`must NOT have duplicate items (items ## ${f} and ${y} are identical)`,params:({params:{i:y,j:f}})=>v._`{i: ${y}, j: ${f}}`},code(y){const{gen:f,data:d,$data:p,schema:m,parentSchema:S,schemaCode:_,it:D}=y;if(!p&&!m)return;const P=f.let("valid"),x=S.items?(0,l.getSchemaTypes)(S.items):[];function k(z,Y){const G=f.name("item"),F=(0,l.checkDataTypes)(x,G,D.opts.strictNumbers,l.DataType.Wrong),j=f.const("indices",v._`{}`);f.for(v._`;${z}--;`,()=>{f.let(G,v._`${d}[${z}]`),f.if(F,v._`continue`),x.length>1&&f.if(v._`typeof ${G} == "string"`,v._`${G} += "_"`),f.if(v._`typeof ${j}[${G}] == "number"`,()=>{f.assign(Y,v._`${j}[${G}]`),y.error(),f.assign(P,!1).break()}).code(v._`${j}[${G}] = ${z}`)})}function U(z,Y){const G=(0,E.useFunc)(f,M.default),F=f.name("outer");f.label(F).for(v._`;${z}--;`,()=>f.for(v._`${Y} = ${z}; ${Y}--;`,()=>f.if(v._`${G}(${d}[${z}], ${d}[${Y}])`,()=>{y.error(),f.assign(P,!1).break(F)})))}y.block$data(P,function C(){const z=f.let("i",v._`${d}.length`),Y=f.let("j");y.setParams({i:z,j:Y}),f.assign(P,!0),f.if(v._`${z} > 1`,()=>(function N(){return x.length>0&&!x.some(z=>"object"===z||"array"===z)}()?k:U)(z,Y))},v._`${_} === false`),y.ok(P)}};n.default=g},87977:(q,n,u)=>{var l=n;l.bignum=u(13854),l.define=u(39516).define,l.base=u(87813),l.constants=u(5459),l.decoders=u(70196),l.encoders=u(21131)},39516:(q,n,u)=>{var l=u(87977),v=u(83894);function M(s,g){this.name=s,this.body=g,this.decoders={},this.encoders={}}n.define=function(g,y){return new M(g,y)},M.prototype._createNamed=function(g){var y;try{y=Object(function(){var d=new Error("Cannot find module 'vm'");throw d.code="MODULE_NOT_FOUND",d}())("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch{y=function(d){this._initNamed(d)}}return v(y,g),y.prototype._initNamed=function(d){g.call(this,d)},new y(this)},M.prototype._getDecoder=function(g){return g=g||"der",this.decoders.hasOwnProperty(g)||(this.decoders[g]=this._createNamed(l.decoders[g])),this.decoders[g]},M.prototype.decode=function(g,y,f){return this._getDecoder(y).decode(g,f)},M.prototype._getEncoder=function(g){return g=g||"der",this.encoders.hasOwnProperty(g)||(this.encoders[g]=this._createNamed(l.encoders[g])),this.encoders[g]},M.prototype.encode=function(g,y,f){return this._getEncoder(y).encode(g,f)}},12769:(q,n,u)=>{var l=u(83894),v=u(87813).Reporter,E=u(93172).Buffer;function M(g,y){v.call(this,y),E.isBuffer(g)?(this.base=g,this.offset=0,this.length=g.length):this.error("Input not Buffer")}function s(g,y){if(Array.isArray(g))this.length=0,this.value=g.map(function(f){return f instanceof s||(f=new s(f,y)),this.length+=f.length,f},this);else if("number"==typeof g){if(!(0<=g&&g<=255))return y.error("non-byte EncoderBuffer value");this.value=g,this.length=1}else if("string"==typeof g)this.value=g,this.length=E.byteLength(g);else{if(!E.isBuffer(g))return y.error("Unsupported type: "+typeof g);this.value=g,this.length=g.length}}l(M,v),n.C=M,M.prototype.save=function(){return{offset:this.offset,reporter:v.prototype.save.call(this)}},M.prototype.restore=function(y){var f=new M(this.base);return f.offset=y.offset,f.length=this.offset,this.offset=y.offset,v.prototype.restore.call(this,y.reporter),f},M.prototype.isEmpty=function(){return this.offset===this.length},M.prototype.readUInt8=function(y){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(y||"DecoderBuffer overrun")},M.prototype.skip=function(y,f){if(!(this.offset+y<=this.length))return this.error(f||"DecoderBuffer overrun");var d=new M(this.base);return d._reporterState=this._reporterState,d.offset=this.offset,d.length=this.offset+y,this.offset+=y,d},M.prototype.raw=function(y){return this.base.slice(y?y.offset:this.offset,this.length)},n.R=s,s.prototype.join=function(y,f){return y||(y=new E(this.length)),f||(f=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(d){d.join(y,f),f+=d.length}):("number"==typeof this.value?y[f]=this.value:"string"==typeof this.value?y.write(this.value,f):E.isBuffer(this.value)&&this.value.copy(y,f),f+=this.length)),y}},87813:(q,n,u)=>{var l=n;l.Reporter=u(4919).b,l.DecoderBuffer=u(12769).C,l.EncoderBuffer=u(12769).R,l.Node=u(31430)},31430:(q,n,u)=>{var l=u(87813).Reporter,v=u(87813).EncoderBuffer,E=u(87813).DecoderBuffer,M=u(32391),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],g=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function f(p,m){var S={};this._baseState=S,S.enc=p,S.parent=m||null,S.children=null,S.tag=null,S.args=null,S.reverseArgs=null,S.choice=null,S.optional=!1,S.any=!1,S.obj=!1,S.use=null,S.useDecoder=null,S.key=null,S.default=null,S.explicit=null,S.implicit=null,S.contains=null,S.parent||(S.children=[],this._wrap())}q.exports=f;var d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var m=this._baseState,S={};d.forEach(function(D){S[D]=m[D]});var _=new this.constructor(S.parent);return _._baseState=S,_},f.prototype._wrap=function(){var m=this._baseState;g.forEach(function(S){this[S]=function(){var D=new this.constructor(this);return m.children.push(D),D[S].apply(D,arguments)}},this)},f.prototype._init=function(m){var S=this._baseState;M(null===S.parent),m.call(this),S.children=S.children.filter(function(_){return _._baseState.parent===this},this),M.equal(S.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(m){var S=this._baseState,_=m.filter(function(D){return D instanceof this.constructor},this);m=m.filter(function(D){return!(D instanceof this.constructor)},this),0!==_.length&&(M(null===S.children),S.children=_,_.forEach(function(D){D._baseState.parent=this},this)),0!==m.length&&(M(null===S.args),S.args=m,S.reverseArgs=m.map(function(D){if("object"!=typeof D||D.constructor!==Object)return D;var P={};return Object.keys(D).forEach(function(x){x==(0|x)&&(x|=0);var C=D[x];P[C]=x}),P}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(p){f.prototype[p]=function(){var S=this._baseState;throw new Error(p+" not implemented for encoding: "+S.enc)}}),s.forEach(function(p){f.prototype[p]=function(){var S=this._baseState,_=Array.prototype.slice.call(arguments);return M(null===S.tag),S.tag=p,this._useArgs(_),this}}),f.prototype.use=function(m){M(m);var S=this._baseState;return M(null===S.use),S.use=m,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(m){var S=this._baseState;return M(null===S.default),S.default=m,S.optional=!0,this},f.prototype.explicit=function(m){var S=this._baseState;return M(null===S.explicit&&null===S.implicit),S.explicit=m,this},f.prototype.implicit=function(m){var S=this._baseState;return M(null===S.explicit&&null===S.implicit),S.implicit=m,this},f.prototype.obj=function(){var m=this._baseState,S=Array.prototype.slice.call(arguments);return m.obj=!0,0!==S.length&&this._useArgs(S),this},f.prototype.key=function(m){var S=this._baseState;return M(null===S.key),S.key=m,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(m){var S=this._baseState;return M(null===S.choice),S.choice=m,this._useArgs(Object.keys(m).map(function(_){return m[_]})),this},f.prototype.contains=function(m){var S=this._baseState;return M(null===S.use),S.contains=m,this},f.prototype._decode=function(m,S){var _=this._baseState;if(null===_.parent)return m.wrapResult(_.children[0]._decode(m,S));var k,D=_.default,P=!0,x=null;if(null!==_.key&&(x=m.enterKey(_.key)),_.optional){var C=null;if(null!==_.explicit?C=_.explicit:null!==_.implicit?C=_.implicit:null!==_.tag&&(C=_.tag),null!==C||_.any){if(P=this._peekTag(m,C,_.any),m.isError(P))return P}else{var N=m.save();try{null===_.choice?this._decodeGeneric(_.tag,m,S):this._decodeChoice(m,S),P=!0}catch{P=!1}m.restore(N)}}if(_.obj&&P&&(k=m.enterObject()),P){if(null!==_.explicit){var U=this._decodeTag(m,_.explicit);if(m.isError(U))return U;m=U}var z=m.offset;if(null===_.use&&null===_.choice){if(_.any)N=m.save();var Y=this._decodeTag(m,null!==_.implicit?_.implicit:_.tag,_.any);if(m.isError(Y))return Y;_.any?D=m.raw(N):m=Y}if(S&&S.track&&null!==_.tag&&S.track(m.path(),z,m.length,"tagged"),S&&S.track&&null!==_.tag&&S.track(m.path(),m.offset,m.length,"content"),_.any||(D=null===_.choice?this._decodeGeneric(_.tag,m,S):this._decodeChoice(m,S)),m.isError(D))return D;if(!_.any&&null===_.choice&&null!==_.children&&_.children.forEach(function(j){j._decode(m,S)}),_.contains&&("octstr"===_.tag||"bitstr"===_.tag)){var G=new E(D);D=this._getUse(_.contains,m._reporterState.obj)._decode(G,S)}}return _.obj&&P&&(D=m.leaveObject(k)),null===_.key||null===D&&!0!==P?null!==x&&m.exitKey(x):m.leaveKey(x,_.key,D),D},f.prototype._decodeGeneric=function(m,S,_){var D=this._baseState;return"seq"===m||"set"===m?null:"seqof"===m||"setof"===m?this._decodeList(S,m,D.args[0],_):/str$/.test(m)?this._decodeStr(S,m,_):"objid"===m&&D.args?this._decodeObjid(S,D.args[0],D.args[1],_):"objid"===m?this._decodeObjid(S,null,null,_):"gentime"===m||"utctime"===m?this._decodeTime(S,m,_):"null_"===m?this._decodeNull(S,_):"bool"===m?this._decodeBool(S,_):"objDesc"===m?this._decodeStr(S,m,_):"int"===m||"enum"===m?this._decodeInt(S,D.args&&D.args[0],_):null!==D.use?this._getUse(D.use,S._reporterState.obj)._decode(S,_):S.error("unknown tag: "+m)},f.prototype._getUse=function(m,S){var _=this._baseState;return _.useDecoder=this._use(m,S),M(null===_.useDecoder._baseState.parent),_.useDecoder=_.useDecoder._baseState.children[0],_.implicit!==_.useDecoder._baseState.implicit&&(_.useDecoder=_.useDecoder.clone(),_.useDecoder._baseState.implicit=_.implicit),_.useDecoder},f.prototype._decodeChoice=function(m,S){var _=this._baseState,D=null,P=!1;return Object.keys(_.choice).some(function(x){var C=m.save(),N=_.choice[x];try{var k=N._decode(m,S);if(m.isError(k))return!1;D={type:x,value:k},P=!0}catch{return m.restore(C),!1}return!0},this),P?D:m.error("Choice not matched")},f.prototype._createEncoderBuffer=function(m){return new v(m,this.reporter)},f.prototype._encode=function(m,S,_){var D=this._baseState;if(null===D.default||D.default!==m){var P=this._encodeValue(m,S,_);if(void 0!==P&&!this._skipDefault(P,S,_))return P}},f.prototype._encodeValue=function(m,S,_){var D=this._baseState;if(null===D.parent)return D.children[0]._encode(m,S||new l);var N=null;if(this.reporter=S,D.optional&&void 0===m){if(null===D.default)return;m=D.default}var P=null,x=!1;if(D.any)N=this._createEncoderBuffer(m);else if(D.choice)N=this._encodeChoice(m,S);else if(D.contains)P=this._getUse(D.contains,_)._encode(m,S),x=!0;else if(D.children)P=D.children.map(function(z){if("null_"===z._baseState.tag)return z._encode(null,S,m);if(null===z._baseState.key)return S.error("Child should have a key");var Y=S.enterKey(z._baseState.key);if("object"!=typeof m)return S.error("Child expected, but input is not object");var G=z._encode(m[z._baseState.key],S,m);return S.leaveKey(Y),G},this).filter(function(z){return z}),P=this._createEncoderBuffer(P);else if("seqof"===D.tag||"setof"===D.tag){if(!D.args||1!==D.args.length)return S.error("Too many args for : "+D.tag);if(!Array.isArray(m))return S.error("seqof/setof, but data is not Array");var C=this.clone();C._baseState.implicit=null,P=this._createEncoderBuffer(m.map(function(z){var Y=this._baseState;return this._getUse(Y.args[0],m)._encode(z,S)},C))}else null!==D.use?N=this._getUse(D.use,_)._encode(m,S):(P=this._encodePrimitive(D.tag,m),x=!0);if(!D.any&&null===D.choice){var k=null!==D.implicit?D.implicit:D.tag,U=null===D.implicit?"universal":"context";null===k?null===D.use&&S.error("Tag could be omitted only for .use()"):null===D.use&&(N=this._encodeComposite(k,x,U,P))}return null!==D.explicit&&(N=this._encodeComposite(D.explicit,!1,"context",N)),N},f.prototype._encodeChoice=function(m,S){var _=this._baseState,D=_.choice[m.type];return D||M(!1,m.type+" not found in "+JSON.stringify(Object.keys(_.choice))),D._encode(m.value,S)},f.prototype._encodePrimitive=function(m,S){var _=this._baseState;if(/str$/.test(m))return this._encodeStr(S,m);if("objid"===m&&_.args)return this._encodeObjid(S,_.reverseArgs[0],_.args[1]);if("objid"===m)return this._encodeObjid(S,null,null);if("gentime"===m||"utctime"===m)return this._encodeTime(S,m);if("null_"===m)return this._encodeNull();if("int"===m||"enum"===m)return this._encodeInt(S,_.args&&_.reverseArgs[0]);if("bool"===m)return this._encodeBool(S);if("objDesc"===m)return this._encodeStr(S,m);throw new Error("Unsupported tag: "+m)},f.prototype._isNumstr=function(m){return/^[0-9 ]*$/.test(m)},f.prototype._isPrintstr=function(m){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(m)}},4919:(q,n,u)=>{var l=u(83894);function v(M){this._reporterState={obj:null,path:[],options:M||{},errors:[]}}function E(M,s){this.path=M,this.rethrow(s)}n.b=v,v.prototype.isError=function(s){return s instanceof E},v.prototype.save=function(){var s=this._reporterState;return{obj:s.obj,pathLen:s.path.length}},v.prototype.restore=function(s){var g=this._reporterState;g.obj=s.obj,g.path=g.path.slice(0,s.pathLen)},v.prototype.enterKey=function(s){return this._reporterState.path.push(s)},v.prototype.exitKey=function(s){var g=this._reporterState;g.path=g.path.slice(0,s-1)},v.prototype.leaveKey=function(s,g,y){var f=this._reporterState;this.exitKey(s),null!==f.obj&&(f.obj[g]=y)},v.prototype.path=function(){return this._reporterState.path.join("/")},v.prototype.enterObject=function(){var s=this._reporterState,g=s.obj;return s.obj={},g},v.prototype.leaveObject=function(s){var g=this._reporterState,y=g.obj;return g.obj=s,y},v.prototype.error=function(s){var g,y=this._reporterState,f=s instanceof E;if(g=f?s:new E(y.path.map(function(d){return"["+JSON.stringify(d)+"]"}).join(""),s.message||s,s.stack),!y.options.partial)throw g;return f||y.errors.push(g),g},v.prototype.wrapResult=function(s){var g=this._reporterState;return g.options.partial?{result:this.isError(s)?null:s,errors:g.errors}:s},l(E,Error),E.prototype.rethrow=function(s){if(this.message=s+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,E),!this.stack)try{throw new Error(this.message)}catch(g){this.stack=g.stack}return this}},25496:(q,n,u)=>{var l=u(5459);n.tagClass={0:"universal",1:"application",2:"context",3:"private"},n.tagClassByName=l._reverse(n.tagClass),n.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},n.tagByName=l._reverse(n.tag)},5459:(q,n,u)=>{var l=n;l._reverse=function(E){var M={};return Object.keys(E).forEach(function(s){(0|s)==s&&(s|=0);var g=E[s];M[g]=s}),M},l.der=u(25496)},87127:(q,n,u)=>{var l=u(83894),v=u(87977),E=v.base,M=v.bignum,s=v.constants.der;function g(p){this.enc="der",this.name=p.name,this.entity=p,this.tree=new y,this.tree._init(p.body)}function y(p){E.Node.call(this,"der",p)}function f(p,m){var S=p.readUInt8(m);if(p.isError(S))return S;var _=s.tagClass[S>>6],D=0==(32&S);if(31==(31&S)){var P=S;for(S=0;128==(128&P);){if(P=p.readUInt8(m),p.isError(P))return P;S<<=7,S|=127&P}}else S&=31;return{cls:_,primitive:D,tag:S,tagStr:s.tag[S]}}function d(p,m,S){var _=p.readUInt8(S);if(p.isError(_))return _;if(!m&&128===_)return null;if(!(128&_))return _;var D=127&_;if(D>4)return p.error("length octect is too long");_=0;for(var P=0;P{var l=n;l.der=u(87127),l.pem=u(99617)},99617:(q,n,u)=>{var l=u(83894),v=u(93172).Buffer,E=u(87127);function M(s){E.call(this,s),this.enc="pem"}l(M,E),q.exports=M,M.prototype.decode=function(g,y){for(var f=g.toString().split(/[\r\n]+/g),d=y.label.toUpperCase(),p=/^-----(BEGIN|END) ([^-]+)-----$/,m=-1,S=-1,_=0;_{var l=u(83894),v=u(93172).Buffer,E=u(87977),M=E.base,s=E.constants.der;function g(p){this.enc="der",this.name=p.name,this.entity=p,this.tree=new y,this.tree._init(p.body)}function y(p){M.Node.call(this,"der",p)}function f(p){return p<10?"0"+p:p}q.exports=g,g.prototype.encode=function(m,S){return this.tree._encode(m,S).join()},l(y,M.Node),y.prototype._encodeComposite=function(m,S,_,D){var N,P=function d(p,m,S,_){var D;if("seqof"===p?p="seq":"setof"===p&&(p="set"),s.tagByName.hasOwnProperty(p))D=s.tagByName[p];else{if("number"!=typeof p||(0|p)!==p)return _.error("Unknown tag: "+p);D=p}return D>=31?_.error("Multi-octet tag encoding unsupported"):(m||(D|=32),D|=s.tagClassByName[S||"universal"]<<6,D)}(m,S,_,this.reporter);if(D.length<128)return(N=new v(2))[0]=P,N[1]=D.length,this._createEncoderBuffer([N,D]);for(var x=1,C=D.length;C>=256;C>>=8)x++;(N=new v(2+x))[0]=P,N[1]=128|x;C=1+x;for(var k=D.length;k>0;C--,k>>=8)N[C]=255&k;return this._createEncoderBuffer([N,D])},y.prototype._encodeStr=function(m,S){if("bitstr"===S)return this._createEncoderBuffer([0|m.unused,m.data]);if("bmpstr"===S){for(var _=new v(2*m.length),D=0;D=40)return this.reporter.error("Second objid identifier OOB");m.splice(0,2,40*m[0]+m[1])}var P=0;for(D=0;D=128;x>>=7)P++}var C=new v(P),N=C.length-1;for(D=m.length-1;D>=0;D--){x=m[D];for(C[N--]=127&x;(x>>=7)>0;)C[N--]=128|127&x}return this._createEncoderBuffer(C)},y.prototype._encodeTime=function(m,S){var _,D=new Date(m);return"gentime"===S?_=[f(D.getFullYear()),f(D.getUTCMonth()+1),f(D.getUTCDate()),f(D.getUTCHours()),f(D.getUTCMinutes()),f(D.getUTCSeconds()),"Z"].join(""):"utctime"===S?_=[f(D.getFullYear()%100),f(D.getUTCMonth()+1),f(D.getUTCDate()),f(D.getUTCHours()),f(D.getUTCMinutes()),f(D.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+S+" time is not supported yet"),this._encodeStr(_,"octstr")},y.prototype._encodeNull=function(){return this._createEncoderBuffer("")},y.prototype._encodeInt=function(m,S){if("string"==typeof m){if(!S)return this.reporter.error("String int or enum given, but no values map");if(!S.hasOwnProperty(m))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(m));m=S[m]}if("number"!=typeof m&&!v.isBuffer(m)){var _=m.toArray();!m.sign&&128&_[0]&&_.unshift(0),m=new v(_)}if(v.isBuffer(m)){var D=m.length;0===m.length&&D++;var x=new v(D);return m.copy(x),0===m.length&&(x[0]=0),this._createEncoderBuffer(x)}if(m<128)return this._createEncoderBuffer(m);if(m<256)return this._createEncoderBuffer([0,m]);D=1;for(var P=m;P>=256;P>>=8)D++;for(P=(x=new Array(D)).length-1;P>=0;P--)x[P]=255&m,m>>=8;return 128&x[0]&&x.unshift(0),this._createEncoderBuffer(new v(x))},y.prototype._encodeBool=function(m){return this._createEncoderBuffer(m?255:0)},y.prototype._use=function(m,S){return"function"==typeof m&&(m=m(S)),m._getEncoder("der").tree},y.prototype._skipDefault=function(m,S,_){var P,D=this._baseState;if(null===D.default)return!1;var x=m.join();if(void 0===D.defaultBuffer&&(D.defaultBuffer=this._encodeValue(D.default,S,_).join()),x.length!==D.defaultBuffer.length)return!1;for(P=0;P{var l=n;l.der=u(16374),l.pem=u(3530)},3530:(q,n,u)=>{var l=u(83894),v=u(16374);function E(M){v.call(this,M),this.enc="pem"}l(E,v),q.exports=E,E.prototype.encode=function(s,g){for(var f=v.prototype.encode.call(this,s).toString("base64"),d=["-----BEGIN "+g.label+"-----"],p=0;p=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},21082:(q,n,u)=>{"use strict";var l=u(73502).Buffer;q.exports=function v(E){if(E.length>=255)throw new TypeError("Alphabet too long");for(var M=new Uint8Array(256),s=0;s>>0,z=new Uint8Array(U);C>>0,z[F]=Y%256>>>0,Y=Y/256>>>0;if(0!==Y)throw new Error("Non-zero carry");k=G,C++}for(var j=U-k;j!==U&&0===z[j];)j++;var Z=l.allocUnsafe(N+(U-j));Z.fill(0,0,N);for(var T=N;j!==U;)Z[T++]=z[j++];return Z}return{encode:function _(x){if((Array.isArray(x)||x instanceof Uint8Array)&&(x=l.from(x)),!l.isBuffer(x))throw new TypeError("Expected Buffer");if(0===x.length)return"";for(var C=0,N=0,k=0,U=x.length;k!==U&&0===x[k];)k++,C++;for(var z=(U-k)*S+1>>>0,Y=new Uint8Array(z);k!==U;){for(var G=x[k],F=0,j=z-1;(0!==G||F>>0,Y[j]=G%d>>>0,G=G/d>>>0;if(0!==G)throw new Error("Non-zero carry");N=F,k++}for(var Z=z-N;Z!==z&&0===Y[Z];)Z++;for(var T=p.repeat(C);Z{"use strict";n.byteLength=function y(_){var D=g(_),P=D[0],x=D[1];return 3*(P+x)/4-x},n.toByteArray=function d(_){var D,z,P=g(_),x=P[0],C=P[1],N=new v(function f(_,D,P){return 3*(D+P)/4-P}(0,x,C)),k=0,U=C>0?x-4:x;for(z=0;z>16&255,N[k++]=D>>8&255,N[k++]=255&D;return 2===C&&(D=l[_.charCodeAt(z)]<<2|l[_.charCodeAt(z+1)]>>4,N[k++]=255&D),1===C&&(D=l[_.charCodeAt(z)]<<10|l[_.charCodeAt(z+1)]<<4|l[_.charCodeAt(z+2)]>>2,N[k++]=D>>8&255,N[k++]=255&D),N},n.fromByteArray=function S(_){for(var D,P=_.length,x=P%3,C=[],N=16383,k=0,U=P-x;kU?U:k+N));return 1===x?(D=_[P-1],C.push(u[D>>2]+u[D<<4&63]+"==")):2===x&&(D=(_[P-2]<<8)+_[P-1],C.push(u[D>>10]+u[D>>4&63]+u[D<<2&63]+"=")),C.join("")};for(var u=[],l=[],v=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,s=E.length;M0)throw new Error("Invalid string. Length must be a multiple of 4");var P=_.indexOf("=");return-1===P&&(P=D),[P,P===D?0:4-P%4]}function p(_){return u[_>>18&63]+u[_>>12&63]+u[_>>6&63]+u[63&_]}function m(_,D,P){for(var x,C=[],N=D;N{"use strict";for(var n="qpzry9x8gf2tvdw0s3jn54khce6mua7l",u={},l=0;l>25;return(33554431&D)<<5^996825010&-(P>>0&1)^642813549&-(P>>1&1)^513874426&-(P>>2&1)^1027748829&-(P>>3&1)^705979059&-(P>>4&1)}function M(D){for(var P=1,x=0;x126)return"Invalid prefix ("+D+")";P=E(P)^C>>5}for(P=E(P),x=0;xP)return"Exceeds length limit";var x=D.toLowerCase(),C=D.toUpperCase();if(D!==x&&D!==C)return"Mixed-case string "+D;var N=(D=x).lastIndexOf("1");if(-1===N)return"No separator character for "+D;if(0===N)return"Missing prefix for "+D;var k=D.slice(0,N),U=D.slice(N+1);if(U.length<6)return"Data too short";var z=M(k);if("string"==typeof z)return z;for(var Y=[],G=0;G=U.length)&&Y.push(j)}return 1!==z?"Invalid checksum for "+D:{prefix:k,words:Y}}function d(D,P,x,C){for(var N=0,k=0,U=(1<=x;)k-=x,z.push(N>>k&U);if(C)k>0&&z.push(N<=P)return"Excess padding";if(N<x)throw new TypeError("Exceeds length limit");var C=M(D=D.toLowerCase());if("string"==typeof C)throw new Error(C);for(var N=D+"1",k=0;k>5)throw new Error("Non 5-bit word");C=E(C)^U,N+=n.charAt(U)}for(k=0;k<6;++k)C=E(C);for(C^=1,k=0;k<6;++k){var z=C>>5*(5-k)&31;N+=n.charAt(z)}return N},toWordsUnsafe:function p(D){var P=d(D,8,5,!0);if(Array.isArray(P))return P},toWords:function m(D){var P=d(D,8,5,!0);if(Array.isArray(P))return P;throw new Error(P)},fromWordsUnsafe:function S(D){var P=d(D,5,8,!1);if(Array.isArray(P))return P},fromWords:function _(D){var P=d(D,5,8,!1);if(Array.isArray(P))return P;throw new Error(P)}}},57994:function(q,n,u){var l;!function(v){"use strict";var E,M=20,s=1,g=1e6,y=1e6,f=-7,d=21,p=!1,m="[big.js] ",S=m+"Invalid ",_=S+"decimal places",D=S+"rounding mode",P=m+"Division by zero",x={},C=void 0,N=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function z(G,F,j,Z){var T=G.c;if(j===C&&(j=G.constructor.RM),0!==j&&1!==j&&2!==j&&3!==j)throw Error(D);if(F<1)Z=3===j&&(Z||!!T[0])||0===F&&(1===j&&T[0]>=5||2===j&&(T[0]>5||5===T[0]&&(Z||T[1]!==C))),T.length=1,Z?(G.e=G.e-F+1,T[0]=1):T[0]=G.e=0;else if(F=5||2===j&&(T[F]>5||5===T[F]&&(Z||T[F+1]!==C||1&T[F-1]))||3===j&&(Z||!!T[0]),T.length=F--,Z)for(;++T[F]>9;)T[F]=0,F--||(++G.e,T.unshift(1));for(F=T.length;!T[--F];)T.pop()}return G}function Y(G,F,j){var Z=G.e,T=G.c.join(""),o=T.length;if(F)T=T.charAt(0)+(o>1?"."+T.slice(1):"")+(Z<0?"e":"e+")+Z;else if(Z<0){for(;++Z;)T="0"+T;T="0."+T}else if(Z>0)if(++Z>o)for(Z-=o;Z--;)T+="0";else Z1&&(T=T.charAt(0)+"."+T.slice(1));return G.s<0&&j?"-"+T:T}x.abs=function(){var G=new this.constructor(this);return G.s=1,G},x.cmp=function(G){var F,j=this,Z=j.c,T=(G=new j.constructor(G)).c,o=j.s,h=G.s,w=j.e,I=G.e;if(!Z[0]||!T[0])return Z[0]?o:T[0]?-h:0;if(o!=h)return o;if(F=o<0,w!=I)return w>I^F?1:-1;for(h=(w=Z.length)<(I=T.length)?w:I,o=-1;++oT[o]^F?1:-1;return w==I?0:w>I^F?1:-1},x.div=function(G){var F=this,j=F.constructor,Z=F.c,T=(G=new j(G)).c,o=F.s==G.s?1:-1,h=j.DP;if(h!==~~h||h<0||h>g)throw Error(_);if(!T[0])throw Error(P);if(!Z[0])return G.s=o,G.c=[G.e=0],G;var w,I,R,V,H,L=T.slice(),b=w=T.length,B=Z.length,re=Z.slice(0,w),ne=re.length,te=G,ae=te.c=[],ge=0,pe=h+(te.e=F.e-G.e)+1;for(te.s=o,o=pe<0?0:pe,L.unshift(0);ne++ne?1:-1;else for(H=-1,V=0;++Hre[H]?1:-1;break}if(!(V<0))break;for(I=ne==w?T:L;ne;){if(re[--ne]pe&&z(te,pe,j.RM,re[0]!==C),te},x.eq=function(G){return 0===this.cmp(G)},x.gt=function(G){return this.cmp(G)>0},x.gte=function(G){return this.cmp(G)>-1},x.lt=function(G){return this.cmp(G)<0},x.lte=function(G){return this.cmp(G)<1},x.minus=x.sub=function(G){var F,j,Z,T,o=this,h=o.constructor,w=o.s,I=(G=new h(G)).s;if(w!=I)return G.s=-I,o.plus(G);var R=o.c.slice(),V=o.e,H=G.c,L=G.e;if(!R[0]||!H[0])return H[0]?G.s=-I:R[0]?G=new h(o):G.s=1,G;if(w=V-L){for((T=w<0)?(w=-w,Z=R):(L=V,Z=H),Z.reverse(),I=w;I--;)Z.push(0);Z.reverse()}else for(j=((T=R.length0)for(;I--;)R[F++]=0;for(I=F;j>w;){if(R[--j]0?(I=h,Z=R):(F=-F,Z=w),Z.reverse();F--;)Z.push(0);Z.reverse()}for(w.length-R.length<0&&(Z=R,R=w,w=Z),F=R.length,j=0;F;w[F]%=10)j=(w[--F]=w[F]+R[F]+j)/10|0;for(j&&(w.unshift(j),++I),F=w.length;0===w[--F];)w.pop();return G.c=w,G.e=I,G},x.pow=function(G){var F=this,j=new F.constructor("1"),Z=j,T=G<0;if(G!==~~G||G<-y||G>y)throw Error(S+"exponent");for(T&&(G=-G);1&G&&(Z=Z.times(F)),G>>=1;)F=F.times(F);return T?j.div(Z):Z},x.prec=function(G,F){if(G!==~~G||G<1||G>g)throw Error(S+"precision");return z(new this.constructor(this),G,F)},x.round=function(G,F){if(G===C)G=0;else if(G!==~~G||G<-g||G>g)throw Error(_);return z(new this.constructor(this),G+this.e+1,F)},x.sqrt=function(){var G,F,j,Z=this,T=Z.constructor,o=Z.s,h=Z.e,w=new T("0.5");if(!Z.c[0])return new T(Z);if(o<0)throw Error(m+"No square root");0===(o=Math.sqrt(Z+""))||o===1/0?((F=Z.c.join("")).length+h&1||(F+="0"),h=((h+1)/2|0)-(h<0||1&h),G=new T(((o=Math.sqrt(F))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+h)):G=new T(o+""),h=G.e+(T.DP+=4);do{j=G,G=w.times(j.plus(Z.div(j)))}while(j.c.slice(0,h).join("")!==G.c.slice(0,h).join(""));return z(G,(T.DP-=4)+G.e+1,T.RM)},x.times=x.mul=function(G){var F,j=this,Z=j.constructor,T=j.c,o=(G=new Z(G)).c,h=T.length,w=o.length,I=j.e,R=G.e;if(G.s=j.s==G.s?1:-1,!T[0]||!o[0])return G.c=[G.e=0],G;for(G.e=I+R,hI;)w=F[R]+o[I]*T[R-I-1]+w,F[R--]=w%10,w=w/10|0;F[R]=w}for(w?++G.e:F.shift(),I=F.length;!F[--I];)F.pop();return G.c=F,G},x.toExponential=function(G,F){var j=this,Z=j.c[0];if(G!==C){if(G!==~~G||G<0||G>g)throw Error(_);for(j=z(new j.constructor(j),++G,F);j.c.lengthg)throw Error(_);for(G=G+(j=z(new j.constructor(j),G+j.e+1,F)).e+1;j.c.length=F.PE,!!G.c[0])},x.toNumber=function(){var G=Number(Y(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(G.toString()))throw Error(m+"Imprecise conversion");return G},x.toPrecision=function(G,F){var j=this,Z=j.constructor,T=j.c[0];if(G!==C){if(G!==~~G||G<1||G>g)throw Error(S+"precision");for(j=z(new Z(j),G,F);j.c.length=Z.PE,!!T)},x.valueOf=function(){var G=this,F=G.constructor;if(!0===F.strict)throw Error(m+"valueOf disallowed");return Y(G,G.e<=F.NE||G.e>=F.PE,!0)},E=function k(){function G(F){var j=this;if(!(j instanceof G))return F===C?k():new G(F);if(F instanceof G)j.s=F.s,j.e=F.e,j.c=F.c.slice();else{if("string"!=typeof F){if(!0===G.strict)throw TypeError(S+"number");F=0===F&&1/F<0?"-0":String(F)}!function U(G,F){var j,Z,T;if(!N.test(F))throw Error(S+"number");for(G.s="-"==F.charAt(0)?(F=F.slice(1),-1):1,(j=F.indexOf("."))>-1&&(F=F.replace(".","")),(Z=F.search(/e/i))>0?(j<0&&(j=Z),j+=+F.slice(Z+1),F=F.substring(0,Z)):j<0&&(j=F.length),T=F.length,Z=0;Z0&&"0"==F.charAt(--T););for(G.e=j-Z-1,G.c=[],j=0;Z<=T;)G.c[j++]=+F.charAt(Z++)}return G}(j,F)}j.constructor=G}return G.prototype=x,G.DP=M,G.RM=s,G.NE=f,G.PE=d,G.strict=p,G.roundDown=0,G.roundHalfUp=1,G.roundHalfEven=2,G.roundUp=3,G}(),E.default=E.Big=E,void 0!==(l=function(){return E}.call(n,u,n,q))&&(q.exports=l)}()},48670:(q,n,u)=>{var l;l=typeof window<"u"&&window.crypto?function(U){var z=new Uint32Array(U);return Buffer.from(window.crypto.getRandomValues(z))}:u(41348).randomBytes;var v=u(96386),E=u(99357).pbkdf2Sync,M=u(24457),s=M,g="Invalid mnemonic",y="Invalid entropy",f="Invalid mnemonic checksum";function d(U,z,Y){for(;U.length32)throw new Error(y);if(T.length%4!=0)throw new Error(y);var o=Buffer.from(T);if(S(o)!==Z)throw new Error(f);return o.toString("hex")}function C(U,z){if(Buffer.isBuffer(U)||(U=Buffer.from(U,"hex")),z=z||s,U.length<16)throw new TypeError(y);if(U.length>32)throw new TypeError(y);if(U.length%4!=0)throw new TypeError(y);return(m([].slice.call(U))+S(U)).match(/(.{1,11})/g).map(function(T){var o=p(T);return z[o]}).join(" ")}q.exports={mnemonicToSeed:D,mnemonicToSeedHex:function P(U,z){return D(U,z).toString("hex")},mnemonicToEntropy:x,entropyToMnemonic:C,generateMnemonic:function N(U,z,Y){if((U=U||128)%32!=0)throw new TypeError(y);return C((z=z||l)(U/8),Y)},validateMnemonic:function k(U,z){try{x(U,z)}catch{return!1}return!0},wordlists:{EN:M}}},98538:function(q,n,u){(function(l,v){"use strict";function E(w,I){if(!w)throw new Error(I||"Assertion failed")}function M(w,I){w.super_=I;var R=function(){};R.prototype=I.prototype,w.prototype=new R,w.prototype.constructor=w}function s(w,I,R){if(s.isBN(w))return w;this.negative=0,this.words=null,this.length=0,this.red=null,null!==w&&(("le"===I||"be"===I)&&(R=I,I=10),this._init(w||0,I||10,R||"be"))}var g;"object"==typeof l?l.exports=s:v.BN=s,s.BN=s,s.wordSize=26;try{g=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:u(46601).Buffer}catch{}function y(w,I){var R=w.charCodeAt(I);return R>=48&&R<=57?R-48:R>=65&&R<=70?R-55:R>=97&&R<=102?R-87:void E(!1,"Invalid character in "+w)}function f(w,I,R){var V=y(w,R);return R-1>=I&&(V|=y(w,R-1)<<4),V}function d(w,I,R,V){for(var H=0,L=0,b=Math.min(w.length,R),B=I;B=49?re-49+10:re>=17?re-17+10:re,E(re>=0&&L0?I:R},s.min=function(I,R){return I.cmp(R)<0?I:R},s.prototype._init=function(I,R,V){if("number"==typeof I)return this._initNumber(I,R,V);if("object"==typeof I)return this._initArray(I,R,V);"hex"===R&&(R=16),E(R===(0|R)&&R>=2&&R<=36);var H=0;"-"===(I=I.toString().replace(/\s+/g,""))[0]&&(H++,this.negative=1),H=0;H-=3)b=I[H]|I[H-1]<<8|I[H-2]<<16,this.words[L]|=b<>>26-B&67108863,(B+=24)>=26&&(B-=26,L++);else if("le"===V)for(H=0,L=0;H>>26-B&67108863,(B+=24)>=26&&(B-=26,L++);return this._strip()},s.prototype._parseHex=function(I,R,V){this.length=Math.ceil((I.length-R)/6),this.words=new Array(this.length);for(var H=0;H=R;H-=2)B=f(I,R,H)<=18?(L-=18,b+=1,this.words[b]|=B>>>26):L+=8;else for(H=(I.length-R)%2==0?R+1:R;H=18?(L-=18,b+=1,this.words[b]|=B>>>26):L+=8;this._strip()},s.prototype._parseBase=function(I,R,V){this.words=[0],this.length=1;for(var H=0,L=1;L<=67108863;L*=R)H++;H--,L=L/R|0;for(var b=I.length-V,B=b%H,re=Math.min(b,b-B)+V,ne=0,te=V;te1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch{s.prototype.inspect=m}else s.prototype.inspect=m;function m(){return(this.red?""}var S=["","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"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],D=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(I,R){var V;if(R=0|R||1,16===(I=I||10)||"hex"===I){V="";for(var H=0,L=0,b=0;b>>24-H&16777215,(H+=2)>=26&&(H-=26,b--),V=0!==L||b!==this.length-1?S[6-re.length]+re+V:re+V}for(0!==L&&(V=L.toString(16)+V);V.length%R!=0;)V="0"+V;return 0!==this.negative&&(V="-"+V),V}if(I===(0|I)&&I>=2&&I<=36){var ne=_[I],te=D[I];V="";var ae=this.clone();for(ae.negative=0;!ae.isZero();){var ge=ae.modrn(te).toString(I);V=(ae=ae.idivn(te)).isZero()?ge+V:S[ne-ge.length]+ge+V}for(this.isZero()&&(V="0"+V);V.length%R!=0;)V="0"+V;return 0!==this.negative&&(V="-"+V),V}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var I=this.words[0];return 2===this.length?I+=67108864*this.words[1]:3===this.length&&1===this.words[2]?I+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-I:I},s.prototype.toJSON=function(){return this.toString(16,2)},g&&(s.prototype.toBuffer=function(I,R){return this.toArrayLike(g,I,R)}),s.prototype.toArray=function(I,R){return this.toArrayLike(Array,I,R)};function C(w,I,R){R.negative=I.negative^w.negative;var V=w.length+I.length|0;R.length=V,V=V-1|0;var H=0|w.words[0],L=0|I.words[0],b=H*L,B=67108863&b,re=b/67108864|0;R.words[0]=B;for(var ne=1;ne>>26,ae=67108863&re,ge=Math.min(ne,I.length-1),pe=Math.max(0,ne-w.length+1);pe<=ge;pe++){var we=ne-pe|0;te+=(b=(H=0|w.words[we])*(L=0|I.words[pe])+ae)/67108864|0,ae=67108863&b}R.words[ne]=0|ae,re=0|te}return 0!==re?R.words[ne]=0|re:R.length--,R._strip()}s.prototype.toArrayLike=function(I,R,V){this._strip();var H=this.byteLength(),L=V||Math.max(1,H);E(H<=L,"byte array longer than desired length"),E(L>0,"Requested array length <= 0");var b=function(I,R){return I.allocUnsafe?I.allocUnsafe(R):new I(R)}(I,L);return this["_toArrayLike"+("le"===R?"LE":"BE")](b,H),b},s.prototype._toArrayLikeLE=function(I,R){for(var V=0,H=0,L=0,b=0;L>8&255),V>16&255),6===b?(V>24&255),H=0,b=0):(H=B>>>24,b+=2)}if(V=0&&(I[V--]=B>>8&255),V>=0&&(I[V--]=B>>16&255),6===b?(V>=0&&(I[V--]=B>>24&255),H=0,b=0):(H=B>>>24,b+=2)}if(V>=0)for(I[V--]=H;V>=0;)I[V--]=0},Math.clz32?s.prototype._countBits=function(I){return 32-Math.clz32(I)}:s.prototype._countBits=function(I){var R=I,V=0;return R>=4096&&(V+=13,R>>>=13),R>=64&&(V+=7,R>>>=7),R>=8&&(V+=4,R>>>=4),R>=2&&(V+=2,R>>>=2),V+R},s.prototype._zeroBits=function(I){if(0===I)return 26;var R=I,V=0;return 8191&R||(V+=13,R>>>=13),127&R||(V+=7,R>>>=7),15&R||(V+=4,R>>>=4),3&R||(V+=2,R>>>=2),1&R||V++,V},s.prototype.bitLength=function(){var I=this.words[this.length-1],R=this._countBits(I);return 26*(this.length-1)+R},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var I=0,R=0;RI.length?this.clone().ior(I):I.clone().ior(this)},s.prototype.uor=function(I){return this.length>I.length?this.clone().iuor(I):I.clone().iuor(this)},s.prototype.iuand=function(I){var R;R=this.length>I.length?I:this;for(var V=0;VI.length?this.clone().iand(I):I.clone().iand(this)},s.prototype.uand=function(I){return this.length>I.length?this.clone().iuand(I):I.clone().iuand(this)},s.prototype.iuxor=function(I){var R,V;this.length>I.length?(R=this,V=I):(R=I,V=this);for(var H=0;HI.length?this.clone().ixor(I):I.clone().ixor(this)},s.prototype.uxor=function(I){return this.length>I.length?this.clone().iuxor(I):I.clone().iuxor(this)},s.prototype.inotn=function(I){E("number"==typeof I&&I>=0);var R=0|Math.ceil(I/26),V=I%26;this._expand(R),V>0&&R--;for(var H=0;H0&&(this.words[H]=~this.words[H]&67108863>>26-V),this._strip()},s.prototype.notn=function(I){return this.clone().inotn(I)},s.prototype.setn=function(I,R){E("number"==typeof I&&I>=0);var V=I/26|0,H=I%26;return this._expand(V+1),this.words[V]=R?this.words[V]|1<I.length?(V=this,H=I):(V=I,H=this);for(var L=0,b=0;b>>26;for(;0!==L&&b>>26;if(this.length=V.length,0!==L)this.words[this.length]=L,this.length++;else if(V!==this)for(;bI.length?this.clone().iadd(I):I.clone().iadd(this)},s.prototype.isub=function(I){if(0!==I.negative){I.negative=0;var R=this.iadd(I);return I.negative=1,R._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(I),this.negative=1,this._normSign();var H,L,V=this.cmp(I);if(0===V)return this.negative=0,this.length=1,this.words[0]=0,this;V>0?(H=this,L=I):(H=I,L=this);for(var b=0,B=0;B>26,this.words[B]=67108863&R;for(;0!==b&&B>26,this.words[B]=67108863&R;if(0===b&&B>>13,we=0|H[1],ce=8191&we,le=we>>>13,ue=0|H[2],fe=8191&ue,he=ue>>>13,Ae=0|H[3],Pe=8191&Ae,Re=Ae>>>13,ot=0|H[4],nt=8191&ot,Ye=ot>>>13,It=0|H[5],st=8191&It,He=It>>>13,ze=0|H[6],Be=8191&ze,Ze=ze>>>13,ut=0|H[7],Me=8191&ut,ve=ut>>>13,xe=0|H[8],je=8191&xe,Ge=xe>>>13,Qe=0|H[9],ye=8191&Qe,ke=Qe>>>13,et=0|L[0],qe=8191&et,at=et>>>13,bt=0|L[1],pt=8191&bt,xt=bt>>>13,kn=0|L[2],Nt=8191&kn,Ot=kn>>>13,Mn=0|L[3],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|L[4],Bt=8191&Hn,Kt=Hn>>>13,dr=0|L[5],Rt=8191&dr,Ut=dr>>>13,Te=0|L[6],Se=8191&Te,Oe=Te>>>13,_e=0|L[7],Le=8191&_e,Xe=_e>>>13,At=0|L[8],dt=8191&At,gt=At>>>13,nn=0|L[9],Wt=8191&nn,hn=nn>>>13;V.negative=I.negative^R.negative,V.length=19;var rn=(B+(re=Math.imul(ge,qe))|0)+((8191&(ne=(ne=Math.imul(ge,at))+Math.imul(pe,qe)|0))<<13)|0;B=((te=Math.imul(pe,at))+(ne>>>13)|0)+(rn>>>26)|0,rn&=67108863,re=Math.imul(ce,qe),ne=(ne=Math.imul(ce,at))+Math.imul(le,qe)|0,te=Math.imul(le,at);var gn=(B+(re=re+Math.imul(ge,pt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0))<<13)|0;B=((te=te+Math.imul(pe,xt)|0)+(ne>>>13)|0)+(gn>>>26)|0,gn&=67108863,re=Math.imul(fe,qe),ne=(ne=Math.imul(fe,at))+Math.imul(he,qe)|0,te=Math.imul(he,at),re=re+Math.imul(ce,pt)|0,ne=(ne=ne+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,te=te+Math.imul(le,xt)|0;var on=(B+(re=re+Math.imul(ge,Nt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0))<<13)|0;B=((te=te+Math.imul(pe,Ot)|0)+(ne>>>13)|0)+(on>>>26)|0,on&=67108863,re=Math.imul(Pe,qe),ne=(ne=Math.imul(Pe,at))+Math.imul(Re,qe)|0,te=Math.imul(Re,at),re=re+Math.imul(fe,pt)|0,ne=(ne=ne+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,te=te+Math.imul(he,xt)|0,re=re+Math.imul(ce,Nt)|0,ne=(ne=ne+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,te=te+Math.imul(le,Ot)|0;var An=(B+(re=re+Math.imul(ge,Tt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0))<<13)|0;B=((te=te+Math.imul(pe,Pt)|0)+(ne>>>13)|0)+(An>>>26)|0,An&=67108863,re=Math.imul(nt,qe),ne=(ne=Math.imul(nt,at))+Math.imul(Ye,qe)|0,te=Math.imul(Ye,at),re=re+Math.imul(Pe,pt)|0,ne=(ne=ne+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,te=te+Math.imul(Re,xt)|0,re=re+Math.imul(fe,Nt)|0,ne=(ne=ne+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,te=te+Math.imul(he,Ot)|0,re=re+Math.imul(ce,Tt)|0,ne=(ne=ne+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,te=te+Math.imul(le,Pt)|0;var mn=(B+(re=re+Math.imul(ge,Bt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0))<<13)|0;B=((te=te+Math.imul(pe,Kt)|0)+(ne>>>13)|0)+(mn>>>26)|0,mn&=67108863,re=Math.imul(st,qe),ne=(ne=Math.imul(st,at))+Math.imul(He,qe)|0,te=Math.imul(He,at),re=re+Math.imul(nt,pt)|0,ne=(ne=ne+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,te=te+Math.imul(Ye,xt)|0,re=re+Math.imul(Pe,Nt)|0,ne=(ne=ne+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,te=te+Math.imul(Re,Ot)|0,re=re+Math.imul(fe,Tt)|0,ne=(ne=ne+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,te=te+Math.imul(he,Pt)|0,re=re+Math.imul(ce,Bt)|0,ne=(ne=ne+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,te=te+Math.imul(le,Kt)|0;var On=(B+(re=re+Math.imul(ge,Rt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0))<<13)|0;B=((te=te+Math.imul(pe,Ut)|0)+(ne>>>13)|0)+(On>>>26)|0,On&=67108863,re=Math.imul(Be,qe),ne=(ne=Math.imul(Be,at))+Math.imul(Ze,qe)|0,te=Math.imul(Ze,at),re=re+Math.imul(st,pt)|0,ne=(ne=ne+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,te=te+Math.imul(He,xt)|0,re=re+Math.imul(nt,Nt)|0,ne=(ne=ne+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,te=te+Math.imul(Ye,Ot)|0,re=re+Math.imul(Pe,Tt)|0,ne=(ne=ne+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,te=te+Math.imul(Re,Pt)|0,re=re+Math.imul(fe,Bt)|0,ne=(ne=ne+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,te=te+Math.imul(he,Kt)|0,re=re+Math.imul(ce,Rt)|0,ne=(ne=ne+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,te=te+Math.imul(le,Ut)|0;var Cn=(B+(re=re+Math.imul(ge,Se)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0))<<13)|0;B=((te=te+Math.imul(pe,Oe)|0)+(ne>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,re=Math.imul(Me,qe),ne=(ne=Math.imul(Me,at))+Math.imul(ve,qe)|0,te=Math.imul(ve,at),re=re+Math.imul(Be,pt)|0,ne=(ne=ne+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,te=te+Math.imul(Ze,xt)|0,re=re+Math.imul(st,Nt)|0,ne=(ne=ne+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,te=te+Math.imul(He,Ot)|0,re=re+Math.imul(nt,Tt)|0,ne=(ne=ne+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,te=te+Math.imul(Ye,Pt)|0,re=re+Math.imul(Pe,Bt)|0,ne=(ne=ne+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,te=te+Math.imul(Re,Kt)|0,re=re+Math.imul(fe,Rt)|0,ne=(ne=ne+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,te=te+Math.imul(he,Ut)|0,re=re+Math.imul(ce,Se)|0,ne=(ne=ne+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,te=te+Math.imul(le,Oe)|0;var yn=(B+(re=re+Math.imul(ge,Le)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0))<<13)|0;B=((te=te+Math.imul(pe,Xe)|0)+(ne>>>13)|0)+(yn>>>26)|0,yn&=67108863,re=Math.imul(je,qe),ne=(ne=Math.imul(je,at))+Math.imul(Ge,qe)|0,te=Math.imul(Ge,at),re=re+Math.imul(Me,pt)|0,ne=(ne=ne+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,te=te+Math.imul(ve,xt)|0,re=re+Math.imul(Be,Nt)|0,ne=(ne=ne+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,te=te+Math.imul(Ze,Ot)|0,re=re+Math.imul(st,Tt)|0,ne=(ne=ne+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,te=te+Math.imul(He,Pt)|0,re=re+Math.imul(nt,Bt)|0,ne=(ne=ne+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,te=te+Math.imul(Ye,Kt)|0,re=re+Math.imul(Pe,Rt)|0,ne=(ne=ne+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,te=te+Math.imul(Re,Ut)|0,re=re+Math.imul(fe,Se)|0,ne=(ne=ne+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,te=te+Math.imul(he,Oe)|0,re=re+Math.imul(ce,Le)|0,ne=(ne=ne+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,te=te+Math.imul(le,Xe)|0;var en=(B+(re=re+Math.imul(ge,dt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;B=((te=te+Math.imul(pe,gt)|0)+(ne>>>13)|0)+(en>>>26)|0,en&=67108863,re=Math.imul(ye,qe),ne=(ne=Math.imul(ye,at))+Math.imul(ke,qe)|0,te=Math.imul(ke,at),re=re+Math.imul(je,pt)|0,ne=(ne=ne+Math.imul(je,xt)|0)+Math.imul(Ge,pt)|0,te=te+Math.imul(Ge,xt)|0,re=re+Math.imul(Me,Nt)|0,ne=(ne=ne+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,te=te+Math.imul(ve,Ot)|0,re=re+Math.imul(Be,Tt)|0,ne=(ne=ne+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,te=te+Math.imul(Ze,Pt)|0,re=re+Math.imul(st,Bt)|0,ne=(ne=ne+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,te=te+Math.imul(He,Kt)|0,re=re+Math.imul(nt,Rt)|0,ne=(ne=ne+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,te=te+Math.imul(Ye,Ut)|0,re=re+Math.imul(Pe,Se)|0,ne=(ne=ne+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,te=te+Math.imul(Re,Oe)|0,re=re+Math.imul(fe,Le)|0,ne=(ne=ne+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,te=te+Math.imul(he,Xe)|0,re=re+Math.imul(ce,dt)|0,ne=(ne=ne+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0,te=te+Math.imul(le,gt)|0;var wn=(B+(re=re+Math.imul(ge,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ge,hn)|0)+Math.imul(pe,Wt)|0))<<13)|0;B=((te=te+Math.imul(pe,hn)|0)+(ne>>>13)|0)+(wn>>>26)|0,wn&=67108863,re=Math.imul(ye,pt),ne=(ne=Math.imul(ye,xt))+Math.imul(ke,pt)|0,te=Math.imul(ke,xt),re=re+Math.imul(je,Nt)|0,ne=(ne=ne+Math.imul(je,Ot)|0)+Math.imul(Ge,Nt)|0,te=te+Math.imul(Ge,Ot)|0,re=re+Math.imul(Me,Tt)|0,ne=(ne=ne+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,te=te+Math.imul(ve,Pt)|0,re=re+Math.imul(Be,Bt)|0,ne=(ne=ne+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,te=te+Math.imul(Ze,Kt)|0,re=re+Math.imul(st,Rt)|0,ne=(ne=ne+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,te=te+Math.imul(He,Ut)|0,re=re+Math.imul(nt,Se)|0,ne=(ne=ne+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,te=te+Math.imul(Ye,Oe)|0,re=re+Math.imul(Pe,Le)|0,ne=(ne=ne+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,te=te+Math.imul(Re,Xe)|0,re=re+Math.imul(fe,dt)|0,ne=(ne=ne+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0,te=te+Math.imul(he,gt)|0;var ln=(B+(re=re+Math.imul(ce,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(ce,hn)|0)+Math.imul(le,Wt)|0))<<13)|0;B=((te=te+Math.imul(le,hn)|0)+(ne>>>13)|0)+(ln>>>26)|0,ln&=67108863,re=Math.imul(ye,Nt),ne=(ne=Math.imul(ye,Ot))+Math.imul(ke,Nt)|0,te=Math.imul(ke,Ot),re=re+Math.imul(je,Tt)|0,ne=(ne=ne+Math.imul(je,Pt)|0)+Math.imul(Ge,Tt)|0,te=te+Math.imul(Ge,Pt)|0,re=re+Math.imul(Me,Bt)|0,ne=(ne=ne+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,te=te+Math.imul(ve,Kt)|0,re=re+Math.imul(Be,Rt)|0,ne=(ne=ne+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,te=te+Math.imul(Ze,Ut)|0,re=re+Math.imul(st,Se)|0,ne=(ne=ne+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,te=te+Math.imul(He,Oe)|0,re=re+Math.imul(nt,Le)|0,ne=(ne=ne+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,te=te+Math.imul(Ye,Xe)|0,re=re+Math.imul(Pe,dt)|0,ne=(ne=ne+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0,te=te+Math.imul(Re,gt)|0;var cn=(B+(re=re+Math.imul(fe,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(fe,hn)|0)+Math.imul(he,Wt)|0))<<13)|0;B=((te=te+Math.imul(he,hn)|0)+(ne>>>13)|0)+(cn>>>26)|0,cn&=67108863,re=Math.imul(ye,Tt),ne=(ne=Math.imul(ye,Pt))+Math.imul(ke,Tt)|0,te=Math.imul(ke,Pt),re=re+Math.imul(je,Bt)|0,ne=(ne=ne+Math.imul(je,Kt)|0)+Math.imul(Ge,Bt)|0,te=te+Math.imul(Ge,Kt)|0,re=re+Math.imul(Me,Rt)|0,ne=(ne=ne+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,te=te+Math.imul(ve,Ut)|0,re=re+Math.imul(Be,Se)|0,ne=(ne=ne+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,te=te+Math.imul(Ze,Oe)|0,re=re+Math.imul(st,Le)|0,ne=(ne=ne+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,te=te+Math.imul(He,Xe)|0,re=re+Math.imul(nt,dt)|0,ne=(ne=ne+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0,te=te+Math.imul(Ye,gt)|0;var Sn=(B+(re=re+Math.imul(Pe,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(Pe,hn)|0)+Math.imul(Re,Wt)|0))<<13)|0;B=((te=te+Math.imul(Re,hn)|0)+(ne>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,re=Math.imul(ye,Bt),ne=(ne=Math.imul(ye,Kt))+Math.imul(ke,Bt)|0,te=Math.imul(ke,Kt),re=re+Math.imul(je,Rt)|0,ne=(ne=ne+Math.imul(je,Ut)|0)+Math.imul(Ge,Rt)|0,te=te+Math.imul(Ge,Ut)|0,re=re+Math.imul(Me,Se)|0,ne=(ne=ne+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,te=te+Math.imul(ve,Oe)|0,re=re+Math.imul(Be,Le)|0,ne=(ne=ne+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,te=te+Math.imul(Ze,Xe)|0,re=re+Math.imul(st,dt)|0,ne=(ne=ne+Math.imul(st,gt)|0)+Math.imul(He,dt)|0,te=te+Math.imul(He,gt)|0;var fn=(B+(re=re+Math.imul(nt,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(nt,hn)|0)+Math.imul(Ye,Wt)|0))<<13)|0;B=((te=te+Math.imul(Ye,hn)|0)+(ne>>>13)|0)+(fn>>>26)|0,fn&=67108863,re=Math.imul(ye,Rt),ne=(ne=Math.imul(ye,Ut))+Math.imul(ke,Rt)|0,te=Math.imul(ke,Ut),re=re+Math.imul(je,Se)|0,ne=(ne=ne+Math.imul(je,Oe)|0)+Math.imul(Ge,Se)|0,te=te+Math.imul(Ge,Oe)|0,re=re+Math.imul(Me,Le)|0,ne=(ne=ne+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,te=te+Math.imul(ve,Xe)|0,re=re+Math.imul(Be,dt)|0,ne=(ne=ne+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0,te=te+Math.imul(Ze,gt)|0;var Ft=(B+(re=re+Math.imul(st,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(st,hn)|0)+Math.imul(He,Wt)|0))<<13)|0;B=((te=te+Math.imul(He,hn)|0)+(ne>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,re=Math.imul(ye,Se),ne=(ne=Math.imul(ye,Oe))+Math.imul(ke,Se)|0,te=Math.imul(ke,Oe),re=re+Math.imul(je,Le)|0,ne=(ne=ne+Math.imul(je,Xe)|0)+Math.imul(Ge,Le)|0,te=te+Math.imul(Ge,Xe)|0,re=re+Math.imul(Me,dt)|0,ne=(ne=ne+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0,te=te+Math.imul(ve,gt)|0;var jt=(B+(re=re+Math.imul(Be,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(Be,hn)|0)+Math.imul(Ze,Wt)|0))<<13)|0;B=((te=te+Math.imul(Ze,hn)|0)+(ne>>>13)|0)+(jt>>>26)|0,jt&=67108863,re=Math.imul(ye,Le),ne=(ne=Math.imul(ye,Xe))+Math.imul(ke,Le)|0,te=Math.imul(ke,Xe),re=re+Math.imul(je,dt)|0,ne=(ne=ne+Math.imul(je,gt)|0)+Math.imul(Ge,dt)|0,te=te+Math.imul(Ge,gt)|0;var dn=(B+(re=re+Math.imul(Me,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(Me,hn)|0)+Math.imul(ve,Wt)|0))<<13)|0;B=((te=te+Math.imul(ve,hn)|0)+(ne>>>13)|0)+(dn>>>26)|0,dn&=67108863,re=Math.imul(ye,dt),ne=(ne=Math.imul(ye,gt))+Math.imul(ke,dt)|0,te=Math.imul(ke,gt);var $t=(B+(re=re+Math.imul(je,Wt)|0)|0)+((8191&(ne=(ne=ne+Math.imul(je,hn)|0)+Math.imul(Ge,Wt)|0))<<13)|0;B=((te=te+Math.imul(Ge,hn)|0)+(ne>>>13)|0)+($t>>>26)|0,$t&=67108863;var qt=(B+(re=Math.imul(ye,Wt))|0)+((8191&(ne=(ne=Math.imul(ye,hn))+Math.imul(ke,Wt)|0))<<13)|0;return B=((te=Math.imul(ke,hn))+(ne>>>13)|0)+(qt>>>26)|0,qt&=67108863,b[0]=rn,b[1]=gn,b[2]=on,b[3]=An,b[4]=mn,b[5]=On,b[6]=Cn,b[7]=yn,b[8]=en,b[9]=wn,b[10]=ln,b[11]=cn,b[12]=Sn,b[13]=fn,b[14]=Ft,b[15]=jt,b[16]=dn,b[17]=$t,b[18]=qt,0!==B&&(b[19]=B,V.length++),V};function k(w,I,R){R.negative=I.negative^w.negative,R.length=w.length+I.length;for(var V=0,H=0,L=0;L>>26)|0)>>>26,b&=67108863}R.words[L]=B,V=b,b=H}return 0!==V?R.words[L]=V:R.length--,R._strip()}function U(w,I,R){return k(w,I,R)}function z(w,I){this.x=w,this.y=I}Math.imul||(N=C),s.prototype.mulTo=function(I,R){var H=this.length+I.length;return 10===this.length&&10===I.length?N(this,I,R):H<63?C(this,I,R):H<1024?k(this,I,R):U(this,I,R)},z.prototype.makeRBT=function(I){for(var R=new Array(I),V=s.prototype._countBits(I)-1,H=0;H>=1;return H},z.prototype.permute=function(I,R,V,H,L,b){for(var B=0;B>>=1)L++;return 1<>>=13,V[2*b+1]=8191&L,L>>>=13;for(b=2*R;b>=26,V+=L/67108864|0,V+=b>>>26,this.words[H]=67108863&b}return 0!==V&&(this.words[H]=V,this.length++),R?this.ineg():this},s.prototype.muln=function(I){return this.clone().imuln(I)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(I){var R=function x(w){for(var I=new Array(w.bitLength()),R=0;R>>H&1}return I}(I);if(0===R.length)return new s(1);for(var V=this,H=0;H=0);var L,R=I%26,V=(I-R)/26,H=67108863>>>26-R<<26-R;if(0!==R){var b=0;for(L=0;L>>26-R}b&&(this.words[L]=b,this.length++)}if(0!==V){for(L=this.length-1;L>=0;L--)this.words[L+V]=this.words[L];for(L=0;L=0),H=R?(R-R%26)/26:0;var L=I%26,b=Math.min((I-L)/26,this.length),B=67108863^67108863>>>L<b)for(this.length-=b,ne=0;ne=0&&(0!==te||ne>=H);ne--){var ae=0|this.words[ne];this.words[ne]=te<<26-L|ae>>>L,te=ae&B}return re&&0!==te&&(re.words[re.length++]=te),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(I,R,V){return E(0===this.negative),this.iushrn(I,R,V)},s.prototype.shln=function(I){return this.clone().ishln(I)},s.prototype.ushln=function(I){return this.clone().iushln(I)},s.prototype.shrn=function(I){return this.clone().ishrn(I)},s.prototype.ushrn=function(I){return this.clone().iushrn(I)},s.prototype.testn=function(I){E("number"==typeof I&&I>=0);var R=I%26,V=(I-R)/26,H=1<=0);var R=I%26,V=(I-R)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=V)return this;if(0!==R&&V++,this.length=Math.min(V,this.length),0!==R){var H=67108863^67108863>>>R<=67108864;R++)this.words[R]-=67108864,R===this.length-1?this.words[R+1]=1:this.words[R+1]++;return this.length=Math.max(this.length,R+1),this},s.prototype.isubn=function(I){if(E("number"==typeof I),E(I<67108864),I<0)return this.iaddn(-I);if(0!==this.negative)return this.negative=0,this.iaddn(I),this.negative=1,this;if(this.words[0]-=I,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var R=0;R>26)-(re/67108864|0),this.words[L+V]=67108863&b}for(;L>26,this.words[L+V]=67108863&b;if(0===B)return this._strip();for(E(-1===B),B=0,L=0;L>26,this.words[L]=67108863&b;return this.negative=1,this._strip()},s.prototype._wordDiv=function(I,R){var V=(this.length,I.length),H=this.clone(),L=I,b=0|L.words[L.length-1];0!==(V=26-this._countBits(b))&&(L=L.ushln(V),H.iushln(V),b=0|L.words[L.length-1]);var ne,re=H.length-L.length;if("mod"!==R){(ne=new s(null)).length=re+1,ne.words=new Array(ne.length);for(var te=0;te=0;ge--){var pe=67108864*(0|H.words[L.length+ge])+(0|H.words[L.length+ge-1]);for(pe=Math.min(pe/b|0,67108863),H._ishlnsubmul(L,pe,ge);0!==H.negative;)pe--,H.negative=0,H._ishlnsubmul(L,1,ge),H.isZero()||(H.negative^=1);ne&&(ne.words[ge]=pe)}return ne&&ne._strip(),H._strip(),"div"!==R&&0!==V&&H.iushrn(V),{div:ne||null,mod:H}},s.prototype.divmod=function(I,R,V){return E(!I.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===I.negative?(b=this.neg().divmod(I,R),"mod"!==R&&(H=b.div.neg()),"div"!==R&&(L=b.mod.neg(),V&&0!==L.negative&&L.iadd(I)),{div:H,mod:L}):0===this.negative&&0!==I.negative?(b=this.divmod(I.neg(),R),"mod"!==R&&(H=b.div.neg()),{div:H,mod:b.mod}):this.negative&I.negative?(b=this.neg().divmod(I.neg(),R),"div"!==R&&(L=b.mod.neg(),V&&0!==L.negative&&L.isub(I)),{div:b.div,mod:L}):I.length>this.length||this.cmp(I)<0?{div:new s(0),mod:this}:1===I.length?"div"===R?{div:this.divn(I.words[0]),mod:null}:"mod"===R?{div:null,mod:new s(this.modrn(I.words[0]))}:{div:this.divn(I.words[0]),mod:new s(this.modrn(I.words[0]))}:this._wordDiv(I,R);var H,L,b},s.prototype.div=function(I){return this.divmod(I,"div",!1).div},s.prototype.mod=function(I){return this.divmod(I,"mod",!1).mod},s.prototype.umod=function(I){return this.divmod(I,"mod",!0).mod},s.prototype.divRound=function(I){var R=this.divmod(I);if(R.mod.isZero())return R.div;var V=0!==R.div.negative?R.mod.isub(I):R.mod,H=I.ushrn(1),L=I.andln(1),b=V.cmp(H);return b<0||1===L&&0===b?R.div:0!==R.div.negative?R.div.isubn(1):R.div.iaddn(1)},s.prototype.modrn=function(I){var R=I<0;R&&(I=-I),E(I<=67108863);for(var V=(1<<26)%I,H=0,L=this.length-1;L>=0;L--)H=(V*H+(0|this.words[L]))%I;return R?-H:H},s.prototype.modn=function(I){return this.modrn(I)},s.prototype.idivn=function(I){var R=I<0;R&&(I=-I),E(I<=67108863);for(var V=0,H=this.length-1;H>=0;H--){var L=(0|this.words[H])+67108864*V;this.words[H]=L/I|0,V=L%I}return this._strip(),R?this.ineg():this},s.prototype.divn=function(I){return this.clone().idivn(I)},s.prototype.egcd=function(I){E(0===I.negative),E(!I.isZero());var R=this,V=I.clone();R=0!==R.negative?R.umod(I):R.clone();for(var H=new s(1),L=new s(0),b=new s(0),B=new s(1),re=0;R.isEven()&&V.isEven();)R.iushrn(1),V.iushrn(1),++re;for(var ne=V.clone(),te=R.clone();!R.isZero();){for(var ae=0,ge=1;!(R.words[0]&ge)&&ae<26;++ae,ge<<=1);if(ae>0)for(R.iushrn(ae);ae-- >0;)(H.isOdd()||L.isOdd())&&(H.iadd(ne),L.isub(te)),H.iushrn(1),L.iushrn(1);for(var pe=0,we=1;!(V.words[0]&we)&&pe<26;++pe,we<<=1);if(pe>0)for(V.iushrn(pe);pe-- >0;)(b.isOdd()||B.isOdd())&&(b.iadd(ne),B.isub(te)),b.iushrn(1),B.iushrn(1);R.cmp(V)>=0?(R.isub(V),H.isub(b),L.isub(B)):(V.isub(R),b.isub(H),B.isub(L))}return{a:b,b:B,gcd:V.iushln(re)}},s.prototype._invmp=function(I){E(0===I.negative),E(!I.isZero());var ae,R=this,V=I.clone();R=0!==R.negative?R.umod(I):R.clone();for(var H=new s(1),L=new s(0),b=V.clone();R.cmpn(1)>0&&V.cmpn(1)>0;){for(var B=0,re=1;!(R.words[0]&re)&&B<26;++B,re<<=1);if(B>0)for(R.iushrn(B);B-- >0;)H.isOdd()&&H.iadd(b),H.iushrn(1);for(var ne=0,te=1;!(V.words[0]&te)&&ne<26;++ne,te<<=1);if(ne>0)for(V.iushrn(ne);ne-- >0;)L.isOdd()&&L.iadd(b),L.iushrn(1);R.cmp(V)>=0?(R.isub(V),H.isub(L)):(V.isub(R),L.isub(H))}return(ae=0===R.cmpn(1)?H:L).cmpn(0)<0&&ae.iadd(I),ae},s.prototype.gcd=function(I){if(this.isZero())return I.abs();if(I.isZero())return this.abs();var R=this.clone(),V=I.clone();R.negative=0,V.negative=0;for(var H=0;R.isEven()&&V.isEven();H++)R.iushrn(1),V.iushrn(1);for(;;){for(;R.isEven();)R.iushrn(1);for(;V.isEven();)V.iushrn(1);var L=R.cmp(V);if(L<0){var b=R;R=V,V=b}else if(0===L||0===V.cmpn(1))break;R.isub(V)}return V.iushln(H)},s.prototype.invm=function(I){return this.egcd(I).a.umod(I)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(I){return this.words[0]&I},s.prototype.bincn=function(I){E("number"==typeof I);var R=I%26,V=(I-R)/26,H=1<>>26,B&=67108863,this.words[b]=B}return 0!==L&&(this.words[b]=L,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(I){var V,R=I<0;if(0!==this.negative&&!R)return-1;if(0===this.negative&&R)return 1;if(this._strip(),this.length>1)V=1;else{R&&(I=-I),E(I<=67108863,"Number is too big");var H=0|this.words[0];V=H===I?0:HI.length)return 1;if(this.length=0;V--){var H=0|this.words[V],L=0|I.words[V];if(H!==L){HL&&(R=1);break}}return R},s.prototype.gtn=function(I){return 1===this.cmpn(I)},s.prototype.gt=function(I){return 1===this.cmp(I)},s.prototype.gten=function(I){return this.cmpn(I)>=0},s.prototype.gte=function(I){return this.cmp(I)>=0},s.prototype.ltn=function(I){return-1===this.cmpn(I)},s.prototype.lt=function(I){return-1===this.cmp(I)},s.prototype.lten=function(I){return this.cmpn(I)<=0},s.prototype.lte=function(I){return this.cmp(I)<=0},s.prototype.eqn=function(I){return 0===this.cmpn(I)},s.prototype.eq=function(I){return 0===this.cmp(I)},s.red=function(I){return new o(I)},s.prototype.toRed=function(I){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),I.convertTo(this)._forceRed(I)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(I){return this.red=I,this},s.prototype.forceRed=function(I){return E(!this.red,"Already a number in reduction context"),this._forceRed(I)},s.prototype.redAdd=function(I){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,I)},s.prototype.redIAdd=function(I){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,I)},s.prototype.redSub=function(I){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,I)},s.prototype.redISub=function(I){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,I)},s.prototype.redShl=function(I){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,I)},s.prototype.redMul=function(I){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.mul(this,I)},s.prototype.redIMul=function(I){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,I),this.red.imul(this,I)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(I){return E(this.red&&!I.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,I)};var Y={k256:null,p224:null,p192:null,p25519:null};function G(w,I){this.name=w,this.p=new s(I,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function F(){G.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function j(){G.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Z(){G.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){G.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(w){if("string"==typeof w){var I=s._prime(w);this.m=I.p,this.prime=I}else E(w.gtn(1),"modulus must be greater than 1"),this.m=w,this.prime=null}function h(w){o.call(this,w),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}G.prototype._tmp=function(){var I=new s(null);return I.words=new Array(Math.ceil(this.n/13)),I},G.prototype.ireduce=function(I){var V,R=I;do{this.split(R,this.tmp),V=(R=(R=this.imulK(R)).iadd(this.tmp)).bitLength()}while(V>this.n);var H=V0?R.isub(this.p):void 0!==R.strip?R.strip():R._strip(),R},G.prototype.split=function(I,R){I.iushrn(this.n,0,R)},G.prototype.imulK=function(I){return I.imul(this.k)},M(F,G),F.prototype.split=function(I,R){for(var V=4194303,H=Math.min(I.length,9),L=0;L>>22,b=B}b>>>=22,I.words[L-10]=b,0===b&&I.length>10?I.length-=10:I.length-=9},F.prototype.imulK=function(I){I.words[I.length]=0,I.words[I.length+1]=0,I.length+=2;for(var R=0,V=0;V>>=26,I.words[V]=L,R=H}return 0!==R&&(I.words[I.length++]=R),I},s._prime=function(I){if(Y[I])return Y[I];var R;if("k256"===I)R=new F;else if("p224"===I)R=new j;else if("p192"===I)R=new Z;else{if("p25519"!==I)throw new Error("Unknown prime "+I);R=new T}return Y[I]=R,R},o.prototype._verify1=function(I){E(0===I.negative,"red works only with positives"),E(I.red,"red works only with red numbers")},o.prototype._verify2=function(I,R){E(0==(I.negative|R.negative),"red works only with positives"),E(I.red&&I.red===R.red,"red works only with red numbers")},o.prototype.imod=function(I){return this.prime?this.prime.ireduce(I)._forceRed(this):(p(I,I.umod(this.m)._forceRed(this)),I)},o.prototype.neg=function(I){return I.isZero()?I.clone():this.m.sub(I)._forceRed(this)},o.prototype.add=function(I,R){this._verify2(I,R);var V=I.add(R);return V.cmp(this.m)>=0&&V.isub(this.m),V._forceRed(this)},o.prototype.iadd=function(I,R){this._verify2(I,R);var V=I.iadd(R);return V.cmp(this.m)>=0&&V.isub(this.m),V},o.prototype.sub=function(I,R){this._verify2(I,R);var V=I.sub(R);return V.cmpn(0)<0&&V.iadd(this.m),V._forceRed(this)},o.prototype.isub=function(I,R){this._verify2(I,R);var V=I.isub(R);return V.cmpn(0)<0&&V.iadd(this.m),V},o.prototype.shl=function(I,R){return this._verify1(I),this.imod(I.ushln(R))},o.prototype.imul=function(I,R){return this._verify2(I,R),this.imod(I.imul(R))},o.prototype.mul=function(I,R){return this._verify2(I,R),this.imod(I.mul(R))},o.prototype.isqr=function(I){return this.imul(I,I.clone())},o.prototype.sqr=function(I){return this.mul(I,I)},o.prototype.sqrt=function(I){if(I.isZero())return I.clone();var R=this.m.andln(3);if(E(R%2==1),3===R){var V=this.m.add(new s(1)).iushrn(2);return this.pow(I,V)}for(var H=this.m.subn(1),L=0;!H.isZero()&&0===H.andln(1);)L++,H.iushrn(1);E(!H.isZero());var b=new s(1).toRed(this),B=b.redNeg(),re=this.m.subn(1).iushrn(1),ne=this.m.bitLength();for(ne=new s(2*ne*ne).toRed(this);0!==this.pow(ne,re).cmp(B);)ne.redIAdd(B);for(var te=this.pow(ne,H),ae=this.pow(I,H.addn(1).iushrn(1)),ge=this.pow(I,H),pe=L;0!==ge.cmp(b);){for(var we=ge,ce=0;0!==we.cmp(b);ce++)we=we.redSqr();E(ce=0;L--){for(var te=R.words[L],ae=ne-1;ae>=0;ae--){var ge=te>>ae&1;(b!==H[0]&&(b=this.sqr(b)),0!==ge||0!==B)?(B<<=1,B|=ge,(4===++re||0===L&&0===ae)&&(b=this.mul(b,H[B]),re=0,B=0)):re=0}ne=26}return b},o.prototype.convertTo=function(I){var R=I.umod(this.m);return R===I?R.clone():R},o.prototype.convertFrom=function(I){var R=I.clone();return R.red=null,R},s.mont=function(I){return new h(I)},M(h,o),h.prototype.convertTo=function(I){return this.imod(I.ushln(this.shift))},h.prototype.convertFrom=function(I){var R=this.imod(I.mul(this.rinv));return R.red=null,R},h.prototype.imul=function(I,R){if(I.isZero()||R.isZero())return I.words[0]=0,I.length=1,I;var V=I.imul(R),H=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=V.isub(H).iushrn(this.shift),b=L;return L.cmp(this.m)>=0?b=L.isub(this.m):L.cmpn(0)<0&&(b=L.iadd(this.m)),b._forceRed(this)},h.prototype.mul=function(I,R){if(I.isZero()||R.isZero())return new s(0)._forceRed(this);var V=I.mul(R),H=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=V.isub(H).iushrn(this.shift),b=L;return L.cmp(this.m)>=0?b=L.isub(this.m):L.cmpn(0)<0&&(b=L.iadd(this.m)),b._forceRed(this)},h.prototype.invm=function(I){return this.imod(I._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},21531:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(Z,T,o,h){void 0===h&&(h=o),Object.defineProperty(Z,h,{enumerable:!0,get:function(){return T[o]}})}:function(Z,T,o,h){void 0===h&&(h=o),Z[h]=T[o]}),v=this&&this.__setModuleDefault||(Object.create?function(Z,T){Object.defineProperty(Z,"default",{enumerable:!0,value:T})}:function(Z,T){Z.default=T}),E=this&&this.__decorate||function(Z,T,o,h){var R,w=arguments.length,I=w<3?T:null===h?h=Object.getOwnPropertyDescriptor(T,o):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)I=Reflect.decorate(Z,T,o,h);else for(var V=Z.length-1;V>=0;V--)(R=Z[V])&&(I=(w<3?R(I):w>3?R(T,o,I):R(T,o))||I);return w>3&&I&&Object.defineProperty(T,o,I),I},M=this&&this.__importStar||function(Z){if(Z&&Z.__esModule)return Z;var T={};if(null!=Z)for(var o in Z)"default"!==o&&Object.hasOwnProperty.call(Z,o)&&l(T,Z,o);return v(T,Z),T},s=this&&this.__importDefault||function(Z){return Z&&Z.__esModule?Z:{default:Z}};Object.defineProperty(n,"__esModule",{value:!0}),n.deserializeUnchecked=n.deserialize=n.serialize=n.BinaryReader=n.BinaryWriter=n.BorshError=n.baseDecode=n.baseEncode=void 0;const g=s(u(98538)),y=s(u(39076)),f=M(u(62949)),p=new("function"!=typeof TextDecoder?f.TextDecoder:TextDecoder)("utf-8",{fatal:!0});n.baseEncode=function m(Z){return"string"==typeof Z&&(Z=Buffer.from(Z,"utf8")),y.default.encode(Buffer.from(Z))},n.baseDecode=function S(Z){return Buffer.from(y.default.decode(Z))};const _=1024;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(".")}}n.BorshError=D;class P{constructor(){this.buf=Buffer.alloc(_),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(_)]))}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(Buffer.from(new g.default(T).toArray("le",8)))}writeU128(T){this.maybeResize(),this.writeBuffer(Buffer.from(new g.default(T).toArray("le",16)))}writeU256(T){this.maybeResize(),this.writeBuffer(Buffer.from(new g.default(T).toArray("le",32)))}writeU512(T){this.maybeResize(),this.writeBuffer(Buffer.from(new g.default(T).toArray("le",64)))}writeBuffer(T){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),T,Buffer.alloc(_)]),this.length+=T.length}writeString(T){this.maybeResize();const o=Buffer.from(T,"utf8");this.writeU32(o.length),this.writeBuffer(o)}writeFixedArray(T){this.writeBuffer(Buffer.from(T))}writeArray(T,o){this.maybeResize(),this.writeU32(T.length);for(const h of T)this.maybeResize(),o(h)}toArray(){return this.buf.subarray(0,this.length)}}function x(Z,T,o){const h=o.value;o.value=function(...w){try{return h.apply(this,w)}catch(I){if(I instanceof RangeError){const R=I.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(R)>=0)throw new D("Reached the end of buffer when deserializing")}throw I}}}n.BinaryWriter=P;class C{constructor(T){this.buf=T,this.offset=0}readU8(){const T=this.buf.readUInt8(this.offset);return this.offset+=1,T}readU16(){const T=this.buf.readUInt16LE(this.offset);return this.offset+=2,T}readU32(){const T=this.buf.readUInt32LE(this.offset);return this.offset+=4,T}readU64(){const T=this.readBuffer(8);return new g.default(T,"le")}readU128(){const T=this.readBuffer(16);return new g.default(T,"le")}readU256(){const T=this.readBuffer(32);return new g.default(T,"le")}readU512(){const T=this.readBuffer(64);return new g.default(T,"le")}readBuffer(T){if(this.offset+T>this.buf.length)throw new D(`Expected buffer length ${T} isn't within bounds`);const o=this.buf.slice(this.offset,this.offset+T);return this.offset+=T,o}readString(){const T=this.readU32(),o=this.readBuffer(T);try{return p.decode(o)}catch(h){throw new D(`Error decoding UTF-8 string: ${h}`)}}readFixedArray(T){return new Uint8Array(this.readBuffer(T))}readArray(T){const o=this.readU32(),h=Array();for(let w=0;w{k(Z,T,I,h[0],w)});else if(void 0!==h.kind)switch(h.kind){case"option":null==o?w.writeU8(0):(w.writeU8(1),k(Z,T,o,h.type,w));break;case"map":w.writeU32(o.size),o.forEach((I,R)=>{k(Z,T,R,h.key,w),k(Z,T,I,h.value,w)});break;default:throw new D(`FieldType ${h} unrecognized`)}else U(Z,o,w)}catch(I){throw I instanceof D&&I.addToFieldPath(T),I}}function U(Z,T,o){if("function"==typeof T.borshSerialize)return void T.borshSerialize(o);const h=Z.get(T.constructor);if(!h)throw new D(`Class ${T.constructor.name} is missing in schema`);if("struct"===h.kind)h.fields.map(([w,I])=>{k(Z,w,T[w],I,o)});else{if("enum"!==h.kind)throw new D(`Unexpected schema kind: ${h.kind} for ${T.constructor.name}`);{const w=T[h.field];for(let I=0;IY(Z,T,o[0],h))}if("option"===o.kind)return h.readU8()?Y(Z,T,o.type,h):void 0;if("map"===o.kind){let w=new Map;const I=h.readU32();for(let R=0;R=h.values.length)throw new D(`Enum index: ${w} is out of range`);const[I,R]=h.values[w];return new T({[I]:Y(Z,I,R,o)})}throw new D(`Unexpected schema kind: ${h.kind} for ${T.constructor.name}`)}E([x],C.prototype,"readU8",null),E([x],C.prototype,"readU16",null),E([x],C.prototype,"readU32",null),E([x],C.prototype,"readU64",null),E([x],C.prototype,"readU128",null),E([x],C.prototype,"readU256",null),E([x],C.prototype,"readU512",null),E([x],C.prototype,"readString",null),E([x],C.prototype,"readFixedArray",null),E([x],C.prototype,"readArray",null),n.BinaryReader=C,n.serialize=function z(Z,T,o=P){const h=new o;return U(Z,T,h),h.toArray()},n.deserialize=function F(Z,T,o,h=C){const w=new h(o),I=G(Z,T,w);if(w.offset{var l=u(21082);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},37950:(q,n,u)=>{var l;function v(M){this.rand=M}if(q.exports=function(s){return l||(l=new v(null)),l.generate(s)},q.exports.Rand=v,v.prototype.generate=function(s){return this._rand(s)},v.prototype._rand=function(s){if(this.rand.getBytes)return this.rand.getBytes(s);for(var g=new Uint8Array(s),y=0;y{var l=u(73502).Buffer;function v(f){l.isBuffer(f)||(f=l.from(f));for(var d=f.length/4|0,p=new Array(d),m=0;m>>24]^D[N>>>16&255]^P[k>>>8&255]^x[255&U]^d[j++],Y=_[N>>>24]^D[k>>>16&255]^P[U>>>8&255]^x[255&C]^d[j++],G=_[k>>>24]^D[U>>>16&255]^P[C>>>8&255]^x[255&N]^d[j++],F=_[U>>>24]^D[C>>>16&255]^P[N>>>8&255]^x[255&k]^d[j++],C=z,N=Y,k=G,U=F;return z=(m[C>>>24]<<24|m[N>>>16&255]<<16|m[k>>>8&255]<<8|m[255&U])^d[j++],Y=(m[N>>>24]<<24|m[k>>>16&255]<<16|m[U>>>8&255]<<8|m[255&C])^d[j++],G=(m[k>>>24]<<24|m[U>>>16&255]<<16|m[C>>>8&255]<<8|m[255&N])^d[j++],F=(m[U>>>24]<<24|m[C>>>16&255]<<16|m[N>>>8&255]<<8|m[255&k])^d[j++],[z>>>=0,Y>>>=0,G>>>=0,F>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],g=function(){for(var f=new Array(256),d=0;d<256;d++)f[d]=d<128?d<<1:d<<1^283;for(var p=[],m=[],S=[[],[],[],[]],_=[[],[],[],[]],D=0,P=0,x=0;x<256;++x){var C=P^P<<1^P<<2^P<<3^P<<4;C=C>>>8^255&C^99,p[D]=C,m[C]=D;var N=f[D],k=f[N],U=f[k],z=257*f[C]^16843008*C;S[0][D]=z<<24|z>>>8,S[1][D]=z<<16|z>>>16,S[2][D]=z<<8|z>>>24,S[3][D]=z,z=16843009*U^65537*k^257*N^16843008*D,_[0][C]=z<<24|z>>>8,_[1][C]=z<<16|z>>>16,_[2][C]=z<<8|z>>>24,_[3][C]=z,0===D?D=P=1:(D=N^f[f[f[U^N]]],P^=f[f[P]])}return{SBOX:p,INV_SBOX:m,SUB_MIX:S,INV_SUB_MIX:_}}();function y(f){this._key=v(f),this._reset()}y.blockSize=16,y.keySize=32,y.prototype.blockSize=y.blockSize,y.prototype.keySize=y.keySize,y.prototype._reset=function(){for(var f=this._key,d=f.length,p=d+6,m=4*(p+1),S=[],_=0;_>>24,D=g.SBOX[D>>>24]<<24|g.SBOX[D>>>16&255]<<16|g.SBOX[D>>>8&255]<<8|g.SBOX[255&D],D^=s[_/d|0]<<24):d>6&&_%d==4&&(D=g.SBOX[D>>>24]<<24|g.SBOX[D>>>16&255]<<16|g.SBOX[D>>>8&255]<<8|g.SBOX[255&D]),S[_]=S[_-d]^D}for(var P=[],x=0;x>>24]]^g.INV_SUB_MIX[1][g.SBOX[N>>>16&255]]^g.INV_SUB_MIX[2][g.SBOX[N>>>8&255]]^g.INV_SUB_MIX[3][g.SBOX[255&N]]}this._nRounds=p,this._keySchedule=S,this._invKeySchedule=P},y.prototype.encryptBlockRaw=function(f){return M(f=v(f),this._keySchedule,g.SUB_MIX,g.SBOX,this._nRounds)},y.prototype.encryptBlock=function(f){var d=this.encryptBlockRaw(f),p=l.allocUnsafe(16);return p.writeUInt32BE(d[0],0),p.writeUInt32BE(d[1],4),p.writeUInt32BE(d[2],8),p.writeUInt32BE(d[3],12),p},y.prototype.decryptBlock=function(f){var d=(f=v(f))[1];f[1]=f[3],f[3]=d;var p=M(f,this._invKeySchedule,g.INV_SUB_MIX,g.INV_SBOX,this._nRounds),m=l.allocUnsafe(16);return m.writeUInt32BE(p[0],0),m.writeUInt32BE(p[3],4),m.writeUInt32BE(p[2],8),m.writeUInt32BE(p[1],12),m},y.prototype.scrub=function(){E(this._keySchedule),E(this._invKeySchedule),E(this._key)},q.exports.AES=y},69382:(q,n,u)=>{var l=u(41899),v=u(73502).Buffer,E=u(61052),M=u(83894),s=u(68857),g=u(58789),y=u(7968);function p(m,S,_,D){E.call(this);var P=v.alloc(4,0);this._cipher=new l.AES(S);var x=this._cipher.encryptBlock(P);this._ghash=new s(x),_=function d(m,S,_){if(12===S.length)return m._finID=v.concat([S,v.from([0,0,0,1])]),v.concat([S,v.from([0,0,0,2])]);var D=new s(_),P=S.length,x=P%16;D.update(S),x&&(x=16-x,D.update(v.alloc(x,0))),D.update(v.alloc(8,0));var C=8*P,N=v.alloc(8);N.writeUIntBE(C,0,8),D.update(N),m._finID=D.state;var k=v.from(m._finID);return y(k),k}(this,_,x),this._prev=v.from(_),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=D,this._alen=0,this._len=0,this._mode=m,this._authTag=null,this._called=!1}M(p,E),p.prototype._update=function(m){if(!this._called&&this._alen){var S=16-this._alen%16;S<16&&(S=v.alloc(S,0),this._ghash.update(S))}this._called=!0;var _=this._mode.encrypt(this,m);return this._decrypt?this._ghash.update(m):this._ghash.update(_),this._len+=m.length,_},p.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var m=g(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function f(m,S){var _=0;m.length!==S.length&&_++;for(var D=Math.min(m.length,S.length),P=0;P{var l=u(96900),v=u(40856),E=u(44946);n.createCipher=n.Cipher=l.createCipher,n.createCipheriv=n.Cipheriv=l.createCipheriv,n.createDecipher=n.Decipher=v.createDecipher,n.createDecipheriv=n.Decipheriv=v.createDecipheriv,n.listCiphers=n.getCiphers=function M(){return Object.keys(E)}},40856:(q,n,u)=>{var l=u(69382),v=u(73502).Buffer,E=u(29171),M=u(38441),s=u(61052),g=u(41899),y=u(40347);function d(D,P,x){s.call(this),this._cache=new p,this._last=void 0,this._cipher=new g.AES(P),this._prev=v.from(x),this._mode=D,this._autopadding=!0}function p(){this.cache=v.allocUnsafe(0)}function S(D,P,x){var C=E[D.toLowerCase()];if(!C)throw new TypeError("invalid suite type");if("string"==typeof x&&(x=v.from(x)),"GCM"!==C.mode&&x.length!==C.iv)throw new TypeError("invalid iv length "+x.length);if("string"==typeof P&&(P=v.from(P)),P.length!==C.key/8)throw new TypeError("invalid key length "+P.length);return"stream"===C.type?new M(C.module,P,x,!0):"auth"===C.type?new l(C.module,P,x,!0):new d(C.module,P,x)}u(83894)(d,s),d.prototype._update=function(D){this._cache.add(D);for(var P,x,C=[];P=this._cache.get(this._autopadding);)x=this._mode.decrypt(this,P),C.push(x);return v.concat(C)},d.prototype._final=function(){var D=this._cache.flush();if(this._autopadding)return function m(D){var P=D[15];if(P<1||P>16)throw new Error("unable to decrypt data");for(var x=-1;++x16)return P=this.cache.slice(0,16),this.cache=this.cache.slice(16),P}else if(this.cache.length>=16)return P=this.cache.slice(0,16),this.cache=this.cache.slice(16),P;return null},p.prototype.flush=function(){if(this.cache.length)return this.cache},n.createDecipher=function _(D,P){var x=E[D.toLowerCase()];if(!x)throw new TypeError("invalid suite type");var C=y(P,!1,x.key,x.iv);return S(D,C.key,C.iv)},n.createDecipheriv=S},96900:(q,n,u)=>{var l=u(29171),v=u(69382),E=u(73502).Buffer,M=u(38441),s=u(61052),g=u(41899),y=u(40347);function d(D,P,x){s.call(this),this._cache=new m,this._cipher=new g.AES(P),this._prev=E.from(x),this._mode=D,this._autopadding=!0}u(83894)(d,s),d.prototype._update=function(D){this._cache.add(D);for(var P,x,C=[];P=this._cache.get();)x=this._mode.encrypt(this,P),C.push(x);return E.concat(C)};var p=E.alloc(16,16);function m(){this.cache=E.allocUnsafe(0)}function S(D,P,x){var C=l[D.toLowerCase()];if(!C)throw new TypeError("invalid suite type");if("string"==typeof P&&(P=E.from(P)),P.length!==C.key/8)throw new TypeError("invalid key length "+P.length);if("string"==typeof x&&(x=E.from(x)),"GCM"!==C.mode&&x.length!==C.iv)throw new TypeError("invalid iv length "+x.length);return"stream"===C.type?new M(C.module,P,x):"auth"===C.type?new v(C.module,P,x):new d(C.module,P,x)}d.prototype._final=function(){var D=this._cache.flush();if(this._autopadding)return D=this._mode.encrypt(this,D),this._cipher.scrub(),D;if(!D.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(D){return this._autopadding=!!D,this},m.prototype.add=function(D){this.cache=E.concat([this.cache,D])},m.prototype.get=function(){if(this.cache.length>15){var D=this.cache.slice(0,16);return this.cache=this.cache.slice(16),D}return null},m.prototype.flush=function(){for(var D=16-this.cache.length,P=E.allocUnsafe(D),x=-1;++x{var l=u(73502).Buffer,v=l.alloc(16,0);function M(g){var y=l.allocUnsafe(16);return y.writeUInt32BE(g[0]>>>0,0),y.writeUInt32BE(g[1]>>>0,4),y.writeUInt32BE(g[2]>>>0,8),y.writeUInt32BE(g[3]>>>0,12),y}function s(g){this.h=g,this.state=l.alloc(16,0),this.cache=l.allocUnsafe(0)}s.prototype.ghash=function(g){for(var y=-1;++y0;f--)g[f]=g[f]>>>1|(1&g[f-1])<<31;g[0]=g[0]>>>1,p&&(g[0]=g[0]^225<<24)}this.state=M(y)},s.prototype.update=function(g){this.cache=l.concat([this.cache,g]);for(var y;this.cache.length>=16;)y=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(y)},s.prototype.final=function(g,y){return this.cache.length&&this.ghash(l.concat([this.cache,v],16)),this.ghash(M([0,g,0,y])),this.state},q.exports=s},7968:q=>{q.exports=function n(u){for(var v,l=u.length;l--;){if(255!==(v=u.readUInt8(l))){v++,u.writeUInt8(v,l);break}u.writeUInt8(0,l)}}},64903:(q,n,u)=>{var l=u(58789);n.encrypt=function(v,E){var M=l(E,v._prev);return v._prev=v._cipher.encryptBlock(M),v._prev},n.decrypt=function(v,E){var M=v._prev;v._prev=E;var s=v._cipher.decryptBlock(E);return l(s,M)}},59885:(q,n,u)=>{var l=u(73502).Buffer,v=u(58789);function E(M,s,g){var y=s.length,f=v(s,M._cache);return M._cache=M._cache.slice(y),M._prev=l.concat([M._prev,g?s:f]),f}n.encrypt=function(M,s,g){for(var f,y=l.allocUnsafe(0);s.length;){if(0===M._cache.length&&(M._cache=M._cipher.encryptBlock(M._prev),M._prev=l.allocUnsafe(0)),!(M._cache.length<=s.length)){y=l.concat([y,E(M,s,g)]);break}f=M._cache.length,y=l.concat([y,E(M,s.slice(0,f),g)]),s=s.slice(f)}return y}},86531:(q,n,u)=>{var l=u(73502).Buffer;function v(M,s,g){for(var m,S,f=-1,p=0;++f<8;)m=s&1<<7-f?128:0,p+=(128&(S=M._cipher.encryptBlock(M._prev)[0]^m))>>f%8,M._prev=E(M._prev,g?m:S);return p}function E(M,s){var g=M.length,y=-1,f=l.allocUnsafe(M.length);for(M=l.concat([M,l.from([s])]);++y>7;return f}n.encrypt=function(M,s,g){for(var y=s.length,f=l.allocUnsafe(y),d=-1;++d{var l=u(73502).Buffer;function v(E,M,s){var y=E._cipher.encryptBlock(E._prev)[0]^M;return E._prev=l.concat([E._prev.slice(1),l.from([s?M:y])]),y}n.encrypt=function(E,M,s){for(var g=M.length,y=l.allocUnsafe(g),f=-1;++f{var l=u(58789),v=u(73502).Buffer,E=u(7968);function M(g){var y=g._cipher.encryptBlockRaw(g._prev);return E(g._prev),y}n.encrypt=function(g,y){var f=Math.ceil(y.length/16),d=g._cache.length;g._cache=v.concat([g._cache,v.allocUnsafe(16*f)]);for(var p=0;p{n.encrypt=function(u,l){return u._cipher.encryptBlock(l)},n.decrypt=function(u,l){return u._cipher.decryptBlock(l)}},29171:(q,n,u)=>{var l={ECB:u(21704),CBC:u(64903),CFB:u(59885),CFB8:u(21641),CFB1:u(86531),OFB:u(86816),CTR:u(11150),GCM:u(11150)},v=u(44946);for(var E in v)v[E].module=l[v[E].mode];q.exports=v},86816:(q,n,u)=>{var l=u(58789);function v(E){return E._prev=E._cipher.encryptBlock(E._prev),E._prev}n.encrypt=function(E,M){for(;E._cache.length{var l=u(41899),v=u(73502).Buffer,E=u(61052);function s(g,y,f,d){E.call(this),this._cipher=new l.AES(y),this._prev=v.from(f),this._cache=v.allocUnsafe(0),this._secCache=v.allocUnsafe(0),this._decrypt=d,this._mode=g}u(83894)(s,E),s.prototype._update=function(g){return this._mode.encrypt(this,g,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},q.exports=s},55255:(q,n,u)=>{var l=u(9004),v=u(84330),E=u(29171),M=u(51115),s=u(40347);function f(m,S,_){if(m=m.toLowerCase(),E[m])return v.createCipheriv(m,S,_);if(M[m])return new l({key:S,iv:_,mode:m});throw new TypeError("invalid suite type")}function d(m,S,_){if(m=m.toLowerCase(),E[m])return v.createDecipheriv(m,S,_);if(M[m])return new l({key:S,iv:_,mode:m,decrypt:!0});throw new TypeError("invalid suite type")}n.createCipher=n.Cipher=function g(m,S){var _,D;if(m=m.toLowerCase(),E[m])_=E[m].key,D=E[m].iv;else{if(!M[m])throw new TypeError("invalid suite type");_=8*M[m].key,D=M[m].iv}var P=s(S,!1,_,D);return f(m,P.key,P.iv)},n.createCipheriv=n.Cipheriv=f,n.createDecipher=n.Decipher=function y(m,S){var _,D;if(m=m.toLowerCase(),E[m])_=E[m].key,D=E[m].iv;else{if(!M[m])throw new TypeError("invalid suite type");_=8*M[m].key,D=M[m].iv}var P=s(S,!1,_,D);return d(m,P.key,P.iv)},n.createDecipheriv=n.Decipheriv=d,n.listCiphers=n.getCiphers=function p(){return Object.keys(M).concat(v.getCiphers())}},9004:(q,n,u)=>{var l=u(61052),v=u(73684),E=u(83894),M=u(73502).Buffer,s={"des-ede3-cbc":v.CBC.instantiate(v.EDE),"des-ede3":v.EDE,"des-ede-cbc":v.CBC.instantiate(v.EDE),"des-ede":v.EDE,"des-cbc":v.CBC.instantiate(v.DES),"des-ecb":v.DES};function g(y){l.call(this);var p,f=y.mode.toLowerCase(),d=s[f];p=y.decrypt?"decrypt":"encrypt";var m=y.key;M.isBuffer(m)||(m=M.from(m)),("des-ede"===f||"des-ede-cbc"===f)&&(m=M.concat([m,m.slice(0,8)]));var S=y.iv;M.isBuffer(S)||(S=M.from(S)),this._des=d.create({key:m,iv:S,type:p})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],q.exports=g,E(g,l),g.prototype._update=function(y){return M.from(this._des.update(y))},g.prototype._final=function(){return M.from(this._des.final())}},51115:(q,n)=>{n["des-ecb"]={key:8,iv:0},n["des-cbc"]=n.des={key:8,iv:8},n["des-ede3-cbc"]=n.des3={key:24,iv:8},n["des-ede3"]={key:24,iv:0},n["des-ede-cbc"]={key:16,iv:8},n["des-ede"]={key:16,iv:0}},6581:(q,n,u)=>{var l=u(77105),v=u(4427),E=u(94115),M=v("level-filesystem",{db:l});q.exports=E(M)},8466:(q,n,u)=>{var l=u(98538),v=u(53753);function M(g){var f,y=g.modulus.byteLength();do{f=new l(v(y))}while(f.cmp(g.modulus)>=0||!f.umod(g.prime1)||!f.umod(g.prime2));return f}function s(g,y){var f=function E(g){var y=M(g);return{blinder:y.toRed(l.mont(g.modulus)).redPow(new l(g.publicExponent)).fromRed(),unblinder:y.invm(g.modulus)}}(y),d=y.modulus.byteLength(),p=new l(g).mul(f.blinder).umod(y.modulus),m=p.toRed(l.mont(y.prime1)),S=p.toRed(l.mont(y.prime2)),_=y.coefficient,D=y.prime1,P=y.prime2,x=m.redPow(y.exponent1).fromRed(),C=S.redPow(y.exponent2).fromRed(),N=x.isub(C).imul(_).umod(D).imul(P);return C.iadd(N).imul(f.unblinder).umod(y.modulus).toArrayLike(Buffer,"be",d)}s.getr=M,q.exports=s},87793:(q,n,u)=>{"use strict";q.exports=u(75207)},3923:(q,n,u)=>{"use strict";var l=u(73502).Buffer,v=u(96386),E=u(31496),M=u(83894),s=u(79947),g=u(3946),y=u(75207);function f(S){E.Writable.call(this);var _=y[S];if(!_)throw new Error("Unknown message digest");this._hashType=_.hash,this._hash=v(_.hash),this._tag=_.id,this._signType=_.sign}function d(S){E.Writable.call(this);var _=y[S];if(!_)throw new Error("Unknown message digest");this._hash=v(_.hash),this._tag=_.id,this._signType=_.sign}function p(S){return new f(S)}function m(S){return new d(S)}Object.keys(y).forEach(function(S){y[S].id=l.from(y[S].id,"hex"),y[S.toLowerCase()]=y[S]}),M(f,E.Writable),f.prototype._write=function(_,D,P){this._hash.update(_),P()},f.prototype.update=function(_,D){return this._hash.update("string"==typeof _?l.from(_,D):_),this},f.prototype.sign=function(_,D){this.end();var P=this._hash.digest(),x=s(P,_,this._hashType,this._signType,this._tag);return D?x.toString(D):x},M(d,E.Writable),d.prototype._write=function(_,D,P){this._hash.update(_),P()},d.prototype.update=function(_,D){return this._hash.update("string"==typeof _?l.from(_,D):_),this},d.prototype.verify=function(_,D,P){var x="string"==typeof D?l.from(D,P):D;this.end();var C=this._hash.digest();return g(x,C,_,this._signType,this._tag)},q.exports={Sign:p,Verify:m,createSign:p,createVerify:m}},79947:(q,n,u)=>{"use strict";var l=u(73502).Buffer,v=u(74529),E=u(8466),M=u(57715).ec,s=u(98538),g=u(22772),y=u(1308),f=1;function _(N,k,U,z){if((N=l.from(N.toArray())).length0&&U.ishrn(z),U}function x(N,k,U){var z,Y;do{for(z=l.alloc(0);8*z.length{"use strict";var l=u(73502).Buffer,v=u(98538),E=u(57715).ec,M=u(22772),s=u(1308);function d(p,m){if(p.cmpn(0)<=0)throw new Error("invalid sig");if(p.cmp(m)>=0)throw new Error("invalid sig")}q.exports=function g(p,m,S,_,D){var P=M(S);if("ec"===P.type){if("ecdsa"!==_&&"ecdsa/rsa"!==_)throw new Error("wrong public key type");return function y(p,m,S){var _=s[S.data.algorithm.curve.join(".")];if(!_)throw new Error("unknown curve "+S.data.algorithm.curve.join("."));var D=new E(_),P=S.data.subjectPrivateKey.data;return D.verify(m,p,P)}(p,m,P)}if("dsa"===P.type){if("dsa"!==_)throw new Error("wrong public key type");return function f(p,m,S){var _=S.data.p,D=S.data.q,P=S.data.g,x=S.data.pub_key,C=M.signature.decode(p,"der"),N=C.s,k=C.r;d(N,D),d(k,D);var U=v.mont(_),z=N.invm(D),Y=P.toRed(U).redPow(new v(m).mul(z).mod(D)).fromRed().mul(x.toRed(U).redPow(k.mul(z).mod(D)).fromRed()).mod(_).mod(D);return 0===Y.cmp(k)}(p,m,P)}if("rsa"!==_&&"ecdsa/rsa"!==_)throw new Error("wrong public key type");m=l.concat([D,m]);for(var x=P.modulus.byteLength(),C=[1],N=0;m.length+C.length+2{var n={}.toString;q.exports=Array.isArray||function(u){return"[object Array]"==n.call(u)}},55986:(q,n,u)=>{"use strict";var l=u(95857),v=Object.keys||function(S){var _=[];for(var D in S)_.push(D);return _};q.exports=d;var E=Object.create(u(26156));E.inherits=u(83894);var M=u(14473),s=u(3766);E.inherits(d,M);for(var g=v(s.prototype),y=0;y{"use strict";q.exports=E;var l=u(3556),v=Object.create(u(26156));function E(M){if(!(this instanceof E))return new E(M);l.call(this,M)}v.inherits=u(83894),v.inherits(E,l),E.prototype._transform=function(M,s,g){g(null,M)}},14473:(q,n,u)=>{"use strict";var l=u(95857);q.exports=U;var E,v=u(32753);U.ReadableState=k;u(59069).EventEmitter;var s=function(ce,le){return ce.listeners(le).length},g=u(2228),y=u(26317).Buffer,f=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var m=Object.create(u(26156));m.inherits=u(83894);var S=u(56353),_=void 0;_=S&&S.debuglog?S.debuglog("stream"):function(){};var x,D=u(91296),P=u(34936);m.inherits(U,g);var C=["error","close","destroy","pause","resume"];function k(ce,le){ce=ce||{};var ue=le instanceof(E=E||u(55986));this.objectMode=!!ce.objectMode,ue&&(this.objectMode=this.objectMode||!!ce.readableObjectMode);var fe=ce.highWaterMark,he=ce.readableHighWaterMark,Ae=this.objectMode?16:16384;this.highWaterMark=fe||0===fe?fe:ue&&(he||0===he)?he:Ae,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(x||(x=u(13465).s),this.decoder=new x(ce.encoding),this.encoding=ce.encoding)}function U(ce){if(E=E||u(55986),!(this instanceof U))return new U(ce);this._readableState=new k(ce,this),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),g.call(this)}function z(ce,le,ue,fe,he){var Pe,Ae=ce._readableState;null===le?(Ae.reading=!1,function o(ce,le){if(!le.ended){if(le.decoder){var ue=le.decoder.end();ue&&ue.length&&(le.buffer.push(ue),le.length+=le.objectMode?1:ue.length)}le.ended=!0,h(ce)}}(ce,Ae)):(he||(Pe=function G(ce,le){var ue;return!function p(ce){return y.isBuffer(ce)||ce instanceof f}(le)&&"string"!=typeof le&&void 0!==le&&!ce.objectMode&&(ue=new TypeError("Invalid non-string/buffer chunk")),ue}(Ae,le)),Pe?ce.emit("error",Pe):Ae.objectMode||le&&le.length>0?("string"!=typeof le&&!Ae.objectMode&&Object.getPrototypeOf(le)!==y.prototype&&(le=function d(ce){return y.from(ce)}(le)),fe?Ae.endEmitted?ce.emit("error",new Error("stream.unshift() after end event")):Y(ce,Ae,le,!0):Ae.ended?ce.emit("error",new Error("stream.push() after EOF")):(Ae.reading=!1,Ae.decoder&&!ue?(le=Ae.decoder.write(le),Ae.objectMode||0!==le.length?Y(ce,Ae,le,!1):I(ce,Ae)):Y(ce,Ae,le,!1))):fe||(Ae.reading=!1));return function F(ce){return!ce.ended&&(ce.needReadable||ce.lengthle.highWaterMark&&(le.highWaterMark=function Z(ce){return ce>=j?ce=j:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=le.length?ce:le.ended?le.length:(le.needReadable=!0,0))}function h(ce){var le=ce._readableState;le.needReadable=!1,le.emittedReadable||(_("emitReadable",le.flowing),le.emittedReadable=!0,le.sync?l.nextTick(w,ce):w(ce))}function w(ce){_("emit readable"),ce.emit("readable"),B(ce)}function I(ce,le){le.readingMore||(le.readingMore=!0,l.nextTick(R,ce,le))}function R(ce,le){for(var ue=le.length;!le.reading&&!le.flowing&&!le.ended&&le.length=le.length?(ue=le.decoder?le.buffer.join(""):1===le.buffer.length?le.buffer.head.data:le.buffer.concat(le.length),le.buffer.clear()):ue=function ne(ce,le,ue){var fe;return ceAe.length?Ae.length:ce;if(Pe===Ae.length?he+=Ae:he+=Ae.slice(0,ce),0===(ce-=Pe)){Pe===Ae.length?(++fe,ue.next?le.head=ue.next:le.head=le.tail=null):(le.head=ue,ue.data=Ae.slice(Pe));break}++fe}return le.length-=fe,he}(ce,le):function ae(ce,le){var ue=y.allocUnsafe(ce),fe=le.head,he=1;for(fe.data.copy(ue),ce-=fe.data.length;fe=fe.next;){var Ae=fe.data,Pe=ce>Ae.length?Ae.length:ce;if(Ae.copy(ue,ue.length-ce,0,Pe),0===(ce-=Pe)){Pe===Ae.length?(++he,fe.next?le.head=fe.next:le.head=le.tail=null):(le.head=fe,fe.data=Ae.slice(Pe));break}++he}return le.length-=he,ue}(ce,le),fe}(ce,le.buffer,le.decoder),ue);var ue}function ge(ce){var le=ce._readableState;if(le.length>0)throw new Error('"endReadable()" called on non-empty stream');le.endEmitted||(le.ended=!0,l.nextTick(pe,le,ce))}function pe(ce,le){!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,le.readable=!1,le.emit("end"))}function we(ce,le){for(var ue=0,fe=ce.length;ue=le.highWaterMark||le.ended))return _("read: emitReadable",le.length,le.ended),0===le.length&&le.ended?ge(this):h(this),null;if(0===(ce=T(ce,le))&&le.ended)return 0===le.length&&ge(this),null;var he,fe=le.needReadable;return _("need readable",fe),(0===le.length||le.length-ce0?re(ce,le):null)?(le.needReadable=!0,ce=0):le.length-=ce,0===le.length&&(le.ended||(le.needReadable=!0),ue!==ce&&le.ended&&ge(this)),null!==he&&this.emit("data",he),he},U.prototype._read=function(ce){this.emit("error",new Error("_read() is not implemented"))},U.prototype.pipe=function(ce,le){var ue=this,fe=this._readableState;switch(fe.pipesCount){case 0:fe.pipes=ce;break;case 1:fe.pipes=[fe.pipes,ce];break;default:fe.pipes.push(ce)}fe.pipesCount+=1,_("pipe count=%d opts=%j",fe.pipesCount,le);var Ae=(!le||!1!==le.end)&&ce!==process.stdout&&ce!==process.stderr?Re:Ze;function Pe(ut,Me){_("onunpipe"),ut===ue&&Me&&!1===Me.hasUnpiped&&(Me.hasUnpiped=!0,function Ye(){_("cleanup"),ce.removeListener("close",ze),ce.removeListener("finish",Be),ce.removeListener("drain",ot),ce.removeListener("error",He),ce.removeListener("unpipe",Pe),ue.removeListener("end",Re),ue.removeListener("end",Ze),ue.removeListener("data",st),nt=!0,fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&ot()}())}function Re(){_("onend"),ce.end()}fe.endEmitted?l.nextTick(Ae):ue.once("end",Ae),ce.on("unpipe",Pe);var ot=function V(ce){return function(){var le=ce._readableState;_("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,0===le.awaitDrain&&s(ce,"data")&&(le.flowing=!0,B(ce))}}(ue);ce.on("drain",ot);var nt=!1;var It=!1;function st(ut){_("ondata"),It=!1,!1===ce.write(ut)&&!It&&((1===fe.pipesCount&&fe.pipes===ce||fe.pipesCount>1&&-1!==we(fe.pipes,ce))&&!nt&&(_("false write response, pause",fe.awaitDrain),fe.awaitDrain++,It=!0),ue.pause())}function He(ut){_("onerror",ut),Ze(),ce.removeListener("error",He),0===s(ce,"error")&&ce.emit("error",ut)}function ze(){ce.removeListener("finish",Be),Ze()}function Be(){_("onfinish"),ce.removeListener("close",ze),Ze()}function Ze(){_("unpipe"),ue.unpipe(ce)}return ue.on("data",st),function N(ce,le,ue){if("function"==typeof ce.prependListener)return ce.prependListener(le,ue);ce._events&&ce._events[le]?v(ce._events[le])?ce._events[le].unshift(ue):ce._events[le]=[ue,ce._events[le]]:ce.on(le,ue)}(ce,"error",He),ce.once("close",ze),ce.once("finish",Be),ce.emit("pipe",ue),fe.flowing||(_("pipe resume"),ue.resume()),ce},U.prototype.unpipe=function(ce){var le=this._readableState,ue={hasUnpiped:!1};if(0===le.pipesCount)return this;if(1===le.pipesCount)return ce&&ce!==le.pipes||(ce||(ce=le.pipes),le.pipes=null,le.pipesCount=0,le.flowing=!1,ce&&ce.emit("unpipe",this,ue)),this;if(!ce){var fe=le.pipes,he=le.pipesCount;le.pipes=null,le.pipesCount=0,le.flowing=!1;for(var Ae=0;Ae{"use strict";q.exports=M;var l=u(55986),v=Object.create(u(26156));function E(y,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,null!=f&&this.push(f),p(y);var m=this._readableState;m.reading=!1,(m.needReadable||m.length{"use strict";var l=u(95857);function E(L){var b=this;this.next=null,this.entry=null,this.finish=function(){!function H(L,b,B){var re=L.entry;for(L.entry=null;re;){var ne=re.callback;b.pendingcb--,ne(B),re=re.next}b.corkedRequestsFree.next=L}(b,L)}}q.exports=C;var s,M=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:l.nextTick;C.WritableState=P;var g=Object.create(u(26156));g.inherits=u(83894);var y={deprecate:u(23532)},f=u(2228),d=u(26317).Buffer,p=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var x,_=u(34936);function D(){}function P(L,b){s=s||u(55986),L=L||{};var B=b instanceof s;this.objectMode=!!L.objectMode,B&&(this.objectMode=this.objectMode||!!L.writableObjectMode);var re=L.highWaterMark,ne=L.writableHighWaterMark,te=this.objectMode?16:16384;this.highWaterMark=re||0===re?re:B&&(ne||0===ne)?ne:te,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ae=!1===L.decodeStrings;this.decodeStrings=!ae,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ge){!function j(L,b){var B=L._writableState,re=B.sync,ne=B.writecb;if(function F(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}(B),b)!function G(L,b,B,re,ne){--b.pendingcb,B?(l.nextTick(ne,re),l.nextTick(R,L,b),L._writableState.errorEmitted=!0,L.emit("error",re)):(ne(re),L._writableState.errorEmitted=!0,L.emit("error",re),R(L,b))}(L,B,re,b,ne);else{var te=h(B);!te&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&o(L,B),re?M(Z,L,B,te,ne):Z(L,B,te,ne)}}(b,ge)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}function C(L){if(s=s||u(55986),!(x.call(C,this)||this instanceof s))return new C(L);this._writableState=new P(L,this),this.writable=!0,L&&("function"==typeof L.write&&(this._write=L.write),"function"==typeof L.writev&&(this._writev=L.writev),"function"==typeof L.destroy&&(this._destroy=L.destroy),"function"==typeof L.final&&(this._final=L.final)),f.call(this)}function Y(L,b,B,re,ne,te,ae){b.writelen=re,b.writecb=ae,b.writing=!0,b.sync=!0,B?L._writev(ne,b.onwrite):L._write(ne,te,b.onwrite),b.sync=!1}function Z(L,b,B,re){B||function T(L,b){0===b.length&&b.needDrain&&(b.needDrain=!1,L.emit("drain"))}(L,b),b.pendingcb--,re(),R(L,b)}function o(L,b){b.bufferProcessing=!0;var B=b.bufferedRequest;if(L._writev&&B&&B.next){var re=b.bufferedRequestCount,ne=new Array(re),te=b.corkedRequestsFree;te.entry=B;for(var ae=0,ge=!0;B;)ne[ae]=B,B.isBuf||(ge=!1),B=B.next,ae+=1;ne.allBuffers=ge,Y(L,b,!0,b.length,ne,"",te.finish),b.pendingcb++,b.lastBufferedRequest=null,te.next?(b.corkedRequestsFree=te.next,te.next=null):b.corkedRequestsFree=new E(b),b.bufferedRequestCount=0}else{for(;B;){var pe=B.chunk,we=B.encoding,ce=B.callback;if(Y(L,b,!1,b.objectMode?1:pe.length,pe,we,ce),B=B.next,b.bufferedRequestCount--,b.writing)break}null===B&&(b.lastBufferedRequest=null)}b.bufferedRequest=B,b.bufferProcessing=!1}function h(L){return L.ending&&0===L.length&&null===L.bufferedRequest&&!L.finished&&!L.writing}function w(L,b){L._final(function(B){b.pendingcb--,B&&L.emit("error",B),b.prefinished=!0,L.emit("prefinish"),R(L,b)})}function R(L,b){var B=h(b);return B&&(function I(L,b){!b.prefinished&&!b.finalCalled&&("function"==typeof L._final?(b.pendingcb++,b.finalCalled=!0,l.nextTick(w,L,b)):(b.prefinished=!0,L.emit("prefinish")))}(L,b),0===b.pendingcb&&(b.finished=!0,L.emit("finish"))),B}g.inherits(C,f),P.prototype.getBuffer=function(){for(var b=this.bufferedRequest,B=[];b;)B.push(b),b=b.next;return B},function(){try{Object.defineProperty(P.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(L){return!!x.call(this,L)||this===C&&(L&&L._writableState instanceof P)}})):x=function(L){return L instanceof this},C.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},C.prototype.write=function(L,b,B){var re=this._writableState,ne=!1,te=!re.objectMode&&function S(L){return d.isBuffer(L)||L instanceof p}(L);return te&&!d.isBuffer(L)&&(L=function m(L){return d.from(L)}(L)),"function"==typeof b&&(B=b,b=null),te?b="buffer":b||(b=re.defaultEncoding),"function"!=typeof B&&(B=D),re.ended?function N(L,b){var B=new Error("write after end");L.emit("error",B),l.nextTick(b,B)}(this,B):(te||function k(L,b,B,re){var ne=!0,te=!1;return null===B?te=new TypeError("May not write null values to stream"):"string"!=typeof B&&void 0!==B&&!b.objectMode&&(te=new TypeError("Invalid non-string/buffer chunk")),te&&(L.emit("error",te),l.nextTick(re,te),ne=!1),ne}(this,re,L,B))&&(re.pendingcb++,ne=function z(L,b,B,re,ne,te){if(!B){var ae=function U(L,b,B){return!L.objectMode&&!1!==L.decodeStrings&&"string"==typeof b&&(b=d.from(b,B)),b}(b,re,ne);re!==ae&&(B=!0,ne="buffer",re=ae)}var ge=b.objectMode?1:re.length;b.length+=ge;var pe=b.length-1))throw new TypeError("Unknown encoding: "+b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(L,b,B){B(new Error("_write() is not implemented"))},C.prototype._writev=null,C.prototype.end=function(L,b,B){var re=this._writableState;"function"==typeof L?(B=L,L=null,b=null):"function"==typeof b&&(B=b,b=null),null!=L&&this.write(L,b),re.corked&&(re.corked=1,this.uncork()),re.ending||function V(L,b,B){b.ending=!0,R(L,b),B&&(b.finished?l.nextTick(B):L.once("finish",B)),b.ended=!0,L.writable=!1}(this,re,B)},Object.defineProperty(C.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),C.prototype.destroy=_.destroy,C.prototype._undestroy=_.undestroy,C.prototype._destroy=function(L,b){this.end(),b(L)}},91296:(q,n,u)=>{"use strict";var v=u(26317).Buffer,E=u(96419);function M(s,g,y){s.copy(g,y)}q.exports=function(){function s(){(function l(s,g){if(!(s instanceof g))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(y){var f={data:y,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length},s.prototype.unshift=function(y){var f={data:y,next:this.head};0===this.length&&(this.tail=f),this.head=f,++this.length},s.prototype.shift=function(){if(0!==this.length){var y=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,y}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(y){if(0===this.length)return"";for(var f=this.head,d=""+f.data;f=f.next;)d+=y+f.data;return d},s.prototype.concat=function(y){if(0===this.length)return v.alloc(0);for(var f=v.allocUnsafe(y>>>0),d=this.head,p=0;d;)M(d.data,f,p),p+=d.data.length,d=d.next;return f},s}(),E&&E.inspect&&E.inspect.custom&&(q.exports.prototype[E.inspect.custom]=function(){var s=E.inspect({length:this.length});return this.constructor.name+" "+s})},34936:(q,n,u)=>{"use strict";var l=u(95857);function M(s,g){s.emit("error",g)}q.exports={destroy:function v(s,g){var y=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(g?g(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.nextTick(M,this,s)):l.nextTick(M,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(p){!g&&p?y._writableState?y._writableState.errorEmitted||(y._writableState.errorEmitted=!0,l.nextTick(M,y,p)):l.nextTick(M,y,p):g&&g(p)}),this)},undestroy:function E(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},2228:(q,n,u)=>{q.exports=u(59069).EventEmitter},26317:(q,n,u)=>{var l=u(93172),v=l.Buffer;function E(s,g){for(var y in s)g[y]=s[y]}function M(s,g,y){return v(s,g,y)}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?q.exports=l:(E(l,n),n.Buffer=M),E(v,M),M.from=function(s,g,y){if("number"==typeof s)throw new TypeError("Argument must not be a number");return v(s,g,y)},M.alloc=function(s,g,y){if("number"!=typeof s)throw new TypeError("Argument must be a number");var f=v(s);return void 0!==g?"string"==typeof y?f.fill(g,y):f.fill(g):f.fill(0),f},M.allocUnsafe=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return v(s)},M.allocUnsafeSlow=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return l.SlowBuffer(s)}},31496:(q,n,u)=>{(n=q.exports=u(14473)).Stream=n,n.Readable=n,n.Writable=u(3766),n.Duplex=u(55986),n.Transform=u(3556),n.PassThrough=u(1576)},13465:(q,n,u)=>{"use strict";var l=u(99142).Buffer,v=l.isEncoding||function(N){switch((N=""+N)&&N.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(N){var k;switch(this.encoding=function M(N){var k=function E(N){if(!N)return"utf8";for(var k;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(k)return;N=(""+N).toLowerCase(),k=!0}}(N);if("string"!=typeof k&&(l.isEncoding===v||!v(N)))throw new Error("Unknown encoding: "+N);return k||N}(N),this.encoding){case"utf16le":this.text=S,this.end=_,k=4;break;case"utf8":this.fillLast=d,k=4;break;case"base64":this.text=D,this.end=P,k=3;break;default:return this.write=x,void(this.end=C)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(k)}function g(N){return N<=127?0:N>>5==6?2:N>>4==14?3:N>>3==30?4:N>>6==2?-1:-2}function d(N){var k=this.lastTotal-this.lastNeed,U=function f(N,k,U){if(128!=(192&k[0]))return N.lastNeed=0,"\ufffd";if(N.lastNeed>1&&k.length>1){if(128!=(192&k[1]))return N.lastNeed=1,"\ufffd";if(N.lastNeed>2&&k.length>2&&128!=(192&k[2]))return N.lastNeed=2,"\ufffd"}}(this,N);return void 0!==U?U:this.lastNeed<=N.length?(N.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(N.copy(this.lastChar,k,0,N.length),void(this.lastNeed-=N.length))}function S(N,k){if((N.length-k)%2==0){var U=N.toString("utf16le",k);if(U){var z=U.charCodeAt(U.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],U.slice(0,-1)}return U}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",k,N.length-1)}function _(N){var k=N&&N.length?this.write(N):"";if(this.lastNeed){var U=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,U)}return k}function D(N,k){var U=(N.length-k)%3;return 0===U?N.toString("base64",k):(this.lastNeed=3-U,this.lastTotal=3,1===U?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",k,N.length-U))}function P(N){var k=N&&N.length?this.write(N):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function x(N){return N.toString(this.encoding)}function C(N){return N&&N.length?this.write(N):""}n.s=s,s.prototype.write=function(N){if(0===N.length)return"";var k,U;if(this.lastNeed){if(void 0===(k=this.fillLast(N)))return"";U=this.lastNeed,this.lastNeed=0}else U=0;return U=0?(Y>0&&(N.lastNeed=Y-1),Y):--z=0?(Y>0&&(N.lastNeed=Y-2),Y):--z=0?(Y>0&&(2===Y?Y=0:N.lastNeed=Y-3),Y):0))}(this,N,k);if(!this.lastNeed)return N.toString("utf8",k);this.lastTotal=U;var z=N.length-(U-this.lastNeed);return N.copy(this.lastChar,0,z),N.toString("utf8",k,z)},s.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length}},99142:(q,n,u)=>{var l=u(93172),v=l.Buffer;function E(s,g){for(var y in s)g[y]=s[y]}function M(s,g,y){return v(s,g,y)}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?q.exports=l:(E(l,n),n.Buffer=M),E(v,M),M.from=function(s,g,y){if("number"==typeof s)throw new TypeError("Argument must not be a number");return v(s,g,y)},M.alloc=function(s,g,y){if("number"!=typeof s)throw new TypeError("Argument must be a number");var f=v(s);return void 0!==g?"string"==typeof y?f.fill(g,y):f.fill(g):f.fill(0),f},M.allocUnsafe=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return v(s)},M.allocUnsafeSlow=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return l.SlowBuffer(s)}},58905:q=>{var n=Object.prototype.toString,u=typeof Buffer<"u"&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;q.exports=function M(s,g,y){if("number"==typeof s)throw new TypeError('"value" argument must not be a number');return function l(s){return"ArrayBuffer"===n.call(s).slice(8,-1)}(s)?function v(s,g,y){g>>>=0;var f=s.byteLength-g;if(f<0)throw new RangeError("'offset' is out of bounds");if(void 0===y)y=f;else if((y>>>=0)>f)throw new RangeError("'length' is out of bounds");return u?Buffer.from(s.slice(g,g+y)):new Buffer(new Uint8Array(s.slice(g,g+y)))}(s,g,y):"string"==typeof s?function E(s,g){if(("string"!=typeof g||""===g)&&(g="utf8"),!Buffer.isEncoding(g))throw new TypeError('"encoding" must be a valid string encoding');return u?Buffer.from(s,g):new Buffer(s,g)}(s,g):u?Buffer.from(s):new Buffer(s)}},58789:q=>{q.exports=function(u,l){for(var v=Math.min(u.length,l.length),E=new Buffer(v),M=0;M{"use strict";const l=u(5343),v=u(48461),E="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=y,n.SlowBuffer=function N(Me){return+Me!=Me&&(Me=0),y.alloc(+Me)},n.INSPECT_MAX_BYTES=50;const M=2147483647;function g(Me){if(Me>M)throw new RangeError('The value "'+Me+'" is invalid for option "size"');const ve=new Uint8Array(Me);return Object.setPrototypeOf(ve,y.prototype),ve}function y(Me,ve,xe){if("number"==typeof Me){if("string"==typeof ve)throw new TypeError('The "string" argument must be of type string. Received type number');return m(Me)}return f(Me,ve,xe)}function f(Me,ve,xe){if("string"==typeof Me)return function S(Me,ve){if(("string"!=typeof ve||""===ve)&&(ve="utf8"),!y.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);const xe=0|k(Me,ve);let je=g(xe);const Ge=je.write(Me,ve);return Ge!==xe&&(je=je.slice(0,Ge)),je}(Me,ve);if(ArrayBuffer.isView(Me))return function D(Me){if(He(Me,Uint8Array)){const ve=new Uint8Array(Me);return P(ve.buffer,ve.byteOffset,ve.byteLength)}return _(Me)}(Me);if(null==Me)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me);if(He(Me,ArrayBuffer)||Me&&He(Me.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(He(Me,SharedArrayBuffer)||Me&&He(Me.buffer,SharedArrayBuffer)))return P(Me,ve,xe);if("number"==typeof Me)throw new TypeError('The "value" argument must not be of type number. Received type number');const je=Me.valueOf&&Me.valueOf();if(null!=je&&je!==Me)return y.from(je,ve,xe);const Ge=function x(Me){if(y.isBuffer(Me)){const ve=0|C(Me.length),xe=g(ve);return 0===xe.length||Me.copy(xe,0,0,ve),xe}if(void 0!==Me.length)return"number"!=typeof Me.length||ze(Me.length)?g(0):_(Me);if("Buffer"===Me.type&&Array.isArray(Me.data))return _(Me.data)}(Me);if(Ge)return Ge;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Me[Symbol.toPrimitive])return y.from(Me[Symbol.toPrimitive]("string"),ve,xe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Me)}function d(Me){if("number"!=typeof Me)throw new TypeError('"size" argument must be of type number');if(Me<0)throw new RangeError('The value "'+Me+'" is invalid for option "size"')}function m(Me){return d(Me),g(Me<0?0:0|C(Me))}function _(Me){const ve=Me.length<0?0:0|C(Me.length),xe=g(ve);for(let je=0;je=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|Me}function k(Me,ve){if(y.isBuffer(Me))return Me.length;if(ArrayBuffer.isView(Me)||He(Me,ArrayBuffer))return Me.byteLength;if("string"!=typeof Me)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Me);const xe=Me.length,je=arguments.length>2&&!0===arguments[2];if(!je&&0===xe)return 0;let Ge=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return xe;case"utf8":case"utf-8":return ot(Me).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*xe;case"hex":return xe>>>1;case"base64":return It(Me).length;default:if(Ge)return je?-1:ot(Me).length;ve=(""+ve).toLowerCase(),Ge=!0}}function U(Me,ve,xe){let je=!1;if((void 0===ve||ve<0)&&(ve=0),ve>this.length||((void 0===xe||xe>this.length)&&(xe=this.length),xe<=0)||(xe>>>=0)<=(ve>>>=0))return"";for(Me||(Me="utf8");;)switch(Me){case"hex":return L(this,ve,xe);case"utf8":case"utf-8":return w(this,ve,xe);case"ascii":return V(this,ve,xe);case"latin1":case"binary":return H(this,ve,xe);case"base64":return h(this,ve,xe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,ve,xe);default:if(je)throw new TypeError("Unknown encoding: "+Me);Me=(Me+"").toLowerCase(),je=!0}}function z(Me,ve,xe){const je=Me[ve];Me[ve]=Me[xe],Me[xe]=je}function Y(Me,ve,xe,je,Ge){if(0===Me.length)return-1;if("string"==typeof xe?(je=xe,xe=0):xe>2147483647?xe=2147483647:xe<-2147483648&&(xe=-2147483648),ze(xe=+xe)&&(xe=Ge?0:Me.length-1),xe<0&&(xe=Me.length+xe),xe>=Me.length){if(Ge)return-1;xe=Me.length-1}else if(xe<0){if(!Ge)return-1;xe=0}if("string"==typeof ve&&(ve=y.from(ve,je)),y.isBuffer(ve))return 0===ve.length?-1:G(Me,ve,xe,je,Ge);if("number"==typeof ve)return ve&=255,"function"==typeof Uint8Array.prototype.indexOf?Ge?Uint8Array.prototype.indexOf.call(Me,ve,xe):Uint8Array.prototype.lastIndexOf.call(Me,ve,xe):G(Me,[ve],xe,je,Ge);throw new TypeError("val must be string, number or Buffer")}function G(Me,ve,xe,je,Ge){let qe,Qe=1,ye=Me.length,ke=ve.length;if(void 0!==je&&("ucs2"===(je=String(je).toLowerCase())||"ucs-2"===je||"utf16le"===je||"utf-16le"===je)){if(Me.length<2||ve.length<2)return-1;Qe=2,ye/=2,ke/=2,xe/=2}function et(at,bt){return 1===Qe?at[bt]:at.readUInt16BE(bt*Qe)}if(Ge){let at=-1;for(qe=xe;qeye&&(xe=ye-ke),qe=xe;qe>=0;qe--){let at=!0;for(let bt=0;btGe&&(je=Ge):je=Ge;const Qe=ve.length;let ye;for(je>Qe/2&&(je=Qe/2),ye=0;ye>8,Ge=xe%256,Qe.push(Ge),Qe.push(je);return Qe}(ve,Me.length-xe),Me,xe,je)}function h(Me,ve,xe){return 0===ve&&xe===Me.length?l.fromByteArray(Me):l.fromByteArray(Me.slice(ve,xe))}function w(Me,ve,xe){xe=Math.min(Me.length,xe);const je=[];let Ge=ve;for(;Ge239?4:Qe>223?3:Qe>191?2:1;if(Ge+ke<=xe){let et,qe,at,bt;switch(ke){case 1:Qe<128&&(ye=Qe);break;case 2:et=Me[Ge+1],128==(192&et)&&(bt=(31&Qe)<<6|63&et,bt>127&&(ye=bt));break;case 3:et=Me[Ge+1],qe=Me[Ge+2],128==(192&et)&&128==(192&qe)&&(bt=(15&Qe)<<12|(63&et)<<6|63&qe,bt>2047&&(bt<55296||bt>57343)&&(ye=bt));break;case 4:et=Me[Ge+1],qe=Me[Ge+2],at=Me[Ge+3],128==(192&et)&&128==(192&qe)&&128==(192&at)&&(bt=(15&Qe)<<18|(63&et)<<12|(63&qe)<<6|63&at,bt>65535&&bt<1114112&&(ye=bt))}}null===ye?(ye=65533,ke=1):ye>65535&&(ye-=65536,je.push(ye>>>10&1023|55296),ye=56320|1023&ye),je.push(ye),Ge+=ke}return function R(Me){const ve=Me.length;if(ve<=I)return String.fromCharCode.apply(String,Me);let xe="",je=0;for(;jeGe.length?(y.isBuffer(ye)||(ye=y.from(ye)),ye.copy(Ge,Qe)):Uint8Array.prototype.set.call(Ge,ye,Qe);else{if(!y.isBuffer(ye))throw new TypeError('"list" argument must be an Array of Buffers');ye.copy(Ge,Qe)}Qe+=ye.length}return Ge},y.byteLength=k,y.prototype._isBuffer=!0,y.prototype.swap16=function(){const ve=this.length;if(ve%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let xe=0;xexe&&(ve+=" ... "),""},E&&(y.prototype[E]=y.prototype.inspect),y.prototype.compare=function(ve,xe,je,Ge,Qe){if(He(ve,Uint8Array)&&(ve=y.from(ve,ve.offset,ve.byteLength)),!y.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(void 0===xe&&(xe=0),void 0===je&&(je=ve?ve.length:0),void 0===Ge&&(Ge=0),void 0===Qe&&(Qe=this.length),xe<0||je>ve.length||Ge<0||Qe>this.length)throw new RangeError("out of range index");if(Ge>=Qe&&xe>=je)return 0;if(Ge>=Qe)return-1;if(xe>=je)return 1;if(this===ve)return 0;let ye=(Qe>>>=0)-(Ge>>>=0),ke=(je>>>=0)-(xe>>>=0);const et=Math.min(ye,ke),qe=this.slice(Ge,Qe),at=ve.slice(xe,je);for(let bt=0;bt>>=0,isFinite(je)?(je>>>=0,void 0===Ge&&(Ge="utf8")):(Ge=je,je=void 0)}const Qe=this.length-xe;if((void 0===je||je>Qe)&&(je=Qe),ve.length>0&&(je<0||xe<0)||xe>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ge||(Ge="utf8");let ye=!1;for(;;)switch(Ge){case"hex":return F(this,ve,xe,je);case"utf8":case"utf-8":return j(this,ve,xe,je);case"ascii":case"latin1":case"binary":return Z(this,ve,xe,je);case"base64":return T(this,ve,xe,je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,ve,xe,je);default:if(ye)throw new TypeError("Unknown encoding: "+Ge);Ge=(""+Ge).toLowerCase(),ye=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const I=4096;function V(Me,ve,xe){let je="";xe=Math.min(Me.length,xe);for(let Ge=ve;Geje)&&(xe=je);let Ge="";for(let Qe=ve;Qexe)throw new RangeError("Trying to access beyond buffer length")}function re(Me,ve,xe,je,Ge,Qe){if(!y.isBuffer(Me))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Ge||veMe.length)throw new RangeError("Index out of range")}function ne(Me,ve,xe,je,Ge){fe(ve,je,Ge,Me,xe,7);let Qe=Number(ve&BigInt(4294967295));Me[xe++]=Qe,Qe>>=8,Me[xe++]=Qe,Qe>>=8,Me[xe++]=Qe,Qe>>=8,Me[xe++]=Qe;let ye=Number(ve>>BigInt(32)&BigInt(4294967295));return Me[xe++]=ye,ye>>=8,Me[xe++]=ye,ye>>=8,Me[xe++]=ye,ye>>=8,Me[xe++]=ye,xe}function te(Me,ve,xe,je,Ge){fe(ve,je,Ge,Me,xe,7);let Qe=Number(ve&BigInt(4294967295));Me[xe+7]=Qe,Qe>>=8,Me[xe+6]=Qe,Qe>>=8,Me[xe+5]=Qe,Qe>>=8,Me[xe+4]=Qe;let ye=Number(ve>>BigInt(32)&BigInt(4294967295));return Me[xe+3]=ye,ye>>=8,Me[xe+2]=ye,ye>>=8,Me[xe+1]=ye,ye>>=8,Me[xe]=ye,xe+8}function ae(Me,ve,xe,je,Ge,Qe){if(xe+je>Me.length)throw new RangeError("Index out of range");if(xe<0)throw new RangeError("Index out of range")}function ge(Me,ve,xe,je,Ge){return ve=+ve,xe>>>=0,Ge||ae(Me,0,xe,4),v.write(Me,ve,xe,je,23,4),xe+4}function pe(Me,ve,xe,je,Ge){return ve=+ve,xe>>>=0,Ge||ae(Me,0,xe,8),v.write(Me,ve,xe,je,52,8),xe+8}y.prototype.slice=function(ve,xe){const je=this.length;(ve=~~ve)<0?(ve+=je)<0&&(ve=0):ve>je&&(ve=je),(xe=void 0===xe?je:~~xe)<0?(xe+=je)<0&&(xe=0):xe>je&&(xe=je),xe>>=0,xe>>>=0,je||B(ve,xe,this.length);let Ge=this[ve],Qe=1,ye=0;for(;++ye>>=0,xe>>>=0,je||B(ve,xe,this.length);let Ge=this[ve+--xe],Qe=1;for(;xe>0&&(Qe*=256);)Ge+=this[ve+--xe]*Qe;return Ge},y.prototype.readUint8=y.prototype.readUInt8=function(ve,xe){return ve>>>=0,xe||B(ve,1,this.length),this[ve]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(ve,xe){return ve>>>=0,xe||B(ve,2,this.length),this[ve]|this[ve+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(ve,xe){return ve>>>=0,xe||B(ve,2,this.length),this[ve]<<8|this[ve+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(ve,xe){return ve>>>=0,xe||B(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+16777216*this[ve+3]},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(ve,xe){return ve>>>=0,xe||B(ve,4,this.length),16777216*this[ve]+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},y.prototype.readBigUInt64LE=Ze(function(ve){he(ve>>>=0,"offset");const xe=this[ve],je=this[ve+7];(void 0===xe||void 0===je)&&Ae(ve,this.length-8);const Ge=xe+256*this[++ve]+65536*this[++ve]+this[++ve]*2**24,Qe=this[++ve]+256*this[++ve]+65536*this[++ve]+je*2**24;return BigInt(Ge)+(BigInt(Qe)<>>=0,"offset");const xe=this[ve],je=this[ve+7];(void 0===xe||void 0===je)&&Ae(ve,this.length-8);const Ge=xe*2**24+65536*this[++ve]+256*this[++ve]+this[++ve],Qe=this[++ve]*2**24+65536*this[++ve]+256*this[++ve]+je;return(BigInt(Ge)<>>=0,xe>>>=0,je||B(ve,xe,this.length);let Ge=this[ve],Qe=1,ye=0;for(;++ye=Qe&&(Ge-=Math.pow(2,8*xe)),Ge},y.prototype.readIntBE=function(ve,xe,je){ve>>>=0,xe>>>=0,je||B(ve,xe,this.length);let Ge=xe,Qe=1,ye=this[ve+--Ge];for(;Ge>0&&(Qe*=256);)ye+=this[ve+--Ge]*Qe;return Qe*=128,ye>=Qe&&(ye-=Math.pow(2,8*xe)),ye},y.prototype.readInt8=function(ve,xe){return ve>>>=0,xe||B(ve,1,this.length),128&this[ve]?-1*(255-this[ve]+1):this[ve]},y.prototype.readInt16LE=function(ve,xe){ve>>>=0,xe||B(ve,2,this.length);const je=this[ve]|this[ve+1]<<8;return 32768&je?4294901760|je:je},y.prototype.readInt16BE=function(ve,xe){ve>>>=0,xe||B(ve,2,this.length);const je=this[ve+1]|this[ve]<<8;return 32768&je?4294901760|je:je},y.prototype.readInt32LE=function(ve,xe){return ve>>>=0,xe||B(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},y.prototype.readInt32BE=function(ve,xe){return ve>>>=0,xe||B(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},y.prototype.readBigInt64LE=Ze(function(ve){he(ve>>>=0,"offset");const xe=this[ve],je=this[ve+7];(void 0===xe||void 0===je)&&Ae(ve,this.length-8);const Ge=this[ve+4]+256*this[ve+5]+65536*this[ve+6]+(je<<24);return(BigInt(Ge)<>>=0,"offset");const xe=this[ve],je=this[ve+7];(void 0===xe||void 0===je)&&Ae(ve,this.length-8);const Ge=(xe<<24)+65536*this[++ve]+256*this[++ve]+this[++ve];return(BigInt(Ge)<>>=0,xe||B(ve,4,this.length),v.read(this,ve,!0,23,4)},y.prototype.readFloatBE=function(ve,xe){return ve>>>=0,xe||B(ve,4,this.length),v.read(this,ve,!1,23,4)},y.prototype.readDoubleLE=function(ve,xe){return ve>>>=0,xe||B(ve,8,this.length),v.read(this,ve,!0,52,8)},y.prototype.readDoubleBE=function(ve,xe){return ve>>>=0,xe||B(ve,8,this.length),v.read(this,ve,!1,52,8)},y.prototype.writeUintLE=y.prototype.writeUIntLE=function(ve,xe,je,Ge){if(ve=+ve,xe>>>=0,je>>>=0,!Ge){re(this,ve,xe,je,Math.pow(2,8*je)-1,0)}let Qe=1,ye=0;for(this[xe]=255&ve;++ye>>=0,je>>>=0,!Ge){re(this,ve,xe,je,Math.pow(2,8*je)-1,0)}let Qe=je-1,ye=1;for(this[xe+Qe]=255&ve;--Qe>=0&&(ye*=256);)this[xe+Qe]=ve/ye&255;return xe+je},y.prototype.writeUint8=y.prototype.writeUInt8=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,1,255,0),this[xe]=255&ve,xe+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,2,65535,0),this[xe]=255&ve,this[xe+1]=ve>>>8,xe+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,2,65535,0),this[xe]=ve>>>8,this[xe+1]=255&ve,xe+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,4,4294967295,0),this[xe+3]=ve>>>24,this[xe+2]=ve>>>16,this[xe+1]=ve>>>8,this[xe]=255&ve,xe+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,4,4294967295,0),this[xe]=ve>>>24,this[xe+1]=ve>>>16,this[xe+2]=ve>>>8,this[xe+3]=255&ve,xe+4},y.prototype.writeBigUInt64LE=Ze(function(ve,xe=0){return ne(this,ve,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeBigUInt64BE=Ze(function(ve,xe=0){return te(this,ve,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeIntLE=function(ve,xe,je,Ge){if(ve=+ve,xe>>>=0,!Ge){const et=Math.pow(2,8*je-1);re(this,ve,xe,je,et-1,-et)}let Qe=0,ye=1,ke=0;for(this[xe]=255&ve;++Qe>0)-ke&255;return xe+je},y.prototype.writeIntBE=function(ve,xe,je,Ge){if(ve=+ve,xe>>>=0,!Ge){const et=Math.pow(2,8*je-1);re(this,ve,xe,je,et-1,-et)}let Qe=je-1,ye=1,ke=0;for(this[xe+Qe]=255&ve;--Qe>=0&&(ye*=256);)ve<0&&0===ke&&0!==this[xe+Qe+1]&&(ke=1),this[xe+Qe]=(ve/ye>>0)-ke&255;return xe+je},y.prototype.writeInt8=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,1,127,-128),ve<0&&(ve=255+ve+1),this[xe]=255&ve,xe+1},y.prototype.writeInt16LE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,2,32767,-32768),this[xe]=255&ve,this[xe+1]=ve>>>8,xe+2},y.prototype.writeInt16BE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,2,32767,-32768),this[xe]=ve>>>8,this[xe+1]=255&ve,xe+2},y.prototype.writeInt32LE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,4,2147483647,-2147483648),this[xe]=255&ve,this[xe+1]=ve>>>8,this[xe+2]=ve>>>16,this[xe+3]=ve>>>24,xe+4},y.prototype.writeInt32BE=function(ve,xe,je){return ve=+ve,xe>>>=0,je||re(this,ve,xe,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[xe]=ve>>>24,this[xe+1]=ve>>>16,this[xe+2]=ve>>>8,this[xe+3]=255&ve,xe+4},y.prototype.writeBigInt64LE=Ze(function(ve,xe=0){return ne(this,ve,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeBigInt64BE=Ze(function(ve,xe=0){return te(this,ve,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeFloatLE=function(ve,xe,je){return ge(this,ve,xe,!0,je)},y.prototype.writeFloatBE=function(ve,xe,je){return ge(this,ve,xe,!1,je)},y.prototype.writeDoubleLE=function(ve,xe,je){return pe(this,ve,xe,!0,je)},y.prototype.writeDoubleBE=function(ve,xe,je){return pe(this,ve,xe,!1,je)},y.prototype.copy=function(ve,xe,je,Ge){if(!y.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(je||(je=0),!Ge&&0!==Ge&&(Ge=this.length),xe>=ve.length&&(xe=ve.length),xe||(xe=0),Ge>0&&Ge=this.length)throw new RangeError("Index out of range");if(Ge<0)throw new RangeError("sourceEnd out of bounds");Ge>this.length&&(Ge=this.length),ve.length-xe>>=0,je=void 0===je?this.length:je>>>0,ve||(ve=0),"number"==typeof ve)for(Qe=xe;Qe=je+4;xe-=3)ve=`_${Me.slice(xe-3,xe)}${ve}`;return`${Me.slice(0,xe)}${ve}`}function fe(Me,ve,xe,je,Ge,Qe){if(Me>xe||Me3?0===ve||ve===BigInt(0)?`>= 0${ye} and < 2${ye} ** ${8*(Qe+1)}${ye}`:`>= -(2${ye} ** ${8*(Qe+1)-1}${ye}) and < 2 ** ${8*(Qe+1)-1}${ye}`:`>= ${ve}${ye} and <= ${xe}${ye}`,new we.ERR_OUT_OF_RANGE("value",ke,Me)}!function ue(Me,ve,xe){he(ve,"offset"),(void 0===Me[ve]||void 0===Me[ve+xe])&&Ae(ve,Me.length-(xe+1))}(je,Ge,Qe)}function he(Me,ve){if("number"!=typeof Me)throw new we.ERR_INVALID_ARG_TYPE(ve,"number",Me)}function Ae(Me,ve,xe){throw Math.floor(Me)!==Me?(he(Me,xe),new we.ERR_OUT_OF_RANGE(xe||"offset","an integer",Me)):ve<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE(xe||"offset",`>= ${xe?1:0} and <= ${ve}`,Me)}ce("ERR_BUFFER_OUT_OF_BOUNDS",function(Me){return Me?`${Me} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ce("ERR_INVALID_ARG_TYPE",function(Me,ve){return`The "${Me}" argument must be of type number. Received type ${typeof ve}`},TypeError),ce("ERR_OUT_OF_RANGE",function(Me,ve,xe){let je=`The value of "${Me}" is out of range.`,Ge=xe;return Number.isInteger(xe)&&Math.abs(xe)>2**32?Ge=le(String(xe)):"bigint"==typeof xe&&(Ge=String(xe),(xe>BigInt(2)**BigInt(32)||xe<-(BigInt(2)**BigInt(32)))&&(Ge=le(Ge)),Ge+="n"),je+=` It must be ${ve}. Received ${Ge}`,je},RangeError);const Pe=/[^+/0-9A-Za-z-_]/g;function ot(Me,ve){let xe;ve=ve||1/0;const je=Me.length;let Ge=null;const Qe=[];for(let ye=0;ye55295&&xe<57344){if(!Ge){if(xe>56319){(ve-=3)>-1&&Qe.push(239,191,189);continue}if(ye+1===je){(ve-=3)>-1&&Qe.push(239,191,189);continue}Ge=xe;continue}if(xe<56320){(ve-=3)>-1&&Qe.push(239,191,189),Ge=xe;continue}xe=65536+(Ge-55296<<10|xe-56320)}else Ge&&(ve-=3)>-1&&Qe.push(239,191,189);if(Ge=null,xe<128){if((ve-=1)<0)break;Qe.push(xe)}else if(xe<2048){if((ve-=2)<0)break;Qe.push(xe>>6|192,63&xe|128)}else if(xe<65536){if((ve-=3)<0)break;Qe.push(xe>>12|224,xe>>6&63|128,63&xe|128)}else{if(!(xe<1114112))throw new Error("Invalid code point");if((ve-=4)<0)break;Qe.push(xe>>18|240,xe>>12&63|128,xe>>6&63|128,63&xe|128)}}return Qe}function It(Me){return l.toByteArray(function Re(Me){if((Me=(Me=Me.split("=")[0]).trim().replace(Pe,"")).length<2)return"";for(;Me.length%4!=0;)Me+="=";return Me}(Me))}function st(Me,ve,xe,je){let Ge;for(Ge=0;Ge=ve.length||Ge>=Me.length);++Ge)ve[Ge+xe]=Me[Ge];return Ge}function He(Me,ve){return Me instanceof ve||null!=Me&&null!=Me.constructor&&null!=Me.constructor.name&&Me.constructor.name===ve.name}function ze(Me){return Me!=Me}const Be=function(){const Me="0123456789abcdef",ve=new Array(256);for(let xe=0;xe<16;++xe){const je=16*xe;for(let Ge=0;Ge<16;++Ge)ve[je+Ge]=Me[xe]+Me[Ge]}return ve}();function Ze(Me){return typeof BigInt>"u"?ut:Me}function ut(){throw new Error("BigInt not supported")}},94525:q=>{q.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},75834:(q,n,u)=>{"use strict";var l=u(95203),v=u(55685),E=v(l("String.prototype.indexOf"));q.exports=function(s,g){var y=l(s,!!g);return"function"==typeof y&&E(s,".prototype.")>-1?v(y):y}},55685:(q,n,u)=>{"use strict";var l=u(84444),v=u(95203),E=u(9511),M=u(92844),s=v("%Function.prototype.apply%"),g=v("%Function.prototype.call%"),y=v("%Reflect.apply%",!0)||l.call(g,s),f=u(33907),d=v("%Math.max%");q.exports=function(S){if("function"!=typeof S)throw new M("a function is required");var _=y(l,g,arguments);return E(_,1+d(0,S.length-(arguments.length-1)),!0)};var p=function(){return y(l,s,arguments)};f?f(q.exports,"apply",{value:p}):q.exports.apply=p},53495:(q,n,u)=>{u(37131).check("es5")},37131:(q,n,u)=>{u(58690),q.exports=u(21034)},27247:q=>{var n=function(){this.tests={},this.cache={}};n.prototype={constructor:n,define:function(u,l){if("string"!=typeof u||!(l instanceof Function))throw new Error("Invalid capability definition.");if(this.tests[u])throw new Error('Duplicated capability definition by "'+u+'".');this.tests[u]=l},check:function(u){if(!this.test(u))throw new Error('The current environment does not support "'+u+'", therefore we cannot continue.')},test:function(u){if(void 0!==this.cache[u])return this.cache[u];if(!this.tests[u])throw new Error('Unknown capability with name "'+u+'".');var l=this.tests[u];return this.cache[u]=!!l(),this.cache[u]}},q.exports=n},58690:(q,n,u)=>{var l=u(21034),v=l.define,E=l.test;v("strict mode",function(){return void 0===this}),v("arguments.callee.caller",function(){try{return function(){return arguments.callee.caller}()===arguments.callee}catch{return!1}}),v("es5",function(){return E("Array.prototype.forEach")&&E("Array.prototype.map")&&E("Function.prototype.bind")&&E("Object.create")&&E("Object.defineProperties")&&E("Object.defineProperty")&&E("Object.prototype.hasOwnProperty")}),v("Array.prototype.forEach",function(){return Array.prototype.forEach}),v("Array.prototype.map",function(){return Array.prototype.map}),v("Function.prototype.bind",function(){return Function.prototype.bind}),v("Object.create",function(){return Object.create}),v("Object.defineProperties",function(){return Object.defineProperties}),v("Object.defineProperty",function(){return Object.defineProperty}),v("Object.prototype.hasOwnProperty",function(){return Object.prototype.hasOwnProperty}),v("Error.captureStackTrace",function(){return Error.captureStackTrace}),v("Error.prototype.stack",function(){try{throw new Error}catch(M){return M.stack||M.stacktrace}})},21034:(q,n,u)=>{var v=new(u(27247)),E=function(M){return v.test(M)};E.define=function(M,s){v.define(M,s)},E.check=function(M){v.check(M)},E.test=E,q.exports=E},83018:q=>{var n={utf8:{stringToBytes:function(u){return n.bin.stringToBytes(unescape(encodeURIComponent(u)))},bytesToString:function(u){return decodeURIComponent(escape(n.bin.bytesToString(u)))}},bin:{stringToBytes:function(u){for(var l=[],v=0;v{var l=u(73502).Buffer,v=u(295).Transform,E=u(15453).s;function s(g){v.call(this),this.hashMode="string"==typeof g,this.hashMode?this[g]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}u(83894)(s,v),s.prototype.update=function(g,y,f){"string"==typeof g&&(g=l.from(g,y));var d=this._update(g);return this.hashMode?this:(f&&(d=this._toString(d,f)),d)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(g,y,f){var d;try{this.hashMode?this._update(g):this.push(this._update(g))}catch(p){d=p}finally{f(d)}},s.prototype._flush=function(g){var y;try{this.push(this.__final())}catch(f){y=f}g(y)},s.prototype._finalOrDigest=function(g){var y=this.__final()||l.alloc(0);return g&&(y=this._toString(y,g,!0)),y},s.prototype._toString=function(g,y,f){if(this._decoder||(this._decoder=new E(y),this._encoding=y),this._encoding!==y)throw new Error("can't switch encodings");var d=this._decoder.write(g);return f&&(d+=this._decoder.end()),d},q.exports=s},39448:(q,n,u)=>{var l=u(72969).Writable,v=u(83894),E=u(58905);if(typeof Uint8Array>"u")var M=u(69830).U2;else M=Uint8Array;function s(_,D){if(!(this instanceof s))return new s(_,D);"function"==typeof _&&(D=_,_={}),_||(_={});var P=_.encoding,x=!1;P?("u8"===(P=String(P).toLowerCase())||"uint8"===P)&&(P="uint8array"):x=!0,l.call(this,{objectMode:!0}),this.encoding=P,this.shouldInferEncoding=x,D&&this.on("finish",function(){D(this.getBody())}),this.body=[]}q.exports=s,v(s,l),s.prototype._write=function(_,D,P){this.body.push(_),P()},s.prototype.inferEncoding=function(_){var D=void 0===_?this.body[0]:_;return Buffer.isBuffer(D)?"buffer":typeof Uint8Array<"u"&&D instanceof Uint8Array?"uint8array":Array.isArray(D)?"array":"string"==typeof D?"string":"[object Object]"===Object.prototype.toString.call(D)?"object":"buffer"},s.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function m(_){for(var D=[],P=0;P<_.length;P++)D.push.apply(D,_[P]);return D}(this.body):"string"===this.encoding?function d(_){for(var D=[],x=0;x<_.length;x++){var C=_[x];"string"==typeof C||Buffer.isBuffer(C)?D.push(C):f(C)?D.push(E(C)):D.push(E(String(C)))}return D=Buffer.isBuffer(_[0])?(D=Buffer.concat(D)).toString("utf8"):D.join(""),D}(this.body):"buffer"===this.encoding?function p(_){for(var D=[],P=0;P<_.length;P++){var x=_[P];Buffer.isBuffer(x)?D.push(x):f(x)?D.push(E(x)):D.push(E(String(x)))}return Buffer.concat(D)}(this.body):"uint8array"===this.encoding?function S(_){for(var D=0,P=0;P<_.length;P++)"string"==typeof _[P]&&(_[P]=E(_[P])),D+=_[P].length;for(var x=new M(D),C=(P=0,0);P<_.length;P++)for(var N=_[P],k=0;k{var n={}.toString;q.exports=Array.isArray||function(u){return"[object Array]"==n.call(u)}},83308:(q,n,u)=>{"use strict";var l=u(95857),v=Object.keys||function(S){var _=[];for(var D in S)_.push(D);return _};q.exports=d;var E=Object.create(u(26156));E.inherits=u(83894);var M=u(58044),s=u(46615);E.inherits(d,M);for(var g=v(s.prototype),y=0;y{"use strict";q.exports=E;var l=u(55446),v=Object.create(u(26156));function E(M){if(!(this instanceof E))return new E(M);l.call(this,M)}v.inherits=u(83894),v.inherits(E,l),E.prototype._transform=function(M,s,g){g(null,M)}},58044:(q,n,u)=>{"use strict";var l=u(95857);q.exports=U;var E,v=u(77322);U.ReadableState=k;u(59069).EventEmitter;var s=function(ce,le){return ce.listeners(le).length},g=u(18228),y=u(11079).Buffer,f=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var m=Object.create(u(26156));m.inherits=u(83894);var S=u(53383),_=void 0;_=S&&S.debuglog?S.debuglog("stream"):function(){};var x,D=u(81054),P=u(8064);m.inherits(U,g);var C=["error","close","destroy","pause","resume"];function k(ce,le){ce=ce||{};var ue=le instanceof(E=E||u(83308));this.objectMode=!!ce.objectMode,ue&&(this.objectMode=this.objectMode||!!ce.readableObjectMode);var fe=ce.highWaterMark,he=ce.readableHighWaterMark,Ae=this.objectMode?16:16384;this.highWaterMark=fe||0===fe?fe:ue&&(he||0===he)?he:Ae,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new D,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(x||(x=u(95139).s),this.decoder=new x(ce.encoding),this.encoding=ce.encoding)}function U(ce){if(E=E||u(83308),!(this instanceof U))return new U(ce);this._readableState=new k(ce,this),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),g.call(this)}function z(ce,le,ue,fe,he){var Pe,Ae=ce._readableState;null===le?(Ae.reading=!1,function o(ce,le){if(!le.ended){if(le.decoder){var ue=le.decoder.end();ue&&ue.length&&(le.buffer.push(ue),le.length+=le.objectMode?1:ue.length)}le.ended=!0,h(ce)}}(ce,Ae)):(he||(Pe=function G(ce,le){var ue;return!function p(ce){return y.isBuffer(ce)||ce instanceof f}(le)&&"string"!=typeof le&&void 0!==le&&!ce.objectMode&&(ue=new TypeError("Invalid non-string/buffer chunk")),ue}(Ae,le)),Pe?ce.emit("error",Pe):Ae.objectMode||le&&le.length>0?("string"!=typeof le&&!Ae.objectMode&&Object.getPrototypeOf(le)!==y.prototype&&(le=function d(ce){return y.from(ce)}(le)),fe?Ae.endEmitted?ce.emit("error",new Error("stream.unshift() after end event")):Y(ce,Ae,le,!0):Ae.ended?ce.emit("error",new Error("stream.push() after EOF")):(Ae.reading=!1,Ae.decoder&&!ue?(le=Ae.decoder.write(le),Ae.objectMode||0!==le.length?Y(ce,Ae,le,!1):I(ce,Ae)):Y(ce,Ae,le,!1))):fe||(Ae.reading=!1));return function F(ce){return!ce.ended&&(ce.needReadable||ce.lengthle.highWaterMark&&(le.highWaterMark=function Z(ce){return ce>=j?ce=j:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=le.length?ce:le.ended?le.length:(le.needReadable=!0,0))}function h(ce){var le=ce._readableState;le.needReadable=!1,le.emittedReadable||(_("emitReadable",le.flowing),le.emittedReadable=!0,le.sync?l.nextTick(w,ce):w(ce))}function w(ce){_("emit readable"),ce.emit("readable"),B(ce)}function I(ce,le){le.readingMore||(le.readingMore=!0,l.nextTick(R,ce,le))}function R(ce,le){for(var ue=le.length;!le.reading&&!le.flowing&&!le.ended&&le.length=le.length?(ue=le.decoder?le.buffer.join(""):1===le.buffer.length?le.buffer.head.data:le.buffer.concat(le.length),le.buffer.clear()):ue=function ne(ce,le,ue){var fe;return ceAe.length?Ae.length:ce;if(Pe===Ae.length?he+=Ae:he+=Ae.slice(0,ce),0===(ce-=Pe)){Pe===Ae.length?(++fe,ue.next?le.head=ue.next:le.head=le.tail=null):(le.head=ue,ue.data=Ae.slice(Pe));break}++fe}return le.length-=fe,he}(ce,le):function ae(ce,le){var ue=y.allocUnsafe(ce),fe=le.head,he=1;for(fe.data.copy(ue),ce-=fe.data.length;fe=fe.next;){var Ae=fe.data,Pe=ce>Ae.length?Ae.length:ce;if(Ae.copy(ue,ue.length-ce,0,Pe),0===(ce-=Pe)){Pe===Ae.length?(++he,fe.next?le.head=fe.next:le.head=le.tail=null):(le.head=fe,fe.data=Ae.slice(Pe));break}++he}return le.length-=he,ue}(ce,le),fe}(ce,le.buffer,le.decoder),ue);var ue}function ge(ce){var le=ce._readableState;if(le.length>0)throw new Error('"endReadable()" called on non-empty stream');le.endEmitted||(le.ended=!0,l.nextTick(pe,le,ce))}function pe(ce,le){!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,le.readable=!1,le.emit("end"))}function we(ce,le){for(var ue=0,fe=ce.length;ue=le.highWaterMark||le.ended))return _("read: emitReadable",le.length,le.ended),0===le.length&&le.ended?ge(this):h(this),null;if(0===(ce=T(ce,le))&&le.ended)return 0===le.length&&ge(this),null;var he,fe=le.needReadable;return _("need readable",fe),(0===le.length||le.length-ce0?re(ce,le):null)?(le.needReadable=!0,ce=0):le.length-=ce,0===le.length&&(le.ended||(le.needReadable=!0),ue!==ce&&le.ended&&ge(this)),null!==he&&this.emit("data",he),he},U.prototype._read=function(ce){this.emit("error",new Error("_read() is not implemented"))},U.prototype.pipe=function(ce,le){var ue=this,fe=this._readableState;switch(fe.pipesCount){case 0:fe.pipes=ce;break;case 1:fe.pipes=[fe.pipes,ce];break;default:fe.pipes.push(ce)}fe.pipesCount+=1,_("pipe count=%d opts=%j",fe.pipesCount,le);var Ae=(!le||!1!==le.end)&&ce!==process.stdout&&ce!==process.stderr?Re:Ze;function Pe(ut,Me){_("onunpipe"),ut===ue&&Me&&!1===Me.hasUnpiped&&(Me.hasUnpiped=!0,function Ye(){_("cleanup"),ce.removeListener("close",ze),ce.removeListener("finish",Be),ce.removeListener("drain",ot),ce.removeListener("error",He),ce.removeListener("unpipe",Pe),ue.removeListener("end",Re),ue.removeListener("end",Ze),ue.removeListener("data",st),nt=!0,fe.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&ot()}())}function Re(){_("onend"),ce.end()}fe.endEmitted?l.nextTick(Ae):ue.once("end",Ae),ce.on("unpipe",Pe);var ot=function V(ce){return function(){var le=ce._readableState;_("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,0===le.awaitDrain&&s(ce,"data")&&(le.flowing=!0,B(ce))}}(ue);ce.on("drain",ot);var nt=!1;var It=!1;function st(ut){_("ondata"),It=!1,!1===ce.write(ut)&&!It&&((1===fe.pipesCount&&fe.pipes===ce||fe.pipesCount>1&&-1!==we(fe.pipes,ce))&&!nt&&(_("false write response, pause",fe.awaitDrain),fe.awaitDrain++,It=!0),ue.pause())}function He(ut){_("onerror",ut),Ze(),ce.removeListener("error",He),0===s(ce,"error")&&ce.emit("error",ut)}function ze(){ce.removeListener("finish",Be),Ze()}function Be(){_("onfinish"),ce.removeListener("close",ze),Ze()}function Ze(){_("unpipe"),ue.unpipe(ce)}return ue.on("data",st),function N(ce,le,ue){if("function"==typeof ce.prependListener)return ce.prependListener(le,ue);ce._events&&ce._events[le]?v(ce._events[le])?ce._events[le].unshift(ue):ce._events[le]=[ue,ce._events[le]]:ce.on(le,ue)}(ce,"error",He),ce.once("close",ze),ce.once("finish",Be),ce.emit("pipe",ue),fe.flowing||(_("pipe resume"),ue.resume()),ce},U.prototype.unpipe=function(ce){var le=this._readableState,ue={hasUnpiped:!1};if(0===le.pipesCount)return this;if(1===le.pipesCount)return ce&&ce!==le.pipes||(ce||(ce=le.pipes),le.pipes=null,le.pipesCount=0,le.flowing=!1,ce&&ce.emit("unpipe",this,ue)),this;if(!ce){var fe=le.pipes,he=le.pipesCount;le.pipes=null,le.pipesCount=0,le.flowing=!1;for(var Ae=0;Ae{"use strict";q.exports=M;var l=u(83308),v=Object.create(u(26156));function E(y,f){var d=this._transformState;d.transforming=!1;var p=d.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));d.writechunk=null,d.writecb=null,null!=f&&this.push(f),p(y);var m=this._readableState;m.reading=!1,(m.needReadable||m.length{"use strict";var l=u(95857);function E(L){var b=this;this.next=null,this.entry=null,this.finish=function(){!function H(L,b,B){var re=L.entry;for(L.entry=null;re;){var ne=re.callback;b.pendingcb--,ne(B),re=re.next}b.corkedRequestsFree.next=L}(b,L)}}q.exports=C;var s,M=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:l.nextTick;C.WritableState=P;var g=Object.create(u(26156));g.inherits=u(83894);var y={deprecate:u(23532)},f=u(18228),d=u(11079).Buffer,p=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var x,_=u(8064);function D(){}function P(L,b){s=s||u(83308),L=L||{};var B=b instanceof s;this.objectMode=!!L.objectMode,B&&(this.objectMode=this.objectMode||!!L.writableObjectMode);var re=L.highWaterMark,ne=L.writableHighWaterMark,te=this.objectMode?16:16384;this.highWaterMark=re||0===re?re:B&&(ne||0===ne)?ne:te,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ae=!1===L.decodeStrings;this.decodeStrings=!ae,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ge){!function j(L,b){var B=L._writableState,re=B.sync,ne=B.writecb;if(function F(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}(B),b)!function G(L,b,B,re,ne){--b.pendingcb,B?(l.nextTick(ne,re),l.nextTick(R,L,b),L._writableState.errorEmitted=!0,L.emit("error",re)):(ne(re),L._writableState.errorEmitted=!0,L.emit("error",re),R(L,b))}(L,B,re,b,ne);else{var te=h(B);!te&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&o(L,B),re?M(Z,L,B,te,ne):Z(L,B,te,ne)}}(b,ge)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}function C(L){if(s=s||u(83308),!(x.call(C,this)||this instanceof s))return new C(L);this._writableState=new P(L,this),this.writable=!0,L&&("function"==typeof L.write&&(this._write=L.write),"function"==typeof L.writev&&(this._writev=L.writev),"function"==typeof L.destroy&&(this._destroy=L.destroy),"function"==typeof L.final&&(this._final=L.final)),f.call(this)}function Y(L,b,B,re,ne,te,ae){b.writelen=re,b.writecb=ae,b.writing=!0,b.sync=!0,B?L._writev(ne,b.onwrite):L._write(ne,te,b.onwrite),b.sync=!1}function Z(L,b,B,re){B||function T(L,b){0===b.length&&b.needDrain&&(b.needDrain=!1,L.emit("drain"))}(L,b),b.pendingcb--,re(),R(L,b)}function o(L,b){b.bufferProcessing=!0;var B=b.bufferedRequest;if(L._writev&&B&&B.next){var re=b.bufferedRequestCount,ne=new Array(re),te=b.corkedRequestsFree;te.entry=B;for(var ae=0,ge=!0;B;)ne[ae]=B,B.isBuf||(ge=!1),B=B.next,ae+=1;ne.allBuffers=ge,Y(L,b,!0,b.length,ne,"",te.finish),b.pendingcb++,b.lastBufferedRequest=null,te.next?(b.corkedRequestsFree=te.next,te.next=null):b.corkedRequestsFree=new E(b),b.bufferedRequestCount=0}else{for(;B;){var pe=B.chunk,we=B.encoding,ce=B.callback;if(Y(L,b,!1,b.objectMode?1:pe.length,pe,we,ce),B=B.next,b.bufferedRequestCount--,b.writing)break}null===B&&(b.lastBufferedRequest=null)}b.bufferedRequest=B,b.bufferProcessing=!1}function h(L){return L.ending&&0===L.length&&null===L.bufferedRequest&&!L.finished&&!L.writing}function w(L,b){L._final(function(B){b.pendingcb--,B&&L.emit("error",B),b.prefinished=!0,L.emit("prefinish"),R(L,b)})}function R(L,b){var B=h(b);return B&&(function I(L,b){!b.prefinished&&!b.finalCalled&&("function"==typeof L._final?(b.pendingcb++,b.finalCalled=!0,l.nextTick(w,L,b)):(b.prefinished=!0,L.emit("prefinish")))}(L,b),0===b.pendingcb&&(b.finished=!0,L.emit("finish"))),B}g.inherits(C,f),P.prototype.getBuffer=function(){for(var b=this.bufferedRequest,B=[];b;)B.push(b),b=b.next;return B},function(){try{Object.defineProperty(P.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(x=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(L){return!!x.call(this,L)||this===C&&(L&&L._writableState instanceof P)}})):x=function(L){return L instanceof this},C.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},C.prototype.write=function(L,b,B){var re=this._writableState,ne=!1,te=!re.objectMode&&function S(L){return d.isBuffer(L)||L instanceof p}(L);return te&&!d.isBuffer(L)&&(L=function m(L){return d.from(L)}(L)),"function"==typeof b&&(B=b,b=null),te?b="buffer":b||(b=re.defaultEncoding),"function"!=typeof B&&(B=D),re.ended?function N(L,b){var B=new Error("write after end");L.emit("error",B),l.nextTick(b,B)}(this,B):(te||function k(L,b,B,re){var ne=!0,te=!1;return null===B?te=new TypeError("May not write null values to stream"):"string"!=typeof B&&void 0!==B&&!b.objectMode&&(te=new TypeError("Invalid non-string/buffer chunk")),te&&(L.emit("error",te),l.nextTick(re,te),ne=!1),ne}(this,re,L,B))&&(re.pendingcb++,ne=function z(L,b,B,re,ne,te){if(!B){var ae=function U(L,b,B){return!L.objectMode&&!1!==L.decodeStrings&&"string"==typeof b&&(b=d.from(b,B)),b}(b,re,ne);re!==ae&&(B=!0,ne="buffer",re=ae)}var ge=b.objectMode?1:re.length;b.length+=ge;var pe=b.length-1))throw new TypeError("Unknown encoding: "+b);return this._writableState.defaultEncoding=b,this},Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),C.prototype._write=function(L,b,B){B(new Error("_write() is not implemented"))},C.prototype._writev=null,C.prototype.end=function(L,b,B){var re=this._writableState;"function"==typeof L?(B=L,L=null,b=null):"function"==typeof b&&(B=b,b=null),null!=L&&this.write(L,b),re.corked&&(re.corked=1,this.uncork()),re.ending||function V(L,b,B){b.ending=!0,R(L,b),B&&(b.finished?l.nextTick(B):L.once("finish",B)),b.ended=!0,L.writable=!1}(this,re,B)},Object.defineProperty(C.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(L){this._writableState&&(this._writableState.destroyed=L)}}),C.prototype.destroy=_.destroy,C.prototype._undestroy=_.undestroy,C.prototype._destroy=function(L,b){this.end(),b(L)}},81054:(q,n,u)=>{"use strict";var v=u(11079).Buffer,E=u(7716);function M(s,g,y){s.copy(g,y)}q.exports=function(){function s(){(function l(s,g){if(!(s instanceof g))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(y){var f={data:y,next:null};this.length>0?this.tail.next=f:this.head=f,this.tail=f,++this.length},s.prototype.unshift=function(y){var f={data:y,next:this.head};0===this.length&&(this.tail=f),this.head=f,++this.length},s.prototype.shift=function(){if(0!==this.length){var y=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,y}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(y){if(0===this.length)return"";for(var f=this.head,d=""+f.data;f=f.next;)d+=y+f.data;return d},s.prototype.concat=function(y){if(0===this.length)return v.alloc(0);for(var f=v.allocUnsafe(y>>>0),d=this.head,p=0;d;)M(d.data,f,p),p+=d.data.length,d=d.next;return f},s}(),E&&E.inspect&&E.inspect.custom&&(q.exports.prototype[E.inspect.custom]=function(){var s=E.inspect({length:this.length});return this.constructor.name+" "+s})},8064:(q,n,u)=>{"use strict";var l=u(95857);function M(s,g){s.emit("error",g)}q.exports={destroy:function v(s,g){var y=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(g?g(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.nextTick(M,this,s)):l.nextTick(M,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(p){!g&&p?y._writableState?y._writableState.errorEmitted||(y._writableState.errorEmitted=!0,l.nextTick(M,y,p)):l.nextTick(M,y,p):g&&g(p)}),this)},undestroy:function E(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},18228:(q,n,u)=>{q.exports=u(59069).EventEmitter},72969:(q,n,u)=>{(n=q.exports=u(58044)).Stream=n,n.Readable=n,n.Writable=u(46615),n.Duplex=u(83308),n.Transform=u(55446),n.PassThrough=u(60757)},11079:(q,n,u)=>{var l=u(93172),v=l.Buffer;function E(s,g){for(var y in s)g[y]=s[y]}function M(s,g,y){return v(s,g,y)}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?q.exports=l:(E(l,n),n.Buffer=M),E(v,M),M.from=function(s,g,y){if("number"==typeof s)throw new TypeError("Argument must not be a number");return v(s,g,y)},M.alloc=function(s,g,y){if("number"!=typeof s)throw new TypeError("Argument must be a number");var f=v(s);return void 0!==g?"string"==typeof y?f.fill(g,y):f.fill(g):f.fill(0),f},M.allocUnsafe=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return v(s)},M.allocUnsafeSlow=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return l.SlowBuffer(s)}},95139:(q,n,u)=>{"use strict";var l=u(11079).Buffer,v=l.isEncoding||function(N){switch((N=""+N)&&N.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(N){var k;switch(this.encoding=function M(N){var k=function E(N){if(!N)return"utf8";for(var k;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(k)return;N=(""+N).toLowerCase(),k=!0}}(N);if("string"!=typeof k&&(l.isEncoding===v||!v(N)))throw new Error("Unknown encoding: "+N);return k||N}(N),this.encoding){case"utf16le":this.text=S,this.end=_,k=4;break;case"utf8":this.fillLast=d,k=4;break;case"base64":this.text=D,this.end=P,k=3;break;default:return this.write=x,void(this.end=C)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(k)}function g(N){return N<=127?0:N>>5==6?2:N>>4==14?3:N>>3==30?4:N>>6==2?-1:-2}function d(N){var k=this.lastTotal-this.lastNeed,U=function f(N,k,U){if(128!=(192&k[0]))return N.lastNeed=0,"\ufffd";if(N.lastNeed>1&&k.length>1){if(128!=(192&k[1]))return N.lastNeed=1,"\ufffd";if(N.lastNeed>2&&k.length>2&&128!=(192&k[2]))return N.lastNeed=2,"\ufffd"}}(this,N);return void 0!==U?U:this.lastNeed<=N.length?(N.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(N.copy(this.lastChar,k,0,N.length),void(this.lastNeed-=N.length))}function S(N,k){if((N.length-k)%2==0){var U=N.toString("utf16le",k);if(U){var z=U.charCodeAt(U.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],U.slice(0,-1)}return U}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",k,N.length-1)}function _(N){var k=N&&N.length?this.write(N):"";if(this.lastNeed){var U=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,U)}return k}function D(N,k){var U=(N.length-k)%3;return 0===U?N.toString("base64",k):(this.lastNeed=3-U,this.lastTotal=3,1===U?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",k,N.length-U))}function P(N){var k=N&&N.length?this.write(N):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function x(N){return N.toString(this.encoding)}function C(N){return N&&N.length?this.write(N):""}n.s=s,s.prototype.write=function(N){if(0===N.length)return"";var k,U;if(this.lastNeed){if(void 0===(k=this.fillLast(N)))return"";U=this.lastNeed,this.lastNeed=0}else U=0;return U=0?(Y>0&&(N.lastNeed=Y-1),Y):--z=0?(Y>0&&(N.lastNeed=Y-2),Y):--z=0?(Y>0&&(2===Y?Y=0:N.lastNeed=Y-3),Y):0))}(this,N,k);if(!this.lastNeed)return N.toString("utf8",k);this.lastTotal=U;var z=N.length-(U-this.lastNeed);return N.copy(this.lastChar,0,z),N.toString("utf8",k,z)},s.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length}},89093:(q,n,u)=>{"use strict";var l=u(43675),v={"text/plain":"Text","text/html":"Url",default:"Text"},E="Copy to clipboard: #{key}, Enter";q.exports=function s(g,y){var f,d,p,m,S,_,D=!1;y||(y={}),f=y.debug||!1;try{if(p=l(),m=document.createRange(),S=document.getSelection(),(_=document.createElement("span")).textContent=g,_.ariaHidden="true",_.style.all="unset",_.style.position="fixed",_.style.top=0,_.style.clip="rect(0, 0, 0, 0)",_.style.whiteSpace="pre",_.style.webkitUserSelect="text",_.style.MozUserSelect="text",_.style.msUserSelect="text",_.style.userSelect="text",_.addEventListener("copy",function(x){if(x.stopPropagation(),y.format)if(x.preventDefault(),typeof x.clipboardData>"u"){f&&console.warn("unable to use e.clipboardData"),f&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var C=v[y.format]||v.default;window.clipboardData.setData(C,g)}else x.clipboardData.clearData(),x.clipboardData.setData(y.format,g);y.onCopy&&(x.preventDefault(),y.onCopy(x.clipboardData))}),document.body.appendChild(_),m.selectNodeContents(_),S.addRange(m),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");D=!0}catch(x){f&&console.error("unable to copy using execCommand: ",x),f&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(y.format||"text",g),y.onCopy&&y.onCopy(window.clipboardData),D=!0}catch(C){f&&console.error("unable to copy using clipboardData: ",C),f&&console.error("falling back to prompt"),d=function M(g){var y=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,y)}("message"in y?y.message:E),window.prompt(d,g)}}finally{S&&("function"==typeof S.removeRange?S.removeRange(m):S.removeAllRanges()),_&&document.body.removeChild(_),p()}return D}},26156:(q,n,u)=>{function P(x){return Object.prototype.toString.call(x)}n.isArray=function l(x){return Array.isArray?Array.isArray(x):"[object Array]"===P(x)},n.isBoolean=function v(x){return"boolean"==typeof x},n.isNull=function E(x){return null===x},n.isNullOrUndefined=function M(x){return null==x},n.isNumber=function s(x){return"number"==typeof x},n.isString=function g(x){return"string"==typeof x},n.isSymbol=function y(x){return"symbol"==typeof x},n.isUndefined=function f(x){return void 0===x},n.isRegExp=function d(x){return"[object RegExp]"===P(x)},n.isObject=function p(x){return"object"==typeof x&&null!==x},n.isDate=function m(x){return"[object Date]"===P(x)},n.isError=function S(x){return"[object Error]"===P(x)||x instanceof Error},n.isFunction=function _(x){return"function"==typeof x},n.isPrimitive=function D(x){return null===x||"boolean"==typeof x||"number"==typeof x||"string"==typeof x||"symbol"==typeof x||typeof x>"u"},n.isBuffer=u(93172).Buffer.isBuffer},74746:(q,n,u)=>{var l=u(57715),v=u(46422);q.exports=function(y){return new M(y)};var E={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function M(g){this.curveType=E[g],this.curveType||(this.curveType={name:g}),this.curve=new l.ec(this.curveType.name),this.keys=void 0}function s(g,y,f){Array.isArray(g)||(g=g.toArray());var d=new Buffer(g);if(f&&d.length=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},96386:(q,n,u)=>{"use strict";var l=u(83894),v=u(8095),E=u(75634),M=u(95244),s=u(61052);function g(y){s.call(this,"digest"),this._hash=y}l(g,s),g.prototype._update=function(y){this._hash.update(y)},g.prototype._final=function(){return this._hash.digest()},q.exports=function(f){return"md5"===(f=f.toLowerCase())?new v:"rmd160"===f||"ripemd160"===f?new E:new g(M(f))}},55640:(q,n,u)=>{var l=u(8095);q.exports=function(v){return(new l).update(v).digest()}},74529:(q,n,u)=>{"use strict";var l=u(83894),v=u(7309),E=u(61052),M=u(73502).Buffer,s=u(55640),g=u(75634),y=u(95244),f=M.alloc(128);function d(p,m){E.call(this,"digest"),"string"==typeof m&&(m=M.from(m));var S="sha512"===p||"sha384"===p?128:64;(this._alg=p,this._key=m,m.length>S)?m=("rmd160"===p?new g:y(p)).update(m).digest():m.length{"use strict";var l=u(83894),v=u(73502).Buffer,E=u(61052),M=v.alloc(128),s=64;function g(y,f){E.call(this,"digest"),"string"==typeof f&&(f=v.from(f)),this._alg=y,this._key=f,f.length>s?f=y(f):f.length{var n,u;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u={rotl:function(l,v){return l<>>32-v},rotr:function(l,v){return l<<32-v|l>>>v},endian:function(l){if(l.constructor==Number)return 16711935&u.rotl(l,8)|4278255360&u.rotl(l,24);for(var v=0;v0;l--)v.push(Math.floor(256*Math.random()));return v},bytesToWords:function(l){for(var v=[],E=0,M=0;E>>5]|=l[E]<<24-M%32;return v},wordsToBytes:function(l){for(var v=[],E=0;E<32*l.length;E+=8)v.push(l[E>>>5]>>>24-E%32&255);return v},bytesToHex:function(l){for(var v=[],E=0;E>>4).toString(16)),v.push((15&l[E]).toString(16));return v.join("")},hexToBytes:function(l){for(var v=[],E=0;E>>6*(3-s)&63)):v.push("=");return v.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/gi,"");for(var v=[],E=0,M=0;E>>6-2*M);return v}},q.exports=u},41348:(q,n,u)=>{"use strict";n.randomBytes=n.rng=n.pseudoRandomBytes=n.prng=u(53753),n.createHash=n.Hash=u(96386),n.createHmac=n.Hmac=u(74529);var l=u(87793),v=Object.keys(l),E=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(v);n.getHashes=function(){return E};var M=u(99357);n.pbkdf2=M.pbkdf2,n.pbkdf2Sync=M.pbkdf2Sync;var s=u(55255);n.Cipher=s.Cipher,n.createCipher=s.createCipher,n.Cipheriv=s.Cipheriv,n.createCipheriv=s.createCipheriv,n.Decipher=s.Decipher,n.createDecipher=s.createDecipher,n.Decipheriv=s.Decipheriv,n.createDecipheriv=s.createDecipheriv,n.getCiphers=s.getCiphers,n.listCiphers=s.listCiphers;var g=u(98829);n.DiffieHellmanGroup=g.DiffieHellmanGroup,n.createDiffieHellmanGroup=g.createDiffieHellmanGroup,n.getDiffieHellman=g.getDiffieHellman,n.createDiffieHellman=g.createDiffieHellman,n.DiffieHellman=g.DiffieHellman;var y=u(3923);n.createSign=y.createSign,n.Sign=y.Sign,n.createVerify=y.createVerify,n.Verify=y.Verify,n.createECDH=u(74746);var f=u(63701);n.publicEncrypt=f.publicEncrypt,n.privateEncrypt=f.privateEncrypt,n.publicDecrypt=f.publicDecrypt,n.privateDecrypt=f.privateDecrypt;var d=u(14275);n.randomFill=d.randomFill,n.randomFillSync=d.randomFillSync,n.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},n.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},12761:q=>{"use strict";var n="%[a-f0-9]{2}",u=new RegExp("("+n+")|([^%]+?)","gi"),l=new RegExp("("+n+")+","gi");function v(s,g){try{return[decodeURIComponent(s.join(""))]}catch{}if(1===s.length)return s;g=g||1;var y=s.slice(0,g),f=s.slice(g);return Array.prototype.concat.call([],v(y),v(f))}function E(s){try{return decodeURIComponent(s)}catch{for(var g=s.match(u)||[],y=1;y{var l=u(26788),v=u(30826).NI;function E(M){v.call(this,"string"==typeof M?M:""),this._db=void 0,this._operations=[]}l.inherits(E,v),E.prototype.setDb=function(M){this._db=M,this._operations.forEach(function(s){M[s.method].apply(M,s.args)})},E.prototype._open=function(M,s){return process.nextTick(s)},E.prototype._operation=function(M,s){if(this._db)return this._db[M].apply(this._db,s);this._operations.push({method:M,args:s})},"put get del batch approximateSize".split(" ").forEach(function(M){E.prototype["_"+M]=function(){this._operation(M,arguments)}}),E.prototype._isBuffer=function(M){return Buffer.isBuffer(M)},E.prototype._iterator=function(){throw new TypeError("not implemented")},q.exports=E},27484:(q,n,u)=>{"use strict";var l=u(33907),v=u(75917),E=u(92844),M=u(47378);q.exports=function(g,y,f){if(!g||"object"!=typeof g&&"function"!=typeof g)throw new E("`obj` must be an object or a function`");if("string"!=typeof y&&"symbol"!=typeof y)throw new E("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new E("`loose`, if provided, must be a boolean");var d=arguments.length>3?arguments[3]:null,p=arguments.length>4?arguments[4]:null,m=arguments.length>5?arguments[5]:null,S=arguments.length>6&&arguments[6],_=!!M&&M(g,y);if(l)l(g,y,{configurable:null===m&&_?_.configurable:!m,enumerable:null===d&&_?_.enumerable:!d,value:f,writable:null===p&&_?_.writable:!p});else{if(!S&&(d||p||m))throw new v("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");g[y]=f}}},89176:q=>{"use strict";function u(v,E){if("function"!=typeof v)throw new TypeError("argument fn must be a function");return v}function l(v,E,M){if(!v||"object"!=typeof v&&"function"!=typeof v)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(v,E);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable")}q.exports=function n(v){if(!v)throw new TypeError("argument namespace is required");function E(M){}return E._file=void 0,E._ignored=!0,E._namespace=v,E._traced=!1,E._warned=Object.create(null),E.function=u,E.property=l,E}},73684:(q,n,u)=>{"use strict";n.utils=u(77451),n.Cipher=u(38170),n.DES=u(4631),n.CBC=u(79454),n.EDE=u(21862)},79454:(q,n,u)=>{"use strict";var l=u(32391),v=u(83894),E={};function M(g){l.equal(g.length,8,"Invalid IV length"),this.iv=new Array(8);for(var y=0;y{"use strict";var l=u(32391);function v(E){this.options=E,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==E.padding}q.exports=v,v.prototype._init=function(){},v.prototype.update=function(M){return 0===M.length?[]:"decrypt"===this.type?this._updateDecrypt(M):this._updateEncrypt(M)},v.prototype._buffer=function(M,s){for(var g=Math.min(this.buffer.length-this.bufferOff,M.length-s),y=0;y0;y--)s+=this._buffer(M,s),g+=this._flushBuffer(f,g);return s+=this._buffer(M,s),f},v.prototype.final=function(M){var s,g;return M&&(s=this.update(M)),g="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),s?s.concat(g):g},v.prototype._pad=function(M,s){if(0===s)return!1;for(;s{"use strict";var l=u(32391),v=u(83894),E=u(77451),M=u(38170);function s(){this.tmp=new Array(2),this.keys=null}function g(f){M.call(this,f);var d=new s;this._desState=d,this.deriveKeys(d,f.key)}v(g,M),q.exports=g,g.create=function(d){return new g(d)};var y=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];g.prototype.deriveKeys=function(d,p){d.keys=new Array(32),l.equal(p.length,this.blockSize,"Invalid key length");var m=E.readUInt32BE(p,0),S=E.readUInt32BE(p,4);E.pc1(m,S,d.tmp,0),m=d.tmp[0],S=d.tmp[1];for(var _=0;_>>1];m=E.r28shl(m,D),S=E.r28shl(S,D),E.pc2(m,S,d.keys,_)}},g.prototype._update=function(d,p,m,S){var _=this._desState,D=E.readUInt32BE(d,p),P=E.readUInt32BE(d,p+4);E.ip(D,P,_.tmp,0),D=_.tmp[0],P=_.tmp[1],"encrypt"===this.type?this._encrypt(_,D,P,_.tmp,0):this._decrypt(_,D,P,_.tmp,0),D=_.tmp[0],P=_.tmp[1],E.writeUInt32BE(m,D,S),E.writeUInt32BE(m,P,S+4)},g.prototype._pad=function(d,p){if(!1===this.padding)return!1;for(var m=d.length-p,S=p;S>>0,D=z}E.rip(P,D,S,_)},g.prototype._decrypt=function(d,p,m,S,_){for(var D=m,P=p,x=d.keys.length-2;x>=0;x-=2){var C=d.keys[x],N=d.keys[x+1];E.expand(D,d.tmp,0),C^=d.tmp[0],N^=d.tmp[1];var k=E.substitute(C,N),z=D;D=(P^E.permute(k))>>>0,P=z}E.rip(D,P,S,_)}},21862:(q,n,u)=>{"use strict";var l=u(32391),v=u(83894),E=u(38170),M=u(4631);function s(y,f){l.equal(f.length,24,"Invalid key length");var d=f.slice(0,8),p=f.slice(8,16),m=f.slice(16,24);this.ciphers="encrypt"===y?[M.create({type:"encrypt",key:d}),M.create({type:"decrypt",key:p}),M.create({type:"encrypt",key:m})]:[M.create({type:"decrypt",key:m}),M.create({type:"encrypt",key:p}),M.create({type:"decrypt",key:d})]}function g(y){E.call(this,y);var f=new s(this.type,this.options.key);this._edeState=f}v(g,E),q.exports=g,g.create=function(f){return new g(f)},g.prototype._update=function(f,d,p,m){var S=this._edeState;S.ciphers[0]._update(f,d,p,m),S.ciphers[1]._update(p,m,p,m),S.ciphers[2]._update(p,m,p,m)},g.prototype._pad=M.prototype._pad,g.prototype._unpad=M.prototype._unpad},77451:(q,n)=>{"use strict";n.readUInt32BE=function(M,s){return(M[0+s]<<24|M[1+s]<<16|M[2+s]<<8|M[3+s])>>>0},n.writeUInt32BE=function(M,s,g){M[0+g]=s>>>24,M[1+g]=s>>>16&255,M[2+g]=s>>>8&255,M[3+g]=255&s},n.ip=function(M,s,g,y){for(var f=0,d=0,p=6;p>=0;p-=2){for(var m=0;m<=24;m+=8)f<<=1,f|=s>>>m+p&1;for(m=0;m<=24;m+=8)f<<=1,f|=M>>>m+p&1}for(p=6;p>=0;p-=2){for(m=1;m<=25;m+=8)d<<=1,d|=s>>>m+p&1;for(m=1;m<=25;m+=8)d<<=1,d|=M>>>m+p&1}g[y+0]=f>>>0,g[y+1]=d>>>0},n.rip=function(M,s,g,y){for(var f=0,d=0,p=0;p<4;p++)for(var m=24;m>=0;m-=8)f<<=1,f|=s>>>m+p&1,f<<=1,f|=M>>>m+p&1;for(p=4;p<8;p++)for(m=24;m>=0;m-=8)d<<=1,d|=s>>>m+p&1,d<<=1,d|=M>>>m+p&1;g[y+0]=f>>>0,g[y+1]=d>>>0},n.pc1=function(M,s,g,y){for(var f=0,d=0,p=7;p>=5;p--){for(var m=0;m<=24;m+=8)f<<=1,f|=s>>m+p&1;for(m=0;m<=24;m+=8)f<<=1,f|=M>>m+p&1}for(m=0;m<=24;m+=8)f<<=1,f|=s>>m+p&1;for(p=1;p<=3;p++){for(m=0;m<=24;m+=8)d<<=1,d|=s>>m+p&1;for(m=0;m<=24;m+=8)d<<=1,d|=M>>m+p&1}for(m=0;m<=24;m+=8)d<<=1,d|=M>>m+p&1;g[y+0]=f>>>0,g[y+1]=d>>>0},n.r28shl=function(M,s){return M<>>28-s};var u=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];n.pc2=function(M,s,g,y){for(var f=0,d=0,p=u.length>>>1,m=0;m>>u[m]&1;for(m=p;m>>u[m]&1;g[y+0]=f>>>0,g[y+1]=d>>>0},n.expand=function(M,s,g){var y=0,f=0;y=(1&M)<<5|M>>>27;for(var d=23;d>=15;d-=4)y<<=6,y|=M>>>d&63;for(d=11;d>=3;d-=4)f|=M>>>d&63,f<<=6;f|=(31&M)<<1|M>>>31,s[g+0]=y>>>0,s[g+1]=f>>>0};var l=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];n.substitute=function(M,s){for(var g=0,y=0;y<4;y++){g<<=4,g|=l[64*y+(M>>>18-6*y&63)]}for(y=0;y<4;y++){g<<=4,g|=l[256+64*y+(s>>>18-6*y&63)]}return g>>>0};var v=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];n.permute=function(M){for(var s=0,g=0;g>>v[g]&1;return s>>>0},n.padSplit=function(M,s,g){for(var y=M.toString(2);y.length{var l=u(85563),v=u(29799),E=u(21419);var s={binary:!0,hex:!0,base64:!0};n.DiffieHellmanGroup=n.createDiffieHellmanGroup=n.getDiffieHellman=function M(y){var f=new Buffer(v[y].prime,"hex"),d=new Buffer(v[y].gen,"hex");return new E(f,d)},n.createDiffieHellman=n.DiffieHellman=function g(y,f,d,p){return Buffer.isBuffer(f)||void 0===s[f]?g(y,"binary",f,d):(f=f||"binary",p=p||"binary",d=d||new Buffer([2]),Buffer.isBuffer(d)||(d=new Buffer(d,p)),"number"==typeof y?new E(l(y,d),d,!0):(Buffer.isBuffer(y)||(y=new Buffer(y,f)),new E(y,d,!0)))}},21419:(q,n,u)=>{var l=u(88313),E=new(u(17079)),M=new l(24),s=new l(11),g=new l(10),y=new l(3),f=new l(7),d=u(85563),p=u(53753);function m(C,N){return N=N||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,N)),this._pub=new l(C),this}function S(C,N){return N=N||"utf8",Buffer.isBuffer(C)||(C=new Buffer(C,N)),this._priv=new l(C),this}q.exports=P;var _={};function P(C,N,k){this.setGenerator(N),this.__prime=new l(C),this._prime=l.mont(this.__prime),this._primeLen=C.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,k?(this.setPublicKey=m,this.setPrivateKey=S):this._primeCode=8}function x(C,N){var k=new Buffer(C.toArray());return N?k.toString(N):k}Object.defineProperty(P.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function D(C,N){var k=N.toString("hex"),U=[k,C.toString(16)].join("_");if(U in _)return _[U];var Y,z=0;if(C.isEven()||!d.simpleSieve||!d.fermatTest(C)||!E.test(C))return z+=1,z+="02"===k||"05"===k?8:4,_[U]=z,z;switch(E.test(C.shrn(1))||(z+=2),k){case"02":C.mod(M).cmp(s)&&(z+=8);break;case"05":(Y=C.mod(g)).cmp(y)&&Y.cmp(f)&&(z+=8);break;default:z+=4}return _[U]=z,z}(this.__prime,this.__gen)),this._primeCode}}),P.prototype.generateKeys=function(){return this._priv||(this._priv=new l(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},P.prototype.computeSecret=function(C){var N=(C=(C=new l(C)).toRed(this._prime)).redPow(this._priv).fromRed(),k=new Buffer(N.toArray()),U=this.getPrime();if(k.length{var l=u(53753);q.exports=z,z.simpleSieve=k,z.fermatTest=U;var v=u(88313),E=new v(24),s=new(u(17079)),g=new v(1),y=new v(2),f=new v(5),m=(new v(16),new v(8),new v(10)),S=new v(3),D=(new v(7),new v(11)),P=new v(4),C=(new v(12),null);function k(Y){for(var G=function N(){if(null!==C)return C;var G=[];G[0]=2;for(var F=1,j=3;j<1048576;j+=2){for(var Z=Math.ceil(Math.sqrt(j)),T=0;TY;)F.ishrn(1);if(F.isEven()&&F.iadd(g),F.testn(1)||F.iadd(y),G.cmp(y)){if(!G.cmp(f))for(;F.mod(m).cmp(S);)F.iadd(P)}else for(;F.mod(E).cmp(D);)F.iadd(P);if(k(j=F.shrn(1))&&k(F)&&U(j)&&U(F)&&s.test(j)&&s.test(F))return F}}},88313:function(q,n,u){(function(l,v){"use strict";function E(T,o){if(!T)throw new Error(o||"Assertion failed")}function M(T,o){T.super_=o;var h=function(){};h.prototype=o.prototype,T.prototype=new h,T.prototype.constructor=T}function s(T,o,h){if(s.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,null!==T&&(("le"===o||"be"===o)&&(h=o,o=10),this._init(T||0,o||10,h||"be"))}var g;"object"==typeof l?l.exports=s:v.BN=s,s.BN=s,s.wordSize=26;try{g=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:u(7748).Buffer}catch{}function y(T,o){var h=T.charCodeAt(o);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},74901:q=>{"use strict";var n={single_source_shortest_paths:function(u,l,v){var E={},M={};M[l]=0;var g,y,f,d,p,S,_,s=n.PriorityQueue.make();for(s.push(l,0);!s.empty();)for(f in y=(g=s.pop()).value,d=g.cost,p=u[y]||{})p.hasOwnProperty(f)&&(S=d+p[f],_=M[f],(typeof M[f]>"u"||_>S)&&(M[f]=S,s.push(f,S),E[f]=y));if(typeof v<"u"&&typeof M[v]>"u"){var P=["Could not find a path from ",l," to ",v,"."].join("");throw new Error(P)}return E},extract_shortest_path_from_predecessor_list:function(u,l){for(var v=[],E=l;E;)v.push(E),u[E],E=u[E];return v.reverse(),v},find_path:function(u,l,v){var E=n.single_source_shortest_paths(u,l,v);return n.extract_shortest_path_from_predecessor_list(E,v)},PriorityQueue:{make:function(u){var E,l=n.PriorityQueue,v={};for(E in u=u||{},l)l.hasOwnProperty(E)&&(v[E]=l[E]);return v.queue=[],v.sorter=u.sorter||l.default_sorter,v},default_sorter:function(u,l){return u.cost-l.cost},push:function(u,l){var v={value:u,cost:l};this.queue.push(v),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};q.exports=n},57715:(q,n,u)=>{"use strict";var l=n;l.version=u(18597).i8,l.utils=u(61970),l.rand=u(37950),l.curve=u(46270),l.curves=u(52916),l.ec=u(67626),l.eddsa=u(81885)},97902:(q,n,u)=>{"use strict";var l=u(17433),v=u(61970),E=v.getNAF,M=v.getJSF,s=v.assert;function g(f,d){this.type=f,this.p=new l(d.p,16),this.red=d.prime?l.red(d.prime):l.mont(this.p),this.zero=new l(0).toRed(this.red),this.one=new l(1).toRed(this.red),this.two=new l(2).toRed(this.red),this.n=d.n&&new l(d.n,16),this.g=d.g&&this.pointFromJSON(d.g,d.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var p=this.n&&this.p.div(this.n);!p||p.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function y(f,d){this.curve=f,this.type=d,this.precomputed=null}q.exports=g,g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(d,p){s(d.precomputed);var m=d._getDoubles(),S=E(p,1,this._bitLength),_=(1<=P;C--)x=(x<<1)+S[C];D.push(x)}for(var N=this.jpoint(null,null,null),k=this.jpoint(null,null,null),U=_;U>0;U--){for(P=0;P=0;x--){for(var C=0;x>=0&&0===D[x];x--)C++;if(x>=0&&C++,P=P.dblp(C),x<0)break;var N=D[x];s(0!==N),P="affine"===d.type?N>0?P.mixedAdd(_[N-1>>1]):P.mixedAdd(_[-N-1>>1].neg()):N>0?P.add(_[N-1>>1]):P.add(_[-N-1>>1].neg())}return"affine"===d.type?P.toP():P},g.prototype._wnafMulAdd=function(d,p,m,S,_){var N,k,U,D=this._wnafT1,P=this._wnafT2,x=this._wnafT3,C=0;for(N=0;N=1;N-=2){var Y=N-1,G=N;if(1===D[Y]&&1===D[G]){var F=[p[Y],null,null,p[G]];0===p[Y].y.cmp(p[G].y)?(F[1]=p[Y].add(p[G]),F[2]=p[Y].toJ().mixedAdd(p[G].neg())):0===p[Y].y.cmp(p[G].y.redNeg())?(F[1]=p[Y].toJ().mixedAdd(p[G]),F[2]=p[Y].add(p[G].neg())):(F[1]=p[Y].toJ().mixedAdd(p[G]),F[2]=p[Y].toJ().mixedAdd(p[G].neg()));var j=[-3,-1,-5,-7,0,7,5,1,3],Z=M(m[Y],m[G]);for(C=Math.max(Z[0].length,C),x[Y]=new Array(C),x[G]=new Array(C),k=0;k=0;N--){for(var I=0;N>=0;){var R=!0;for(k=0;k=0&&I++,h=h.dblp(I),N<0)break;for(k=0;k0?U=P[k][V-1>>1]:V<0&&(U=P[k][-V-1>>1].neg()),h="affine"===U.type?h.mixedAdd(U):h.add(U))}}for(N=0;N=Math.ceil((d.bitLength()+1)/p.step)},y.prototype._getDoubles=function(d,p){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var m=[this],S=this,_=0;_{"use strict";var l=u(61970),v=u(17433),E=u(83894),M=u(97902),s=l.assert;function g(f){this.twisted=1!=(0|f.a),this.mOneA=this.twisted&&-1==(0|f.a),this.extended=this.mOneA,M.call(this,"edwards",f),this.a=new v(f.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new v(f.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new v(f.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|f.c)}function y(f,d,p,m,S){M.BasePoint.call(this,f,"projective"),null===d&&null===p&&null===m?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new v(d,16),this.y=new v(p,16),this.z=m?new v(m,16):this.curve.one,this.t=S&&new v(S,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}E(g,M),q.exports=g,g.prototype._mulA=function(d){return this.mOneA?d.redNeg():this.a.redMul(d)},g.prototype._mulC=function(d){return this.oneC?d:this.c.redMul(d)},g.prototype.jpoint=function(d,p,m,S){return this.point(d,p,m,S)},g.prototype.pointFromX=function(d,p){(d=new v(d,16)).red||(d=d.toRed(this.red));var m=d.redSqr(),S=this.c2.redSub(this.a.redMul(m)),_=this.one.redSub(this.c2.redMul(this.d).redMul(m)),D=S.redMul(_.redInvm()),P=D.redSqrt();if(0!==P.redSqr().redSub(D).cmp(this.zero))throw new Error("invalid point");var x=P.fromRed().isOdd();return(p&&!x||!p&&x)&&(P=P.redNeg()),this.point(d,P)},g.prototype.pointFromY=function(d,p){(d=new v(d,16)).red||(d=d.toRed(this.red));var m=d.redSqr(),S=m.redSub(this.c2),_=m.redMul(this.d).redMul(this.c2).redSub(this.a),D=S.redMul(_.redInvm());if(0===D.cmp(this.zero)){if(p)throw new Error("invalid point");return this.point(this.zero,d)}var P=D.redSqrt();if(0!==P.redSqr().redSub(D).cmp(this.zero))throw new Error("invalid point");return P.fromRed().isOdd()!==p&&(P=P.redNeg()),this.point(P,d)},g.prototype.validate=function(d){if(d.isInfinity())return!0;d.normalize();var p=d.x.redSqr(),m=d.y.redSqr(),S=p.redMul(this.a).redAdd(m),_=this.c2.redMul(this.one.redAdd(this.d.redMul(p).redMul(m)));return 0===S.cmp(_)},E(y,M.BasePoint),g.prototype.pointFromJSON=function(d){return y.fromJSON(this,d)},g.prototype.point=function(d,p,m,S){return new y(this,d,p,m,S)},y.fromJSON=function(d,p){return new y(d,p[0],p[1],p[2])},y.prototype.inspect=function(){return this.isInfinity()?"":""},y.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},y.prototype._extDbl=function(){var d=this.x.redSqr(),p=this.y.redSqr(),m=this.z.redSqr();m=m.redIAdd(m);var S=this.curve._mulA(d),_=this.x.redAdd(this.y).redSqr().redISub(d).redISub(p),D=S.redAdd(p),P=D.redSub(m),x=S.redSub(p),C=_.redMul(P),N=D.redMul(x),k=_.redMul(x),U=P.redMul(D);return this.curve.point(C,N,U,k)},y.prototype._projDbl=function(){var S,_,D,P,x,C,d=this.x.redAdd(this.y).redSqr(),p=this.x.redSqr(),m=this.y.redSqr();if(this.curve.twisted){var N=(P=this.curve._mulA(p)).redAdd(m);this.zOne?(S=d.redSub(p).redSub(m).redMul(N.redSub(this.curve.two)),_=N.redMul(P.redSub(m)),D=N.redSqr().redSub(N).redSub(N)):(x=this.z.redSqr(),C=N.redSub(x).redISub(x),S=d.redSub(p).redISub(m).redMul(C),_=N.redMul(P.redSub(m)),D=N.redMul(C))}else P=p.redAdd(m),x=this.curve._mulC(this.z).redSqr(),C=P.redSub(x).redSub(x),S=this.curve._mulC(d.redISub(P)).redMul(C),_=this.curve._mulC(P).redMul(p.redISub(m)),D=P.redMul(C);return this.curve.point(S,_,D)},y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},y.prototype._extAdd=function(d){var p=this.y.redSub(this.x).redMul(d.y.redSub(d.x)),m=this.y.redAdd(this.x).redMul(d.y.redAdd(d.x)),S=this.t.redMul(this.curve.dd).redMul(d.t),_=this.z.redMul(d.z.redAdd(d.z)),D=m.redSub(p),P=_.redSub(S),x=_.redAdd(S),C=m.redAdd(p),N=D.redMul(P),k=x.redMul(C),U=D.redMul(C),z=P.redMul(x);return this.curve.point(N,k,z,U)},y.prototype._projAdd=function(d){var k,U,p=this.z.redMul(d.z),m=p.redSqr(),S=this.x.redMul(d.x),_=this.y.redMul(d.y),D=this.curve.d.redMul(S).redMul(_),P=m.redSub(D),x=m.redAdd(D),C=this.x.redAdd(this.y).redMul(d.x.redAdd(d.y)).redISub(S).redISub(_),N=p.redMul(P).redMul(C);return this.curve.twisted?(k=p.redMul(x).redMul(_.redSub(this.curve._mulA(S))),U=P.redMul(x)):(k=p.redMul(x).redMul(_.redSub(S)),U=this.curve._mulC(P).redMul(x)),this.curve.point(N,k,U)},y.prototype.add=function(d){return this.isInfinity()?d:d.isInfinity()?this:this.curve.extended?this._extAdd(d):this._projAdd(d)},y.prototype.mul=function(d){return this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve._wnafMul(this,d)},y.prototype.mulAdd=function(d,p,m){return this.curve._wnafMulAdd(1,[this,p],[d,m],2,!1)},y.prototype.jmulAdd=function(d,p,m){return this.curve._wnafMulAdd(1,[this,p],[d,m],2,!0)},y.prototype.normalize=function(){if(this.zOne)return this;var d=this.z.redInvm();return this.x=this.x.redMul(d),this.y=this.y.redMul(d),this.t&&(this.t=this.t.redMul(d)),this.z=this.curve.one,this.zOne=!0,this},y.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},y.prototype.getY=function(){return this.normalize(),this.y.fromRed()},y.prototype.eq=function(d){return this===d||0===this.getX().cmp(d.getX())&&0===this.getY().cmp(d.getY())},y.prototype.eqXToP=function(d){var p=d.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(p))return!0;for(var m=d.clone(),S=this.curve.redN.redMul(this.z);;){if(m.iadd(this.curve.n),m.cmp(this.curve.p)>=0)return!1;if(p.redIAdd(S),0===this.x.cmp(p))return!0}},y.prototype.toP=y.prototype.normalize,y.prototype.mixedAdd=y.prototype.add},46270:(q,n,u)=>{"use strict";var l=n;l.base=u(97902),l.short=u(41781),l.mont=u(97064),l.edwards=u(13835)},97064:(q,n,u)=>{"use strict";var l=u(17433),v=u(83894),E=u(97902),M=u(61970);function s(y){E.call(this,"mont",y),this.a=new l(y.a,16).toRed(this.red),this.b=new l(y.b,16).toRed(this.red),this.i4=new l(4).toRed(this.red).redInvm(),this.two=new l(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function g(y,f,d){E.BasePoint.call(this,y,"projective"),null===f&&null===d?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new l(f,16),this.z=new l(d,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}v(s,E),q.exports=s,s.prototype.validate=function(f){var d=f.normalize().x,p=d.redSqr(),m=p.redMul(d).redAdd(p.redMul(this.a)).redAdd(d);return 0===m.redSqrt().redSqr().cmp(m)},v(g,E.BasePoint),s.prototype.decodePoint=function(f,d){return this.point(M.toArray(f,d),1)},s.prototype.point=function(f,d){return new g(this,f,d)},s.prototype.pointFromJSON=function(f){return g.fromJSON(this,f)},g.prototype.precompute=function(){},g.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},g.fromJSON=function(f,d){return new g(f,d[0],d[1]||f.one)},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},g.prototype.dbl=function(){var d=this.x.redAdd(this.z).redSqr(),m=this.x.redSub(this.z).redSqr(),S=d.redSub(m),_=d.redMul(m),D=S.redMul(m.redAdd(this.curve.a24.redMul(S)));return this.curve.point(_,D)},g.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},g.prototype.diffAdd=function(f,d){var p=this.x.redAdd(this.z),m=this.x.redSub(this.z),S=f.x.redAdd(f.z),D=f.x.redSub(f.z).redMul(p),P=S.redMul(m),x=d.z.redMul(D.redAdd(P).redSqr()),C=d.x.redMul(D.redISub(P).redSqr());return this.curve.point(x,C)},g.prototype.mul=function(f){for(var d=f.clone(),p=this,m=this.curve.point(null,null),_=[];0!==d.cmpn(0);d.iushrn(1))_.push(d.andln(1));for(var D=_.length-1;D>=0;D--)0===_[D]?(p=p.diffAdd(m,this),m=m.dbl()):(m=p.diffAdd(m,this),p=p.dbl());return m},g.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},g.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},g.prototype.eq=function(f){return 0===this.getX().cmp(f.getX())},g.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},g.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},41781:(q,n,u)=>{"use strict";var l=u(61970),v=u(17433),E=u(83894),M=u(97902),s=l.assert;function g(d){M.call(this,"short",d),this.a=new v(d.a,16).toRed(this.red),this.b=new v(d.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(d),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function y(d,p,m,S){M.BasePoint.call(this,d,"affine"),null===p&&null===m?(this.x=null,this.y=null,this.inf=!0):(this.x=new v(p,16),this.y=new v(m,16),S&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(d,p,m,S){M.BasePoint.call(this,d,"jacobian"),null===p&&null===m&&null===S?(this.x=this.curve.one,this.y=this.curve.one,this.z=new v(0)):(this.x=new v(p,16),this.y=new v(m,16),this.z=new v(S,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}E(g,M),q.exports=g,g.prototype._getEndomorphism=function(p){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var m,S;if(p.beta)m=new v(p.beta,16).toRed(this.red);else{var _=this._getEndoRoots(this.p);m=(m=_[0].cmp(_[1])<0?_[0]:_[1]).toRed(this.red)}if(p.lambda)S=new v(p.lambda,16);else{var D=this._getEndoRoots(this.n);0===this.g.mul(D[0]).x.cmp(this.g.x.redMul(m))?S=D[0]:(S=D[1],s(0===this.g.mul(S).x.cmp(this.g.x.redMul(m))))}return{beta:m,lambda:S,basis:p.basis?p.basis.map(function(x){return{a:new v(x.a,16),b:new v(x.b,16)}}):this._getEndoBasis(S)}}},g.prototype._getEndoRoots=function(p){var m=p===this.p?this.red:v.mont(p),S=new v(2).toRed(m).redInvm(),_=S.redNeg(),D=new v(3).toRed(m).redNeg().redSqrt().redMul(S);return[_.redAdd(D).fromRed(),_.redSub(D).fromRed()]},g.prototype._getEndoBasis=function(p){for(var N,k,U,z,Y,G,F,Z,T,m=this.n.ushrn(Math.floor(this.n.bitLength()/2)),S=p,_=this.n.clone(),D=new v(1),P=new v(0),x=new v(0),C=new v(1),j=0;0!==S.cmpn(0);){var o=_.div(S);Z=_.sub(o.mul(S)),T=x.sub(o.mul(D));var h=C.sub(o.mul(P));if(!U&&Z.cmp(m)<0)N=F.neg(),k=D,U=Z.neg(),z=T;else if(U&&2==++j)break;F=Z,_=S,S=Z,x=D,D=T,C=P,P=h}Y=Z.neg(),G=T;var w=U.sqr().add(z.sqr());return Y.sqr().add(G.sqr()).cmp(w)>=0&&(Y=N,G=k),U.negative&&(U=U.neg(),z=z.neg()),Y.negative&&(Y=Y.neg(),G=G.neg()),[{a:U,b:z},{a:Y,b:G}]},g.prototype._endoSplit=function(p){var m=this.endo.basis,S=m[0],_=m[1],D=_.b.mul(p).divRound(this.n),P=S.b.neg().mul(p).divRound(this.n),x=D.mul(S.a),C=P.mul(_.a),N=D.mul(S.b),k=P.mul(_.b);return{k1:p.sub(x).sub(C),k2:N.add(k).neg()}},g.prototype.pointFromX=function(p,m){(p=new v(p,16)).red||(p=p.toRed(this.red));var S=p.redSqr().redMul(p).redIAdd(p.redMul(this.a)).redIAdd(this.b),_=S.redSqrt();if(0!==_.redSqr().redSub(S).cmp(this.zero))throw new Error("invalid point");var D=_.fromRed().isOdd();return(m&&!D||!m&&D)&&(_=_.redNeg()),this.point(p,_)},g.prototype.validate=function(p){if(p.inf)return!0;var m=p.x,S=p.y,_=this.a.redMul(m),D=m.redSqr().redMul(m).redIAdd(_).redIAdd(this.b);return 0===S.redSqr().redISub(D).cmpn(0)},g.prototype._endoWnafMulAdd=function(p,m,S){for(var _=this._endoWnafT1,D=this._endoWnafT2,P=0;P":""},y.prototype.isInfinity=function(){return this.inf},y.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var m=this.y.redSub(p.y);0!==m.cmpn(0)&&(m=m.redMul(this.x.redSub(p.x).redInvm()));var S=m.redSqr().redISub(this.x).redISub(p.x),_=m.redMul(this.x.redSub(S)).redISub(this.y);return this.curve.point(S,_)},y.prototype.dbl=function(){if(this.inf)return this;var p=this.y.redAdd(this.y);if(0===p.cmpn(0))return this.curve.point(null,null);var m=this.curve.a,S=this.x.redSqr(),_=p.redInvm(),D=S.redAdd(S).redIAdd(S).redIAdd(m).redMul(_),P=D.redSqr().redISub(this.x.redAdd(this.x)),x=D.redMul(this.x.redSub(P)).redISub(this.y);return this.curve.point(P,x)},y.prototype.getX=function(){return this.x.fromRed()},y.prototype.getY=function(){return this.y.fromRed()},y.prototype.mul=function(p){return p=new v(p,16),this.isInfinity()?this:this._hasDoubles(p)?this.curve._fixedNafMul(this,p):this.curve.endo?this.curve._endoWnafMulAdd([this],[p]):this.curve._wnafMul(this,p)},y.prototype.mulAdd=function(p,m,S){var _=[this,m],D=[p,S];return this.curve.endo?this.curve._endoWnafMulAdd(_,D):this.curve._wnafMulAdd(1,_,D,2)},y.prototype.jmulAdd=function(p,m,S){var _=[this,m],D=[p,S];return this.curve.endo?this.curve._endoWnafMulAdd(_,D,!0):this.curve._wnafMulAdd(1,_,D,2,!0)},y.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y))},y.prototype.neg=function(p){if(this.inf)return this;var m=this.curve.point(this.x,this.y.redNeg());if(p&&this.precomputed){var S=this.precomputed,_=function(D){return D.neg()};m.precomputed={naf:S.naf&&{wnd:S.naf.wnd,points:S.naf.points.map(_)},doubles:S.doubles&&{step:S.doubles.step,points:S.doubles.points.map(_)}}}return m},y.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},E(f,M.BasePoint),g.prototype.jpoint=function(p,m,S){return new f(this,p,m,S)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var p=this.z.redInvm(),m=p.redSqr(),S=this.x.redMul(m),_=this.y.redMul(m).redMul(p);return this.curve.point(S,_)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var m=p.z.redSqr(),S=this.z.redSqr(),_=this.x.redMul(m),D=p.x.redMul(S),P=this.y.redMul(m.redMul(p.z)),x=p.y.redMul(S.redMul(this.z)),C=_.redSub(D),N=P.redSub(x);if(0===C.cmpn(0))return 0!==N.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var k=C.redSqr(),U=k.redMul(C),z=_.redMul(k),Y=N.redSqr().redIAdd(U).redISub(z).redISub(z),G=N.redMul(z.redISub(Y)).redISub(P.redMul(U)),F=this.z.redMul(p.z).redMul(C);return this.curve.jpoint(Y,G,F)},f.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var m=this.z.redSqr(),S=this.x,_=p.x.redMul(m),D=this.y,P=p.y.redMul(m).redMul(this.z),x=S.redSub(_),C=D.redSub(P);if(0===x.cmpn(0))return 0!==C.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var N=x.redSqr(),k=N.redMul(x),U=S.redMul(N),z=C.redSqr().redIAdd(k).redISub(U).redISub(U),Y=C.redMul(U.redISub(z)).redISub(D.redMul(k)),G=this.z.redMul(x);return this.curve.jpoint(z,Y,G)},f.prototype.dblp=function(p){if(0===p)return this;if(this.isInfinity())return this;if(!p)return this.dbl();var m;if(this.curve.zeroA||this.curve.threeA){var S=this;for(m=0;m=0)return!1;if(S.redIAdd(D),0===this.x.cmp(S))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},52916:(q,n,u)=>{"use strict";var f,l=n,v=u(37084),E=u(46270),s=u(61970).assert;function g(d){"short"===d.type?this.curve=new E.short(d):"edwards"===d.type?this.curve=new E.edwards(d):this.curve=new E.mont(d),this.g=this.curve.g,this.n=this.curve.n,this.hash=d.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function y(d,p){Object.defineProperty(l,d,{configurable:!0,enumerable:!0,get:function(){var m=new g(p);return Object.defineProperty(l,d,{configurable:!0,enumerable:!0,value:m}),m}})}l.PresetCurve=g,y("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:v.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),y("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:v.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),y("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:v.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),y("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:v.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),y("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:v.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),y("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:v.sha256,gRed:!1,g:["9"]}),y("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:v.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{f=u(25150)}catch{f=void 0}y("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:v.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},67626:(q,n,u)=>{"use strict";var l=u(17433),v=u(52438),E=u(61970),M=u(52916),s=u(37950),g=E.assert,y=u(91259),f=u(65957);function d(p){if(!(this instanceof d))return new d(p);"string"==typeof p&&(g(Object.prototype.hasOwnProperty.call(M,p),"Unknown curve "+p),p=M[p]),p instanceof M.PresetCurve&&(p={curve:p}),this.curve=p.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=p.curve.g,this.g.precompute(p.curve.n.bitLength()+1),this.hash=p.hash||p.curve.hash}q.exports=d,d.prototype.keyPair=function(m){return new y(this,m)},d.prototype.keyFromPrivate=function(m,S){return y.fromPrivate(this,m,S)},d.prototype.keyFromPublic=function(m,S){return y.fromPublic(this,m,S)},d.prototype.genKeyPair=function(m){m||(m={});for(var S=new v({hash:this.hash,pers:m.pers,persEnc:m.persEnc||"utf8",entropy:m.entropy||s(this.hash.hmacStrength),entropyEnc:m.entropy&&m.entropyEnc||"utf8",nonce:this.n.toArray()}),_=this.n.byteLength(),D=this.n.sub(new l(2));;){var P=new l(S.generate(_));if(!(P.cmp(D)>0))return P.iaddn(1),this.keyFromPrivate(P)}},d.prototype._truncateToN=function(m,S){var _=8*m.byteLength()-this.n.bitLength();return _>0&&(m=m.ushrn(_)),!S&&m.cmp(this.n)>=0?m.sub(this.n):m},d.prototype.sign=function(m,S,_,D){"object"==typeof _&&(D=_,_=null),D||(D={}),S=this.keyFromPrivate(S,_),m=this._truncateToN(new l(m,16));for(var P=this.n.byteLength(),x=S.getPrivate().toArray("be",P),C=m.toArray("be",P),N=new v({hash:this.hash,entropy:x,nonce:C,pers:D.pers,persEnc:D.persEnc||"utf8"}),k=this.n.sub(new l(1)),U=0;;U++){var z=D.k?D.k(U):new l(N.generate(this.n.byteLength()));if(!((z=this._truncateToN(z,!0)).cmpn(1)<=0||z.cmp(k)>=0)){var Y=this.g.mul(z);if(!Y.isInfinity()){var G=Y.getX(),F=G.umod(this.n);if(0!==F.cmpn(0)){var j=z.invm(this.n).mul(F.mul(S.getPrivate()).iadd(m));if(0!==(j=j.umod(this.n)).cmpn(0)){var Z=(Y.getY().isOdd()?1:0)|(0!==G.cmp(F)?2:0);return D.canonical&&j.cmp(this.nh)>0&&(j=this.n.sub(j),Z^=1),new f({r:F,s:j,recoveryParam:Z})}}}}}},d.prototype.verify=function(m,S,_,D){m=this._truncateToN(new l(m,16)),_=this.keyFromPublic(_,D);var P=(S=new f(S,"hex")).r,x=S.s;if(P.cmpn(1)<0||P.cmp(this.n)>=0||x.cmpn(1)<0||x.cmp(this.n)>=0)return!1;var U,C=x.invm(this.n),N=C.mul(m).umod(this.n),k=C.mul(P).umod(this.n);return this.curve._maxwellTrick?!(U=this.g.jmulAdd(N,_.getPublic(),k)).isInfinity()&&U.eqXToP(P):!(U=this.g.mulAdd(N,_.getPublic(),k)).isInfinity()&&0===U.getX().umod(this.n).cmp(P)},d.prototype.recoverPubKey=function(p,m,S,_){g((3&S)===S,"The recovery param is more than two bits"),m=new f(m,_);var D=this.n,P=new l(p),x=m.r,C=m.s,N=1&S,k=S>>1;if(x.cmp(this.curve.p.umod(this.curve.n))>=0&&k)throw new Error("Unable to find sencond key candinate");x=k?this.curve.pointFromX(x.add(this.curve.n),N):this.curve.pointFromX(x,N);var U=m.r.invm(D),z=D.sub(P).mul(U).umod(D),Y=C.mul(U).umod(D);return this.g.mulAdd(z,x,Y)},d.prototype.getKeyRecoveryParam=function(p,m,S,_){if(null!==(m=new f(m,_)).recoveryParam)return m.recoveryParam;for(var D=0;D<4;D++){var P;try{P=this.recoverPubKey(p,m,D)}catch{continue}if(P.eq(S))return D}throw new Error("Unable to find valid recovery factor")}},91259:(q,n,u)=>{"use strict";var l=u(17433),E=u(61970).assert;function M(s,g){this.ec=s,this.priv=null,this.pub=null,g.priv&&this._importPrivate(g.priv,g.privEnc),g.pub&&this._importPublic(g.pub,g.pubEnc)}q.exports=M,M.fromPublic=function(g,y,f){return y instanceof M?y:new M(g,{pub:y,pubEnc:f})},M.fromPrivate=function(g,y,f){return y instanceof M?y:new M(g,{priv:y,privEnc:f})},M.prototype.validate=function(){var g=this.getPublic();return g.isInfinity()?{result:!1,reason:"Invalid public key"}:g.validate()?g.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},M.prototype.getPublic=function(g,y){return"string"==typeof g&&(y=g,g=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),y?this.pub.encode(y,g):this.pub},M.prototype.getPrivate=function(g){return"hex"===g?this.priv.toString(16,2):this.priv},M.prototype._importPrivate=function(g,y){this.priv=new l(g,y||16),this.priv=this.priv.umod(this.ec.curve.n)},M.prototype._importPublic=function(g,y){if(g.x||g.y)return"mont"===this.ec.curve.type?E(g.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&E(g.x&&g.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(g.x,g.y));this.pub=this.ec.curve.decodePoint(g,y)},M.prototype.derive=function(g){return g.validate()||E(g.validate(),"public point not validated"),g.mul(this.priv).getX()},M.prototype.sign=function(g,y,f){return this.ec.sign(g,this,y,f)},M.prototype.verify=function(g,y){return this.ec.verify(g,y,this)},M.prototype.inspect=function(){return""}},65957:(q,n,u)=>{"use strict";var l=u(17433),v=u(61970),E=v.assert;function M(d,p){if(d instanceof M)return d;this._importDER(d,p)||(E(d.r&&d.s,"Signature without r or s"),this.r=new l(d.r,16),this.s=new l(d.s,16),void 0===d.recoveryParam?this.recoveryParam=null:this.recoveryParam=d.recoveryParam)}function s(){this.place=0}function g(d,p){var m=d[p.place++];if(!(128&m))return m;var S=15&m;if(0===S||S>4)return!1;for(var _=0,D=0,P=p.place;D>>=0;return!(_<=127)&&(p.place=P,_)}function y(d){for(var p=0,m=d.length-1;!d[p]&&!(128&d[p+1])&&p>>3);for(d.push(128|m);--m;)d.push(p>>>(m<<3)&255);d.push(p)}}q.exports=M,M.prototype._importDER=function(p,m){p=v.toArray(p,m);var S=new s;if(48!==p[S.place++])return!1;var _=g(p,S);if(!1===_||_+S.place!==p.length||2!==p[S.place++])return!1;var D=g(p,S);if(!1===D)return!1;var P=p.slice(S.place,D+S.place);if(S.place+=D,2!==p[S.place++])return!1;var x=g(p,S);if(!1===x||p.length!==x+S.place)return!1;var C=p.slice(S.place,x+S.place);if(0===P[0]){if(!(128&P[1]))return!1;P=P.slice(1)}if(0===C[0]){if(!(128&C[1]))return!1;C=C.slice(1)}return this.r=new l(P),this.s=new l(C),this.recoveryParam=null,!0},M.prototype.toDER=function(p){var m=this.r.toArray(),S=this.s.toArray();for(128&m[0]&&(m=[0].concat(m)),128&S[0]&&(S=[0].concat(S)),m=y(m),S=y(S);!(S[0]||128&S[1]);)S=S.slice(1);var _=[2];f(_,m.length),(_=_.concat(m)).push(2),f(_,S.length);var D=_.concat(S),P=[48];return f(P,D.length),P=P.concat(D),v.encode(P,p)}},81885:(q,n,u)=>{"use strict";var l=u(37084),v=u(52916),E=u(61970),M=E.assert,s=E.parseBytes,g=u(97535),y=u(88241);function f(d){if(M("ed25519"===d,"only tested with ed25519 so far"),!(this instanceof f))return new f(d);d=v[d].curve,this.curve=d,this.g=d.g,this.g.precompute(d.n.bitLength()+1),this.pointClass=d.point().constructor,this.encodingLength=Math.ceil(d.n.bitLength()/8),this.hash=l.sha512}q.exports=f,f.prototype.sign=function(p,m){p=s(p);var S=this.keyFromSecret(m),_=this.hashInt(S.messagePrefix(),p),D=this.g.mul(_),P=this.encodePoint(D),x=this.hashInt(P,S.pubBytes(),p).mul(S.priv()),C=_.add(x).umod(this.curve.n);return this.makeSignature({R:D,S:C,Rencoded:P})},f.prototype.verify=function(p,m,S){p=s(p),m=this.makeSignature(m);var _=this.keyFromPublic(S),D=this.hashInt(m.Rencoded(),_.pubBytes(),p),P=this.g.mul(m.S());return m.R().add(_.pub().mul(D)).eq(P)},f.prototype.hashInt=function(){for(var p=this.hash(),m=0;m{"use strict";var l=u(61970),v=l.assert,E=l.parseBytes,M=l.cachedProperty;function s(g,y){this.eddsa=g,this._secret=E(y.secret),g.isPoint(y.pub)?this._pub=y.pub:this._pubBytes=E(y.pub)}s.fromPublic=function(y,f){return f instanceof s?f:new s(y,{pub:f})},s.fromSecret=function(y,f){return f instanceof s?f:new s(y,{secret:f})},s.prototype.secret=function(){return this._secret},M(s,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),M(s,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),M(s,"privBytes",function(){var y=this.eddsa,f=this.hash(),d=y.encodingLength-1,p=f.slice(0,y.encodingLength);return p[0]&=248,p[d]&=127,p[d]|=64,p}),M(s,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),M(s,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),M(s,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),s.prototype.sign=function(y){return v(this._secret,"KeyPair can only verify"),this.eddsa.sign(y,this)},s.prototype.verify=function(y,f){return this.eddsa.verify(y,f,this)},s.prototype.getSecret=function(y){return v(this._secret,"KeyPair is public only"),l.encode(this.secret(),y)},s.prototype.getPublic=function(y){return l.encode(this.pubBytes(),y)},q.exports=s},88241:(q,n,u)=>{"use strict";var l=u(17433),v=u(61970),E=v.assert,M=v.cachedProperty,s=v.parseBytes;function g(y,f){this.eddsa=y,"object"!=typeof f&&(f=s(f)),Array.isArray(f)&&(f={R:f.slice(0,y.encodingLength),S:f.slice(y.encodingLength)}),E(f.R&&f.S,"Signature without R or S"),y.isPoint(f.R)&&(this._R=f.R),f.S instanceof l&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}M(g,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),M(g,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),M(g,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),M(g,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),g.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},g.prototype.toHex=function(){return v.encode(this.toBytes(),"hex").toUpperCase()},q.exports=g},25150:q=>{q.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},61970:(q,n,u)=>{"use strict";var l=n,v=u(17433),E=u(32391),M=u(58195);l.assert=E,l.toArray=M.toArray,l.zero2=M.zero2,l.toHex=M.toHex,l.encode=M.encode,l.getNAF=function s(p,m,S){var D,_=new Array(Math.max(p.bitLength(),S)+1);for(D=0;D<_.length;D+=1)_[D]=0;var P=1<(P>>1)-1?(P>>1)-N:N,x.isubn(C)):C=0,_[D]=C,x.iushrn(1)}return _},l.getJSF=function g(p,m){var S=[[],[]];p=p.clone(),m=m.clone();for(var P,_=0,D=0;p.cmpn(-_)>0||m.cmpn(-D)>0;){var N,k,x=p.andln(3)+_&3,C=m.andln(3)+D&3;3===x&&(x=-1),3===C&&(C=-1),1&x?N=3!==(P=p.andln(7)+_&7)&&5!==P||2!==C?x:-x:N=0,S[0].push(N),1&C?k=3!==(P=m.andln(7)+D&7)&&5!==P||2!==x?C:-C:k=0,S[1].push(k),2*_===N+1&&(_=1-_),2*D===k+1&&(D=1-D),p.iushrn(1),m.iushrn(1)}return S},l.cachedProperty=function y(p,m,S){var _="_"+m;p.prototype[m]=function(){return void 0!==this[_]?this[_]:this[_]=S.call(this)}},l.parseBytes=function f(p){return"string"==typeof p?l.toArray(p,"hex"):p},l.intFromLE=function d(p){return new v(p,"hex","le")}},17433:function(q,n,u){(function(l,v){"use strict";function E(T,o){if(!T)throw new Error(o||"Assertion failed")}function M(T,o){T.super_=o;var h=function(){};h.prototype=o.prototype,T.prototype=new h,T.prototype.constructor=T}function s(T,o,h){if(s.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,null!==T&&(("le"===o||"be"===o)&&(h=o,o=10),this._init(T||0,o||10,h||"be"))}var g;"object"==typeof l?l.exports=s:v.BN=s,s.BN=s,s.wordSize=26;try{g=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:u(85568).Buffer}catch{}function y(T,o){var h=T.charCodeAt(o);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},38419:q=>{"use strict";q.exports=function(u){for(var l=[],v=u.length,E=0;E=55296&&M<=56319&&v>E+1){var s=u.charCodeAt(E+1);s>=56320&&s<=57343&&(M=1024*(M-55296)+s-56320+65536,E+=1)}M<128?l.push(M):M<2048?(l.push(M>>6|192),l.push(63&M|128)):M<55296||M>=57344&&M<65536?(l.push(M>>12|224),l.push(M>>6&63|128),l.push(63&M|128)):M>=65536&&M<=1114111?(l.push(M>>18|240),l.push(M>>12&63|128),l.push(M>>6&63|128),l.push(63&M|128)):l.push(239,191,189)}return new Uint8Array(l).buffer}},69913:(q,n,u)=>{var l=u(38739);function v(s,g,y){g&&"string"!=typeof g&&(g=g.message||g.name),l(this,{type:s,name:s,cause:"string"!=typeof g?g:y,message:g},"ewr")}function E(s,g){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),v.call(this,"CustomError",s,g)}E.prototype=new Error,q.exports=function(s){var g=function(y,f){return function M(s,g,y){var f=function(d,p){v.call(this,g,d,p),"FilesystemError"==g&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(s.errno[this.cause.errno]?s.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,f)};return f.prototype=y?new y:new E,f}(s,y,f)};return{CustomError:E,FilesystemError:g("FilesystemError"),createError:g}}},3161:(q,n,u)=>{var l=q.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];q.exports.errno={},q.exports.code={},l.forEach(function(v){q.exports.errno[v.errno]=v,q.exports.code[v.code]=v}),q.exports.custom=u(69913)(q.exports),q.exports.create=q.exports.custom.createError},38739:function(q){var u,l;u=this,l=function(){var n="function"==typeof Object.defineProperty?function(v,E,M){return Object.defineProperty(v,E,M),v}:function(v,E,M){return v[E]=M.value,v};return function(v,E,M,s){var g;if(s=function(v,E){var M="object"==typeof E,s=!M&&"string"==typeof E,g=function(y){return M?!!E[y]:!!s&&E.indexOf(y[0])>-1};return{enumerable:g("enumerable"),configurable:g("configurable"),writable:g("writable"),value:v}}(M,s),"object"==typeof E){for(g in E)Object.hasOwnProperty.call(E,g)&&(s.value=E[g],n(v,g,s));return v}return n(v,E,s)}},q.exports?q.exports=l():u.prr=l()},4073:(q,n,u)=>{q.exports=u(36766)},36766:(q,n,u)=>{u(53495);var v,l=u(37131);v=l("Error.captureStackTrace")?u(56362):l("Error.prototype.stack")?u(56017):u(63998),q.exports=v()},52047:(q,n,u)=>{var l=u(90252).Class,v=u(90252).abstractMethod,E=l(Object,{prototype:{init:l.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:v,getTypeName:v,getFunction:function(){return this.functionValue},getFunctionName:v,getMethodName:v,getFileName:v,getLineNumber:v,getColumnNumber:v,getEvalOrigin:v,isTopLevel:v,isEval:v,isNative:v,isConstructor:v}});q.exports=E},80916:(q,n,u)=>{var l=u(90252).Class,v=u(52047),E=u(88074).cache,M=l(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(s){l.prototype.merge.call(this,s)},getFrames:function(s,g){for(var y=[],f=0,d=s.length;f{var l=u(90252).Class,v=u(90252).abstractMethod,E=u(88074).eachCombination,M=u(88074).cache,s=u(37131),g=l(Object,{prototype:{captureFrameStrings:function(f){var d=this.createError();f.unshift(this.captureFrameStrings),f.unshift(this.createError);var m=this.getFrameStrings(d).slice(f.length),S=[];if(s("arguments.callee.caller")){var _=[this.createError,this.captureFrameStrings];try{for(var D=arguments.callee;D=D.caller;)_.push(D)}catch{}S=_.slice(f.length)}return{frameStrings:m,functionValues:S}},getFrameStrings:function(f){var d=f.message||"",p=f.name||"",m=this.getStackString(f);if(void 0!==m){var S=m.split("\n"),_=0,D=S.length;return this.hasHeader&&(_+=p.split("\n").length+d.split("\n").length-1),this.hasFooter&&(D-=1),S.slice(_,D)}},createError:v,getStackString:v,hasHeader:void 0,hasFooter:void 0}}),y=l(Object,{prototype:{calibrateClass:function(f){return this.calibrateMethods(f)&&this.calibrateEnvelope(f)},calibrateMethods:function(f){try{E([[function(d){return new Error(d)},function(d){try{throw new Error(d)}catch(p){return p}}],[function(d){return d.stack},function(d){return d.stacktrace}]],function(d,p){if(p(d()))throw{getStackString:p,createError:d}})}catch(d){return l.merge.call(f,{prototype:d}),!0}return!1},calibrateEnvelope:function(f){var S=(0,f.prototype.getStackString)((0,f.prototype.createError)("marker")).split("\n");return l.merge.call(f,{prototype:{hasHeader:/marker/.test(S[0]),hasFooter:""===S[S.length-1]}}),!0}}});q.exports={getClass:M(function(){var f;if(f)return f;if(f=l(g,{}),!(new y).calibrateClass(f))throw new Error("Cannot read Error.prototype.stack in this environment.");return f}),getInstance:M(function(){return new(this.getClass())})}},56017:(q,n,u)=>{var l=u(31470),v=u(80916),E=u(88074).cache,M=u(52624);q.exports=function(){return Error.captureStackTrace=function s(g,y){var d=[s];y&&d.push(y);var p=l.getInstance().captureFrameStrings(d);Object.defineProperties(g,{stack:{configurable:!0,get:E(function(){var m=v.getInstance().getFrames(p.frameStrings,p.functionValues);return(Error.prepareStackTrace||M)(g,m,undefined)})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(s){if(s.cachedStack)return s.stack;var f,g=l.getInstance().getFrameStrings(s),y=[];g?y=v.getInstance().getFrames(g,[]):f=["The stack is not readable by unthrown errors in this environment."];var d=(Error.prepareStackTrace||M)(s,y,f);if(g)try{Object.defineProperties(s,{stack:{configurable:!0,writable:!0,enumerable:!1,value:d},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return d},{prepareStackTrace:M}}},52624:q=>{q.exports=function(u,l,v){var E="";if(E+=u.name||"Error",E+=": "+(u.message||""),v instanceof Array)for(var M in v){E+="\n # "+v[M]}for(var g in l){E+="\n at "+l[g].toString()}return E}},63998:(q,n,u)=>{var l=u(88074).cache,v=u(52624);q.exports=function(){return Error.captureStackTrace=function(E,M){Object.defineProperties(E,{stack:{configurable:!0,get:l(function(){return(Error.prepareStackTrace||v)(E,[])})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(E){if(E.cachedStack)return E.stack;var M=(Error.prepareStackTrace||v)(E,[]);try{Object.defineProperties(E,{stack:{configurable:!0,writable:!0,enumerable:!1,value:M},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return M},{prepareStackTrace:v}}},56362:(q,n,u)=>{var l=u(52624);q.exports=function(){return Error.getStackTrace=function(v){return v.stack},{prepareStackTrace:l}}},33907:(q,n,u)=>{"use strict";var v=u(95203)("%Object.defineProperty%",!0)||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}q.exports=v},3644:q=>{"use strict";q.exports=EvalError},91847:q=>{"use strict";q.exports=Error},1298:q=>{"use strict";q.exports=RangeError},42681:q=>{"use strict";q.exports=ReferenceError},75917:q=>{"use strict";q.exports=SyntaxError},92844:q=>{"use strict";q.exports=TypeError},87289:q=>{"use strict";q.exports=URIError},48634:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(T,o,h,w){void 0===w&&(w=h),Object.defineProperty(T,w,{enumerable:!0,get:function(){return o[h]}})}:function(T,o,h,w){void 0===w&&(w=h),T[w]=o[h]}),v=this&&this.__setModuleDefault||(Object.create?function(T,o){Object.defineProperty(T,"default",{enumerable:!0,value:o})}:function(T,o){T.default=o}),E=this&&this.__importStar||function(T){if(T&&T.__esModule)return T;var o={};if(null!=T)for(var h in T)"default"!==h&&Object.prototype.hasOwnProperty.call(T,h)&&l(o,T,h);return v(o,T),o};Object.defineProperty(n,"__esModule",{value:!0}),n.formatBytes32String=n.Utf8ErrorFuncs=n.toUtf8String=n.toUtf8CodePoints=n.toUtf8Bytes=n._toEscapedUtf8String=n.nameprep=n.hexDataSlice=n.hexDataLength=n.hexZeroPad=n.hexValue=n.hexStripZeros=n.hexConcat=n.isHexString=n.hexlify=n.base64=n.base58=n.TransactionDescription=n.LogDescription=n.Interface=n.SigningKey=n.HDNode=n.defaultPath=n.isBytesLike=n.isBytes=n.zeroPad=n.stripZeros=n.concat=n.arrayify=n.shallowCopy=n.resolveProperties=n.getStatic=n.defineReadOnly=n.deepCopy=n.checkProperties=n.poll=n.fetchJson=n._fetchData=n.RLP=n.Logger=n.checkResultErrors=n.FormatTypes=n.ParamType=n.FunctionFragment=n.EventFragment=n.ErrorFragment=n.ConstructorFragment=n.Fragment=n.defaultAbiCoder=n.AbiCoder=void 0,n.Indexed=n.Utf8ErrorReason=n.UnicodeNormalizationForm=n.SupportedAlgorithm=n.mnemonicToSeed=n.isValidMnemonic=n.entropyToMnemonic=n.mnemonicToEntropy=n.getAccountPath=n.verifyTypedData=n.verifyMessage=n.recoverPublicKey=n.computePublicKey=n.recoverAddress=n.computeAddress=n.getJsonWalletAddress=n.TransactionTypes=n.serializeTransaction=n.parseTransaction=n.accessListify=n.joinSignature=n.splitSignature=n.soliditySha256=n.solidityKeccak256=n.solidityPack=n.shuffled=n.randomBytes=n.sha512=n.sha256=n.ripemd160=n.keccak256=n.computeHmac=n.commify=n.parseUnits=n.formatUnits=n.parseEther=n.formatEther=n.isAddress=n.getCreate2Address=n.getContractAddress=n.getIcapAddress=n.getAddress=n._TypedDataEncoder=n.id=n.isValidName=n.namehash=n.hashMessage=n.dnsEncode=n.parseBytes32String=void 0;var M=u(68512);Object.defineProperty(n,"AbiCoder",{enumerable:!0,get:function(){return M.AbiCoder}}),Object.defineProperty(n,"checkResultErrors",{enumerable:!0,get:function(){return M.checkResultErrors}}),Object.defineProperty(n,"ConstructorFragment",{enumerable:!0,get:function(){return M.ConstructorFragment}}),Object.defineProperty(n,"defaultAbiCoder",{enumerable:!0,get:function(){return M.defaultAbiCoder}}),Object.defineProperty(n,"ErrorFragment",{enumerable:!0,get:function(){return M.ErrorFragment}}),Object.defineProperty(n,"EventFragment",{enumerable:!0,get:function(){return M.EventFragment}}),Object.defineProperty(n,"FormatTypes",{enumerable:!0,get:function(){return M.FormatTypes}}),Object.defineProperty(n,"Fragment",{enumerable:!0,get:function(){return M.Fragment}}),Object.defineProperty(n,"FunctionFragment",{enumerable:!0,get:function(){return M.FunctionFragment}}),Object.defineProperty(n,"Indexed",{enumerable:!0,get:function(){return M.Indexed}}),Object.defineProperty(n,"Interface",{enumerable:!0,get:function(){return M.Interface}}),Object.defineProperty(n,"LogDescription",{enumerable:!0,get:function(){return M.LogDescription}}),Object.defineProperty(n,"ParamType",{enumerable:!0,get:function(){return M.ParamType}}),Object.defineProperty(n,"TransactionDescription",{enumerable:!0,get:function(){return M.TransactionDescription}});var s=u(28016);Object.defineProperty(n,"getAddress",{enumerable:!0,get:function(){return s.getAddress}}),Object.defineProperty(n,"getCreate2Address",{enumerable:!0,get:function(){return s.getCreate2Address}}),Object.defineProperty(n,"getContractAddress",{enumerable:!0,get:function(){return s.getContractAddress}}),Object.defineProperty(n,"getIcapAddress",{enumerable:!0,get:function(){return s.getIcapAddress}}),Object.defineProperty(n,"isAddress",{enumerable:!0,get:function(){return s.isAddress}});var g=E(u(41601));n.base64=g;var y=u(45887);Object.defineProperty(n,"base58",{enumerable:!0,get:function(){return y.Base58}});var f=u(10499);Object.defineProperty(n,"arrayify",{enumerable:!0,get:function(){return f.arrayify}}),Object.defineProperty(n,"concat",{enumerable:!0,get:function(){return f.concat}}),Object.defineProperty(n,"hexConcat",{enumerable:!0,get:function(){return f.hexConcat}}),Object.defineProperty(n,"hexDataSlice",{enumerable:!0,get:function(){return f.hexDataSlice}}),Object.defineProperty(n,"hexDataLength",{enumerable:!0,get:function(){return f.hexDataLength}}),Object.defineProperty(n,"hexlify",{enumerable:!0,get:function(){return f.hexlify}}),Object.defineProperty(n,"hexStripZeros",{enumerable:!0,get:function(){return f.hexStripZeros}}),Object.defineProperty(n,"hexValue",{enumerable:!0,get:function(){return f.hexValue}}),Object.defineProperty(n,"hexZeroPad",{enumerable:!0,get:function(){return f.hexZeroPad}}),Object.defineProperty(n,"isBytes",{enumerable:!0,get:function(){return f.isBytes}}),Object.defineProperty(n,"isBytesLike",{enumerable:!0,get:function(){return f.isBytesLike}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return f.isHexString}}),Object.defineProperty(n,"joinSignature",{enumerable:!0,get:function(){return f.joinSignature}}),Object.defineProperty(n,"zeroPad",{enumerable:!0,get:function(){return f.zeroPad}}),Object.defineProperty(n,"splitSignature",{enumerable:!0,get:function(){return f.splitSignature}}),Object.defineProperty(n,"stripZeros",{enumerable:!0,get:function(){return f.stripZeros}});var d=u(43015);Object.defineProperty(n,"_TypedDataEncoder",{enumerable:!0,get:function(){return d._TypedDataEncoder}}),Object.defineProperty(n,"dnsEncode",{enumerable:!0,get:function(){return d.dnsEncode}}),Object.defineProperty(n,"hashMessage",{enumerable:!0,get:function(){return d.hashMessage}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return d.id}}),Object.defineProperty(n,"isValidName",{enumerable:!0,get:function(){return d.isValidName}}),Object.defineProperty(n,"namehash",{enumerable:!0,get:function(){return d.namehash}});var p=u(21516);Object.defineProperty(n,"defaultPath",{enumerable:!0,get:function(){return p.defaultPath}}),Object.defineProperty(n,"entropyToMnemonic",{enumerable:!0,get:function(){return p.entropyToMnemonic}}),Object.defineProperty(n,"getAccountPath",{enumerable:!0,get:function(){return p.getAccountPath}}),Object.defineProperty(n,"HDNode",{enumerable:!0,get:function(){return p.HDNode}}),Object.defineProperty(n,"isValidMnemonic",{enumerable:!0,get:function(){return p.isValidMnemonic}}),Object.defineProperty(n,"mnemonicToEntropy",{enumerable:!0,get:function(){return p.mnemonicToEntropy}}),Object.defineProperty(n,"mnemonicToSeed",{enumerable:!0,get:function(){return p.mnemonicToSeed}});var m=u(27591);Object.defineProperty(n,"getJsonWalletAddress",{enumerable:!0,get:function(){return m.getJsonWalletAddress}});var S=u(92547);Object.defineProperty(n,"keccak256",{enumerable:!0,get:function(){return S.keccak256}});var _=u(88666);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return _.Logger}});var D=u(42973);Object.defineProperty(n,"computeHmac",{enumerable:!0,get:function(){return D.computeHmac}}),Object.defineProperty(n,"ripemd160",{enumerable:!0,get:function(){return D.ripemd160}}),Object.defineProperty(n,"sha256",{enumerable:!0,get:function(){return D.sha256}}),Object.defineProperty(n,"sha512",{enumerable:!0,get:function(){return D.sha512}});var P=u(53363);Object.defineProperty(n,"solidityKeccak256",{enumerable:!0,get:function(){return P.keccak256}}),Object.defineProperty(n,"solidityPack",{enumerable:!0,get:function(){return P.pack}}),Object.defineProperty(n,"soliditySha256",{enumerable:!0,get:function(){return P.sha256}});var x=u(34709);Object.defineProperty(n,"randomBytes",{enumerable:!0,get:function(){return x.randomBytes}}),Object.defineProperty(n,"shuffled",{enumerable:!0,get:function(){return x.shuffled}});var C=u(24325);Object.defineProperty(n,"checkProperties",{enumerable:!0,get:function(){return C.checkProperties}}),Object.defineProperty(n,"deepCopy",{enumerable:!0,get:function(){return C.deepCopy}}),Object.defineProperty(n,"defineReadOnly",{enumerable:!0,get:function(){return C.defineReadOnly}}),Object.defineProperty(n,"getStatic",{enumerable:!0,get:function(){return C.getStatic}}),Object.defineProperty(n,"resolveProperties",{enumerable:!0,get:function(){return C.resolveProperties}}),Object.defineProperty(n,"shallowCopy",{enumerable:!0,get:function(){return C.shallowCopy}});var N=E(u(70810));n.RLP=N;var k=u(33126);Object.defineProperty(n,"computePublicKey",{enumerable:!0,get:function(){return k.computePublicKey}}),Object.defineProperty(n,"recoverPublicKey",{enumerable:!0,get:function(){return k.recoverPublicKey}}),Object.defineProperty(n,"SigningKey",{enumerable:!0,get:function(){return k.SigningKey}});var U=u(51768);Object.defineProperty(n,"formatBytes32String",{enumerable:!0,get:function(){return U.formatBytes32String}}),Object.defineProperty(n,"nameprep",{enumerable:!0,get:function(){return U.nameprep}}),Object.defineProperty(n,"parseBytes32String",{enumerable:!0,get:function(){return U.parseBytes32String}}),Object.defineProperty(n,"_toEscapedUtf8String",{enumerable:!0,get:function(){return U._toEscapedUtf8String}}),Object.defineProperty(n,"toUtf8Bytes",{enumerable:!0,get:function(){return U.toUtf8Bytes}}),Object.defineProperty(n,"toUtf8CodePoints",{enumerable:!0,get:function(){return U.toUtf8CodePoints}}),Object.defineProperty(n,"toUtf8String",{enumerable:!0,get:function(){return U.toUtf8String}}),Object.defineProperty(n,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return U.Utf8ErrorFuncs}});var z=u(71474);Object.defineProperty(n,"accessListify",{enumerable:!0,get:function(){return z.accessListify}}),Object.defineProperty(n,"computeAddress",{enumerable:!0,get:function(){return z.computeAddress}}),Object.defineProperty(n,"parseTransaction",{enumerable:!0,get:function(){return z.parse}}),Object.defineProperty(n,"recoverAddress",{enumerable:!0,get:function(){return z.recoverAddress}}),Object.defineProperty(n,"serializeTransaction",{enumerable:!0,get:function(){return z.serialize}}),Object.defineProperty(n,"TransactionTypes",{enumerable:!0,get:function(){return z.TransactionTypes}});var Y=u(32064);Object.defineProperty(n,"commify",{enumerable:!0,get:function(){return Y.commify}}),Object.defineProperty(n,"formatEther",{enumerable:!0,get:function(){return Y.formatEther}}),Object.defineProperty(n,"parseEther",{enumerable:!0,get:function(){return Y.parseEther}}),Object.defineProperty(n,"formatUnits",{enumerable:!0,get:function(){return Y.formatUnits}}),Object.defineProperty(n,"parseUnits",{enumerable:!0,get:function(){return Y.parseUnits}});var G=u(9813);Object.defineProperty(n,"verifyMessage",{enumerable:!0,get:function(){return G.verifyMessage}}),Object.defineProperty(n,"verifyTypedData",{enumerable:!0,get:function(){return G.verifyTypedData}});var F=u(39851);Object.defineProperty(n,"_fetchData",{enumerable:!0,get:function(){return F._fetchData}}),Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return F.fetchJson}}),Object.defineProperty(n,"poll",{enumerable:!0,get:function(){return F.poll}});var j=u(42973);Object.defineProperty(n,"SupportedAlgorithm",{enumerable:!0,get:function(){return j.SupportedAlgorithm}});var Z=u(51768);Object.defineProperty(n,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return Z.UnicodeNormalizationForm}}),Object.defineProperty(n,"Utf8ErrorReason",{enumerable:!0,get:function(){return Z.Utf8ErrorReason}})},59069:q=>{"use strict";var l,n="object"==typeof Reflect?Reflect:null,u=n&&"function"==typeof n.apply?n.apply:function(U,z,Y){return Function.prototype.apply.call(U,z,Y)};l=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(U){return Object.getOwnPropertyNames(U).concat(Object.getOwnPropertySymbols(U))}:function(U){return Object.getOwnPropertyNames(U)};var E=Number.isNaN||function(U){return U!=U};function M(){M.init.call(this)}q.exports=M,q.exports.once=function x(k,U){return new Promise(function(z,Y){function G(j){k.removeListener(U,F),Y(j)}function F(){"function"==typeof k.removeListener&&k.removeListener("error",G),z([].slice.call(arguments))}N(k,U,F,{once:!0}),"error"!==U&&function C(k,U,z){"function"==typeof k.on&&N(k,"error",U,z)}(k,G,{once:!0})})},M.EventEmitter=M,M.prototype._events=void 0,M.prototype._eventsCount=0,M.prototype._maxListeners=void 0;var s=10;function g(k){if("function"!=typeof k)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}function y(k){return void 0===k._maxListeners?M.defaultMaxListeners:k._maxListeners}function f(k,U,z,Y){var G,F,j;if(g(z),void 0===(F=k._events)?(F=k._events=Object.create(null),k._eventsCount=0):(void 0!==F.newListener&&(k.emit("newListener",U,z.listener?z.listener:z),F=k._events),j=F[U]),void 0===j)j=F[U]=z,++k._eventsCount;else if("function"==typeof j?j=F[U]=Y?[z,j]:[j,z]:Y?j.unshift(z):j.push(z),(G=y(k))>0&&j.length>G&&!j.warned){j.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+j.length+" "+String(U)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=k,Z.type=U,Z.count=j.length,function v(k){console&&console.warn&&console.warn(k)}(Z)}return k}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(k,U,z){var Y={fired:!1,wrapFn:void 0,target:k,type:U,listener:z},G=d.bind(Y);return G.listener=z,Y.wrapFn=G,G}function m(k,U,z){var Y=k._events;if(void 0===Y)return[];var G=Y[U];return void 0===G?[]:"function"==typeof G?z?[G.listener||G]:[G]:z?function P(k){for(var U=new Array(k.length),z=0;z0&&(j=z[0]),j instanceof Error)throw j;var Z=new Error("Unhandled error."+(j?" ("+j.message+")":""));throw Z.context=j,Z}var T=F[U];if(void 0===T)return!1;if("function"==typeof T)u(T,this,z);else{var o=T.length,h=_(T,o);for(Y=0;Y=0;j--)if(Y[j]===z||Y[j].listener===z){Z=Y[j].listener,F=j;break}if(F<0)return this;0===F?Y.shift():function D(k,U){for(;U+1=0;G--)this.removeListener(U,z[G]);return this},M.prototype.listeners=function(U){return m(this,U,!0)},M.prototype.rawListeners=function(U){return m(this,U,!1)},M.listenerCount=function(k,U){return"function"==typeof k.listenerCount?k.listenerCount(U):S.call(k,U)},M.prototype.listenerCount=S,M.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]}},40347:(q,n,u)=>{var l=u(73502).Buffer,v=u(8095);q.exports=function E(M,s,g,y){if(l.isBuffer(M)||(M=l.from(M,"binary")),s&&(l.isBuffer(s)||(s=l.from(s,"binary")),8!==s.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=g/8,d=l.alloc(f),p=l.alloc(y||0),m=l.alloc(0);f>0||y>0;){var S=new v;S.update(m),S.update(M),s&&S.update(s),m=S.digest();var _=0;if(f>0){var D=d.length-f;_=Math.min(f,m.length),m.copy(d,D,0,_),f-=_}if(_0){var P=p.length-y,x=Math.min(y,m.length-_);m.copy(p,P,_,_+x),y-=x}}return m.fill(0),{key:d,iv:p}}},12559:q=>{"use strict";q.exports=function n(u,l){if(u===l)return!0;if(u&&l&&"object"==typeof u&&"object"==typeof l){if(u.constructor!==l.constructor)return!1;var v,E,M;if(Array.isArray(u)){if((v=u.length)!=l.length)return!1;for(E=v;0!=E--;)if(!n(u[E],l[E]))return!1;return!0}if(u.constructor===RegExp)return u.source===l.source&&u.flags===l.flags;if(u.valueOf!==Object.prototype.valueOf)return u.valueOf()===l.valueOf();if(u.toString!==Object.prototype.toString)return u.toString()===l.toString();if((v=(M=Object.keys(u)).length)!==Object.keys(l).length)return!1;for(E=v;0!=E--;)if(!Object.prototype.hasOwnProperty.call(l,M[E]))return!1;for(E=v;0!=E--;){var s=M[E];if(!n(u[s],l[s]))return!1}return!0}return u!=u&&l!=l}},44770:q=>{"use strict";q.exports=function(n,u){for(var l={},v=Object.keys(n),E=Array.isArray(u),M=0;M{"use strict";var l=u(27566),v=Object.prototype.toString,E=Object.prototype.hasOwnProperty,M=function(d,p,m){for(var S=0,_=d.length;S<_;S++)E.call(d,S)&&(null==m?p(d[S],S,d):p.call(m,d[S],S,d))},s=function(d,p,m){for(var S=0,_=d.length;S<_;S++)null==m?p(d.charAt(S),S,d):p.call(m,d.charAt(S),S,d)},g=function(d,p,m){for(var S in d)E.call(d,S)&&(null==m?p(d[S],S,d):p.call(m,d[S],S,d))};q.exports=function(d,p,m){if(!l(p))throw new TypeError("iterator must be a function");var S;arguments.length>=3&&(S=m),"[object Array]"===v.call(d)?M(d,p,S):"string"==typeof d?s(d,p,S):g(d,p,S)}},7480:q=>{var n=Object.prototype.hasOwnProperty,u=Object.prototype.toString;q.exports=function(v,E,M){if("[object Function]"!==u.call(E))throw new TypeError("iterator must be a function");var s=v.length;if(s===+s)for(var g=0;g{"use strict";var n="Function.prototype.bind called on incompatible ",u=Object.prototype.toString,l=Math.max,v="[object Function]",E=function(y,f){for(var d=[],p=0;p{"use strict";var l=u(83457);q.exports=Function.prototype.bind||l},2997:(q,n,u)=>{var l=u(23874),v=u(14692),E=u(2313),M=new Buffer(0),s=function(){},g=function(d){return"function"==typeof d?d:function(p){p(null,d)}},y=function(d,p){var m=!1,S=!1;return d._read=function(){m=!0},d.destroy=function(){S=!0},p(function(_,D){if(_)return d.emit("error",_);var P=function(){for(var x;null!==(x=D.read());)m=!1,d.push(x)};if(D.on("readable",function(){m&&P()}),D.on("end",function(){P(),d.push(null)}),D.on("error",function(x){d.emit("error",x)}),D.on("close",function(){P(),process.nextTick(function(){d.emit("close")})}),d._read=function(){m=!0,P()},d.destroy=function(){S||(S=!0,D.destroy&&D.destroy())},S)return S=!1,void d.destroy();m&&P()}),d},f=function(d,p){var m=s,S=!1;return d._write=function(_,D,P){m=P},d.destroy=function(){S=!0},d.write(M),p(function(_,D){if(_)return d.emit("error",_);D.on("close",function(){d.emit("close")}),D.on("error",function(x){d.emit("error",x)}),d._write=function(x,C,N){if(x===M)return N();D.write(x,C,N)};var P=d.emit;if(D.on("finish",function(){P.call(d,"finish")}),d.destroy=function(){S||(S=!0,D.destroy&&D.destroy())},d.emit=function(x){if("finish"!==x)return P.apply(d,arguments);D.end()},S)return S=!1,void d.destroy();m()}),d};n.readable=function(d,p){return 1===arguments.length?n.readable(null,d):(d||(d={}),y(new v(d),g(p)))},n.writable=function(d,p){return 1===arguments.length?n.writable(null,d):(d||(d={}),f(new l(d),g(p)))},n.duplex=function(d,p,m){if(2===arguments.length)return n.duplex(null,d,p);d||(d={});var S=new E(d);return f(S,g(p)),y(S,g(m)),S}},51206:q=>{q.exports=Array.isArray||function(n){return"[object Array]"==Object.prototype.toString.call(n)}},2313:(q,n,u)=>{q.exports=u(52652)},52652:(q,n,u)=>{q.exports=s;var l=Object.keys||function(f){var d=[];for(var p in f)d.push(p);return d},v=u(26156);v.inherits=u(83894);var E=u(15890),M=u(19859);function s(f){if(!(this instanceof s))return new s(f);E.call(this,f),M.call(this,f),f&&!1===f.readable&&(this.readable=!1),f&&!1===f.writable&&(this.writable=!1),this.allowHalfOpen=!0,f&&!1===f.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",g)}function g(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}v.inherits(s,E),function y(f,d){for(var p=0,m=f.length;p{q.exports=E;var l=u(59735),v=u(26156);function E(M){if(!(this instanceof E))return new E(M);l.call(this,M)}v.inherits=u(83894),v.inherits(E,l),E.prototype._transform=function(M,s,g){g(null,M)}},15890:(q,n,u)=>{q.exports=f;var l=u(51206),v=u(93172).Buffer;f.ReadableState=y;var E=u(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(o,h){return o.listeners(h).length});var g,M=u(295),s=u(26156);function y(o,h){var w=(o=o||{}).highWaterMark;this.highWaterMark=w||0===w?w:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(g||(g=u(15453).s),this.decoder=new g(o.encoding),this.encoding=o.encoding)}function f(o){if(!(this instanceof f))return new f(o);this._readableState=new y(o,this),this.readable=!0,M.call(this)}function d(o,h,w,I,R){var V=function D(o,h){var w=null;return!v.isBuffer(h)&&"string"!=typeof h&&null!=h&&!o.objectMode&&(w=new TypeError("Invalid non-string/buffer chunk")),w}(h,w);if(V)o.emit("error",V);else if(null==w)h.reading=!1,h.ended||function P(o,h){if(h.decoder&&!h.ended){var w=h.decoder.end();w&&w.length&&(h.buffer.push(w),h.length+=h.objectMode?1:w.length)}h.ended=!0,h.length>0?x(o):j(o)}(o,h);else if(h.objectMode||w&&w.length>0)if(h.ended&&!R){var H=new Error("stream.push() after EOF");o.emit("error",H)}else if(h.endEmitted&&R){H=new Error("stream.unshift() after end event");o.emit("error",H)}else h.decoder&&!R&&!I&&(w=h.decoder.write(w)),h.length+=h.objectMode?1:w.length,R?h.buffer.unshift(w):(h.reading=!1,h.buffer.push(w)),h.needReadable&&x(o),function N(o,h){h.readingMore||(h.readingMore=!0,process.nextTick(function(){!function k(o,h){for(var w=h.length;!h.reading&&!h.flowing&&!h.ended&&h.lengthh.highWaterMark&&(h.highWaterMark=function S(o){if(o>=m)o=m;else{o--;for(var h=1;h<32;h<<=1)o|=o>>h;o++}return o}(o)),o>h.length?h.ended?h.length:(h.needReadable=!0,0):o)}function x(o){var h=o._readableState;h.needReadable=!1,!h.emittedReadable&&(h.emittedReadable=!0,h.sync?process.nextTick(function(){C(o)}):C(o))}function C(o){o.emit("readable")}function z(o){var w,h=o._readableState;function I(R,V,H){!1===R.write(w)&&h.awaitDrain++}for(h.awaitDrain=0;h.pipesCount&&null!==(w=o.read());)if(1===h.pipesCount?I(h.pipes):Z(h.pipes,I),o.emit("data",w),h.awaitDrain>0)return;if(0===h.pipesCount)return h.flowing=!1,void(E.listenerCount(o,"data")>0&&G(o));h.ranOut=!0}function Y(){this._readableState.ranOut&&(this._readableState.ranOut=!1,z(this))}function G(o,h){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var I=h||!1,R=!1;o.readable=!0,o.pipe=M.prototype.pipe,o.on=o.addListener=M.prototype.on,o.on("readable",function(){R=!0;for(var V;!I&&null!==(V=o.read());)o.emit("data",V);null===V&&(R=!1,o._readableState.needReadable=!0)}),o.pause=function(){I=!0,this.emit("pause")},o.resume=function(){I=!1,R?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function F(o,h){var H,w=h.buffer,I=h.length,R=!!h.decoder,V=!!h.objectMode;if(0===w.length)return null;if(0===I)H=null;else if(V)H=w.shift();else if(!o||o>=I)H=R?w.join(""):v.concat(w,I),w.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!h.endEmitted&&h.calledRead&&(h.ended=!0,process.nextTick(function(){!h.endEmitted&&0===h.length&&(h.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function Z(o,h){for(var w=0,I=o.length;w0)&&(h.emittedReadable=!1),0===o&&h.needReadable&&(h.length>=h.highWaterMark||h.ended))return x(this),null;if(0===(o=_(o,h))&&h.ended)return I=null,h.length>0&&h.decoder&&(I=F(o,h),h.length-=I.length),0===h.length&&j(this),I;var R=h.needReadable;return h.length-o<=h.highWaterMark&&(R=!0),(h.ended||h.reading)&&(R=!1),R&&(h.reading=!0,h.sync=!0,0===h.length&&(h.needReadable=!0),this._read(h.highWaterMark),h.sync=!1),R&&!h.reading&&(o=_(w,h)),null===(I=o>0?F(o,h):null)&&(h.needReadable=!0,o=0),h.length-=o,0===h.length&&!h.ended&&(h.needReadable=!0),h.ended&&!h.endEmitted&&0===h.length&&j(this),I},f.prototype._read=function(o){this.emit("error",new Error("not implemented"))},f.prototype.pipe=function(o,h){var w=this,I=this._readableState;switch(I.pipesCount){case 0:I.pipes=o;break;case 1:I.pipes=[I.pipes,o];break;default:I.pipes.push(o)}I.pipesCount+=1;var V=(!h||!1!==h.end)&&o!==process.stdout&&o!==process.stderr?L:B;function H(ge){ge===w&&B()}function L(){o.end()}I.endEmitted?process.nextTick(V):w.once("end",V),o.on("unpipe",H);var b=function U(o){return function(){var w=o._readableState;w.awaitDrain--,0===w.awaitDrain&&z(o)}}(w);function B(){o.removeListener("close",ne),o.removeListener("finish",te),o.removeListener("drain",b),o.removeListener("error",re),o.removeListener("unpipe",H),w.removeListener("end",L),w.removeListener("end",B),(!o._writableState||o._writableState.needDrain)&&b()}function re(ge){ae(),o.removeListener("error",re),0===E.listenerCount(o,"error")&&o.emit("error",ge)}function ne(){o.removeListener("finish",te),ae()}function te(){o.removeListener("close",ne),ae()}function ae(){w.unpipe(o)}return o.on("drain",b),o._events&&o._events.error?l(o._events.error)?o._events.error.unshift(re):o._events.error=[re,o._events.error]:o.on("error",re),o.once("close",ne),o.once("finish",te),o.emit("pipe",w),I.flowing||(this.on("readable",Y),I.flowing=!0,process.nextTick(function(){z(w)})),o},f.prototype.unpipe=function(o){var h=this._readableState;if(0===h.pipesCount)return this;if(1===h.pipesCount)return o&&o!==h.pipes||(o||(o=h.pipes),h.pipes=null,h.pipesCount=0,this.removeListener("readable",Y),h.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var w=h.pipes,I=h.pipesCount;h.pipes=null,h.pipesCount=0,this.removeListener("readable",Y),h.flowing=!1;for(var R=0;R"u"&&(this[R]=function(H){return function(){return o[H].apply(o,arguments)}}(R));return Z(["error","close","destroy","pause","resume"],function(H){o.on(H,I.emit.bind(I,H))}),I._read=function(H){w&&(w=!1,o.resume())},I},f._fromList=F},59735:(q,n,u)=>{q.exports=s;var l=u(52652),v=u(26156);function E(y,f){this.afterTransform=function(d,p){return function M(y,f,d){var p=y._transformState;p.transforming=!1;var m=p.writecb;if(!m)return y.emit("error",new Error("no writecb in Transform class"));p.writechunk=null,p.writecb=null,null!=d&&y.push(d),m&&m(f);var S=y._readableState;S.reading=!1,(S.needReadable||S.length{q.exports=g;var l=u(93172).Buffer;g.WritableState=s;var v=u(26156);v.inherits=u(83894);var E=u(295);function M(z,Y,G){this.chunk=z,this.encoding=Y,this.callback=G}function s(z,Y){var G=(z=z||{}).highWaterMark;this.highWaterMark=G||0===G?G:16384,this.objectMode=!!z.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var F=!1===z.decodeStrings;this.decodeStrings=!F,this.defaultEncoding=z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(j){!function D(z,Y){var G=z._writableState,F=G.sync,j=G.writecb;if(function _(z){z.writing=!1,z.writecb=null,z.length-=z.writelen,z.writelen=0}(G),Y)!function S(z,Y,G,F,j){G?process.nextTick(function(){j(F)}):j(F),z._writableState.errorEmitted=!0,z.emit("error",F)}(z,0,F,Y,j);else{var Z=N(z,G);!Z&&!G.bufferProcessing&&G.buffer.length&&function C(z,Y){Y.bufferProcessing=!0;for(var G=0;G{var l=u(295);(n=q.exports=u(15890)).Stream=l,n.Readable=n,n.Writable=u(19859),n.Duplex=u(52652),n.Transform=u(59735),n.PassThrough=u(72936),!process.browser&&"disable"===process.env.READABLE_STREAM&&(q.exports=u(295))},23874:(q,n,u)=>{q.exports=u(19859)},91227:(q,n,u)=>{for(var l=u(26788),v=u(37549),E=/[\{\[]/,M=/[\}\]]/,s=["do","if","in","for","let","new","try","var","case","else","enum","eval","null","this","true","void","with","await","break","catch","class","const","false","super","throw","while","yield","delete","export","import","public","return","static","switch","typeof","default","extends","finally","package","private","continue","debugger","function","arguments","interface","protected","implements","instanceof","NaN","undefined"],g={},y=0;y-1)for(var N=C.trim().split("\n"),k=0;k{var l=u(37549),v=function(E,M){return l(M)?E+"."+M:E+"["+JSON.stringify(M)+"]"};v.valid=l,v.property=function(E){return l(E)?E:JSON.stringify(E)},q.exports=v},95203:(q,n,u)=>{"use strict";var l,v=u(91847),E=u(3644),M=u(1298),s=u(42681),g=u(75917),y=u(92844),f=u(87289),d=Function,p=function(H){try{return d('"use strict"; return ('+H+").constructor;")()}catch{}},m=Object.getOwnPropertyDescriptor;if(m)try{m({},"")}catch{m=null}var S=function(){throw new y},_=m?function(){try{return arguments.callee,S}catch{try{return m(arguments,"callee").get}catch{return S}}}():S,D=u(92969)(),P=u(49757)(),x=Object.getPrototypeOf||(P?function(H){return H.__proto__}:null),C={},N=typeof Uint8Array>"u"||!x?l:x(Uint8Array),k={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?l:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?l:ArrayBuffer,"%ArrayIteratorPrototype%":D&&x?x([][Symbol.iterator]()):l,"%AsyncFromSyncIteratorPrototype%":l,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics>"u"?l:Atomics,"%BigInt%":typeof BigInt>"u"?l:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?l:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?l:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?l:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":v,"%eval%":eval,"%EvalError%":E,"%Float32Array%":typeof Float32Array>"u"?l:Float32Array,"%Float64Array%":typeof Float64Array>"u"?l:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?l:FinalizationRegistry,"%Function%":d,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array>"u"?l:Int8Array,"%Int16Array%":typeof Int16Array>"u"?l:Int16Array,"%Int32Array%":typeof Int32Array>"u"?l:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&x?x(x([][Symbol.iterator]())):l,"%JSON%":"object"==typeof JSON?JSON:l,"%Map%":typeof Map>"u"?l:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!x?l:x((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?l:Promise,"%Proxy%":typeof Proxy>"u"?l:Proxy,"%RangeError%":M,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?l:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?l:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!x?l:x((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?l:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&x?x(""[Symbol.iterator]()):l,"%Symbol%":D?Symbol:l,"%SyntaxError%":g,"%ThrowTypeError%":_,"%TypedArray%":N,"%TypeError%":y,"%Uint8Array%":typeof Uint8Array>"u"?l:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?l:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?l:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?l:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?l:WeakMap,"%WeakRef%":typeof WeakRef>"u"?l:WeakRef,"%WeakSet%":typeof WeakSet>"u"?l:WeakSet};if(x)try{null.error}catch(H){var U=x(x(H));k["%Error.prototype%"]=U}var z=function H(L){var b;if("%AsyncFunction%"===L)b=p("async function () {}");else if("%GeneratorFunction%"===L)b=p("function* () {}");else if("%AsyncGeneratorFunction%"===L)b=p("async function* () {}");else if("%AsyncGenerator%"===L){var B=H("%AsyncGeneratorFunction%");B&&(b=B.prototype)}else if("%AsyncIteratorPrototype%"===L){var re=H("%AsyncGenerator%");re&&x&&(b=x(re.prototype))}return k[L]=b,b},Y={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},G=u(84444),F=u(27699),j=G.call(Function.call,Array.prototype.concat),Z=G.call(Function.apply,Array.prototype.splice),T=G.call(Function.call,String.prototype.replace),o=G.call(Function.call,String.prototype.slice),h=G.call(Function.call,RegExp.prototype.exec),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,R=function(L){var b=o(L,0,1),B=o(L,-1);if("%"===b&&"%"!==B)throw new g("invalid intrinsic syntax, expected closing `%`");if("%"===B&&"%"!==b)throw new g("invalid intrinsic syntax, expected opening `%`");var re=[];return T(L,w,function(ne,te,ae,ge){re[re.length]=ae?T(ge,I,"$1"):te||ne}),re},V=function(L,b){var re,B=L;if(F(Y,B)&&(B="%"+(re=Y[B])[0]+"%"),F(k,B)){var ne=k[B];if(ne===C&&(ne=z(B)),typeof ne>"u"&&!b)throw new y("intrinsic "+L+" exists, but is not available. Please file an issue!");return{alias:re,name:B,value:ne}}throw new g("intrinsic "+L+" does not exist!")};q.exports=function(L,b){if("string"!=typeof L||0===L.length)throw new y("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof b)throw new y('"allowMissing" argument must be a boolean');if(null===h(/^%?[^%]*%?$/,L))throw new g("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=R(L),re=B.length>0?B[0]:"",ne=V("%"+re+"%",b),te=ne.name,ae=ne.value,ge=!1,pe=ne.alias;pe&&(re=pe[0],Z(B,j([0,1],pe)));for(var we=1,ce=!0;we=B.length){var he=m(ae,le);ae=(ce=!!he)&&"get"in he&&!("originalValue"in he.get)?he.get:ae[le]}else ce=F(ae,le),ae=ae[le];ce&&!ge&&(k[te]=ae)}}return ae}},47378:(q,n,u)=>{"use strict";var v=u(95203)("%Object.getOwnPropertyDescriptor%",!0);if(v)try{v([],"length")}catch{v=null}q.exports=v},77027:(q,n,u)=>{"use strict";var l=u(33907),v=function(){return!!l};v.hasArrayLengthDefineBug=function(){if(!l)return null;try{return 1!==l([],"length",{value:1}).length}catch{return!0}},q.exports=v},49757:q=>{"use strict";var n={__proto__:null,foo:{}},u=Object;q.exports=function(){return{__proto__:n}.foo===n.foo&&!(n instanceof u)}},92969:(q,n,u)=>{"use strict";var l=typeof Symbol<"u"&&Symbol,v=u(81983);q.exports=function(){return"function"==typeof l&&"function"==typeof Symbol&&"symbol"==typeof l("foo")&&"symbol"==typeof Symbol("bar")&&v()}},81983:q=>{"use strict";q.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var u={},l=Symbol("test"),v=Object(l);if("string"==typeof l||"[object Symbol]"!==Object.prototype.toString.call(l)||"[object Symbol]"!==Object.prototype.toString.call(v))return!1;for(l in u[l]=42,u)return!1;if("function"==typeof Object.keys&&0!==Object.keys(u).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(u).length)return!1;var M=Object.getOwnPropertySymbols(u);if(1!==M.length||M[0]!==l||!Object.prototype.propertyIsEnumerable.call(u,l))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var s=Object.getOwnPropertyDescriptor(u,l);if(42!==s.value||!0!==s.enumerable)return!1}return!0}},46259:(q,n,u)=>{"use strict";var l=u(81983);q.exports=function(){return l()&&!!Symbol.toStringTag}},37084:(q,n,u)=>{var l=n;l.utils=u(29299),l.common=u(33800),l.sha=u(54962),l.ripemd=u(99458),l.hmac=u(12194),l.sha1=l.sha.sha1,l.sha256=l.sha.sha256,l.sha224=l.sha.sha224,l.sha384=l.sha.sha384,l.sha512=l.sha.sha512,l.ripemd160=l.ripemd.ripemd160},33800:(q,n,u)=>{"use strict";var l=u(29299),v=u(32391);function E(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}n.BlockHash=E,E.prototype.update=function(s,g){if(s=l.toArray(s,g),this.pending?this.pending=this.pending.concat(s):this.pending=s,this.pendingTotal+=s.length,this.pending.length>=this._delta8){var y=(s=this.pending).length%this._delta8;this.pending=s.slice(s.length-y,s.length),0===this.pending.length&&(this.pending=null),s=l.join32(s,0,s.length-y,this.endian);for(var f=0;f>>24&255,f[d++]=s>>>16&255,f[d++]=s>>>8&255,f[d++]=255&s}else for(f[d++]=255&s,f[d++]=s>>>8&255,f[d++]=s>>>16&255,f[d++]=s>>>24&255,f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=0,p=8;p{"use strict";var l=u(29299),v=u(32391);function E(M,s,g){if(!(this instanceof E))return new E(M,s,g);this.Hash=M,this.blockSize=M.blockSize/8,this.outSize=M.outSize/8,this.inner=null,this.outer=null,this._init(l.toArray(s,g))}q.exports=E,E.prototype._init=function(s){s.length>this.blockSize&&(s=(new this.Hash).update(s).digest()),v(s.length<=this.blockSize);for(var g=s.length;g{"use strict";var l=u(29299),v=u(33800),E=l.rotl32,M=l.sum32,s=l.sum32_3,g=l.sum32_4,y=v.BlockHash;function f(){if(!(this instanceof f))return new f;y.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(x,C,N,k){return x<=15?C^N^k:x<=31?C&N|~C&k:x<=47?(C|~N)^k:x<=63?C&k|N&~k:C^(N|~k)}function m(x){return x<=15?1352829926:x<=31?1548603684:x<=47?1836072691:x<=63?2053994217:0}l.inherits(f,y),n.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(C,N){for(var k=this.h[0],U=this.h[1],z=this.h[2],Y=this.h[3],G=this.h[4],F=k,j=U,Z=z,T=Y,o=G,h=0;h<80;h++){var w=M(E(g(k,d(h,U,z,Y),C[S[h]+N],(x=h)<=15?0:x<=31?1518500249:x<=47?1859775393:x<=63?2400959708:2840853838),D[h]),G);k=G,G=Y,Y=E(z,10),z=U,U=w,w=M(E(g(F,d(79-h,j,Z,T),C[_[h]+N],m(h)),P[h]),o),F=o,o=T,T=E(Z,10),Z=j,j=w}var x;w=s(this.h[1],z,T),this.h[1]=s(this.h[2],Y,o),this.h[2]=s(this.h[3],G,F),this.h[3]=s(this.h[4],k,j),this.h[4]=s(this.h[0],U,Z),this.h[0]=w},f.prototype._digest=function(C){return"hex"===C?l.toHex32(this.h,"little"):l.split32(this.h,"little")};var S=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],_=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],D=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],P=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},54962:(q,n,u)=>{"use strict";n.sha1=u(59007),n.sha224=u(10055),n.sha256=u(19342),n.sha384=u(88634),n.sha512=u(70039)},59007:(q,n,u)=>{"use strict";var l=u(29299),v=u(33800),E=u(33113),M=l.rotl32,s=l.sum32,g=l.sum32_5,y=E.ft_1,f=v.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}l.inherits(p,f),q.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(S,_){for(var D=this.W,P=0;P<16;P++)D[P]=S[_+P];for(;P{"use strict";var l=u(29299),v=u(19342);function E(){if(!(this instanceof E))return new E;v.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}l.inherits(E,v),q.exports=E,E.blockSize=512,E.outSize=224,E.hmacStrength=192,E.padLength=64,E.prototype._digest=function(s){return"hex"===s?l.toHex32(this.h.slice(0,7),"big"):l.split32(this.h.slice(0,7),"big")}},19342:(q,n,u)=>{"use strict";var l=u(29299),v=u(33800),E=u(33113),M=u(32391),s=l.sum32,g=l.sum32_4,y=l.sum32_5,f=E.ch32,d=E.maj32,p=E.s0_256,m=E.s1_256,S=E.g0_256,_=E.g1_256,D=v.BlockHash,P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function x(){if(!(this instanceof x))return new x;D.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=P,this.W=new Array(64)}l.inherits(x,D),q.exports=x,x.blockSize=512,x.outSize=256,x.hmacStrength=192,x.padLength=64,x.prototype._update=function(N,k){for(var U=this.W,z=0;z<16;z++)U[z]=N[k+z];for(;z{"use strict";var l=u(29299),v=u(70039);function E(){if(!(this instanceof E))return new E;v.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}l.inherits(E,v),q.exports=E,E.blockSize=1024,E.outSize=384,E.hmacStrength=192,E.padLength=128,E.prototype._digest=function(s){return"hex"===s?l.toHex32(this.h.slice(0,12),"big"):l.split32(this.h.slice(0,12),"big")}},70039:(q,n,u)=>{"use strict";var l=u(29299),v=u(33800),E=u(32391),M=l.rotr64_hi,s=l.rotr64_lo,g=l.shr64_hi,y=l.shr64_lo,f=l.sum64,d=l.sum64_hi,p=l.sum64_lo,m=l.sum64_4_hi,S=l.sum64_4_lo,_=l.sum64_5_hi,D=l.sum64_5_lo,P=v.BlockHash,x=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function C(){if(!(this instanceof C))return new C;P.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=x,this.W=new Array(160)}function N(w,I,R,V,H){var L=w&R^~w&H;return L<0&&(L+=4294967296),L}function k(w,I,R,V,H,L){var b=I&V^~I&L;return b<0&&(b+=4294967296),b}function U(w,I,R,V,H){var L=w&R^w&H^R&H;return L<0&&(L+=4294967296),L}function z(w,I,R,V,H,L){var b=I&V^I&L^V&L;return b<0&&(b+=4294967296),b}function Y(w,I){var L=M(w,I,28)^M(I,w,2)^M(I,w,7);return L<0&&(L+=4294967296),L}function G(w,I){var L=s(w,I,28)^s(I,w,2)^s(I,w,7);return L<0&&(L+=4294967296),L}function F(w,I){var L=M(w,I,14)^M(w,I,18)^M(I,w,9);return L<0&&(L+=4294967296),L}function j(w,I){var L=s(w,I,14)^s(w,I,18)^s(I,w,9);return L<0&&(L+=4294967296),L}function Z(w,I){var L=M(w,I,1)^M(w,I,8)^g(w,I,7);return L<0&&(L+=4294967296),L}function T(w,I){var L=s(w,I,1)^s(w,I,8)^y(w,I,7);return L<0&&(L+=4294967296),L}function o(w,I){var L=M(w,I,19)^M(I,w,29)^g(w,I,6);return L<0&&(L+=4294967296),L}function h(w,I){var L=s(w,I,19)^s(I,w,29)^y(w,I,6);return L<0&&(L+=4294967296),L}l.inherits(C,P),q.exports=C,C.blockSize=1024,C.outSize=512,C.hmacStrength=192,C.padLength=128,C.prototype._prepareBlock=function(I,R){for(var V=this.W,H=0;H<32;H++)V[H]=I[R+H];for(;H{"use strict";var v=u(29299).rotr32;function M(m,S,_){return m&S^~m&_}function s(m,S,_){return m&S^m&_^S&_}function g(m,S,_){return m^S^_}n.ft_1=function E(m,S,_,D){return 0===m?M(S,_,D):1===m||3===m?g(S,_,D):2===m?s(S,_,D):void 0},n.ch32=M,n.maj32=s,n.p32=g,n.s0_256=function y(m){return v(m,2)^v(m,13)^v(m,22)},n.s1_256=function f(m){return v(m,6)^v(m,11)^v(m,25)},n.g0_256=function d(m){return v(m,7)^v(m,18)^m>>>3},n.g1_256=function p(m){return v(m,17)^v(m,19)^m>>>10}},29299:(q,n,u)=>{"use strict";var l=u(32391),v=u(83894);function E(h,w){return!(55296!=(64512&h.charCodeAt(w))||w<0||w+1>=h.length)&&56320==(64512&h.charCodeAt(w+1))}function g(h){return(h>>>24|h>>>8&65280|h<<8&16711680|(255&h)<<24)>>>0}function f(h){return 1===h.length?"0"+h:h}function d(h){return 7===h.length?"0"+h:6===h.length?"00"+h:5===h.length?"000"+h:4===h.length?"0000"+h:3===h.length?"00000"+h:2===h.length?"000000"+h:1===h.length?"0000000"+h:h}n.inherits=v,n.toArray=function M(h,w){if(Array.isArray(h))return h.slice();if(!h)return[];var I=[];if("string"==typeof h)if(w){if("hex"===w)for((h=h.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(h="0"+h),V=0;V>6|192,I[R++]=63&H|128):E(h,V)?(H=65536+((1023&H)<<10)+(1023&h.charCodeAt(++V)),I[R++]=H>>18|240,I[R++]=H>>12&63|128,I[R++]=H>>6&63|128,I[R++]=63&H|128):(I[R++]=H>>12|224,I[R++]=H>>6&63|128,I[R++]=63&H|128)}else for(V=0;V>>0}return H},n.split32=function m(h,w){for(var I=new Array(4*h.length),R=0,V=0;R>>24,I[V+1]=H>>>16&255,I[V+2]=H>>>8&255,I[V+3]=255&H):(I[V+3]=H>>>24,I[V+2]=H>>>16&255,I[V+1]=H>>>8&255,I[V]=255&H)}return I},n.rotr32=function S(h,w){return h>>>w|h<<32-w},n.rotl32=function _(h,w){return h<>>32-w},n.sum32=function D(h,w){return h+w>>>0},n.sum32_3=function P(h,w,I){return h+w+I>>>0},n.sum32_4=function x(h,w,I,R){return h+w+I+R>>>0},n.sum32_5=function C(h,w,I,R,V){return h+w+I+R+V>>>0},n.sum64=function N(h,w,I,R){var V=h[w],L=R+h[w+1]>>>0,b=(L>>0,h[w+1]=L},n.sum64_hi=function k(h,w,I,R){return(w+R>>>0>>0},n.sum64_lo=function U(h,w,I,R){return w+R>>>0},n.sum64_4_hi=function z(h,w,I,R,V,H,L,b){var B=0,re=w;return B+=(re=re+R>>>0)>>0)>>0)>>0},n.sum64_4_lo=function Y(h,w,I,R,V,H,L,b){return w+R+H+b>>>0},n.sum64_5_hi=function G(h,w,I,R,V,H,L,b,B,re){var ne=0,te=w;return ne+=(te=te+R>>>0)>>0)>>0)>>0)>>0},n.sum64_5_lo=function F(h,w,I,R,V,H,L,b,B,re){return w+R+H+b+re>>>0},n.rotr64_hi=function j(h,w,I){return(w<<32-I|h>>>I)>>>0},n.rotr64_lo=function Z(h,w,I){return(h<<32-I|w>>>I)>>>0},n.shr64_hi=function T(h,w,I){return h>>>I},n.shr64_lo=function o(h,w,I){return(h<<32-I|w>>>I)>>>0}},27699:(q,n,u)=>{"use strict";var l=Function.prototype.call,v=Object.prototype.hasOwnProperty,E=u(84444);q.exports=E.call(l,v)},52438:(q,n,u)=>{"use strict";var l=u(37084),v=u(58195),E=u(32391);function M(s){if(!(this instanceof M))return new M(s);this.hash=s.hash,this.predResist=!!s.predResist,this.outLen=this.hash.outSize,this.minEntropy=s.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var g=v.toArray(s.entropy,s.entropyEnc||"hex"),y=v.toArray(s.nonce,s.nonceEnc||"hex"),f=v.toArray(s.pers,s.persEnc||"hex");E(g.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(g,y,f)}q.exports=M,M.prototype._init=function(g,y,f){var d=g.concat(y).concat(f);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var p=0;p=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(g.concat(f||[])),this._reseed=1},M.prototype.generate=function(g,y,f,d){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof y&&(d=f,f=y,y=null),f&&(f=v.toArray(f,d||"hex"),this._update(f));for(var p=[];p.length{"use strict";var l=u(57390)("http-errors"),v=u(59607),E=u(17595),M=u(53015),s=u(65068);function g(_){return Number(String(_).charAt(0)+"00")}function m(_,D){var P=Object.getOwnPropertyDescriptor(_,"name");P&&P.configurable&&(P.value=D,Object.defineProperty(_,"name",P))}q.exports=function y(){for(var _,D,P=500,x={},C=0;C=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof P||!E[P]&&(P<400||P>=600))&&(P=500);var k=y[P]||y[g(P)];for(var U in _||(_=k?new k(D):new Error(D||E[P]),Error.captureStackTrace(_,y)),(!k||!(_ instanceof k)||_.status!==P)&&(_.expose=P<500,_.status=_.statusCode=P),x)"status"!==U&&"statusCode"!==U&&(_[U]=x[U]);return _},q.exports.HttpError=function f(){function _(){throw new TypeError("cannot construct abstract class")}return M(_,Error),_}(),function S(_,D,P){D.forEach(function(C){var N,k=s(E[C]);switch(g(C)){case 400:N=function d(_,D,P){var x=D.match(/Error$/)?D:D+"Error";function C(N){var k=N??E[P],U=new Error(k);return Error.captureStackTrace(U,C),v(U,C.prototype),Object.defineProperty(U,"message",{enumerable:!0,configurable:!0,value:k,writable:!0}),Object.defineProperty(U,"name",{enumerable:!1,configurable:!0,value:x,writable:!0}),U}return M(C,_),m(C,x),C.prototype.status=P,C.prototype.statusCode=P,C.prototype.expose=!0,C}(P,k,C);break;case 500:N=function p(_,D,P){var x=D.match(/Error$/)?D:D+"Error";function C(N){var k=N??E[P],U=new Error(k);return Error.captureStackTrace(U,C),v(U,C.prototype),Object.defineProperty(U,"message",{enumerable:!0,configurable:!0,value:k,writable:!0}),Object.defineProperty(U,"name",{enumerable:!1,configurable:!0,value:x,writable:!0}),U}return M(C,_),m(C,x),C.prototype.status=P,C.prototype.statusCode=P,C.prototype.expose=!1,C}(P,k,C)}N&&(_[C]=N,_[k]=N)}),_["I'mateapot"]=l.function(_.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(q.exports,E.codes,q.exports.HttpError)},57390:q=>{"use strict";function u(v,E){if("function"!=typeof v)throw new TypeError("argument fn must be a function");return v}function l(v,E,M){if(!v||"object"!=typeof v&&"function"!=typeof v)throw new TypeError("argument obj must be object");var s=Object.getOwnPropertyDescriptor(v,E);if(!s)throw new TypeError("must call property on owner object");if(!s.configurable)throw new TypeError("property must be configurable")}q.exports=function n(v){if(!v)throw new TypeError("argument namespace is required");function E(M){}return E._file=void 0,E._ignored=!0,E._namespace=v,E._traced=!1,E._warned=Object.create(null),E.function=u,E.property=l,E}},53015:q=>{"function"==typeof Object.create?q.exports=function(u,l){u.super_=l,u.prototype=Object.create(l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}})}:q.exports=function(u,l){u.super_=l;var v=function(){};v.prototype=l.prototype,u.prototype=new v,u.prototype.constructor=u}},59607:q=>{"use strict";q.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function n(l,v){return l.__proto__=v,l}:function u(l,v){for(var E in v)l.hasOwnProperty(E)||(l[E]=v[E]);return l})},17595:(q,n,u)=>{"use strict";var l=u(39526);function E(M){if("number"==typeof M){if(!E[M])throw new Error("invalid status code: "+M);return M}if("string"!=typeof M)throw new TypeError("code must be a number or string");var s=parseInt(M,10);if(!isNaN(s)){if(!E[s])throw new Error("invalid status code: "+s);return s}if(!(s=E[M.toLowerCase()]))throw new Error('invalid status message: "'+M+'"');return s}q.exports=E,E.STATUS_CODES=l,E.codes=function v(M,s){var g=[];return Object.keys(s).forEach(function(f){var d=s[f],p=Number(f);M[p]=d,M[d]=p,M[d.toLowerCase()]=p,g.push(p)}),g}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},65068:q=>{q.exports=function n(u){return u.split(" ").map(function(l){return l.slice(0,1).toUpperCase()+l.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},8806:(q,n,u)=>{var l=u(74216),v=u(68762),E=q.exports;for(var M in l)l.hasOwnProperty(M)&&(E[M]=l[M]);function s(g){if("string"==typeof g&&(g=v.parse(g)),g.protocol||(g.protocol="https:"),"https:"!==g.protocol)throw new Error('Protocol "'+g.protocol+'" not supported. Expected "https:"');return g}E.request=function(g,y){return g=s(g),l.request.call(this,g,y)},E.get=function(g,y){return g=s(g),l.get.call(this,g,y)}},17294:function(q,n,u){var l,v;!function(E,M,s){"use strict";l=function(){var E=function(m){throw m},M=function(){},s={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:E,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},g=function(m,S){for(var _ in typeof S>"u"&&"function"==typeof m&&(S=m),"[object Object]"!=Object.prototype.toString.call(m)&&(m={}),s)this[_]=typeof m[_]<"u"?m[_]:s[_];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,S&&(this.onStoreReady=S);var D="object"==typeof window?window:self,P=this.implementationPreference.filter(function(x){return x in D});this.implementation=P[0],this.idb=D[this.implementation],this.keyRange=D.IDBKeyRange||D.webkitIDBKeyRange||D.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},y={constructor:g,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var m=this.idb.open(this.dbName,this.dbVersion),S=!1;m.onerror=function(_){if(p(_))this.onError(new Error("The version number provided is lower than the existing one."));else{var D;if(_.target.error)D=_.target.error;else{var P="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in _.target&&(P+=" with error code "+_.target.errorCode),D=new Error(P)}this.onError(D)}}.bind(this),m.onsuccess=function(_){if(!S){if(this.db)return void this.onStoreReady();if(this.db=_.target.result,"string"==typeof this.db.version)return void this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));if(!this.db.objectStoreNames.contains(this.storeName))return void this.onError(new Error("Object store couldn't be created."));var D=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=D.objectStore(this.storeName);var P=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(x){var C=x.name;if(!C)return S=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(x),this.hasIndex(C)){var N=this.store.index(C);this.indexComplies(N,x)||(S=!0,this.onError(new Error('Cannot modify index "'+C+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),P.splice(P.indexOf(C),1)}else S=!0,this.onError(new Error('Cannot create new index "'+C+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))},this),P.length&&(S=!0,this.onError(new Error('Cannot delete index(es) "'+P.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),S||this.onStoreReady()}}.bind(this),m.onupgradeneeded=function(_){if(this.db=_.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=_.target.transaction.objectStore(this.storeName);else{var D={autoIncrement:this.autoIncrement};null!==this.keyPath&&(D.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,D)}var P=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(x){var C=x.name;if(C||(S=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(x),this.hasIndex(C)){var N=this.store.index(C);this.indexComplies(N,x)||(this.store.deleteIndex(C),this.store.createIndex(C,x.keyPath,{unique:x.unique,multiEntry:x.multiEntry})),P.splice(P.indexOf(C),1)}else this.store.createIndex(C,x.keyPath,{unique:x.unique,multiEntry:x.multiEntry})},this),P.length&&P.forEach(function(x){this.store.deleteIndex(x)},this)}.bind(this)},deleteDatabase:function(m,S){if(this.idb.deleteDatabase){this.db.close();var _=this.idb.deleteDatabase(this.dbName);_.onsuccess=m,_.onerror=S}else S(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(m,S,_,D){null!==this.keyPath&&(D=_,_=S,S=m),D||(D=E),_||(_=M);var C,P=!1,x=null,N=this.db.transaction([this.storeName],this.consts.READ_WRITE);return N.oncomplete=function(){(P?_:D)(x)},N.onabort=D,N.onerror=D,null!==this.keyPath?(this._addIdPropertyIfNeeded(S),C=N.objectStore(this.storeName).put(S)):C=N.objectStore(this.storeName).put(S,m),C.onsuccess=function(k){P=!0,x=k.target.result},C.onerror=D,N},get:function(m,S,_){_||(_=E),S||(S=M);var D=!1,P=null,x=this.db.transaction([this.storeName],this.consts.READ_ONLY);x.oncomplete=function(){(D?S:_)(P)},x.onabort=_,x.onerror=_;var C=x.objectStore(this.storeName).get(m);return C.onsuccess=function(N){D=!0,P=N.target.result},C.onerror=_,x},remove:function(m,S,_){_||(_=E),S||(S=M);var D=!1,P=null,x=this.db.transaction([this.storeName],this.consts.READ_WRITE);x.oncomplete=function(){(D?S:_)(P)},x.onabort=_,x.onerror=_;var C=x.objectStore(this.storeName).delete(m);return C.onsuccess=function(N){D=!0,P=N.target.result},C.onerror=_,x},batch:function(m,S,_){if(_||(_=E),S||(S=M),"[object Array]"!=Object.prototype.toString.call(m))_(new Error("dataArray argument must be of type Array."));else if(0===m.length)return S(!0);var D=m.length,P=!1,x=!1,C=this.db.transaction([this.storeName],this.consts.READ_WRITE);C.oncomplete=function(){(x?S:_)(x)},C.onabort=_,C.onerror=_;var N=function(){0===--D&&!P&&(P=!0,x=!0)};return m.forEach(function(k){var U=k.type,z=k.key,Y=k.value,G=function(Z){C.abort(),P||(P=!0,_(Z,U,z))};if("remove"==U){var F=C.objectStore(this.storeName).delete(z);F.onsuccess=N,F.onerror=G}else if("put"==U){var j;null!==this.keyPath?(this._addIdPropertyIfNeeded(Y),j=C.objectStore(this.storeName).put(Y)):j=C.objectStore(this.storeName).put(Y,z),j.onsuccess=N,j.onerror=G}},this),C},putBatch:function(m,S,_){var D=m.map(function(P){return{type:"put",value:P}});return this.batch(D,S,_)},upsertBatch:function(m,S,_,D){"function"==typeof S&&(D=_=S,S={}),D||(D=E),_||(_=M),S||(S={}),"[object Array]"!=Object.prototype.toString.call(m)&&D(new Error("dataArray argument must be of type Array."));var P=S.keyField||this.keyPath,x=m.length,C=!1,N=!1,k=0,U=this.db.transaction([this.storeName],this.consts.READ_WRITE);U.oncomplete=function(){N?_(m):D(!1)},U.onabort=D,U.onerror=D;var z=function(Y){m[k++][P]=Y.target.result,0===--x&&!C&&(C=!0,N=!0)};return m.forEach(function(Y){var j,G=Y.key,F=function(Z){U.abort(),C||(C=!0,D(Z))};null!==this.keyPath?(this._addIdPropertyIfNeeded(Y),j=U.objectStore(this.storeName).put(Y)):j=U.objectStore(this.storeName).put(Y,G),j.onsuccess=z,j.onerror=F},this),U},removeBatch:function(m,S,_){var D=m.map(function(P){return{type:"remove",key:P}});return this.batch(D,S,_)},getBatch:function(m,S,_,D){if(_||(_=E),S||(S=M),D||(D="sparse"),"[object Array]"!=Object.prototype.toString.call(m))_(new Error("keyArray argument must be of type Array."));else if(0===m.length)return S([]);var P=[],x=m.length,N=!1,k=null,U=this.db.transaction([this.storeName],this.consts.READ_ONLY);U.oncomplete=function(){(N?S:_)(k)},U.onabort=_,U.onerror=_;var z=function(Y){Y.target.result||"dense"==D?P.push(Y.target.result):"sparse"==D&&P.length++,0===--x&&(!0,N=!0,k=P)};return m.forEach(function(Y){var G=function(j){!0,k=j,_(j),U.abort()},F=U.objectStore(this.storeName).get(Y);F.onsuccess=z,F.onerror=G},this),U},getAll:function(m,S){S||(S=E),m||(m=M);var _=this.db.transaction([this.storeName],this.consts.READ_ONLY),D=_.objectStore(this.storeName);return D.getAll?this._getAllNative(_,D,m,S):this._getAllCursor(_,D,m,S),_},_getAllNative:function(m,S,_,D){var P=!1,x=null;m.oncomplete=function(){(P?_:D)(x)},m.onabort=D,m.onerror=D;var C=S.getAll();C.onsuccess=function(N){P=!0,x=N.target.result},C.onerror=D},_getAllCursor:function(m,S,_,D){var P=[],x=!1,C=null;m.oncomplete=function(){(x?_:D)(C)},m.onabort=D,m.onerror=D;var N=S.openCursor();N.onsuccess=function(k){var U=k.target.result;U?(P.push(U.value),U.continue()):(x=!0,C=P)},N.onError=D},clear:function(m,S){S||(S=E),m||(m=M);var _=!1,D=null,P=this.db.transaction([this.storeName],this.consts.READ_WRITE);P.oncomplete=function(){(_?m:S)(D)},P.onabort=S,P.onerror=S;var x=P.objectStore(this.storeName).clear();return x.onsuccess=function(C){_=!0,D=C.target.result},x.onerror=S,P},_addIdPropertyIfNeeded:function(m){typeof m[this.keyPath]>"u"&&(m[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(m){return this.store.indexNames.contains(m)},normalizeIndexData:function(m){m.keyPath=m.keyPath||m.name,m.unique=!!m.unique,m.multiEntry=!!m.multiEntry},indexComplies:function(m,S){return["keyPath","unique","multiEntry"].every(function(D){if("multiEntry"==D&&void 0===m[D]&&!1===S[D])return!0;if("keyPath"==D&&"[object Array]"==Object.prototype.toString.call(S[D])){var P=S.keyPath,x=m.keyPath;if("string"==typeof x)return P.toString()==x;if("function"!=typeof x.contains&&"function"!=typeof x.indexOf||x.length!==P.length)return!1;for(var C=0,N=P.length;C{n.read=function(u,l,v,E,M){var s,g,y=8*M-E-1,f=(1<>1,p=-7,m=v?M-1:0,S=v?-1:1,_=u[l+m];for(m+=S,s=_&(1<<-p)-1,_>>=-p,p+=y;p>0;s=256*s+u[l+m],m+=S,p-=8);for(g=s&(1<<-p)-1,s>>=-p,p+=E;p>0;g=256*g+u[l+m],m+=S,p-=8);if(0===s)s=1-d;else{if(s===f)return g?NaN:1/0*(_?-1:1);g+=Math.pow(2,E),s-=d}return(_?-1:1)*g*Math.pow(2,s-E)},n.write=function(u,l,v,E,M,s){var g,y,f,d=8*s-M-1,p=(1<>1,S=23===M?Math.pow(2,-24)-Math.pow(2,-77):0,_=E?0:s-1,D=E?1:-1,P=l<0||0===l&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(y=isNaN(l)?1:0,g=p):(g=Math.floor(Math.log(l)/Math.LN2),l*(f=Math.pow(2,-g))<1&&(g--,f*=2),(l+=g+m>=1?S/f:S*Math.pow(2,1-m))*f>=2&&(g++,f/=2),g+m>=p?(y=0,g=p):g+m>=1?(y=(l*f-1)*Math.pow(2,M),g+=m):(y=l*Math.pow(2,m-1)*Math.pow(2,M),g=0));M>=8;u[v+_]=255&y,_+=D,y/=256,M-=8);for(g=g<0;u[v+_]=255&g,_+=D,g/=256,d-=8);u[v+_-D]|=128*P}},83894:q=>{"function"==typeof Object.create?q.exports=function(u,l){l&&(u.super_=l,u.prototype=Object.create(l.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}))}:q.exports=function(u,l){if(l){u.super_=l;var v=function(){};v.prototype=l.prototype,u.prototype=new v,u.prototype.constructor=u}}},13407:(q,n,u)=>{"use strict";var l=u(46259)(),E=u(75834)("Object.prototype.toString"),M=function(f){return!(l&&f&&"object"==typeof f&&Symbol.toStringTag in f)&&"[object Arguments]"===E(f)},s=function(f){return!!M(f)||null!==f&&"object"==typeof f&&"number"==typeof f.length&&f.length>=0&&"[object Array]"!==E(f)&&"[object Function]"===E(f.callee)},g=function(){return M(arguments)}();M.isLegacyArguments=s,q.exports=g?M:s},27566:q=>{"use strict";var l,v,n=Function.prototype.toString,u="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof u&&"function"==typeof Object.defineProperty)try{l=Object.defineProperty({},"length",{get:function(){throw v}}),v={},u(function(){throw 42},null,l)}catch(C){C!==v&&(u=null)}else u=null;var E=/^\s*class\b/,M=function(N){try{var k=n.call(N);return E.test(k)}catch{return!1}},s=function(N){try{return!M(N)&&(n.call(N),!0)}catch{return!1}},g=Object.prototype.toString,_="function"==typeof Symbol&&!!Symbol.toStringTag,D=!(0 in[,]),P=function(){return!1};if("object"==typeof document){var x=document.all;g.call(x)===g.call(document.all)&&(P=function(N){if((D||!N)&&(typeof N>"u"||"object"==typeof N))try{var k=g.call(N);return("[object HTMLAllCollection]"===k||"[object HTML document.all class]"===k||"[object HTMLCollection]"===k||"[object Object]"===k)&&null==N("")}catch{}return!1})}q.exports=u?function(N){if(P(N))return!0;if(!N||"function"!=typeof N&&"object"!=typeof N)return!1;try{u(N,null,l)}catch(k){if(k!==v)return!1}return!M(N)&&s(N)}:function(N){if(P(N))return!0;if(!N||"function"!=typeof N&&"object"!=typeof N)return!1;if(_)return s(N);if(M(N))return!1;var k=g.call(N);return!("[object Function]"!==k&&"[object GeneratorFunction]"!==k&&!/^\[object HTML/.test(k))&&s(N)}},20110:(q,n,u)=>{"use strict";var y,l=Object.prototype.toString,v=Function.prototype.toString,E=/^\s*(?:function)?\*/,M=u(46259)(),s=Object.getPrototypeOf;q.exports=function(d){if("function"!=typeof d)return!1;if(E.test(v.call(d)))return!0;if(!M)return"[object GeneratorFunction]"===l.call(d);if(!s)return!1;if(typeof y>"u"){var m=function(){if(!M)return!1;try{return Function("return function*() {}")()}catch{}}();y=!!m&&s(m)}return s(d)===y}},48214:q=>{"use strict";q.exports=v,q.exports.isMobile=v,q.exports.default=v;const n=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,u=/CrOS/,l=/android|ipad|playbook|silk/i;function v(E){E||(E={});let M=E.ua;if(!M&&typeof navigator<"u"&&(M=navigator.userAgent),M&&M.headers&&"string"==typeof M.headers["user-agent"]&&(M=M.headers["user-agent"]),"string"!=typeof M)return!1;let s=n.test(M)&&!u.test(M)||!!E.tablet&&l.test(M);return!s&&E.tablet&&E.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==M.indexOf("Macintosh")&&-1!==M.indexOf("Safari")&&(s=!0),s}},81570:q=>{var n=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,u=/\/\d{1,3}(?=%|$)/,l=/\//,v=/%.*$/,E=/([^0-9a-f:/%])/i,M=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/i;function s(f){if(!n.test(f))return!1;var d=f.split(".");if(4!==d.length||"0"===d[0][0]&&d[0].length>1||"0"===d[1][0]&&d[1].length>1||"0"===d[2][0]&&d[2].length>1||"0"===d[3][0]&&d[3].length>1)return!1;var p=Number(d[0]),m=Number(d[1]),S=Number(d[2]),_=Number(d[3]);return p>=0&&p<256&&m>=0&&m<256&&S>=0&&S<256&&_>=0&&_<256}function g(f){var d=f.replace(u,""),p=f.length!==d.length;if(p||!p&&l.test(f))return!1;var m=d.replace(v,""),S=m.lastIndexOf(":");if(-1===S)return!1;var P=s(m.substring(S+1))?m.substring(0,S+1)+"1234:5678":m;if(E.test(P)||M.test(P))return!1;var x=P.split("::");if(x.length>2)return!1;if(2===x.length){var C=""===x[0]?[]:x[0].split(":"),N=""===x[1]?[]:x[1].split(":");if(8-(C.length+N.length)<=0)return!1}else if(8!==P.split(":").length)return!1;return!0}function y(f){return s(f)||g(f)}q.exports=function(d){if(d||(d={}),4===d.version)return s;if(6===d.version)return g;if(null==d.version)return y;throw new Error("Unknown version: "+d.version)},q.exports.__all_regexes__=[n,u,l,v,E,M]},1367:(q,n,u)=>{var l=u(81570),v=/\s/,E=/^[a-zA-Z0-9.-]+$/,M=/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/,s=/^\+[0-9][0-9 ]{5,27}[0-9]$/,g=/ {2}/,y=/ /g;n["date-time"]=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}[tT ]\d{2}:\d{2}:\d{2}(?:\.\d+|)([zZ]|[+-]\d{2}:\d{2})$/,n.date=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/,n.time=/^\d{2}:\d{2}:\d{2}$/,n.email=function(f){return-1!==f.indexOf("@")&&!v.test(f)},n["ip-address"]=n.ipv4=l({version:4}),n.ipv6=l({version:6}),n.uri=/^[a-zA-Z][a-zA-Z0-9+\-.]*:[^\s]*$/,n.color=/(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/,n.hostname=function(f){if(!E.test(f))return!1;for(var d=f.split("."),p=0;p=7&&d<=15},n["utc-millisec"]=/^[0-9]{1,15}\.?[0-9]{0,15}$/},28167:(q,n,u)=>{var l=u(32562),v=u(91227),E=u(6936),M=u(44703),s=u(1367),y={any:function(){return"true"},null:function(S){return S+" === null"},boolean:function(S){return"typeof "+S+' === "boolean"'},array:function(S){return"Array.isArray("+S+")"},object:function(S){return"typeof "+S+' === "object" && '+S+" && !Array.isArray("+S+")"},number:function(S){return"typeof "+S+' === "number" && isFinite('+S+")"},integer:function(S){return"typeof "+S+' === "number" && (Math.floor('+S+") === "+S+" || "+S+" > 9007199254740992 || "+S+" < -9007199254740992)"},string:function(S){return"typeof "+S+' === "string"'}},f=function(S,_){_=Math.min(-1===_?S.length:_,S.length);for(var D=[],P=0;P<_;P++)D.push("object"==typeof S[P]?JSON.stringify(S[P]):S[P]);for(P=1;P1?D=((0|S)!==S?Math.pow(10,S.toString().split(".").pop().length):1)>P||Math.round(P*S)%(P*_):D=S%_;return!D},p=function(S,_,D){return D>-1&&_.length>D||S.test(_)},m=function(S,_,D,P,x){var C=x?M(s,x.formats):s,N={unique:f,formats:C,isMultipleOf:d,testLimitedRegex:p},k=!!x&&!!x.verbose,U=!(!x||void 0===x.greedy)&&x.greedy,z={},Y=[],G=function(I){var R=I+(z[I]=(z[I]||0)+1);return Y.push(R),R},F=function(I){var R=JSON.stringify(I);try{for(var V=/\[([^\[\]"]+)\]/;V.test(R);)R=R.replace(V,H);return R}catch{return JSON.stringify(I)}function H(L,b){if(-1===Y.indexOf(b))throw new Error("Unreplaceable");return'." + '+b+' + "'}},j={},Z=function(I){if(j[I])return j[I];var R=G("pattern");return N[R]=new RegExp(I),j[I]=R,R},T=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"],o=function(){var I=T.shift();return T.push(I+I[0]),Y.push(I),I},h=function(I,R,V,H,L){var b=R.properties,B=R.type,re=!1;Array.isArray(R.items)&&(b={},R.items.forEach(function(It,st){b[st]=It}),B="array",re=!0);var ne=0,te=function(It,st,He){w("errors++"),!0===V&&(w("if (validate.errors === null) validate.errors = []"),k?w("validate.errors.push({field:%s,message:%s,value:%s,type:%s,schemaPath:%s})",F(st||I),JSON.stringify(It),He||I,JSON.stringify(B),JSON.stringify(L)):w("validate.errors.push({field:%s,message:%s})",F(st||I),JSON.stringify(It)))};!0===R.required?(ne++,w("if (%s === undefined) {",I),te("is required"),w("} else {")):(ne++,w("if (%s !== undefined) {",I));var ae=[].concat(B).map(function(It){if(It&&!y.hasOwnProperty(It))throw new Error("Unknown type: "+It);return y[It||"any"](I)}).join(" || ")||"true";if("true"!==ae&&(ne++,w("if (!(%s)) {",ae),te("is the wrong type"),w("} else {")),re)if(!1===R.additionalItems)w("if (%s.length > %d) {",I,R.items.length),te("has additional items"),w("}");else if(R.additionalItems){var ge=o();w("for (var %s = %d; %s < %s.length; %s++) {",ge,R.items.length,ge,I,ge),h(I+"["+ge+"]",R.additionalItems,V,H,L.concat("additionalItems")),w("}")}if(R.format&&C[R.format]){"string"!==B&&s[R.format]&&w("if (%s) {",y.string(I));var pe=G("format");N[pe]=C[R.format],"function"==typeof N[pe]?w("if (!%s(%s)) {",pe,I):w("if (!testLimitedRegex(%s, %s, %d)) {",pe,I,typeof R.maxLength>"u"?-1:R.maxLength),te("must be "+R.format+" format"),w("}"),"string"!==B&&s[R.format]&&w("}")}if(Array.isArray(R.required)){pe=G("missing");w("var %s = 0",pe);w("if ((%s)) {","object"!==B?y.object(I):"true"),R.required.map(function(st){var He=l(I,st);w("if (%s === undefined) {",He),te("is required",He),w("%s++",pe),w("}")}),w("}"),U||(w("if (%s === 0) {",pe),ne++)}if(R.uniqueItems&&("array"!==B&&w("if (%s) {",y.array(I)),w("if (!(unique(%s, %d))) {",I,R.maxItems||-1),te("must be unique"),w("}"),"array"!==B&&w("}")),R.enum){var le=R.enum.some(function(It){return"object"==typeof It})?function(It){return"JSON.stringify("+I+") !== JSON.stringify("+JSON.stringify(It)+")"}:function(It){return I+" !== "+JSON.stringify(It)};w("if (%s) {",R.enum.map(le).join(" && ")||"false"),te("must be an enum value"),w("}")}if(R.dependencies&&("object"!==B&&w("if (%s) {",y.object(I)),Object.keys(R.dependencies).forEach(function(It){var st=R.dependencies[It];"string"==typeof st&&(st=[st]);Array.isArray(st)&&(w("if (%s !== undefined && !(%s)) {",l(I,It),st.map(function(ze){return l(I,ze)+" !== undefined"}).join(" && ")||"true"),te("dependencies not set"),w("}")),"object"==typeof st&&(w("if (%s !== undefined) {",l(I,It)),h(I,st,V,H,L.concat(["dependencies",It])),w("}"))}),"object"!==B&&w("}")),R.additionalProperties||!1===R.additionalProperties){"object"!==B&&w("if (%s) {",y.object(I));ge=o();var ue=G("keys"),Ae=Object.keys(b||{}).map(function(st){return ue+"["+ge+"] !== "+JSON.stringify(st)}).concat(Object.keys(R.patternProperties||{}).map(function(st){return"!"+Z(st)+".test("+ue+"["+ge+"])"})).join(" && ")||"true";w("var %s = Object.keys(%s)",ue,I)("for (var %s = 0; %s < %s.length; %s++) {",ge,ge,ue,ge)("if (%s) {",Ae),!1===R.additionalProperties?(H&&w("delete %s",I+"["+ue+"["+ge+"]]"),te("has additional properties",null,JSON.stringify(I+".")+" + "+ue+"["+ge+"]")):h(I+"["+ue+"["+ge+"]]",R.additionalProperties,V,H,L.concat(["additionalProperties"])),w("}")("}"),"object"!==B&&w("}")}if(R.$ref){var Pe=function(S,_,D){var P=function(z){return z&&z.id===D?z:"object"==typeof z&&z?Object.keys(z).reduce(function(Y,G){return Y||P(z[G])},null):null},x=P(S);if(x)return x;D=(D=D.replace(/^#/,"")).replace(/\/$/,"");try{return E.get(S,decodeURI(D))}catch{var N,C=D.indexOf("#");if(0!==C)if(-1===C)N=_[D];else{N=_[D.slice(0,C)];var U=D.slice(C).replace(/^#/,"");try{return E.get(N,U)}catch{}}else N=_[D];return N||null}}(D,x&&x.schemas||{},R.$ref);if(Pe){var Re=_[R.$ref];Re||(_[R.$ref]=function(He){return Re(He)},Re=m(Pe,_,D,!1,x));pe=G("ref");N[pe]=Re,w("if (!(%s(%s))) {",pe,I),te("referenced schema does not match"),w("}")}}if(R.not){var ot=G("prev");w("var %s = errors",ot),h(I,R.not,!1,H,L.concat("not")),w("if (%s === errors) {",ot),te("negative schema matches"),w("} else {")("errors = %s",ot)("}")}if(R.items&&!re){"array"!==B&&w("if (%s) {",y.array(I));ge=o();w("for (var %s = 0; %s < %s.length; %s++) {",ge,ge,I,ge),h(I+"["+ge+"]",R.items,V,H,L.concat("items")),w("}"),"array"!==B&&w("}")}if(R.patternProperties){"object"!==B&&w("if (%s) {",y.object(I));ue=G("keys"),ge=o();w("var %s = Object.keys(%s)",ue,I)("for (var %s = 0; %s < %s.length; %s++) {",ge,ge,ue,ge),Object.keys(R.patternProperties).forEach(function(He){var ze=Z(He);w("if (%s.test(%s)) {",ze,ue+"["+ge+"]"),h(I+"["+ue+"["+ge+"]]",R.patternProperties[He],V,H,L.concat(["patternProperties",He])),w("}")}),w("}"),"object"!==B&&w("}")}if(R.pattern){var nt=Z(R.pattern);"string"!==B&&w("if (%s) {",y.string(I)),w("if (!(testLimitedRegex(%s, %s, %d))) {",nt,I,typeof R.maxLength>"u"?-1:R.maxLength),te("pattern mismatch"),w("}"),"string"!==B&&w("}")}if(R.allOf&&R.allOf.forEach(function(It,st){h(I,It,V,H,L.concat(["allOf",st]))}),R.anyOf&&R.anyOf.length){ot=G("prev");R.anyOf.forEach(function(st,He){0===He?w("var %s = errors",ot):w("if (errors !== %s) {",ot)("errors = %s",ot),h(I,st,!1,!1,L)}),R.anyOf.forEach(function(st,He){He&&w("}")}),w("if (%s !== errors) {",ot),te("no schemas match"),w("}")}if(R.oneOf&&R.oneOf.length){ot=G("prev");var Ye=G("passes");w("var %s = errors",ot)("var %s = 0",Ye),R.oneOf.forEach(function(st,He){h(I,st,!1,!1,L),w("if (%s === errors) {",ot)("%s++",Ye)("} else {")("errors = %s",ot)("}")}),w("if (%s !== 1) {",Ye),te("no (or more than one) schemas match"),w("}")}for(void 0!==R.multipleOf&&("number"!==B&&"integer"!==B&&w("if (%s) {",y.number(I)),w("if (!isMultipleOf(%s, %d)) {",I,R.multipleOf),te("has a remainder"),w("}"),"number"!==B&&"integer"!==B&&w("}")),void 0!==R.maxProperties&&("object"!==B&&w("if (%s) {",y.object(I)),w("if (Object.keys(%s).length > %d) {",I,R.maxProperties),te("has more properties than allowed"),w("}"),"object"!==B&&w("}")),void 0!==R.minProperties&&("object"!==B&&w("if (%s) {",y.object(I)),w("if (Object.keys(%s).length < %d) {",I,R.minProperties),te("has less properties than allowed"),w("}"),"object"!==B&&w("}")),void 0!==R.maxItems&&("array"!==B&&w("if (%s) {",y.array(I)),w("if (%s.length > %d) {",I,R.maxItems),te("has more items than allowed"),w("}"),"array"!==B&&w("}")),void 0!==R.minItems&&("array"!==B&&w("if (%s) {",y.array(I)),w("if (%s.length < %d) {",I,R.minItems),te("has less items than allowed"),w("}"),"array"!==B&&w("}")),void 0!==R.maxLength&&("string"!==B&&w("if (%s) {",y.string(I)),w("if (%s.length > %d) {",I,R.maxLength),te("has longer length than allowed"),w("}"),"string"!==B&&w("}")),void 0!==R.minLength&&("string"!==B&&w("if (%s) {",y.string(I)),w("if (%s.length < %d) {",I,R.minLength),te("has less length than allowed"),w("}"),"string"!==B&&w("}")),void 0!==R.minimum&&("number"!==B&&"integer"!==B&&w("if (%s) {",y.number(I)),w("if (%s %s %d) {",I,R.exclusiveMinimum?"<=":"<",R.minimum),te("is less than minimum"),w("}"),"number"!==B&&"integer"!==B&&w("}")),void 0!==R.maximum&&("number"!==B&&"integer"!==B&&w("if (%s) {",y.number(I)),w("if (%s %s %d) {",I,R.exclusiveMaximum?">=":">",R.maximum),te("is more than maximum"),w("}"),"number"!==B&&"integer"!==B&&w("}")),b&&Object.keys(b).forEach(function(It){Array.isArray(B)&&-1!==B.indexOf("null")&&w("if (%s !== null) {",I),h(l(I,It),b[It],V,H,L.concat(re?It:["properties",It])),Array.isArray(B)&&-1!==B.indexOf("null")&&w("}")});ne--;)w("}")},w=v("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");return h("data",S,P,x&&x.filter,[]),w("return errors === 0")("}"),(w=w.toFunction(N)).errors=null,Object.defineProperty&&Object.defineProperty(w,"error",{get:function(){return w.errors?w.errors.map(function(I){return I.field+" "+I.message}).join("\n"):""}}),w.toJSON=function(){return S},w};q.exports=function(S,_){return"string"==typeof S&&(S=JSON.parse(S)),m(S,{},S,!0,_)},q.exports.filter=function(S,_){var D=q.exports(S,M(_,{filter:!0}));return function(P){return D(P),P}}},37549:q=>{"use strict";q.exports=function n(u){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(u)}},80597:(q,n,u)=>{"use strict";var l=u(42031);q.exports=function(E){return!!l(E)}},55782:q=>{var n=Object.prototype,u=n.hasOwnProperty,l=n.toString,v=function(s){return s!=s},E={boolean:1,number:1,string:1,undefined:1},M=q.exports={};M.a=M.type=function(s,g){return typeof s===g},M.defined=function(s){return void 0!==s},M.empty=function(s){var y,g=l.call(s);if("[object Array]"===g||"[object Arguments]"===g)return 0===s.length;if("[object Object]"===g){for(y in s)if(u.call(s,y))return!1;return!0}return"[object String]"===g&&""===s},M.equal=function(s,g){var f,y=l.call(s);if(y!==l.call(g))return!1;if("[object Object]"===y){for(f in s)if(!M.equal(s[f],g[f]))return!1;return!0}if("[object Array]"===y){if((f=s.length)!==g.length)return!1;for(;--f;)if(!M.equal(s[f],g[f]))return!1;return!0}return"[object Function]"===y?s.prototype===g.prototype:"[object Date]"===y?s.getTime()===g.getTime():s===g},M.hosted=function(s,g){var y=typeof g[s];return"object"===y?!!g[s]:!E[y]},M.instance=M.instanceof=function(s,g){return s instanceof g},M.null=function(s){return null===s},M.undefined=function(s){return void 0===s},M.arguments=function(s){var g="[object Arguments]"===l.call(s),y=!M.array(s)&&M.arraylike(s)&&M.object(s)&&M.fn(s.callee);return g||y},M.array=function(s){return"[object Array]"===l.call(s)},M.arguments.empty=function(s){return M.arguments(s)&&0===s.length},M.array.empty=function(s){return M.array(s)&&0===s.length},M.arraylike=function(s){return!!s&&!M.boolean(s)&&u.call(s,"length")&&isFinite(s.length)&&M.number(s.length)&&s.length>=0},M.boolean=function(s){return"[object Boolean]"===l.call(s)},M.false=function(s){return M.boolean(s)&&(!1===s||!1===s.valueOf())},M.true=function(s){return M.boolean(s)&&(!0===s||!0===s.valueOf())},M.date=function(s){return"[object Date]"===l.call(s)},M.element=function(s){return void 0!==s&&typeof HTMLElement<"u"&&s instanceof HTMLElement&&1===s.nodeType},M.error=function(s){return"[object Error]"===l.call(s)},M.fn=M.function=function(s){return typeof window<"u"&&s===window.alert||"[object Function]"===l.call(s)},M.number=function(s){return"[object Number]"===l.call(s)},M.infinite=function(s){return s===1/0||s===-1/0},M.decimal=function(s){return M.number(s)&&!v(s)&&!M.infinite(s)&&s%1!=0},M.divisibleBy=function(s,g){var y=M.infinite(s),f=M.infinite(g),d=M.number(s)&&!v(s)&&M.number(g)&&!v(g)&&0!==g;return y||f||d&&s%g==0},M.int=function(s){return M.number(s)&&!v(s)&&s%1==0},M.maximum=function(s,g){if(v(s))throw new TypeError("NaN is not a valid value");if(!M.arraylike(g))throw new TypeError("second argument must be array-like");for(var y=g.length;--y>=0;)if(s=0;)if(s>g[y])return!1;return!0},M.nan=function(s){return!M.number(s)||s!=s},M.even=function(s){return M.infinite(s)||M.number(s)&&s==s&&s%2==0},M.odd=function(s){return M.infinite(s)||M.number(s)&&s==s&&s%2!=0},M.ge=function(s,g){if(v(s)||v(g))throw new TypeError("NaN is not a valid value");return!M.infinite(s)&&!M.infinite(g)&&s>=g},M.gt=function(s,g){if(v(s)||v(g))throw new TypeError("NaN is not a valid value");return!M.infinite(s)&&!M.infinite(g)&&s>g},M.le=function(s,g){if(v(s)||v(g))throw new TypeError("NaN is not a valid value");return!M.infinite(s)&&!M.infinite(g)&&s<=g},M.lt=function(s,g){if(v(s)||v(g))throw new TypeError("NaN is not a valid value");return!M.infinite(s)&&!M.infinite(g)&&s=g&&s<=y},M.object=function(s){return s&&"[object Object]"===l.call(s)},M.hash=function(s){return M.object(s)&&s.constructor===Object&&!s.nodeType&&!s.setInterval},M.regexp=function(s){return"[object RegExp]"===l.call(s)},M.string=function(s){return"[object String]"===l.call(s)}},40452:(q,n,u)=>{var l=u(93172).Buffer;q.exports=function v(E){return l.isBuffer(E)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(E))}},33024:(q,n,u)=>{q.exports=self.fetch||(self.fetch=u(75557).default||u(75557))},1520:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(q){return"[object Array]"===Object.prototype.toString.call(q)}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(q){return"object"==typeof q&&q.buffer&&q.buffer.constructor===ArrayBuffer});var createOutputMethod=function(q,n){return function(u){return new Sha256(n,!0).update(u)[q]()}},createMethod=function(q){var n=createOutputMethod("hex",q);NODE_JS&&(n=nodeWrap(n,q)),n.create=function(){return new Sha256(q)},n.update=function(v){return n.create().update(v)};for(var u=0;u>6,E[s++]=128|63&g):g<55296||g>=57344?(E[s++]=224|g>>12,E[s++]=128|g>>6&63,E[s++]=128|63&g):(g=65536+((1023&g)<<10|1023&q.charCodeAt(++l)),E[s++]=240|g>>18,E[s++]=128|g>>12&63,E[s++]=128|g>>6&63,E[s++]=128|63&g);q=E}else{if("object"!==v)throw new Error(ERROR);if(null===q)throw new Error(ERROR);if(ARRAY_BUFFER&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||ARRAY_BUFFER&&ArrayBuffer.isView(q)))throw new Error(ERROR)}q.length>64&&(q=new Sha256(n,!0).update(q).array());var y=[],f=[];for(l=0;l<64;++l){var d=q[l]||0;y[l]=92^d,f[l]=54^d}Sha256.call(this,n,u),this.update(f),this.oKeyPad=y,this.inner=!0,this.sharedMemory=u}Sha256.prototype.update=function(q){if(!this.finalized){var n,u=typeof q;if("string"!==u){if("object"!==u)throw new Error(ERROR);if(null===q)throw new Error(ERROR);if(ARRAY_BUFFER&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||ARRAY_BUFFER&&ArrayBuffer.isView(q)))throw new Error(ERROR);n=!0}for(var l,E,v=0,M=q.length,s=this.blocks;v>2]|=q[v]<>2]|=l<>2]|=(192|l>>6)<>2]|=(128|63&l)<=57344?(s[E>>2]|=(224|l>>12)<>2]|=(128|l>>6&63)<>2]|=(128|63&l)<>2]|=(240|l>>18)<>2]|=(128|l>>12&63)<>2]|=(128|l>>6&63)<>2]|=(128|63&l)<=64?(this.block=s[16],this.start=E-64,this.hash(),this.hashed=!0):this.start=E}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var q=this.blocks,n=this.lastByteIndex;q[16]=this.block,q[n>>2]|=EXTRA[3&n],this.block=q[16],n>=56&&(this.hashed||this.hash(),q[0]=this.block,q[16]=q[1]=q[2]=q[3]=q[4]=q[5]=q[6]=q[7]=q[8]=q[9]=q[10]=q[11]=q[12]=q[13]=q[14]=q[15]=0),q[14]=this.hBytes<<3|this.bytes>>>29,q[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var y,f,d,p,m,D,P,x,C,q=this.h0,n=this.h1,u=this.h2,l=this.h3,v=this.h4,E=this.h5,M=this.h6,s=this.h7,g=this.blocks;for(y=16;y<64;++y)f=((m=g[y-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,d=((m=g[y-2])>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,g[y]=g[y-16]+f+g[y-7]+d<<0;for(C=n&u,y=0;y<64;y+=4)this.first?(this.is224?(D=300032,s=(m=g[0]-1413257819)-150054599<<0,l=m+24177077<<0):(D=704751109,s=(m=g[0]-210244248)-1521486534<<0,l=m+143694565<<0),this.first=!1):(f=(q>>>2|q<<30)^(q>>>13|q<<19)^(q>>>22|q<<10),p=(D=q&n)^q&u^C,s=l+(m=s+(d=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&E^~v&M)+K[y]+g[y])<<0,l=m+(f+p)<<0),f=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),p=(P=l&q)^l&n^D,M=u+(m=M+(d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&v^~s&E)+K[y+1]+g[y+1])<<0,f=((u=m+(f+p)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),p=(x=u&l)^u&q^P,E=n+(m=E+(d=(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7))+(M&s^~M&v)+K[y+2]+g[y+2])<<0,f=((n=m+(f+p)<<0)>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(C=n&u)^n&l^x,v=q+(m=v+(d=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&M^~E&s)+K[y+3]+g[y+3])<<0,q=m+(f+p)<<0;this.h0=this.h0+q<<0,this.h1=this.h1+n<<0,this.h2=this.h2+u<<0,this.h3=this.h3+l<<0,this.h4=this.h4+v<<0,this.h5=this.h5+E<<0,this.h6=this.h6+M<<0,this.h7=this.h7+s<<0},Sha256.prototype.hex=function(){this.finalize();var q=this.h0,n=this.h1,u=this.h2,l=this.h3,v=this.h4,E=this.h5,M=this.h6,s=this.h7,g=HEX_CHARS[q>>28&15]+HEX_CHARS[q>>24&15]+HEX_CHARS[q>>20&15]+HEX_CHARS[q>>16&15]+HEX_CHARS[q>>12&15]+HEX_CHARS[q>>8&15]+HEX_CHARS[q>>4&15]+HEX_CHARS[15&q]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[15&u]+HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[15&l]+HEX_CHARS[v>>28&15]+HEX_CHARS[v>>24&15]+HEX_CHARS[v>>20&15]+HEX_CHARS[v>>16&15]+HEX_CHARS[v>>12&15]+HEX_CHARS[v>>8&15]+HEX_CHARS[v>>4&15]+HEX_CHARS[15&v]+HEX_CHARS[E>>28&15]+HEX_CHARS[E>>24&15]+HEX_CHARS[E>>20&15]+HEX_CHARS[E>>16&15]+HEX_CHARS[E>>12&15]+HEX_CHARS[E>>8&15]+HEX_CHARS[E>>4&15]+HEX_CHARS[15&E]+HEX_CHARS[M>>28&15]+HEX_CHARS[M>>24&15]+HEX_CHARS[M>>20&15]+HEX_CHARS[M>>16&15]+HEX_CHARS[M>>12&15]+HEX_CHARS[M>>8&15]+HEX_CHARS[M>>4&15]+HEX_CHARS[15&M];return this.is224||(g+=HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s]),g},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var q=this.h0,n=this.h1,u=this.h2,l=this.h3,v=this.h4,E=this.h5,M=this.h6,s=this.h7,g=[q>>24&255,q>>16&255,q>>8&255,255&q,n>>24&255,n>>16&255,n>>8&255,255&n,u>>24&255,u>>16&255,u>>8&255,255&u,l>>24&255,l>>16&255,l>>8&255,255&l,v>>24&255,v>>16&255,v>>8&255,255&v,E>>24&255,E>>16&255,E>>8&255,255&E,M>>24&255,M>>16&255,M>>8&255,255&M];return this.is224||g.push(s>>24&255,s>>16&255,s>>8&255,255&s),g},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var q=new ArrayBuffer(this.is224?28:32),n=new DataView(q);return n.setUint32(0,this.h0),n.setUint32(4,this.h1),n.setUint32(8,this.h2),n.setUint32(12,this.h3),n.setUint32(16,this.h4),n.setUint32(20,this.h5),n.setUint32(24,this.h6),this.is224||n.setUint32(28,this.h7),q},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var q=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(q),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},54237:(q,n,u)=>{var l;!function(){"use strict";var v="input is invalid type",M="object"==typeof window,s=M?window:{};s.JS_SHA3_NO_WINDOW&&(M=!1);var g=!M&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?s=global:g&&(s=self);var f=!s.JS_SHA3_NO_COMMON_JS&&q.exports,d=u.amdO,p=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),_=[4,1024,262144,67108864],x=[0,8,16,24],C=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],N=[224,256,384,512],k=[128,256],U=["hex","buffer","arrayBuffer","array","digest"],z={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(pe){return"[object Array]"===Object.prototype.toString.call(pe)}),p&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(pe){return"object"==typeof pe&&pe.buffer&&pe.buffer.constructor===ArrayBuffer});for(var Y=function(pe,we,ce){return function(le){return new te(pe,we,pe).update(le)[ce]()}},G=function(pe,we,ce){return function(le,ue){return new te(pe,we,ue).update(le)[ce]()}},F=function(pe,we,ce){return function(le,ue,fe,he){return R["cshake"+pe].update(le,ue,fe,he)[ce]()}},j=function(pe,we,ce){return function(le,ue,fe,he){return R["kmac"+pe].update(le,ue,fe,he)[ce]()}},Z=function(pe,we,ce,le){for(var ue=0;ue>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ce>>5,this.extraBytes=(31&ce)>>3;for(var le=0;le<50;++le)this.s[le]=0}function ae(pe,we,ce){te.call(this,pe,we,ce)}te.prototype.update=function(pe){if(this.finalized)throw new Error("finalize already called");var we,ce=typeof pe;if("string"!==ce){if("object"!==ce)throw new Error(v);if(null===pe)throw new Error(v);if(p&&pe.constructor===ArrayBuffer)pe=new Uint8Array(pe);else if(!(Array.isArray(pe)||p&&ArrayBuffer.isView(pe)))throw new Error(v);we=!0}for(var Re,ot,le=this.blocks,ue=this.byteCount,fe=pe.length,he=this.blockCount,Ae=0,Pe=this.s;Ae>2]|=pe[Ae]<>2]|=ot<>2]|=(192|ot>>6)<>2]|=(128|63&ot)<=57344?(le[Re>>2]|=(224|ot>>12)<>2]|=(128|ot>>6&63)<>2]|=(128|63&ot)<>2]|=(240|ot>>18)<>2]|=(128|ot>>12&63)<>2]|=(128|ot>>6&63)<>2]|=(128|63&ot)<=ue){for(this.start=Re-ue,this.block=le[he],Re=0;Re>=8);ce>0;)ue.unshift(ce),ce=255&(pe>>=8),++le;return we?ue.push(le):ue.unshift(le),this.update(ue),ue.length},te.prototype.encodeString=function(pe){var we,ce=typeof pe;if("string"!==ce){if("object"!==ce)throw new Error(v);if(null===pe)throw new Error(v);if(p&&pe.constructor===ArrayBuffer)pe=new Uint8Array(pe);else if(!(Array.isArray(pe)||p&&ArrayBuffer.isView(pe)))throw new Error(v);we=!0}var le=0,ue=pe.length;if(we)le=ue;else for(var fe=0;fe=57344?le+=3:(he=65536+((1023&he)<<10|1023&pe.charCodeAt(++fe)),le+=4)}return le+=this.encode(8*le),this.update(pe),le},te.prototype.bytepad=function(pe,we){for(var ce=this.encode(we),le=0;le>2]|=this.padding[3&we],this.lastByteIndex===this.byteCount)for(pe[0]=pe[ce],we=1;we>4&15]+m[15&Ae]+m[Ae>>12&15]+m[Ae>>8&15]+m[Ae>>20&15]+m[Ae>>16&15]+m[Ae>>28&15]+m[Ae>>24&15];fe%pe==0&&(ge(we),ue=0)}return le&&(Ae=we[ue],he+=m[Ae>>4&15]+m[15&Ae],le>1&&(he+=m[Ae>>12&15]+m[Ae>>8&15]),le>2&&(he+=m[Ae>>20&15]+m[Ae>>16&15])),he},te.prototype.arrayBuffer=function(){this.finalize();var Ae,pe=this.blockCount,we=this.s,ce=this.outputBlocks,le=this.extraBytes,ue=0,fe=0,he=this.outputBits>>3;Ae=le?new ArrayBuffer(ce+1<<2):new ArrayBuffer(he);for(var Pe=new Uint32Array(Ae);fe>8&255,he[Ae+2]=Pe>>16&255,he[Ae+3]=Pe>>24&255;fe%pe==0&&ge(we)}return le&&(Ae=fe<<2,Pe=we[ue],he[Ae]=255&Pe,le>1&&(he[Ae+1]=Pe>>8&255),le>2&&(he[Ae+2]=Pe>>16&255)),he},ae.prototype=new te,ae.prototype.finalize=function(){return this.encode(this.outputBits,!0),te.prototype.finalize.call(this)};var ge=function(pe){var we,ce,le,ue,fe,he,Ae,Pe,Re,ot,nt,Ye,It,st,He,ze,Be,Ze,ut,Me,ve,xe,je,Ge,Qe,ye,ke,et,qe,at,bt,pt,xt,kn,Nt,Ot,Mn,Tt,Pt,Hn,Bt,Kt,dr,Rt,Ut,Te,Se,Oe,_e,Le,Xe,At,dt,gt,nn,Wt,hn,rn,gn,on,An,mn,On;for(le=0;le<48;le+=2)ue=pe[0]^pe[10]^pe[20]^pe[30]^pe[40],fe=pe[1]^pe[11]^pe[21]^pe[31]^pe[41],he=pe[2]^pe[12]^pe[22]^pe[32]^pe[42],Ae=pe[3]^pe[13]^pe[23]^pe[33]^pe[43],Pe=pe[4]^pe[14]^pe[24]^pe[34]^pe[44],Re=pe[5]^pe[15]^pe[25]^pe[35]^pe[45],ot=pe[6]^pe[16]^pe[26]^pe[36]^pe[46],nt=pe[7]^pe[17]^pe[27]^pe[37]^pe[47],we=(Ye=pe[8]^pe[18]^pe[28]^pe[38]^pe[48])^(he<<1|Ae>>>31),ce=(It=pe[9]^pe[19]^pe[29]^pe[39]^pe[49])^(Ae<<1|he>>>31),pe[0]^=we,pe[1]^=ce,pe[10]^=we,pe[11]^=ce,pe[20]^=we,pe[21]^=ce,pe[30]^=we,pe[31]^=ce,pe[40]^=we,pe[41]^=ce,we=ue^(Pe<<1|Re>>>31),ce=fe^(Re<<1|Pe>>>31),pe[2]^=we,pe[3]^=ce,pe[12]^=we,pe[13]^=ce,pe[22]^=we,pe[23]^=ce,pe[32]^=we,pe[33]^=ce,pe[42]^=we,pe[43]^=ce,we=he^(ot<<1|nt>>>31),ce=Ae^(nt<<1|ot>>>31),pe[4]^=we,pe[5]^=ce,pe[14]^=we,pe[15]^=ce,pe[24]^=we,pe[25]^=ce,pe[34]^=we,pe[35]^=ce,pe[44]^=we,pe[45]^=ce,we=Pe^(Ye<<1|It>>>31),ce=Re^(It<<1|Ye>>>31),pe[6]^=we,pe[7]^=ce,pe[16]^=we,pe[17]^=ce,pe[26]^=we,pe[27]^=ce,pe[36]^=we,pe[37]^=ce,pe[46]^=we,pe[47]^=ce,we=ot^(ue<<1|fe>>>31),ce=nt^(fe<<1|ue>>>31),pe[8]^=we,pe[9]^=ce,pe[18]^=we,pe[19]^=ce,pe[28]^=we,pe[29]^=ce,pe[38]^=we,pe[39]^=ce,pe[48]^=we,pe[49]^=ce,st=pe[0],He=pe[1],Te=pe[11]<<4|pe[10]>>>28,Se=pe[10]<<4|pe[11]>>>28,et=pe[20]<<3|pe[21]>>>29,qe=pe[21]<<3|pe[20]>>>29,on=pe[31]<<9|pe[30]>>>23,An=pe[30]<<9|pe[31]>>>23,Kt=pe[40]<<18|pe[41]>>>14,dr=pe[41]<<18|pe[40]>>>14,kn=pe[2]<<1|pe[3]>>>31,Nt=pe[3]<<1|pe[2]>>>31,ze=pe[13]<<12|pe[12]>>>20,Be=pe[12]<<12|pe[13]>>>20,Oe=pe[22]<<10|pe[23]>>>22,_e=pe[23]<<10|pe[22]>>>22,at=pe[33]<<13|pe[32]>>>19,bt=pe[32]<<13|pe[33]>>>19,mn=pe[42]<<2|pe[43]>>>30,On=pe[43]<<2|pe[42]>>>30,gt=pe[5]<<30|pe[4]>>>2,nn=pe[4]<<30|pe[5]>>>2,Ot=pe[14]<<6|pe[15]>>>26,Mn=pe[15]<<6|pe[14]>>>26,Ze=pe[25]<<11|pe[24]>>>21,ut=pe[24]<<11|pe[25]>>>21,Le=pe[34]<<15|pe[35]>>>17,Xe=pe[35]<<15|pe[34]>>>17,pt=pe[45]<<29|pe[44]>>>3,xt=pe[44]<<29|pe[45]>>>3,Ge=pe[6]<<28|pe[7]>>>4,Qe=pe[7]<<28|pe[6]>>>4,Wt=pe[17]<<23|pe[16]>>>9,hn=pe[16]<<23|pe[17]>>>9,Tt=pe[26]<<25|pe[27]>>>7,Pt=pe[27]<<25|pe[26]>>>7,Me=pe[36]<<21|pe[37]>>>11,ve=pe[37]<<21|pe[36]>>>11,At=pe[47]<<24|pe[46]>>>8,dt=pe[46]<<24|pe[47]>>>8,Rt=pe[8]<<27|pe[9]>>>5,Ut=pe[9]<<27|pe[8]>>>5,ye=pe[18]<<20|pe[19]>>>12,ke=pe[19]<<20|pe[18]>>>12,rn=pe[29]<<7|pe[28]>>>25,gn=pe[28]<<7|pe[29]>>>25,Hn=pe[38]<<8|pe[39]>>>24,Bt=pe[39]<<8|pe[38]>>>24,xe=pe[48]<<14|pe[49]>>>18,je=pe[49]<<14|pe[48]>>>18,pe[0]=st^~ze&Ze,pe[1]=He^~Be&ut,pe[10]=Ge^~ye&et,pe[11]=Qe^~ke&qe,pe[20]=kn^~Ot&Tt,pe[21]=Nt^~Mn&Pt,pe[30]=Rt^~Te&Oe,pe[31]=Ut^~Se&_e,pe[40]=gt^~Wt&rn,pe[41]=nn^~hn&gn,pe[2]=ze^~Ze&Me,pe[3]=Be^~ut&ve,pe[12]=ye^~et&at,pe[13]=ke^~qe&bt,pe[22]=Ot^~Tt&Hn,pe[23]=Mn^~Pt&Bt,pe[32]=Te^~Oe&Le,pe[33]=Se^~_e&Xe,pe[42]=Wt^~rn&on,pe[43]=hn^~gn&An,pe[4]=Ze^~Me&xe,pe[5]=ut^~ve&je,pe[14]=et^~at&pt,pe[15]=qe^~bt&xt,pe[24]=Tt^~Hn&Kt,pe[25]=Pt^~Bt&dr,pe[34]=Oe^~Le&At,pe[35]=_e^~Xe&dt,pe[44]=rn^~on&mn,pe[45]=gn^~An&On,pe[6]=Me^~xe&st,pe[7]=ve^~je&He,pe[16]=at^~pt&Ge,pe[17]=bt^~xt&Qe,pe[26]=Hn^~Kt&kn,pe[27]=Bt^~dr&Nt,pe[36]=Le^~At&Rt,pe[37]=Xe^~dt&Ut,pe[46]=on^~mn>,pe[47]=An^~On&nn,pe[8]=xe^~st&ze,pe[9]=je^~He&Be,pe[18]=pt^~Ge&ye,pe[19]=xt^~Qe&ke,pe[28]=Kt^~kn&Ot,pe[29]=dr^~Nt&Mn,pe[38]=At^~Rt&Te,pe[39]=dt^~Ut&Se,pe[48]=mn^~gt&Wt,pe[49]=On^~nn&hn,pe[0]^=C[le],pe[1]^=C[le+1]};if(f)q.exports=R;else{for(H=0;H{"use strict";var n=q.exports=function(v,E,M){"function"==typeof E&&(M=E,E={}),u(E,"function"==typeof(M=E.cb||M)?M:M.pre||function(){},M.post||function(){},v,"",v)};function u(v,E,M,s,g,y,f,d,p,m){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var S in E(s,g,y,f,d,p,m),s){var _=s[S];if(Array.isArray(_)){if(S in n.arrayKeywords)for(var D=0;D<_.length;D++)u(v,E,M,_[D],g+"/"+S+"/"+D,y,g,S,s,D)}else if(S in n.propsKeywords){if(_&&"object"==typeof _)for(var P in _)u(v,E,M,_[P],g+"/"+S+"/"+l(P),y,g,S,s,P)}else(S in n.keywords||v.allKeys&&!(S in n.skipKeywords))&&u(v,E,M,_,g+"/"+S,y,g,S,s)}M(s,g,y,f,d,p,m)}}function l(v){return v.replace(/~/g,"~0").replace(/\//g,"~1")}n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},6936:(q,n)=>{var u=/~/,l=/~[01]/g;function v(d){switch(d){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+d)}function E(d){return u.test(d)?d.replace(l,v):d}function s(d){if("string"==typeof d){if(""===(d=d.split("/"))[0])return d;throw new Error("Invalid JSON pointer.")}if(Array.isArray(d)){for(const p of d)if("string"!=typeof p&&"number"!=typeof p)throw new Error("Invalid JSON pointer. Must be of type string or number.");return d}throw new Error("Invalid JSON pointer.")}function g(d,p){if("object"!=typeof d)throw new Error("Invalid input object.");var m=(p=s(p)).length;if(1===m)return d;for(var S=1;SD,typeof d[S]>"u"&&(Array.isArray(d)&&"-"===S&&(S=d.length),_&&(""!==p[D]&&p[D]<1/0||"-"===p[D]?d[S]=[]:d[S]={})),!_)break;d=d[S]}var x=d[S];return void 0===m?delete d[S]:d[S]=m,x}(d,p,m)}n.get=g,n.set=y,n.compile=function f(d){var p=s(d);return{get:function(m){return g(m,p)},set:function(m,S){return y(m,p,S)}}}},95882:(q,n,u)=>{var l=u(73669),v=u(91050),E=u(68429),M=u(26788),s=u(46389),g=new Buffer(0),y={encode:function(m){return"string"==typeof m?m=new Buffer(m):m},decode:function(m){return Buffer.isBuffer(m)?m:new Buffer(m)},buffer:!0,type:"raw"},f=function(){},d=function(m){return m=m.toString(16),"00000000".slice(0,-m.length)+m};q.exports=function(m,S){S||(S={});var _={},D=S.blockSize||65536,P=S.batch||100,x=new Buffer(D);m.put("\0","ignore",f);var C={},N=function(z,Y,G,F,j){var Z=function(){--C[z].locks||delete C[z]},T=function(o){if(o.locks++,!o.block&&!Y)return o.block=G,void j(null,o.block,Z);o.block||(o.block=new Buffer(D)),o.block.lengthZ&&(j=z.slice(Z),z=z.slice(0,Z)),this.bytesWritten+=z.length,this.blockLength+=z.length,this.blocks.push(z),z.lengthG._missing&&(h=h.slice(0,G._missing)),G._missing-=h.length,G._pause(!G.push(h)),!!G._missing))};this._reader.on("data",function(h){for(;h.key>T;)if(!o(x))return;o(h.value)}),this._reader.on("error",function(h){G.emit("error",h)}),this._reader.on("end",function(){G.push(null)}),v.call(this)};return M.inherits(U,v),U.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._reader.destroy(),process.nextTick(this.emit.bind(this,"close")))},U.prototype._pause=function(z){this._paused!==z&&(this._paused=z,this._paused?this._reader.pause():this._reader.resume())},U.prototype._read=function(){this._pause(!1)},_.remove=function(z,Y){Y=s(Y||f);var G=[],F=m.createKeyStream({start:z+"\xff",end:z+"\xff\xff"});F.on("error",Y),F.on("data",function(j){G.push({type:"del",key:j})}),F.on("end",function(){m.batch(G,Y)})},_.size=function(z,Y){E.last(m,{start:z+"\xff",end:z+"\xff\xff",valueEncoding:y},function(G,F,j){return G&&"range not found"===G.message?Y(null,0):G?Y(G):F.slice(0,z.length+1)!==z+"\xff"?Y(null,0):void Y(null,parseInt(F.toString().slice(z.length+1),16)*D+j.length)})},_.write=function(z,Y,G,F){if("function"==typeof G)return _.write(z,Y,null,G);G||(G={}),F||(F=f);var j=_.createWriteStream(z,G);j.on("error",F),j.on("finish",function(){F()}),j.write(Y),j.end()},_.read=function(z,Y,G){if("function"==typeof Y)return _.read(z,null,Y);Y||(Y={});var F=_.createReadStream(z,Y),j=[];F.on("error",G),F.on("data",function(Z){j.push(Z)}),F.on("end",function(){G(null,1===j.length?j[0]:Buffer.concat(j))})},_.createReadStream=function(z,Y){return new U(z,Y)},_.createWriteStream=function(z,Y){return new k(z,Y)},_}},22609:q=>{q.exports=Array.isArray||function(n){return"[object Array]"==Object.prototype.toString.call(n)}},60833:(q,n,u)=>{q.exports=s;var l=Object.keys||function(f){var d=[];for(var p in f)d.push(p);return d},v=u(26156);v.inherits=u(83894);var E=u(28460),M=u(37067);function s(f){if(!(this instanceof s))return new s(f);E.call(this,f),M.call(this,f),f&&!1===f.readable&&(this.readable=!1),f&&!1===f.writable&&(this.writable=!1),this.allowHalfOpen=!0,f&&!1===f.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",g)}function g(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}v.inherits(s,E),function y(f,d){for(var p=0,m=f.length;p{q.exports=E;var l=u(68081),v=u(26156);function E(M){if(!(this instanceof E))return new E(M);l.call(this,M)}v.inherits=u(83894),v.inherits(E,l),E.prototype._transform=function(M,s,g){g(null,M)}},28460:(q,n,u)=>{q.exports=d;var l=u(22609),v=u(93172).Buffer;d.ReadableState=f;var E=u(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(h,w){return h.listeners(w).length});var M=u(295),s=u(26156);s.inherits=u(83894);var g,y=u(6297);function f(h,w){var I=u(60833),R=(h=h||{}).highWaterMark,V=h.objectMode?16:16384;this.highWaterMark=R||0===R?R:V,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!h.objectMode,w instanceof I&&(this.objectMode=this.objectMode||!!h.readableObjectMode),this.defaultEncoding=h.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,h.encoding&&(g||(g=u(15453).s),this.decoder=new g(h.encoding),this.encoding=h.encoding)}function d(h){u(60833);if(!(this instanceof d))return new d(h);this._readableState=new f(h,this),this.readable=!0,M.call(this)}function p(h,w,I,R,V){var H=function P(h,w){var I=null;return!s.isBuffer(w)&&!s.isString(w)&&!s.isNullOrUndefined(w)&&!h.objectMode&&(I=new TypeError("Invalid non-string/buffer chunk")),I}(w,I);if(H)h.emit("error",H);else if(s.isNullOrUndefined(I))w.reading=!1,w.ended||function x(h,w){if(w.decoder&&!w.ended){var I=w.decoder.end();I&&I.length&&(w.buffer.push(I),w.length+=w.objectMode?1:I.length)}w.ended=!0,C(h)}(h,w);else if(w.objectMode||I&&I.length>0)if(w.ended&&!V){var L=new Error("stream.push() after EOF");h.emit("error",L)}else if(w.endEmitted&&V){L=new Error("stream.unshift() after end event");h.emit("error",L)}else w.decoder&&!V&&!R&&(I=w.decoder.write(I)),V||(w.reading=!1),w.flowing&&0===w.length&&!w.sync?(h.emit("data",I),h.read(0)):(w.length+=w.objectMode?1:I.length,V?w.buffer.unshift(I):w.buffer.push(I),w.needReadable&&C(h)),function k(h,w){w.readingMore||(w.readingMore=!0,process.nextTick(function(){!function U(h,w){for(var I=w.length;!w.reading&&!w.flowing&&!w.ended&&w.lengthw.highWaterMark&&(w.highWaterMark=function _(h){if(h>=S)h=S;else{h--;for(var w=1;w<32;w<<=1)h|=h>>w;h++}return h}(h)),h>w.length?w.ended?w.length:(w.needReadable=!0,0):h)}function C(h){var w=h._readableState;w.needReadable=!1,w.emittedReadable||(y("emitReadable",w.flowing),w.emittedReadable=!0,w.sync?process.nextTick(function(){N(h)}):N(h))}function N(h){y("emit readable"),h.emit("readable"),F(h)}function F(h){var w=h._readableState;if(y("flow",w.flowing),w.flowing)do{var I=h.read()}while(null!==I&&w.flowing)}function j(h,w){var L,I=w.buffer,R=w.length,V=!!w.decoder,H=!!w.objectMode;if(0===I.length)return null;if(0===R)L=null;else if(H)L=I.shift();else if(!h||h>=R)L=V?I.join(""):v.concat(I,R),I.length=0;else if(h0)throw new Error("endReadable called on non-empty stream");w.endEmitted||(w.ended=!0,process.nextTick(function(){!w.endEmitted&&0===w.length&&(w.endEmitted=!0,h.readable=!1,h.emit("end"))}))}d.prototype.read=function(h){y("read",h);var w=this._readableState,I=h;if((!s.isNumber(h)||h>0)&&(w.emittedReadable=!1),0===h&&w.needReadable&&(w.length>=w.highWaterMark||w.ended))return y("read: emitReadable",w.length,w.ended),0===w.length&&w.ended?Z(this):C(this),null;if(0===(h=D(h,w))&&w.ended)return 0===w.length&&Z(this),null;var V,R=w.needReadable;return y("need readable",R),(0===w.length||w.length-h0?j(h,w):null,s.isNull(V)&&(w.needReadable=!0,h=0),w.length-=h,0===w.length&&!w.ended&&(w.needReadable=!0),I!==h&&w.ended&&0===w.length&&Z(this),s.isNull(V)||this.emit("data",V),V},d.prototype._read=function(h){this.emit("error",new Error("not implemented"))},d.prototype.pipe=function(h,w){var I=this,R=this._readableState;switch(R.pipesCount){case 0:R.pipes=h;break;case 1:R.pipes=[R.pipes,h];break;default:R.pipes.push(h)}R.pipesCount+=1,y("pipe count=%d opts=%j",R.pipesCount,w);var H=(!w||!1!==w.end)&&h!==process.stdout&&h!==process.stderr?b:re;function L(we){y("onunpipe"),we===I&&re()}function b(){y("onend"),h.end()}R.endEmitted?process.nextTick(H):I.once("end",H),h.on("unpipe",L);var B=function z(h){return function(){var w=h._readableState;y("pipeOnDrain",w.awaitDrain),w.awaitDrain&&w.awaitDrain--,0===w.awaitDrain&&E.listenerCount(h,"data")&&(w.flowing=!0,F(h))}}(I);function re(){y("cleanup"),h.removeListener("close",ae),h.removeListener("finish",ge),h.removeListener("drain",B),h.removeListener("error",te),h.removeListener("unpipe",L),I.removeListener("end",b),I.removeListener("end",re),I.removeListener("data",ne),R.awaitDrain&&(!h._writableState||h._writableState.needDrain)&&B()}function ne(we){y("ondata"),!1===h.write(we)&&(y("false write response, pause",I._readableState.awaitDrain),I._readableState.awaitDrain++,I.pause())}function te(we){y("onerror",we),pe(),h.removeListener("error",te),0===E.listenerCount(h,"error")&&h.emit("error",we)}function ae(){h.removeListener("finish",ge),pe()}function ge(){y("onfinish"),h.removeListener("close",ae),pe()}function pe(){y("unpipe"),I.unpipe(h)}return h.on("drain",B),I.on("data",ne),h._events&&h._events.error?l(h._events.error)?h._events.error.unshift(te):h._events.error=[te,h._events.error]:h.on("error",te),h.once("close",ae),h.once("finish",ge),h.emit("pipe",I),R.flowing||(y("pipe resume"),I.resume()),h},d.prototype.unpipe=function(h){var w=this._readableState;if(0===w.pipesCount)return this;if(1===w.pipesCount)return h&&h!==w.pipes||(h||(h=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,h&&h.emit("unpipe",this)),this;if(!h){var I=w.pipes,R=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var V=0;V{q.exports=s;var l=u(60833),v=u(26156);function E(y,f){this.afterTransform=function(d,p){return function M(y,f,d){var p=y._transformState;p.transforming=!1;var m=p.writecb;if(!m)return y.emit("error",new Error("no writecb in Transform class"));p.writechunk=null,p.writecb=null,v.isNullOrUndefined(d)||y.push(d),m&&m(f);var S=y._readableState;S.reading=!1,(S.needReadable||S.length{q.exports=g;var l=u(93172).Buffer;g.WritableState=s;var v=u(26156);v.inherits=u(83894);var E=u(295);function M(Y,G,F){this.chunk=Y,this.encoding=G,this.callback=F}function s(Y,G){var F=u(60833),j=(Y=Y||{}).highWaterMark,Z=Y.objectMode?16:16384;this.highWaterMark=j||0===j?j:Z,this.objectMode=!!Y.objectMode,G instanceof F&&(this.objectMode=this.objectMode||!!Y.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var T=!1===Y.decodeStrings;this.decodeStrings=!T,this.defaultEncoding=Y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){!function D(Y,G){var F=Y._writableState,j=F.sync,Z=F.writecb;if(function _(Y){Y.writing=!1,Y.writecb=null,Y.length-=Y.writelen,Y.writelen=0}(F),G)!function S(Y,G,F,j,Z){F?process.nextTick(function(){G.pendingcb--,Z(j)}):(G.pendingcb--,Z(j)),Y._writableState.errorEmitted=!0,Y.emit("error",j)}(Y,F,j,G,Z);else{var T=N(Y,F);!T&&!F.corked&&!F.bufferProcessing&&F.buffer.length&&C(Y,F),j?process.nextTick(function(){P(Y,F,T,Z)}):P(Y,F,T,Z)}}(G,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function g(Y){var G=u(60833);if(!(this instanceof g||this instanceof G))return new g(Y);this._writableState=new s(Y,this),this.writable=!0,E.call(this)}function m(Y,G,F,j,Z,T,o){G.writelen=j,G.writecb=o,G.writing=!0,G.sync=!0,F?Y._writev(Z,G.onwrite):Y._write(Z,T,G.onwrite),G.sync=!1}function P(Y,G,F,j){F||function x(Y,G){0===G.length&&G.needDrain&&(G.needDrain=!1,Y.emit("drain"))}(Y,G),G.pendingcb--,j(),U(Y,G)}function C(Y,G){if(G.bufferProcessing=!0,Y._writev&&G.buffer.length>1){for(var F=[],j=0;j{(n=q.exports=u(28460)).Stream=u(295),n.Readable=n,n.Writable=u(37067),n.Duplex=u(60833),n.Transform=u(68081),n.PassThrough=u(43813),!process.browser&&"disable"===process.env.READABLE_STREAM&&(q.exports=u(295))},73669:(q,n,u)=>{q.exports=u(37067)},37057:(q,n,u)=>{var l=u(3161);Object.keys(l.code).forEach(function(v){var E=l.code[v];n[v]=function(M){var s=new Error(v+", "+E.description+(M?" '"+M+"'":""));return s.errno=E.errno,s.code=v,s.path=M,s}})},94115:(q,n,u)=>{var l=u(2997),v=u(74162),E=u(95882),M=u(68429),s=u(46389),g=u(39199),y=u(37057),f=u(74514),d=u(1077),p=function(S,_,D){process.nextTick(function(){S(_,D)})},m=function(){};q.exports=function(S,_){var D={};S=v(S);var P=E(S.sublevel("blobs"),_),x=f(S.sublevel("stats")),C=S.sublevel("links"),N=d(),k=[],U=Date.now();D.mkdir=function(j,Z,T){if("function"==typeof Z)return D.mkdir(j,null,Z);Z||(Z=g(777)),T||(T=m),x.follow(j,function(o,h,w){return o&&"ENOENT"!==o.code?T(o):h?T(y.EEXIST(w)):void x.put(w,{type:"directory",mode:Z,size:4096},N.cb(w,T))})},D.rmdir=function(j,Z){Z||(Z=m),x.follow(j,function(T,o,h){if(T)return Z(T);D.readdir(h,function(w,I){return w?Z(w):I.length?Z(y.ENOTEMPTY(h)):void x.del(h,N.cb(h,Z))})})},D.readdir=function(j,Z){x.follow(j,function(T,o,h){return T?Z(T):o?o.isDirectory()?void x.list(h,Z):Z(y.ENOTDIR(h)):Z(y.ENOENT(h))})};var Y=function(j,Z,T){Z(j,function(o,h,w){if(o)return T(o);if(!h.isFile())return T(null,h);var I=h&&h.blob||w;P.size(I,function(R,V){if(R)return T(R);h.size=V,T(null,h)})})};D.stat=function(j,Z){Y(j,x.follow,Z)},D.lstat=function(j,Z){Y(j,x.get,Z)},D.exists=function(j,Z){x.follow(j,function(T){Z(!T)})};var G=function(j,Z,T,o){o||(o=m),Z(j,function(h,w,I){if(h)return o(h);x.update(I,{mode:T},N.cb(I,o))})};D.chmod=function(j,Z,T){G(j,x.follow,Z,T)},D.lchmod=function(j,Z,T){G(j,x.get,Z,T)};var F=function(j,Z,T,o,h){h||(h=m),Z(j,function(w,I,R){if(w)return h(w);x.update(R,{uid:T,gid:o},N.cb(R,h))})};return D.chown=function(j,Z,T,o){F(j,x.follow,Z,T,o)},D.lchown=function(j,Z,T,o){F(j,x.get,Z,T,o)},D.utimes=function(j,Z,T,o){o||(o=m),x.follow(j,function(h,w,I){if(h)return o(h);var R={};Z&&(R.atime=Z),T&&(R.mtime=T),x.update(I,R,N.cb(I,o))})},D.rename=function(j,Z,T){T||(T=m),x.follow(j,function(o,h,w){if(o)return T(o);var I=function(){T=N.cb(Z,N.cb(w,T)),x.put(Z,h,function(R){if(R)return T(R);x.del(w,T)})};x.follow(Z,function(R,V,H){return R&&"ENOENT"!==R.code?T(R):V?h.isDirectory()!==V.isDirectory()?T(y.EISDIR(w)):void(V.isDirectory()?D.readdir(H,function(L,b){return L?T(L):b.length?T(y.ENOTEMPTY(w)):void I()}):I()):I()})})},D.realpath=function(j,Z,T){if("function"==typeof Z)return D.realpath(j,null,Z);x.follow(j,function(o,h,w){if(o)return T(o);T(null,w)})},D.writeFile=function(j,Z,T,o){if("function"==typeof T)return D.writeFile(j,Z,null,T);"string"==typeof T&&(T={encoding:T}),T||(T={}),o||(o=m),Buffer.isBuffer(Z)||(Z=new Buffer(Z,T.encoding||"utf-8"));var h=T.flags||"w";T.append="w"!==h[0],x.follow(j,function(w,I,R){if(w&&"ENOENT"!==w.code)return o(w);if(I&&I.isDirectory())return o(y.EISDIR(R));if(I&&"x"===h[1])return o(y.EEXIST(R));var V=I&&I.blob||R;x.writable(R,function(H){if(H)return o(H);P.write(V,Z,T,function(L){if(L)return o(L);x.put(R,{ctime:I&&I.ctime,mtime:new Date,mode:T.mode||g(666),type:"file"},N.cb(R,o))})})})},D.appendFile=function(j,Z,T,o){if("function"==typeof T)return D.appendFile(j,Z,null,T);"string"==typeof T&&(T={encoding:T}),T||(T={}),T.flags="a",D.writeFile(j,Z,T,o)},D.unlink=function(j,Z){Z||(Z=m),x.get(j,function(T,o,h){if(T)return Z(T);if(o.isDirectory())return Z(y.EISDIR(h));var w=function(R){M(C,{start:R+"\xff",end:R+"\xff\xff"},function(V){if(V)return P.remove(R,Z);Z()})};x.del(h,N.cb(h,function(R){return R?Z(R):o.link?function(){var R=o.link.slice(0,o.link.indexOf("\xff"));C.del(o.link,function(V){if(V)return Z(V);w(R)})}():void C.del(h+"\xff",function(V){if(V)return Z(V);w(h)})}))})},D.readFile=function(j,Z,T){if("function"==typeof Z)return D.readFile(j,null,Z);"string"==typeof Z&&(Z={encoding:Z}),Z||(Z={});Z.encoding,Z.flag;x.follow(j,function(w,I,R){if(w)return T(w);if(I.isDirectory())return T(y.EISDIR(R));var V=I&&I.blob||R;P.read(V,function(H,L){if(H)return T(H);T(null,Z.encoding?L.toString(Z.encoding):L)})})},D.createReadStream=function(j,Z){Z||(Z={});var T=!1,o=l.readable(function(h){x.follow(j,function(w,I,R){if(w)return h(w);if(I.isDirectory())return h(y.EISDIR(R));var V=I&&I.blob||R,H=P.createReadStream(V,Z);o.emit("open"),H.on("end",function(){process.nextTick(function(){T||o.emit("close")})}),h(null,H)})});return o.on("close",function(){T=!0}),o},D.createWriteStream=function(j,Z){Z||(Z={});var T=Z.flags||"w",o=!1,h=Z.mode||g(666);Z.append="a"===T[0];var w=l.writable(function(I){x.follow(j,function(R,V,H){if(R&&"ENOENT"!==R.code)return I(R);if(V&&V.isDirectory())return I(y.EISDIR(H));if(V&&"x"===T[1])return I(y.EEXIST(H));var L=V&&V.blob||H;x.writable(L,function(b){if(b)return I(b);var re={ctime:V?V.ctime:new Date,mtime:new Date,mode:h,type:"file"};x.put(H,re,function(ne){if(ne)return I(ne);var te=P.createWriteStream(L,Z);w.emit("open"),te.on("finish",function(){re.mtime=new Date,x.put(H,re,function(){N.change(H),o||w.emit("close")})}),I(null,te)})})})});return w.on("close",function(){o=!0}),w},D.truncate=function(j,Z,T){x.follow(j,function(o,h,w){if(o)return T(o);var I=h&&h.blob||w;P.size(I,function(R,V){if(R)return T(R);x.writable(w,function(H){if(H)return T(H);if(T=s(N.cb(w,T)),!Z)return P.remove(I,T);var L=P.createWriteStream(I,{start:V{q.exports=function n(u){return null!==u&&("object"==typeof u||"function"==typeof u)}},48505:(q,n,u)=>{var l=u(78170);q.exports=function v(){for(var E={},M=0;M{var l=u(63928),v=u(46389),E=u(39448),M=u(39199),s=u(90163),g=u(48505),y=u(37057),f=s({type:"directory",mode:M(777),size:4096}),d=function(m){return m="/"===m[0]?m:"/"+m,"/"===(m=l.normalize(m))?m:"/"===m[m.length-1]?m.slice(0,-1):m},p=function(m){var S=m.split("/").length.toString(36);return"0000000000".slice(S.length)+S+m};q.exports=function(m){var S={};S.normalize=d,S.get=function(D,P){if("/"===(D=d(D)))return process.nextTick(P.bind(null,null,f,"/"));m.get(p(D),{valueEncoding:"json"},function(x,C){return x&&x.notFound?P(y.ENOENT(D),null,D):x?P(x,null,D):void P(null,s(C),D)})},S.writable=function(D,P){if("/"===(D=d(D)))return process.nextTick(P.bind(null,y.EPERM(D)));S.follow(l.dirname(D),function(x,C){return x?P(x):C.isDirectory()?void P(null,D):P(y.ENOTDIR(D))})},S.list=function(D,P){D=d(D);var x=p("/"===D?D:D+"/"),C=m.createKeyStream({start:x,end:x+"\xff"});P=v(P),C.on("error",P),C.pipe(E({encoding:"object"},function(N){N=N.map(function(k){return k.split("/").pop()}),P(null,N)}))};return S.follow=function(D,P){!function(D,P){var x="/",C=D.split("/").slice(1),N=function(){S.get(l.join(x,C.shift()),function(k,U,z){return k?P(k,U,D):(x=U.target||z,C.length?void N():P(null,U,z))})};N()}(d(D),function x(C,N,k){return C?P(C,null,k):N.target?S.get(N.target,x):void P(null,s(N),k)})},S.update=function(D,P,x){S.get(D,function(C,N,k){return C?x(C):"/"===k?x(y.EPERM(k)):void S.put(k,g(N,P),x)})},S.put=function(D,P,x){S.writable(D,function(C,N){if(C)return x(C);m.put(p(N),s(P),{valueEncoding:"json"},x)})},S.del=function(D,P){if("/"===(D=d(D)))return process.nextTick(P.bind(null,y.EPERM(D)));m.del(p(D),P)},S}},90163:q=>{var n=function(l){return l?"string"==typeof l?new Date(l):l:new Date},u=function(l){this.uid=l.uid||0,this.gid=l.gid||0,this.mode=l.mode||0,this.size=l.size||0,this.mtime=n(l.mtime),this.atime=n(l.atime),this.ctime=n(l.ctime),this.type=l.type,this.target=l.target,this.link=l.link,this.blob=l.blob};u.prototype.isDirectory=function(){return"directory"===this.type},u.prototype.isFile=function(){return"file"===this.type},u.prototype.isBlockDevice=function(){return!1},u.prototype.isCharacterDevice=function(){return!1},u.prototype.isSymbolicLink=function(){return"symlink"===this.type},u.prototype.isFIFO=function(){return!1},u.prototype.isSocket=function(){return!1},q.exports=function(l){return new u(l)}},1077:(q,n,u)=>{var l=u(59069);q.exports=function(){var v={},E=new l.EventEmitter;return E.watch=function(M,s){return v[M]||(v[M]=new l.EventEmitter,v[M].setMaxListeners(0)),s&&v[M].on("change",s),v[M]},E.watcher=function(M,s){var g=new l.EventEmitter,y=function(){g.emit("change","change",M)};return E.watch(M,y),s&&g.on("change",s),g.close=function(){E.unwatch(M,y)},g},E.unwatch=function(M,s){v[M]&&(s?v[M].removeListener("change",s):v[M].removeAllListeners("change"),v[M].listeners("change").length||delete v[M])},E.change=function(M){v[M]&&v[M].emit("change"),E.emit("change",M)},E.cb=function(M,s){return function(g,y){M&&E.change(M),s&&s(g,y)}},E}},55860:(q,n,u)=>{var l=u(87241);q.exports=function(E){var M=(E=l(E)).reverse,s=E.max||E.end,g=E.min||E.start,y=[g,s];return null!=g&&null!=s&&y.sort(),M&&(y=y.reverse()),E.start=y[0],E.end=y[1],delete E.min,delete E.max,E}},87241:q=>{"use strict";function n(v){return Object.prototype.toString.call(v)}var u={isArray:function(v){return Array.isArray(v)||"object"==typeof v&&"[object Array]"===n(v)},isDate:function(v){return"object"==typeof v&&"[object Date]"===n(v)},isRegExp:function(v){return"object"==typeof v&&"[object RegExp]"===n(v)},getRegExpFlags:function(v){var E="";return v.global&&(E+="g"),v.ignoreCase&&(E+="i"),v.multiline&&(E+="m"),E}};function l(v,E,M,s){var g=[],y=[],f=typeof Buffer<"u";return typeof E>"u"&&(E=!0),typeof M>"u"&&(M=1/0),function d(p,m){if(null===p)return null;if(0==m)return p;var S,_;if("object"!=typeof p)return p;if(u.isArray(p))S=[];else if(u.isRegExp(p))S=new RegExp(p.source,u.getRegExpFlags(p)),p.lastIndex&&(S.lastIndex=p.lastIndex);else if(u.isDate(p))S=new Date(p.getTime());else{if(f&&Buffer.isBuffer(p))return S=new Buffer(p.length),p.copy(S),S;typeof s>"u"?(_=Object.getPrototypeOf(p),S=Object.create(_)):(S=Object.create(s),_=s)}if(E){var D=g.indexOf(p);if(-1!=D)return y[D];g.push(p),y.push(S)}for(var P in p){var x;_&&(x=Object.getOwnPropertyDescriptor(_,P)),(!x||null!=x.set)&&(S[P]=d(p[P],m-1))}return S}(v,M)}q.exports=l,l.clonePrototype=function(v){if(null===v)return null;var E=function(){};return E.prototype=v,new E}},71175:(q,n,u)=>{var l=u(77826);q.exports=function(v){if(!v.hooks){var E=[],M=[];v.hooks={post:function(D,P){P||(P=D,D="");var x={test:l.checker(D),hook:P};return E.push(x),f(E,x)},pre:function(D,P){P||(P=D,D="");var x={test:l.checker(D),hook:P,safe:!1!==D.safe};return M.push(x),f(M,x)},posthooks:E,prehooks:M},v.on("put",function(D,P){d({type:"put",key:D,value:P})}),v.on("del",function(D,P){d({type:"del",key:D,value:P})}),v.on("batch",function(P){P.forEach(d)});var p=v.put,m=v.del,S=v.batch;v.put=function(D,P,x,C){return _(!1,[{key:D,value:P,type:"put"}],x,C)},v.del=function(D,P,x){return _(!1,[{key:D,type:"del"}],P,x)},v.batch=function(D,P,x){return _(!0,D,P,x)}}function s(D){return D&&("string"==typeof D?D:"string"==typeof D.prefix?D.prefix:"function"==typeof D.prefix?D.prefix():"")}function f(D,P){return function(){var x=D.indexOf(P);return!!~x&&(D.splice(x,1),!0)}}function d(D){D&&D.type&&E.forEach(function(P){P.test(D.key)&&P.hook(D)})}function _(D,P,x,C){try{P.forEach(function k(U,z){M.forEach(function(Y){if(Y.test(String(U.key))){var G={add:function(F,j){if(typeof F>"u")return this;if(!1===F)return delete P[z];var Z=s(F.prefix)||s(j)||Y.prefix||"";if(Z&&(F.prefix=Z),F.key=Z+F.key,Y.safe&&Y.test(String(F.key)))throw new Error("prehook cannot insert into own range");var T=F.keyEncoding||function g(D){if(D&&D._getKeyEncoding)return D._getKeyEncoding(D)}(F.prefix),o=F.valueEncoding||function y(D){if(D&&D._getValueEncoding)return D._getValueEncoding(D)}(F.prefix);return T&&(F.keyEncoding=T),o&&(F.valueEncoding=o),P.push(F),k(F,P.length-1),this},put:function(F,j){return"object"==typeof F&&(F.type="put"),this.add(F,j)},del:function(F,j){return"object"==typeof F&&(F.type="del"),this.add(F,j)},veto:function(){return this.add(!1)}};Y.hook.call(G,U,G.add,P)}})})}catch(k){return(C||x)(k)}if(1==(P=P.filter(function(k){return k&&k.type})).length&&!D){var N=P[0];return"put"==N.type?p.call(v,N.key,N.value,x,C):m.call(v,N.key,x,C)}return S.call(v,P,x,C)}}},77105:(q,n,u)=>{q.exports=f;var l=u(17294),v=u(30826).NI,E=u(26788),M=u(74148),s=u(40452),g=u(4205),y=u(28517);function f(p){if(!(this instanceof f))return new f(p);if(!p)throw new Error("constructor requires at least a location argument");this.IDBOptions={},this.location=p}E.inherits(f,v),f.prototype._open=function(p,m){var S=this,_={storeName:this.location,autoIncrement:!1,keyPath:null,onStoreReady:function(){m&&m(null,S.idb)},onError:function(D){m&&m(D)}};g(_,p),this.IDBOptions=_,this.idb=new l(_)},f.prototype._get=function(p,m,S){this.idb.get(p,function(_){if(void 0===_)return S(new Error("NotFound"));var D=!0;return!1===m.asBuffer&&(D=!1),m.raw&&(D=!1),D&&(_=_ instanceof Uint8Array?y(_):new Buffer(String(_))),S(null,_,p)},S)},f.prototype._del=function(p,m,S){this.idb.remove(p,S,S)},f.prototype._put=function(p,m,S,_){m instanceof ArrayBuffer&&(m=y(new Uint8Array(m)));var D=this.convertEncoding(p,m,S);Buffer.isBuffer(D.value)&&("function"==typeof m.toArrayBuffer?D.value=new Uint8Array(m.toArrayBuffer()):D.value=new Uint8Array(m)),this.idb.put(D.key,D.value,function(){_()},_)},f.prototype.convertEncoding=function(p,m,S){if(S.raw)return{key:p,value:m};if(m){var _=m.toString();"NaN"===_&&(m="NaN")}var D=S.valueEncoding,P={key:p,value:m};return m&&(!D||"binary"!==D)&&"object"!=typeof P.value&&(P.value=_),P},f.prototype.iterator=function(p){return"object"!=typeof p&&(p={}),new M(this.idb,p)},f.prototype._batch=function(p,m,S){var D,P,x,C,N=[];if(0===p.length)return setTimeout(S,0);for(D=0;D{var l=u(26788),v=u(30826).YI,E=u(52820);function M(s,g){g||(g={}),this.options=g,v.call(this,s),this._order=g.reverse?"DESC":"ASC",this._limit=g.limit,this._count=0,this._done=!1;var y=E.lowerBound(g),f=E.upperBound(g);try{this._keyRange=y||f?this.db.makeKeyRange({lower:y,upper:f,excludeLower:E.lowerBoundExclusive(g),excludeUpper:E.upperBoundExclusive(g)}):null}catch{this._keyRangeError=!0}this.callback=null}q.exports=M,l.inherits(M,v),M.prototype.createIterator=function(){var s=this;s.iterator=s.db.iterate(function(){s.onItem.apply(s,arguments)},{keyRange:s._keyRange,autoContinue:!1,order:s._order,onError:function(g){console.log("horrible error",g)}})},M.prototype.onItem=function(s,g,y){if(!g&&this.callback)return this.callback(),void(this.callback=!1);var f=!0;this._limit&&this._limit>0&&this._count++>=this._limit&&(f=!1),f&&this.callback(!1,g.key,g.value),g&&g.continue()},M.prototype._next=function(s){return s?this._keyRangeError?s():(this._started||(this.createIterator(),this._started=!0),void(this.callback=s)):new Error("next() requires a callback argument")}},94442:q=>{var n=Object.prototype.hasOwnProperty,u=Object.prototype.toString,l=function(v){var E="function"==typeof v&&!(v instanceof RegExp)||"[object Function]"===u.call(v);return!E&&typeof window<"u"&&(E=v===window.setTimeout||v===window.alert||v===window.confirm||v===window.prompt),E};q.exports=function(E,M){if(!l(M))throw new TypeError("iterator must be a function");var s,g,y="string"==typeof E,f=E.length,d=arguments.length>2?arguments[2]:null;if(f===+f)for(s=0;s{q.exports=Object.keys||u(5741)},71133:q=>{var n=Object.prototype.toString;q.exports=function(l){var v=n.call(l),E="[object Arguments]"===v;return E||(E="[object Array]"!==v&&null!==l&&"object"==typeof l&&"number"==typeof l.length&&l.length>=0&&"[object Function]"===n.call(l.callee)),E}},5741:(q,n,u)=>{!function(){"use strict";var f,l=Object.prototype.hasOwnProperty,v=Object.prototype.toString,E=u(94442),M=u(71133),s=!{toString:null}.propertyIsEnumerable("toString"),g=function(){}.propertyIsEnumerable("prototype"),y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];f=function(p){var m=null!==p&&"object"==typeof p,S="[object Function]"===v.call(p),_=M(p),D=[];if(!m&&!S&&!_)throw new TypeError("Object.keys called on a non-object");if(_)E(p,function(k){D.push(k)});else{var P,x=g&&S;for(P in p)(!x||"prototype"!==P)&&l.call(p,P)&&D.push(P)}if(s){var C=p.constructor,N=C&&C.prototype===p;E(y,function(k){(!N||"constructor"!==k)&&l.call(p,k)&&D.push(k)})}return D},q.exports=f}()},2968:q=>{q.exports=function n(u){return null!==u&&("object"==typeof u||"function"==typeof u)}},4205:(q,n,u)=>{var l=u(41638),v=u(2968);q.exports=function E(){for(var M={},s=0;s{var l=u(72426);function E(g,y,f){y.limit=y.reverse?2:1;(function v(g,y,f){var d=[];return y.forEach(function(p){function m(S){!1!==f(p,S)&&d.forEach(function(_){_()})}g.on(p,m),d.push(function(){g.removeListener(p,m)})}),g})(g.createReadStream(y),["data","error","end"],function(p,m){if(y.reverse&&m&&y.start&&m.key.toString()>y.start)return!1;"error"==p?f(m):"end"==p?f(new Error("range not found"),null,null):f(null,m.key,m.value)})}(n=q.exports=E).first=function M(g,y,f){return f||(f=y,y={}),y.reverse=!1,E(g,l(y),f)},n.last=function s(g,y,f){f||(f=y,y={});y.start;return y.reverse=!0,E(g,l(y),function(p,m,S){if(p){var _=y.start;y.start=null,E(g,y,function(D,P,x){if(!P)return f(p,null,null);var C=P.toString();C<=_&&(!y.end||C>=y.end)?f(D,P,x):f(p,null,null)})}else f(p,m,S)})}},72426:q=>{q.exports=function(u){var l=u.reverse,v=u.end,E=u.start,M=[E,v];return null!=E&&null!=v&&M.sort(),l&&(M=M.reverse()),u.start=M[0],u.end=M[1],u}},25904:q=>{function n(v,E,M,s){var g={type:v,key:E,value:M,options:s};return s&&s.prefix&&(g.prefix=s.prefix,delete s.prefix),this._operations.push(g),this}function u(v){this._operations=[],this._sdb=v,this.put=n.bind(this,"put"),this.del=n.bind(this,"del")}var l=u.prototype;l.clear=function(){this._operations=[]},l.write=function(v){this._sdb.batch(this._operations,v)},q.exports=u},74162:(q,n,u)=>{u(59069).EventEmitter,process.nextTick;var E=u(91399),M=u(25904),s=u(55860),g=u(71175);q.exports=function(y,f){function d(){}d.prototype=y;var p=new d;if(p.sublevel)return p;var m=(f=f||{}).sep=f.sep||"\xff";function S(D){return function(P){return(P=s(P=P||{})).reverse?P.start=P.start||m:P.end=P.end||m,D.call(p,P)}}p._options=f,g(p),p.sublevels={},p.sublevel=function(D,P){return p.sublevels[D]?p.sublevels[D]:new E(p,D,P||this._options)},p.methods={},p.prefix=function(D){return""+(D||"")},p.pre=function(D,P){return P||(P=D,D={max:m}),p.hooks.pre(D,P)},p.post=function(D,P){return P||(P=D,D={max:m}),p.hooks.post(D,P)},p.readStream=p.createReadStream=S(p.createReadStream),p.keyStream=p.createKeyStream=S(p.createKeyStream),p.valuesStream=p.createValueStream=S(p.createValueStream);var _=p.batch;return p.batch=function(D,P,x){if(!Array.isArray(D))return new M(p);D.forEach(function(C){C.prefix&&("function"==typeof C.prefix.prefix?C.key=C.prefix.prefix(C.key):"string"==typeof C.prefix&&(C.key=C.prefix+C.key))}),_.call(p,D,P,x)},p}},23989:(q,n,u)=>{q.exports=Object.keys||u(21079)},21079:(q,n,u)=>{!function(){"use strict";var g,l=Object.prototype.hasOwnProperty,v=u(55782),E=u(7480),M=!{toString:null}.propertyIsEnumerable("toString"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];g=function(f){if(!v.object(f)&&!v.array(f))throw new TypeError("Object.keys called on a non-object");var d,p=[];for(d in f)l.call(f,d)&&p.push(d);return M&&E(s,function(m){l.call(f,m)&&p.push(m)}),p},q.exports=g}()},41698:q=>{q.exports=function n(u){return null!==u&&("object"==typeof u||"function"==typeof u)}},34432:(q,n,u)=>{var l=u(23989),v=u(41698);q.exports=function E(){for(var M={},s=0;s{var l=u(59069).EventEmitter,v=u(26788).inherits,E=u(77826),M=u(55860),s=u(34432),g=u(25904);function y(S,_,D){if("string"==typeof D&&(console.error("db.sublevel(name, seperator) is depreciated"),console.error("use db.sublevel(name, {sep: separator})) if you must"),D={sep:D}),!(this instanceof y))return new y(S,_,D);if(!S)throw new Error("must provide db");if(!_)throw new Error("must provide prefix");(D=D||{}).sep=D.sep||"\xff",this._parent=S,this._options=D,this.options=D,this._prefix=_,this._root=p(this),S.sublevels[_]=this,this.sublevels={},this.methods={};var P=this;this.hooks={pre:function(){return P.pre.apply(P,arguments)},post:function(){return P.post.apply(P,arguments)}}}v(y,l);var f=y.prototype;function p(S){return S._parent?p(S._parent):S}f._key=function(S){var _=this._options.sep;return _+this._prefix+_+S},f._getOptsAndCb=function(S,_){return"function"==typeof S&&(_=S,S={}),{opts:s(S,this._options),cb:_}},f.sublevel=function(S,_){return this.sublevels[S]?this.sublevels[S]:new y(this,S,_||this._options)},f.put=function(S,_,D,P){var x=this._getOptsAndCb(D,P);this._root.put(this.prefix(S),_,x.opts,x.cb)},f.get=function(S,_,D){var P=this._getOptsAndCb(_,D);this._root.get(this.prefix(S),P.opts,P.cb)},f.del=function(S,_,D){var P=this._getOptsAndCb(_,D);this._root.del(this.prefix(S),P.opts,P.cb)},f.batch=function(S,_,D){if(!Array.isArray(S))return new g(this);var P=this,x=this._getOptsAndCb(_,D);S.forEach(function(C){"string"==typeof C.prefix?C.key=C.prefix+C.key:C.key=(C.prefix||P).prefix(C.key),C.prefix&&(C.prefix=null)}),this._root.batch(S,x.opts,x.cb)},f._getKeyEncoding=function(){return this.options.keyEncoding?this.options.keyEncoding:this._parent&&this._parent._getKeyEncoding?this._parent._getKeyEncoding():void 0},f._getValueEncoding=function(){return this.options.valueEncoding?this.options.valueEncoding:this._parent&&this._parent._getValueEncoding?this._parent._getValueEncoding():void 0},f.prefix=function(S){var _=this._options.sep;return this._parent.prefix()+_+this._prefix+_+(S||"")},f.keyStream=f.createKeyStream=function(S){return(S=S||{}).keys=!0,S.values=!1,this.createReadStream(S)},f.valueStream=f.createValueStream=function(S){return(S=S||{}).keys=!1,S.values=!0,S.keys=!1,this.createReadStream(S)},f.readStream=f.createReadStream=function(S){S=S||{};var _=p(this),D=this.prefix(),P=E.prefix(S,D);!function d(S,_){["valueEncoding","encoding","keyEncoding","reverse","values","keys","limit","fillCache"].forEach(function(D){_.hasOwnProperty(D)&&(S[D]=_[D])})}(P,s(S,this._options));var x=_.createReadStream(P);if(!1===P.values){var C;if(C=x.read)x.read=function(k){var U=C.call(this,k);return U&&(U=U.substring(D.length)),U};else{var N=x.emit;x.emit=function(k,U){"data"===k?N.call(this,"data",U.substring(D.length)):N.call(this,k,U)}}return x}return!1===P.keys||((C=x.read)?x.read=function(U){var z=C.call(this,U);return z&&(z.key=z.key.substring(D.length)),z}:x.on("data",function(U){U.key=U.key.substring(D.length)})),x},f.writeStream=f.createWriteStream=function(){var S=p(this),_=this.prefix(),D=S.createWriteStream.apply(S,arguments),P=D.write,x=this._options.encoding,C=this._options.valueEncoding,N=this._options.keyEncoding,k=!x&&!C&&!N;return D.write=k?function(U){return U.key=_+U.key,P.call(D,U)}:function(U){return U.key=_+U.key,x&&typeof U.encoding>"u"&&(U.encoding=x),C&&typeof U.valueEncoding>"u"&&(U.valueEncoding=C),N&&typeof U.keyEncoding>"u"&&(U.keyEncoding=N),P.call(D,U)},D},f.approximateSize=function(){var S=p(db);return S.approximateSize.apply(S,arguments)},f.pre=function(S,_){_||(_=S,S=null),S=E.prefix(S,this.prefix(),this._options.sep);var D=p(this._parent),P=this.prefix();return D.hooks.pre(M(S),function(x,C,N){_({key:x.key.substring(P.length),value:x.value,type:x.type},function(k,U){C(k,k.prefix?U:U||P)},N)})},f.post=function(S,_){_||(_=S,S=null);var D=p(this._parent),P=this.prefix();return S=E.prefix(S,P,this._options.sep),D.hooks.post(M(S),function(x){_({key:x.key.substring(P.length),value:x.value,type:x.type})})};q.exports=y},31238:(q,n,u)=>{var l=u(31404),v=u(24062).WriteError,E=l.getOptions,M=l.dispatchError;function s(g){this._levelup=g,this.batch=g.db.batch(),this.ops=[]}s.prototype.put=function(g,y,f){f=E(this._levelup,f);var d=l.encodeKey(g,f),p=l.encodeValue(y,f);try{this.batch.put(d,p)}catch(m){throw new v(m)}return this.ops.push({type:"put",key:d,value:p}),this},s.prototype.del=function(g,y){y=E(this._levelup,y);var f=l.encodeKey(g,y);try{this.batch.del(f)}catch(d){throw new v(d)}return this.ops.push({type:"del",key:f}),this},s.prototype.clear=function(){try{this.batch.clear()}catch(g){throw new v(g)}return this.ops=[],this},s.prototype.write=function(g){var y=this._levelup,f=this.ops;try{this.batch.write(function(d){if(d)return M(y,new v(d),g);y.emit("batch",f),g&&g()})}catch(d){throw new v(d)}},q.exports=s},24062:(q,n,u)=>{var l=u(3161).create,v=l("LevelUPError"),E=l("NotFoundError",v);E.prototype.notFound=!0,E.prototype.status=404,q.exports={LevelUPError:v,InitializationError:l("InitializationError",v),OpenError:l("OpenError",v),ReadError:l("ReadError",v),WriteError:l("WriteError",v),NotFoundError:E,EncodingError:l("EncodingError",v)}},4427:(q,n,u)=>{var l=u(59069).EventEmitter,v=u(26788).inherits,E=u(72860),M=u(3218),s=u(67125),g=u(24062).WriteError,y=u(24062).ReadError,f=u(24062).NotFoundError,d=u(24062).OpenError,p=u(24062).EncodingError,m=u(24062).InitializationError,S=u(31022),_=u(95011),D=u(31404),P=u(31238),x=D.getOptions,C=D.defaultOptions,N=D.getLevelDOWN,k=D.dispatchError;function U(G,F){return"function"==typeof G?G:F}function z(G,F,j){if(!(this instanceof z))return new z(G,F,j);var Z;if(l.call(this),this.setMaxListeners(1/0),"function"==typeof G?((F="object"==typeof F?F:{}).db=G,G=null):"object"==typeof G&&"function"==typeof G.db&&(F=G,G=null),"function"==typeof F&&(j=F,F={}),(!F||"function"!=typeof F.db)&&"string"!=typeof G){if(Z=new m("Must provide a location for the database"),j)return process.nextTick(function(){j(Z)});throw Z}F=x(this,F),this.options=E(C,F),this._status="new",M(this,"location",G,"e"),this.open(j)}function Y(G){return function(F,j){N()[G](F,j||function(){})}}v(z,l),z.prototype.open=function(G){var j,Z,F=this;return this.isOpen()?(G&&process.nextTick(function(){G(null,F)}),this):this._isOpening()?G&&this.once("open",function(){G(null,F)}):(this.emit("opening"),this._status="opening",this.db=new s(this.location),j=this.options.db||N(),void(Z=j(this.location)).open(this.options,function(T){if(T)return k(F,new d(T),G);F.db.setDb(Z),F.db=Z,F._status="open",G&&G(null,F),F.emit("open"),F.emit("ready")}))},z.prototype.close=function(G){var F=this;if(this.isOpen())this._status="closing",this.db.close(function(){F._status="closed",F.emit("closed"),G&&G.apply(null,arguments)}),this.emit("closing"),this.db=null;else{if("closed"==this._status&&G)return process.nextTick(G);"closing"==this._status&&G?this.once("closed",G):this._isOpening()&&this.once("open",function(){F.close(G)})}},z.prototype.isOpen=function(){return"open"==this._status},z.prototype._isOpening=function(){return"opening"==this._status},z.prototype.isClosed=function(){return/^clos/.test(this._status)},z.prototype.get=function(G,F,j){var T,Z=this;return"function"!=typeof(j=U(F,j))?k(this,new y("get() requires key and callback arguments")):this._isOpening()||this.isOpen()?(F=D.getOptions(this,F),T=D.encodeKey(G,F),F.asBuffer=D.isValueAsBuffer(F),void this.db.get(T,F,function(o,h){if(o)return o=/notfound/i.test(o)?new f("Key not found in database ["+G+"]",o):new y(o),k(Z,o,j);if(j){try{h=D.decodeValue(h,F)}catch(w){return j(new p(w))}j(null,h)}})):k(this,new y("Database is not open"),j)},z.prototype.put=function(G,F,j,Z){var o,h,T=this;return Z=U(j,Z),null==G||null==F?k(this,new g("put() requires key and value arguments"),Z):this._isOpening()||this.isOpen()?(j=x(this,j),o=D.encodeKey(G,j),h=D.encodeValue(F,j),void this.db.put(o,h,j,function(w){if(w)return k(T,new g(w),Z);T.emit("put",G,F),Z&&Z()})):k(this,new g("Database is not open"),Z)},z.prototype.del=function(G,F,j){var T,Z=this;return j=U(F,j),null==G?k(this,new g("del() requires a key argument"),j):this._isOpening()||this.isOpen()?(F=x(this,F),T=D.encodeKey(G,F),void this.db.del(T,F,function(o){if(o)return k(Z,new g(o),j);Z.emit("del",G),j&&j()})):k(this,new g("Database is not open"),j)},z.prototype.batch=function(G,F,j){var T,o,h,Z=this;return arguments.length?(j=U(F,j),Array.isArray(G)?this._isOpening()||this.isOpen()?(F=x(this,F),T=F.keyEncoding,o=F.valueEncoding,h=G.map(function(w){if(void 0===w.type||void 0===w.key)return{};var V,I=w.keyEncoding||T,R=w.valueEncoding||w.encoding||o;return"utf8"!=I&&"binary"!=I||"utf8"!=R&&"binary"!=R?(V={type:w.type,key:D.encodeKey(w.key,F,w)},void 0!==w.value&&(V.value=D.encodeValue(w.value,F,w)),V):w}),void this.db.batch(h,F,function(w){if(w)return k(Z,new g(w),j);Z.emit("batch",G),j&&j()})):k(this,new g("Database is not open"),j):k(this,new g("batch() requires an array argument"),j)):new P(this)},z.prototype.approximateSize=function(G,F,j){var T,o,Z=this;return null==G||null==F||"function"!=typeof j?k(this,new y("approximateSize() requires start, end and callback arguments"),j):(T=D.encodeKey(G,this.options),o=D.encodeKey(F,this.options),this._isOpening()||this.isOpen()?void this.db.approximateSize(T,o,function(h,w){if(h)return k(Z,new d(h),j);j&&j(null,w)}):k(this,new g("Database is not open"),j))},z.prototype.readStream=z.prototype.createReadStream=function(G){var F=this;return G=E(this.options,G),new S(G,this,function(j){return F.db.iterator(j)})},z.prototype.keyStream=z.prototype.createKeyStream=function(G){return this.createReadStream(E(G,{keys:!0,values:!1}))},z.prototype.valueStream=z.prototype.createValueStream=function(G){return this.createReadStream(E(G,{keys:!1,values:!0}))},z.prototype.writeStream=z.prototype.createWriteStream=function(G){return new _(E(G),this)},z.prototype.toString=function(){return"LevelUP"},q.exports=z,q.exports.copy=D.copy,q.exports.destroy=Y("destroy"),q.exports.repair=Y("repair")},31022:(q,n,u)=>{var l=u(55717).Readable,v=u(26788).inherits,E=u(72860),M=u(24062).EncodingError,s=u(31404),g={keys:!0,values:!0},y=function(S,_){return{key:s.decodeKey(S,this._options),value:s.decodeValue(_,this._options)}},f=function(S){return s.decodeKey(S,this._options)},d=function(S,_){return s.decodeValue(_,this._options)},p=function(){return null};function m(S,_,D){if(!(this instanceof m))return new m(S,_,D);l.call(this,{objectMode:!0,highWaterMark:S.highWaterMark}),this._db=_,S=this._options=E(g,S),this._keyEncoding=S.keyEncoding||S.encoding,this._valueEncoding=S.valueEncoding||S.encoding,typeof this._options.start<"u"&&(this._options.start=s.encodeKey(this._options.start,this._options)),typeof this._options.end<"u"&&(this._options.end=s.encodeKey(this._options.end,this._options)),"number"!=typeof this._options.limit&&(this._options.limit=-1),this._options.keyAsBuffer=s.isKeyAsBuffer(this._options),this._options.valueAsBuffer=s.isValueAsBuffer(this._options),this._makeData=this._options.keys&&this._options.values?y:this._options.keys?f:this._options.values?d:p;var P=this;this._db.isOpen()?this._iterator=D(this._options):this._db.once("ready",function(){P._destroyed||(P._iterator=D(P._options))})}v(m,l),m.prototype._read=function S(){var _=this;if(!_._db.isOpen())return _._db.once("ready",function(){S.call(_)});_._destroyed||_._iterator.next(function(D,P,x){if(D||void 0===P&&void 0===x)return!D&&!_._destroyed&&_.push(null),_._cleanup(D);try{x=_._makeData(P,x)}catch(C){return _._cleanup(new M(C))}_._destroyed||_.push(x)})},m.prototype._cleanup=function(S){if(!this._destroyed){this._destroyed=!0;var _=this;S&&_.emit("error",S),_._iterator?_._iterator.end(function(){_._iterator=null,_.emit("close")}):_.emit("close")}},m.prototype.destroy=function(){this._cleanup()},m.prototype.toString=function(){return"LevelUP.ReadStream"},q.exports=m},31404:(q,n,u)=>{var s,U,l=u(72860),v=u(24062).LevelUPError,E=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"],M={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},g=function(){function U(Y){return null==Y||Buffer.isBuffer(Y)}var z={};return z.utf8=z["utf-8"]={encode:function(Y){return U(Y)?Y:String(Y)},decode:function(Y){return Y},buffer:!1,type:"utf8"},z.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},E.forEach(function(Y){z[Y]||(z[Y]={encode:function(G){return U(G)?G:new Buffer(G,Y)},decode:function(G){return process.browser?G.toString(Y):G},buffer:!0,type:Y})}),z}(),y=(U={},E.forEach(function(z){U[z]={valueEncoding:z}}),U);function S(U,z){var Y=z&&z.keyEncoding||U.keyEncoding||"utf8";return g[Y]||Y}function _(U,z){var Y=z&&(z.valueEncoding||z.encoding)||U.valueEncoding||U.encoding||"utf8";return g[Y]||Y}q.exports={defaultOptions:M,copy:function f(U,z,Y){U.readStream().pipe(z.writeStream()).on("close",Y||function(){}).on("error",Y||function(G){throw G})},getOptions:function d(U,z){var Y="string"==typeof z;return!Y&&z&&z.encoding&&!z.valueEncoding&&(z.valueEncoding=z.encoding),l(U&&U.options||{},Y?y[z]||y[M.valueEncoding]:z)},getLevelDOWN:function p(){if(s)return s;var Y,U=u(73619).v6.ct,z="Could not locate LevelDOWN, try `npm install leveldown`";try{Y=u(94093).version}catch{throw new v(z)}if(!u(61695).satisfies(Y,U))throw new v("Installed version of LevelDOWN ("+Y+") does not match required version ("+U+")");try{return s=u(70131)}catch{throw new v(z)}},dispatchError:function m(U,z,Y){return"function"==typeof Y?Y(z):U.emit("error",z)},encodeKey:function D(U,z,Y){return S(z,Y).encode(U)},encodeValue:function P(U,z,Y){return _(z,Y).encode(U)},isValueAsBuffer:function N(U,z){return _(U,z).buffer},isKeyAsBuffer:function k(U,z){return S(U,z).buffer},decodeValue:function C(U,z){return _(z).decode(U)},decodeKey:function x(U,z){return S(z).decode(U)}}},95011:(q,n,u)=>{var l=u(295).Stream,v=u(26788).inherits,E=u(72860),M=u(5259),s=global.setImmediate||process.nextTick,g=u(31404).getOptions,y={type:"put"};function f(d,p){if(!(this instanceof f))return new f(d,p);l.call(this),this._options=E(y,g(p,d)),this._db=p,this._buffer=[],this._status="init",this._end=!1,this.writable=!0,this.readable=!1;var m=this,S=function(){m.writable&&(m._status="ready",m.emit("ready"),m._process())};p.isOpen()?s(S):p.once("ready",S)}v(f,l),f.prototype.write=function(d){return!!this.writable&&(this._buffer.push(d),"init"!=this._status&&this._processDelayed(),!(this._options.maxBufferLength&&this._buffer.length>this._options.maxBufferLength)||(this._writeBlock=!0,!1))},f.prototype.end=function(d){var p=this;d&&this.write(d),s(function(){p._end=!0,p._process()})},f.prototype.destroy=function(){this.writable=!1,this.end()},f.prototype.destroySoon=function(){this.end()},f.prototype.add=function(d){if(d.props)return d.props.Directory?d.pipe(this._db.writeStream(this._options)):(d.props.File||d.File||"File"==d.type)&&this._write(d),!0},f.prototype._processDelayed=function(){var d=this;s(function(){d._process()})},f.prototype._process=function(){var d,p=this;if("ready"==p._status||!p.writable)return p._buffer.length&&p.writable?(p._status="writing",d=p._buffer,p._buffer=[],p._db.batch(d.map(function(S){return{type:S.type||p._options.type,key:S.key,value:S.value,keyEncoding:S.keyEncoding||p._options.keyEncoding,valueEncoding:S.valueEncoding||S.encoding||p._options.valueEncoding}}),function(S){if(p.writable){if("closed"!=p._status&&(p._status="ready"),S)return p.writable=!1,p.emit("error",S);p._process()}}),void(p._writeBlock&&(p._writeBlock=!1,p.emit("drain")))):void(p._end&&"closed"!=p._status&&(p._status="closed",p.writable=!1,p.emit("close")));p._buffer.length&&"closed"!=p._status&&p._processDelayed()},f.prototype._write=function(d){var p=d.path||d.props.path,m=this;p&&d.pipe(M(function(S,_){if(S)return m.writable=!1,m.emit("error",S);m._options.fstreamRoot&&p.indexOf(m._options.fstreamRoot)>-1&&(p=p.substr(m._options.fstreamRoot.length+1)),m.write({key:p,value:_.slice(0)})}))},f.prototype.toString=function(){return"LevelUP.WriteStream"},q.exports=f},5259:(q,n,u)=>{var l=u(55717).Duplex;function E(M){if(!(this instanceof E))return new E(M);if(this._bufs=[],this.length=0,"function"==typeof M){this._callback=M;var s=function(g){this._callback&&(this._callback(g),this._callback=null)}.bind(this);this.on("pipe",function(g){g.on("error",s)}),this.on("unpipe",function(g){g.removeListener("error",s)})}else Buffer.isBuffer(M)?this.append(M):Array.isArray(M)&&M.forEach(function(g){Buffer.isBuffer(g)&&this.append(g)}.bind(this));l.call(this)}u(26788).inherits(E,l),E.prototype._offset=function(M){for(var y,s=0,g=0;gthis.length)&&(y=this.length),g>=this.length)return M||new Buffer(0);if(y<=0)return M||new Buffer(0);var D,P,f=!!M,d=this._offset(g),p=y-g,m=p,S=f&&s||0,_=d[1];if(0===g&&y==this.length){if(!f)return Buffer.concat(this._bufs);for(P=0;P(D=this._bufs[P].length-_))){this._bufs[P].copy(M,S,_,_+m);break}this._bufs[P].copy(M,S,_),S+=D,m-=D,_&&(_=0)}return M},E.prototype.toString=function(M,s,g){return this.slice(s,g).toString(M)},E.prototype.consume=function(M){for(;this._bufs.length;){if(!(M>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(M),this.length-=M;break}M-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},E.prototype.duplicate=function(){for(var M=0,s=new E;M{q.exports=Array.isArray||function(n){return"[object Array]"==Object.prototype.toString.call(n)}},66958:(q,n,u)=>{q.exports=s;var l=Object.keys||function(f){var d=[];for(var p in f)d.push(p);return d},v=u(26156);v.inherits=u(83894);var E=u(94515),M=u(23699);function s(f){if(!(this instanceof s))return new s(f);E.call(this,f),M.call(this,f),f&&!1===f.readable&&(this.readable=!1),f&&!1===f.writable&&(this.writable=!1),this.allowHalfOpen=!0,f&&!1===f.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",g)}function g(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}v.inherits(s,E),function y(f,d){for(var p=0,m=f.length;p{q.exports=E;var l=u(50596),v=u(26156);function E(M){if(!(this instanceof E))return new E(M);l.call(this,M)}v.inherits=u(83894),v.inherits(E,l),E.prototype._transform=function(M,s,g){g(null,M)}},94515:(q,n,u)=>{q.exports=f;var l=u(4364),v=u(93172).Buffer;f.ReadableState=y;var E=u(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(o,h){return o.listeners(h).length});var g,M=u(295),s=u(26156);function y(o,h){var w=(o=o||{}).highWaterMark;this.highWaterMark=w||0===w?w:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(g||(g=u(15453).s),this.decoder=new g(o.encoding),this.encoding=o.encoding)}function f(o){if(!(this instanceof f))return new f(o);this._readableState=new y(o,this),this.readable=!0,M.call(this)}function d(o,h,w,I,R){var V=function D(o,h){var w=null;return!v.isBuffer(h)&&"string"!=typeof h&&null!=h&&!o.objectMode&&(w=new TypeError("Invalid non-string/buffer chunk")),w}(h,w);if(V)o.emit("error",V);else if(null==w)h.reading=!1,h.ended||function P(o,h){if(h.decoder&&!h.ended){var w=h.decoder.end();w&&w.length&&(h.buffer.push(w),h.length+=h.objectMode?1:w.length)}h.ended=!0,h.length>0?x(o):j(o)}(o,h);else if(h.objectMode||w&&w.length>0)if(h.ended&&!R){var H=new Error("stream.push() after EOF");o.emit("error",H)}else if(h.endEmitted&&R){H=new Error("stream.unshift() after end event");o.emit("error",H)}else h.decoder&&!R&&!I&&(w=h.decoder.write(w)),h.length+=h.objectMode?1:w.length,R?h.buffer.unshift(w):(h.reading=!1,h.buffer.push(w)),h.needReadable&&x(o),function N(o,h){h.readingMore||(h.readingMore=!0,process.nextTick(function(){!function k(o,h){for(var w=h.length;!h.reading&&!h.flowing&&!h.ended&&h.lengthh.highWaterMark&&(h.highWaterMark=function S(o){if(o>=m)o=m;else{o--;for(var h=1;h<32;h<<=1)o|=o>>h;o++}return o}(o)),o>h.length?h.ended?h.length:(h.needReadable=!0,0):o)}function x(o){var h=o._readableState;h.needReadable=!1,!h.emittedReadable&&(h.emittedReadable=!0,h.sync?process.nextTick(function(){C(o)}):C(o))}function C(o){o.emit("readable")}function z(o){var w,h=o._readableState;function I(R,V,H){!1===R.write(w)&&h.awaitDrain++}for(h.awaitDrain=0;h.pipesCount&&null!==(w=o.read());)if(1===h.pipesCount?I(h.pipes):Z(h.pipes,I),o.emit("data",w),h.awaitDrain>0)return;if(0===h.pipesCount)return h.flowing=!1,void(E.listenerCount(o,"data")>0&&G(o));h.ranOut=!0}function Y(){this._readableState.ranOut&&(this._readableState.ranOut=!1,z(this))}function G(o,h){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var I=h||!1,R=!1;o.readable=!0,o.pipe=M.prototype.pipe,o.on=o.addListener=M.prototype.on,o.on("readable",function(){R=!0;for(var V;!I&&null!==(V=o.read());)o.emit("data",V);null===V&&(R=!1,o._readableState.needReadable=!0)}),o.pause=function(){I=!0,this.emit("pause")},o.resume=function(){I=!1,R?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function F(o,h){var H,w=h.buffer,I=h.length,R=!!h.decoder,V=!!h.objectMode;if(0===w.length)return null;if(0===I)H=null;else if(V)H=w.shift();else if(!o||o>=I)H=R?w.join(""):v.concat(w,I),w.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!h.endEmitted&&h.calledRead&&(h.ended=!0,process.nextTick(function(){!h.endEmitted&&0===h.length&&(h.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function Z(o,h){for(var w=0,I=o.length;w0)&&(h.emittedReadable=!1),0===o&&h.needReadable&&(h.length>=h.highWaterMark||h.ended))return x(this),null;if(0===(o=_(o,h))&&h.ended)return I=null,h.length>0&&h.decoder&&(I=F(o,h),h.length-=I.length),0===h.length&&j(this),I;var R=h.needReadable;return h.length-o<=h.highWaterMark&&(R=!0),(h.ended||h.reading)&&(R=!1),R&&(h.reading=!0,h.sync=!0,0===h.length&&(h.needReadable=!0),this._read(h.highWaterMark),h.sync=!1),R&&!h.reading&&(o=_(w,h)),null===(I=o>0?F(o,h):null)&&(h.needReadable=!0,o=0),h.length-=o,0===h.length&&!h.ended&&(h.needReadable=!0),h.ended&&!h.endEmitted&&0===h.length&&j(this),I},f.prototype._read=function(o){this.emit("error",new Error("not implemented"))},f.prototype.pipe=function(o,h){var w=this,I=this._readableState;switch(I.pipesCount){case 0:I.pipes=o;break;case 1:I.pipes=[I.pipes,o];break;default:I.pipes.push(o)}I.pipesCount+=1;var V=(!h||!1!==h.end)&&o!==process.stdout&&o!==process.stderr?L:B;function H(ge){ge===w&&B()}function L(){o.end()}I.endEmitted?process.nextTick(V):w.once("end",V),o.on("unpipe",H);var b=function U(o){return function(){var w=o._readableState;w.awaitDrain--,0===w.awaitDrain&&z(o)}}(w);function B(){o.removeListener("close",ne),o.removeListener("finish",te),o.removeListener("drain",b),o.removeListener("error",re),o.removeListener("unpipe",H),w.removeListener("end",L),w.removeListener("end",B),(!o._writableState||o._writableState.needDrain)&&b()}function re(ge){ae(),o.removeListener("error",re),0===E.listenerCount(o,"error")&&o.emit("error",ge)}function ne(){o.removeListener("finish",te),ae()}function te(){o.removeListener("close",ne),ae()}function ae(){w.unpipe(o)}return o.on("drain",b),o._events&&o._events.error?l(o._events.error)?o._events.error.unshift(re):o._events.error=[re,o._events.error]:o.on("error",re),o.once("close",ne),o.once("finish",te),o.emit("pipe",w),I.flowing||(this.on("readable",Y),I.flowing=!0,process.nextTick(function(){z(w)})),o},f.prototype.unpipe=function(o){var h=this._readableState;if(0===h.pipesCount)return this;if(1===h.pipesCount)return o&&o!==h.pipes||(o||(o=h.pipes),h.pipes=null,h.pipesCount=0,this.removeListener("readable",Y),h.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var w=h.pipes,I=h.pipesCount;h.pipes=null,h.pipesCount=0,this.removeListener("readable",Y),h.flowing=!1;for(var R=0;R"u"&&(this[R]=function(H){return function(){return o[H].apply(o,arguments)}}(R));return Z(["error","close","destroy","pause","resume"],function(H){o.on(H,I.emit.bind(I,H))}),I._read=function(H){w&&(w=!1,o.resume())},I},f._fromList=F},50596:(q,n,u)=>{q.exports=s;var l=u(66958),v=u(26156);function E(y,f){this.afterTransform=function(d,p){return function M(y,f,d){var p=y._transformState;p.transforming=!1;var m=p.writecb;if(!m)return y.emit("error",new Error("no writecb in Transform class"));p.writechunk=null,p.writecb=null,null!=d&&y.push(d),m&&m(f);var S=y._readableState;S.reading=!1,(S.needReadable||S.length{q.exports=g;var l=u(93172).Buffer;g.WritableState=s;var v=u(26156);v.inherits=u(83894);var E=u(295);function M(z,Y,G){this.chunk=z,this.encoding=Y,this.callback=G}function s(z,Y){var G=(z=z||{}).highWaterMark;this.highWaterMark=G||0===G?G:16384,this.objectMode=!!z.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var F=!1===z.decodeStrings;this.decodeStrings=!F,this.defaultEncoding=z.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(j){!function D(z,Y){var G=z._writableState,F=G.sync,j=G.writecb;if(function _(z){z.writing=!1,z.writecb=null,z.length-=z.writelen,z.writelen=0}(G),Y)!function S(z,Y,G,F,j){G?process.nextTick(function(){j(F)}):j(F),z._writableState.errorEmitted=!0,z.emit("error",F)}(z,0,F,Y,j);else{var Z=N(z,G);!Z&&!G.bufferProcessing&&G.buffer.length&&function C(z,Y){Y.bufferProcessing=!0;for(var G=0;G{var l=u(295);(n=q.exports=u(94515)).Stream=l,n.Readable=n,n.Writable=u(23699),n.Duplex=u(66958),n.Transform=u(50596),n.PassThrough=u(44467),!process.browser&&"disable"===process.env.READABLE_STREAM&&(q.exports=u(295))},72860:q=>{q.exports=function n(){for(var u={},l=0;l{q=u.nmd(q);var l=200,v="__lodash_hash_undefined__",E=1,M=2,s=9007199254740991,g="[object Arguments]",y="[object Array]",f="[object AsyncFunction]",d="[object Boolean]",p="[object Date]",m="[object Error]",S="[object Function]",_="[object GeneratorFunction]",D="[object Map]",P="[object Number]",x="[object Null]",C="[object Object]",N="[object Promise]",k="[object Proxy]",U="[object RegExp]",z="[object Set]",Y="[object String]",G="[object Symbol]",F="[object Undefined]",j="[object WeakMap]",Z="[object ArrayBuffer]",T="[object DataView]",re=/^\[object .+?Constructor\]$/,ne=/^(?:0|[1-9]\d*)$/,te={};te["[object Float32Array]"]=te["[object Float64Array]"]=te["[object Int8Array]"]=te["[object Int16Array]"]=te["[object Int32Array]"]=te["[object Uint8Array]"]=te["[object Uint8ClampedArray]"]=te["[object Uint16Array]"]=te["[object Uint32Array]"]=!0,te[g]=te[y]=te[Z]=te[d]=te[T]=te[p]=te[m]=te[S]=te[D]=te[P]=te[C]=te[U]=te[z]=te[Y]=te[j]=!1;var ae="object"==typeof global&&global&&global.Object===Object&&global,ge="object"==typeof self&&self&&self.Object===Object&&self,pe=ae||ge||Function("return this")(),we=n&&!n.nodeType&&n,ce=we&&q&&!q.nodeType&&q,le=ce&&ce.exports===we,ue=le&&ae.process,fe=function(){try{return ue&&ue.binding&&ue.binding("util")}catch{}}(),he=fe&&fe.isTypedArray;function Re(mt,Lt){for(var pn=-1,Wn=null==mt?0:mt.length;++pnPi))return!1;var wi=jr.get(mt);if(wi&&jr.get(Lt))return wi==Lt;var Ir=-1,ns=!0,xo=pn&M?new en:void 0;for(jr.set(mt,Lt),jr.set(Lt,mt);++Ir-1},gt.prototype.set=function gn(mt,Lt){var pn=this.__data__,Wn=qt(pn,mt);return Wn<0?(++this.size,pn.push([mt,Lt])):pn[Wn][1]=Lt,this},on.prototype.clear=function An(){this.size=0,this.__data__={hash:new Oe,map:new(Ot||gt),string:new Oe}},on.prototype.delete=function mn(mt){var Lt=Jr(this,mt).delete(mt);return this.size-=Lt?1:0,Lt},on.prototype.get=function On(mt){return Jr(this,mt).get(mt)},on.prototype.has=function Cn(mt){return Jr(this,mt).has(mt)},on.prototype.set=function yn(mt,Lt){var pn=Jr(this,mt),Wn=pn.size;return pn.set(mt,Lt),this.size+=pn.size==Wn?0:1,this},en.prototype.add=en.prototype.push=function wn(mt){return this.__data__.set(mt,v),this},en.prototype.has=function ln(mt){return this.__data__.has(mt)},cn.prototype.clear=function Sn(){this.__data__=new gt,this.size=0},cn.prototype.delete=function fn(mt){var Lt=this.__data__,pn=Lt.delete(mt);return this.size=Lt.size,pn},cn.prototype.get=function Ft(mt){return this.__data__.get(mt)},cn.prototype.has=function jt(mt){return this.__data__.has(mt)},cn.prototype.set=function dn(mt,Lt){var pn=this.__data__;if(pn instanceof gt){var Wn=pn.__data__;if(!Ot||Wn.length-1&&mt%1==0&&mt-1&&mt%1==0&&mt<=s}function Yc(mt){var Lt=typeof mt;return null!=mt&&("object"==Lt||"function"==Lt)}function $c(mt){return null!=mt&&"object"==typeof mt}var Af=he?function nt(mt){return function(Lt){return mt(Lt)}}(he):function _r(mt){return $c(mt)&&Ef(mt.length)&&!!te[$n(mt)]};function _f(mt){return function Tu(mt){return null!=mt&&Ef(mt.length)&&!Fd(mt)}(mt)?$t(mt):Br(mt)}q.exports=function ea(mt,Lt){return ur(mt,Lt)}},54689:function(q,n){!function(u){const l=Symbol("newer"),v=Symbol("older");class E{constructor(d,p){"number"!=typeof d&&(p=d,d=0),this.size=0,this.limit=d,this.oldest=this.newest=void 0,this._keymap=new Map,p&&(this.assign(p),d<1&&(this.limit=this.size))}_markEntryAsUsed(d){d!==this.newest&&(d[l]&&(d===this.oldest&&(this.oldest=d[l]),d[l][v]=d[v]),d[v]&&(d[v][l]=d[l]),d[l]=void 0,d[v]=this.newest,this.newest&&(this.newest[l]=d),this.newest=d)}assign(d){let p,m=this.limit||Number.MAX_VALUE;this._keymap.clear();let S=d[Symbol.iterator]();for(let _=S.next();!_.done;_=S.next()){let D=new M(_.value[0],_.value[1]);if(this._keymap.set(D.key,D),p?(p[l]=D,D[v]=p):this.oldest=D,p=D,0==m--)throw new Error("overflow")}this.newest=p,this.size=this._keymap.size}get(d){var p=this._keymap.get(d);return p?(this._markEntryAsUsed(p),p.value):void 0}set(d,p){var m=this._keymap.get(d);return m?(m.value=p,this._markEntryAsUsed(m),this):(this._keymap.set(d,m=new M(d,p)),this.newest?(this.newest[l]=m,m[v]=this.newest):this.oldest=m,this.newest=m,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var d=this.oldest;if(d)return this.oldest[l]?(this.oldest=this.oldest[l],this.oldest[v]=void 0):(this.oldest=void 0,this.newest=void 0),d[l]=d[v]=void 0,this._keymap.delete(d.key),--this.size,[d.key,d.value]}find(d){let p=this._keymap.get(d);return p?p.value:void 0}has(d){return this._keymap.has(d)}delete(d){var p=this._keymap.get(d);return p?(this._keymap.delete(p.key),p[l]&&p[v]?(p[v][l]=p[l],p[l][v]=p[v]):p[l]?(p[l][v]=void 0,this.oldest=p[l]):p[v]?(p[v][l]=void 0,this.newest=p[v]):this.oldest=this.newest=void 0,this.size--,p.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new g(this.oldest)}values(){return new y(this.oldest)}entries(){return this}[Symbol.iterator](){return new s(this.oldest)}forEach(d,p){"object"!=typeof p&&(p=this);let m=this.oldest;for(;m;)d.call(p,m.value,m.key,this),m=m[l]}toJSON(){for(var d=new Array(this.size),p=0,m=this.oldest;m;)d[p++]={key:m.key,value:m.value},m=m[l];return d}toString(){for(var d="",p=this.oldest;p;)d+=String(p.key)+":"+p.value,(p=p[l])&&(d+=" < ");return d}}function M(f,d){this.key=f,this.value=d,this[l]=void 0,this[v]=void 0}function s(f){this.entry=f}function g(f){this.entry=f}function y(f){this.entry=f}u.LRUMap=E,s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let f=this.entry;return f?(this.entry=f[l],{done:!1,value:[f.key,f.value]}):{done:!0,value:void 0}},g.prototype[Symbol.iterator]=function(){return this},g.prototype.next=function(){let f=this.entry;return f?(this.entry=f[l],{done:!1,value:f.key}):{done:!0,value:void 0}},y.prototype[Symbol.iterator]=function(){return this},y.prototype.next=function(){let f=this.entry;return f?(this.entry=f[l],{done:!1,value:f.value}):{done:!0,value:void 0}}}(n)},52820:(q,n)=>{function u(S){return void 0!==S&&""!==S}function l(S,_){return Object.hasOwnProperty.call(S,_)}function v(S,_){return Object.hasOwnProperty.call(S,_)&&_}n.compare=function(S,_){if(Buffer.isBuffer(S)){for(var D=Math.min(S.length,_.length),P=0;P_?1:0};var E=n.lowerBoundKey=function(S){return v(S,"gt")||v(S,"gte")||v(S,"min")||(S.reverse?v(S,"end"):v(S,"start"))||void 0},M=n.lowerBound=function(S,_){var D=E(S);return D?S[D]:_},s=n.lowerBoundInclusive=function(S){return!l(S,"gt")},g=n.upperBoundInclusive=function(S){return!l(S,"lt")},y=n.lowerBoundExclusive=function(S){return!s(S)},f=n.upperBoundExclusive=function(S){return!g(S)},d=n.upperBoundKey=function(S){return v(S,"lt")||v(S,"lte")||v(S,"max")||(S.reverse?v(S,"start"):v(S,"end"))||void 0},p=n.upperBound=function(S,_){var D=d(S);return D?S[D]:_};function m(S){return S}n.start=function(S,_){return S.reverse?p(S,_):M(S,_)},n.end=function(S,_){return S.reverse?M(S,_):p(S,_)},n.startInclusive=function(S){return S.reverse?g(S):s(S)},n.endInclusive=function(S){return S.reverse?s(S):g(S)},n.toLtgt=function(S,_,D,P,x){_=_||{},D=D||m;var C=arguments.length>3,N=n.lowerBoundKey(S),k=n.upperBoundKey(S);return N?"gt"===N?_.gt=D(S.gt,!1):_.gte=D(S[N],!1):C&&(_.gte=D(P,!1)),k?"lt"===k?_.lt=D(S.lt,!0):_.lte=D(S[k],!0):C&&(_.lte=D(x,!0)),null!=S.reverse&&(_.reverse=!!S.reverse),l(_,"max")&&delete _.max,l(_,"min")&&delete _.min,l(_,"start")&&delete _.start,l(_,"end")&&delete _.end,_},n.contains=function(S,_,D){D=D||n.compare;var P=M(S);if(u(P)&&((x=D(_,P))<0||0===x&&y(S)))return!1;var x,C=p(S);if(u(C)&&((x=D(_,C))>0||0===x&&f(S)))return!1;return!0},n.filter=function(S,_){return function(D){return n.contains(S,D,_)}}},8095:(q,n,u)=>{"use strict";var l=u(83894),v=u(86540),E=u(73502).Buffer,M=new Array(16);function s(){v.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function g(m,S){return m<>>32-S}function y(m,S,_,D,P,x,C){return g(m+(S&_|~S&D)+P+x|0,C)+S|0}function f(m,S,_,D,P,x,C){return g(m+(S&D|_&~D)+P+x|0,C)+S|0}function d(m,S,_,D,P,x,C){return g(m+(S^_^D)+P+x|0,C)+S|0}function p(m,S,_,D,P,x,C){return g(m+(_^(S|~D))+P+x|0,C)+S|0}l(s,v),s.prototype._update=function(){for(var m=M,S=0;S<16;++S)m[S]=this._block.readInt32LE(4*S);var _=this._a,D=this._b,P=this._c,x=this._d;_=y(_,D,P,x,m[0],3614090360,7),x=y(x,_,D,P,m[1],3905402710,12),P=y(P,x,_,D,m[2],606105819,17),D=y(D,P,x,_,m[3],3250441966,22),_=y(_,D,P,x,m[4],4118548399,7),x=y(x,_,D,P,m[5],1200080426,12),P=y(P,x,_,D,m[6],2821735955,17),D=y(D,P,x,_,m[7],4249261313,22),_=y(_,D,P,x,m[8],1770035416,7),x=y(x,_,D,P,m[9],2336552879,12),P=y(P,x,_,D,m[10],4294925233,17),D=y(D,P,x,_,m[11],2304563134,22),_=y(_,D,P,x,m[12],1804603682,7),x=y(x,_,D,P,m[13],4254626195,12),P=y(P,x,_,D,m[14],2792965006,17),_=f(_,D=y(D,P,x,_,m[15],1236535329,22),P,x,m[1],4129170786,5),x=f(x,_,D,P,m[6],3225465664,9),P=f(P,x,_,D,m[11],643717713,14),D=f(D,P,x,_,m[0],3921069994,20),_=f(_,D,P,x,m[5],3593408605,5),x=f(x,_,D,P,m[10],38016083,9),P=f(P,x,_,D,m[15],3634488961,14),D=f(D,P,x,_,m[4],3889429448,20),_=f(_,D,P,x,m[9],568446438,5),x=f(x,_,D,P,m[14],3275163606,9),P=f(P,x,_,D,m[3],4107603335,14),D=f(D,P,x,_,m[8],1163531501,20),_=f(_,D,P,x,m[13],2850285829,5),x=f(x,_,D,P,m[2],4243563512,9),P=f(P,x,_,D,m[7],1735328473,14),_=d(_,D=f(D,P,x,_,m[12],2368359562,20),P,x,m[5],4294588738,4),x=d(x,_,D,P,m[8],2272392833,11),P=d(P,x,_,D,m[11],1839030562,16),D=d(D,P,x,_,m[14],4259657740,23),_=d(_,D,P,x,m[1],2763975236,4),x=d(x,_,D,P,m[4],1272893353,11),P=d(P,x,_,D,m[7],4139469664,16),D=d(D,P,x,_,m[10],3200236656,23),_=d(_,D,P,x,m[13],681279174,4),x=d(x,_,D,P,m[0],3936430074,11),P=d(P,x,_,D,m[3],3572445317,16),D=d(D,P,x,_,m[6],76029189,23),_=d(_,D,P,x,m[9],3654602809,4),x=d(x,_,D,P,m[12],3873151461,11),P=d(P,x,_,D,m[15],530742520,16),_=p(_,D=d(D,P,x,_,m[2],3299628645,23),P,x,m[0],4096336452,6),x=p(x,_,D,P,m[7],1126891415,10),P=p(P,x,_,D,m[14],2878612391,15),D=p(D,P,x,_,m[5],4237533241,21),_=p(_,D,P,x,m[12],1700485571,6),x=p(x,_,D,P,m[3],2399980690,10),P=p(P,x,_,D,m[10],4293915773,15),D=p(D,P,x,_,m[1],2240044497,21),_=p(_,D,P,x,m[8],1873313359,6),x=p(x,_,D,P,m[15],4264355552,10),P=p(P,x,_,D,m[6],2734768916,15),D=p(D,P,x,_,m[13],1309151649,21),_=p(_,D,P,x,m[4],4149444226,6),x=p(x,_,D,P,m[11],3174756917,10),P=p(P,x,_,D,m[2],718787259,15),D=p(D,P,x,_,m[9],3951481745,21),this._a=this._a+_|0,this._b=this._b+D|0,this._c=this._c+P|0,this._d=this._d+x|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var m=E.allocUnsafe(16);return m.writeInt32LE(this._a,0),m.writeInt32LE(this._b,4),m.writeInt32LE(this._c,8),m.writeInt32LE(this._d,12),m},q.exports=s},86540:(q,n,u)=>{"use strict";var l=u(73502).Buffer,v=u(65685).Transform;function s(g){v.call(this),this._block=l.allocUnsafe(g),this._blockSize=g,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}u(83894)(s,v),s.prototype._transform=function(g,y,f){var d=null;try{this.update(g,y)}catch(p){d=p}f(d)},s.prototype._flush=function(g){var y=null;try{this.push(this.digest())}catch(f){y=f}g(y)},s.prototype.update=function(g,y){if(function M(g,y){if(!l.isBuffer(g)&&"string"!=typeof g)throw new TypeError(y+" must be a string or a buffer")}(g,"Data"),this._finalized)throw new Error("Digest already called");l.isBuffer(g)||(g=l.from(g,y));for(var f=this._block,d=0;this._blockOffset+g.length-d>=this._blockSize;){for(var p=this._blockOffset;p0;++m)this._length[m]+=S,(S=this._length[m]/4294967296|0)>0&&(this._length[m]-=4294967296*S);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(g){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var y=this._digest();void 0!==g&&(y=y.toString(g)),this._block.fill(0),this._blockOffset=0;for(var f=0;f<4;++f)this._length[f]=0;return y},s.prototype._digest=function(){throw new Error("_digest is not implemented")},q.exports=s},17079:(q,n,u)=>{var l=u(1378),v=u(37950);function E(M){this.rand=M||new v.Rand}q.exports=E,E.create=function(s){return new E(s)},E.prototype._randbelow=function(s){var g=s.bitLength(),y=Math.ceil(g/8);do{var f=new l(this.rand.generate(y))}while(f.cmp(s)>=0);return f},E.prototype._randrange=function(s,g){var y=g.sub(s);return s.add(this._randbelow(y))},E.prototype.test=function(s,g,y){var f=s.bitLength(),d=l.mont(s),p=new l(1).toRed(d);g||(g=Math.max(1,f/48|0));for(var m=s.subn(1),S=0;!m.testn(S);S++);for(var _=s.shrn(S),D=m.toRed(d);g>0;g--){var x=this._randrange(new l(2),m);y&&y(x);var C=x.toRed(d).redPow(_);if(0!==C.cmp(p)&&0!==C.cmp(D)){for(var N=1;N0;g--){var D=this._randrange(new l(2),p),P=s.gcd(D);if(0!==P.cmpn(1))return P;var x=D.toRed(f).redPow(S);if(0!==x.cmp(d)&&0!==x.cmp(_)){for(var C=1;C=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},32391:q=>{function n(u,l){if(!u)throw new Error(l||"Assertion failed")}q.exports=n,n.equal=function(l,v,E){if(l!=v)throw new Error(E||"Assertion failed: "+l+" != "+v)}},58195:(q,n)=>{"use strict";var u=n;function v(M){return 1===M.length?"0"+M:M}function E(M){for(var s="",g=0;g>8,p=255&f;d?g.push(d,p):g.push(p)}return g},u.zero2=v,u.toHex=E,u.encode=function(s,g){return"hex"===g?E(s):s}},11346:function(q){q.exports=function(){"use strict";var n=Object.prototype.toString,u=Array.isArray||function(Z){return"[object Array]"===n.call(Z)};function l(j){return"function"==typeof j}function v(j){return u(j)?"array":typeof j}function E(j){return j.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function M(j,Z){return null!=j&&"object"==typeof j&&Z in j}function s(j,Z){return null!=j&&"object"!=typeof j&&j.hasOwnProperty&&j.hasOwnProperty(Z)}var g=RegExp.prototype.test;function y(j,Z){return g.call(j,Z)}var f=/\S/;function d(j){return!y(f,j)}var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function m(j){return String(j).replace(/[&<>"'`=\/]/g,function(T){return p[T]})}var S=/\s*/,_=/\s+/,D=/\s*=/,P=/\s*\}/,x=/#|\^|\/|>|\{|&|=|!/;function C(j,Z){if(!j)return[];var b,B,re,T=!1,o=[],h=[],w=[],I=!1,R=!1,V="",H=0;function L(){if(I&&!R)for(;w.length;)delete h[w.pop()];else w=[];I=!1,R=!1}function ne(he){if("string"==typeof he&&(he=he.split(_,2)),!u(he)||2!==he.length)throw new Error("Invalid tags: "+he);b=new RegExp(E(he[0])+"\\s*"),B=new RegExp("\\s*"+E(he[1])),re=new RegExp("\\s*"+E("}"+he[1]))}ne(Z||G.tags);for(var ae,ge,pe,we,ce,le,te=new U(j);!te.eos();){if(ae=te.pos,pe=te.scanUntil(b))for(var ue=0,fe=pe.length;ue0?o[o.length-1][4]:Z;break;default:T.push(h)}return Z}function U(j){this.string=j,this.tail=j,this.pos=0}function z(j,Z){this.view=j,this.cache={".":this.view},this.parent=Z}function Y(){this.templateCache={_cache:{},set:function(Z,T){this._cache[Z]=T},get:function(Z){return this._cache[Z]},clear:function(){this._cache={}}}}U.prototype.eos=function(){return""===this.tail},U.prototype.scan=function(Z){var T=this.tail.match(Z);if(!T||0!==T.index)return"";var o=T[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},U.prototype.scanUntil=function(Z){var o,T=this.tail.search(Z);switch(T){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,T),this.tail=this.tail.substring(T)}return this.pos+=o.length,o},z.prototype.push=function(Z){return new z(Z,this)},z.prototype.lookup=function(Z){var o,T=this.cache;if(T.hasOwnProperty(Z))o=T[Z];else{for(var w,I,R,h=this,V=!1;h;){if(Z.indexOf(".")>0)for(w=h.view,I=Z.split("."),R=0;null!=w&&R"===V?H=this.renderPartial(R,T,o,w):"&"===V?H=this.unescapedValue(R,T):"name"===V?H=this.escapedValue(R,T):"text"===V&&(H=this.rawValue(R)),void 0!==H&&(I+=H);return I},Y.prototype.renderSection=function(Z,T,o,h){var w=this,I="",R=T.lookup(Z[1]);function V(b){return w.render(b,T,o)}if(R){if(u(R))for(var H=0,L=R.length;H0||!o)&&(w[I]=h+w[I]);return w.join("\n")},Y.prototype.renderPartial=function(Z,T,o,h){if(o){var w=l(o)?o(Z[1]):o[Z[1]];if(null!=w){var I=Z[6],R=Z[5],V=Z[4],H=w;return 0==R&&V&&(H=this.indentPartial(w,V,I)),this.renderTokens(this.parse(H,h),T,o,H)}}},Y.prototype.unescapedValue=function(Z,T){var o=T.lookup(Z[1]);if(null!=o)return o},Y.prototype.escapedValue=function(Z,T){var o=T.lookup(Z[1]);if(null!=o)return G.escape(o)},Y.prototype.rawValue=function(Z){return Z[1]};var G={name:"mustache.js",version:"4.0.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(j){F.templateCache=j},get templateCache(){return F.templateCache}},F=new Y;return G.clearCache=function(){return F.clearCache()},G.parse=function(Z,T){return F.parse(Z,T)},G.render=function(Z,T,o,h){if("string"!=typeof Z)throw new TypeError('Invalid template! Template should be a "string" but "'+v(Z)+'" was given as the first argument for mustache#render(template, view, partials)');return F.render(Z,T,o,h)},G.escape=m,G.Scanner=U,G.Context=z,G.Writer=Y,G}()},84778:(q,n)=>{"use strict";var E;Object.defineProperty(n,"__esModule",{value:!0}),n.AbiSerializationType=n.AbiFunctionModifier=n.AbiFunctionKind=n.SCHEMA_VERSION=void 0,n.SCHEMA_VERSION="0.3.0",(E=n.AbiFunctionKind||(n.AbiFunctionKind={})).View="view",E.Call="call",function(E){E.Init="init",E.Private="private",E.Payable="payable"}(n.AbiFunctionModifier||(n.AbiFunctionModifier={})),function(E){E.Json="json",E.Borsh="borsh"}(n.AbiSerializationType||(n.AbiSerializationType={}))},81818:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;var l=u(26900);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}})},73648:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;var l=u(26900);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},73369:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.AccountMultisig=n.Account2FA=void 0;var l=u(26900);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},33759:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.connect=void 0;const v=u(58010);n.connect=function E(M){return l(this,void 0,void 0,function*(){return new v.Near(M)})}},71836:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(s,g,y,f){void 0===f&&(f=y);var d=Object.getOwnPropertyDescriptor(g,y);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(s,f,d)}:function(s,g,y,f){void 0===f&&(f=y),s[f]=g[y]}),v=this&&this.__setModuleDefault||(Object.create?function(s,g){Object.defineProperty(s,"default",{enumerable:!0,value:g})}:function(s,g){s.default=g}),E=this&&this.__importStar||function(s){if(s&&s.__esModule)return s;var g={};if(null!=s)for(var y in s)"default"!==y&&Object.prototype.hasOwnProperty.call(s,y)&&l(g,s,y);return v(g,s),g},M=this&&this.__exportStar||function(s,g){for(var y in s)"default"!==y&&!Object.prototype.hasOwnProperty.call(g,y)&&l(g,s,y)};Object.defineProperty(n,"__esModule",{value:!0}),n.keyStores=void 0,n.keyStores=E(u(57372)),M(u(45957),n),M(u(33759),n)},45957:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(C,N,k,U){void 0===U&&(U=k);var z=Object.getOwnPropertyDescriptor(N,k);(!z||("get"in z?!N.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:function(){return N[k]}}),Object.defineProperty(C,U,z)}:function(C,N,k,U){void 0===U&&(U=k),C[U]=N[k]}),v=this&&this.__setModuleDefault||(Object.create?function(C,N){Object.defineProperty(C,"default",{enumerable:!0,value:N})}:function(C,N){C.default=N}),E=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var N={};if(null!=C)for(var k in C)"default"!==k&&Object.prototype.hasOwnProperty.call(C,k)&&l(N,C,k);return v(N,C),N};Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=n.Near=n.KeyPair=n.Signer=n.InMemorySigner=n.Contract=n.Connection=n.Account=n.multisig=n.validators=n.transactions=n.utils=n.providers=n.accountCreator=void 0;const M=E(u(91311));n.providers=M;const s=E(u(8127));n.utils=s;const g=E(u(45733));n.transactions=g;const y=E(u(51631));n.validators=y;const f=u(81818);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return f.Account}});const d=E(u(73369));n.multisig=d;const p=E(u(73648));n.accountCreator=p;const m=u(12592);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return m.Connection}});const S=u(60351);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return S.Signer}}),Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return S.InMemorySigner}});const _=u(99676);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return _.Contract}});const D=u(46358);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return D.KeyPair}});const P=u(58010);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return P.Near}});const x=u(47601);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return x.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return x.WalletConnection}})},12592:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;var l=u(26900);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return l.Connection}})},99676:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;var l=u(26900);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return l.Contract}})},57372:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.BrowserLocalStorageKeyStore=n.InMemoryKeyStore=n.KeyStore=void 0;const l=u(35598);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const v=u(56724);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return v.InMemoryKeyStore}});const E=u(82869);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const M=u(7221);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return M.MergeKeyStore}})},82869:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserLocalStorageKeyStore=void 0;var l=u(93271);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},56724:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.InMemoryKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},91001:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=n.UnencryptedFileSystemKeyStore=n.BrowserLocalStorageKeyStore=n.InMemoryKeyStore=n.KeyStore=void 0;const l=u(35598);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const v=u(56724);Object.defineProperty(n,"InMemoryKeyStore",{enumerable:!0,get:function(){return v.InMemoryKeyStore}});const E=u(82869);Object.defineProperty(n,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const M=u(57324);Object.defineProperty(n,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return M.UnencryptedFileSystemKeyStore}});const s=u(7221);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return s.MergeKeyStore}})},35598:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyStore=void 0;var l=u(69170);Object.defineProperty(n,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},7221:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MergeKeyStore=void 0;var l=u(69170);Object.defineProperty(n,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},57324:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnencryptedFileSystemKeyStore=n.readKeyFile=void 0;var l=u(55738);Object.defineProperty(n,"readKeyFile",{enumerable:!0,get:function(){return l.readKeyFile}}),Object.defineProperty(n,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return l.UnencryptedFileSystemKeyStore}})},58010:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Near=void 0;var l=u(9855);Object.defineProperty(n,"Near",{enumerable:!0,get:function(){return l.Near}})},15049:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FailoverRpcProvider=void 0;var l=u(1656);Object.defineProperty(n,"FailoverRpcProvider",{enumerable:!0,get:function(){return l.FailoverRpcProvider}})},91311:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ErrorContext=n.TypedError=n.getTransactionLastResult=n.FinalExecutionStatusBasic=n.FailoverRpcProvider=n.JsonRpcProvider=n.Provider=void 0;const l=u(5754);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const v=u(72952);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}});const E=u(15049);Object.defineProperty(n,"FailoverRpcProvider",{enumerable:!0,get:function(){return E.FailoverRpcProvider}})},72952:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcProvider=n.TypedError=n.ErrorContext=void 0;var l=u(17527);Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var v=u(1656);Object.defineProperty(n,"JsonRpcProvider",{enumerable:!0,get:function(){return v.JsonRpcProvider}})},5754:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FinalExecutionStatusBasic=n.ExecutionStatusBasic=n.IdType=n.Provider=n.getTransactionLastResult=void 0;var l=u(53971);Object.defineProperty(n,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var v=u(1656);Object.defineProperty(n,"Provider",{enumerable:!0,get:function(){return v.Provider}});var E=u(17527);Object.defineProperty(n,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(n,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(n,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},60351:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(55134);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return l.Signer}})},45733:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transfer=n.stake=n.functionCallAccessKey=n.functionCall=n.fullAccessKey=n.deployContract=n.deleteKey=n.deleteAccount=n.createAccount=n.addKey=n.encodeTransaction=n.encodeDelegateAction=n.encodeSignedDelegate=n.Transaction=n.SignedTransaction=n.Signature=n.signTransaction=n.createTransaction=n.SCHEMA=n.Transfer=n.Stake=n.FunctionCallPermission=n.FunctionCall=n.FullAccessPermission=n.DeployContract=n.DeleteKey=n.DeleteAccount=n.CreateAccount=n.AddKey=n.AccessKeyPermission=n.AccessKey=n.Action=n.stringifyJsonOrBytes=void 0;var l=u(16260);Object.defineProperty(n,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(n,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(n,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(n,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(n,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(n,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(n,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(n,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(n,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(n,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(n,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(n,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(n,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(n,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(n,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(n,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(n,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(n,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(n,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(n,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(n,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(n,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}}),Object.defineProperty(n,"encodeTransaction",{enumerable:!0,get:function(){return l.encodeTransaction}});const v=u(16260);n.addKey=(_,D)=>v.actionCreators.addKey(_,D);n.createAccount=()=>v.actionCreators.createAccount();n.deleteAccount=_=>v.actionCreators.deleteAccount(_);n.deleteKey=_=>v.actionCreators.deleteKey(_);n.deployContract=_=>v.actionCreators.deployContract(_);n.fullAccessKey=()=>v.actionCreators.fullAccessKey();n.functionCall=(_,D,P,x,C,N)=>v.actionCreators.functionCall(_,D,P,x,C,N);n.functionCallAccessKey=(_,D,P)=>v.actionCreators.functionCallAccessKey(_,D,P);n.stake=(_,D)=>v.actionCreators.stake(_,D);n.transfer=_=>v.actionCreators.transfer(_)},89867:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Enum=n.Assignable=void 0;var l=u(17527);Object.defineProperty(n,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});n.Enum=class v{constructor(M){if(1!==Object.keys(M).length)throw new Error("Enum can only take single value");Object.keys(M).map(s=>{this[s]=M[s],this.enum=s})}}},84528:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.TypedError=n.PositionalArgsError=n.ErrorContext=n.ArgumentTypeError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=void 0;var l=u(26900);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var v=u(17527);Object.defineProperty(n,"ArgumentTypeError",{enumerable:!0,get:function(){return v.ArgumentTypeError}}),Object.defineProperty(n,"ErrorContext",{enumerable:!0,get:function(){return v.ErrorContext}}),Object.defineProperty(n,"PositionalArgsError",{enumerable:!0,get:function(){return v.PositionalArgsError}}),Object.defineProperty(n,"TypedError",{enumerable:!0,get:function(){return v.TypedError}});var E=u(53971);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},29110:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION_EXP=n.NEAR_NOMINATION=void 0;var l=u(53971);Object.defineProperty(n,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(n,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(n,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(n,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},8127:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(_,D,P,x){void 0===x&&(x=P);var C=Object.getOwnPropertyDescriptor(D,P);(!C||("get"in C?!D.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return D[P]}}),Object.defineProperty(_,x,C)}:function(_,D,P,x){void 0===x&&(x=P),_[x]=D[P]}),v=this&&this.__setModuleDefault||(Object.create?function(_,D){Object.defineProperty(_,"default",{enumerable:!0,value:D})}:function(_,D){_.default=D}),E=this&&this.__importStar||function(_){if(_&&_.__esModule)return _;var D={};if(null!=_)for(var P in _)"default"!==P&&Object.prototype.hasOwnProperty.call(_,P)&&l(D,_,P);return v(D,_),D};Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=n.logWarning=n.rpc_errors=n.KeyPairEd25519=n.KeyPair=n.PublicKey=n.format=n.enums=n.web=n.serialize=n.key_pair=void 0;const M=E(u(46358));n.key_pair=M;const s=E(u(7123));n.serialize=s;const g=E(u(36360));n.web=g;const y=E(u(89867));n.enums=y;const f=E(u(29110));n.format=f;const d=E(u(88414));n.rpc_errors=d;const p=u(46358);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return p.PublicKey}}),Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return p.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return p.KeyPairEd25519}});const m=u(84528);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return m.logWarning}});const S=u(54326);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return S.Logger}})},46358:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyType=n.KeyPairEd25519=n.KeyPair=void 0;var l=u(27395);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},54326:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(53971);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},88414:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ServerError=n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=void 0;var l=u(53971);Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},7123:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base_decode=n.base_encode=n.deserialize=n.serialize=void 0;var l=u(76287);Object.defineProperty(n,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(n,"deserialize",{enumerable:!0,get:function(){return l.deserialize}});var v=u(53971);Object.defineProperty(n,"base_encode",{enumerable:!0,get:function(){return v.baseEncode}}),Object.defineProperty(n,"base_decode",{enumerable:!0,get:function(){return v.baseDecode}})},36360:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.fetchJson=void 0;var l=u(1656);Object.defineProperty(n,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},51631:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findSeatPrice=n.diffEpochValidators=void 0;var l=u(53971);Object.defineProperty(n,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(n,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},47601:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WalletConnection=n.ConnectedWalletAccount=void 0;var l=u(9855);Object.defineProperty(n,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(n,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},99591:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(Y,G,F,j){return new(F||(F=Promise))(function(T,o){function h(R){try{I(j.next(R))}catch(V){o(V)}}function w(R){try{I(j.throw(R))}catch(V){o(V)}}function I(R){R.done?T(R.value):function Z(T){return T instanceof F?T:new F(function(o){o(T)})}(R.value).then(h,w)}I((j=j.apply(Y,G||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Account=void 0;const v=u(27395),E=u(1656),M=u(16260),s=u(17527),g=u(53971),y=u(23138),{addKey:f,createAccount:d,deleteAccount:p,deleteKey:m,deployContract:S,fullAccessKey:_,functionCall:D,functionCallAccessKey:P,stake:x,transfer:C}=M.actionCreators;class z{constructor(G,F){this.accessKeyByPublicKeyCache={},this.connection=G,this.accountId=F}getConnection(){return this.connection}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(G,F){return l(this,void 0,void 0,function*(){const j=yield this.findAccessKey(G,F);if(!j)throw new s.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:Z}=j,o=(yield this.connection.provider.block({finality:"final"})).header.hash,h=Z.nonce+BigInt(1);return yield(0,M.signTransaction)(G,h,F,(0,g.baseDecode)(o),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:G,actions:F,returnError:j}){return l(this,void 0,void 0,function*(){let Z,T;const o=yield(0,E.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[Z,T]=yield this.signTransaction(G,F);const h=T.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(T)}catch(w){if("InvalidNonce"===w.type)return g.Logger.warn(`Retrying transaction ${G}:${(0,g.baseEncode)(Z)} with new nonce.`),delete this.accessKeyByPublicKeyCache[h.toString()],null;if("Expired"===w.type)return g.Logger.warn(`Retrying transaction ${G}:${(0,g.baseEncode)(Z)} due to expired block hash`),null;throw w.context=new s.ErrorContext((0,g.baseEncode)(Z)),w}}));if(!o)throw new s.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:T.transaction.receiverId,outcome:o}),!j&&"object"==typeof o.status&&"object"==typeof o.status.Failure&&null!==o.status.Failure)throw o.status.Failure.error_message&&o.status.Failure.error_type?new s.TypedError(`Transaction ${o.transaction_outcome.id} failed. ${o.status.Failure.error_message}`,o.status.Failure.error_type):(0,g.parseResultError)(o);return o})}findAccessKey(G,F){return l(this,void 0,void 0,function*(){const j=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!j)throw new s.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const Z=this.accessKeyByPublicKeyCache[j.toString()];if(void 0!==Z)return{publicKey:j,accessKey:Z};try{const T=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:j.toString(),finality:"optimistic"}),o=Object.assign(Object.assign({},T),{nonce:BigInt(T.nonce||0)});return this.accessKeyByPublicKeyCache[j.toString()]?{publicKey:j,accessKey:this.accessKeyByPublicKeyCache[j.toString()]}:(this.accessKeyByPublicKeyCache[j.toString()]=o,{publicKey:j,accessKey:o})}catch(T){if("AccessKeyDoesNotExist"==T.type)return null;throw T}})}createAndDeployContract(G,F,j,Z){return l(this,void 0,void 0,function*(){const T=_();return yield this.signAndSendTransaction({receiverId:G,actions:[d(),C(Z),f(v.PublicKey.from(F),T),S(j)]}),new z(this.connection,G)})}sendMoney(G,F){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:G,actions:[C(F)]})})}createAccount(G,F,j){return l(this,void 0,void 0,function*(){const Z=_();return this.signAndSendTransaction({receiverId:G,actions:[d(),C(j),f(v.PublicKey.from(F),Z)]})})}deleteAccount(G){return l(this,void 0,void 0,function*(){return g.Logger.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[p(G)]})})}deployContract(G){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[S(G)]})})}encodeJSContractArgs(G,F,j){return Buffer.concat([Buffer.from(G),Buffer.from([0]),Buffer.from(F),Buffer.from([0]),Buffer.from(j)])}functionCall({contractId:G,methodName:F,args:j={},gas:Z=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:T,walletMeta:o,walletCallbackUrl:h,stringify:w,jsContract:I}){return l(this,void 0,void 0,function*(){let R;if(this.validateArgs(j),I)R=["call_js_contract",this.encodeJSContractArgs(G,F,JSON.stringify(j)),Z,T,null,!0];else{const V=void 0===w?M.stringifyJsonOrBytes:w;R=[F,j,Z,T,V,!1]}return this.signAndSendTransaction({receiverId:I?this.connection.jsvmAccountId:G,actions:[D.apply(void 0,R)],walletMeta:o,walletCallbackUrl:h})})}addKey(G,F,j,Z){return l(this,void 0,void 0,function*(){let T;return j||(j=[]),Array.isArray(j)||(j=[j]),T=F?P(F,j,Z):_(),this.signAndSendTransaction({receiverId:this.accountId,actions:[f(v.PublicKey.from(G),T)]})})}deleteKey(G){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[m(v.PublicKey.from(G))]})})}stake(G,F){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[x(F,v.PublicKey.from(G))]})})}signedDelegate({actions:G,blockHeightTtl:F,receiverId:j}){return l(this,void 0,void 0,function*(){const{provider:Z,signer:T}=this.connection,{header:o}=yield Z.block({finality:"final"}),{accessKey:h,publicKey:w}=yield this.findAccessKey(null,null),I=(0,M.buildDelegateAction)({actions:G,maxBlockHeight:BigInt(o.height)+BigInt(F),nonce:BigInt(h.nonce)+BigInt(1),publicKey:w,receiverId:j,senderId:this.accountId}),{signedDelegateAction:R}=yield(0,M.signDelegateAction)({delegateAction:I,signer:{sign:V=>l(this,void 0,void 0,function*(){const{signature:H}=yield T.signMessage(V,I.senderId,this.connection.networkId);return H})}});return R})}validateArgs(G){if((void 0===G.byteLength||G.byteLength!==G.length)&&(Array.isArray(G)||"object"!=typeof G))throw new s.PositionalArgsError}viewFunction(G){return l(this,void 0,void 0,function*(){return yield(0,y.viewFunction)(this.connection,G)})}viewState(G,F={finality:"optimistic"}){return l(this,void 0,void 0,function*(){return yield(0,y.viewState)(this.connection,this.accountId,G,F)})}getAccessKeys(){var G;return l(this,void 0,void 0,function*(){const F=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(G=F?.keys)||void 0===G?void 0:G.map(j=>Object.assign(Object.assign({},j),{access_key:Object.assign(Object.assign({},j.access_key),{nonce:BigInt(j.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(j=>"FullAccess"!==j.access_key.permission).map(j=>{const Z=j.access_key.permission;return{contractId:Z.FunctionCall.receiver_id,amount:Z.FunctionCall.allowance,publicKey:j.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const G=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),F=yield this.state(),j=BigInt(G.runtime_config.storage_amount_per_byte),Z=BigInt(F.storage_usage)*j,T=BigInt(F.locked),o=BigInt(F.amount)+T,h=o-(T>Z?T:Z);return{total:o.toString(),stateStaked:Z.toString(),staked:T.toString(),available:h.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const G=yield this.connection.provider.block({finality:"final"}),F=G.header.hash,j=G.header.epoch_id,{current_validators:Z,next_validators:T,current_proposals:o}=yield this.connection.provider.validators(j),h=new Set;[...Z,...T,...o].forEach(L=>h.add(L.account_id));const w=[...h],I=w.map(L=>this.viewFunction({contractId:L,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:F}})),R=yield Promise.allSettled(I);if(R.some(L=>"rejected"===L.status&&"TimeoutError"===L.reason.type))throw new Error("Failed to get delegated stake balance");const H=R.reduce((L,b,B)=>{const re=w[B];if("fulfilled"===b.status){const ne=BigInt(b.value);if(ne!==BigInt(0))return Object.assign(Object.assign({},L),{stakedValidators:[...L.stakedValidators,{validatorId:re,amount:ne.toString()}],total:L.total+ne})}return"rejected"===b.status?Object.assign(Object.assign({},L),{failedValidators:[...L.failedValidators,{validatorId:re,error:b.reason}]}):L},{stakedValidators:[],failedValidators:[],total:BigInt(0)});return Object.assign(Object.assign({},H),{total:H.total.toString()})})}}n.Account=z},92892:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(N,k,U,z){return new(U||(U=Promise))(function(G,F){function j(o){try{T(z.next(o))}catch(h){F(h)}}function Z(o){try{T(z.throw(o))}catch(h){F(h)}}function T(o){o.done?G(o.value):function Y(G){return G instanceof U?G:new U(function(F){F(G)})}(o.value).then(j,Z)}T((z=z.apply(N,k||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.Account2FA=void 0;const v=u(27395),E=u(17527),M=u(1656),s=u(16260),g=u(53971),y=u(88315),f=u(78361),d=u(66113),{addKey:p,deleteKey:m,deployContract:S,fullAccessKey:_,functionCall:D,functionCallAccessKey:P}=s.actionCreators;class x extends y.AccountMultisig{constructor(k,U,z){super(k,U,z),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=z.helperUrl||this.helperUrl,this.storage=z.storage,this.sendCode=z.sendCode||this.sendCodeDefault,this.getCode=z.getCode||this.getCodeDefault,this.verifyCode=z.verifyCode||this.verifyCodeDefault,this.onConfirmResult=z.onConfirmResult}signAndSendTransaction({receiverId:k,actions:U}){const z=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield z.signAndSendTransaction.call(this,{receiverId:k,actions:U}),yield this.sendCode();const Y=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(Y)),Y})}deployMultisig(k){const U=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:z}=this,Y=(yield this.getRecoveryMethods()).data.filter(({kind:h,publicKey:w})=>("phrase"===h||"ledger"===h)&&null!==w).map(h=>h.publicKey),G=(yield this.getAccessKeys()).filter(({public_key:h,access_key:{permission:w}})=>"FullAccess"===w&&!Y.includes(h)).map(h=>h.public_key).map(C),F=C((yield this.postSignedJson("/2fa/getAccessKey",{accountId:z})).publicKey),j=Buffer.from(JSON.stringify({num_confirmations:2})),Z=[...G.map(h=>m(h)),...G.map(h=>p(h,P(z,f.MULTISIG_CHANGE_METHODS,null))),p(F,P(z,f.MULTISIG_CONFIRM_METHODS,null)),S(k)],T=Z.concat(D("new",j,f.MULTISIG_GAS,f.MULTISIG_DEPOSIT));g.Logger.log("deploying multisig contract for",z);const{stateStatus:o}=yield this.checkMultisigCodeAndStateStatus(k);switch(o){case d.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield U.signAndSendTransactionWithAccount.call(this,z,T);case d.MultisigStateStatus.VALID_STATE:return yield U.signAndSendTransactionWithAccount.call(this,z,Z);case d.MultisigStateStatus.INVALID_STATE:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:k,cleanupContractBytes:U}){return l(this,void 0,void 0,function*(){let z=[];U&&(yield this.deleteAllRequests().catch(j=>j),z=yield this.get2faDisableCleanupActions(U));const Y=yield this.get2faDisableKeyConversionActions(),G=[...z,...Y,S(k)],F=yield this.findAccessKey(this.accountId,G);if(F&&F.accessKey&&"FullAccess"!==F.accessKey.permission)throw new E.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,G)})}get2faDisableCleanupActions(k){return l(this,void 0,void 0,function*(){const U=yield this.viewState("").catch(Y=>{const G=Y.cause&&Y.cause.name;if("NO_CONTRACT_CODE"==G)return[];throw"TOO_LARGE_CONTRACT_STATE"==G?new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):Y}),z=U.map(({key:Y})=>Y.toString("base64"));return U.length?[S(k),D("clean",{keys:z},f.MULTISIG_GAS,BigInt("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,z=(yield this.getAccessKeys()).filter(({access_key:G})=>"FullAccess"!==G.permission).filter(({access_key:G})=>{const F=G.permission.FunctionCall;return F.receiver_id===k&&4===F.method_names.length&&F.method_names.includes("add_request_and_confirm")}),Y=v.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:k})).publicKey);return[m(Y),...z.map(({public_key:G})=>m(v.PublicKey.from(G))),...z.map(({public_key:G})=>p(v.PublicKey.from(G),_()))]})}disable(k,U){return l(this,void 0,void 0,function*(){const{stateStatus:z}=yield this.checkMultisigCodeAndStateStatus();if(z!==d.MultisigStateStatus.VALID_STATE&&z!==d.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new E.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let Y;yield this.deleteAllRequests().catch(j=>Y=j);const F=[...yield this.get2faDisableCleanupActions(U).catch(j=>{throw"ContractHasExistingState"===j.type&&Y||j}),...yield this.get2faDisableKeyConversionActions(),S(k)];return g.Logger.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:F})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,{requestId:U}=this.getRequest(),z=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:k,method:z,requestId:U}),U})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const k=yield this.get2faMethod(),U=yield this.getCode(k);try{return yield this.verifyCode(U)}catch(z){if(g.Logger.warn("Error validating security code:",z),z.toString().includes("invalid 2fa code provided")||z.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw z}})}verifyCodeDefault(k){return l(this,void 0,void 0,function*(){const{accountId:U}=this,z=this.getRequest();if(!z)throw new Error("no request pending");const{requestId:Y}=z;return yield this.postSignedJson("/2fa/verify",{accountId:U,securityCode:k,requestId:Y})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:k}=this;return{accountId:k,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:k})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:k}=yield this.getRecoveryMethods();if(k&&k.length&&(k=k.find(Y=>0===Y.kind.indexOf("2fa-"))),!k)return null;const{kind:U,detail:z}=k;return{kind:U,detail:z}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:k}=this,z=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),Y=yield this.connection.signer.signMessage(Buffer.from(z),k,this.connection.networkId);return{blockNumber:z,blockNumberSignature:Buffer.from(Y.signature).toString("base64")}})}postSignedJson(k,U){return l(this,void 0,void 0,function*(){return yield(0,M.fetchJson)(this.helperUrl+k,JSON.stringify(Object.assign(Object.assign({},U),yield this.signatureFor())))})}}n.Account2FA=x;const C=N=>v.PublicKey.from(N)},26030:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(g,y,f,d){return new(f||(f=Promise))(function(m,S){function _(x){try{P(d.next(x))}catch(C){S(C)}}function D(x){try{P(d.throw(x))}catch(C){S(C)}}function P(x){x.done?m(x.value):function p(m){return m instanceof f?m:new f(function(S){S(m)})}(x.value).then(_,D)}P((d=d.apply(g,y||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=void 0;const v=u(1656);class E{}n.AccountCreator=E;n.LocalAccountCreator=class M extends E{constructor(y,f){super(),this.masterAccount=y,this.initialBalance=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(y,f,this.initialBalance)})}};n.UrlAccountCreator=class s extends E{constructor(y,f){super(),this.connection=y,this.helperUrl=f}createAccount(y,f){return l(this,void 0,void 0,function*(){yield(0,v.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:y,newAccountPublicKey:f.toString()}))})}}},88315:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(D,P,x,C){return new(x||(x=Promise))(function(k,U){function z(F){try{G(C.next(F))}catch(j){U(j)}}function Y(F){try{G(C.throw(F))}catch(j){U(j)}}function G(F){F.done?k(F.value):function N(k){return k instanceof x?k:new x(function(U){U(k)})}(F.value).then(z,Y)}G((C=C.apply(D,P||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.AccountMultisig=void 0;const v=u(16260),E=u(53971),M=u(99591),s=u(78361),g=u(66113),{deployContract:y,functionCall:f}=v.actionCreators;var d,D;(D=d||(d={}))[D.INVALID_CODE=0]="INVALID_CODE",D[D.VALID_CODE=1]="VALID_CODE",D[D.UNKNOWN_CODE=2]="UNKNOWN_CODE";const p={[s.MULTISIG_STORAGE_KEY]:null};class m extends M.Account{constructor(P,x,C){super(P,x),this.storage=C.storage,this.onAddRequestResult=C.onAddRequestResult}signAndSendTransactionWithAccount(P,x){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return C.signAndSendTransaction.call(this,{receiverId:P,actions:x})})}signAndSendTransaction({receiverId:P,actions:x}){const C=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:N}=this,k=Buffer.from(JSON.stringify({request:{receiver_id:P,actions:_(x,N,P)}}));let U;try{U=yield C.signAndSendTransaction.call(this,{receiverId:N,actions:[f("add_request_and_confirm",k,s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch(Y){if(Y.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:P,actions:x});throw Y}if(!U.status)throw new Error("Request failed");const z=Object.assign({},U.status);if(!z.SuccessValue||"string"!=typeof z.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:N,actions:x,requestId:parseInt(Buffer.from(z.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(U)),this.deleteUnconfirmedRequests(),U})}checkMultisigCodeAndStateStatus(P){const x=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const N=P?d.UNKNOWN_CODE:d.VALID_CODE;try{return P?yield x.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y(P),f("delete_request",{request_id:4294967295},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:d.VALID_CODE,stateStatus:g.MultisigStateStatus.VALID_STATE}}catch(k){if(new RegExp(g.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.INVALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(g.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(k&&k.kind&&k.kind.ExecutionError))return{codeStatus:N,stateStatus:g.MultisigStateStatus.VALID_STATE};if(new RegExp(g.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(k&&k.message))return{codeStatus:d.INVALID_CODE,stateStatus:g.MultisigStateStatus.UNKNOWN_STATE};throw k}})}deleteRequest(P){return super.signAndSendTransaction({receiverId:this.accountId,actions:[f("delete_request",{request_id:P},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const P=yield this.getRequestIds();P.length&&(yield Promise.all(P.map(x=>this.deleteRequest(x))))})}deleteUnconfirmedRequests(){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const x=yield this.getRequestIds(),{requestId:C}=this.getRequest();for(const N of x)if(N!=C)try{yield P.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[f("delete_request",{request_id:N},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch{E.Logger.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(s.MULTISIG_STORAGE_KEY)||"{}"):p[s.MULTISIG_STORAGE_KEY]}setRequest(P){if(this.storage)return this.storage.setItem(s.MULTISIG_STORAGE_KEY,JSON.stringify(P));p[s.MULTISIG_STORAGE_KEY]=P}}n.AccountMultisig=m;const S=D=>D.toString().replace("ed25519:",""),_=(D,P,x)=>D.map(C=>{const N=C.enum,{gas:k,publicKey:U,methodName:z,args:Y,deposit:G,accessKey:F,code:j}=C[N],Z={type:N[0].toUpperCase()+N.substr(1),gas:k&&k.toString()||void 0,public_key:U&&S(U)||void 0,method_name:z,args:Y&&Buffer.from(Y).toString("base64")||void 0,code:j&&Buffer.from(j).toString("base64")||void 0,amount:G&&G.toString()||void 0,deposit:G&&G.toString()||"0",permission:void 0};if(F&&(x===P&&"fullAccess"!==F.permission.enum&&(Z.permission={receiver_id:P,allowance:s.MULTISIG_ALLOWANCE.toString(),method_names:s.MULTISIG_CHANGE_METHODS}),"functionCall"===F.permission.enum)){const{receiverId:T,methodNames:o,allowance:h}=F.permission.functionCall;Z.permission={receiver_id:T,allowance:h&&h.toString()||void 0,method_names:o}}return Z})},64097:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Connection=void 0;const l=u(55134),v=u(1656);class s{constructor(y,f,d,p){this.networkId=y,this.provider=f,this.signer=d,this.jsvmAccountId=p}getConnection(){return this}static fromConfig(y){const f=function E(g){switch(g.type){case void 0:return g;case"JsonRpcProvider":return new v.JsonRpcProvider(Object.assign({},g.args));case"FailoverRpcProvider":{const y=(g?.args||[]).map(f=>new v.JsonRpcProvider(f));return new v.FailoverRpcProvider(y)}default:throw new Error(`Unknown provider type ${g.type}`)}}(y.provider),d=function M(g){switch(g.type){case void 0:return g;case"InMemorySigner":return new l.InMemorySigner(g.keyStore);default:throw new Error(`Unknown signer type ${g.type}`)}}(y.signer);return new s(y.networkId,f,d,y.jsvmAccountId)}}n.Connection=s},78361:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=void 0;const l=u(53971);n.MULTISIG_STORAGE_KEY="__multisigRequest",n.MULTISIG_ALLOWANCE=BigInt((0,l.parseNearAmount)("1")),n.MULTISIG_GAS=BigInt("100000000000000"),n.MULTISIG_DEPOSIT=BigInt("0"),n.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],n.MULTISIG_CONFIRM_METHODS=["confirm"]},95656:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(N,k,U,z){return new(U||(U=Promise))(function(G,F){function j(o){try{T(z.next(o))}catch(h){F(h)}}function Z(o){try{T(z.throw(o))}catch(h){F(h)}}function T(o){o.done?G(o.value):function Y(G){return G instanceof U?G:new U(function(F){F(G)})}(o.value).then(j,Z)}T((z=z.apply(N,k||[])).next())})},v=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(n,"__esModule",{value:!0}),n.Contract=void 0;const E=u(53971),M=u(17527),s=u(60443),g=v(u(28167)),y=v(u(89176)),f=u(84778),d=u(99591),p=u(46713),m=u(23138);function S(N,k){return{[N]:(...U)=>k(...U)}[N]}function _(N,k,U){var z;if(!P(N))return;if(k.params&&k.params.serialization_type!==f.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.params.serialization_type);if(k.result&&k.result.serialization_type!==f.AbiSerializationType.Json)throw new p.UnsupportedSerializationError(k.name,k.result.serialization_type);const Y=(null===(z=k.params)||void 0===z?void 0:z.args)||[];for(const G of Y){const F=N[G.name],j=G.type_schema;j.definitions=U.body.root_schema.definitions;const Z=(0,g.default)(j);if(!Z(F))throw new p.ArgumentSchemaError(G.name,Z.errors)}for(const G of Object.keys(N))if(!Y.find(j=>j.name===G))throw new p.UnknownArgumentError(G,Y.map(j=>j.name))}const D=N=>N&&void 0!==N.byteLength&&N.byteLength===N.length,P=N=>"[object Object]"===Object.prototype.toString.call(N);n.Contract=class x{constructor(k,U,z){this.connection=k.getConnection(),k instanceof d.Account&&((0,y.default)("new Contract(account, contractId, options)")("use `new Contract(connection, contractId, options)` instead"),this.account=k),this.contractId=U,this.lve=new s.LocalViewExecution(k);const{viewMethods:Y=[],changeMethods:G=[],abi:F,useLocalViewExecution:j}=z;let Z=Y.map(o=>({name:o,abi:null})),T=G.map(o=>({name:o,abi:null}));if(F){if(Z.length>0||T.length>0)throw new p.ConflictingOptions;Z=F.body.functions.filter(o=>o.kind===f.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),T=F.body.functions.filter(o=>o.kind===f.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}Z.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:S(o,(w={},I={},...R)=>l(this,void 0,void 0,function*(){if(R.length||!P(w)&&!D(w)||!P(I))throw new M.PositionalArgsError;if(h&&_(w,h,F),j)try{return yield this.lve.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:w},I))}catch(V){E.Logger.warn(`Local view execution failed with: "${V.message}"`),E.Logger.warn("Fallback to normal RPC call")}return this.account?this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:w},I)):(0,m.viewFunction)(this.connection,Object.assign({contractId:this.contractId,methodName:o,args:w},I))}))})}),T.forEach(({name:o,abi:h})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:S(o,(...w)=>l(this,void 0,void 0,function*(){if(w.length&&(w.length>3||!P(w[0])&&!D(w[0])))throw new M.PositionalArgsError;return(w.length>1||!(w[0]&&w[0].args))&&((0,y.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ signerAccount, args, gas?, amount?, callbackUrl?, meta? })` instead"),w[0]={args:w[0],gas:w[1],amount:w[2]}),h&&_(w[0].args,h,F),this._changeMethod(Object.assign({methodName:o},w[0]))}))})})}_changeMethod({signerAccount:k,args:U,methodName:z,gas:Y,amount:G,meta:F,callbackUrl:j}){return l(this,void 0,void 0,function*(){!function C(N){const k="number, decimal string or BigInt";for(const U of Object.keys(N)){const z=N[U];if(z&&"bigint"!=typeof z&&isNaN(z))throw new M.ArgumentTypeError(U,k,z)}}({gas:Y,amount:G});const Z=this.account||k;if(!Z)throw new Error("signerAccount must be specified");const T=yield Z.functionCall({contractId:this.contractId,methodName:z,args:U,gas:Y,attachedDeposit:G,walletMeta:F,walletCallbackUrl:j});return(0,E.getTransactionLastResult)(T)})}}},46713:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConflictingOptions=n.ArgumentSchemaError=n.UnknownArgumentError=n.UnsupportedSerializationError=void 0;class u extends Error{constructor(s,g){super(`Contract method '${s}' is using an unsupported serialization type ${g}`)}}n.UnsupportedSerializationError=u;class l extends Error{constructor(s,g){super(`Unrecognized argument '${s}', expected '${JSON.stringify(g)}'`)}}n.UnknownArgumentError=l;class v extends Error{constructor(s,g){super(`Argument '${s}' does not conform to the specified ABI schema: '${JSON.stringify(g)}'`)}}n.ArgumentSchemaError=v;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}n.ConflictingOptions=E},26900:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=n.UnsupportedSerializationError=n.UnknownArgumentError=n.ConflictingOptions=n.ArgumentSchemaError=n.Contract=n.MULTISIG_CONFIRM_METHODS=n.MULTISIG_CHANGE_METHODS=n.MULTISIG_DEPOSIT=n.MULTISIG_GAS=n.MULTISIG_ALLOWANCE=n.MULTISIG_STORAGE_KEY=n.Connection=n.AccountMultisig=n.UrlAccountCreator=n.LocalAccountCreator=n.AccountCreator=n.Account2FA=n.Account=void 0;var l=u(99591);Object.defineProperty(n,"Account",{enumerable:!0,get:function(){return l.Account}});var v=u(92892);Object.defineProperty(n,"Account2FA",{enumerable:!0,get:function(){return v.Account2FA}});var E=u(26030);Object.defineProperty(n,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(n,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(n,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var M=u(88315);Object.defineProperty(n,"AccountMultisig",{enumerable:!0,get:function(){return M.AccountMultisig}});var s=u(64097);Object.defineProperty(n,"Connection",{enumerable:!0,get:function(){return s.Connection}});var g=u(78361);Object.defineProperty(n,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return g.MULTISIG_STORAGE_KEY}}),Object.defineProperty(n,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return g.MULTISIG_ALLOWANCE}}),Object.defineProperty(n,"MULTISIG_GAS",{enumerable:!0,get:function(){return g.MULTISIG_GAS}}),Object.defineProperty(n,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return g.MULTISIG_DEPOSIT}}),Object.defineProperty(n,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(n,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return g.MULTISIG_CONFIRM_METHODS}});var y=u(95656);Object.defineProperty(n,"Contract",{enumerable:!0,get:function(){return y.Contract}});var f=u(46713);Object.defineProperty(n,"ArgumentSchemaError",{enumerable:!0,get:function(){return f.ArgumentSchemaError}}),Object.defineProperty(n,"ConflictingOptions",{enumerable:!0,get:function(){return f.ConflictingOptions}}),Object.defineProperty(n,"UnknownArgumentError",{enumerable:!0,get:function(){return f.UnknownArgumentError}}),Object.defineProperty(n,"UnsupportedSerializationError",{enumerable:!0,get:function(){return f.UnsupportedSerializationError}});var d=u(66113);Object.defineProperty(n,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return d.MultisigDeleteRequestRejectionError}}),Object.defineProperty(n,"MultisigStateStatus",{enumerable:!0,get:function(){return d.MultisigStateStatus}})},60443:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(f,d,p,m){return new(p||(p=Promise))(function(_,D){function P(N){try{C(m.next(N))}catch(k){D(k)}}function x(N){try{C(m.throw(N))}catch(k){D(k)}}function C(N){N.done?_(N.value):function S(_){return _ instanceof p?_:new p(function(D){D(_)})}(N.value).then(P,x)}C((m=m.apply(f,d||[])).next())})},v=this&&this.__rest||function(f,d){var p={};for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&d.indexOf(m)<0&&(p[m]=f[m]);if(null!=f&&"function"==typeof Object.getOwnPropertySymbols){var S=0;for(m=Object.getOwnPropertySymbols(f);S()=>{throw new Error("method not implemented: "+y)},s=y=>()=>{throw new Error("method not available for view calls: "+y)};n.Runtime=class g{constructor(f){var{contractCode:d}=f,p=v(f,["contractCode"]);this.context=p,this.wasm=this.prepareWASM(Buffer.from(d,"base64")),this.memory=new WebAssembly.Memory({initial:1024,maximum:2048}),this.registers={},this.logs=[],this.result=Buffer.from([])}readUTF16CStr(f){const d=[],p=new Uint16Array(this.memory.buffer);let m=Number(f)/2;for(;0!=p[m];)d.push(p[m]),m++;return Buffer.from(Uint16Array.from(d).buffer).toString("ucs2")}readUTF8CStr(f,d){const p=[],m=new Uint8Array(this.memory.buffer);let S=Number(d);for(let _=0;_0===Buffer.compare(S.key,p)).map(S=>S.value);return 0===m.length?null:m.length>1?m:m[0]}prepareWASM(f){const d=[];if("\0asm"!==f.subarray(0,4).toString("utf8"))throw new Error("Invalid magic number");const m=f.readUInt32LE(4);if(1!=m)throw new Error("Invalid version: "+m);let S=8;function _(){let U,N=0,k=0;do{U=f[S++],N|=(127&U)<>=7)&&(U|=128),k.push(U)}while(0!==N);return Buffer.from(k)}function C(N){const k=Buffer.from(N,"utf8");return Buffer.concat([x(k.length),k])}d.push(f.subarray(0,S));do{const N=S,k=f.readUInt8(S);S++;const U=_(),z=S+U;if(5==k)d.push(Buffer.from([5,1,0]));else if(2==k){const Y=[],G=_();for(let Z=0;Zthis.panic("explicit guest panic"),panic_utf8:(f,d)=>this.panic(this.readUTF8CStr(f,d)),epoch_height:M("epoch_height"),storage_usage:M("storage_usage"),account_balance:M("account_balance"),account_locked_balance:M("account_locked_balance"),random_seed:M("random_seed"),ripemd160:M("ripemd160"),keccak256:M("keccak256"),keccak512:M("keccak512"),ecrecover:M("ecrecover"),validator_stake:M("validator_stake"),validator_total_stake:M("validator_total_stake"),write_register:s("write_register"),signer_account_id:s("signer_account_id"),signer_account_pk:s("signer_account_pk"),predecessor_account_id:s("predecessor_account_id"),attached_deposit:s("attached_deposit"),prepaid_gas:s("prepaid_gas"),used_gas:s("used_gas"),promise_create:s("promise_create"),promise_then:s("promise_then"),promise_and:s("promise_and"),promise_batch_create:s("promise_batch_create"),promise_batch_then:s("promise_batch_then"),promise_batch_action_create_account:s("promise_batch_action_create_account"),promise_batch_action_deploy_contract:s("promise_batch_action_deploy_contract"),promise_batch_action_function_call:s("promise_batch_action_function_call"),promise_batch_action_function_call_weight:s("promise_batch_action_function_call_weight"),promise_batch_action_transfer:s("promise_batch_action_transfer"),promise_batch_action_stake:s("promise_batch_action_stake"),promise_batch_action_add_key_with_full_access:s("promise_batch_action_add_key_with_full_access"),promise_batch_action_add_key_with_function_call:s("promise_batch_action_add_key_with_function_call"),promise_batch_action_delete_key:s("promise_batch_action_delete_key"),promise_batch_action_delete_account:s("promise_batch_action_delete_account"),promise_results_count:s("promise_results_count"),promise_result:s("promise_result"),promise_return:s("promise_return"),storage_write:s("storage_write"),storage_remove:s("storage_remove")}}execute(f){return l(this,void 0,void 0,function*(){const d=yield WebAssembly.compile(this.wasm),m=(yield WebAssembly.instantiate(d,{env:Object.assign(Object.assign({},this.getHostImports()),{memory:this.memory})})).exports[f];if(null==m)throw new Error(`Contract method '${f}' does not exists in contract ${this.context.contractId} for block id ${this.context.blockHeight}`);return m(),{result:this.result,logs:this.logs}})}}},52510:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Storage=void 0;const l=u(54689);class v{constructor(M={max:v.MAX_ELEMENTS}){this.cache=new l.LRUMap(M.max),this.blockHeights=new Map}load(M){if(!("blockId"in M))return;let g=M.blockId;return 44==g.toString().length&&(g=this.blockHeights.get(g.toString())),this.cache.get(g)}save(M,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f}){this.blockHeights.set(M,s),this.cache.set(s,{blockHeight:s,blockTimestamp:g,contractCode:y,contractState:f})}}n.Storage=v,v.MAX_ELEMENTS=100},66113:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.MultisigStateStatus=n.MultisigDeleteRequestRejectionError=void 0,(v=n.MultisigDeleteRequestRejectionError||(n.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",v.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",v.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",v.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",v.METHOD_NOT_FOUND="Contract method is not found",function(v){v[v.INVALID_STATE=0]="INVALID_STATE",v[v.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",v[v.VALID_STATE=2]="VALID_STATE",v[v.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(n.MultisigStateStatus||(n.MultisigStateStatus={}))},23138:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.viewFunction=n.viewState=n.encodeJSContractArgs=n.validateArgs=void 0;const v=u(17527),E=u(53971);function M(p){return JSON.parse(Buffer.from(p).toString())}function s(p){return Buffer.from(JSON.stringify(p))}function g(p){if((void 0===p.byteLength||p.byteLength!==p.length)&&(Array.isArray(p)||"object"!=typeof p))throw new v.PositionalArgsError}function y(p,m,S){return Buffer.concat([Buffer.from(p),Buffer.from([0]),Buffer.from(m),Buffer.from([0]),Buffer.from(S)])}n.validateArgs=g,n.encodeJSContractArgs=y,n.viewState=function f(p,m,S,_={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:D}=yield p.provider.query(Object.assign(Object.assign({request_type:"view_state"},_),{account_id:m,prefix_base64:Buffer.from(S).toString("base64")}));return D.map(({key:P,value:x})=>({key:Buffer.from(P,"base64"),value:Buffer.from(x,"base64")}))})},n.viewFunction=function d(p,{contractId:m,methodName:S,args:_={},parse:D=M,stringify:P=s,jsContract:x=!1,blockQuery:C={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let N;g(_),N=x?y(m,S,Object.keys(_).length>0?JSON.stringify(_):""):P(_);const k=yield p.provider.query(Object.assign(Object.assign({request_type:"call_function"},C),{account_id:x?p.jsvmAccountId:m,method_name:x?"view_js_contract":S,args_base64:N.toString("base64")}));return k.logs&&(0,E.printTxOutcomeLogs)({contractId:m,logs:k.logs}),k.result&&k.result.length>0&&D(Buffer.from(k.result))})}},82952:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.KeySize=n.KeyType=void 0,(v=n.KeyType||(n.KeyType={}))[v.ED25519=0]="ED25519",function(v){v[v.SECRET_KEY=32]="SECRET_KEY"}(n.KeySize||(n.KeySize={}))},27395:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=n.KeyPairEd25519=n.KeyPair=n.KeyType=void 0;var l=u(82952);Object.defineProperty(n,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var v=u(88618);Object.defineProperty(n,"KeyPair",{enumerable:!0,get:function(){return v.KeyPair}});var E=u(17113);Object.defineProperty(n,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var M=u(81199);Object.defineProperty(n,"PublicKey",{enumerable:!0,get:function(){return M.PublicKey}})},88618:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPair=void 0;const l=u(23980),v=u(17113);class E extends l.KeyPairBase{static fromRandom(s){if("ED25519"===s.toUpperCase())return v.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${s}`)}static fromString(s){const g=s.split(":");if(1===g.length)return new v.KeyPairEd25519(g[0]);if(2===g.length){if("ED25519"===g[0].toUpperCase())return new v.KeyPairEd25519(g[1]);throw new Error(`Unknown curve: ${g[0]}`)}throw new Error("Invalid encoded key format, must be :")}}n.KeyPair=E},23980:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairBase=void 0;n.KeyPairBase=class u{}},17113:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(n,"__esModule",{value:!0}),n.KeyPairEd25519=void 0;const v=u(53971),E=u(35434),M=l(u(53753)),s=u(82952),g=u(23980),y=u(81199);class f extends g.KeyPairBase{constructor(p){super();const m=(0,v.baseDecode)(p),S=new Uint8Array(m.slice(0,s.KeySize.SECRET_KEY)),_=E.ed25519.getPublicKey(new Uint8Array(S));this.publicKey=new y.PublicKey({keyType:s.KeyType.ED25519,data:_}),this.secretKey=(0,v.baseEncode)(S),this.extendedSecretKey=p}static fromRandom(){const p=(0,M.default)(s.KeySize.SECRET_KEY),m=E.ed25519.getPublicKey(new Uint8Array(p)),S=new Uint8Array([...p,...m]);return new f((0,v.baseEncode)(S))}sign(p){return{signature:E.ed25519.sign(p,(0,v.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(p,m){return this.publicKey.verify(p,m)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}n.KeyPairEd25519=f},81199:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PublicKey=void 0;const l=u(17527),v=u(53971),E=u(35434),M=u(82952);class y extends l.Assignable{static from(d){return"string"==typeof d?y.fromString(d):d}static fromString(d){const p=d.split(":");let m,S=M.KeyType.ED25519;if(1===p.length)m=p[0];else{if(2!==p.length)throw new Error("Invalid encoded key format, must be :");m=p[1],S=function g(f){if("ed25519"===f.toLowerCase())return M.KeyType.ED25519;throw new Error(`Unknown key type ${f}`)}(p[0])}const _=(0,v.baseDecode)(m);if(_.length!==M.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${_.length}), must be ${M.KeySize.SECRET_KEY}`);return new y({keyType:S,data:_})}toString(){return`${function s(f){if(f===M.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${f}`)}(this.keyType)}:${(0,v.baseEncode)(this.data)}`}verify(d,p){if(this.keyType===M.KeyType.ED25519)return E.ed25519.verify(p,d,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}n.PublicKey=y},17680:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(y,f,d,p){return new(d||(d=Promise))(function(S,_){function D(C){try{x(p.next(C))}catch(N){_(N)}}function P(C){try{x(p.throw(C))}catch(N){_(N)}}function x(C){C.done?S(C.value):function m(S){return S instanceof d?S:new d(function(_){_(S)})}(C.value).then(D,P)}x((p=p.apply(y,f||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.InMemorySigner=void 0;const v=u(27395),E=u(69170),M=u(99661),s=u(95569);class g extends s.Signer{constructor(f){super(),this.keyStore=f}static fromKeyPair(f,d,p){return l(this,void 0,void 0,function*(){const m=new E.InMemoryKeyStore;return yield m.setKey(f,d,p),new g(m)})}createKey(f,d){return l(this,void 0,void 0,function*(){const p=v.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(d,f,p),p.getPublicKey()})}getPublicKey(f,d){return l(this,void 0,void 0,function*(){const p=yield this.keyStore.getKey(d,f);return null===p?null:p.getPublicKey()})}signMessage(f,d,p){return l(this,void 0,void 0,function*(){const m=new Uint8Array((0,M.sha256)(f));if(!d)throw new Error("InMemorySigner requires provided account id");const S=yield this.keyStore.getKey(p,d);if(null===S)throw new Error(`Key for ${d} not found in ${p}`);return S.sign(m)})}toString(){return`InMemorySigner(${this.keyStore})`}}n.InMemorySigner=g},55134:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=n.InMemorySigner=void 0;var l=u(17680);Object.defineProperty(n,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var v=u(95569);Object.defineProperty(n,"Signer",{enumerable:!0,get:function(){return v.Signer}})},95569:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signer=void 0;n.Signer=class u{}},96662:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.actionCreators=n.stringifyJsonOrBytes=void 0;const l=u(68890);function g(D){return void 0!==D.byteLength&&D.byteLength===D.length?D:Buffer.from(JSON.stringify(D))}n.stringifyJsonOrBytes=g,n.actionCreators={addKey:function p(D,P){return new l.Action({addKey:new l.AddKey({publicKey:D,accessKey:P})})},createAccount:function M(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function S(D){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:D})})},deleteKey:function m(D){return new l.Action({deleteKey:new l.DeleteKey({publicKey:D})})},deployContract:function s(D){return new l.Action({deployContract:new l.DeployContract({code:D})})},fullAccessKey:function v(){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function y(D,P,x=BigInt(0),C=BigInt(0),N=g,k=!1){return k?new l.Action({functionCall:new l.FunctionCall({methodName:D,args:P,gas:x,deposit:C})}):new l.Action({functionCall:new l.FunctionCall({methodName:D,args:N(P),gas:x,deposit:C})})},functionCallAccessKey:function E(D,P,x){return new l.AccessKey({nonce:0,permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:D,allowance:x,methodNames:P})})})},signedDelegate:function _({delegateAction:D,signature:P}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:D,signature:P})})},stake:function d(D=BigInt(0),P){return new l.Action({stake:new l.Stake({stake:D,publicKey:P})})},transfer:function f(D=BigInt(0)){return new l.Action({transfer:new l.Transfer({deposit:D})})}}},68890:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Action=n.SignedDelegate=n.DeleteAccount=n.DeleteKey=n.AddKey=n.Stake=n.Transfer=n.FunctionCall=n.DeployContract=n.CreateAccount=n.IAction=n.AccessKey=n.AccessKeyPermission=n.FullAccessPermission=n.FunctionCallPermission=void 0;const l=u(17527);class v{constructor(k){if(1!==Object.keys(k).length)throw new Error("Enum can only take single value");Object.keys(k).map(U=>{this[U]=k[U],this.enum=U})}}class E extends l.Assignable{}n.FunctionCallPermission=E;class M extends l.Assignable{}n.FullAccessPermission=M;n.AccessKeyPermission=class s extends v{};class g extends l.Assignable{}n.AccessKey=g;class y extends l.Assignable{}n.IAction=y;n.CreateAccount=class f extends y{};n.DeployContract=class d extends y{};n.FunctionCall=class p extends y{};n.Transfer=class m extends y{};n.Stake=class S extends y{};n.AddKey=class _ extends y{};n.DeleteKey=class D extends y{};n.DeleteAccount=class P extends y{};n.SignedDelegate=class x extends y{};n.Action=class C extends v{}},95386:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createTransaction=void 0;const l=u(33742);n.createTransaction=function v(E,M,s,g,y,f){const d="bigint"==typeof g?g:BigInt(g);return new l.Transaction({signerId:E,publicKey:M,nonce:d,receiverId:s,actions:y,blockHash:f})}},11095:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildDelegateAction=n.DelegateAction=void 0;const l=u(17527),v=u(96662),{addKey:E,createAccount:M,deleteAccount:s,deleteKey:g,deployContract:y,functionCall:f,stake:d,transfer:p}=v.actionCreators;class m extends l.Assignable{}n.DelegateAction=m,n.buildDelegateAction=function S({actions:_,maxBlockHeight:D,nonce:P,publicKey:x,receiverId:C,senderId:N}){return new m({senderId:N,receiverId:C,actions:_.map(k=>{if(!k.type&&!k.params)return k;switch(k.type){case"AddKey":{const{publicKey:U,accessKey:z}=k.params;return E(U,z)}case"CreateAccount":return M(k.params.createAccount);case"DeleteAccount":return s(k.params.deleteAccount);case"DeleteKey":return g(k.params.publicKey);case"DeployContract":return y(k.params.code);case"FunctionCall":{const{methodName:U,args:z,gas:Y,deposit:G}=k.params;return f(U,z,Y,G)}case"Stake":return d(k.params.stake,k.params.publicKey);case"Transfer":{const{deposit:U}=k.params;return p(U)}}throw new Error("Unrecognized action")}),nonce:P,maxBlockHeight:D,publicKey:x})}},16260:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(96662),n),v(u(68890),n),v(u(95386),n),v(u(11095),n),v(u(33742),n),v(u(22419),n),v(u(46670),n)},94672:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DelegateActionPrefix=void 0;const l=u(17527),v=Math.pow(2,30),E_MetaTransactions=366;class M extends l.Assignable{}class s extends M{constructor(f){super({prefix:v+f})}}n.DelegateActionPrefix=class g extends s{constructor(){super(E_MetaTransactions)}}},33742:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA=n.SignedTransaction=n.Transaction=n.decodeSignedTransaction=n.decodeTransaction=n.encodeTransaction=n.encodeSignedDelegate=n.encodeDelegateAction=void 0;const l=u(17527),v=u(76287),E=u(94672);function g(m){const S=m instanceof p?n.SCHEMA.SignedTransaction:n.SCHEMA.Transaction;return(0,v.serialize)(S,m)}function y(m){return new d((0,v.deserialize)(n.SCHEMA.Transaction,m))}function f(m){return new p((0,v.deserialize)(n.SCHEMA.SignedTransaction,m))}n.encodeDelegateAction=function M(m){return new Uint8Array([...(0,v.serialize)(n.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,v.serialize)(n.SCHEMA.DelegateAction,m)])},n.encodeSignedDelegate=function s(m){return(0,v.serialize)(n.SCHEMA.SignedDelegate,m)},n.encodeTransaction=g,n.decodeTransaction=y,n.decodeSignedTransaction=f;class d extends l.Assignable{encode(){return g(this)}static decode(S){return y(S)}}n.Transaction=d;class p extends l.Assignable{encode(){return g(this)}static decode(S){return f(S)}}n.SignedTransaction=p,n.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",actions:{array:{type:this.ClassicActions}},nonce:"u64",maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},22419:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(p,m,S,_){return new(S||(S=Promise))(function(P,x){function C(U){try{k(_.next(U))}catch(z){x(z)}}function N(U){try{k(_.throw(U))}catch(z){x(z)}}function k(U){U.done?P(U.value):function D(P){return P instanceof S?P:new S(function(x){x(P)})}(U.value).then(C,N)}k((_=_.apply(p,m||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.signDelegateAction=n.signTransaction=void 0;const v=u(99661),E=u(68890),M=u(95386),s=u(33742),g=u(46670);function y(p,m,S,_){return l(this,void 0,void 0,function*(){const D=(0,s.encodeTransaction)(p),P=new Uint8Array((0,v.sha256)(D)),x=yield m.signMessage(D,S,_);return[P,new s.SignedTransaction({transaction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:x.signature})})]})}n.signTransaction=function f(...p){return l(this,void 0,void 0,function*(){if(p[0].constructor===s.Transaction){const[m,S,_,D]=p;return y(m,S,_,D)}{const[m,S,_,D,P,x,C]=p,N=yield P.getPublicKey(x,C);return y((0,M.createTransaction)(x,N,m,S,_,D),P,x,C)}})},n.signDelegateAction=function d({delegateAction:p,signer:m}){return l(this,void 0,void 0,function*(){const S=(0,s.encodeDelegateAction)(p),_=yield m.sign(S),D=new E.SignedDelegate({delegateAction:p,signature:new g.Signature({keyType:p.publicKey.keyType,data:_})});return{hash:new Uint8Array((0,v.sha256)(S)),signedDelegateAction:D}})}},46670:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Signature=void 0;const l=u(17527);class v extends l.Assignable{}n.Signature=v},20311:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_FUNCTION_CALL_GAS=void 0,n.DEFAULT_FUNCTION_CALL_GAS=BigInt("30000000000000")},8114:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=void 0;const l=u(96823);n.logWarning=function v(...E){const[M,...s]=E;l.Logger.warn(M,...s)}},45885:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseRpcError=n.parseResultError=n.getErrorTypeFromErrorMessage=n.formatError=n.ServerError=n.logWarning=void 0;var l=u(8114);Object.defineProperty(n,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var v=u(34011);Object.defineProperty(n,"ServerError",{enumerable:!0,get:function(){return v.ServerError}}),Object.defineProperty(n,"formatError",{enumerable:!0,get:function(){return v.formatError}}),Object.defineProperty(n,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return v.getErrorTypeFromErrorMessage}}),Object.defineProperty(n,"parseResultError",{enumerable:!0,get:function(){return v.parseResultError}}),Object.defineProperty(n,"parseRpcError",{enumerable:!0,get:function(){return v.parseRpcError}})},34011:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(C){return C&&C.__esModule?C:{default:C}};Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorTypeFromErrorMessage=n.formatError=n.parseResultError=n.parseRpcError=n.ServerError=void 0;const v=u(17527),E=l(u(11346)),M=u(14092),s=l(u(59514)),g=l(u(83073)),y={formatNear:()=>(C,N)=>(0,M.formatNearAmount)(N(C))};class f extends v.TypedError{}n.ServerError=f;class d extends f{}function p(C){const N={},k=_(C,g.default.schema,N,""),U=new f(S(k,N),k);return Object.assign(U,N),U}function S(C,N){return"string"==typeof s.default[C]?E.default.render(s.default[C],Object.assign(Object.assign({},N),y)):JSON.stringify(N)}function _(C,N,k,U){let z,Y,G;for(const F in N){if(x(C[F]))return C[F];if(P(C[F]))z=C[F],Y=N[F],G=F;else{if(!P(C.kind)||!P(C.kind[F]))continue;z=C.kind[F],Y=N[F],G=F}}if(z&&Y){for(const F of Object.keys(Y.props))k[F]=z[F];return _(z,N,k,G)}return k.kind=C,U}function P(C){return"[object Object]"===Object.prototype.toString.call(C)}function x(C){return"[object String]"===Object.prototype.toString.call(C)}n.parseRpcError=p,n.parseResultError=function m(C){const N=p(C.status.Failure),k=new d;return Object.assign(k,N),k.type=N.type,k.message=N.message,k.transaction_outcome=C.transaction_outcome,k},n.formatError=S,n.getErrorTypeFromErrorMessage=function D(C,N){switch(!0){case/^account .*? does not exist while viewing$/.test(C):case/^Account .*? doesn't exist$/.test(C):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(C):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(C):case/wasm execution failed with error: CompilationError\(CodeDoesNotExist/.test(C):return"CodeDoesNotExist";case/wasm execution failed with error: FunctionCallError\(MethodResolveError\(MethodNotFound/.test(C):case/wasm execution failed with error: MethodResolveError\(MethodNotFound/.test(C):return"MethodNotFound";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(C):return"InvalidNonce";default:return N}}},14092:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(n,"__esModule",{value:!0}),n.baseDecode=n.baseEncode=n.parseNearAmount=n.formatNearAmount=n.NEAR_NOMINATION=n.NEAR_NOMINATION_EXP=void 0;const v=l(u(54335));n.NEAR_NOMINATION_EXP=24,n.NEAR_NOMINATION=BigInt(10)**BigInt(n.NEAR_NOMINATION_EXP);const E=[],M=BigInt(10);for(let _=0,D=BigInt(5);_0&&(P+=E[N])}const x=(_=P.toString()).substring(0,_.length-n.NEAR_NOMINATION_EXP)||"0",C=_.substring(_.length-n.NEAR_NOMINATION_EXP).padStart(n.NEAR_NOMINATION_EXP,"0").substring(0,D);return function f(_){return _.replace(/\.?0*$/,"")}(`${function p(_){const D=/(-?\d+)(\d{3})/;for(;D.test(_);)_=_.replace(D,"$1,$2");return _}(x)}.${C}`)},n.parseNearAmount=function g(_){if(!_)return null;const D=(_=function y(_){return _.replace(/,/g,"").trim()}(_)).split("."),P=D[0],x=D[1]||"";if(D.length>2||x.length>n.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${_}' as NEAR amount`);return function d(_){return _=_.replace(/^0+/,""),""===_?"0":_}(P+x.padEnd(n.NEAR_NOMINATION_EXP,"0"))},n.baseEncode=function m(_){if("string"==typeof _){const D=[];for(let P=0;P<_.length;P++)D.push(_.charCodeAt(P));_=new Uint8Array(D)}return v.default.encode(_)},n.baseDecode=function S(_){return new Uint8Array(v.default.decode(_))}},53971:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,M,s,g){void 0===g&&(g=s);var y=Object.getOwnPropertyDescriptor(M,s);(!y||("get"in y?!M.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return M[s]}}),Object.defineProperty(E,g,y)}:function(E,M,s,g){void 0===g&&(g=s),E[g]=M[s]}),v=this&&this.__exportStar||function(E,M){for(var s in E)"default"!==s&&!Object.prototype.hasOwnProperty.call(M,s)&&l(M,E,s)};Object.defineProperty(n,"__esModule",{value:!0}),v(u(20311),n),v(u(45885),n),v(u(14092),n),v(u(45690),n),v(u(2104),n),v(u(21937),n),v(u(96823),n),v(u(92203),n)},18623:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ConsoleLogger=void 0;n.ConsoleLogger=class u{constructor(v){this.logLevels=v,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(v,E,...M){switch(v){case"error":case"fatal":return console.error(E,...M);case"warn":return console.warn(E,...M);case"log":return console.log(E,...M);case"debug":case"verbose":return console.debug(E,...M)}}verbose(v,...E){this.isLevelEnabled("verbose")&&this.print("verbose",v,...E)}debug(v,...E){this.isLevelEnabled("debug")&&this.print("debug",v,...E)}log(v,...E){this.isLevelEnabled("log")&&this.print("log",v,...E)}warn(v,...E){this.isLevelEnabled("warn")&&this.print("warn",v,...E)}error(v,...E){this.isLevelEnabled("error")&&this.print("error",v,...E)}fatal(v,...E){this.isLevelEnabled("fatal")&&this.print("fatal",v,...E)}}},96823:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;var l=u(23237);Object.defineProperty(n,"Logger",{enumerable:!0,get:function(){return l.Logger}})},23237:(q,n,u)=>{"use strict";var l;Object.defineProperty(n,"__esModule",{value:!0}),n.Logger=void 0;const v=u(18623),M="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new v.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class s{static error(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.error(y,...f)}static log(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.log(y,...f)}static warn(y,...f){var d;null===(d=this.instanceRef)||void 0===d||d.warn(y,...f)}static debug(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.debug)||void 0===p||p.call(d,y,...f)}static verbose(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.verbose)||void 0===p||p.call(d,y,...f)}static fatal(y,...f){var d,p;null===(p=null===(d=this.instanceRef)||void 0===d?void 0:d.fatal)||void 0===p||p.call(d,y,...f)}}n.Logger=s,l=s,s.instanceRef=M,s.overrideLogger=g=>{l.instanceRef=g}},45690:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.printTxOutcomeLogs=n.printTxOutcomeLogsAndFailures=void 0;const l=u(45885),v=u(96823);function M({contractId:s,logs:g,prefix:y=""}){for(const f of g)v.Logger.log(`${y}Log [${s}]: ${f}`)}n.printTxOutcomeLogsAndFailures=function E({contractId:s,outcome:g}){const y=[g.transaction_outcome,...g.receipts_outcome].reduce((f,d)=>{const p="object"==typeof d.outcome.status&&"object"==typeof d.outcome.status.Failure;return d.outcome.logs.length||p?f.concat({receiptIds:d.outcome.receipt_ids,logs:d.outcome.logs,failure:"object"==typeof d.outcome.status&&void 0!==d.outcome.status.Failure?(0,l.parseRpcError)(d.outcome.status.Failure):null}):f},[]);for(const f of y)v.Logger.log(`Receipt${f.receiptIds.length>1?"s":""}: ${f.receiptIds.join(", ")}`),M({contractId:s,logs:f.logs,prefix:"\t"}),f.failure&&v.Logger.warn(`\tFailure [${s}]: ${f.failure}`)},n.printTxOutcomeLogs=M},2104:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getTransactionLastResult=void 0,n.getTransactionLastResult=function u(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const v=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(v)}catch{return v}}return null}},92203:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sortBigIntAsc=void 0,n.sortBigIntAsc=function u(l,v){return lv?1:0}},21937:function(q,n,u){"use strict";var l=this&&this.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(n,"__esModule",{value:!0}),n.diffEpochValidators=n.findSeatPrice=void 0;const v=l(u(89176)),E=u(92203);n.findSeatPrice=function M(f,d,p,m){return m&&m<49?function s(f,d){const p=f.map(P=>BigInt(P.stake)).sort(E.sortBigIntAsc),m=BigInt(d),S=p.reduce((P,x)=>P+x);if(S=m){_=P,x=!0;break}x||(D=P)}return _}(f,d):(p||((0,v.default)("findSeatPrice(validators, maxNumberOfSeats)")("`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead"),p=[1,6250]),function g(f,d,p){if(2!=p.length)throw Error("minimumStakeRatio should have 2 elements");const m=f.map(_=>BigInt(_.stake)).sort(E.sortBigIntAsc),S=m.reduce((_,D)=>_+D);return f.lengthp.set(S.account_id,S));const m=new Set(d.map(S=>S.account_id));return{newValidators:d.filter(S=>!p.has(S.account_id)),removedValidators:f.filter(S=>!m.has(S.account_id)),changedValidators:d.filter(S=>p.has(S.account_id)&&p.get(S.account_id).stake!=S.stake).map(S=>({current:p.get(S.account_id),next:S}))}}},22443:(q,n)=>{"use strict";function u(f){if(!Number.isSafeInteger(f)||f<0)throw new Error(`Wrong positive integer: ${f}`)}function l(f){if("boolean"!=typeof f)throw new Error(`Expected boolean, not ${f}`)}function E(f,...d){if(!function v(f){return f instanceof Uint8Array||null!=f&&"object"==typeof f&&"Uint8Array"===f.constructor.name}(f))throw new Error("Expected Uint8Array");if(d.length>0&&!d.includes(f.length))throw new Error(`Expected Uint8Array of length ${d}, not of length=${f.length}`)}function M(f){if("function"!=typeof f||"function"!=typeof f.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");u(f.outputLen),u(f.blockLen)}function s(f,d=!0){if(f.destroyed)throw new Error("Hash instance has been destroyed");if(d&&f.finished)throw new Error("Hash#digest() has already been called")}function g(f,d){E(f);const p=d.outputLen;if(f.length{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const l=u(22443),v=u(86699);class M extends v.Hash{constructor(g,y,f,d){super(),this.blockLen=g,this.outputLen=y,this.padOffset=f,this.isLE=d,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(g),this.view=(0,v.createView)(this.buffer)}update(g){(0,l.exists)(this);const{view:y,buffer:f,blockLen:d}=this,p=(g=(0,v.toBytes)(g)).length;for(let m=0;md-m&&(this.process(f,0),m=0);for(let x=m;x>d&p),S=Number(y&p),_=f?4:0,D=f?0:4;s.setUint32(g+_,m,f),s.setUint32(g+D,S,f)})(f,d-8,BigInt(8*this.length),p),this.process(f,0);const S=(0,v.createView)(g),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const D=_/4,P=this.get();if(D>P.length)throw new Error("_sha2: outputLen bigger than state");for(let x=0;x{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},99661:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const l=u(53210),v=u(86699),E=(p,m,S)=>p&m^~p&S,M=(p,m,S)=>p&m^p&S^m&S,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),g=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64);class f extends l.SHA2{constructor(){super(64,32,8,!1),this.A=0|g[0],this.B=0|g[1],this.C=0|g[2],this.D=0|g[3],this.E=0|g[4],this.F=0|g[5],this.G=0|g[6],this.H=0|g[7]}get(){const{A:m,B:S,C:_,D,E:P,F:x,G:C,H:N}=this;return[m,S,_,D,P,x,C,N]}set(m,S,_,D,P,x,C,N){this.A=0|m,this.B=0|S,this.C=0|_,this.D=0|D,this.E=0|P,this.F=0|x,this.G=0|C,this.H=0|N}process(m,S){for(let z=0;z<16;z++,S+=4)y[z]=m.getUint32(S,!1);for(let z=16;z<64;z++){const Y=y[z-15],G=y[z-2],F=(0,v.rotr)(Y,7)^(0,v.rotr)(Y,18)^Y>>>3,j=(0,v.rotr)(G,17)^(0,v.rotr)(G,19)^G>>>10;y[z]=j+y[z-7]+F+y[z-16]|0}let{A:_,B:D,C:P,D:x,E:C,F:N,G:k,H:U}=this;for(let z=0;z<64;z++){const G=U+((0,v.rotr)(C,6)^(0,v.rotr)(C,11)^(0,v.rotr)(C,25))+E(C,N,k)+s[z]+y[z]|0,j=((0,v.rotr)(_,2)^(0,v.rotr)(_,13)^(0,v.rotr)(_,22))+M(_,D,P)|0;U=k,k=N,N=C,C=x+G|0,x=P,P=D,D=_,_=G+j|0}_=_+this.A|0,D=D+this.B|0,P=P+this.C|0,x=x+this.D|0,C=C+this.E|0,N=N+this.F|0,k=k+this.G|0,U=U+this.H|0,this.set(_,D,P,x,C,N,k,U)}roundClean(){y.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class d extends f{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,v.wrapConstructor)(()=>new f),n.sha224=(0,v.wrapConstructor)(()=>new d)},86699:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const v=u(47641);n.u8=Z=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);function s(Z){return Z instanceof Uint8Array||null!=Z&&"object"==typeof Z&&"Uint8Array"===Z.constructor.name}n.u32=Z=>new Uint32Array(Z.buffer,Z.byteOffset,Math.floor(Z.byteLength/4));n.createView=Z=>new DataView(Z.buffer,Z.byteOffset,Z.byteLength);if(n.rotr=(Z,T)=>Z<<32-T|Z>>>T,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const f=Array.from({length:256},(Z,T)=>T.toString(16).padStart(2,"0"));n.bytesToHex=function d(Z){if(!s(Z))throw new Error("Uint8Array expected");let T="";for(let o=0;o=p._0&&Z<=p._9?Z-p._0:Z>=p._A&&Z<=p._F?Z-(p._A-10):Z>=p._a&&Z<=p._f?Z-(p._a-10):void 0}n.hexToBytes=function S(Z){if("string"!=typeof Z)throw new Error("hex string expected, got "+typeof Z);const T=Z.length,o=T/2;if(T%2)throw new Error("padded hex string expected, got unpadded hex of length "+T);const h=new Uint8Array(o);for(let w=0,I=0;w=0&&IZ().update(C(h)).digest(),o=Z();return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=()=>Z(),T},n.wrapConstructorWithOpts=function G(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.wrapXOFConstructorWithOpts=function F(Z){const T=(h,w)=>Z(w).update(C(h)).digest(),o=Z({});return T.outputLen=o.outputLen,T.blockLen=o.blockLen,T.create=h=>Z(h),T},n.randomBytes=function j(Z=32){if(v.crypto&&"function"==typeof v.crypto.getRandomValues)return v.crypto.getRandomValues(new Uint8Array(Z));throw new Error("crypto.getRandomValues must be defined")}},98593:(q,n,u)=>{var l=u(73502).Buffer;q.exports=function(E){for(var M={},s=E.length,g=E.charAt(0),y=0;y>=8;for(;C>0;)_.push(255&C),C>>=8}for(var N=0;S[N]===g&&N0;)_.push(x%s),x=x/s|0}for(var C="",N=0;0===S[N]&&N=0;--k)C+=E[_[k]];return C},decodeUnsafe:p,decode:function m(S){var _=p(S);if(_)return _;throw new Error("Non-base"+s+" character")}}}},19690:(q,n)=>{"use strict";n.__esModule=!0,n.DecodeBuffer=n.EncodeBuffer=void 0;var u=function(){function v(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return v.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},v.prototype.consume_value=function(E){var M=E.substring(1),s=parseInt(M)/8;this.assert_enough_buffer(s);var g="f"===E[0]?"getFloat".concat(M):"i"===E[0]?"getInt".concat(M):"getUint".concat(M),y=this.view[g](this.offset,!0);return this.offset+=s,y},v.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var M=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,M},v}();n.DecodeBuffer=l},39203:(q,n,u)=>{"use strict";n.__esModule=!0,n.BorshDeserializer=void 0;var l=u(10633),v=u(19690),E=function(){function M(s){this.buffer=new v.DecodeBuffer(s)}return M.prototype.decode=function(s){return this.decode_value(s)},M.prototype.decode_value=function(s){if("string"==typeof s){if(l.integers.includes(s))return this.decode_integer(s);if("string"===s)return this.decode_string();if("bool"===s)return this.decode_boolean()}if("object"==typeof s){if("option"in s)return this.decode_option(s);if("enum"in s)return this.decode_enum(s);if("array"in s)return this.decode_array(s);if("set"in s)return this.decode_set(s);if("map"in s)return this.decode_map(s);if("struct"in s)return this.decode_struct(s)}throw new Error("Unsupported type: ".concat(s))},M.prototype.decode_integer=function(s){var g=parseInt(s.substring(1));return g<=32||"f64"==s?this.buffer.consume_value(s):this.decode_bigint(g,s.startsWith("i"))},M.prototype.decode_bigint=function(s,g){void 0===g&&(g=!1);var y=s/8,f=new Uint8Array(this.buffer.consume_bytes(y)),d=f.reduceRight(function(p,m){return p+m.toString(16).padStart(2,"0")},"");return g&&f[y-1]?BigInt.asIntN(s,BigInt("0x".concat(d))):BigInt("0x".concat(d))},M.prototype.decode_string=function(){var s=this.decode_integer("u32"),g=new Uint8Array(this.buffer.consume_bytes(s));return String.fromCharCode.apply(null,g)},M.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},M.prototype.decode_option=function(s){var g=this.buffer.consume_value("u8");if(1===g)return this.decode_value(s.option);if(0!==g)throw new Error("Invalid option ".concat(g));return null},M.prototype.decode_enum=function(s){var g,y=this.buffer.consume_value("u8");if(y>s.enum.length)throw new Error("Enum option ".concat(y," is not available"));var f=s.enum[y].struct,d=Object.keys(f)[0];return(g={})[d]=this.decode_value(f[d]),g},M.prototype.decode_array=function(s){for(var g=[],y=s.array.len?s.array.len:this.decode_integer("u32"),f=0;f>=BigInt(8);this.encoded.store_bytes(new Uint8Array(S))},f.prototype.encode_string=function(d){this.checkTypes&&g.expect_type(d,"string",this.fieldPath);var p=d;this.encoded.store_value(p.length,"u32");for(var m=0;m{"use strict";n.__esModule=!0,n.integers=void 0,n.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},22568:function(q,n,u){"use strict";var x,l=this&&this.__extends||(x=function(C,N){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,U){k.__proto__=U}||function(k,U){for(var z in U)Object.prototype.hasOwnProperty.call(U,z)&&(k[z]=U[z])})(C,N)},function(C,N){if("function"!=typeof N&&null!==N)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function k(){this.constructor=C}x(C,N),C.prototype=null===N?Object.create(N):(k.prototype=N.prototype,new k)});n.__esModule=!0,n.validate_schema=n.ErrorSchema=n.expect_enum=n.expect_same_size=n.expect_bigint=n.expect_type=n.isArrayLike=void 0;var v=u(10633);n.isArrayLike=function E(x){return Array.isArray(x)||!!x&&"object"==typeof x&&"length"in x&&"number"==typeof x.length&&(0===x.length||x.length>0&&x.length-1 in x)},n.expect_type=function M(x,C,N){if(typeof x!==C)throw new Error("Expected ".concat(C," not ").concat(typeof x,"(").concat(x,") at ").concat(N.join(".")))},n.expect_bigint=function s(x,C){if(!["number","string","bigint","boolean"].includes(typeof x)&&!("object"==typeof x&&null!==x&&"toString"in x))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))},n.expect_same_size=function g(x,C,N){if(x!==C)throw new Error("Array length ".concat(x," does not match schema length ").concat(C," at ").concat(N.join(".")))},n.expect_enum=function y(x,C){if("object"!=typeof x||null===x)throw new Error("Expected object not ".concat(typeof x,"(").concat(x,") at ").concat(C.join(".")))};var f=v.integers.concat(["bool","string"]),d=["option","enum","array","set","map","struct"],p=function(x){function C(N,k){var U="Invalid schema: ".concat(JSON.stringify(N)," expected ").concat(k);return x.call(this,U)||this}return l(C,x),C}(Error);function m(x){if("string"!=typeof x||!f.includes(x)){if(x&&"object"==typeof x){var C=Object.keys(x);if(1===C.length&&d.includes(C[0])){var N=C[0];if("option"===N)return m(x[N]);if("enum"===N)return function S(x){if(!Array.isArray(x))throw new p(x,"Array");for(var C=0,N=x;C{var l=u(98593);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},46789:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.derivePath=n.isValidPath=n.getPublicKey=n.getMasterKeyFromSeed=void 0;const l=u(74529),v=u(40489),E=u(25076);n.getMasterKeyFromSeed=y=>{const d=l("sha512","ed25519 seed").update(Buffer.from(y,"hex")).digest();return{key:d.slice(0,32),chainCode:d.slice(32)}};n.getPublicKey=(y,f=!0)=>{const p=v.sign.keyPair.fromSeed(y).secretKey.subarray(32),m=Buffer.alloc(1,0);return f?Buffer.concat([m,Buffer.from(p)]):Buffer.from(p)},n.isValidPath=y=>!!E.pathRegex.test(y)&&!y.split("/").slice(1).map(E.replaceDerive).some(isNaN),n.derivePath=(y,f,d=2147483648)=>{if(!n.isValidPath(y))throw new Error("Invalid derivation path");const{key:p,chainCode:m}=n.getMasterKeyFromSeed(f);return y.split("/").slice(1).map(E.replaceDerive).map(_=>parseInt(_,10)).reduce((_,D)=>(({key:y,chainCode:f},d)=>{const p=Buffer.allocUnsafe(4);p.writeUInt32BE(d,0);const m=Buffer.concat([Buffer.alloc(1,0),y,p]),S=l("sha512",f).update(m).digest();return{key:S.slice(0,32),chainCode:S.slice(32)}})(_,D+d),{key:p,chainCode:m})}},25076:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.replaceDerive=n.pathRegex=void 0,n.pathRegex=new RegExp("^m(\\/[0-9]+')+$"),n.replaceDerive=u=>u.replace("'","")},21087:(q,n,u)=>{const l=u(48670),{derivePath:v}=u(46789),E=u(78141),M=u(40489),s="m/44'/397'/0'",y=p=>p.trim().split(/\s+/).map(m=>m.toLowerCase()).join(" "),f=(p,m)=>{const S=l.mnemonicToSeed(y(p)),{key:_}=v(m||s,S.toString("hex")),D=M.sign.keyPair.fromSeed(_),P="ed25519:"+E.encode(Buffer.from(D.publicKey));return{seedPhrase:p,secretKey:"ed25519:"+E.encode(Buffer.from(D.secretKey)),publicKey:P}};q.exports={KEY_DERIVATION_PATH:s,generateSeedPhrase:p=>f(void 0!==p?l.entropyToMnemonic(p):l.generateMnemonic()),normalizeSeedPhrase:y,parseSeedPhrase:f,findSeedPhraseKey:(p,m)=>{const S=f(p);return m.indexOf(S.publicKey)<0?{}:S}}},78141:(q,n,u)=>{var l=u(21082);q.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69637:(q,n)=>{"use strict";var l=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();q.exports=n=l.fetch,l.fetch&&(n.default=l.fetch.bind(l)),n.Headers=l.Headers,n.Request=l.Request,n.Response=l.Response},90252:(q,n,u)=>{u(53495),q.exports=u(6258)},46974:q=>{var n=function(){var u=Object.create({Source:Object,config:{},buildArgs:[]});function l(y){var f="config";if(y instanceof Function)f="Source";else if(y instanceof Array)f="buildArgs";else{if(!(y instanceof Object))throw new Error("Invalid configuration option.");f="config"}if(u.hasOwnProperty(f))throw new Error("Duplicated configuration option: "+f+".");u[f]=y}for(var v=0,E=arguments.length;v{q.exports=function(){throw new Error("Not implemented.")}},6258:(q,n,u)=>{q.exports={Class:u(46974),abstractMethod:u(93765)}},39199:q=>{q.exports=function(n,u){return parseInt(n.toString(),u||8)}},46389:(q,n,u)=>{var l=u(99136);function v(M){var s=function(){return s.called?s.value:(s.called=!0,s.value=M.apply(this,arguments))};return s.called=!1,s}function E(M){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=M.apply(this,arguments)},g=M.name||"Function wrapped with `once`";return s.onceError=g+" shouldn't be called more than once",s.called=!1,s}q.exports=l(v),q.exports.strict=l(E),v.proto=v(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return v(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return E(this)},configurable:!0})})},52999:(q,n,u)=>{"use strict";var l=u(87977);n.certificate=u(12390);var v=l.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});n.RSAPrivateKey=v;var E=l.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});n.RSAPublicKey=E;var M=l.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),s=l.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(M),this.key("subjectPublicKey").bitstr())});n.PublicKey=s;var g=l.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(M),this.key("subjectPrivateKey").octstr())});n.PrivateKey=g;var y=l.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});n.EncryptedPrivateKey=y;var f=l.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});n.DSAPrivateKey=f,n.DSAparam=l.define("DSAparam",function(){this.int()});var d=l.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),p=l.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())});n.ECPrivateKey=p,n.signature=l.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},12390:(q,n,u)=>{"use strict";var l=u(87977),v=l.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),E=l.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),M=l.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),s=l.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(M),this.key("subjectPublicKey").bitstr())}),g=l.define("RelativeDistinguishedName",function(){this.setof(E)}),y=l.define("RDNSequence",function(){this.seqof(g)}),f=l.define("Name",function(){this.choice({rdnSequence:this.use(y)})}),d=l.define("Validity",function(){this.seq().obj(this.key("notBefore").use(v),this.key("notAfter").use(v))}),p=l.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),m=l.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(M),this.key("issuer").use(f),this.key("validity").use(d),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),S=l.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(m),this.key("signatureAlgorithm").use(M),this.key("signatureValue").bitstr())});q.exports=S},65269:(q,n,u)=>{"use strict";var l=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,v=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,E=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,M=u(40347),s=u(84330),g=u(73502).Buffer;q.exports=function(y,f){var m,d=y.toString(),p=d.match(l);if(p){var _="aes"+p[1],D=g.from(p[2],"hex"),P=g.from(p[3].replace(/[\r\n]/g,""),"base64"),x=M(f,D.slice(0,8),parseInt(p[1],10)).key,C=[],N=s.createDecipheriv(_,x,D);C.push(N.update(P)),C.push(N.final()),m=g.concat(C)}else{var S=d.match(E);m=g.from(S[2].replace(/[\r\n]/g,""),"base64")}return{tag:d.match(v)[1],data:m}}},22772:(q,n,u)=>{"use strict";var l=u(52999),v=u(22562),E=u(65269),M=u(84330),s=u(99357),g=u(73502).Buffer;function f(d){var p;"object"==typeof d&&!g.isBuffer(d)&&(p=d.passphrase,d=d.key),"string"==typeof d&&(d=g.from(d));var D,P,m=E(d,p),S=m.tag,_=m.data;switch(S){case"CERTIFICATE":P=l.certificate.decode(_,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(P||(P=l.PublicKey.decode(_,"der")),D=P.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPublicKey.decode(P.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return P.subjectPrivateKey=P.subjectPublicKey,{type:"ec",data:P};case"1.2.840.10040.4.1":return P.algorithm.params.pub_key=l.DSAparam.decode(P.subjectPublicKey.data,"der"),{type:"dsa",data:P.algorithm.params};default:throw new Error("unknown key id "+D)}case"ENCRYPTED PRIVATE KEY":_=function y(d,p){var m=d.algorithm.decrypt.kde.kdeparams.salt,S=parseInt(d.algorithm.decrypt.kde.kdeparams.iters.toString(),10),_=v[d.algorithm.decrypt.cipher.algo.join(".")],D=d.algorithm.decrypt.cipher.iv,P=d.subjectPrivateKey,x=parseInt(_.split("-")[1],10)/8,C=s.pbkdf2Sync(p,m,S,x,"sha1"),N=M.createDecipheriv(_,C,D),k=[];return k.push(N.update(P)),k.push(N.final()),g.concat(k)}(_=l.EncryptedPrivateKey.decode(_,"der"),p);case"PRIVATE KEY":switch(D=(P=l.PrivateKey.decode(_,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPrivateKey.decode(P.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:P.algorithm.curve,privateKey:l.ECPrivateKey.decode(P.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return P.algorithm.params.priv_key=l.DSAparam.decode(P.subjectPrivateKey,"der"),{type:"dsa",params:P.algorithm.params};default:throw new Error("unknown key id "+D)}case"RSA PUBLIC KEY":return l.RSAPublicKey.decode(_,"der");case"RSA PRIVATE KEY":return l.RSAPrivateKey.decode(_,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:l.DSAPrivateKey.decode(_,"der")};case"EC PRIVATE KEY":return{curve:(_=l.ECPrivateKey.decode(_,"der")).parameters.value,privateKey:_.privateKey};default:throw new Error("unknown key type "+S)}}f.signature=l.signature,q.exports=f},63928:q=>{"use strict";function n(E){if("string"!=typeof E)throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function u(E,M){for(var d,s="",g=0,y=-1,f=0,p=0;p<=E.length;++p){if(p2){var m=s.lastIndexOf("/");if(m!==s.length-1){-1===m?(s="",g=0):g=(s=s.slice(0,m)).length-1-s.lastIndexOf("/"),y=p,f=0;continue}}else if(2===s.length||1===s.length){s="",g=0,y=p,f=0;continue}M&&(s.length>0?s+="/..":s="..",g=2)}else s.length>0?s+="/"+E.slice(y+1,p):s=E.slice(y+1,p),g=p-y-1;y=p,f=0}else 46===d&&-1!==f?++f:f=-1}return s}var v={resolve:function(){for(var g,M="",s=!1,y=arguments.length-1;y>=-1&&!s;y--){var f;y>=0?f=arguments[y]:(void 0===g&&(g=process.cwd()),f=g),n(f),0!==f.length&&(M=f+"/"+M,s=47===f.charCodeAt(0))}return M=u(M,!s),s?M.length>0?"/"+M:"/":M.length>0?M:"."},normalize:function(M){if(n(M),0===M.length)return".";var s=47===M.charCodeAt(0),g=47===M.charCodeAt(M.length-1);return 0===(M=u(M,!s)).length&&!s&&(M="."),M.length>0&&g&&(M+="/"),s?"/"+M:M},isAbsolute:function(M){return n(M),M.length>0&&47===M.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var M,s=0;s0&&(void 0===M?M=g:M+="/"+g)}return void 0===M?".":v.normalize(M)},relative:function(M,s){if(n(M),n(s),M===s||(M=v.resolve(M))===(s=v.resolve(s)))return"";for(var g=1;gS){if(47===s.charCodeAt(d+D))return s.slice(d+D+1);if(0===D)return s.slice(d+D)}else f>S&&(47===M.charCodeAt(g+D)?_=D:0===D&&(_=0));break}var P=M.charCodeAt(g+D);if(P!==s.charCodeAt(d+D))break;47===P&&(_=D)}var C="";for(D=g+_+1;D<=y;++D)(D===y||47===M.charCodeAt(D))&&(0===C.length?C+="..":C+="/..");return C.length>0?C+s.slice(d+_):(d+=_,47===s.charCodeAt(d)&&++d,s.slice(d))},_makeLong:function(M){return M},dirname:function(M){if(n(M),0===M.length)return".";for(var s=M.charCodeAt(0),g=47===s,y=-1,f=!0,d=M.length-1;d>=1;--d)if(47===(s=M.charCodeAt(d))){if(!f){y=d;break}}else f=!1;return-1===y?g?"/":".":g&&1===y?"//":M.slice(0,y)},basename:function(M,s){if(void 0!==s&&"string"!=typeof s)throw new TypeError('"ext" argument must be a string');n(M);var d,g=0,y=-1,f=!0;if(void 0!==s&&s.length>0&&s.length<=M.length){if(s.length===M.length&&s===M)return"";var p=s.length-1,m=-1;for(d=M.length-1;d>=0;--d){var S=M.charCodeAt(d);if(47===S){if(!f){g=d+1;break}}else-1===m&&(f=!1,m=d+1),p>=0&&(S===s.charCodeAt(p)?-1==--p&&(y=d):(p=-1,y=m))}return g===y?y=m:-1===y&&(y=M.length),M.slice(g,y)}for(d=M.length-1;d>=0;--d)if(47===M.charCodeAt(d)){if(!f){g=d+1;break}}else-1===y&&(f=!1,y=d+1);return-1===y?"":M.slice(g,y)},extname:function(M){n(M);for(var s=-1,g=0,y=-1,f=!0,d=0,p=M.length-1;p>=0;--p){var m=M.charCodeAt(p);if(47!==m)-1===y&&(f=!1,y=p+1),46===m?-1===s?s=p:1!==d&&(d=1):-1!==s&&(d=-1);else if(!f){g=p+1;break}}return-1===s||-1===y||0===d||1===d&&s===y-1&&s===g+1?"":M.slice(s,y)},format:function(M){if(null===M||"object"!=typeof M)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof M);return function l(E,M){var s=M.dir||M.root,g=M.base||(M.name||"")+(M.ext||"");return s?s===M.root?s+g:s+E+g:g}("/",M)},parse:function(M){n(M);var s={root:"",dir:"",base:"",ext:"",name:""};if(0===M.length)return s;var f,g=M.charCodeAt(0),y=47===g;y?(s.root="/",f=1):f=0;for(var d=-1,p=0,m=-1,S=!0,_=M.length-1,D=0;_>=f;--_)if(47!==(g=M.charCodeAt(_)))-1===m&&(S=!1,m=_+1),46===g?-1===d?d=_:1!==D&&(D=1):-1!==d&&(D=-1);else if(!S){p=_+1;break}return-1===d||-1===m||0===D||1===D&&d===m-1&&d===p+1?-1!==m&&(s.base=s.name=0===p&&y?M.slice(1,m):M.slice(p,m)):(0===p&&y?(s.name=M.slice(1,d),s.base=M.slice(1,m)):(s.name=M.slice(p,d),s.base=M.slice(p,m)),s.ext=M.slice(d,m)),p>0?s.dir=M.slice(0,p-1):y&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};v.posix=v,q.exports=v},99357:(q,n,u)=>{n.pbkdf2=u(90415),n.pbkdf2Sync=u(77472)},90415:(q,n,u)=>{var g,m,l=u(73502).Buffer,v=u(62697),E=u(78867),M=u(77472),s=u(94566),y=global.crypto&&global.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},d=[];function S(){return m||(m=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function _(P,x,C,N,k){return y.importKey("raw",P,{name:"PBKDF2"},!1,["deriveBits"]).then(function(U){return y.deriveBits({name:"PBKDF2",salt:x,iterations:C,hash:{name:k}},U,N<<3)}).then(function(U){return l.from(U)})}q.exports=function(P,x,C,N,k,U){"function"==typeof k&&(U=k,k=void 0);var z=f[(k=k||"sha1").toLowerCase()];if(z&&"function"==typeof global.Promise){if(v(C,N),P=s(P,E,"Password"),x=s(x,E,"Salt"),"function"!=typeof U)throw new Error("No callback provided to pbkdf2");!function D(P,x){P.then(function(C){S()(function(){x(null,C)})},function(C){S()(function(){x(C)})})}(function p(P){if(global.process&&!global.process.browser||!y||!y.importKey||!y.deriveBits)return Promise.resolve(!1);if(void 0!==d[P])return d[P];var x=_(g=g||l.alloc(8),g,10,128,P).then(function(){return!0}).catch(function(){return!1});return d[P]=x,x}(z).then(function(Y){return Y?_(P,x,C,N,z):M(P,x,C,N,k)}),U)}else S()(function(){var Y;try{Y=M(P,x,C,N,k)}catch(G){return U(G)}U(null,Y)})}},78867:q=>{var n;if(global.process&&global.process.browser)n="utf-8";else if(global.process&&global.process.version){n=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";q.exports=n},62697:q=>{var n=Math.pow(2,30)-1;q.exports=function(u,l){if("number"!=typeof u)throw new TypeError("Iterations not a number");if(u<0)throw new TypeError("Bad iterations");if("number"!=typeof l)throw new TypeError("Key length not a number");if(l<0||l>n||l!=l)throw new TypeError("Bad key length")}},77472:(q,n,u)=>{var l=u(55640),v=u(75634),E=u(95244),M=u(73502).Buffer,s=u(62697),g=u(78867),y=u(94566),f=M.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(_,D,P){var x=function m(_){function D(x){return E(_).update(x).digest()}function P(x){return(new v).update(x).digest()}return"rmd160"===_||"ripemd160"===_?P:"md5"===_?l:D}(_),C="sha512"===_||"sha384"===_?128:64;D.length>C?D=x(D):D.length{var l=u(73502).Buffer;q.exports=function(v,E,M){if(l.isBuffer(v))return v;if("string"==typeof v)return l.from(v,E);if(ArrayBuffer.isView(v))return l.from(v.buffer);throw new TypeError(M+" must be a string, a Buffer, a typed array or a DataView")}},13846:q=>{"use strict";q.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},95857:q=>{"use strict";typeof process>"u"||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?q.exports={nextTick:function n(u,l,v,E){if("function"!=typeof u)throw new TypeError('"callback" argument must be a function');var s,g,M=arguments.length;switch(M){case 0:case 1:return process.nextTick(u);case 2:return process.nextTick(function(){u.call(null,l)});case 3:return process.nextTick(function(){u.call(null,l,v)});case 4:return process.nextTick(function(){u.call(null,l,v,E)});default:for(s=new Array(M-1),g=0;g-1};return{enumerable:g("enumerable"),configurable:g("configurable"),writable:g("writable"),value:v}}(M,s),"object"==typeof E){for(g in E)Object.hasOwnProperty.call(E,g)&&(s.value=E[g],n(v,g,s));return v}return n(v,E,s)}},q.exports?q.exports=l():u.prr=l()},63701:(q,n,u)=>{n.publicEncrypt=u(16562),n.privateDecrypt=u(36705),n.privateEncrypt=function(v,E){return n.publicEncrypt(v,E,!0)},n.publicDecrypt=function(v,E){return n.privateDecrypt(v,E,!0)}},86945:(q,n,u)=>{var l=u(96386),v=u(73502).Buffer;function E(M){var s=v.allocUnsafe(4);return s.writeUInt32BE(M,0),s}q.exports=function(M,s){for(var f,g=v.alloc(0),y=0;g.length=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function f(T,o,h){var w=y(T,h);return h-1>=o&&(w|=y(T,h-1)<<4),w}function d(T,o,h,w){for(var I=0,R=Math.min(T.length,h),V=o;V=49?H-49+10:H>=17?H-17+10:H}return I}s.isBN=function(o){return o instanceof s||null!==o&&"object"==typeof o&&o.constructor.wordSize===s.wordSize&&Array.isArray(o.words)},s.max=function(o,h){return o.cmp(h)>0?o:h},s.min=function(o,h){return o.cmp(h)<0?o:h},s.prototype._init=function(o,h,w){if("number"==typeof o)return this._initNumber(o,h,w);if("object"==typeof o)return this._initArray(o,h,w);"hex"===h&&(h=16),E(h===(0|h)&&h>=2&&h<=36);var I=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(I++,this.negative=1),I=0;I-=3)V=o[I]|o[I-1]<<8|o[I-2]<<16,this.words[R]|=V<>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);else if("le"===w)for(I=0,R=0;I>>26-H&67108863,(H+=24)>=26&&(H-=26,R++);return this.strip()},s.prototype._parseHex=function(o,h,w){this.length=Math.ceil((o.length-h)/6),this.words=new Array(this.length);for(var I=0;I=h;I-=2)H=f(o,h,I)<=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;else for(I=(o.length-h)%2==0?h+1:h;I=18?(R-=18,V+=1,this.words[V]|=H>>>26):R+=8;this.strip()},s.prototype._parseBase=function(o,h,w){this.words=[0],this.length=1;for(var I=0,R=1;R<=67108863;R*=h)I++;I--,R=R/h|0;for(var V=o.length-w,H=V%I,L=Math.min(V,V-H)+w,b=0,B=w;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var p=["","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"],m=[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],S=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function D(T,o,h){h.negative=o.negative^T.negative;var w=T.length+o.length|0;h.length=w,w=w-1|0;var I=0|T.words[0],R=0|o.words[0],V=I*R,H=67108863&V,L=V/67108864|0;h.words[0]=H;for(var b=1;b>>26,re=67108863&L,ne=Math.min(b,o.length-1),te=Math.max(0,b-T.length+1);te<=ne;te++){var ae=b-te|0;B+=(V=(I=0|T.words[ae])*(R=0|o.words[te])+re)/67108864|0,re=67108863&V}h.words[b]=0|re,L=0|B}return 0!==L?h.words[b]=0|L:h.length--,h.strip()}s.prototype.toString=function(o,h){var w;if(h=0|h||1,16===(o=o||10)||"hex"===o){w="";for(var I=0,R=0,V=0;V>>24-I&16777215)||V!==this.length-1?p[6-L.length]+L+w:L+w,(I+=2)>=26&&(I-=26,V--)}for(0!==R&&(w=R.toString(16)+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}if(o===(0|o)&&o>=2&&o<=36){var b=m[o],B=S[o];w="";var re=this.clone();for(re.negative=0;!re.isZero();){var ne=re.modn(B).toString(o);w=(re=re.idivn(B)).isZero()?ne+w:p[b-ne.length]+ne+w}for(this.isZero()&&(w="0"+w);w.length%h!=0;)w="0"+w;return 0!==this.negative&&(w="-"+w),w}E(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(o,h){return E(typeof g<"u"),this.toArrayLike(g,o,h)},s.prototype.toArray=function(o,h){return this.toArrayLike(Array,o,h)},s.prototype.toArrayLike=function(o,h,w){var I=this.byteLength(),R=w||Math.max(1,I);E(I<=R,"byte array longer than desired length"),E(R>0,"Requested array length <= 0"),this.strip();var L,b,V="le"===h,H=new o(R),B=this.clone();if(V){for(b=0;!B.isZero();b++)L=B.andln(255),B.iushrn(8),H[b]=L;for(;b=4096&&(w+=13,h>>>=13),h>=64&&(w+=7,h>>>=7),h>=8&&(w+=4,h>>>=4),h>=2&&(w+=2,h>>>=2),w+h},s.prototype._zeroBits=function(o){if(0===o)return 26;var h=o,w=0;return 8191&h||(w+=13,h>>>=13),127&h||(w+=7,h>>>=7),15&h||(w+=4,h>>>=4),3&h||(w+=2,h>>>=2),1&h||w++,w},s.prototype.bitLength=function(){var o=this.words[this.length-1],h=this._countBits(o);return 26*(this.length-1)+h},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,h=0;ho.length?this.clone().ior(o):o.clone().ior(this)},s.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},s.prototype.iuand=function(o){var h;h=this.length>o.length?o:this;for(var w=0;wo.length?this.clone().iand(o):o.clone().iand(this)},s.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},s.prototype.iuxor=function(o){var h,w;this.length>o.length?(h=this,w=o):(h=o,w=this);for(var I=0;Io.length?this.clone().ixor(o):o.clone().ixor(this)},s.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},s.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var h=0|Math.ceil(o/26),w=o%26;this._expand(h),w>0&&h--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-w),this.strip()},s.prototype.notn=function(o){return this.clone().inotn(o)},s.prototype.setn=function(o,h){E("number"==typeof o&&o>=0);var w=o/26|0,I=o%26;return this._expand(w+1),this.words[w]=h?this.words[w]|1<o.length?(w=this,I=o):(w=o,I=this);for(var R=0,V=0;V>>26;for(;0!==R&&V>>26;if(this.length=w.length,0!==R)this.words[this.length]=R,this.length++;else if(w!==this)for(;Vo.length?this.clone().iadd(o):o.clone().iadd(this)},s.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var h=this.iadd(o);return o.negative=1,h._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var I,R,w=this.cmp(o);if(0===w)return this.negative=0,this.length=1,this.words[0]=0,this;w>0?(I=this,R=o):(I=o,R=this);for(var V=0,H=0;H>26,this.words[H]=67108863&h;for(;0!==V&&H>26,this.words[H]=67108863&h;if(0===V&&H>>13,ae=0|I[1],ge=8191&ae,pe=ae>>>13,we=0|I[2],ce=8191&we,le=we>>>13,ue=0|I[3],fe=8191&ue,he=ue>>>13,Ae=0|I[4],Pe=8191&Ae,Re=Ae>>>13,ot=0|I[5],nt=8191&ot,Ye=ot>>>13,It=0|I[6],st=8191&It,He=It>>>13,ze=0|I[7],Be=8191&ze,Ze=ze>>>13,ut=0|I[8],Me=8191&ut,ve=ut>>>13,xe=0|I[9],je=8191&xe,Ge=xe>>>13,Qe=0|R[0],ye=8191&Qe,ke=Qe>>>13,et=0|R[1],qe=8191&et,at=et>>>13,bt=0|R[2],pt=8191&bt,xt=bt>>>13,kn=0|R[3],Nt=8191&kn,Ot=kn>>>13,Mn=0|R[4],Tt=8191&Mn,Pt=Mn>>>13,Hn=0|R[5],Bt=8191&Hn,Kt=Hn>>>13,dr=0|R[6],Rt=8191&dr,Ut=dr>>>13,Te=0|R[7],Se=8191&Te,Oe=Te>>>13,_e=0|R[8],Le=8191&_e,Xe=_e>>>13,At=0|R[9],dt=8191&At,gt=At>>>13;w.negative=o.negative^h.negative,w.length=19;var nn=(H+(L=Math.imul(ne,ye))|0)+((8191&(b=(b=Math.imul(ne,ke))+Math.imul(te,ye)|0))<<13)|0;H=((B=Math.imul(te,ke))+(b>>>13)|0)+(nn>>>26)|0,nn&=67108863,L=Math.imul(ge,ye),b=(b=Math.imul(ge,ke))+Math.imul(pe,ye)|0,B=Math.imul(pe,ke);var Wt=(H+(L=L+Math.imul(ne,qe)|0)|0)+((8191&(b=(b=b+Math.imul(ne,at)|0)+Math.imul(te,qe)|0))<<13)|0;H=((B=B+Math.imul(te,at)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ce,ye),b=(b=Math.imul(ce,ke))+Math.imul(le,ye)|0,B=Math.imul(le,ke),L=L+Math.imul(ge,qe)|0,b=(b=b+Math.imul(ge,at)|0)+Math.imul(pe,qe)|0,B=B+Math.imul(pe,at)|0;var hn=(H+(L=L+Math.imul(ne,pt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,xt)|0)+Math.imul(te,pt)|0))<<13)|0;H=((B=B+Math.imul(te,xt)|0)+(b>>>13)|0)+(hn>>>26)|0,hn&=67108863,L=Math.imul(fe,ye),b=(b=Math.imul(fe,ke))+Math.imul(he,ye)|0,B=Math.imul(he,ke),L=L+Math.imul(ce,qe)|0,b=(b=b+Math.imul(ce,at)|0)+Math.imul(le,qe)|0,B=B+Math.imul(le,at)|0,L=L+Math.imul(ge,pt)|0,b=(b=b+Math.imul(ge,xt)|0)+Math.imul(pe,pt)|0,B=B+Math.imul(pe,xt)|0;var rn=(H+(L=L+Math.imul(ne,Nt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ot)|0)+Math.imul(te,Nt)|0))<<13)|0;H=((B=B+Math.imul(te,Ot)|0)+(b>>>13)|0)+(rn>>>26)|0,rn&=67108863,L=Math.imul(Pe,ye),b=(b=Math.imul(Pe,ke))+Math.imul(Re,ye)|0,B=Math.imul(Re,ke),L=L+Math.imul(fe,qe)|0,b=(b=b+Math.imul(fe,at)|0)+Math.imul(he,qe)|0,B=B+Math.imul(he,at)|0,L=L+Math.imul(ce,pt)|0,b=(b=b+Math.imul(ce,xt)|0)+Math.imul(le,pt)|0,B=B+Math.imul(le,xt)|0,L=L+Math.imul(ge,Nt)|0,b=(b=b+Math.imul(ge,Ot)|0)+Math.imul(pe,Nt)|0,B=B+Math.imul(pe,Ot)|0;var gn=(H+(L=L+Math.imul(ne,Tt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Pt)|0)+Math.imul(te,Tt)|0))<<13)|0;H=((B=B+Math.imul(te,Pt)|0)+(b>>>13)|0)+(gn>>>26)|0,gn&=67108863,L=Math.imul(nt,ye),b=(b=Math.imul(nt,ke))+Math.imul(Ye,ye)|0,B=Math.imul(Ye,ke),L=L+Math.imul(Pe,qe)|0,b=(b=b+Math.imul(Pe,at)|0)+Math.imul(Re,qe)|0,B=B+Math.imul(Re,at)|0,L=L+Math.imul(fe,pt)|0,b=(b=b+Math.imul(fe,xt)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,xt)|0,L=L+Math.imul(ce,Nt)|0,b=(b=b+Math.imul(ce,Ot)|0)+Math.imul(le,Nt)|0,B=B+Math.imul(le,Ot)|0,L=L+Math.imul(ge,Tt)|0,b=(b=b+Math.imul(ge,Pt)|0)+Math.imul(pe,Tt)|0,B=B+Math.imul(pe,Pt)|0;var on=(H+(L=L+Math.imul(ne,Bt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Kt)|0)+Math.imul(te,Bt)|0))<<13)|0;H=((B=B+Math.imul(te,Kt)|0)+(b>>>13)|0)+(on>>>26)|0,on&=67108863,L=Math.imul(st,ye),b=(b=Math.imul(st,ke))+Math.imul(He,ye)|0,B=Math.imul(He,ke),L=L+Math.imul(nt,qe)|0,b=(b=b+Math.imul(nt,at)|0)+Math.imul(Ye,qe)|0,B=B+Math.imul(Ye,at)|0,L=L+Math.imul(Pe,pt)|0,b=(b=b+Math.imul(Pe,xt)|0)+Math.imul(Re,pt)|0,B=B+Math.imul(Re,xt)|0,L=L+Math.imul(fe,Nt)|0,b=(b=b+Math.imul(fe,Ot)|0)+Math.imul(he,Nt)|0,B=B+Math.imul(he,Ot)|0,L=L+Math.imul(ce,Tt)|0,b=(b=b+Math.imul(ce,Pt)|0)+Math.imul(le,Tt)|0,B=B+Math.imul(le,Pt)|0,L=L+Math.imul(ge,Bt)|0,b=(b=b+Math.imul(ge,Kt)|0)+Math.imul(pe,Bt)|0,B=B+Math.imul(pe,Kt)|0;var An=(H+(L=L+Math.imul(ne,Rt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Ut)|0)+Math.imul(te,Rt)|0))<<13)|0;H=((B=B+Math.imul(te,Ut)|0)+(b>>>13)|0)+(An>>>26)|0,An&=67108863,L=Math.imul(Be,ye),b=(b=Math.imul(Be,ke))+Math.imul(Ze,ye)|0,B=Math.imul(Ze,ke),L=L+Math.imul(st,qe)|0,b=(b=b+Math.imul(st,at)|0)+Math.imul(He,qe)|0,B=B+Math.imul(He,at)|0,L=L+Math.imul(nt,pt)|0,b=(b=b+Math.imul(nt,xt)|0)+Math.imul(Ye,pt)|0,B=B+Math.imul(Ye,xt)|0,L=L+Math.imul(Pe,Nt)|0,b=(b=b+Math.imul(Pe,Ot)|0)+Math.imul(Re,Nt)|0,B=B+Math.imul(Re,Ot)|0,L=L+Math.imul(fe,Tt)|0,b=(b=b+Math.imul(fe,Pt)|0)+Math.imul(he,Tt)|0,B=B+Math.imul(he,Pt)|0,L=L+Math.imul(ce,Bt)|0,b=(b=b+Math.imul(ce,Kt)|0)+Math.imul(le,Bt)|0,B=B+Math.imul(le,Kt)|0,L=L+Math.imul(ge,Rt)|0,b=(b=b+Math.imul(ge,Ut)|0)+Math.imul(pe,Rt)|0,B=B+Math.imul(pe,Ut)|0;var mn=(H+(L=L+Math.imul(ne,Se)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Oe)|0)+Math.imul(te,Se)|0))<<13)|0;H=((B=B+Math.imul(te,Oe)|0)+(b>>>13)|0)+(mn>>>26)|0,mn&=67108863,L=Math.imul(Me,ye),b=(b=Math.imul(Me,ke))+Math.imul(ve,ye)|0,B=Math.imul(ve,ke),L=L+Math.imul(Be,qe)|0,b=(b=b+Math.imul(Be,at)|0)+Math.imul(Ze,qe)|0,B=B+Math.imul(Ze,at)|0,L=L+Math.imul(st,pt)|0,b=(b=b+Math.imul(st,xt)|0)+Math.imul(He,pt)|0,B=B+Math.imul(He,xt)|0,L=L+Math.imul(nt,Nt)|0,b=(b=b+Math.imul(nt,Ot)|0)+Math.imul(Ye,Nt)|0,B=B+Math.imul(Ye,Ot)|0,L=L+Math.imul(Pe,Tt)|0,b=(b=b+Math.imul(Pe,Pt)|0)+Math.imul(Re,Tt)|0,B=B+Math.imul(Re,Pt)|0,L=L+Math.imul(fe,Bt)|0,b=(b=b+Math.imul(fe,Kt)|0)+Math.imul(he,Bt)|0,B=B+Math.imul(he,Kt)|0,L=L+Math.imul(ce,Rt)|0,b=(b=b+Math.imul(ce,Ut)|0)+Math.imul(le,Rt)|0,B=B+Math.imul(le,Ut)|0,L=L+Math.imul(ge,Se)|0,b=(b=b+Math.imul(ge,Oe)|0)+Math.imul(pe,Se)|0,B=B+Math.imul(pe,Oe)|0;var On=(H+(L=L+Math.imul(ne,Le)|0)|0)+((8191&(b=(b=b+Math.imul(ne,Xe)|0)+Math.imul(te,Le)|0))<<13)|0;H=((B=B+Math.imul(te,Xe)|0)+(b>>>13)|0)+(On>>>26)|0,On&=67108863,L=Math.imul(je,ye),b=(b=Math.imul(je,ke))+Math.imul(Ge,ye)|0,B=Math.imul(Ge,ke),L=L+Math.imul(Me,qe)|0,b=(b=b+Math.imul(Me,at)|0)+Math.imul(ve,qe)|0,B=B+Math.imul(ve,at)|0,L=L+Math.imul(Be,pt)|0,b=(b=b+Math.imul(Be,xt)|0)+Math.imul(Ze,pt)|0,B=B+Math.imul(Ze,xt)|0,L=L+Math.imul(st,Nt)|0,b=(b=b+Math.imul(st,Ot)|0)+Math.imul(He,Nt)|0,B=B+Math.imul(He,Ot)|0,L=L+Math.imul(nt,Tt)|0,b=(b=b+Math.imul(nt,Pt)|0)+Math.imul(Ye,Tt)|0,B=B+Math.imul(Ye,Pt)|0,L=L+Math.imul(Pe,Bt)|0,b=(b=b+Math.imul(Pe,Kt)|0)+Math.imul(Re,Bt)|0,B=B+Math.imul(Re,Kt)|0,L=L+Math.imul(fe,Rt)|0,b=(b=b+Math.imul(fe,Ut)|0)+Math.imul(he,Rt)|0,B=B+Math.imul(he,Ut)|0,L=L+Math.imul(ce,Se)|0,b=(b=b+Math.imul(ce,Oe)|0)+Math.imul(le,Se)|0,B=B+Math.imul(le,Oe)|0,L=L+Math.imul(ge,Le)|0,b=(b=b+Math.imul(ge,Xe)|0)+Math.imul(pe,Le)|0,B=B+Math.imul(pe,Xe)|0;var Cn=(H+(L=L+Math.imul(ne,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ne,gt)|0)+Math.imul(te,dt)|0))<<13)|0;H=((B=B+Math.imul(te,gt)|0)+(b>>>13)|0)+(Cn>>>26)|0,Cn&=67108863,L=Math.imul(je,qe),b=(b=Math.imul(je,at))+Math.imul(Ge,qe)|0,B=Math.imul(Ge,at),L=L+Math.imul(Me,pt)|0,b=(b=b+Math.imul(Me,xt)|0)+Math.imul(ve,pt)|0,B=B+Math.imul(ve,xt)|0,L=L+Math.imul(Be,Nt)|0,b=(b=b+Math.imul(Be,Ot)|0)+Math.imul(Ze,Nt)|0,B=B+Math.imul(Ze,Ot)|0,L=L+Math.imul(st,Tt)|0,b=(b=b+Math.imul(st,Pt)|0)+Math.imul(He,Tt)|0,B=B+Math.imul(He,Pt)|0,L=L+Math.imul(nt,Bt)|0,b=(b=b+Math.imul(nt,Kt)|0)+Math.imul(Ye,Bt)|0,B=B+Math.imul(Ye,Kt)|0,L=L+Math.imul(Pe,Rt)|0,b=(b=b+Math.imul(Pe,Ut)|0)+Math.imul(Re,Rt)|0,B=B+Math.imul(Re,Ut)|0,L=L+Math.imul(fe,Se)|0,b=(b=b+Math.imul(fe,Oe)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,Oe)|0,L=L+Math.imul(ce,Le)|0,b=(b=b+Math.imul(ce,Xe)|0)+Math.imul(le,Le)|0,B=B+Math.imul(le,Xe)|0;var yn=(H+(L=L+Math.imul(ge,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ge,gt)|0)+Math.imul(pe,dt)|0))<<13)|0;H=((B=B+Math.imul(pe,gt)|0)+(b>>>13)|0)+(yn>>>26)|0,yn&=67108863,L=Math.imul(je,pt),b=(b=Math.imul(je,xt))+Math.imul(Ge,pt)|0,B=Math.imul(Ge,xt),L=L+Math.imul(Me,Nt)|0,b=(b=b+Math.imul(Me,Ot)|0)+Math.imul(ve,Nt)|0,B=B+Math.imul(ve,Ot)|0,L=L+Math.imul(Be,Tt)|0,b=(b=b+Math.imul(Be,Pt)|0)+Math.imul(Ze,Tt)|0,B=B+Math.imul(Ze,Pt)|0,L=L+Math.imul(st,Bt)|0,b=(b=b+Math.imul(st,Kt)|0)+Math.imul(He,Bt)|0,B=B+Math.imul(He,Kt)|0,L=L+Math.imul(nt,Rt)|0,b=(b=b+Math.imul(nt,Ut)|0)+Math.imul(Ye,Rt)|0,B=B+Math.imul(Ye,Ut)|0,L=L+Math.imul(Pe,Se)|0,b=(b=b+Math.imul(Pe,Oe)|0)+Math.imul(Re,Se)|0,B=B+Math.imul(Re,Oe)|0,L=L+Math.imul(fe,Le)|0,b=(b=b+Math.imul(fe,Xe)|0)+Math.imul(he,Le)|0,B=B+Math.imul(he,Xe)|0;var en=(H+(L=L+Math.imul(ce,dt)|0)|0)+((8191&(b=(b=b+Math.imul(ce,gt)|0)+Math.imul(le,dt)|0))<<13)|0;H=((B=B+Math.imul(le,gt)|0)+(b>>>13)|0)+(en>>>26)|0,en&=67108863,L=Math.imul(je,Nt),b=(b=Math.imul(je,Ot))+Math.imul(Ge,Nt)|0,B=Math.imul(Ge,Ot),L=L+Math.imul(Me,Tt)|0,b=(b=b+Math.imul(Me,Pt)|0)+Math.imul(ve,Tt)|0,B=B+Math.imul(ve,Pt)|0,L=L+Math.imul(Be,Bt)|0,b=(b=b+Math.imul(Be,Kt)|0)+Math.imul(Ze,Bt)|0,B=B+Math.imul(Ze,Kt)|0,L=L+Math.imul(st,Rt)|0,b=(b=b+Math.imul(st,Ut)|0)+Math.imul(He,Rt)|0,B=B+Math.imul(He,Ut)|0,L=L+Math.imul(nt,Se)|0,b=(b=b+Math.imul(nt,Oe)|0)+Math.imul(Ye,Se)|0,B=B+Math.imul(Ye,Oe)|0,L=L+Math.imul(Pe,Le)|0,b=(b=b+Math.imul(Pe,Xe)|0)+Math.imul(Re,Le)|0,B=B+Math.imul(Re,Xe)|0;var wn=(H+(L=L+Math.imul(fe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(fe,gt)|0)+Math.imul(he,dt)|0))<<13)|0;H=((B=B+Math.imul(he,gt)|0)+(b>>>13)|0)+(wn>>>26)|0,wn&=67108863,L=Math.imul(je,Tt),b=(b=Math.imul(je,Pt))+Math.imul(Ge,Tt)|0,B=Math.imul(Ge,Pt),L=L+Math.imul(Me,Bt)|0,b=(b=b+Math.imul(Me,Kt)|0)+Math.imul(ve,Bt)|0,B=B+Math.imul(ve,Kt)|0,L=L+Math.imul(Be,Rt)|0,b=(b=b+Math.imul(Be,Ut)|0)+Math.imul(Ze,Rt)|0,B=B+Math.imul(Ze,Ut)|0,L=L+Math.imul(st,Se)|0,b=(b=b+Math.imul(st,Oe)|0)+Math.imul(He,Se)|0,B=B+Math.imul(He,Oe)|0,L=L+Math.imul(nt,Le)|0,b=(b=b+Math.imul(nt,Xe)|0)+Math.imul(Ye,Le)|0,B=B+Math.imul(Ye,Xe)|0;var ln=(H+(L=L+Math.imul(Pe,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Pe,gt)|0)+Math.imul(Re,dt)|0))<<13)|0;H=((B=B+Math.imul(Re,gt)|0)+(b>>>13)|0)+(ln>>>26)|0,ln&=67108863,L=Math.imul(je,Bt),b=(b=Math.imul(je,Kt))+Math.imul(Ge,Bt)|0,B=Math.imul(Ge,Kt),L=L+Math.imul(Me,Rt)|0,b=(b=b+Math.imul(Me,Ut)|0)+Math.imul(ve,Rt)|0,B=B+Math.imul(ve,Ut)|0,L=L+Math.imul(Be,Se)|0,b=(b=b+Math.imul(Be,Oe)|0)+Math.imul(Ze,Se)|0,B=B+Math.imul(Ze,Oe)|0,L=L+Math.imul(st,Le)|0,b=(b=b+Math.imul(st,Xe)|0)+Math.imul(He,Le)|0,B=B+Math.imul(He,Xe)|0;var cn=(H+(L=L+Math.imul(nt,dt)|0)|0)+((8191&(b=(b=b+Math.imul(nt,gt)|0)+Math.imul(Ye,dt)|0))<<13)|0;H=((B=B+Math.imul(Ye,gt)|0)+(b>>>13)|0)+(cn>>>26)|0,cn&=67108863,L=Math.imul(je,Rt),b=(b=Math.imul(je,Ut))+Math.imul(Ge,Rt)|0,B=Math.imul(Ge,Ut),L=L+Math.imul(Me,Se)|0,b=(b=b+Math.imul(Me,Oe)|0)+Math.imul(ve,Se)|0,B=B+Math.imul(ve,Oe)|0,L=L+Math.imul(Be,Le)|0,b=(b=b+Math.imul(Be,Xe)|0)+Math.imul(Ze,Le)|0,B=B+Math.imul(Ze,Xe)|0;var Sn=(H+(L=L+Math.imul(st,dt)|0)|0)+((8191&(b=(b=b+Math.imul(st,gt)|0)+Math.imul(He,dt)|0))<<13)|0;H=((B=B+Math.imul(He,gt)|0)+(b>>>13)|0)+(Sn>>>26)|0,Sn&=67108863,L=Math.imul(je,Se),b=(b=Math.imul(je,Oe))+Math.imul(Ge,Se)|0,B=Math.imul(Ge,Oe),L=L+Math.imul(Me,Le)|0,b=(b=b+Math.imul(Me,Xe)|0)+Math.imul(ve,Le)|0,B=B+Math.imul(ve,Xe)|0;var fn=(H+(L=L+Math.imul(Be,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Be,gt)|0)+Math.imul(Ze,dt)|0))<<13)|0;H=((B=B+Math.imul(Ze,gt)|0)+(b>>>13)|0)+(fn>>>26)|0,fn&=67108863,L=Math.imul(je,Le),b=(b=Math.imul(je,Xe))+Math.imul(Ge,Le)|0,B=Math.imul(Ge,Xe);var Ft=(H+(L=L+Math.imul(Me,dt)|0)|0)+((8191&(b=(b=b+Math.imul(Me,gt)|0)+Math.imul(ve,dt)|0))<<13)|0;H=((B=B+Math.imul(ve,gt)|0)+(b>>>13)|0)+(Ft>>>26)|0,Ft&=67108863;var jt=(H+(L=Math.imul(je,dt))|0)+((8191&(b=(b=Math.imul(je,gt))+Math.imul(Ge,dt)|0))<<13)|0;return H=((B=Math.imul(Ge,gt))+(b>>>13)|0)+(jt>>>26)|0,jt&=67108863,V[0]=nn,V[1]=Wt,V[2]=hn,V[3]=rn,V[4]=gn,V[5]=on,V[6]=An,V[7]=mn,V[8]=On,V[9]=Cn,V[10]=yn,V[11]=en,V[12]=wn,V[13]=ln,V[14]=cn,V[15]=Sn,V[16]=fn,V[17]=Ft,V[18]=jt,0!==H&&(V[19]=H,w.length++),w};function C(T,o,h){return(new N).mulp(T,o,h)}function N(T,o){this.x=T,this.y=o}Math.imul||(P=D),s.prototype.mulTo=function(o,h){var w,I=this.length+o.length;return w=10===this.length&&10===o.length?P(this,o,h):I<63?D(this,o,h):I<1024?function x(T,o,h){h.negative=o.negative^T.negative,h.length=T.length+o.length;for(var w=0,I=0,R=0;R>>26)|0)>>>26,V&=67108863}h.words[R]=H,w=V,V=I}return 0!==w?h.words[R]=w:h.length--,h.strip()}(this,o,h):C(this,o,h),w},N.prototype.makeRBT=function(o){for(var h=new Array(o),w=s.prototype._countBits(o)-1,I=0;I>=1;return I},N.prototype.permute=function(o,h,w,I,R,V){for(var H=0;H>>=1)R++;return 1<>>=13,w[2*V+1]=8191&R,R>>>=13;for(V=2*h;V>=26,h+=I/67108864|0,h+=R>>>26,this.words[w]=67108863&R}return 0!==h&&(this.words[w]=h,this.length++),this},s.prototype.muln=function(o){return this.clone().imuln(o)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(o){var h=function _(T){for(var o=new Array(T.bitLength()),h=0;h>>I}return o}(o);if(0===h.length)return new s(1);for(var w=this,I=0;I=0);var R,h=o%26,w=(o-h)/26,I=67108863>>>26-h<<26-h;if(0!==h){var V=0;for(R=0;R>>26-h}V&&(this.words[R]=V,this.length++)}if(0!==w){for(R=this.length-1;R>=0;R--)this.words[R+w]=this.words[R];for(R=0;R=0),I=h?(h-h%26)/26:0;var R=o%26,V=Math.min((o-R)/26,this.length),H=67108863^67108863>>>R<V)for(this.length-=V,b=0;b=0&&(0!==B||b>=I);b--){var re=0|this.words[b];this.words[b]=B<<26-R|re>>>R,B=re&H}return L&&0!==B&&(L.words[L.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(o,h,w){return E(0===this.negative),this.iushrn(o,h,w)},s.prototype.shln=function(o){return this.clone().ishln(o)},s.prototype.ushln=function(o){return this.clone().iushln(o)},s.prototype.shrn=function(o){return this.clone().ishrn(o)},s.prototype.ushrn=function(o){return this.clone().iushrn(o)},s.prototype.testn=function(o){E("number"==typeof o&&o>=0);var h=o%26,w=(o-h)/26,I=1<=0);var h=o%26,w=(o-h)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=w)return this;if(0!==h&&w++,this.length=Math.min(w,this.length),0!==h){var I=67108863^67108863>>>h<=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},s.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h>26)-(L/67108864|0),this.words[R+w]=67108863&V}for(;R>26,this.words[R+w]=67108863&V;if(0===H)return this.strip();for(E(-1===H),H=0,R=0;R>26,this.words[R]=67108863&V;return this.negative=1,this.strip()},s.prototype._wordDiv=function(o,h){var w=(this.length,o.length),I=this.clone(),R=o,V=0|R.words[R.length-1];0!==(w=26-this._countBits(V))&&(R=R.ushln(w),I.iushln(w),V=0|R.words[R.length-1]);var b,L=I.length-R.length;if("mod"!==h){(b=new s(null)).length=L+1,b.words=new Array(b.length);for(var B=0;B=0;ne--){var te=67108864*(0|I.words[R.length+ne])+(0|I.words[R.length+ne-1]);for(te=Math.min(te/V|0,67108863),I._ishlnsubmul(R,te,ne);0!==I.negative;)te--,I.negative=0,I._ishlnsubmul(R,1,ne),I.isZero()||(I.negative^=1);b&&(b.words[ne]=te)}return b&&b.strip(),I.strip(),"div"!==h&&0!==w&&I.iushrn(w),{div:b||null,mod:I}},s.prototype.divmod=function(o,h,w){return E(!o.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===o.negative?(V=this.neg().divmod(o,h),"mod"!==h&&(I=V.div.neg()),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.iadd(o)),{div:I,mod:R}):0===this.negative&&0!==o.negative?(V=this.divmod(o.neg(),h),"mod"!==h&&(I=V.div.neg()),{div:I,mod:V.mod}):this.negative&o.negative?(V=this.neg().divmod(o.neg(),h),"div"!==h&&(R=V.mod.neg(),w&&0!==R.negative&&R.isub(o)),{div:V.div,mod:R}):o.length>this.length||this.cmp(o)<0?{div:new s(0),mod:this}:1===o.length?"div"===h?{div:this.divn(o.words[0]),mod:null}:"mod"===h?{div:null,mod:new s(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new s(this.modn(o.words[0]))}:this._wordDiv(o,h);var I,R,V},s.prototype.div=function(o){return this.divmod(o,"div",!1).div},s.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},s.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},s.prototype.divRound=function(o){var h=this.divmod(o);if(h.mod.isZero())return h.div;var w=0!==h.div.negative?h.mod.isub(o):h.mod,I=o.ushrn(1),R=o.andln(1),V=w.cmp(I);return V<0||1===R&&0===V?h.div:0!==h.div.negative?h.div.isubn(1):h.div.iaddn(1)},s.prototype.modn=function(o){E(o<=67108863);for(var h=(1<<26)%o,w=0,I=this.length-1;I>=0;I--)w=(h*w+(0|this.words[I]))%o;return w},s.prototype.idivn=function(o){E(o<=67108863);for(var h=0,w=this.length-1;w>=0;w--){var I=(0|this.words[w])+67108864*h;this.words[w]=I/o|0,h=I%o}return this.strip()},s.prototype.divn=function(o){return this.clone().idivn(o)},s.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=new s(0),H=new s(1),L=0;h.isEven()&&w.isEven();)h.iushrn(1),w.iushrn(1),++L;for(var b=w.clone(),B=h.clone();!h.isZero();){for(var re=0,ne=1;!(h.words[0]&ne)&&re<26;++re,ne<<=1);if(re>0)for(h.iushrn(re);re-- >0;)(I.isOdd()||R.isOdd())&&(I.iadd(b),R.isub(B)),I.iushrn(1),R.iushrn(1);for(var te=0,ae=1;!(w.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(w.iushrn(te);te-- >0;)(V.isOdd()||H.isOdd())&&(V.iadd(b),H.isub(B)),V.iushrn(1),H.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(V),R.isub(H)):(w.isub(h),V.isub(I),H.isub(R))}return{a:V,b:H,gcd:w.iushln(L)}},s.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var re,h=this,w=o.clone();h=0!==h.negative?h.umod(o):h.clone();for(var I=new s(1),R=new s(0),V=w.clone();h.cmpn(1)>0&&w.cmpn(1)>0;){for(var H=0,L=1;!(h.words[0]&L)&&H<26;++H,L<<=1);if(H>0)for(h.iushrn(H);H-- >0;)I.isOdd()&&I.iadd(V),I.iushrn(1);for(var b=0,B=1;!(w.words[0]&B)&&b<26;++b,B<<=1);if(b>0)for(w.iushrn(b);b-- >0;)R.isOdd()&&R.iadd(V),R.iushrn(1);h.cmp(w)>=0?(h.isub(w),I.isub(R)):(w.isub(h),R.isub(I))}return(re=0===h.cmpn(1)?I:R).cmpn(0)<0&&re.iadd(o),re},s.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var h=this.clone(),w=o.clone();h.negative=0,w.negative=0;for(var I=0;h.isEven()&&w.isEven();I++)h.iushrn(1),w.iushrn(1);for(;;){for(;h.isEven();)h.iushrn(1);for(;w.isEven();)w.iushrn(1);var R=h.cmp(w);if(R<0){var V=h;h=w,w=V}else if(0===R||0===w.cmpn(1))break;h.isub(w)}return w.iushln(I)},s.prototype.invm=function(o){return this.egcd(o).a.umod(o)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(o){return this.words[0]&o},s.prototype.bincn=function(o){E("number"==typeof o);var h=o%26,w=(o-h)/26,I=1<>>26,H&=67108863,this.words[V]=H}return 0!==R&&(this.words[V]=R,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(o){var w,h=o<0;if(0!==this.negative&&!h)return-1;if(0===this.negative&&h)return 1;if(this.strip(),this.length>1)w=1;else{h&&(o=-o),E(o<=67108863,"Number is too big");var I=0|this.words[0];w=I===o?0:Io.length)return 1;if(this.length=0;w--){var I=0|this.words[w],R=0|o.words[w];if(I!==R){IR&&(h=1);break}}return h},s.prototype.gtn=function(o){return 1===this.cmpn(o)},s.prototype.gt=function(o){return 1===this.cmp(o)},s.prototype.gten=function(o){return this.cmpn(o)>=0},s.prototype.gte=function(o){return this.cmp(o)>=0},s.prototype.ltn=function(o){return-1===this.cmpn(o)},s.prototype.lt=function(o){return-1===this.cmp(o)},s.prototype.lten=function(o){return this.cmpn(o)<=0},s.prototype.lte=function(o){return this.cmp(o)<=0},s.prototype.eqn=function(o){return 0===this.cmpn(o)},s.prototype.eq=function(o){return 0===this.cmp(o)},s.red=function(o){return new j(o)},s.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},s.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(o){return this.red=o,this},s.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},s.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},s.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},s.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},s.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},s.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},s.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},s.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},s.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var k={k256:null,p224:null,p192:null,p25519:null};function U(T,o){this.name=T,this.p=new s(o,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function z(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function Y(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function G(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function j(T){if("string"==typeof T){var o=s._prime(T);this.m=o.p,this.prime=o}else E(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function Z(T){j.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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)}U.prototype._tmp=function(){var o=new s(null);return o.words=new Array(Math.ceil(this.n/13)),o},U.prototype.ireduce=function(o){var w,h=o;do{this.split(h,this.tmp),w=(h=(h=this.imulK(h)).iadd(this.tmp)).bitLength()}while(w>this.n);var I=w0?h.isub(this.p):void 0!==h.strip?h.strip():h._strip(),h},U.prototype.split=function(o,h){o.iushrn(this.n,0,h)},U.prototype.imulK=function(o){return o.imul(this.k)},M(z,U),z.prototype.split=function(o,h){for(var w=4194303,I=Math.min(o.length,9),R=0;R>>22,V=H}V>>>=22,o.words[R-10]=V,0===V&&o.length>10?o.length-=10:o.length-=9},z.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var h=0,w=0;w>>=26,o.words[w]=R,h=I}return 0!==h&&(o.words[o.length++]=h),o},s._prime=function(o){if(k[o])return k[o];var h;if("k256"===o)h=new z;else if("p224"===o)h=new Y;else if("p192"===o)h=new G;else{if("p25519"!==o)throw new Error("Unknown prime "+o);h=new F}return k[o]=h,h},j.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},j.prototype._verify2=function(o,h){E(0==(o.negative|h.negative),"red works only with positives"),E(o.red&&o.red===h.red,"red works only with red numbers")},j.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},j.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},j.prototype.add=function(o,h){this._verify2(o,h);var w=o.add(h);return w.cmp(this.m)>=0&&w.isub(this.m),w._forceRed(this)},j.prototype.iadd=function(o,h){this._verify2(o,h);var w=o.iadd(h);return w.cmp(this.m)>=0&&w.isub(this.m),w},j.prototype.sub=function(o,h){this._verify2(o,h);var w=o.sub(h);return w.cmpn(0)<0&&w.iadd(this.m),w._forceRed(this)},j.prototype.isub=function(o,h){this._verify2(o,h);var w=o.isub(h);return w.cmpn(0)<0&&w.iadd(this.m),w},j.prototype.shl=function(o,h){return this._verify1(o),this.imod(o.ushln(h))},j.prototype.imul=function(o,h){return this._verify2(o,h),this.imod(o.imul(h))},j.prototype.mul=function(o,h){return this._verify2(o,h),this.imod(o.mul(h))},j.prototype.isqr=function(o){return this.imul(o,o.clone())},j.prototype.sqr=function(o){return this.mul(o,o)},j.prototype.sqrt=function(o){if(o.isZero())return o.clone();var h=this.m.andln(3);if(E(h%2==1),3===h){var w=this.m.add(new s(1)).iushrn(2);return this.pow(o,w)}for(var I=this.m.subn(1),R=0;!I.isZero()&&0===I.andln(1);)R++,I.iushrn(1);E(!I.isZero());var V=new s(1).toRed(this),H=V.redNeg(),L=this.m.subn(1).iushrn(1),b=this.m.bitLength();for(b=new s(2*b*b).toRed(this);0!==this.pow(b,L).cmp(H);)b.redIAdd(H);for(var B=this.pow(b,I),re=this.pow(o,I.addn(1).iushrn(1)),ne=this.pow(o,I),te=R;0!==ne.cmp(V);){for(var ae=ne,ge=0;0!==ae.cmp(V);ge++)ae=ae.redSqr();E(ge=0;R--){for(var B=h.words[R],re=b-1;re>=0;re--){var ne=B>>re&1;(V!==I[0]&&(V=this.sqr(V)),0!==ne||0!==H)?(H<<=1,H|=ne,(4===++L||0===R&&0===re)&&(V=this.mul(V,I[H]),L=0,H=0)):L=0}b=26}return V},j.prototype.convertTo=function(o){var h=o.umod(this.m);return h===o?h.clone():h},j.prototype.convertFrom=function(o){var h=o.clone();return h.red=null,h},s.mont=function(o){return new Z(o)},M(Z,j),Z.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Z.prototype.convertFrom=function(o){var h=this.imod(o.mul(this.rinv));return h.red=null,h},Z.prototype.imul=function(o,h){if(o.isZero()||h.isZero())return o.words[0]=0,o.length=1,o;var w=o.imul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.mul=function(o,h){if(o.isZero()||h.isZero())return new s(0)._forceRed(this);var w=o.mul(h),I=w.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),R=w.isub(I).iushrn(this.shift),V=R;return R.cmp(this.m)>=0?V=R.isub(this.m):R.cmpn(0)<0&&(V=R.iadd(this.m)),V._forceRed(this)},Z.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(q=u.nmd(q),this)},36705:(q,n,u)=>{var l=u(22772),v=u(86945),E=u(79401),M=u(82057),s=u(8466),g=u(96386),y=u(38651),f=u(73502).Buffer;q.exports=function(_,D,P){var x;x=_.padding?_.padding:P?1:4;var k,C=l(_),N=C.modulus.byteLength();if(D.length>N||new M(D).cmp(C.modulus)>=0)throw new Error("decryption error");k=P?y(new M(D),C):s(D,C);var U=f.alloc(N-k.length);if(k=f.concat([U,k],N),4===x)return function d(S,_){var D=S.modulus.byteLength(),P=g("sha1").update(f.alloc(0)).digest(),x=P.length;if(0!==_[0])throw new Error("decryption error");var C=_.slice(1,x+1),N=_.slice(x+1),k=E(C,v(N,x)),U=E(N,v(k,D-x-1));if(function m(S,_){S=f.from(S),_=f.from(_);var D=0,P=S.length;S.length!==_.length&&(D++,P=Math.min(S.length,_.length));for(var x=-1;++x=_.length){C++;break}var N=_.slice(2,x-1);if(("0002"!==P.toString("hex")&&!D||"0001"!==P.toString("hex")&&D)&&C++,N.length<8&&C++,C)throw new Error("decryption error");return _.slice(x)}(0,k,P);if(3===x)return k;throw new Error("unknown padding")}},16562:(q,n,u)=>{var l=u(22772),v=u(53753),E=u(96386),M=u(86945),s=u(79401),g=u(82057),y=u(38651),f=u(8466),d=u(73502).Buffer;q.exports=function(D,P,x){var C;C=D.padding?D.padding:x?1:4;var k,N=l(D);if(4===C)k=function p(_,D){var P=_.modulus.byteLength(),x=D.length,C=E("sha1").update(d.alloc(0)).digest(),N=C.length,k=2*N;if(x>P-k-2)throw new Error("message too long");var U=d.alloc(P-x-k-2),z=P-N-1,Y=v(N),G=s(d.concat([C,U,d.alloc(1,1),D],z),M(Y,z)),F=s(Y,M(G,N));return new g(d.concat([d.alloc(1),F,G],P))}(N,P);else if(1===C)k=function m(_,D,P){var N,x=D.length,C=_.modulus.byteLength();if(x>C-11)throw new Error("message too long");return N=P?d.alloc(C-x-3,255):function S(_){for(var N,D=d.allocUnsafe(_),P=0,x=v(2*_),C=0;P<_;)C===x.length&&(x=v(2*_),C=0),(N=x[C++])&&(D[P++]=N);return D}(C-x-3),new g(d.concat([d.from([0,P?1:2]),N,d.alloc(1),D],C))}(N,P,x);else{if(3!==C)throw new Error("unknown padding");if((k=new g(P)).cmp(N.modulus)>=0)throw new Error("data too long for modulus")}return x?f(k,N):y(k,N)}},38651:(q,n,u)=>{var l=u(82057),v=u(73502).Buffer;q.exports=function E(M,s){return v.from(M.toRed(l.mont(s.modulus)).redPow(new l(s.publicExponent)).fromRed().toArray())}},79401:q=>{q.exports=function(u,l){for(var v=u.length,E=-1;++E{const l=u(88695),v=u(71465),E=u(23210),M=u(22334);function s(g,y,f,d,p){const m=[].slice.call(arguments,1),S=m.length,_="function"==typeof m[S-1];if(!_&&!l())throw new Error("Callback required as last argument");if(!_){if(S<1)throw new Error("Too few arguments provided");return 1===S?(f=y,y=d=void 0):2===S&&!y.getContext&&(d=f,f=y,y=void 0),new Promise(function(D,P){try{const x=v.create(f,d);D(g(x,y,d))}catch(x){P(x)}})}if(S<2)throw new Error("Too few arguments provided");2===S?(p=f,f=y,y=d=void 0):3===S&&(y.getContext&&typeof p>"u"?(p=d,d=void 0):(p=d,d=f,f=y,y=void 0));try{const D=v.create(f,d);p(null,g(D,y,d))}catch(D){p(D)}}n.create=v.create,n.toCanvas=s.bind(null,E.render),n.toDataURL=s.bind(null,E.renderToDataURL),n.toString=s.bind(null,function(g,y,f){return M.render(g,f)})},88695:q=>{q.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},46221:(q,n,u)=>{const l=u(34792).getSymbolSize;n.getRowColCoords=function(E){if(1===E)return[];const M=Math.floor(E/7)+2,s=l(E),g=145===s?26:2*Math.ceil((s-13)/(2*M-2)),y=[s-7];for(let f=1;f{const l=u(64016),v=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function E(M){this.mode=l.ALPHANUMERIC,this.data=M}E.getBitsLength=function(s){return 11*Math.floor(s/2)+s%2*6},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(s){let g;for(g=0;g+2<=this.data.length;g+=2){let y=45*v.indexOf(this.data[g]);y+=v.indexOf(this.data[g+1]),s.put(y,11)}this.data.length%2&&s.put(v.indexOf(this.data[g]),6)},q.exports=E},52118:q=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(u){const l=Math.floor(u/8);return 1==(this.buffer[l]>>>7-u%8&1)},put:function(u,l){for(let v=0;v>>l-v-1&1))},getLengthInBits:function(){return this.length},putBit:function(u){const l=Math.floor(this.length/8);this.buffer.length<=l&&this.buffer.push(0),u&&(this.buffer[l]|=128>>>this.length%8),this.length++}},q.exports=n},34425:q=>{function n(u){if(!u||u<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=u,this.data=new Uint8Array(u*u),this.reservedBit=new Uint8Array(u*u)}n.prototype.set=function(u,l,v,E){const M=u*this.size+l;this.data[M]=v,E&&(this.reservedBit[M]=!0)},n.prototype.get=function(u,l){return this.data[u*this.size+l]},n.prototype.xor=function(u,l,v){this.data[u*this.size+l]^=v},n.prototype.isReserved=function(u,l){return this.reservedBit[u*this.size+l]},q.exports=n},85663:(q,n,u)=>{const l=u(38419),v=u(64016);function E(M){this.mode=v.BYTE,"string"==typeof M&&(M=l(M)),this.data=new Uint8Array(M)}E.getBitsLength=function(s){return 8*s},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(M){for(let s=0,g=this.data.length;s{const l=u(82259),v=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],E=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];n.getBlocksCount=function(s,g){switch(g){case l.L:return v[4*(s-1)+0];case l.M:return v[4*(s-1)+1];case l.Q:return v[4*(s-1)+2];case l.H:return v[4*(s-1)+3];default:return}},n.getTotalCodewordsCount=function(s,g){switch(g){case l.L:return E[4*(s-1)+0];case l.M:return E[4*(s-1)+1];case l.Q:return E[4*(s-1)+2];case l.H:return E[4*(s-1)+3];default:return}}},82259:(q,n)=>{n.L={bit:1},n.M={bit:0},n.Q={bit:3},n.H={bit:2},n.isValid=function(v){return v&&typeof v.bit<"u"&&v.bit>=0&&v.bit<4},n.from=function(v,E){if(n.isValid(v))return v;try{return function u(l){if("string"!=typeof l)throw new Error("Param is not a string");switch(l.toLowerCase()){case"l":case"low":return n.L;case"m":case"medium":return n.M;case"q":case"quartile":return n.Q;case"h":case"high":return n.H;default:throw new Error("Unknown EC Level: "+l)}}(v)}catch{return E}}},43114:(q,n,u)=>{const l=u(34792).getSymbolSize;n.getPositions=function(M){const s=l(M);return[[0,0],[s-7,0],[0,s-7]]}},17078:(q,n,u)=>{const l=u(34792),M=l.getBCHDigit(1335);n.getEncodedBits=function(g,y){const f=g.bit<<3|y;let d=f<<10;for(;l.getBCHDigit(d)-M>=0;)d^=1335<{const u=new Uint8Array(512),l=new Uint8Array(256);(function(){let E=1;for(let M=0;M<255;M++)u[M]=E,l[E]=M,E<<=1,256&E&&(E^=285);for(let M=255;M<512;M++)u[M]=u[M-255]})(),n.log=function(E){if(E<1)throw new Error("log("+E+")");return l[E]},n.exp=function(E){return u[E]},n.mul=function(E,M){return 0===E||0===M?0:u[l[E]+l[M]]}},80449:(q,n,u)=>{const l=u(64016),v=u(34792);function E(M){this.mode=l.KANJI,this.data=M}E.getBitsLength=function(s){return 13*s},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(M){let s;for(s=0;s=33088&&g<=40956)g-=33088;else{if(!(g>=57408&&g<=60351))throw new Error("Invalid SJIS character: "+this.data[s]+"\nMake sure your charset is UTF-8");g-=49472}g=192*(g>>>8&255)+(255&g),M.put(g,13)}},q.exports=E},33667:(q,n)=>{n.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const u_N1=3,u_N2=3,u_N3=40,u_N4=10;function l(v,E,M){switch(v){case n.Patterns.PATTERN000:return(E+M)%2==0;case n.Patterns.PATTERN001:return E%2==0;case n.Patterns.PATTERN010:return M%3==0;case n.Patterns.PATTERN011:return(E+M)%3==0;case n.Patterns.PATTERN100:return(Math.floor(E/2)+Math.floor(M/3))%2==0;case n.Patterns.PATTERN101:return E*M%2+E*M%3==0;case n.Patterns.PATTERN110:return(E*M%2+E*M%3)%2==0;case n.Patterns.PATTERN111:return(E*M%3+(E+M)%2)%2==0;default:throw new Error("bad maskPattern:"+v)}}n.isValid=function(E){return null!=E&&""!==E&&!isNaN(E)&&E>=0&&E<=7},n.from=function(E){return n.isValid(E)?parseInt(E,10):void 0},n.getPenaltyN1=function(E){const M=E.size;let s=0,g=0,y=0,f=null,d=null;for(let p=0;p=5&&(s+=u_N1+(g-5)),f=S,g=1),S=E.get(m,p),S===d?y++:(y>=5&&(s+=u_N1+(y-5)),d=S,y=1)}g>=5&&(s+=u_N1+(g-5)),y>=5&&(s+=u_N1+(y-5))}return s},n.getPenaltyN2=function(E){const M=E.size;let s=0;for(let g=0;g=10&&(1488===g||93===g)&&s++,y=y<<1&2047|E.get(d,f),d>=10&&(1488===y||93===y)&&s++}return s*u_N3},n.getPenaltyN4=function(E){let M=0;const s=E.data.length;for(let y=0;y{const l=u(94406),v=u(2699);n.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},n.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},n.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},n.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},n.MIXED={bit:-1},n.getCharCountIndicator=function(s,g){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!l.isValid(g))throw new Error("Invalid version: "+g);return g>=1&&g<10?s.ccBits[0]:g<27?s.ccBits[1]:s.ccBits[2]},n.getBestModeForData=function(s){return v.testNumeric(s)?n.NUMERIC:v.testAlphanumeric(s)?n.ALPHANUMERIC:v.testKanji(s)?n.KANJI:n.BYTE},n.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},n.isValid=function(s){return s&&s.bit&&s.ccBits},n.from=function(s,g){if(n.isValid(s))return s;try{return function E(M){if("string"!=typeof M)throw new Error("Param is not a string");switch(M.toLowerCase()){case"numeric":return n.NUMERIC;case"alphanumeric":return n.ALPHANUMERIC;case"kanji":return n.KANJI;case"byte":return n.BYTE;default:throw new Error("Unknown mode: "+M)}}(s)}catch{return g}}},97783:(q,n,u)=>{const l=u(64016);function v(E){this.mode=l.NUMERIC,this.data=E.toString()}v.getBitsLength=function(M){return 10*Math.floor(M/3)+(M%3?M%3*3+1:0)},v.prototype.getLength=function(){return this.data.length},v.prototype.getBitsLength=function(){return v.getBitsLength(this.data.length)},v.prototype.write=function(M){let s,g,y;for(s=0;s+3<=this.data.length;s+=3)g=this.data.substr(s,3),y=parseInt(g,10),M.put(y,10);const f=this.data.length-s;f>0&&(g=this.data.substr(s),y=parseInt(g,10),M.put(y,3*f+1))},q.exports=v},61106:(q,n,u)=>{const l=u(45339);n.mul=function(E,M){const s=new Uint8Array(E.length+M.length-1);for(let g=0;g=0;){const g=s[0];for(let f=0;f{const l=u(34792),v=u(82259),E=u(52118),M=u(34425),s=u(46221),g=u(43114),y=u(33667),f=u(14655),d=u(12636),p=u(42088),m=u(17078),S=u(64016),_=u(62033);function N(G,F,j){const Z=G.size,T=m.getEncodedBits(F,j);let o,h;for(o=0;o<15;o++)h=1==(T>>o&1),o<6?G.set(o,8,h,!0):o<8?G.set(o+1,8,h,!0):G.set(Z-15+o,8,h,!0),o<8?G.set(8,Z-o-1,h,!0):o<9?G.set(8,15-o-1+1,h,!0):G.set(8,15-o-1,h,!0);G.set(Z-8,8,1,!0)}function U(G,F,j){const Z=new E;j.forEach(function(I){Z.put(I.mode.bit,4),Z.put(I.getLength(),S.getCharCountIndicator(I.mode,G)),I.write(Z)});const h=8*(l.getSymbolTotalCodewords(G)-f.getTotalCodewordsCount(G,F));for(Z.getLengthInBits()+4<=h&&Z.put(0,4);Z.getLengthInBits()%8!=0;)Z.putBit(0);const w=(h-Z.getLengthInBits())/8;for(let I=0;I=0&&w<=6&&(0===I||6===I)||I>=0&&I<=6&&(0===w||6===w)||w>=2&&w<=4&&I>=2&&I<=4?G.set(o+w,h+I,!0,!0):G.set(o+w,h+I,!1,!0))}}(I,F),function P(G){const F=G.size;for(let j=8;j=7&&function C(G,F){const j=G.size,Z=p.getEncodedBits(F);let T,o,h;for(let w=0;w<18;w++)T=Math.floor(w/3),o=w%3+j-8-3,h=1==(Z>>w&1),G.set(T,o,h,!0),G.set(o,T,h,!0)}(I,F),function k(G,F){const j=G.size;let Z=-1,T=j-1,o=7,h=0;for(let w=j-1;w>0;w-=2)for(6===w&&w--;;){for(let I=0;I<2;I++)if(!G.isReserved(T,w-I)){let R=!1;h>>o&1)),G.set(T,w-I,R),o--,-1===o&&(h++,o=7)}if(T+=Z,T<0||j<=T){T-=Z,Z=-Z;break}}}(I,h),isNaN(Z)&&(Z=y.getBestMask(I,N.bind(null,I,j))),y.applyMask(Z,I),N(I,j,Z),{modules:I,version:F,errorCorrectionLevel:j,maskPattern:Z,segments:T}}n.create=function(F,j){if(typeof F>"u"||""===F)throw new Error("No input text");let T,o,Z=v.M;return typeof j<"u"&&(Z=v.from(j.errorCorrectionLevel,v.M),T=p.from(j.version),o=y.from(j.maskPattern),j.toSJISFunc&&l.setToSJISFunction(j.toSJISFunc)),Y(F,T,Z,o)}},12636:(q,n,u)=>{const l=u(61106);function v(E){this.genPoly=void 0,this.degree=E,this.degree&&this.initialize(this.degree)}v.prototype.initialize=function(M){this.degree=M,this.genPoly=l.generateECPolynomial(this.degree)},v.prototype.encode=function(M){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(M.length+this.degree);s.set(M);const g=l.mod(s,this.genPoly),y=this.degree-g.length;if(y>0){const f=new Uint8Array(this.degree);return f.set(g,y),f}return g},q.exports=v},2699:(q,n)=>{const u="[0-9]+";let v="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";v=v.replace(/u/g,"\\u");const E="(?:(?![A-Z0-9 $%*+\\-./:]|"+v+")(?:.|[\r\n]))+";n.KANJI=new RegExp(v,"g"),n.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),n.BYTE=new RegExp(E,"g"),n.NUMERIC=new RegExp(u,"g"),n.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const M=new RegExp("^"+v+"$"),s=new RegExp("^"+u+"$"),g=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");n.testKanji=function(f){return M.test(f)},n.testNumeric=function(f){return s.test(f)},n.testAlphanumeric=function(f){return g.test(f)}},62033:(q,n,u)=>{const l=u(64016),v=u(97783),E=u(32424),M=u(85663),s=u(80449),g=u(2699),y=u(34792),f=u(74901);function d(C){return unescape(encodeURIComponent(C)).length}function p(C,N,k){const U=[];let z;for(;null!==(z=C.exec(k));)U.push({data:z[0],index:z.index,mode:N,length:z[0].length});return U}function m(C){const N=p(g.NUMERIC,l.NUMERIC,C),k=p(g.ALPHANUMERIC,l.ALPHANUMERIC,C);let U,z;return y.isKanjiModeEnabled()?(U=p(g.BYTE,l.BYTE,C),z=p(g.KANJI,l.KANJI,C)):(U=p(g.BYTE_KANJI,l.BYTE,C),z=[]),N.concat(k,U,z).sort(function(G,F){return G.index-F.index}).map(function(G){return{data:G.data,mode:G.mode,length:G.length}})}function S(C,N){switch(N){case l.NUMERIC:return v.getBitsLength(C);case l.ALPHANUMERIC:return E.getBitsLength(C);case l.KANJI:return s.getBitsLength(C);case l.BYTE:return M.getBitsLength(C)}}function x(C,N){let k;const U=l.getBestModeForData(C);if(k=l.from(N,U),k!==l.BYTE&&k.bit=0?N[N.length-1]:null;return U&&U.mode===k.mode?(N[N.length-1].data+=k.data,N):(N.push(k),N)},[])}(F))},n.rawSplit=function(N){return n.fromArray(m(N,y.isKanjiModeEnabled()))}},34792:(q,n)=>{let u;const l=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];n.getSymbolSize=function(E){if(!E)throw new Error('"version" cannot be null or undefined');if(E<1||E>40)throw new Error('"version" should be in range from 1 to 40');return 4*E+17},n.getSymbolTotalCodewords=function(E){return l[E]},n.getBCHDigit=function(v){let E=0;for(;0!==v;)E++,v>>>=1;return E},n.setToSJISFunction=function(E){if("function"!=typeof E)throw new Error('"toSJISFunc" is not a valid function.');u=E},n.isKanjiModeEnabled=function(){return typeof u<"u"},n.toSJIS=function(E){return u(E)}},94406:(q,n)=>{n.isValid=function(l){return!isNaN(l)&&l>=1&&l<=40}},42088:(q,n,u)=>{const l=u(34792),v=u(14655),E=u(82259),M=u(64016),s=u(94406),y=l.getBCHDigit(7973);function d(S,_){return M.getCharCountIndicator(S,_)+4}function p(S,_){let D=0;return S.forEach(function(P){const x=d(P.mode,_);D+=x+P.getBitsLength()}),D}n.from=function(_,D){return s.isValid(_)?parseInt(_,10):D},n.getCapacity=function(_,D,P){if(!s.isValid(_))throw new Error("Invalid QR Code version");typeof P>"u"&&(P=M.BYTE);const N=8*(l.getSymbolTotalCodewords(_)-v.getTotalCodewordsCount(_,D));if(P===M.MIXED)return N;const k=N-d(P,_);switch(P){case M.NUMERIC:return Math.floor(k/10*3);case M.ALPHANUMERIC:return Math.floor(k/11*2);case M.KANJI:return Math.floor(k/13);case M.BYTE:default:return Math.floor(k/8)}},n.getBestVersionForData=function(_,D){let P;const x=E.from(D,E.M);if(Array.isArray(_)){if(_.length>1)return function m(S,_){for(let D=1;D<=40;D++)if(p(S,D)<=n.getCapacity(D,_,M.MIXED))return D}(_,x);if(0===_.length)return 1;P=_[0]}else P=_;return function f(S,_,D){for(let P=1;P<=40;P++)if(_<=n.getCapacity(P,D,S))return P}(P.mode,P.getLength(),x)},n.getEncodedBits=function(_){if(!s.isValid(_)||_<7)throw new Error("Invalid QR Code version");let D=_<<12;for(;l.getBCHDigit(D)-y>=0;)D^=7973<{const l=u(36355);n.render=function(s,g,y){let f=y,d=g;typeof f>"u"&&(!g||!g.getContext)&&(f=g,g=void 0),g||(d=function E(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),f=l.getOptions(f);const p=l.getImageWidth(s.modules.size,f),m=d.getContext("2d"),S=m.createImageData(p,p);return l.qrToImageData(S.data,s,f),function v(M,s,g){M.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=g,s.width=g,s.style.height=g+"px",s.style.width=g+"px"}(m,d,p),m.putImageData(S,0,0),d},n.renderToDataURL=function(s,g,y){let f=y;typeof f>"u"&&(!g||!g.getContext)&&(f=g,g=void 0),f||(f={});const d=n.render(s,g,f),p=f.type||"image/png",m=f.rendererOpts||{};return d.toDataURL(p,m.quality)}},22334:(q,n,u)=>{const l=u(36355);function v(s,g){const y=s.a/255,f=g+'="'+s.hex+'"';return y<1?f+" "+g+'-opacity="'+y.toFixed(2).slice(1)+'"':f}function E(s,g,y){let f=s+g;return typeof y<"u"&&(f+=" "+y),f}n.render=function(g,y,f){const d=l.getOptions(y),p=g.modules.size,m=g.modules.data,S=p+2*d.margin,_=d.color.light.a?"':"",D="0&&_>0&&s[S-1]||(f+=p?E("M",_+y,.5+D+y):E("m",d,0),d=0,p=!1),_+1',P='viewBox="0 0 '+S+" "+S+'"',C=''+_+D+"\n";return"function"==typeof f&&f(null,C),C}},36355:(q,n)=>{function u(l){if("number"==typeof l&&(l=l.toString()),"string"!=typeof l)throw new Error("Color should be defined as hex string");let v=l.slice().replace("#","").split("");if(v.length<3||5===v.length||v.length>8)throw new Error("Invalid hex color: "+l);(3===v.length||4===v.length)&&(v=Array.prototype.concat.apply([],v.map(function(M){return[M,M]}))),6===v.length&&v.push("F","F");const E=parseInt(v.join(""),16);return{r:E>>24&255,g:E>>16&255,b:E>>8&255,a:255&E,hex:"#"+v.slice(0,6).join("")}}n.getOptions=function(v){v||(v={}),v.color||(v.color={});const E=typeof v.margin>"u"||null===v.margin||v.margin<0?4:v.margin,M=v.width&&v.width>=21?v.width:void 0,s=v.scale||4;return{width:M,scale:M?4:s,margin:E,color:{dark:u(v.color.dark||"#000000ff"),light:u(v.color.light||"#ffffffff")},type:v.type,rendererOpts:v.rendererOpts||{}}},n.getScale=function(v,E){return E.width&&E.width>=v+2*E.margin?E.width/(v+2*E.margin):E.scale},n.getImageWidth=function(v,E){const M=n.getScale(v,E);return Math.floor((v+2*E.margin)*M)},n.qrToImageData=function(v,E,M){const s=E.modules.size,g=E.modules.data,y=n.getScale(s,M),f=Math.floor((s+2*M.margin)*y),d=M.margin*y,p=[M.color.light,M.color.dark];for(let m=0;m=d&&S>=d&&m{"use strict";const l=u(18372),v=u(12761),E=u(78951),M=u(44770),g=Symbol("encodeFragmentIdentifier");function d(N){if("string"!=typeof N||1!==N.length)throw new TypeError("arrayFormatSeparator must be single character string")}function p(N,k){return k.encode?k.strict?l(N):encodeURIComponent(N):N}function m(N,k){return k.decode?v(N):N}function S(N){return Array.isArray(N)?N.sort():"object"==typeof N?S(Object.keys(N)).sort((k,U)=>Number(k)-Number(U)).map(k=>N[k]):N}function _(N){const k=N.indexOf("#");return-1!==k&&(N=N.slice(0,k)),N}function P(N){const k=(N=_(N)).indexOf("?");return-1===k?"":N.slice(k+1)}function x(N,k){return k.parseNumbers&&!Number.isNaN(Number(N))&&"string"==typeof N&&""!==N.trim()?N=Number(N):k.parseBooleans&&null!==N&&("true"===N.toLowerCase()||"false"===N.toLowerCase())&&(N="true"===N.toLowerCase()),N}function C(N,k){d((k=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},k)).arrayFormatSeparator);const U=function f(N){let k;switch(N.arrayFormat){case"index":return(U,z,Y)=>{k=/\[(\d*)\]$/.exec(U),U=U.replace(/\[\d*\]$/,""),k?(void 0===Y[U]&&(Y[U]={}),Y[U][k[1]]=z):Y[U]=z};case"bracket":return(U,z,Y)=>{k=/(\[\])$/.exec(U),U=U.replace(/\[\]$/,""),k?void 0!==Y[U]?Y[U]=[].concat(Y[U],z):Y[U]=[z]:Y[U]=z};case"colon-list-separator":return(U,z,Y)=>{k=/(:list)$/.exec(U),U=U.replace(/:list$/,""),k?void 0!==Y[U]?Y[U]=[].concat(Y[U],z):Y[U]=[z]:Y[U]=z};case"comma":case"separator":return(U,z,Y)=>{const G="string"==typeof z&&z.includes(N.arrayFormatSeparator),F="string"==typeof z&&!G&&m(z,N).includes(N.arrayFormatSeparator);z=F?m(z,N):z;const j=G||F?z.split(N.arrayFormatSeparator).map(Z=>m(Z,N)):null===z?z:m(z,N);Y[U]=j};case"bracket-separator":return(U,z,Y)=>{const G=/(\[\])$/.test(U);if(U=U.replace(/\[\]$/,""),!G)return void(Y[U]=z&&m(z,N));const F=null===z?[]:z.split(N.arrayFormatSeparator).map(j=>m(j,N));void 0!==Y[U]?Y[U]=[].concat(Y[U],F):Y[U]=F};default:return(U,z,Y)=>{void 0!==Y[U]?Y[U]=[].concat(Y[U],z):Y[U]=z}}}(k),z=Object.create(null);if("string"!=typeof N||!(N=N.trim().replace(/^[?#&]/,"")))return z;for(const Y of N.split("&")){if(""===Y)continue;let[G,F]=E(k.decode?Y.replace(/\+/g," "):Y,"=");F=void 0===F?null:["comma","separator","bracket-separator"].includes(k.arrayFormat)?F:m(F,k),U(m(G,k),F,z)}for(const Y of Object.keys(z)){const G=z[Y];if("object"==typeof G&&null!==G)for(const F of Object.keys(G))G[F]=x(G[F],k);else z[Y]=x(G,k)}return!1===k.sort?z:(!0===k.sort?Object.keys(z).sort():Object.keys(z).sort(k.sort)).reduce((Y,G)=>{const F=z[G];return Boolean(F)&&"object"==typeof F&&!Array.isArray(F)?Y[G]=S(F):Y[G]=F,Y},Object.create(null))}n.extract=P,n.parse=C,n.stringify=(N,k)=>{if(!N)return"";d((k=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},k)).arrayFormatSeparator);const U=F=>k.skipNull&&(N=>null==N)(N[F])||k.skipEmptyString&&""===N[F],z=function y(N){switch(N.arrayFormat){case"index":return k=>(U,z)=>{const Y=U.length;return void 0===z||N.skipNull&&null===z||N.skipEmptyString&&""===z?U:null===z?[...U,[p(k,N),"[",Y,"]"].join("")]:[...U,[p(k,N),"[",p(Y,N),"]=",p(z,N)].join("")]};case"bracket":return k=>(U,z)=>void 0===z||N.skipNull&&null===z||N.skipEmptyString&&""===z?U:null===z?[...U,[p(k,N),"[]"].join("")]:[...U,[p(k,N),"[]=",p(z,N)].join("")];case"colon-list-separator":return k=>(U,z)=>void 0===z||N.skipNull&&null===z||N.skipEmptyString&&""===z?U:null===z?[...U,[p(k,N),":list="].join("")]:[...U,[p(k,N),":list=",p(z,N)].join("")];case"comma":case"separator":case"bracket-separator":{const k="bracket-separator"===N.arrayFormat?"[]=":"=";return U=>(z,Y)=>void 0===Y||N.skipNull&&null===Y||N.skipEmptyString&&""===Y?z:(Y=null===Y?"":Y,0===z.length?[[p(U,N),k,p(Y,N)].join("")]:[[z,p(Y,N)].join(N.arrayFormatSeparator)])}default:return k=>(U,z)=>void 0===z||N.skipNull&&null===z||N.skipEmptyString&&""===z?U:null===z?[...U,p(k,N)]:[...U,[p(k,N),"=",p(z,N)].join("")]}}(k),Y={};for(const F of Object.keys(N))U(F)||(Y[F]=N[F]);const G=Object.keys(Y);return!1!==k.sort&&G.sort(k.sort),G.map(F=>{const j=N[F];return void 0===j?"":null===j?p(F,k):Array.isArray(j)?0===j.length&&"bracket-separator"===k.arrayFormat?p(F,k)+"[]":j.reduce(z(F),[]).join("&"):p(F,k)+"="+p(j,k)}).filter(F=>F.length>0).join("&")},n.parseUrl=(N,k)=>{k=Object.assign({decode:!0},k);const[U,z]=E(N,"#");return Object.assign({url:U.split("?")[0]||"",query:C(P(N),k)},k&&k.parseFragmentIdentifier&&z?{fragmentIdentifier:m(z,k)}:{})},n.stringifyUrl=(N,k)=>{k=Object.assign({encode:!0,strict:!0,[g]:!0},k);const U=_(N.url).split("?")[0]||"",z=n.extract(N.url),Y=n.parse(z,{sort:!1}),G=Object.assign(Y,N.query);let F=n.stringify(G,k);F&&(F=`?${F}`);let j=function D(N){let k="";const U=N.indexOf("#");return-1!==U&&(k=N.slice(U)),k}(N.url);return N.fragmentIdentifier&&(j=`#${k[g]?p(N.fragmentIdentifier,k):N.fragmentIdentifier}`),`${U}${F}${j}`},n.pick=(N,k,U)=>{U=Object.assign({parseFragmentIdentifier:!0,[g]:!1},U);const{url:z,query:Y,fragmentIdentifier:G}=n.parseUrl(N,U);return n.stringifyUrl({url:z,query:M(Y,k),fragmentIdentifier:G},U)},n.exclude=(N,k,U)=>{const z=Array.isArray(k)?Y=>!k.includes(Y):(Y,G)=>!k(Y,G);return n.pick(N,z,U)}},90516:q=>{"use strict";function n(u,l){return Object.prototype.hasOwnProperty.call(u,l)}q.exports=function(u,l,v,E){l=l||"&",v=v||"=";var M={};if("string"!=typeof u||0===u.length)return M;var s=/\+/g;u=u.split(l);var g=1e3;E&&"number"==typeof E.maxKeys&&(g=E.maxKeys);var y=u.length;g>0&&y>g&&(y=g);for(var f=0;f=0?(m=d.substr(0,p),S=d.substr(p+1)):(m=d,S=""),_=decodeURIComponent(m),D=decodeURIComponent(S),n(M,_)?Array.isArray(M[_])?M[_].push(D):M[_]=[M[_],D]:M[_]=D}return M}},75776:q=>{"use strict";var n=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};q.exports=function(u,l,v,E){return l=l||"&",v=v||"=",null===u&&(u=void 0),"object"==typeof u?Object.keys(u).map(function(M){var s=encodeURIComponent(n(M))+v;return Array.isArray(u[M])?u[M].map(function(g){return s+encodeURIComponent(n(g))}).join(l):s+encodeURIComponent(n(u[M]))}).join(l):E?encodeURIComponent(n(E))+v+encodeURIComponent(n(u)):""}},17137:(q,n,u)=>{"use strict";n.decode=n.parse=u(90516),n.encode=n.stringify=u(75776)},18958:q=>{"use strict";function n(l){try{return JSON.stringify(l)}catch{return'"[Circular]"'}}q.exports=function u(l,v,E){var M=E&&E.stringify||n;if("object"==typeof l&&null!==l){var g=v.length+1;if(1===g)return l;var y=new Array(g);y[0]=M(l);for(var f=1;f-1?S:0,l.charCodeAt(D+1)){case 100:case 102:if(m>=d||null==v[m])break;S=d||null==v[m])break;S=d||void 0===v[m])break;S",S=D+2,D++;break}p+=M(v[m]),S=D+2,D++;break;case 115:if(m>=d)break;S{"use strict";var l=65536,v=4294967295;var M=u(73502).Buffer,s=global.crypto||global.msCrypto;s&&s.getRandomValues?q.exports=function g(y,f){if(y>v)throw new RangeError("requested too many random bytes");var d=M.allocUnsafe(y);if(y>0)if(y>l)for(var p=0;p{"use strict";function l(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var v=u(73502),E=u(53753),M=v.Buffer,s=v.kMaxLength,g=global.crypto||global.msCrypto,y=Math.pow(2,32)-1;function f(_,D){if("number"!=typeof _||_!=_)throw new TypeError("offset must be a number");if(_>y||_<0)throw new TypeError("offset must be a uint32");if(_>s||_>D)throw new RangeError("offset out of range")}function d(_,D,P){if("number"!=typeof _||_!=_)throw new TypeError("size must be a number");if(_>y||_<0)throw new TypeError("size must be a uint32");if(_+D>P||_>s)throw new RangeError("buffer too small")}function m(_,D,P,x){if(process.browser){var C=_.buffer,N=new Uint8Array(C,D,P);return g.getRandomValues(N),x?void process.nextTick(function(){x(null,_)}):_}if(!x)return E(P).copy(_,D),_;E(P,function(U,z){if(U)return x(U);z.copy(_,D),x(null,_)})}g&&g.getRandomValues||!process.browser?(n.randomFill=function p(_,D,P,x){if(!(M.isBuffer(_)||_ instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof D)x=D,D=0,P=_.length;else if("function"==typeof P)x=P,P=_.length-D;else if("function"!=typeof x)throw new TypeError('"cb" argument must be a function');return f(D,_.length),d(P,D,_.length),m(_,D,P,x)},n.randomFillSync=function S(_,D,P){if(typeof D>"u"&&(D=0),!(M.isBuffer(_)||_ instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(D,_.length),void 0===P&&(P=_.length-D),d(P,D,_.length),m(_,D,P)}):(n.randomFill=l,n.randomFillSync=l)},66509:(q,n,u)=>{"use strict";var l=u(54284),v=u(44854);function E(Q){for(var X="https://reactjs.org/docs/error-decoder.html?invariant="+Q,se=1;se"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},S={};function x(Q,X,se,me,De,Fe,it){this.acceptsBooleans=2===X||3===X||4===X,this.attributeName=me,this.attributeNamespace=De,this.mustUseProperty=se,this.propertyName=Q,this.type=X,this.sanitizeURL=Fe,this.removeEmptyString=it}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(Q){C[Q]=new x(Q,0,!1,Q,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(Q){var X=Q[0];C[X]=new x(X,1,!1,Q[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(Q){C[Q]=new x(Q,2,!1,Q.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(Q){C[Q]=new x(Q,2,!1,Q,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(Q){C[Q]=new x(Q,3,!1,Q.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(Q){C[Q]=new x(Q,3,!0,Q,null,!1,!1)}),["capture","download"].forEach(function(Q){C[Q]=new x(Q,4,!1,Q,null,!1,!1)}),["cols","rows","size","span"].forEach(function(Q){C[Q]=new x(Q,6,!1,Q,null,!1,!1)}),["rowSpan","start"].forEach(function(Q){C[Q]=new x(Q,5,!1,Q.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function k(Q){return Q[1].toUpperCase()}function U(Q,X,se,me){var De=C.hasOwnProperty(X)?C[X]:null;(null!==De?0!==De.type:me||!(2"u"||function D(Q,X,se,me){if(null!==se&&0===se.type)return!1;switch(typeof X){case"function":case"symbol":return!0;case"boolean":return!me&&(null!==se?!se.acceptsBooleans:"data-"!==(Q=Q.toLowerCase().slice(0,5))&&"aria-"!==Q);default:return!1}}(Q,X,se,me))return!0;if(me)return!1;if(null!==se)switch(se.type){case 3:return!X;case 4:return!1===X;case 5:return isNaN(X);case 6:return isNaN(X)||1>X}return!1}(X,se,De,me)&&(se=null),me||null===De?function _(Q){return!!d.call(S,Q)||!d.call(m,Q)&&(p.test(Q)?S[Q]=!0:(m[Q]=!0,!1))}(X)&&(null===se?Q.removeAttribute(X):Q.setAttribute(X,""+se)):De.mustUseProperty?Q[De.propertyName]=null===se?3!==De.type&&"":se:(X=De.attributeName,me=De.attributeNamespace,null===se?Q.removeAttribute(X):(se=3===(De=De.type)||4===De&&!0===se?"":""+se,me?Q.setAttributeNS(me,X,se):Q.setAttribute(X,se))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(Q){var X=Q.replace(N,k);C[X]=new x(X,1,!1,Q,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(Q){var X=Q.replace(N,k);C[X]=new x(X,1,!1,Q,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(Q){var X=Q.replace(N,k);C[X]=new x(X,1,!1,Q,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(Q){C[Q]=new x(Q,1,!1,Q.toLowerCase(),null,!1,!1)}),C.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(Q){C[Q]=new x(Q,1,!1,Q.toLowerCase(),null,!0,!0)});var z=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),o=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),V=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var H=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function b(Q){return null===Q||"object"!=typeof Q?null:"function"==typeof(Q=L&&Q[L]||Q["@@iterator"])?Q:null}var re,B=Object.assign;function ne(Q){if(void 0===re)try{throw Error()}catch(se){var X=se.stack.trim().match(/\n( *(at )?)/);re=X&&X[1]||""}return"\n"+re+Q}var te=!1;function ae(Q,X){if(!Q||te)return"";te=!0;var se=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(X)if(X=function(){throw Error()},Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(X,[])}catch(Jt){var me=Jt}Reflect.construct(Q,[],X)}else{try{X.call()}catch(Jt){me=Jt}Q.call(X.prototype)}else{try{throw Error()}catch(Jt){me=Jt}Q()}}catch(Jt){if(Jt&&me&&"string"==typeof Jt.stack){for(var De=Jt.stack.split("\n"),Fe=me.stack.split("\n"),it=De.length-1,Et=Fe.length-1;1<=it&&0<=Et&&De[it]!==Fe[Et];)Et--;for(;1<=it&&0<=Et;it--,Et--)if(De[it]!==Fe[Et]){if(1!==it||1!==Et)do{if(it--,0>--Et||De[it]!==Fe[Et]){var Dt="\n"+De[it].replace(" at new "," at ");return Q.displayName&&Dt.includes("")&&(Dt=Dt.replace("",Q.displayName)),Dt}}while(1<=it&&0<=Et);break}}}finally{te=!1,Error.prepareStackTrace=se}return(Q=Q?Q.displayName||Q.name:"")?ne(Q):""}function ge(Q){switch(Q.tag){case 5:return ne(Q.type);case 16:return ne("Lazy");case 13:return ne("Suspense");case 19:return ne("SuspenseList");case 0:case 2:case 15:return Q=ae(Q.type,!1);case 11:return Q=ae(Q.type.render,!1);case 1:return Q=ae(Q.type,!0);default:return""}}function pe(Q){if(null==Q)return null;if("function"==typeof Q)return Q.displayName||Q.name||null;if("string"==typeof Q)return Q;switch(Q){case F:return"Fragment";case G:return"Portal";case Z:return"Profiler";case j:return"StrictMode";case w:return"Suspense";case I:return"SuspenseList"}if("object"==typeof Q)switch(Q.$$typeof){case o:return(Q.displayName||"Context")+".Consumer";case T:return(Q._context.displayName||"Context")+".Provider";case h:var X=Q.render;return(Q=Q.displayName)||(Q=""!==(Q=X.displayName||X.name||"")?"ForwardRef("+Q+")":"ForwardRef"),Q;case R:return null!==(X=Q.displayName||null)?X:pe(Q.type)||"Memo";case V:X=Q._payload,Q=Q._init;try{return pe(Q(X))}catch{}}return null}function we(Q){var X=Q.type;switch(Q.tag){case 24:return"Cache";case 9:return(X.displayName||"Context")+".Consumer";case 10:return(X._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return Q=(Q=X.render).displayName||Q.name||"",X.displayName||(""!==Q?"ForwardRef("+Q+")":"ForwardRef");case 7:return"Fragment";case 5:return X;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(X);case 8:return X===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof X)return X.displayName||X.name||null;if("string"==typeof X)return X}return null}function ce(Q){switch(typeof Q){case"boolean":case"number":case"string":case"undefined":case"object":return Q;default:return""}}function le(Q){var X=Q.type;return(Q=Q.nodeName)&&"input"===Q.toLowerCase()&&("checkbox"===X||"radio"===X)}function fe(Q){Q._valueTracker||(Q._valueTracker=function ue(Q){var X=le(Q)?"checked":"value",se=Object.getOwnPropertyDescriptor(Q.constructor.prototype,X),me=""+Q[X];if(!Q.hasOwnProperty(X)&&typeof se<"u"&&"function"==typeof se.get&&"function"==typeof se.set){var De=se.get,Fe=se.set;return Object.defineProperty(Q,X,{configurable:!0,get:function(){return De.call(this)},set:function(it){me=""+it,Fe.call(this,it)}}),Object.defineProperty(Q,X,{enumerable:se.enumerable}),{getValue:function(){return me},setValue:function(it){me=""+it},stopTracking:function(){Q._valueTracker=null,delete Q[X]}}}}(Q))}function he(Q){if(!Q)return!1;var X=Q._valueTracker;if(!X)return!0;var se=X.getValue(),me="";return Q&&(me=le(Q)?Q.checked?"true":"false":Q.value),(Q=me)!==se&&(X.setValue(Q),!0)}function Ae(Q){if(typeof(Q=Q||(typeof document<"u"?document:void 0))>"u")return null;try{return Q.activeElement||Q.body}catch{return Q.body}}function Pe(Q,X){var se=X.checked;return B({},X,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:se??Q._wrapperState.initialChecked})}function Re(Q,X){var se=null==X.defaultValue?"":X.defaultValue,me=null!=X.checked?X.checked:X.defaultChecked;se=ce(null!=X.value?X.value:se),Q._wrapperState={initialChecked:me,initialValue:se,controlled:"checkbox"===X.type||"radio"===X.type?null!=X.checked:null!=X.value}}function ot(Q,X){null!=(X=X.checked)&&U(Q,"checked",X,!1)}function nt(Q,X){ot(Q,X);var se=ce(X.value),me=X.type;if(null!=se)"number"===me?(0===se&&""===Q.value||Q.value!=se)&&(Q.value=""+se):Q.value!==""+se&&(Q.value=""+se);else if("submit"===me||"reset"===me)return void Q.removeAttribute("value");X.hasOwnProperty("value")?It(Q,X.type,se):X.hasOwnProperty("defaultValue")&&It(Q,X.type,ce(X.defaultValue)),null==X.checked&&null!=X.defaultChecked&&(Q.defaultChecked=!!X.defaultChecked)}function Ye(Q,X,se){if(X.hasOwnProperty("value")||X.hasOwnProperty("defaultValue")){var me=X.type;if(!("submit"!==me&&"reset"!==me||void 0!==X.value&&null!==X.value))return;X=""+Q._wrapperState.initialValue,se||X===Q.value||(Q.value=X),Q.defaultValue=X}""!==(se=Q.name)&&(Q.name=""),Q.defaultChecked=!!Q._wrapperState.initialChecked,""!==se&&(Q.name=se)}function It(Q,X,se){("number"!==X||Ae(Q.ownerDocument)!==Q)&&(null==se?Q.defaultValue=""+Q._wrapperState.initialValue:Q.defaultValue!==""+se&&(Q.defaultValue=""+se))}var st=Array.isArray;function He(Q,X,se,me){if(Q=Q.options,X){X={};for(var De=0;De"+X.valueOf().toString()+"",X=xe.firstChild;Q.firstChild;)Q.removeChild(Q.firstChild);for(;X.firstChild;)Q.appendChild(X.firstChild)}},typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(X,se,me,De){MSApp.execUnsafeLocalFunction(function(){return Q(X,se)})}:Q);function Ge(Q,X){if(X){var se=Q.firstChild;if(se&&se===Q.lastChild&&3===se.nodeType)return void(se.nodeValue=X)}Q.textContent=X}var Qe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","ms","Moz","O"];function ke(Q,X,se){return null==X||"boolean"==typeof X||""===X?"":se||"number"!=typeof X||0===X||Qe.hasOwnProperty(Q)&&Qe[Q]?(""+X).trim():X+"px"}function et(Q,X){for(var se in Q=Q.style,X)if(X.hasOwnProperty(se)){var me=0===se.indexOf("--"),De=ke(se,X[se],me);"float"===se&&(se="cssFloat"),me?Q.setProperty(se,De):Q[se]=De}}Object.keys(Qe).forEach(function(Q){ye.forEach(function(X){X=X+Q.charAt(0).toUpperCase()+Q.substring(1),Qe[X]=Qe[Q]})});var qe=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function at(Q,X){if(X){if(qe[Q]&&(null!=X.children||null!=X.dangerouslySetInnerHTML))throw Error(E(137,Q));if(null!=X.dangerouslySetInnerHTML){if(null!=X.children)throw Error(E(60));if("object"!=typeof X.dangerouslySetInnerHTML||!("__html"in X.dangerouslySetInnerHTML))throw Error(E(61))}if(null!=X.style&&"object"!=typeof X.style)throw Error(E(62))}}function bt(Q,X){if(-1===Q.indexOf("-"))return"string"==typeof X.is;switch(Q){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pt=null;function xt(Q){return(Q=Q.target||Q.srcElement||window).correspondingUseElement&&(Q=Q.correspondingUseElement),3===Q.nodeType?Q.parentNode:Q}var kn=null,Nt=null,Ot=null;function Mn(Q){if(Q=Ss(Q)){if("function"!=typeof kn)throw Error(E(280));var X=Q.stateNode;X&&(X=by(X),kn(Q.stateNode,Q.type,X))}}function Tt(Q){Nt?Ot?Ot.push(Q):Ot=[Q]:Nt=Q}function Pt(){if(Nt){var Q=Nt,X=Ot;if(Ot=Nt=null,Mn(Q),X)for(Q=0;Q>>=0,0===Q?32:31-(qt(Q)/vn|0)|0},qt=Math.log,vn=Math.LN2;var hr=64,ur=4194304;function yr(Q){switch(Q&-Q){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&Q;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&Q;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return Q}}function _t(Q,X){var se=Q.pendingLanes;if(0===se)return 0;var me=0,De=Q.suspendedLanes,Fe=Q.pingedLanes,it=268435455&se;if(0!==it){var Et=it&~De;0!==Et?me=yr(Et):0!==(Fe&=it)&&(me=yr(Fe))}else 0!==(it=se&~De)?me=yr(it):0!==Fe&&(me=yr(Fe));if(0===me)return 0;if(0!==X&&X!==me&&!(X&De)&&((De=me&-me)>=(Fe=X&-X)||16===De&&0!=(4194240&Fe)))return X;if(4&me&&(me|=16&se),0!==(X=Q.entangledLanes))for(Q=Q.entanglements,X&=me;0se;se++)X.push(Q);return X}function Dr(Q,X,se){Q.pendingLanes|=X,536870912!==X&&(Q.suspendedLanes=0,Q.pingedLanes=0),(Q=Q.eventTimes)[X=31-$t(X)]=se}function Kr(Q,X){var se=Q.entangledLanes|=X;for(Q=Q.entanglements;se;){var me=31-$t(se),De=1<=hl),Xr=String.fromCharCode(32),P0=!1;function b1(Q,X){switch(Q){case"keyup":return-1!==y1.indexOf(X.keyCode);case"keydown":return 229!==X.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function na(Q){return"object"==typeof(Q=Q.detail)&&"data"in Q?Q.data:null}var pl=!1;var NS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function V2(Q){var X=Q&&Q.nodeName&&Q.nodeName.toLowerCase();return"input"===X?!!NS[Q.type]:"textarea"===X}function H2(Q,X,se,me){Tt(me),0<(X=wl(X,"onChange")).length&&(se=new Tn("onChange","change",null,se,me),Q.push({event:se,listeners:X}))}var Ia=null,gl=null;function R0(Q){Zn(Q,0)}function k0(Q){if(he(Cf(Q)))return Q}function W2(Q,X){if("change"===Q)return X}var w1=!1;if(f){var L0;if(f){var yl="oninput"in document;if(!yl){var ml=document.createElement("div");ml.setAttribute("oninput","return;"),yl="function"==typeof ml.oninput}L0=yl}else L0=!1;w1=L0&&(!document.documentMode||9=X)return{node:se,offset:X-Q};Q=me}e:{for(;se;){if(se.nextSibling){se=se.nextSibling;break e}se=se.parentNode}se=void 0}se=_1(se)}}function vl(Q,X){return!(!Q||!X)&&(Q===X||(!Q||3!==Q.nodeType)&&(X&&3===X.nodeType?vl(Q,X.parentNode):"contains"in Q?Q.contains(X):!!Q.compareDocumentPosition&&!!(16&Q.compareDocumentPosition(X))))}function yc(){for(var Q=window,X=Ae();X instanceof Q.HTMLIFrameElement;){try{var se="string"==typeof X.contentWindow.location.href}catch{se=!1}if(!se)break;X=Ae((Q=X.contentWindow).document)}return X}function Za(Q){var X=Q&&Q.nodeName&&Q.nodeName.toLowerCase();return X&&("input"===X&&("text"===Q.type||"search"===Q.type||"tel"===Q.type||"url"===Q.type||"password"===Q.type)||"textarea"===X||"true"===Q.contentEditable)}function fi(Q){var X=yc(),se=Q.focusedElem,me=Q.selectionRange;if(X!==se&&se&&se.ownerDocument&&vl(se.ownerDocument.documentElement,se)){if(null!==me&&Za(se))if(X=me.start,void 0===(Q=me.end)&&(Q=X),"selectionStart"in se)se.selectionStart=X,se.selectionEnd=Math.min(Q,se.value.length);else if((Q=(X=se.ownerDocument||document)&&X.defaultView||window).getSelection){Q=Q.getSelection();var De=se.textContent.length,Fe=Math.min(me.start,De);me=void 0===me.end?Fe:Math.min(me.end,De),!Q.extend&&Fe>me&&(De=me,me=Fe,Fe=De),De=gc(se,Fe);var it=gc(se,me);De&&it&&(1!==Q.rangeCount||Q.anchorNode!==De.node||Q.anchorOffset!==De.offset||Q.focusNode!==it.node||Q.focusOffset!==it.offset)&&((X=X.createRange()).setStart(De.node,De.offset),Q.removeAllRanges(),Fe>me?(Q.addRange(X),Q.extend(it.node,it.offset)):(X.setEnd(it.node,it.offset),Q.addRange(X)))}for(X=[],Q=se;Q=Q.parentNode;)1===Q.nodeType&&X.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for("function"==typeof se.focus&&se.focus(),se=0;se=document.documentMode,Nu=null,Vd=null,xf=null,Ja=!1;function Mf(Q,X,se){var me=se.window===se?se.document:9===se.nodeType?se:se.ownerDocument;Ja||null==Nu||Nu!==Ae(me)||("selectionStart"in(me=Nu)&&Za(me)?me={start:me.selectionStart,end:me.selectionEnd}:me={anchorNode:(me=(me.ownerDocument&&me.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:me.anchorOffset,focusNode:me.focusNode,focusOffset:me.focusOffset},xf&&zd(xf,me)||(xf=me,0<(me=wl(Vd,"onSelect")).length&&(X=new Tn("onSelect","select",null,X,se),Q.push({event:X,listeners:me}),X.target=Nu)))}function F0(Q,X){var se={};return se[Q.toLowerCase()]=X.toLowerCase(),se["Webkit"+Q]="webkit"+X,se["Moz"+Q]="moz"+X,se}var Bs={animationend:F0("Animation","AnimationEnd"),animationiteration:F0("Animation","AnimationIteration"),animationstart:F0("Animation","AnimationStart"),transitionend:F0("Transition","TransitionEnd")},hy={},S1={};function U0(Q){if(hy[Q])return hy[Q];if(!Bs[Q])return Q;var se,X=Bs[Q];for(se in X)if(X.hasOwnProperty(se)&&se in S1)return hy[Q]=X[se];return Q}f&&(S1=document.createElement("div").style,"AnimationEvent"in window||(delete Bs.animationend.animation,delete Bs.animationiteration.animation,delete Bs.animationstart.animation),"TransitionEvent"in window||delete Bs.transitionend.transition);var Ca=U0("animationend"),x1=U0("animationiteration"),py=U0("animationstart"),Or=U0("transitionend"),_s=new Map,di="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ji(Q,X){_s.set(Q,X),g(X,[Q])}for(var ls=0;lsDf||(Q.current=wy[Df],wy[Df]=null,Df--)}function Li(Q,X){Df++,wy[Df]=Q.current,Q.current=X}var Sl={},xs=_l(Sl),oa=_l(!1),Tf=Sl;function Zd(Q,X){var se=Q.type.contextTypes;if(!se)return Sl;var me=Q.stateNode;if(me&&me.__reactInternalMemoizedUnmaskedChildContext===X)return me.__reactInternalMemoizedMaskedChildContext;var Fe,De={};for(Fe in se)De[Fe]=X[Fe];return me&&((Q=Q.stateNode).__reactInternalMemoizedUnmaskedChildContext=X,Q.__reactInternalMemoizedMaskedChildContext=De),De}function sa(Q){return null!=(Q=Q.childContextTypes)}function Ey(){Vi(oa),Vi(xs)}function G2(Q,X,se){if(xs.current!==Sl)throw Error(E(168));Li(xs,X),Li(oa,se)}function Z2(Q,X,se){var me=Q.stateNode;if(X=X.childContextTypes,"function"!=typeof me.getChildContext)return se;for(var De in me=me.getChildContext())if(!(De in X))throw Error(E(108,we(Q)||"Unknown",De));return B({},se,me)}function Jd(Q){return Q=(Q=Q.stateNode)&&Q.__reactInternalMemoizedMergedChildContext||Sl,Tf=xs.current,Li(xs,Q),Li(oa,oa.current),!0}function Ay(Q,X,se){var me=Q.stateNode;if(!me)throw Error(E(169));se?(Q=Z2(Q,X,Tf),me.__reactInternalMemoizedMergedChildContext=Q,Vi(oa),Vi(xs),Li(xs,Q)):Vi(oa),Li(oa,se)}var ku=null,_y=!1,C1=!1;function Lu(Q){null===ku?ku=[Q]:ku.push(Q)}function is(){if(!C1&&null!==ku){C1=!0;var Q=0,X=nr;try{var se=ku;for(nr=1;Q>=it,De-=it,eu=1<<32-$t(X)+De|se<Er?(Go=pr,pr=null):Go=pr.sibling;var ai=_n(Vt,pr,Gt[Er],Nn);if(null===ai){null===pr&&(pr=Go);break}Q&&pr&&null===ai.alternate&&X(Vt,pr),kt=Fe(ai,kt,Er),null===vr?ar=ai:vr.sibling=ai,vr=ai,pr=Go}if(Er===Gt.length)return se(Vt,pr),Hi&&Bu(Vt,Er),ar;if(null===pr){for(;ErEr?(Go=pr,pr=null):Go=pr.sibling;var lu=_n(Vt,pr,ai.value,Nn);if(null===lu){null===pr&&(pr=Go);break}Q&&pr&&null===lu.alternate&&X(Vt,pr),kt=Fe(lu,kt,Er),null===vr?ar=lu:vr.sibling=lu,vr=lu,pr=Go}if(ai.done)return se(Vt,pr),Hi&&Bu(Vt,Er),ar;if(null===pr){for(;!ai.done;Er++,ai=Gt.next())null!==(ai=Dn(Vt,ai.value,Nn))&&(kt=Fe(ai,kt,Er),null===vr?ar=ai:vr.sibling=ai,vr=ai);return Hi&&Bu(Vt,Er),ar}for(pr=me(Vt,pr);!ai.done;Er++,ai=Gt.next())null!==(ai=Kn(pr,Vt,Er,ai.value,Nn))&&(Q&&null!==ai.alternate&&pr.delete(null===ai.key?Er:ai.key),kt=Fe(ai,kt,Er),null===vr?ar=ai:vr.sibling=ai,vr=ai);return Q&&pr.forEach(function(Wl){return X(Vt,Wl)}),Hi&&Bu(Vt,Er),ar}(Vt,kt,Gt,Nn);qd(Vt,Gt)}return"string"==typeof Gt&&""!==Gt||"number"==typeof Gt?(Gt=""+Gt,null!==kt&&6===kt.tag?(se(Vt,kt.sibling),(kt=De(kt,Gt)).return=Vt,Vt=kt):(se(Vt,kt),(kt=pm(Gt,Vt.mode,Nn)).return=Vt,Vt=kt),it(Vt)):se(Vt,kt)}}var Tl=P1(!0),Q0=P1(!1),Rf={},ec=_l(Rf),kf=_l(Rf),Lf=_l(Rf);function nu(Q){if(Q===Rf)throw Error(E(174));return Q}function Py(Q,X){switch(Li(Lf,X),Li(kf,Q),Li(ec,Rf),Q=X.nodeType){case 9:case 11:X=(X=X.documentElement)?X.namespaceURI:ve(null,"");break;default:X=ve(X=(Q=8===Q?X.parentNode:X).namespaceURI||null,Q=Q.tagName)}Vi(ec),Li(ec,X)}function Bf(){Vi(ec),Vi(kf),Vi(Lf)}function hs(Q){nu(Lf.current);var X=nu(ec.current),se=ve(X,Q.type);X!==se&&(Li(kf,Q),Li(ec,se))}function ru(Q){kf.current===Q&&(Vi(ec),Vi(kf))}var Pr=_l(0);function X0(Q){for(var X=Q;null!==X;){if(13===X.tag){var se=X.memoizedState;if(null!==se&&(null===(se=se.dehydrated)||"$?"===se.data||"$!"===se.data))return X}else if(19===X.tag&&void 0!==X.memoizedProps.revealOrder){if(128&X.flags)return X}else if(null!==X.child){X.child.return=X,X=X.child;continue}if(X===Q)break;for(;null===X.sibling;){if(null===X.return||X.return===Q)return null;X=X.return}X.sibling.return=X.return,X=X.sibling}return null}var Ry=[];function ky(){for(var Q=0;Qse?se:4,Q(!0);var me=Ly.transition;Ly.transition={};try{Q(!1),X()}finally{nr=se,Ly.transition=me}}function Wy(){return Pa().memoizedState}function U1(Q,X,se){var me=xc(Q);if(se={lane:me,action:se,hasEagerState:!1,eagerState:null,next:null},Gy(Q))z1(X,se);else if(null!==(se=Ty(Q,X,se,me))){rc(se,Q,me,gs()),sh(se,X,me)}}function K1(Q,X,se){var me=xc(Q),De={lane:me,action:se,hasEagerState:!1,eagerState:null,next:null};if(Gy(Q))z1(X,De);else{var Fe=Q.alternate;if(0===Q.lanes&&(null===Fe||0===Fe.lanes)&&null!==(Fe=X.lastRenderedReducer))try{var it=X.lastRenderedState,Et=Fe(it,se);if(De.hasEagerState=!0,De.eagerState=Et,Ga(Et,it)){var Dt=X.interleaved;return null===Dt?(De.next=De,Ko(X)):(De.next=Dt.next,Dt.next=De),void(X.interleaved=De)}}catch{}null!==(se=Ty(Q,X,De,me))&&(rc(se,Q,me,De=gs()),sh(se,X,me))}}function Gy(Q){var X=Q.alternate;return Q===Ii||null!==X&&X===Ii}function z1(Q,X){Ff=jf=!0;var se=Q.pending;null===se?X.next=X:(X.next=se.next,se.next=X),Q.pending=X}function sh(Q,X,se){if(4194240&se){var me=X.lanes;se|=me&=Q.pendingLanes,X.lanes=se,Kr(Q,se)}}var wc={readContext:Po,useCallback:Ro,useContext:Ro,useEffect:Ro,useImperativeHandle:Ro,useInsertionEffect:Ro,useLayoutEffect:Ro,useMemo:Ro,useReducer:Ro,useRef:Ro,useState:Ro,useDebugValue:Ro,useDeferredValue:Ro,useTransition:Ro,useMutableSource:Ro,useSyncExternalStore:Ro,useId:Ro,unstable_isNewReconciler:!1},$2={readContext:Po,useCallback:function(Q,X){return iu().memoizedState=[Q,void 0===X?null:X],Q},useContext:Po,useEffect:Vy,useImperativeHandle:function(Q,X,se){return se=null!=se?se.concat([Q]):null,Nl(4194308,4,F1.bind(null,X,Q),se)},useLayoutEffect:function(Q,X){return Nl(4194308,4,Q,X)},useInsertionEffect:function(Q,X){return Nl(4,2,Q,X)},useMemo:function(Q,X){var se=iu();return X=void 0===X?null:X,Q=Q(),se.memoizedState=[Q,X],Q},useReducer:function(Q,X,se){var me=iu();return X=void 0!==se?se(X):X,me.memoizedState=me.baseState=X,Q={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Q,lastRenderedState:X},me.queue=Q,Q=Q.dispatch=U1.bind(null,Ii,Q),[me.memoizedState,Q]},useRef:function(Q){return Q={current:Q},iu().memoizedState=Q},useState:B1,useDebugValue:oh,useDeferredValue:function(Q){return iu().memoizedState=Q},useTransition:function(){var Q=B1(!1),X=Q[0];return Q=Y2.bind(null,Q[1]),iu().memoizedState=Q,[X,Q]},useMutableSource:function(){},useSyncExternalStore:function(Q,X,se){var me=Ii,De=iu();if(Hi){if(void 0===se)throw Error(E(407));se=se()}else{if(se=X(),null===Vo)throw Error(E(349));30&Ol||Fy(me,X,se)}De.memoizedState=se;var Fe={value:se,getSnapshot:X};return De.queue=Fe,Vy(Uy.bind(null,me,Fe,Q),[Q]),me.flags|=2048,Fu(9,Kf.bind(null,me,Fe,se,X),void 0,null),se},useId:function(){var Q=iu(),X=Vo.identifierPrefix;if(Hi){var se=No;X=":"+X+"R"+(se=(eu&~(1<<32-$t(eu)-1)).toString(32)+se),0<(se=eh++)&&(X+="H"+se.toString(32)),X+=":"}else X=":"+X+"r"+(se=Uf++).toString(32)+":";return Q.memoizedState=X},unstable_isNewReconciler:!1},V1={readContext:Po,useCallback:Hy,useContext:Po,useEffect:np,useImperativeHandle:ih,useInsertionEffect:j1,useLayoutEffect:tc,useMemo:rp,useReducer:k1,useRef:tp,useState:function(){return k1(nh)},useDebugValue:oh,useDeferredValue:function(Q){return ip(Pa(),bo.memoizedState,Q)},useTransition:function(){return[k1(nh)[0],Pa().memoizedState]},useMutableSource:ep,useSyncExternalStore:jy,useId:Wy,unstable_isNewReconciler:!1},H1={readContext:Po,useCallback:Hy,useContext:Po,useEffect:np,useImperativeHandle:ih,useInsertionEffect:j1,useLayoutEffect:tc,useMemo:rp,useReducer:L1,useRef:tp,useState:function(){return L1(nh)},useDebugValue:oh,useDeferredValue:function(Q){var X=Pa();return null===bo?X.memoizedState=Q:ip(X,bo.memoizedState,Q)},useTransition:function(){return[L1(nh)[0],Pa().memoizedState]},useMutableSource:ep,useSyncExternalStore:jy,useId:Wy,unstable_isNewReconciler:!1};function nc(Q,X){try{var se="",me=X;do{se+=ge(me),me=me.return}while(me);var De=se}catch(Fe){De="\nError generating stack: "+Fe.message+"\n"+Fe.stack}return{value:Q,source:X,stack:De,digest:null}}function Zy(Q,X,se){return{value:Q,source:null,stack:se??null,digest:X??null}}function zo(Q,X){try{console.error(X.value)}catch(se){setTimeout(function(){throw se})}}var Jy="function"==typeof WeakMap?WeakMap:Map;function W1(Q,X,se){(se=tu(-1,se)).tag=3,se.payload={element:null};var me=X.value;return se.callback=function(){pp||(pp=!0,gp=me),zo(0,X)},se}function Yy(Q,X,se){(se=tu(-1,se)).tag=3;var me=Q.type.getDerivedStateFromError;if("function"==typeof me){var De=X.value;se.payload=function(){return me(De)},se.callback=function(){zo(0,X)}}var Fe=Q.stateNode;return null!==Fe&&"function"==typeof Fe.componentDidCatch&&(se.callback=function(){zo(0,X),"function"!=typeof me&&(null===Sc?Sc=new Set([this]):Sc.add(this));var it=X.stack;this.componentDidCatch(X.value,{componentStack:null!==it?it:""})}),se}function op(Q,X,se){var me=Q.pingCache;if(null===me){me=Q.pingCache=new Jy;var De=new Set;me.set(X,De)}else void 0===(De=me.get(X))&&(De=new Set,me.set(X,De));De.has(se)||(De.add(se),Q=ph.bind(null,Q,X,se),X.then(Q,Q))}function Pl(Q){do{var X;if((X=13===Q.tag)&&(X=null===(X=Q.memoizedState)||null!==X.dehydrated),X)return Q;Q=Q.return}while(null!==Q);return null}function Rl(Q,X,se,me,De){return 1&Q.mode?(Q.flags|=65536,Q.lanes=De,Q):(Q===X?Q.flags|=65536:(Q.flags|=128,se.flags|=131072,se.flags&=-52805,1===se.tag&&(null===se.alternate?se.tag=17:((X=tu(-1,1)).tag=2,Il(se,X,1))),se.lanes|=1),Q)}var zf=z.ReactCurrentOwner,$o=!1;function ss(Q,X,se,me){X.child=null===Q?Q0(X,null,se,me):Tl(X,Q.child,se,me)}function kl(Q,X,se,me,De){se=se.render;var Fe=X.ref;return Yr(X,De),me=R1(Q,X,se,me,Fe,De),se=th(),null===Q||$o?(Hi&&se&&Uo(X),X.flags|=1,ss(Q,X,me,De),X.child):(X.updateQueue=Q.updateQueue,X.flags&=-2053,Q.lanes&=~De,Ac(Q,X,De))}function ou(Q,X,se,me,De){if(null===Q){var Fe=se.type;return"function"!=typeof Fe||_p(Fe)||void 0!==Fe.defaultProps||null!==se.compare||void 0!==se.defaultProps?((Q=Sp(se.type,null,me,X,X.mode,De)).ref=X.ref,Q.return=X,X.child=Q):(X.tag=15,X.type=Fe,G1(Q,X,Fe,me,De))}if(Fe=Q.child,!(Q.lanes&De)){var it=Fe.memoizedProps;if((se=null!==(se=se.compare)?se:zd)(it,me)&&Q.ref===X.ref)return Ac(Q,X,De)}return X.flags|=1,(Q=Mc(Fe,me)).ref=X.ref,Q.return=X,X.child=Q}function G1(Q,X,se,me,De){if(null!==Q){var Fe=Q.memoizedProps;if(zd(Fe,me)&&Q.ref===X.ref){if($o=!1,X.pendingProps=me=Fe,0==(Q.lanes&De))return X.lanes=Q.lanes,Ac(Q,X,De);131072&Q.flags&&($o=!0)}}return sp(Q,X,se,me,De)}function Cr(Q,X,se){var me=X.pendingProps,De=me.children,Fe=null!==Q?Q.memoizedState:null;if("hidden"===me.mode)if(1&X.mode){if(!(1073741824&se))return Q=null!==Fe?Fe.baseLanes|se:se,X.lanes=X.childLanes=1073741824,X.memoizedState={baseLanes:Q,cachePool:null,transitions:null},X.updateQueue=null,Li(Qf,Ra),Ra|=Q,null;X.memoizedState={baseLanes:0,cachePool:null,transitions:null},me=null!==Fe?Fe.baseLanes:se,Li(Qf,Ra),Ra|=me}else X.memoizedState={baseLanes:0,cachePool:null,transitions:null},Li(Qf,Ra),Ra|=se;else null!==Fe?(me=Fe.baseLanes|se,X.memoizedState=null):me=se,Li(Qf,Ra),Ra|=me;return ss(Q,X,De,se),X.child}function Q2(Q,X){var se=X.ref;(null===Q&&null!==se||null!==Q&&Q.ref!==se)&&(X.flags|=512,X.flags|=2097152)}function sp(Q,X,se,me,De){var Fe=sa(se)?Tf:xs.current;return Fe=Zd(X,Fe),Yr(X,De),se=R1(Q,X,se,me,Fe,De),me=th(),null===Q||$o?(Hi&&me&&Uo(X),X.flags|=1,ss(Q,X,se,De),X.child):(X.updateQueue=Q.updateQueue,X.flags&=-2053,Q.lanes&=~De,Ac(Q,X,De))}function ah(Q,X,se,me,De){if(sa(se)){var Fe=!0;Jd(X)}else Fe=!1;if(Yr(X,De),null===X.stateNode)Ec(Q,X),O1(X,se,me),Xd(X,se,me,De),me=!0;else if(null===Q){var it=X.stateNode,Et=X.memoizedProps;it.props=Et;var Dt=it.context,Jt=se.contextType;"object"==typeof Jt&&null!==Jt?Jt=Po(Jt):Jt=Zd(X,Jt=sa(se)?Tf:xs.current);var In=se.getDerivedStateFromProps,Dn="function"==typeof In||"function"==typeof it.getSnapshotBeforeUpdate;Dn||"function"!=typeof it.UNSAFE_componentWillReceiveProps&&"function"!=typeof it.componentWillReceiveProps||(Et!==me||Dt!==Jt)&&N1(X,it,me,Jt),os=!1;var _n=X.memoizedState;it.state=_n,Na(X,me,it,De),Dt=X.memoizedState,Et!==me||_n!==Dt||oa.current||os?("function"==typeof In&&(qa(X,se,In,me),Dt=X.memoizedState),(Et=os||Ny(X,se,Et,me,_n,Dt,Jt))?(Dn||"function"!=typeof it.UNSAFE_componentWillMount&&"function"!=typeof it.componentWillMount||("function"==typeof it.componentWillMount&&it.componentWillMount(),"function"==typeof it.UNSAFE_componentWillMount&&it.UNSAFE_componentWillMount()),"function"==typeof it.componentDidMount&&(X.flags|=4194308)):("function"==typeof it.componentDidMount&&(X.flags|=4194308),X.memoizedProps=me,X.memoizedState=Dt),it.props=me,it.state=Dt,it.context=Jt,me=Et):("function"==typeof it.componentDidMount&&(X.flags|=4194308),me=!1)}else{it=X.stateNode,J0(Q,X),Et=X.memoizedProps,Jt=X.type===X.elementType?Et:bc(X.type,Et),it.props=Jt,Dn=X.pendingProps,_n=it.context,"object"==typeof(Dt=se.contextType)&&null!==Dt?Dt=Po(Dt):Dt=Zd(X,Dt=sa(se)?Tf:xs.current);var Kn=se.getDerivedStateFromProps;(In="function"==typeof Kn||"function"==typeof it.getSnapshotBeforeUpdate)||"function"!=typeof it.UNSAFE_componentWillReceiveProps&&"function"!=typeof it.componentWillReceiveProps||(Et!==Dn||_n!==Dt)&&N1(X,it,me,Dt),os=!1,_n=X.memoizedState,it.state=_n,Na(X,me,it,De);var qn=X.memoizedState;Et!==Dn||_n!==qn||oa.current||os?("function"==typeof Kn&&(qa(X,se,Kn,me),qn=X.memoizedState),(Jt=os||Ny(X,se,Jt,me,_n,qn,Dt)||!1)?(In||"function"!=typeof it.UNSAFE_componentWillUpdate&&"function"!=typeof it.componentWillUpdate||("function"==typeof it.componentWillUpdate&&it.componentWillUpdate(me,qn,Dt),"function"==typeof it.UNSAFE_componentWillUpdate&&it.UNSAFE_componentWillUpdate(me,qn,Dt)),"function"==typeof it.componentDidUpdate&&(X.flags|=4),"function"==typeof it.getSnapshotBeforeUpdate&&(X.flags|=1024)):("function"!=typeof it.componentDidUpdate||Et===Q.memoizedProps&&_n===Q.memoizedState||(X.flags|=4),"function"!=typeof it.getSnapshotBeforeUpdate||Et===Q.memoizedProps&&_n===Q.memoizedState||(X.flags|=1024),X.memoizedProps=me,X.memoizedState=qn),it.props=me,it.state=qn,it.context=Dt,me=Jt):("function"!=typeof it.componentDidUpdate||Et===Q.memoizedProps&&_n===Q.memoizedState||(X.flags|=4),"function"!=typeof it.getSnapshotBeforeUpdate||Et===Q.memoizedProps&&_n===Q.memoizedState||(X.flags|=1024),me=!1)}return Z1(Q,X,se,me,Fe,De)}function Z1(Q,X,se,me,De,Fe){Q2(Q,X);var it=0!=(128&X.flags);if(!me&&!it)return De&&Ay(X,se,!1),Ac(Q,X,Fe);me=X.stateNode,zf.current=X;var Et=it&&"function"!=typeof se.getDerivedStateFromError?null:me.render();return X.flags|=1,null!==Q&&it?(X.child=Tl(X,Q.child,null,Fe),X.child=Tl(X,null,Et,Fe)):ss(Q,X,Et,Fe),X.memoizedState=me.state,De&&Ay(X,se,!0),X.child}function X2(Q){var X=Q.stateNode;X.pendingContext?G2(0,X.pendingContext,X.pendingContext!==X.context):X.context&&G2(0,X.context,!1),Py(Q,X.containerInfo)}function q2(Q,X,se,me,De){return ju(),Nr(De),X.flags|=256,ss(Q,X,se,me),X.child}var Hf,qy,eE,Y1,J1={dehydrated:null,treeContext:null,retryLane:0};function su(Q){return{baseLanes:Q,cachePool:null,transitions:null}}function $y(Q,X,se){var Et,me=X.pendingProps,De=Pr.current,Fe=!1,it=0!=(128&X.flags);if((Et=it)||(Et=(null===Q||null!==Q.memoizedState)&&0!=(2&De)),Et?(Fe=!0,X.flags&=-129):(null===Q||null!==Q.memoizedState)&&(De|=1),Li(Pr,1&De),null===Q)return Nf(X),null!==(Q=X.memoizedState)&&null!==(Q=Q.dehydrated)?(1&X.mode?"$!"===Q.data?X.lanes=8:X.lanes=1073741824:X.lanes=1,null):(it=me.children,Q=me.fallback,Fe?(me=X.mode,Fe=X.child,it={mode:"hidden",children:it},1&me||null===Fe?Fe=xp(it,me,0,null):(Fe.childLanes=0,Fe.pendingProps=it),Q=Ul(Q,me,se,null),Fe.return=X,Q.return=X,Fe.sibling=Q,X.child=Fe,X.child.memoizedState=su(se),X.memoizedState=J1,Q):ap(X,it));if(null!==(De=Q.memoizedState)&&null!==(Et=De.dehydrated))return function Qy(Q,X,se,me,De,Fe,it){if(se)return 256&X.flags?(X.flags&=-257,me=Zy(Error(E(422))),wo(Q,X,it,me)):null!==X.memoizedState?(X.child=Q.child,X.flags|=128,null):(Fe=me.fallback,De=X.mode,me=xp({mode:"visible",children:me.children},De,0,null),Fe=Ul(Fe,De,it,null),Fe.flags|=2,me.return=X,Fe.return=X,me.sibling=Fe,X.child=me,1&X.mode&&Tl(X,Q.child,null,it),X.child.memoizedState=su(it),X.memoizedState=J1,Fe);if(!(1&X.mode))return wo(Q,X,it,null);if("$!"===De.data){if(me=De.nextSibling&&De.nextSibling.dataset)var Et=me.dgst;return me=Et,wo(Q,X,it,me=Zy(Fe=Error(E(419)),me,void 0))}if(Et=0!=(it&Q.childLanes),$o||Et){if(null!==(me=Vo)){switch(it&-it){case 4:De=2;break;case 16:De=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:De=32;break;case 536870912:De=268435456;break;default:De=0}0!==(De=De&(me.suspendedLanes|it)?0:De)&&De!==Fe.retryLane&&(Fe.retryLane=De,ca(Q,De),rc(me,Q,De,-1))}return lm(),wo(Q,X,it,me=Zy(Error(E(421))))}return"$?"===De.data?(X.flags|=128,X.child=Q.child,X=cE.bind(null,Q),De._reactRetry=X,null):(Q=Fe.treeContext,Bi=$a(De.nextSibling),fs=X,Hi=!0,Oa=null,null!==Q&&(aa[Ta++]=eu,aa[Ta++]=No,aa[Ta++]=qc,eu=Q.id,No=Q.overflow,qc=X),X=ap(X,me.children),X.flags|=4096,X)}(Q,X,it,me,Et,De,se);if(Fe){Fe=me.fallback,it=X.mode,Et=(De=Q.child).sibling;var Dt={mode:"hidden",children:me.children};return 1&it||X.child===De?(me=Mc(De,Dt)).subtreeFlags=14680064&De.subtreeFlags:((me=X.child).childLanes=0,me.pendingProps=Dt,X.deletions=null),null!==Et?Fe=Mc(Et,Fe):(Fe=Ul(Fe,it,se,null)).flags|=2,Fe.return=X,me.return=X,me.sibling=Fe,X.child=me,me=Fe,Fe=X.child,it=null===(it=Q.child.memoizedState)?su(se):{baseLanes:it.baseLanes|se,cachePool:null,transitions:it.transitions},Fe.memoizedState=it,Fe.childLanes=Q.childLanes&~se,X.memoizedState=J1,me}return Q=(Fe=Q.child).sibling,me=Mc(Fe,{mode:"visible",children:me.children}),!(1&X.mode)&&(me.lanes=se),me.return=X,me.sibling=null,null!==Q&&(null===(se=X.deletions)?(X.deletions=[Q],X.flags|=16):se.push(Q)),X.child=me,X.memoizedState=null,me}function ap(Q,X){return(X=xp({mode:"visible",children:X},Q.mode,0,null)).return=Q,Q.child=X}function wo(Q,X,se,me){return null!==me&&Nr(me),Tl(X,Q.child,null,se),(Q=ap(X,X.pendingProps.children)).flags|=2,X.memoizedState=null,Q}function Vf(Q,X,se){Q.lanes|=X;var me=Q.alternate;null!==me&&(me.lanes|=X),bn(Q.return,X,se)}function Xy(Q,X,se,me,De){var Fe=Q.memoizedState;null===Fe?Q.memoizedState={isBackwards:X,rendering:null,renderingStartTime:0,last:me,tail:se,tailMode:De}:(Fe.isBackwards=X,Fe.rendering=null,Fe.renderingStartTime=0,Fe.last=me,Fe.tail=se,Fe.tailMode=De)}function ua(Q,X,se){var me=X.pendingProps,De=me.revealOrder,Fe=me.tail;if(ss(Q,X,me.children,se),2&(me=Pr.current))me=1&me|2,X.flags|=128;else{if(null!==Q&&128&Q.flags)e:for(Q=X.child;null!==Q;){if(13===Q.tag)null!==Q.memoizedState&&Vf(Q,se,X);else if(19===Q.tag)Vf(Q,se,X);else if(null!==Q.child){Q.child.return=Q,Q=Q.child;continue}if(Q===X)break e;for(;null===Q.sibling;){if(null===Q.return||Q.return===X)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}me&=1}if(Li(Pr,me),1&X.mode)switch(De){case"forwards":for(se=X.child,De=null;null!==se;)null!==(Q=se.alternate)&&null===X0(Q)&&(De=se),se=se.sibling;null===(se=De)?(De=X.child,X.child=null):(De=se.sibling,se.sibling=null),Xy(X,!1,De,se,Fe);break;case"backwards":for(se=null,De=X.child,X.child=null;null!==De;){if(null!==(Q=De.alternate)&&null===X0(Q)){X.child=De;break}Q=De.sibling,De.sibling=se,se=De,De=Q}Xy(X,!0,se,null,Fe);break;case"together":Xy(X,!1,null,null,void 0);break;default:X.memoizedState=null}else X.memoizedState=null;return X.child}function Ec(Q,X){!(1&X.mode)&&null!==Q&&(Q.alternate=null,X.alternate=null,X.flags|=2)}function Ac(Q,X,se){if(null!==Q&&(X.dependencies=Q.dependencies),Xf|=X.lanes,!(se&X.childLanes))return null;if(null!==Q&&X.child!==Q.child)throw Error(E(153));if(null!==X.child){for(se=Mc(Q=X.child,Q.pendingProps),X.child=se,se.return=X;null!==Q.sibling;)Q=Q.sibling,(se=se.sibling=Mc(Q,Q.pendingProps)).return=X;se.sibling=null}return X.child}function up(Q,X){if(!Hi)switch(Q.tailMode){case"hidden":X=Q.tail;for(var se=null;null!==X;)null!==X.alternate&&(se=X),X=X.sibling;null===se?Q.tail=null:se.sibling=null;break;case"collapsed":se=Q.tail;for(var me=null;null!==se;)null!==se.alternate&&(me=se),se=se.sibling;null===me?X||null===Q.tail?Q.tail=null:Q.tail.sibling=null:me.sibling=null}}function Ei(Q){var X=null!==Q.alternate&&Q.alternate.child===Q.child,se=0,me=0;if(X)for(var De=Q.child;null!==De;)se|=De.lanes|De.childLanes,me|=14680064&De.subtreeFlags,me|=14680064&De.flags,De.return=Q,De=De.sibling;else for(De=Q.child;null!==De;)se|=De.lanes|De.childLanes,me|=De.subtreeFlags,me|=De.flags,De.return=Q,De=De.sibling;return Q.subtreeFlags|=me,Q.childLanes=se,X}function em(Q,X,se){var me=X.pendingProps;switch(xy(X),X.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ei(X),null;case 1:case 17:return sa(X.type)&&Ey(),Ei(X),null;case 3:return me=X.stateNode,Bf(),Vi(oa),Vi(xs),ky(),me.pendingContext&&(me.context=me.pendingContext,me.pendingContext=null),(null===Q||null===Q.child)&&(Xa(X)?X.flags|=4:null===Q||Q.memoizedState.isDehydrated&&!(256&X.flags)||(X.flags|=1024,null!==Oa&&(am(Oa),Oa=null))),qy(Q,X),Ei(X),null;case 5:ru(X);var De=nu(Lf.current);if(se=X.type,null!==Q&&null!=X.stateNode)eE(Q,X,se,me,De),Q.ref!==X.ref&&(X.flags|=512,X.flags|=2097152);else{if(!me){if(null===X.stateNode)throw Error(E(166));return Ei(X),null}if(Q=nu(ec.current),Xa(X)){me=X.stateNode,se=X.type;var Fe=X.memoizedProps;switch(me[zi]=X,me[V0]=Fe,Q=0!=(1&X.mode),se){case"dialog":tr("cancel",me),tr("close",me);break;case"iframe":case"object":case"embed":tr("load",me);break;case"video":case"audio":for(De=0;De<\/script>",Q=Q.removeChild(Q.firstChild)):"string"==typeof me.is?Q=it.createElement(se,{is:me.is}):(Q=it.createElement(se),"select"===se&&(it=Q,me.multiple?it.multiple=!0:me.size&&(it.size=me.size))):Q=it.createElementNS(Q,se),Q[zi]=X,Q[V0]=me,Hf(Q,X,!1,!1),X.stateNode=Q;e:{switch(it=bt(se,me),se){case"dialog":tr("cancel",Q),tr("close",Q),De=me;break;case"iframe":case"object":case"embed":tr("load",Q),De=me;break;case"video":case"audio":for(De=0;Delh&&(X.flags|=128,me=!0,up(Fe,!1),X.lanes=4194304)}else{if(!me)if(null!==(Q=X0(it))){if(X.flags|=128,me=!0,null!==(se=Q.updateQueue)&&(X.updateQueue=se,X.flags|=4),up(Fe,!0),null===Fe.tail&&"hidden"===Fe.tailMode&&!it.alternate&&!Hi)return Ei(X),null}else 2*yn()-Fe.renderingStartTime>lh&&1073741824!==se&&(X.flags|=128,me=!0,up(Fe,!1),X.lanes=4194304);Fe.isBackwards?(it.sibling=X.child,X.child=it):(null!==(se=Fe.last)?se.sibling=it:X.child=it,Fe.last=it)}return null!==Fe.tail?(X=Fe.tail,Fe.rendering=X,Fe.tail=X.sibling,Fe.renderingStartTime=yn(),X.sibling=null,se=Pr.current,Li(Pr,me?1&se|2:1&se),X):(Ei(X),null);case 22:case 23:return Xo(),me=null!==X.memoizedState,null!==Q&&null!==Q.memoizedState!==me&&(X.flags|=8192),me&&1&X.mode?1073741824&Ra&&(Ei(X),6&X.subtreeFlags&&(X.flags|=8192)):Ei(X),null;case 24:case 25:return null}throw Error(E(156,X.tag))}function Wf(Q,X){switch(xy(X),X.tag){case 1:return sa(X.type)&&Ey(),65536&(Q=X.flags)?(X.flags=-65537&Q|128,X):null;case 3:return Bf(),Vi(oa),Vi(xs),ky(),65536&(Q=X.flags)&&!(128&Q)?(X.flags=-65537&Q|128,X):null;case 5:return ru(X),null;case 13:if(Vi(Pr),null!==(Q=X.memoizedState)&&null!==Q.dehydrated){if(null===X.alternate)throw Error(E(340));ju()}return 65536&(Q=X.flags)?(X.flags=-65537&Q|128,X):null;case 19:return Vi(Pr),null;case 4:return Bf(),null;case 10:return Dy(X.type._context),null;case 22:case 23:return Xo(),null;default:return null}}Hf=function(Q,X){for(var se=X.child;null!==se;){if(5===se.tag||6===se.tag)Q.appendChild(se.stateNode);else if(4!==se.tag&&null!==se.child){se.child.return=se,se=se.child;continue}if(se===X)break;for(;null===se.sibling;){if(null===se.return||se.return===X)return;se=se.return}se.sibling.return=se.return,se=se.sibling}},qy=function(){},eE=function(Q,X,se,me){var De=Q.memoizedProps;if(De!==me){Q=X.stateNode,nu(ec.current);var it,Fe=null;switch(se){case"input":De=Pe(Q,De),me=Pe(Q,me),Fe=[];break;case"select":De=B({},De,{value:void 0}),me=B({},me,{value:void 0}),Fe=[];break;case"textarea":De=ze(Q,De),me=ze(Q,me),Fe=[];break;default:"function"!=typeof De.onClick&&"function"==typeof me.onClick&&(Q.onclick=Fo)}for(Jt in at(se,me),se=null,De)if(!me.hasOwnProperty(Jt)&&De.hasOwnProperty(Jt)&&null!=De[Jt])if("style"===Jt){var Et=De[Jt];for(it in Et)Et.hasOwnProperty(it)&&(se||(se={}),se[it]="")}else"dangerouslySetInnerHTML"!==Jt&&"children"!==Jt&&"suppressContentEditableWarning"!==Jt&&"suppressHydrationWarning"!==Jt&&"autoFocus"!==Jt&&(s.hasOwnProperty(Jt)?Fe||(Fe=[]):(Fe=Fe||[]).push(Jt,null));for(Jt in me){var Dt=me[Jt];if(Et=De?.[Jt],me.hasOwnProperty(Jt)&&Dt!==Et&&(null!=Dt||null!=Et))if("style"===Jt)if(Et){for(it in Et)!Et.hasOwnProperty(it)||Dt&&Dt.hasOwnProperty(it)||(se||(se={}),se[it]="");for(it in Dt)Dt.hasOwnProperty(it)&&Et[it]!==Dt[it]&&(se||(se={}),se[it]=Dt[it])}else se||(Fe||(Fe=[]),Fe.push(Jt,se)),se=Dt;else"dangerouslySetInnerHTML"===Jt?(Dt=Dt?Dt.__html:void 0,Et=Et?Et.__html:void 0,null!=Dt&&Et!==Dt&&(Fe=Fe||[]).push(Jt,Dt)):"children"===Jt?"string"!=typeof Dt&&"number"!=typeof Dt||(Fe=Fe||[]).push(Jt,""+Dt):"suppressContentEditableWarning"!==Jt&&"suppressHydrationWarning"!==Jt&&(s.hasOwnProperty(Jt)?(null!=Dt&&"onScroll"===Jt&&tr("scroll",Q),Fe||Et===Dt||(Fe=[])):(Fe=Fe||[]).push(Jt,Dt))}se&&(Fe=Fe||[]).push("style",se);var Jt=Fe;(X.updateQueue=Jt)&&(X.flags|=4)}},Y1=function(Q,X,se,me){se!==me&&(X.flags|=4)};var tm=!1,as=!1,tE="function"==typeof WeakSet?WeakSet:Set,Xn=null;function Gf(Q,X){var se=Q.ref;if(null!==se)if("function"==typeof se)try{se(null)}catch(me){Eo(Q,X,me)}else se.current=null}function nm(Q,X,se){try{se()}catch(me){Eo(Q,X,me)}}var $1=!1;function Ll(Q,X,se){var me=X.updateQueue;if(null!==(me=null!==me?me.lastEffect:null)){var De=me=me.next;do{if((De.tag&Q)===Q){var Fe=De.destroy;De.destroy=void 0,void 0!==Fe&&nm(X,se,Fe)}De=De.next}while(De!==me)}}function Bl(Q,X){if(null!==(X=null!==(X=X.updateQueue)?X.lastEffect:null)){var se=X=X.next;do{if((se.tag&Q)===Q){var me=se.create;se.destroy=me()}se=se.next}while(se!==X)}}function ch(Q){var X=Q.ref;if(null!==X){var se=Q.stateNode;Q.tag,Q=se,"function"==typeof X?X(Q):X.current=Q}}function Zf(Q){var X=Q.alternate;null!==X&&(Q.alternate=null,Zf(X)),Q.child=null,Q.deletions=null,Q.sibling=null,5===Q.tag&&(null!==(X=Q.stateNode)&&(delete X[zi],delete X[V0],delete X[ia],delete X[vy],delete X[Gd])),Q.stateNode=null,Q.return=null,Q.dependencies=null,Q.memoizedProps=null,Q.memoizedState=null,Q.pendingProps=null,Q.stateNode=null,Q.updateQueue=null}function lp(Q){return 5===Q.tag||3===Q.tag||4===Q.tag}function Jf(Q){e:for(;;){for(;null===Q.sibling;){if(null===Q.return||lp(Q.return))return null;Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;5!==Q.tag&&6!==Q.tag&&18!==Q.tag;){if(2&Q.flags||null===Q.child||4===Q.tag)continue e;Q.child.return=Q,Q=Q.child}if(!(2&Q.flags))return Q.stateNode}}function rm(Q,X,se){var me=Q.tag;if(5===me||6===me)Q=Q.stateNode,X?8===se.nodeType?se.parentNode.insertBefore(Q,X):se.insertBefore(Q,X):(8===se.nodeType?(X=se.parentNode).insertBefore(Q,se):(X=se).appendChild(Q),null!=(se=se._reactRootContainer)||null!==X.onclick||(X.onclick=Fo));else if(4!==me&&null!==(Q=Q.child))for(rm(Q,X,se),Q=Q.sibling;null!==Q;)rm(Q,X,se),Q=Q.sibling}function fp(Q,X,se){var me=Q.tag;if(5===me||6===me)Q=Q.stateNode,X?se.insertBefore(Q,X):se.appendChild(Q);else if(4!==me&&null!==(Q=Q.child))for(fp(Q,X,se),Q=Q.sibling;null!==Q;)fp(Q,X,se),Q=Q.sibling}var Co=null,Fs=!1;function au(Q,X,se){for(se=se.child;null!==se;)Q1(Q,X,se),se=se.sibling}function Q1(Q,X,se){if(jt&&"function"==typeof jt.onCommitFiberUnmount)try{jt.onCommitFiberUnmount(Ft,se)}catch{}switch(se.tag){case 5:as||Gf(se,X);case 6:var me=Co,De=Fs;Co=null,au(Q,X,se),Fs=De,null!==(Co=me)&&(Fs?(Q=Co,se=se.stateNode,8===Q.nodeType?Q.parentNode.removeChild(se):Q.removeChild(se)):Co.removeChild(se.stateNode));break;case 18:null!==Co&&(Fs?(Q=Co,se=se.stateNode,8===Q.nodeType?z0(Q.parentNode,se):1===Q.nodeType&&z0(Q,se),Lt(Q)):z0(Co,se.stateNode));break;case 4:me=Co,De=Fs,Co=se.stateNode.containerInfo,Fs=!0,au(Q,X,se),Co=me,Fs=De;break;case 0:case 11:case 14:case 15:if(!as&&(null!==(me=se.updateQueue)&&null!==(me=me.lastEffect))){De=me=me.next;do{var Fe=De,it=Fe.destroy;Fe=Fe.tag,void 0!==it&&(2&Fe||4&Fe)&&nm(se,X,it),De=De.next}while(De!==me)}au(Q,X,se);break;case 1:if(!as&&(Gf(se,X),"function"==typeof(me=se.stateNode).componentWillUnmount))try{me.props=se.memoizedProps,me.state=se.memoizedState,me.componentWillUnmount()}catch(Et){Eo(se,X,Et)}au(Q,X,se);break;case 21:au(Q,X,se);break;case 22:1&se.mode?(as=(me=as)||null!==se.memoizedState,au(Q,X,se),as=me):au(Q,X,se);break;default:au(Q,X,se)}}function X1(Q){var X=Q.updateQueue;if(null!==X){Q.updateQueue=null;var se=Q.stateNode;null===se&&(se=Q.stateNode=new tE),X.forEach(function(me){var De=dm.bind(null,Q,me);se.has(me)||(se.add(me),me.then(De,De))})}}function ps(Q,X){var se=X.deletions;if(null!==se)for(var me=0;meDe&&(De=it),me&=~Fe}if(me=De,10<(me=(120>(me=yn()-me)?120:480>me?480:1080>me?1080:1920>me?1920:3e3>me?3e3:4320>me?4320:1960*iE(me/1960))-me)){Q.timeoutHandle=Al(Fl.bind(null,Q,fa,Uu),me);break}Fl(Q,fa,Uu);break;default:throw Error(E(329))}}}return Us(Q,yn()),Q.callbackNode===se?nb.bind(null,Q):null}function vp(Q,X){var se=hp;return Q.current.memoizedState.isDehydrated&&(ic(Q,X).flags|=256),2!==(Q=hh(Q,X))&&(X=fa,fa=se,null!==X&&am(X)),Q}function am(Q){null===fa?fa=Q:fa.push.apply(fa,Q)}function Do(Q,X){for(X&=~uh,X&=~om,Q.suspendedLanes|=X,Q.pingedLanes&=~X,Q=Q.expirationTimes;0Q?16:Q,null===cu)var me=!1;else{if(Q=cu,cu=null,dh=0,6&si)throw Error(E(331));var De=si;for(si|=4,Xn=Q.current;null!==Xn;){var Fe=Xn,it=Fe.child;if(16&Xn.flags){var Et=Fe.deletions;if(null!==Et){for(var Dt=0;Dtyn()-tb?ic(Q,0):uh|=se),Us(Q,X)}function ob(Q,X){0===X&&(1&Q.mode?(X=ur,!(130023424&(ur<<=1))&&(ur=4194304)):X=1);var se=gs();null!==(Q=ca(Q,X))&&(Dr(Q,X,se),Us(Q,se))}function cE(Q){var X=Q.memoizedState,se=0;null!==X&&(se=X.retryLane),ob(Q,se)}function dm(Q,X){var se=0;switch(Q.tag){case 13:var me=Q.stateNode,De=Q.memoizedState;null!==De&&(se=De.retryLane);break;case 19:me=Q.stateNode;break;default:throw Error(E(314))}null!==me&&me.delete(X),ob(Q,se)}function hm(Q,X){return An(Q,X)}function qf(Q,X,se,me){this.tag=Q,this.key=se,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=X,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=me,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ks(Q,X,se,me){return new qf(Q,X,se,me)}function _p(Q){return!(!(Q=Q.prototype)||!Q.isReactComponent)}function Mc(Q,X){var se=Q.alternate;return null===se?((se=Ks(Q.tag,X,Q.key,Q.mode)).elementType=Q.elementType,se.type=Q.type,se.stateNode=Q.stateNode,se.alternate=Q,Q.alternate=se):(se.pendingProps=X,se.type=Q.type,se.flags=0,se.subtreeFlags=0,se.deletions=null),se.flags=14680064&Q.flags,se.childLanes=Q.childLanes,se.lanes=Q.lanes,se.child=Q.child,se.memoizedProps=Q.memoizedProps,se.memoizedState=Q.memoizedState,se.updateQueue=Q.updateQueue,X=Q.dependencies,se.dependencies=null===X?null:{lanes:X.lanes,firstContext:X.firstContext},se.sibling=Q.sibling,se.index=Q.index,se.ref=Q.ref,se}function Sp(Q,X,se,me,De,Fe){var it=2;if(me=Q,"function"==typeof Q)_p(Q)&&(it=1);else if("string"==typeof Q)it=5;else e:switch(Q){case F:return Ul(se.children,De,Fe,X);case j:it=8,De|=8;break;case Z:return(Q=Ks(12,se,X,2|De)).elementType=Z,Q.lanes=Fe,Q;case w:return(Q=Ks(13,se,X,De)).elementType=w,Q.lanes=Fe,Q;case I:return(Q=Ks(19,se,X,De)).elementType=I,Q.lanes=Fe,Q;case H:return xp(se,De,Fe,X);default:if("object"==typeof Q&&null!==Q)switch(Q.$$typeof){case T:it=10;break e;case o:it=9;break e;case h:it=11;break e;case R:it=14;break e;case V:it=16,me=null;break e}throw Error(E(130,null==Q?Q:typeof Q,""))}return(X=Ks(it,se,X,De)).elementType=Q,X.type=me,X.lanes=Fe,X}function Ul(Q,X,se,me){return(Q=Ks(7,Q,me,X)).lanes=se,Q}function xp(Q,X,se,me){return(Q=Ks(22,Q,me,X)).elementType=H,Q.lanes=se,Q.stateNode={isHidden:!1},Q}function pm(Q,X,se){return(Q=Ks(6,Q,null,X)).lanes=se,Q}function gm(Q,X,se){return(X=Ks(4,null!==Q.children?Q.children:[],Q.key,X)).lanes=se,X.stateNode={containerInfo:Q.containerInfo,pendingChildren:null,implementation:Q.implementation},X}function lE(Q,X,se,me,De){this.tag=X,this.containerInfo=Q,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xr(0),this.expirationTimes=xr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xr(0),this.identifierPrefix=me,this.onRecoverableError=De,this.mutableSourceEagerHydrationData=null}function Mp(Q,X,se,me,De,Fe,it,Et,Dt){return Q=new lE(Q,X,se,Et,Dt),1===X?(X=1,!0===Fe&&(X|=8)):X=0,Fe=Ks(3,null,null,X),Q.current=Fe,Fe.stateNode=Q,Fe.memoizedState={element:me,isDehydrated:se,cache:null,transitions:null,pendingSuspenseBoundaries:null},$d(Fe),Q}function mm(Q){if(!Q)return Sl;e:{if(nn(Q=Q._reactInternals)!==Q||1!==Q.tag)throw Error(E(170));var X=Q;do{switch(X.tag){case 3:X=X.stateNode.context;break e;case 1:if(sa(X.type)){X=X.stateNode.__reactInternalMemoizedMergedChildContext;break e}}X=X.return}while(null!==X);throw Error(E(171))}if(1===Q.tag){var se=Q.type;if(sa(se))return Z2(Q,se,X)}return X}function Ip(Q,X,se,me,De,Fe,it,Et,Dt){return(Q=Mp(se,me,!0,Q,0,Fe,0,Et,Dt)).context=mm(null),se=Q.current,(Fe=tu(me=gs(),De=xc(se))).callback=X??null,Il(se,Fe,De),Q.current.lanes=De,Dr(Q,De,me),Us(Q,me),Q}function Cp(Q,X,se,me){var De=X.current,Fe=gs(),it=xc(De);return se=mm(se),null===X.context?X.context=se:X.pendingContext=se,(X=tu(Fe,it)).payload={element:Q},null!==(me=void 0===me?null:me)&&(X.callback=me),null!==(Q=Il(De,X,it))&&(rc(Q,De,it,Fe),Qd(Q,De,it)),it}function Dp(Q){return(Q=Q.current).child?(Q.child.tag,Q.child.stateNode):null}function vm(Q,X){if(null!==(Q=Q.memoizedState)&&null!==Q.dehydrated){var se=Q.retryLane;Q.retryLane=0!==se&&se{"use strict";var v=u(51291);n.s=v.createRoot,v.hydrateRoot},51291:(q,n,u)=>{"use strict";(function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(v){console.error(v)}})(),q.exports=u(66509)},50433:(q,n,u)=>{"use strict";var l=u(54284),v=Symbol.for("react.element"),E=Symbol.for("react.fragment"),M=Object.prototype.hasOwnProperty,s=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,g={key:!0,ref:!0,__self:!0,__source:!0};function y(f,d,p){var m,S={},_=null,D=null;for(m in void 0!==p&&(_=""+p),void 0!==d.key&&(_=""+d.key),void 0!==d.ref&&(D=d.ref),d)M.call(d,m)&&!g.hasOwnProperty(m)&&(S[m]=d[m]);if(f&&f.defaultProps)for(m in d=f.defaultProps)void 0===S[m]&&(S[m]=d[m]);return{$$typeof:v,type:f,key:_,ref:D,props:S,_owner:s.current}}n.Fragment=E,n.jsx=y,n.jsxs=y},3851:(q,n)=>{"use strict";var u=Symbol.for("react.element"),l=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),g=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,P={};function x(b,B,re){this.props=b,this.context=B,this.refs=P,this.updater=re||_}function C(){}function N(b,B,re){this.props=b,this.context=B,this.refs=P,this.updater=re||_}x.prototype.isReactComponent={},x.prototype.setState=function(b,B){if("object"!=typeof b&&"function"!=typeof b&&null!=b)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,B,"setState")},x.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")},C.prototype=x.prototype;var k=N.prototype=new C;k.constructor=N,D(k,x.prototype),k.isPureReactComponent=!0;var U=Array.isArray,z=Object.prototype.hasOwnProperty,Y={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function F(b,B,re){var ne,te={},ae=null,ge=null;if(null!=B)for(ne in void 0!==B.ref&&(ge=B.ref),void 0!==B.key&&(ae=""+B.key),B)z.call(B,ne)&&!G.hasOwnProperty(ne)&&(te[ne]=B[ne]);var pe=arguments.length-2;if(1===pe)te.children=re;else if(1{"use strict";q.exports=u(3851)},18348:(q,n,u)=>{"use strict";q.exports=u(50433)},70891:q=>{"use strict";var u={};function l(g,y,f){f||(f=Error);var p=function(m){function S(_,D,P){return m.call(this,function d(m,S,_){return"string"==typeof y?y:y(m,S,_)}(_,D,P))||this}return function n(g,y){g.prototype=Object.create(y.prototype),g.prototype.constructor=g,g.__proto__=y}(S,m),S}(f);p.prototype.name=f.name,p.prototype.code=g,u[g]=p}function v(g,y){if(Array.isArray(g)){var f=g.length;return g=g.map(function(d){return String(d)}),f>2?"one of ".concat(y," ").concat(g.slice(0,f-1).join(", "),", or ")+g[f-1]:2===f?"one of ".concat(y," ").concat(g[0]," or ").concat(g[1]):"of ".concat(y," ").concat(g[0])}return"of ".concat(y," ").concat(String(g))}l("ERR_INVALID_OPT_VALUE",function(g,y){return'The value "'+y+'" is invalid for option "'+g+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(g,y,f){var d,p;if("string"==typeof y&&function E(g,y,f){return g.substr(!f||f<0?0:+f,y.length)===y}(y,"not ")?(d="must not be",y=y.replace(/^not /,"")):d="must be",function M(g,y,f){return(void 0===f||f>g.length)&&(f=g.length),g.substring(f-y.length,f)===y}(g," argument"))p="The ".concat(g," ").concat(d," ").concat(v(y,"type"));else{var m=function s(g,y,f){return"number"!=typeof f&&(f=0),!(f+y.length>g.length)&&-1!==g.indexOf(y,f)}(g,".")?"property":"argument";p='The "'.concat(g,'" ').concat(m," ").concat(d," ").concat(v(y,"type"))}return p+=". Received type ".concat(typeof f)},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(g){return"The "+g+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(g){return"Cannot call "+g+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(g){return"Unknown encoding: "+g},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),q.exports.q=u},41339:(q,n,u)=>{"use strict";var l=Object.keys||function(p){var m=[];for(var S in p)m.push(S);return m};q.exports=y;var v=u(3154),E=u(20520);u(83894)(y,v);for(var M=l(E.prototype),s=0;s{"use strict";q.exports=v;var l=u(6025);function v(E){if(!(this instanceof v))return new v(E);l.call(this,E)}u(83894)(v,l),v.prototype._transform=function(E,M,s){s(null,E)}},3154:(q,n,u)=>{"use strict";var l;q.exports=T,T.ReadableState=Z;u(59069).EventEmitter;var E=function(Ae,Pe){return Ae.listeners(Pe).length},M=u(4970),s=u(93172).Buffer,g=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var p,d=u(94616);p=d&&d.debuglog?d.debuglog("stream"):function(){};var U,z,Y,m=u(25019),S=u(41920),D=u(47102).getHighWaterMark,P=u(70891).q,x=P.ERR_INVALID_ARG_TYPE,C=P.ERR_STREAM_PUSH_AFTER_EOF,N=P.ERR_METHOD_NOT_IMPLEMENTED,k=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;u(83894)(T,M);var G=S.errorOrDestroy,F=["error","close","destroy","pause","resume"];function Z(he,Ae,Pe){l=l||u(41339),he=he||{},"boolean"!=typeof Pe&&(Pe=Ae instanceof l),this.objectMode=!!he.objectMode,Pe&&(this.objectMode=this.objectMode||!!he.readableObjectMode),this.highWaterMark=D(this,he,"readableHighWaterMark",Pe),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==he.emitClose,this.autoDestroy=!!he.autoDestroy,this.destroyed=!1,this.defaultEncoding=he.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,he.encoding&&(U||(U=u(53720).s),this.decoder=new U(he.encoding),this.encoding=he.encoding)}function T(he){if(l=l||u(41339),!(this instanceof T))return new T(he);var Ae=this instanceof l;this._readableState=new Z(he,this,Ae),this.readable=!0,he&&("function"==typeof he.read&&(this._read=he.read),"function"==typeof he.destroy&&(this._destroy=he.destroy)),M.call(this)}function o(he,Ae,Pe,Re,ot){p("readableAddChunk",Ae);var Ye,nt=he._readableState;if(null===Ae)nt.reading=!1,function H(he,Ae){if(p("onEofChunk"),!Ae.ended){if(Ae.decoder){var Pe=Ae.decoder.end();Pe&&Pe.length&&(Ae.buffer.push(Pe),Ae.length+=Ae.objectMode?1:Pe.length)}Ae.ended=!0,Ae.sync?L(he):(Ae.needReadable=!1,Ae.emittedReadable||(Ae.emittedReadable=!0,b(he)))}}(he,nt);else if(ot||(Ye=function w(he,Ae){var Pe;return!function f(he){return s.isBuffer(he)||he instanceof g}(Ae)&&"string"!=typeof Ae&&void 0!==Ae&&!he.objectMode&&(Pe=new x("chunk",["string","Buffer","Uint8Array"],Ae)),Pe}(nt,Ae)),Ye)G(he,Ye);else if(nt.objectMode||Ae&&Ae.length>0)if("string"!=typeof Ae&&!nt.objectMode&&Object.getPrototypeOf(Ae)!==s.prototype&&(Ae=function y(he){return s.from(he)}(Ae)),Re)nt.endEmitted?G(he,new k):h(he,nt,Ae,!0);else if(nt.ended)G(he,new C);else{if(nt.destroyed)return!1;nt.reading=!1,nt.decoder&&!Pe?(Ae=nt.decoder.write(Ae),nt.objectMode||0!==Ae.length?h(he,nt,Ae,!1):B(he,nt)):h(he,nt,Ae,!1)}else Re||(nt.reading=!1,B(he,nt));return!nt.ended&&(nt.lengthAe.highWaterMark&&(Ae.highWaterMark=function R(he){return he>=I?he=I:(he--,he|=he>>>1,he|=he>>>2,he|=he>>>4,he|=he>>>8,he|=he>>>16,he++),he}(he)),he<=Ae.length?he:Ae.ended?Ae.length:(Ae.needReadable=!0,0))}function L(he){var Ae=he._readableState;p("emitReadable",Ae.needReadable,Ae.emittedReadable),Ae.needReadable=!1,Ae.emittedReadable||(p("emitReadable",Ae.flowing),Ae.emittedReadable=!0,process.nextTick(b,he))}function b(he){var Ae=he._readableState;p("emitReadable_",Ae.destroyed,Ae.length,Ae.ended),!Ae.destroyed&&(Ae.length||Ae.ended)&&(he.emit("readable"),Ae.emittedReadable=!1),Ae.needReadable=!Ae.flowing&&!Ae.ended&&Ae.length<=Ae.highWaterMark,we(he)}function B(he,Ae){Ae.readingMore||(Ae.readingMore=!0,process.nextTick(re,he,Ae))}function re(he,Ae){for(;!Ae.reading&&!Ae.ended&&(Ae.length0,Ae.resumeScheduled&&!Ae.paused?Ae.flowing=!0:he.listenerCount("data")>0&&he.resume()}function ae(he){p("readable nexttick read 0"),he.read(0)}function pe(he,Ae){p("resume",Ae.reading),Ae.reading||he.read(0),Ae.resumeScheduled=!1,he.emit("resume"),we(he),Ae.flowing&&!Ae.reading&&he.read(0)}function we(he){var Ae=he._readableState;for(p("flow",Ae.flowing);Ae.flowing&&null!==he.read(););}function ce(he,Ae){return 0===Ae.length?null:(Ae.objectMode?Pe=Ae.buffer.shift():!he||he>=Ae.length?(Pe=Ae.decoder?Ae.buffer.join(""):1===Ae.buffer.length?Ae.buffer.first():Ae.buffer.concat(Ae.length),Ae.buffer.clear()):Pe=Ae.buffer.consume(he,Ae.decoder),Pe);var Pe}function le(he){var Ae=he._readableState;p("endReadable",Ae.endEmitted),Ae.endEmitted||(Ae.ended=!0,process.nextTick(ue,Ae,he))}function ue(he,Ae){if(p("endReadableNT",he.endEmitted,he.length),!he.endEmitted&&0===he.length&&(he.endEmitted=!0,Ae.readable=!1,Ae.emit("end"),he.autoDestroy)){var Pe=Ae._writableState;(!Pe||Pe.autoDestroy&&Pe.finished)&&Ae.destroy()}}function fe(he,Ae){for(var Pe=0,Re=he.length;Pe=Ae.highWaterMark:Ae.length>0)||Ae.ended))return p("read: emitReadable",Ae.length,Ae.ended),0===Ae.length&&Ae.ended?le(this):L(this),null;if(0===(he=V(he,Ae))&&Ae.ended)return 0===Ae.length&&le(this),null;var ot,Re=Ae.needReadable;return p("need readable",Re),(0===Ae.length||Ae.length-he0?ce(he,Ae):null)?(Ae.needReadable=Ae.length<=Ae.highWaterMark,he=0):(Ae.length-=he,Ae.awaitDrain=0),0===Ae.length&&(Ae.ended||(Ae.needReadable=!0),Pe!==he&&Ae.ended&&le(this)),null!==ot&&this.emit("data",ot),ot},T.prototype._read=function(he){G(this,new N("_read()"))},T.prototype.pipe=function(he,Ae){var Pe=this,Re=this._readableState;switch(Re.pipesCount){case 0:Re.pipes=he;break;case 1:Re.pipes=[Re.pipes,he];break;default:Re.pipes.push(he)}Re.pipesCount+=1,p("pipe count=%d opts=%j",Re.pipesCount,Ae);var nt=(!Ae||!1!==Ae.end)&&he!==process.stdout&&he!==process.stderr?It:ve;function Ye(xe,je){p("onunpipe"),xe===Pe&&je&&!1===je.hasUnpiped&&(je.hasUnpiped=!0,function ze(){p("cleanup"),he.removeListener("close",ut),he.removeListener("finish",Me),he.removeListener("drain",st),he.removeListener("error",Ze),he.removeListener("unpipe",Ye),Pe.removeListener("end",It),Pe.removeListener("end",ve),Pe.removeListener("data",Be),He=!0,Re.awaitDrain&&(!he._writableState||he._writableState.needDrain)&&st()}())}function It(){p("onend"),he.end()}Re.endEmitted?process.nextTick(nt):Pe.once("end",nt),he.on("unpipe",Ye);var st=function ne(he){return function(){var Pe=he._readableState;p("pipeOnDrain",Pe.awaitDrain),Pe.awaitDrain&&Pe.awaitDrain--,0===Pe.awaitDrain&&E(he,"data")&&(Pe.flowing=!0,we(he))}}(Pe);he.on("drain",st);var He=!1;function Be(xe){p("ondata");var je=he.write(xe);p("dest.write",je),!1===je&&((1===Re.pipesCount&&Re.pipes===he||Re.pipesCount>1&&-1!==fe(Re.pipes,he))&&!He&&(p("false write response, pause",Re.awaitDrain),Re.awaitDrain++),Pe.pause())}function Ze(xe){p("onerror",xe),ve(),he.removeListener("error",Ze),0===E(he,"error")&&G(he,xe)}function ut(){he.removeListener("finish",Me),ve()}function Me(){p("onfinish"),he.removeListener("close",ut),ve()}function ve(){p("unpipe"),Pe.unpipe(he)}return Pe.on("data",Be),function j(he,Ae,Pe){if("function"==typeof he.prependListener)return he.prependListener(Ae,Pe);he._events&&he._events[Ae]?Array.isArray(he._events[Ae])?he._events[Ae].unshift(Pe):he._events[Ae]=[Pe,he._events[Ae]]:he.on(Ae,Pe)}(he,"error",Ze),he.once("close",ut),he.once("finish",Me),he.emit("pipe",Pe),Re.flowing||(p("pipe resume"),Pe.resume()),he},T.prototype.unpipe=function(he){var Ae=this._readableState,Pe={hasUnpiped:!1};if(0===Ae.pipesCount)return this;if(1===Ae.pipesCount)return he&&he!==Ae.pipes||(he||(he=Ae.pipes),Ae.pipes=null,Ae.pipesCount=0,Ae.flowing=!1,he&&he.emit("unpipe",this,Pe)),this;if(!he){var Re=Ae.pipes,ot=Ae.pipesCount;Ae.pipes=null,Ae.pipesCount=0,Ae.flowing=!1;for(var nt=0;nt0,!1!==Re.flowing&&this.resume()):"readable"===he&&!Re.endEmitted&&!Re.readableListening&&(Re.readableListening=Re.needReadable=!0,Re.flowing=!1,Re.emittedReadable=!1,p("on readable",Re.length,Re.reading),Re.length?L(this):Re.reading||process.nextTick(ae,this)),Pe},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(he,Ae){var Pe=M.prototype.removeListener.call(this,he,Ae);return"readable"===he&&process.nextTick(te,this),Pe},T.prototype.removeAllListeners=function(he){var Ae=M.prototype.removeAllListeners.apply(this,arguments);return("readable"===he||void 0===he)&&process.nextTick(te,this),Ae},T.prototype.resume=function(){var he=this._readableState;return he.flowing||(p("resume"),he.flowing=!he.readableListening,function ge(he,Ae){Ae.resumeScheduled||(Ae.resumeScheduled=!0,process.nextTick(pe,he,Ae))}(this,he)),he.paused=!1,this},T.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(he){var Ae=this,Pe=this._readableState,Re=!1;for(var ot in he.on("end",function(){if(p("wrapped end"),Pe.decoder&&!Pe.ended){var Ye=Pe.decoder.end();Ye&&Ye.length&&Ae.push(Ye)}Ae.push(null)}),he.on("data",function(Ye){(p("wrapped data"),Pe.decoder&&(Ye=Pe.decoder.write(Ye)),Pe.objectMode&&null==Ye||!(Pe.objectMode||Ye&&Ye.length))||(Ae.push(Ye)||(Re=!0,he.pause()))}),he)void 0===this[ot]&&"function"==typeof he[ot]&&(this[ot]=function(It){return function(){return he[It].apply(he,arguments)}}(ot));for(var nt=0;nt{"use strict";q.exports=f;var l=u(70891).q,v=l.ERR_METHOD_NOT_IMPLEMENTED,E=l.ERR_MULTIPLE_CALLBACK,M=l.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=l.ERR_TRANSFORM_WITH_LENGTH_0,g=u(41339);function y(m,S){var _=this._transformState;_.transforming=!1;var D=_.writecb;if(null===D)return this.emit("error",new E);_.writechunk=null,_.writecb=null,null!=S&&this.push(S),D(m);var P=this._readableState;P.reading=!1,(P.needReadable||P.length{"use strict";function v(we){var ce=this;this.next=null,this.entry=null,this.finish=function(){!function pe(we,ce,le){var ue=we.entry;for(we.entry=null;ue;){var fe=ue.callback;ce.pendingcb--,fe(le),ue=ue.next}ce.corkedRequestsFree.next=we}(ce,we)}}var E;q.exports=Z,Z.WritableState=F;var M={deprecate:u(23532)},s=u(4970),g=u(93172).Buffer,y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var j,p=u(41920),S=u(47102).getHighWaterMark,_=u(70891).q,D=_.ERR_INVALID_ARG_TYPE,P=_.ERR_METHOD_NOT_IMPLEMENTED,x=_.ERR_MULTIPLE_CALLBACK,C=_.ERR_STREAM_CANNOT_PIPE,N=_.ERR_STREAM_DESTROYED,k=_.ERR_STREAM_NULL_VALUES,U=_.ERR_STREAM_WRITE_AFTER_END,z=_.ERR_UNKNOWN_ENCODING,Y=p.errorOrDestroy;function G(){}function F(we,ce,le){E=E||u(41339),we=we||{},"boolean"!=typeof le&&(le=ce instanceof E),this.objectMode=!!we.objectMode,le&&(this.objectMode=this.objectMode||!!we.writableObjectMode),this.highWaterMark=S(this,we,"writableHighWaterMark",le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ue=!1===we.decodeStrings;this.decodeStrings=!ue,this.defaultEncoding=we.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(fe){!function H(we,ce){var le=we._writableState,ue=le.sync,fe=le.writecb;if("function"!=typeof fe)throw new x;if(function V(we){we.writing=!1,we.writecb=null,we.length-=we.writelen,we.writelen=0}(le),ce)!function R(we,ce,le,ue,fe){--ce.pendingcb,le?(process.nextTick(fe,ue),process.nextTick(ae,we,ce),we._writableState.errorEmitted=!0,Y(we,ue)):(fe(ue),we._writableState.errorEmitted=!0,Y(we,ue),ae(we,ce))}(we,le,ue,ce,fe);else{var he=re(le)||we.destroyed;!he&&!le.corked&&!le.bufferProcessing&&le.bufferedRequest&&B(we,le),ue?process.nextTick(L,we,le,he,fe):L(we,le,he,fe)}}(ce,fe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==we.emitClose,this.autoDestroy=!!we.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}function Z(we){var ce=this instanceof(E=E||u(41339));if(!ce&&!j.call(Z,this))return new Z(we);this._writableState=new F(we,this,ce),this.writable=!0,we&&("function"==typeof we.write&&(this._write=we.write),"function"==typeof we.writev&&(this._writev=we.writev),"function"==typeof we.destroy&&(this._destroy=we.destroy),"function"==typeof we.final&&(this._final=we.final)),s.call(this)}function I(we,ce,le,ue,fe,he,Ae){ce.writelen=ue,ce.writecb=Ae,ce.writing=!0,ce.sync=!0,ce.destroyed?ce.onwrite(new N("write")):le?we._writev(fe,ce.onwrite):we._write(fe,he,ce.onwrite),ce.sync=!1}function L(we,ce,le,ue){le||function b(we,ce){0===ce.length&&ce.needDrain&&(ce.needDrain=!1,we.emit("drain"))}(we,ce),ce.pendingcb--,ue(),ae(we,ce)}function B(we,ce){ce.bufferProcessing=!0;var le=ce.bufferedRequest;if(we._writev&&le&&le.next){var ue=ce.bufferedRequestCount,fe=new Array(ue),he=ce.corkedRequestsFree;he.entry=le;for(var Ae=0,Pe=!0;le;)fe[Ae]=le,le.isBuf||(Pe=!1),le=le.next,Ae+=1;fe.allBuffers=Pe,I(we,ce,!0,ce.length,fe,"",he.finish),ce.pendingcb++,ce.lastBufferedRequest=null,he.next?(ce.corkedRequestsFree=he.next,he.next=null):ce.corkedRequestsFree=new v(ce),ce.bufferedRequestCount=0}else{for(;le;){var Re=le.chunk,ot=le.encoding,nt=le.callback;if(I(we,ce,!1,ce.objectMode?1:Re.length,Re,ot,nt),le=le.next,ce.bufferedRequestCount--,ce.writing)break}null===le&&(ce.lastBufferedRequest=null)}ce.bufferedRequest=le,ce.bufferProcessing=!1}function re(we){return we.ending&&0===we.length&&null===we.bufferedRequest&&!we.finished&&!we.writing}function ne(we,ce){we._final(function(le){ce.pendingcb--,le&&Y(we,le),ce.prefinished=!0,we.emit("prefinish"),ae(we,ce)})}function ae(we,ce){var le=re(ce);if(le&&(function te(we,ce){!ce.prefinished&&!ce.finalCalled&&("function"!=typeof we._final||ce.destroyed?(ce.prefinished=!0,we.emit("prefinish")):(ce.pendingcb++,ce.finalCalled=!0,process.nextTick(ne,we,ce)))}(we,ce),0===ce.pendingcb&&(ce.finished=!0,we.emit("finish"),ce.autoDestroy))){var ue=we._readableState;(!ue||ue.autoDestroy&&ue.endEmitted)&&we.destroy()}return le}u(83894)(Z,s),F.prototype.getBuffer=function(){for(var ce=this.bufferedRequest,le=[];ce;)le.push(ce),ce=ce.next;return le},function(){try{Object.defineProperty(F.prototype,"buffer",{get:M.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(Z,Symbol.hasInstance,{value:function(ce){return!!j.call(this,ce)||this===Z&&(ce&&ce._writableState instanceof F)}})):j=function(ce){return ce instanceof this},Z.prototype.pipe=function(){Y(this,new C)},Z.prototype.write=function(we,ce,le){var ue=this._writableState,fe=!1,he=!ue.objectMode&&function d(we){return g.isBuffer(we)||we instanceof y}(we);return he&&!g.isBuffer(we)&&(we=function f(we){return g.from(we)}(we)),"function"==typeof ce&&(le=ce,ce=null),he?ce="buffer":ce||(ce=ue.defaultEncoding),"function"!=typeof le&&(le=G),ue.ending?function T(we,ce){var le=new U;Y(we,le),process.nextTick(ce,le)}(this,le):(he||function o(we,ce,le,ue){var fe;return null===le?fe=new k:"string"!=typeof le&&!ce.objectMode&&(fe=new D("chunk",["string","Buffer"],le)),!fe||(Y(we,fe),process.nextTick(ue,fe),!1)}(this,ue,we,le))&&(ue.pendingcb++,fe=function w(we,ce,le,ue,fe,he){if(!le){var Ae=function h(we,ce,le){return!we.objectMode&&!1!==we.decodeStrings&&"string"==typeof ce&&(ce=g.from(ce,le)),ce}(ce,ue,fe);ue!==Ae&&(le=!0,fe="buffer",ue=Ae)}var Pe=ce.objectMode?1:ue.length;ce.length+=Pe;var Re=ce.length-1))throw new z(ce);return this._writableState.defaultEncoding=ce,this},Object.defineProperty(Z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Z.prototype._write=function(we,ce,le){le(new P("_write()"))},Z.prototype._writev=null,Z.prototype.end=function(we,ce,le){var ue=this._writableState;return"function"==typeof we?(le=we,we=null,ce=null):"function"==typeof ce&&(le=ce,ce=null),null!=we&&this.write(we,ce),ue.corked&&(ue.corked=1,this.uncork()),ue.ending||function ge(we,ce,le){ce.ending=!0,ae(we,ce),le&&(ce.finished?process.nextTick(le):we.once("finish",le)),ce.ended=!0,we.writable=!1}(this,ue,le),this},Object.defineProperty(Z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Z.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ce){this._writableState&&(this._writableState.destroyed=ce)}}),Z.prototype.destroy=p.destroy,Z.prototype._undestroy=p.undestroy,Z.prototype._destroy=function(we,ce){ce(we)}},13872:(q,n,u)=>{"use strict";var l;function v(U,z,Y){return z=function E(U){var z=function M(U,z){if("object"!=typeof U||null===U)return U;var Y=U[Symbol.toPrimitive];if(void 0!==Y){var G=Y.call(U,z||"default");if("object"!=typeof G)return G;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===z?String:Number)(U)}(U,"string");return"symbol"==typeof z?z:String(z)}(z),z in U?Object.defineProperty(U,z,{value:Y,enumerable:!0,configurable:!0,writable:!0}):U[z]=Y,U}var s=u(67542),g=Symbol("lastResolve"),y=Symbol("lastReject"),f=Symbol("error"),d=Symbol("ended"),p=Symbol("lastPromise"),m=Symbol("handlePromise"),S=Symbol("stream");function _(U,z){return{value:U,done:z}}function D(U){var z=U[g];if(null!==z){var Y=U[S].read();null!==Y&&(U[p]=null,U[g]=null,U[y]=null,z(_(Y,!1)))}}function P(U){process.nextTick(D,U)}var C=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((v(l={get stream(){return this[S]},next:function(){var z=this,Y=this[f];if(null!==Y)return Promise.reject(Y);if(this[d])return Promise.resolve(_(void 0,!0));if(this[S].destroyed)return new Promise(function(Z,T){process.nextTick(function(){z[f]?T(z[f]):Z(_(void 0,!0))})});var F,G=this[p];if(G)F=new Promise(function x(U,z){return function(Y,G){U.then(function(){z[d]?Y(_(void 0,!0)):z[m](Y,G)},G)}}(G,this));else{var j=this[S].read();if(null!==j)return Promise.resolve(_(j,!1));F=new Promise(this[m])}return this[p]=F,F}},Symbol.asyncIterator,function(){return this}),v(l,"return",function(){var z=this;return new Promise(function(Y,G){z[S].destroy(null,function(F){F?G(F):Y(_(void 0,!0))})})}),l),C);q.exports=function(z){var Y,G=Object.create(N,(v(Y={},S,{value:z,writable:!0}),v(Y,g,{value:null,writable:!0}),v(Y,y,{value:null,writable:!0}),v(Y,f,{value:null,writable:!0}),v(Y,d,{value:z._readableState.endEmitted,writable:!0}),v(Y,m,{value:function(j,Z){var T=G[S].read();T?(G[p]=null,G[g]=null,G[y]=null,j(_(T,!1))):(G[g]=j,G[y]=Z)},writable:!0}),Y));return G[p]=null,s(z,function(F){if(F&&"ERR_STREAM_PREMATURE_CLOSE"!==F.code){var j=G[y];return null!==j&&(G[p]=null,G[g]=null,G[y]=null,j(F)),void(G[f]=F)}var Z=G[g];null!==Z&&(G[p]=null,G[g]=null,G[y]=null,Z(_(void 0,!0))),G[d]=!0}),z.on("readable",P.bind(null,G)),G}},25019:(q,n,u)=>{"use strict";function l(P,x){var C=Object.keys(P);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(P);x&&(N=N.filter(function(k){return Object.getOwnPropertyDescriptor(P,k).enumerable})),C.push.apply(C,N)}return C}function v(P){for(var x=1;x0?this.tail.next=N:this.head=N,this.tail=N,++this.length}},{key:"unshift",value:function(C){var N={data:C,next:this.head};0===this.length&&(this.tail=N),this.head=N,++this.length}},{key:"shift",value:function(){if(0!==this.length){var C=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,C}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(C){if(0===this.length)return"";for(var N=this.head,k=""+N.data;N=N.next;)k+=C+N.data;return k}},{key:"concat",value:function(C){if(0===this.length)return p.alloc(0);for(var N=p.allocUnsafe(C>>>0),k=this.head,U=0;k;)D(k.data,N,U),U+=k.data.length,k=k.next;return N}},{key:"consume",value:function(C,N){var k;return Cz.length?z.length:C;if(Y===z.length?U+=z:U+=z.slice(0,C),0===(C-=Y)){Y===z.length?(++k,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=z.slice(Y));break}++k}return this.length-=k,U}},{key:"_getBuffer",value:function(C){var N=p.allocUnsafe(C),k=this.head,U=1;for(k.data.copy(N),C-=k.data.length;k=k.next;){var z=k.data,Y=C>z.length?z.length:C;if(z.copy(N,N.length-C,0,Y),0===(C-=Y)){Y===z.length?(++U,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=z.slice(Y));break}++U}return this.length-=U,N}},{key:_,value:function(C,N){return S(this,v(v({},N),{},{depth:0,customInspect:!1}))}}]),P}()},41920:q=>{"use strict";function u(s,g){E(s,g),l(s)}function l(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit("close")}function E(s,g){s.emit("error",g)}q.exports={destroy:function n(s,g){var y=this,f=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return f||d?(g?g(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(E,this,s)):process.nextTick(E,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(p){!g&&p?y._writableState?y._writableState.errorEmitted?process.nextTick(l,y):(y._writableState.errorEmitted=!0,process.nextTick(u,y,p)):process.nextTick(u,y,p):g?(process.nextTick(l,y),g(p)):process.nextTick(l,y)}),this)},undestroy:function v(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function M(s,g){var y=s._readableState,f=s._writableState;y&&y.autoDestroy||f&&f.autoDestroy?s.destroy(g):s.emit("error",g)}}},67542:(q,n,u)=>{"use strict";var l=u(70891).q.ERR_STREAM_PREMATURE_CLOSE;function E(){}q.exports=function s(g,y,f){if("function"==typeof y)return s(g,null,y);y||(y={}),f=function v(g){var y=!1;return function(){if(!y){y=!0;for(var f=arguments.length,d=new Array(f),p=0;p{q.exports=function(){throw new Error("Readable.from is not available in the browser")}},90954:(q,n,u)=>{"use strict";var l;var E=u(70891).q,M=E.ERR_MISSING_ARGS,s=E.ERR_STREAM_DESTROYED;function g(_){if(_)throw _}function d(_){_()}function p(_,D){return _.pipe(D)}q.exports=function S(){for(var _=arguments.length,D=new Array(_),P=0;P<_;P++)D[P]=arguments[P];var x=function m(_){return _.length&&"function"==typeof _[_.length-1]?_.pop():g}(D);if(Array.isArray(D[0])&&(D=D[0]),D.length<2)throw new M("streams");var C,N=D.map(function(k,U){var z=U0,function(G){C||(C=G),G&&N.forEach(d),!z&&(N.forEach(d),x(C))})});return D.reduce(p)}},47102:(q,n,u)=>{"use strict";var l=u(70891).q.ERR_INVALID_OPT_VALUE;q.exports={getHighWaterMark:function E(M,s,g,y){var f=function v(M,s,g){return null!=M.highWaterMark?M.highWaterMark:s?M[g]:null}(s,y,g);if(null!=f){if(!isFinite(f)||Math.floor(f)!==f||f<0)throw new l(y?g:"highWaterMark",f);return Math.floor(f)}return M.objectMode?16:16384}}},4970:(q,n,u)=>{q.exports=u(59069).EventEmitter},53720:(q,n,u)=>{"use strict";var l=u(73502).Buffer,v=l.isEncoding||function(N){switch((N=""+N)&&N.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(N){var k;switch(this.encoding=function M(N){var k=function E(N){if(!N)return"utf8";for(var k;;)switch(N){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return N;default:if(k)return;N=(""+N).toLowerCase(),k=!0}}(N);if("string"!=typeof k&&(l.isEncoding===v||!v(N)))throw new Error("Unknown encoding: "+N);return k||N}(N),this.encoding){case"utf16le":this.text=S,this.end=_,k=4;break;case"utf8":this.fillLast=d,k=4;break;case"base64":this.text=D,this.end=P,k=3;break;default:return this.write=x,void(this.end=C)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(k)}function g(N){return N<=127?0:N>>5==6?2:N>>4==14?3:N>>3==30?4:N>>6==2?-1:-2}function d(N){var k=this.lastTotal-this.lastNeed,U=function f(N,k,U){if(128!=(192&k[0]))return N.lastNeed=0,"\ufffd";if(N.lastNeed>1&&k.length>1){if(128!=(192&k[1]))return N.lastNeed=1,"\ufffd";if(N.lastNeed>2&&k.length>2&&128!=(192&k[2]))return N.lastNeed=2,"\ufffd"}}(this,N);return void 0!==U?U:this.lastNeed<=N.length?(N.copy(this.lastChar,k,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(N.copy(this.lastChar,k,0,N.length),void(this.lastNeed-=N.length))}function S(N,k){if((N.length-k)%2==0){var U=N.toString("utf16le",k);if(U){var z=U.charCodeAt(U.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],U.slice(0,-1)}return U}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",k,N.length-1)}function _(N){var k=N&&N.length?this.write(N):"";if(this.lastNeed){var U=this.lastTotal-this.lastNeed;return k+this.lastChar.toString("utf16le",0,U)}return k}function D(N,k){var U=(N.length-k)%3;return 0===U?N.toString("base64",k):(this.lastNeed=3-U,this.lastTotal=3,1===U?this.lastChar[0]=N[N.length-1]:(this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1]),N.toString("base64",k,N.length-U))}function P(N){var k=N&&N.length?this.write(N):"";return this.lastNeed?k+this.lastChar.toString("base64",0,3-this.lastNeed):k}function x(N){return N.toString(this.encoding)}function C(N){return N&&N.length?this.write(N):""}n.s=s,s.prototype.write=function(N){if(0===N.length)return"";var k,U;if(this.lastNeed){if(void 0===(k=this.fillLast(N)))return"";U=this.lastNeed,this.lastNeed=0}else U=0;return U=0?(Y>0&&(N.lastNeed=Y-1),Y):--z=0?(Y>0&&(N.lastNeed=Y-2),Y):--z=0?(Y>0&&(2===Y?Y=0:N.lastNeed=Y-3),Y):0))}(this,N,k);if(!this.lastNeed)return N.toString("utf8",k);this.lastTotal=U;var z=N.length-(U-this.lastNeed);return N.copy(this.lastChar,0,z),N.toString("utf8",k,z)},s.prototype.fillLast=function(N){if(this.lastNeed<=N.length)return N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,this.lastTotal-this.lastNeed,0,N.length),this.lastNeed-=N.length}},65685:(q,n,u)=>{(n=q.exports=u(3154)).Stream=n,n.Readable=n,n.Writable=u(20520),n.Duplex=u(41339),n.Transform=u(6025),n.PassThrough=u(56071),n.finished=u(67542),n.pipeline=u(90954)},75634:(q,n,u)=>{"use strict";var l=u(93172).Buffer,v=u(83894),E=u(17277),M=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function m(){E.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function S(N,k){return N<>>32-k}function _(N,k,U,z,Y,G,F,j){return S(N+(k^U^z)+G+F|0,j)+Y|0}function D(N,k,U,z,Y,G,F,j){return S(N+(k&U|~k&z)+G+F|0,j)+Y|0}function P(N,k,U,z,Y,G,F,j){return S(N+((k|~U)^z)+G+F|0,j)+Y|0}function x(N,k,U,z,Y,G,F,j){return S(N+(k&z|U&~z)+G+F|0,j)+Y|0}function C(N,k,U,z,Y,G,F,j){return S(N+(k^(U|~z))+G+F|0,j)+Y|0}v(m,E),m.prototype._update=function(){for(var N=M,k=0;k<16;++k)N[k]=this._block.readInt32LE(4*k);for(var U=0|this._a,z=0|this._b,Y=0|this._c,G=0|this._d,F=0|this._e,j=0|this._a,Z=0|this._b,T=0|this._c,o=0|this._d,h=0|this._e,w=0;w<80;w+=1){var I,R;w<16?(I=_(U,z,Y,G,F,N[s[w]],d[0],y[w]),R=C(j,Z,T,o,h,N[g[w]],p[0],f[w])):w<32?(I=D(U,z,Y,G,F,N[s[w]],d[1],y[w]),R=x(j,Z,T,o,h,N[g[w]],p[1],f[w])):w<48?(I=P(U,z,Y,G,F,N[s[w]],d[2],y[w]),R=P(j,Z,T,o,h,N[g[w]],p[2],f[w])):w<64?(I=x(U,z,Y,G,F,N[s[w]],d[3],y[w]),R=D(j,Z,T,o,h,N[g[w]],p[3],f[w])):(I=C(U,z,Y,G,F,N[s[w]],d[4],y[w]),R=_(j,Z,T,o,h,N[g[w]],p[4],f[w])),U=F,F=G,G=S(Y,10),Y=z,z=I,j=h,h=o,o=S(T,10),T=Z,Z=R}var V=this._b+Y+o|0;this._b=this._c+G+h|0,this._c=this._d+F+j|0,this._d=this._e+U+Z|0,this._e=this._a+z+T|0,this._a=V},m.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var N=l.alloc?l.alloc(20):new l(20);return N.writeInt32LE(this._a,0),N.writeInt32LE(this._b,4),N.writeInt32LE(this._c,8),N.writeInt32LE(this._d,12),N.writeInt32LE(this._e,16),N},q.exports=m},17277:(q,n,u)=>{"use strict";var l=u(73502).Buffer,v=u(65685).Transform;function s(g){v.call(this),this._block=l.allocUnsafe(g),this._blockSize=g,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}u(83894)(s,v),s.prototype._transform=function(g,y,f){var d=null;try{this.update(g,y)}catch(p){d=p}f(d)},s.prototype._flush=function(g){var y=null;try{this.push(this.digest())}catch(f){y=f}g(y)},s.prototype.update=function(g,y){if(function M(g,y){if(!l.isBuffer(g)&&"string"!=typeof g)throw new TypeError(y+" must be a string or a buffer")}(g,"Data"),this._finalized)throw new Error("Digest already called");l.isBuffer(g)||(g=l.from(g,y));for(var f=this._block,d=0;this._blockOffset+g.length-d>=this._blockSize;){for(var p=this._blockOffset;p0;++m)this._length[m]+=S,(S=this._length[m]/4294967296|0)>0&&(this._length[m]-=4294967296*S);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(g){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var y=this._digest();void 0!==g&&(y=y.toString(g)),this._block.fill(0),this._blockOffset=0;for(var f=0;f<4;++f)this._length[f]=0;return y},s.prototype._digest=function(){throw new Error("_digest is not implemented")},q.exports=s},73502:(q,n,u)=>{var l=u(93172),v=l.Buffer;function E(s,g){for(var y in s)g[y]=s[y]}function M(s,g,y){return v(s,g,y)}v.from&&v.alloc&&v.allocUnsafe&&v.allocUnsafeSlow?q.exports=l:(E(l,n),n.Buffer=M),M.prototype=Object.create(v.prototype),E(v,M),M.from=function(s,g,y){if("number"==typeof s)throw new TypeError("Argument must not be a number");return v(s,g,y)},M.alloc=function(s,g,y){if("number"!=typeof s)throw new TypeError("Argument must be a number");var f=v(s);return void 0!==g?"string"==typeof y?f.fill(g,y):f.fill(g):f.fill(0),f},M.allocUnsafe=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return v(s)},M.allocUnsafeSlow=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return l.SlowBuffer(s)}},40191:(q,n)=>{"use strict";function u(V,H){var L=V.length;V.push(H);e:for(;0>>1,B=V[b];if(!(0>>1;bE(te,L))aeE(ge,te)?(V[b]=ge,V[ae]=L,b=ae):(V[b]=te,V[ne]=L,b=ne);else{if(!(aeE(ge,L)))break e;V[b]=ge,V[ae]=L,b=ae}}}return H}function E(V,H){var L=V.sortIndex-H.sortIndex;return 0!==L?L:V.id-H.id}if("object"==typeof performance&&"function"==typeof performance.now){var M=performance;n.unstable_now=function(){return M.now()}}else{var s=Date,g=s.now();n.unstable_now=function(){return s.now()-g}}var y=[],f=[],d=1,p=null,m=3,S=!1,_=!1,D=!1,P="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function N(V){for(var H=l(f);null!==H;){if(null===H.callback)v(f);else{if(!(H.startTime<=V))break;v(f),H.sortIndex=H.expirationTime,u(y,H)}H=l(f)}}function k(V){if(D=!1,N(V),!_)if(null!==l(y))_=!0,I(U);else{var H=l(f);null!==H&&R(k,H.startTime-V)}}function U(V,H){_=!1,D&&(D=!1,x(G),G=-1),S=!0;var L=m;try{for(N(H),p=l(y);null!==p&&(!(p.expirationTime>H)||V&&!Z());){var b=p.callback;if("function"==typeof b){p.callback=null,m=p.priorityLevel;var B=b(p.expirationTime<=H);H=n.unstable_now(),"function"==typeof B?p.callback=B:p===l(y)&&v(y),N(H)}else v(y);p=l(y)}if(null!==p)var re=!0;else{var ne=l(f);null!==ne&&R(k,ne.startTime-H),re=!1}return re}finally{p=null,m=L,S=!1}}typeof navigator<"u"&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var o,z=!1,Y=null,G=-1,F=5,j=-1;function Z(){return!(n.unstable_now()-jV||125b?(V.sortIndex=L,u(f,V),null===l(y)&&V===l(f)&&(D?(x(G),G=-1):D=!0,R(k,L-b))):(V.sortIndex=B,u(y,V),_||S||(_=!0,I(U))),V},n.unstable_shouldYield=Z,n.unstable_wrapCallback=function(V){var H=m;return function(){var L=m;m=H;try{return V.apply(this,arguments)}finally{m=L}}}},44854:(q,n,u)=>{"use strict";q.exports=u(40191)},62708:function(q){"use strict";!function(n){function l(S){const _=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);let D=1779033703,P=3144134277,x=1013904242,C=2773480762,N=1359893119,k=2600822924,U=528734635,z=1541459225;const Y=new Uint32Array(64);function G(w){let I=0,R=w.length;for(;R>=64;){let ae,ge,pe,we,ce,V=D,H=P,L=x,b=C,B=N,re=k,ne=U,te=z;for(ge=0;ge<16;ge++)pe=I+4*ge,Y[ge]=(255&w[pe])<<24|(255&w[pe+1])<<16|(255&w[pe+2])<<8|255&w[pe+3];for(ge=16;ge<64;ge++)ae=Y[ge-2],we=(ae>>>17|ae<<15)^(ae>>>19|ae<<13)^ae>>>10,ae=Y[ge-15],ce=(ae>>>7|ae<<25)^(ae>>>18|ae<<14)^ae>>>3,Y[ge]=(we+Y[ge-7]|0)+(ce+Y[ge-16]|0)|0;for(ge=0;ge<64;ge++)we=(((B>>>6|B<<26)^(B>>>11|B<<21)^(B>>>25|B<<7))+(B&re^~B&ne)|0)+(te+(_[ge]+Y[ge]|0)|0)|0,ce=((V>>>2|V<<30)^(V>>>13|V<<19)^(V>>>22|V<<10))+(V&H^V&L^H&L)|0,te=ne,ne=re,re=B,B=b+we|0,b=L,L=H,H=V,V=we+ce|0;D=D+V|0,P=P+H|0,x=x+L|0,C=C+b|0,N=N+B|0,k=k+re|0,U=U+ne|0,z=z+te|0,I+=64,R-=64}}G(S);let F,j=S.length%64,Z=S.length/536870912|0,T=S.length<<3,o=j<56?56:120,h=S.slice(S.length-j,S.length);for(h.push(128),F=j+1;F>>24&255),h.push(Z>>>16&255),h.push(Z>>>8&255),h.push(Z>>>0&255),h.push(T>>>24&255),h.push(T>>>16&255),h.push(T>>>8&255),h.push(T>>>0&255),G(h),[D>>>24&255,D>>>16&255,D>>>8&255,D>>>0&255,P>>>24&255,P>>>16&255,P>>>8&255,P>>>0&255,x>>>24&255,x>>>16&255,x>>>8&255,x>>>0&255,C>>>24&255,C>>>16&255,C>>>8&255,C>>>0&255,N>>>24&255,N>>>16&255,N>>>8&255,N>>>0&255,k>>>24&255,k>>>16&255,k>>>8&255,k>>>0&255,U>>>24&255,U>>>16&255,U>>>8&255,U>>>0&255,z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255]}function v(S,_,D){S=S.length<=64?S:l(S);const P=64+_.length+4,x=new Array(P),C=new Array(64);let N,k=[];for(N=0;N<64;N++)x[N]=54;for(N=0;N=P-4;z--){if(x[z]++,x[z]<=255)return;x[z]=0}}for(;D>=32;)U(),k=k.concat(l(C.concat(l(x)))),D-=32;return D>0&&(U(),k=k.concat(l(C.concat(l(x))).slice(0,D))),k}function E(S,_,D,P,x){let C;for(y(S,16*(2*D-1),x,0,16),C=0;C<2*D;C++)g(S,16*C,x,16),s(x,P),y(x,0,S,_+16*C,16);for(C=0;C>>32-_}function s(S,_){y(S,0,_,0,16);for(let D=8;D>0;D-=2)_[4]^=M(_[0]+_[12],7),_[8]^=M(_[4]+_[0],9),_[12]^=M(_[8]+_[4],13),_[0]^=M(_[12]+_[8],18),_[9]^=M(_[5]+_[1],7),_[13]^=M(_[9]+_[5],9),_[1]^=M(_[13]+_[9],13),_[5]^=M(_[1]+_[13],18),_[14]^=M(_[10]+_[6],7),_[2]^=M(_[14]+_[10],9),_[6]^=M(_[2]+_[14],13),_[10]^=M(_[6]+_[2],18),_[3]^=M(_[15]+_[11],7),_[7]^=M(_[3]+_[15],9),_[11]^=M(_[7]+_[3],13),_[15]^=M(_[11]+_[7],18),_[1]^=M(_[0]+_[3],7),_[2]^=M(_[1]+_[0],9),_[3]^=M(_[2]+_[1],13),_[0]^=M(_[3]+_[2],18),_[6]^=M(_[5]+_[4],7),_[7]^=M(_[6]+_[5],9),_[4]^=M(_[7]+_[6],13),_[5]^=M(_[4]+_[7],18),_[11]^=M(_[10]+_[9],7),_[8]^=M(_[11]+_[10],9),_[9]^=M(_[8]+_[11],13),_[10]^=M(_[9]+_[8],18),_[12]^=M(_[15]+_[14],7),_[13]^=M(_[12]+_[15],9),_[14]^=M(_[13]+_[12],13),_[15]^=M(_[14]+_[13],18);for(let D=0;D<16;++D)S[D]+=_[D]}function g(S,_,D,P){for(let x=0;x=256)return!1}return!0}function d(S,_){if("number"!=typeof S||S%1)throw new Error("invalid "+_);return S}function p(S,_,D,P,x,C,N){if(D=d(D,"N"),P=d(P,"r"),x=d(x,"p"),C=d(C,"dkLen"),0===D||D&D-1)throw new Error("N must be power of 2");if(D>2147483647/128/P)throw new Error("N too large");if(P>2147483647/128/x)throw new Error("r too large");if(!f(S))throw new Error("password must be an array or buffer");if(S=Array.prototype.slice.call(S),!f(_))throw new Error("salt must be an array or buffer");_=Array.prototype.slice.call(_);let k=v(S,_,128*x*P);const U=new Uint32Array(32*x*P);for(let B=0;BH&&(B=H);for(let ne=0;neH&&(B=H);for(let ne=0;ne>0&255),k.push(U[ne]>>8&255),k.push(U[ne]>>16&255),k.push(U[ne]>>24&255);const re=v(S,k,C);return N&&N(null,1,re),re}N&&L(b)};if(!N)for(;;){const B=b();if(null!=B)return B}b()}const m={scrypt:function(S,_,D,P,x,C,N){return new Promise(function(k,U){let z=0;N&&N(0),p(S,_,D,P,x,C,function(Y,G,F){if(Y)U(Y);else if(F)N&&1!==z&&N(1),k(new Uint8Array(F));else if(N&&G!==z)return z=G,N(G)})})},syncScrypt:function(S,_,D,P,x,C){return new Uint8Array(p(S,_,D,P,x,C))}};q.exports=m}()},50508:(q,n,u)=>{const l=Symbol("SemVer ANY");class v{static get ANY(){return l}constructor(m,S){if(S=E(S),m instanceof v){if(m.loose===!!S.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),y("comparator",m,S),this.options=S,this.loose=!!S.loose,this.parse(m),this.semver===l?this.value="":this.value=this.operator+this.semver.version,y("comp",this)}parse(m){const S=this.options.loose?M[s.COMPARATORLOOSE]:M[s.COMPARATOR],_=m.match(S);if(!_)throw new TypeError(`Invalid comparator: ${m}`);this.operator=void 0!==_[1]?_[1]:"","="===this.operator&&(this.operator=""),_[2]?this.semver=new f(_[2],this.options.loose):this.semver=l}toString(){return this.value}test(m){if(y("Comparator.test",m,this.options.loose),this.semver===l||m===l)return!0;if("string"==typeof m)try{m=new f(m,this.options)}catch{return!1}return g(m,this.operator,this.semver,this.options)}intersects(m,S){if(!(m instanceof v))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(m.value,S).test(this.value):""===m.operator?""===m.value||new d(this.value,S).test(m.semver):!((S=E(S)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===m.value)||!S.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||g(this.semver,"<",m.semver,S)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||g(this.semver,">",m.semver,S)&&this.operator.startsWith("<")&&m.operator.startsWith(">"))}}q.exports=v;const E=u(20471),{safeRe:M,t:s}=u(1338),g=u(68127),y=u(66070),f=u(51839),d=u(48611)},48611:(q,n,u)=>{class l{constructor(I,R){if(R=M(R),I instanceof l)return I.loose===!!R.loose&&I.includePrerelease===!!R.includePrerelease?I:new l(I.raw,R);if(I instanceof s)return this.raw=I.value,this.set=[[I]],this.format(),this;if(this.options=R,this.loose=!!R.loose,this.includePrerelease=!!R.includePrerelease,this.raw=I.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(V=>this.parseRange(V.trim())).filter(V=>V.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const V=this.set[0];if(this.set=this.set.filter(H=>!P(H[0])),0===this.set.length)this.set=[V];else if(this.set.length>1)for(const H of this.set)if(1===H.length&&x(H[0])){this.set=[H];break}}this.format()}format(){return this.range=this.set.map(I=>I.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(I){const V=((this.options.includePrerelease&&_)|(this.options.loose&&D))+":"+I,H=E.get(V);if(H)return H;const L=this.options.loose,b=L?f[d.HYPHENRANGELOOSE]:f[d.HYPHENRANGE];I=I.replace(b,o(this.options.includePrerelease)),g("hyphen replace",I),I=I.replace(f[d.COMPARATORTRIM],p),g("comparator trim",I),I=I.replace(f[d.TILDETRIM],m),g("tilde trim",I),I=I.replace(f[d.CARETTRIM],S),g("caret trim",I);let B=I.split(" ").map(ae=>N(ae,this.options)).join(" ").split(/\s+/).map(ae=>T(ae,this.options));L&&(B=B.filter(ae=>(g("loose invalid filter",ae,this.options),!!ae.match(f[d.COMPARATORLOOSE])))),g("range list",B);const re=new Map,ne=B.map(ae=>new s(ae,this.options));for(const ae of ne){if(P(ae))return[ae];re.set(ae.value,ae)}re.size>1&&re.has("")&&re.delete("");const te=[...re.values()];return E.set(V,te),te}intersects(I,R){if(!(I instanceof l))throw new TypeError("a Range is required");return this.set.some(V=>C(V,R)&&I.set.some(H=>C(H,R)&&V.every(L=>H.every(b=>L.intersects(b,R)))))}test(I){if(!I)return!1;if("string"==typeof I)try{I=new y(I,this.options)}catch{return!1}for(let R=0;R"<0.0.0-0"===w.value,x=w=>""===w.value,C=(w,I)=>{let R=!0;const V=w.slice();let H=V.pop();for(;R&&V.length;)R=V.every(L=>H.intersects(L,I)),H=V.pop();return R},N=(w,I)=>(g("comp",w,I),w=Y(w,I),g("caret",w),w=U(w,I),g("tildes",w),w=F(w,I),g("xrange",w),w=Z(w,I),g("stars",w),w),k=w=>!w||"x"===w.toLowerCase()||"*"===w,U=(w,I)=>w.trim().split(/\s+/).map(R=>z(R,I)).join(" "),z=(w,I)=>{const R=I.loose?f[d.TILDELOOSE]:f[d.TILDE];return w.replace(R,(V,H,L,b,B)=>{let re;return g("tilde",w,V,H,L,b,B),k(H)?re="":k(L)?re=`>=${H}.0.0 <${+H+1}.0.0-0`:k(b)?re=`>=${H}.${L}.0 <${H}.${+L+1}.0-0`:B?(g("replaceTilde pr",B),re=`>=${H}.${L}.${b}-${B} <${H}.${+L+1}.0-0`):re=`>=${H}.${L}.${b} <${H}.${+L+1}.0-0`,g("tilde return",re),re})},Y=(w,I)=>w.trim().split(/\s+/).map(R=>G(R,I)).join(" "),G=(w,I)=>{g("caret",w,I);const R=I.loose?f[d.CARETLOOSE]:f[d.CARET],V=I.includePrerelease?"-0":"";return w.replace(R,(H,L,b,B,re)=>{let ne;return g("caret",w,H,L,b,B,re),k(L)?ne="":k(b)?ne=`>=${L}.0.0${V} <${+L+1}.0.0-0`:k(B)?ne="0"===L?`>=${L}.${b}.0${V} <${L}.${+b+1}.0-0`:`>=${L}.${b}.0${V} <${+L+1}.0.0-0`:re?(g("replaceCaret pr",re),ne="0"===L?"0"===b?`>=${L}.${b}.${B}-${re} <${L}.${b}.${+B+1}-0`:`>=${L}.${b}.${B}-${re} <${L}.${+b+1}.0-0`:`>=${L}.${b}.${B}-${re} <${+L+1}.0.0-0`):(g("no pr"),ne="0"===L?"0"===b?`>=${L}.${b}.${B}${V} <${L}.${b}.${+B+1}-0`:`>=${L}.${b}.${B}${V} <${L}.${+b+1}.0-0`:`>=${L}.${b}.${B} <${+L+1}.0.0-0`),g("caret return",ne),ne})},F=(w,I)=>(g("replaceXRanges",w,I),w.split(/\s+/).map(R=>j(R,I)).join(" ")),j=(w,I)=>{w=w.trim();const R=I.loose?f[d.XRANGELOOSE]:f[d.XRANGE];return w.replace(R,(V,H,L,b,B,re)=>{g("xRange",w,V,H,L,b,B,re);const ne=k(L),te=ne||k(b),ae=te||k(B),ge=ae;return"="===H&&ge&&(H=""),re=I.includePrerelease?"-0":"",ne?V=">"===H||"<"===H?"<0.0.0-0":"*":H&&ge?(te&&(b=0),B=0,">"===H?(H=">=",te?(L=+L+1,b=0,B=0):(b=+b+1,B=0)):"<="===H&&(H="<",te?L=+L+1:b=+b+1),"<"===H&&(re="-0"),V=`${H+L}.${b}.${B}${re}`):te?V=`>=${L}.0.0${re} <${+L+1}.0.0-0`:ae&&(V=`>=${L}.${b}.0${re} <${L}.${+b+1}.0-0`),g("xRange return",V),V})},Z=(w,I)=>(g("replaceStars",w,I),w.trim().replace(f[d.STAR],"")),T=(w,I)=>(g("replaceGTE0",w,I),w.trim().replace(f[I.includePrerelease?d.GTE0PRE:d.GTE0],"")),o=w=>(I,R,V,H,L,b,B,re,ne,te,ae,ge)=>`${R=k(V)?"":k(H)?`>=${V}.0.0${w?"-0":""}`:k(L)?`>=${V}.${H}.0${w?"-0":""}`:b?`>=${R}`:`>=${R}${w?"-0":""}`} ${re=k(ne)?"":k(te)?`<${+ne+1}.0.0-0`:k(ae)?`<${ne}.${+te+1}.0-0`:ge?`<=${ne}.${te}.${ae}-${ge}`:w?`<${ne}.${te}.${+ae+1}-0`:`<=${re}`}`.trim(),h=(w,I,R)=>{for(let V=0;V0){const H=w[V].semver;if(H.major===I.major&&H.minor===I.minor&&H.patch===I.patch)return!0}return!1}return!0}},51839:(q,n,u)=>{const l=u(66070),{MAX_LENGTH:v,MAX_SAFE_INTEGER:E}=u(31696),{safeRe:M,t:s}=u(1338),g=u(20471),{compareIdentifiers:y}=u(67165);class f{constructor(p,m){if(m=g(m),p instanceof f){if(p.loose===!!m.loose&&p.includePrerelease===!!m.includePrerelease)return p;p=p.version}else if("string"!=typeof p)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof p}".`);if(p.length>v)throw new TypeError(`version is longer than ${v} characters`);l("SemVer",p,m),this.options=m,this.loose=!!m.loose,this.includePrerelease=!!m.includePrerelease;const S=p.trim().match(m.loose?M[s.LOOSE]:M[s.FULL]);if(!S)throw new TypeError(`Invalid Version: ${p}`);if(this.raw=p,this.major=+S[1],this.minor=+S[2],this.patch=+S[3],this.major>E||this.major<0)throw new TypeError("Invalid major version");if(this.minor>E||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>E||this.patch<0)throw new TypeError("Invalid patch version");S[4]?this.prerelease=S[4].split(".").map(_=>{if(/^[0-9]+$/.test(_)){const D=+_;if(D>=0&&D=0;)"number"==typeof this.prerelease[D]&&(this.prerelease[D]++,D=-2);if(-1===D){if(m===this.prerelease.join(".")&&!1===S)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(_)}}if(m){let D=[m,_];!1===S&&(D=[m]),0===y(this.prerelease[0],m)?isNaN(this.prerelease[1])&&(this.prerelease=D):this.prerelease=D}break}default:throw new Error(`invalid increment argument: ${p}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}q.exports=f},69862:(q,n,u)=>{const l=u(62306);q.exports=(E,M)=>{const s=l(E.trim().replace(/^[=v]+/,""),M);return s?s.version:null}},68127:(q,n,u)=>{const l=u(95097),v=u(42046),E=u(97283),M=u(45844),s=u(30845),g=u(20477);q.exports=(f,d,p,m)=>{switch(d){case"===":return"object"==typeof f&&(f=f.version),"object"==typeof p&&(p=p.version),f===p;case"!==":return"object"==typeof f&&(f=f.version),"object"==typeof p&&(p=p.version),f!==p;case"":case"=":case"==":return l(f,p,m);case"!=":return v(f,p,m);case">":return E(f,p,m);case">=":return M(f,p,m);case"<":return s(f,p,m);case"<=":return g(f,p,m);default:throw new TypeError(`Invalid operator: ${d}`)}}},8797:(q,n,u)=>{const l=u(51839),v=u(62306),{safeRe:E,t:M}=u(1338);q.exports=(g,y)=>{if(g instanceof l)return g;if("number"==typeof g&&(g=String(g)),"string"!=typeof g)return null;let f=null;if((y=y||{}).rtl){const D=y.includePrerelease?E[M.COERCERTLFULL]:E[M.COERCERTL];let P;for(;(P=D.exec(g))&&(!f||f.index+f[0].length!==g.length);)(!f||P.index+P[0].length!==f.index+f[0].length)&&(f=P),D.lastIndex=P.index+P[1].length+P[2].length;D.lastIndex=-1}else f=g.match(y.includePrerelease?E[M.COERCEFULL]:E[M.COERCE]);if(null===f)return null;const d=f[2],p=f[3]||"0",m=f[4]||"0",S=y.includePrerelease&&f[5]?`-${f[5]}`:"",_=y.includePrerelease&&f[6]?`+${f[6]}`:"";return v(`${d}.${p}.${m}${S}${_}`,y)}},13621:(q,n,u)=>{const l=u(51839);q.exports=(E,M,s)=>{const g=new l(E,s),y=new l(M,s);return g.compare(y)||g.compareBuild(y)}},28088:(q,n,u)=>{const l=u(65522);q.exports=(E,M)=>l(E,M,!0)},65522:(q,n,u)=>{const l=u(51839);q.exports=(E,M,s)=>new l(E,s).compare(new l(M,s))},70380:(q,n,u)=>{const l=u(62306);q.exports=(E,M)=>{const s=l(E,null,!0),g=l(M,null,!0),y=s.compare(g);if(0===y)return null;const f=y>0,d=f?s:g,p=f?g:s,m=!!d.prerelease.length;if(p.prerelease.length&&!m)return p.patch||p.minor?d.patch?"patch":d.minor?"minor":"major":"major";const _=m?"pre":"";return s.major!==g.major?_+"major":s.minor!==g.minor?_+"minor":s.patch!==g.patch?_+"patch":"prerelease"}},95097:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>0===l(E,M,s)},97283:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>l(E,M,s)>0},45844:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>l(E,M,s)>=0},74749:(q,n,u)=>{const l=u(51839);q.exports=(E,M,s,g,y)=>{"string"==typeof s&&(y=g,g=s,s=void 0);try{return new l(E instanceof l?E.version:E,s).inc(M,g,y).version}catch{return null}}},30845:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>l(E,M,s)<0},20477:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>l(E,M,s)<=0},24303:(q,n,u)=>{const l=u(51839);q.exports=(E,M)=>new l(E,M).major},87920:(q,n,u)=>{const l=u(51839);q.exports=(E,M)=>new l(E,M).minor},42046:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>0!==l(E,M,s)},62306:(q,n,u)=>{const l=u(51839);q.exports=(E,M,s=!1)=>{if(E instanceof l)return E;try{return new l(E,M)}catch(g){if(!s)return null;throw g}}},81387:(q,n,u)=>{const l=u(51839);q.exports=(E,M)=>new l(E,M).patch},71964:(q,n,u)=>{const l=u(62306);q.exports=(E,M)=>{const s=l(E,M);return s&&s.prerelease.length?s.prerelease:null}},48034:(q,n,u)=>{const l=u(65522);q.exports=(E,M,s)=>l(M,E,s)},89610:(q,n,u)=>{const l=u(13621);q.exports=(E,M)=>E.sort((s,g)=>l(g,s,M))},52866:(q,n,u)=>{const l=u(48611);q.exports=(E,M,s)=>{try{M=new l(M,s)}catch{return!1}return M.test(E)}},2379:(q,n,u)=>{const l=u(13621);q.exports=(E,M)=>E.sort((s,g)=>l(s,g,M))},26473:(q,n,u)=>{const l=u(62306);q.exports=(E,M)=>{const s=l(E,M);return s?s.version:null}},97858:(q,n,u)=>{const l=u(1338),v=u(31696),E=u(51839),M=u(67165),s=u(62306),g=u(26473),y=u(69862),f=u(74749),d=u(70380),p=u(24303),m=u(87920),S=u(81387),_=u(71964),D=u(65522),P=u(48034),x=u(28088),C=u(13621),N=u(2379),k=u(89610),U=u(97283),z=u(30845),Y=u(95097),G=u(42046),F=u(45844),j=u(20477),Z=u(68127),T=u(8797),o=u(50508),h=u(48611),w=u(52866),I=u(16892),R=u(27693),V=u(24499),H=u(57291),L=u(14282),b=u(97203),B=u(82764),re=u(51658),ne=u(74741),te=u(93807),ae=u(24158);q.exports={parse:s,valid:g,clean:y,inc:f,diff:d,major:p,minor:m,patch:S,prerelease:_,compare:D,rcompare:P,compareLoose:x,compareBuild:C,sort:N,rsort:k,gt:U,lt:z,eq:Y,neq:G,gte:F,lte:j,cmp:Z,coerce:T,Comparator:o,Range:h,satisfies:w,toComparators:I,maxSatisfying:R,minSatisfying:V,minVersion:H,validRange:L,outside:b,gtr:B,ltr:re,intersects:ne,simplifyRange:te,subset:ae,SemVer:E,re:l.re,src:l.src,tokens:l.t,SEMVER_SPEC_VERSION:v.SEMVER_SPEC_VERSION,RELEASE_TYPES:v.RELEASE_TYPES,compareIdentifiers:M.compareIdentifiers,rcompareIdentifiers:M.rcompareIdentifiers}},31696:q=>{const l=Number.MAX_SAFE_INTEGER||9007199254740991;q.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:l,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},66070:q=>{const n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>console.error("SEMVER",...u):()=>{};q.exports=n},67165:q=>{const n=/^[0-9]+$/,u=(v,E)=>{const M=n.test(v),s=n.test(E);return M&&s&&(v=+v,E=+E),v===E?0:M&&!s?-1:s&&!M?1:vu(E,v)}},86663:q=>{q.exports=class n{constructor(){this.max=1e3,this.map=new Map}get(l){const v=this.map.get(l);if(void 0!==v)return this.map.delete(l),this.map.set(l,v),v}delete(l){return this.map.delete(l)}set(l,v){if(!this.delete(l)&&void 0!==v){if(this.map.size>=this.max){const M=this.map.keys().next().value;this.delete(M)}this.map.set(l,v)}return this}}},20471:q=>{const n=Object.freeze({loose:!0}),u=Object.freeze({});q.exports=v=>v?"object"!=typeof v?n:v:u},1338:(q,n,u)=>{const{MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:v,MAX_LENGTH:E}=u(31696),M=u(66070),s=(n=q.exports={}).re=[],g=n.safeRe=[],y=n.src=[],f=n.t={};let d=0;const p="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",E],[p,v]],_=(D,P,x)=>{const C=(D=>{for(const[P,x]of m)D=D.split(`${P}*`).join(`${P}{0,${x}}`).split(`${P}+`).join(`${P}{1,${x}}`);return D})(P),N=d++;M(D,N,P),f[D]=N,y[N]=P,s[N]=new RegExp(P,x?"g":void 0),g[N]=new RegExp(C,x?"g":void 0)};_("NUMERICIDENTIFIER","0|[1-9]\\d*"),_("NUMERICIDENTIFIERLOOSE","\\d+"),_("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),_("MAINVERSION",`(${y[f.NUMERICIDENTIFIER]})\\.(${y[f.NUMERICIDENTIFIER]})\\.(${y[f.NUMERICIDENTIFIER]})`),_("MAINVERSIONLOOSE",`(${y[f.NUMERICIDENTIFIERLOOSE]})\\.(${y[f.NUMERICIDENTIFIERLOOSE]})\\.(${y[f.NUMERICIDENTIFIERLOOSE]})`),_("PRERELEASEIDENTIFIER",`(?:${y[f.NUMERICIDENTIFIER]}|${y[f.NONNUMERICIDENTIFIER]})`),_("PRERELEASEIDENTIFIERLOOSE",`(?:${y[f.NUMERICIDENTIFIERLOOSE]}|${y[f.NONNUMERICIDENTIFIER]})`),_("PRERELEASE",`(?:-(${y[f.PRERELEASEIDENTIFIER]}(?:\\.${y[f.PRERELEASEIDENTIFIER]})*))`),_("PRERELEASELOOSE",`(?:-?(${y[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_("BUILDIDENTIFIER",`${p}+`),_("BUILD",`(?:\\+(${y[f.BUILDIDENTIFIER]}(?:\\.${y[f.BUILDIDENTIFIER]})*))`),_("FULLPLAIN",`v?${y[f.MAINVERSION]}${y[f.PRERELEASE]}?${y[f.BUILD]}?`),_("FULL",`^${y[f.FULLPLAIN]}$`),_("LOOSEPLAIN",`[v=\\s]*${y[f.MAINVERSIONLOOSE]}${y[f.PRERELEASELOOSE]}?${y[f.BUILD]}?`),_("LOOSE",`^${y[f.LOOSEPLAIN]}$`),_("GTLT","((?:<|>)?=?)"),_("XRANGEIDENTIFIERLOOSE",`${y[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_("XRANGEIDENTIFIER",`${y[f.NUMERICIDENTIFIER]}|x|X|\\*`),_("XRANGEPLAIN",`[v=\\s]*(${y[f.XRANGEIDENTIFIER]})(?:\\.(${y[f.XRANGEIDENTIFIER]})(?:\\.(${y[f.XRANGEIDENTIFIER]})(?:${y[f.PRERELEASE]})?${y[f.BUILD]}?)?)?`),_("XRANGEPLAINLOOSE",`[v=\\s]*(${y[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[f.XRANGEIDENTIFIERLOOSE]})(?:${y[f.PRERELEASELOOSE]})?${y[f.BUILD]}?)?)?`),_("XRANGE",`^${y[f.GTLT]}\\s*${y[f.XRANGEPLAIN]}$`),_("XRANGELOOSE",`^${y[f.GTLT]}\\s*${y[f.XRANGEPLAINLOOSE]}$`),_("COERCEPLAIN",`(^|[^\\d])(\\d{1,${l}})(?:\\.(\\d{1,${l}}))?(?:\\.(\\d{1,${l}}))?`),_("COERCE",`${y[f.COERCEPLAIN]}(?:$|[^\\d])`),_("COERCEFULL",y[f.COERCEPLAIN]+`(?:${y[f.PRERELEASE]})?(?:${y[f.BUILD]})?(?:$|[^\\d])`),_("COERCERTL",y[f.COERCE],!0),_("COERCERTLFULL",y[f.COERCEFULL],!0),_("LONETILDE","(?:~>?)"),_("TILDETRIM",`(\\s*)${y[f.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",_("TILDE",`^${y[f.LONETILDE]}${y[f.XRANGEPLAIN]}$`),_("TILDELOOSE",`^${y[f.LONETILDE]}${y[f.XRANGEPLAINLOOSE]}$`),_("LONECARET","(?:\\^)"),_("CARETTRIM",`(\\s*)${y[f.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",_("CARET",`^${y[f.LONECARET]}${y[f.XRANGEPLAIN]}$`),_("CARETLOOSE",`^${y[f.LONECARET]}${y[f.XRANGEPLAINLOOSE]}$`),_("COMPARATORLOOSE",`^${y[f.GTLT]}\\s*(${y[f.LOOSEPLAIN]})$|^$`),_("COMPARATOR",`^${y[f.GTLT]}\\s*(${y[f.FULLPLAIN]})$|^$`),_("COMPARATORTRIM",`(\\s*)${y[f.GTLT]}\\s*(${y[f.LOOSEPLAIN]}|${y[f.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",_("HYPHENRANGE",`^\\s*(${y[f.XRANGEPLAIN]})\\s+-\\s+(${y[f.XRANGEPLAIN]})\\s*$`),_("HYPHENRANGELOOSE",`^\\s*(${y[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[f.XRANGEPLAINLOOSE]})\\s*$`),_("STAR","(<|>)?=?\\s*\\*"),_("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),_("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},82764:(q,n,u)=>{const l=u(97203);q.exports=(E,M,s)=>l(E,M,">",s)},74741:(q,n,u)=>{const l=u(48611);q.exports=(E,M,s)=>(E=new l(E,s),M=new l(M,s),E.intersects(M,s))},51658:(q,n,u)=>{const l=u(97203);q.exports=(E,M,s)=>l(E,M,"<",s)},27693:(q,n,u)=>{const l=u(51839),v=u(48611);q.exports=(M,s,g)=>{let y=null,f=null,d=null;try{d=new v(s,g)}catch{return null}return M.forEach(p=>{d.test(p)&&(!y||-1===f.compare(p))&&(y=p,f=new l(y,g))}),y}},24499:(q,n,u)=>{const l=u(51839),v=u(48611);q.exports=(M,s,g)=>{let y=null,f=null,d=null;try{d=new v(s,g)}catch{return null}return M.forEach(p=>{d.test(p)&&(!y||1===f.compare(p))&&(y=p,f=new l(y,g))}),y}},57291:(q,n,u)=>{const l=u(51839),v=u(48611),E=u(97283);q.exports=(s,g)=>{s=new v(s,g);let y=new l("0.0.0");if(s.test(y)||(y=new l("0.0.0-0"),s.test(y)))return y;y=null;for(let f=0;f{const S=new l(m.semver.version);switch(m.operator){case">":0===S.prerelease.length?S.patch++:S.prerelease.push(0),S.raw=S.format();case"":case">=":(!p||E(S,p))&&(p=S);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${m.operator}`)}}),p&&(!y||E(y,p))&&(y=p)}return y&&s.test(y)?y:null}},97203:(q,n,u)=>{const l=u(51839),v=u(50508),{ANY:E}=v,M=u(48611),s=u(52866),g=u(97283),y=u(30845),f=u(20477),d=u(45844);q.exports=(m,S,_,D)=>{let P,x,C,N,k;switch(m=new l(m,D),S=new M(S,D),_){case">":P=g,x=f,C=y,N=">",k=">=";break;case"<":P=y,x=d,C=g,N="<",k="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(m,S,D))return!1;for(let U=0;U{F.semver===E&&(F=new v(">=0.0.0")),Y=Y||F,G=G||F,P(F.semver,Y.semver,D)?Y=F:C(F.semver,G.semver,D)&&(G=F)}),Y.operator===N||Y.operator===k||(!G.operator||G.operator===N)&&x(m,G.semver))return!1;if(G.operator===k&&C(m,G.semver))return!1}return!0}},93807:(q,n,u)=>{const l=u(52866),v=u(65522);q.exports=(E,M,s)=>{const g=[];let y=null,f=null;const d=E.sort((_,D)=>v(_,D,s));for(const _ of d)l(_,M,s)?(f=_,y||(y=_)):(f&&g.push([y,f]),f=null,y=null);y&&g.push([y,null]);const p=[];for(const[_,D]of g)_===D?p.push(_):D||_!==d[0]?D?_===d[0]?p.push(`<=${D}`):p.push(`${_} - ${D}`):p.push(`>=${_}`):p.push("*");const m=p.join(" || "),S="string"==typeof M.raw?M.raw:String(M);return m.length{const l=u(48611),v=u(50508),{ANY:E}=v,M=u(52866),s=u(65522),y=[new v(">=0.0.0-0")],f=[new v(">=0.0.0")],d=(S,_,D)=>{if(S===_)return!0;if(1===S.length&&S[0].semver===E){if(1===_.length&&_[0].semver===E)return!0;S=D.includePrerelease?y:f}if(1===_.length&&_[0].semver===E){if(D.includePrerelease)return!0;_=f}const P=new Set;let x,C,N;for(const j of S)">"===j.operator||">="===j.operator?x=p(x,j,D):"<"===j.operator||"<="===j.operator?C=m(C,j,D):P.add(j.semver);if(P.size>1)return null;if(x&&C){if(N=s(x.semver,C.semver,D),N>0)return null;if(0===N&&(">="!==x.operator||"<="!==C.operator))return null}for(const j of P){if(x&&!M(j,String(x),D)||C&&!M(j,String(C),D))return null;for(const Z of _)if(!M(j,String(Z),D))return!1;return!0}let k,U,z,Y,G=!(!C||D.includePrerelease||!C.semver.prerelease.length)&&C.semver,F=!(!x||D.includePrerelease||!x.semver.prerelease.length)&&x.semver;G&&1===G.prerelease.length&&"<"===C.operator&&0===G.prerelease[0]&&(G=!1);for(const j of _){if(Y=Y||">"===j.operator||">="===j.operator,z=z||"<"===j.operator||"<="===j.operator,x)if(F&&j.semver.prerelease&&j.semver.prerelease.length&&j.semver.major===F.major&&j.semver.minor===F.minor&&j.semver.patch===F.patch&&(F=!1),">"===j.operator||">="===j.operator){if(k=p(x,j,D),k===j&&k!==x)return!1}else if(">="===x.operator&&!M(x.semver,String(j),D))return!1;if(C)if(G&&j.semver.prerelease&&j.semver.prerelease.length&&j.semver.major===G.major&&j.semver.minor===G.minor&&j.semver.patch===G.patch&&(G=!1),"<"===j.operator||"<="===j.operator){if(U=m(C,j,D),U===j&&U!==C)return!1}else if("<="===C.operator&&!M(C.semver,String(j),D))return!1;if(!j.operator&&(C||x)&&0!==N)return!1}return!(x&&z&&!C&&0!==N||C&&Y&&!x&&0!==N||F||G)},p=(S,_,D)=>{if(!S)return _;const P=s(S.semver,_.semver,D);return P>0?S:P<0||">"===_.operator&&">="===S.operator?_:S},m=(S,_,D)=>{if(!S)return _;const P=s(S.semver,_.semver,D);return P<0?S:P>0||"<"===_.operator&&"<="===S.operator?_:S};q.exports=(S,_,D={})=>{if(S===_)return!0;S=new l(S,D),_=new l(_,D);let P=!1;e:for(const x of S.set){for(const C of _.set){const N=d(x,C,D);if(P=P||null!==N,N)continue e}if(P)return!1}return!0}},16892:(q,n,u)=>{const l=u(48611);q.exports=(E,M)=>new l(E,M).set.map(s=>s.map(g=>g.value).join(" ").trim().split(" "))},14282:(q,n,u)=>{const l=u(48611);q.exports=(E,M)=>{try{return new l(E,M).range||"*"}catch{return null}}},9511:(q,n,u)=>{"use strict";var l=u(95203),v=u(27484),E=u(77027)(),M=u(47378),s=u(92844),g=l("%Math.floor%");q.exports=function(f,d){if("function"!=typeof f)throw new s("`fn` is not a function");if("number"!=typeof d||d<0||d>4294967295||g(d)!==d)throw new s("`length` must be a positive 32-bit integer");var p=arguments.length>2&&!!arguments[2],m=!0,S=!0;if("length"in f&&M){var _=M(f,"length");_&&!_.configurable&&(m=!1),_&&!_.writable&&(S=!1)}return(m||S||!p)&&(E?v(f,"length",d,!0,!0):v(f,"length",d)),f}},1106:q=>{"use strict";q.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function n(l,v){return l.__proto__=v,l}:function u(l,v){for(var E in v)Object.prototype.hasOwnProperty.call(l,E)||(l[E]=v[E]);return l})},86692:(q,n,u)=>{var l=u(73502).Buffer;function v(E,M){this._block=l.alloc(E),this._finalSize=M,this._blockSize=E,this._len=0}v.prototype.update=function(E,M){"string"==typeof E&&(M=M||"utf8",E=l.from(E,M));for(var s=this._block,g=this._blockSize,y=E.length,f=this._len,d=0;d=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=8*this._len;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var g=(4294967295&s)>>>0,y=(s-g)/4294967296;this._block.writeUInt32BE(y,this._blockSize-8),this._block.writeUInt32BE(g,this._blockSize-4)}this._update(this._block);var f=this._hash();return E?f.toString(E):f},v.prototype._update=function(){throw new Error("_update must be implemented by subclass")},q.exports=v},95244:(q,n,u)=>{var l=q.exports=function(E){E=E.toLowerCase();var M=l[E];if(!M)throw new Error(E+" is not supported (we accept pull requests)");return new M};l.sha=u(88932),l.sha1=u(17736),l.sha224=u(25044),l.sha256=u(15014),l.sha384=u(76540),l.sha512=u(10117)},88932:(q,n,u)=>{var l=u(83894),v=u(86692),E=u(73502).Buffer,M=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function g(){this.init(),this._w=s,v.call(this,64,56)}function y(p){return p<<5|p>>>27}function f(p){return p<<30|p>>>2}function d(p,m,S,_){return 0===p?m&S|~m&_:2===p?m&S|m&_|S&_:m^S^_}l(g,v),g.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},g.prototype._update=function(p){for(var m=this._w,S=0|this._a,_=0|this._b,D=0|this._c,P=0|this._d,x=0|this._e,C=0;C<16;++C)m[C]=p.readInt32BE(4*C);for(;C<80;++C)m[C]=m[C-3]^m[C-8]^m[C-14]^m[C-16];for(var N=0;N<80;++N){var k=~~(N/20),U=y(S)+d(k,_,D,P)+x+m[N]+M[k]|0;x=P,P=D,D=f(_),_=S,S=U}this._a=S+this._a|0,this._b=_+this._b|0,this._c=D+this._c|0,this._d=P+this._d|0,this._e=x+this._e|0},g.prototype._hash=function(){var p=E.allocUnsafe(20);return p.writeInt32BE(0|this._a,0),p.writeInt32BE(0|this._b,4),p.writeInt32BE(0|this._c,8),p.writeInt32BE(0|this._d,12),p.writeInt32BE(0|this._e,16),p},q.exports=g},17736:(q,n,u)=>{var l=u(83894),v=u(86692),E=u(73502).Buffer,M=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function g(){this.init(),this._w=s,v.call(this,64,56)}function y(m){return m<<1|m>>>31}function f(m){return m<<5|m>>>27}function d(m){return m<<30|m>>>2}function p(m,S,_,D){return 0===m?S&_|~S&D:2===m?S&_|S&D|_&D:S^_^D}l(g,v),g.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},g.prototype._update=function(m){for(var S=this._w,_=0|this._a,D=0|this._b,P=0|this._c,x=0|this._d,C=0|this._e,N=0;N<16;++N)S[N]=m.readInt32BE(4*N);for(;N<80;++N)S[N]=y(S[N-3]^S[N-8]^S[N-14]^S[N-16]);for(var k=0;k<80;++k){var U=~~(k/20),z=f(_)+p(U,D,P,x)+C+S[k]+M[U]|0;C=x,x=P,P=d(D),D=_,_=z}this._a=_+this._a|0,this._b=D+this._b|0,this._c=P+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0},g.prototype._hash=function(){var m=E.allocUnsafe(20);return m.writeInt32BE(0|this._a,0),m.writeInt32BE(0|this._b,4),m.writeInt32BE(0|this._c,8),m.writeInt32BE(0|this._d,12),m.writeInt32BE(0|this._e,16),m},q.exports=g},25044:(q,n,u)=>{var l=u(83894),v=u(15014),E=u(86692),M=u(73502).Buffer,s=new Array(64);function g(){this.init(),this._w=s,E.call(this,64,56)}l(g,v),g.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},g.prototype._hash=function(){var y=M.allocUnsafe(28);return y.writeInt32BE(this._a,0),y.writeInt32BE(this._b,4),y.writeInt32BE(this._c,8),y.writeInt32BE(this._d,12),y.writeInt32BE(this._e,16),y.writeInt32BE(this._f,20),y.writeInt32BE(this._g,24),y},q.exports=g},15014:(q,n,u)=>{var l=u(83894),v=u(86692),E=u(73502).Buffer,M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function g(){this.init(),this._w=s,v.call(this,64,56)}function y(_,D,P){return P^_&(D^P)}function f(_,D,P){return _&D|P&(_|D)}function d(_){return(_>>>2|_<<30)^(_>>>13|_<<19)^(_>>>22|_<<10)}function p(_){return(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7)}function m(_){return(_>>>7|_<<25)^(_>>>18|_<<14)^_>>>3}function S(_){return(_>>>17|_<<15)^(_>>>19|_<<13)^_>>>10}l(g,v),g.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},g.prototype._update=function(_){for(var D=this._w,P=0|this._a,x=0|this._b,C=0|this._c,N=0|this._d,k=0|this._e,U=0|this._f,z=0|this._g,Y=0|this._h,G=0;G<16;++G)D[G]=_.readInt32BE(4*G);for(;G<64;++G)D[G]=S(D[G-2])+D[G-7]+m(D[G-15])+D[G-16]|0;for(var F=0;F<64;++F){var j=Y+p(k)+y(k,U,z)+M[F]+D[F]|0,Z=d(P)+f(P,x,C)|0;Y=z,z=U,U=k,k=N+j|0,N=C,C=x,x=P,P=j+Z|0}this._a=P+this._a|0,this._b=x+this._b|0,this._c=C+this._c|0,this._d=N+this._d|0,this._e=k+this._e|0,this._f=U+this._f|0,this._g=z+this._g|0,this._h=Y+this._h|0},g.prototype._hash=function(){var _=E.allocUnsafe(32);return _.writeInt32BE(this._a,0),_.writeInt32BE(this._b,4),_.writeInt32BE(this._c,8),_.writeInt32BE(this._d,12),_.writeInt32BE(this._e,16),_.writeInt32BE(this._f,20),_.writeInt32BE(this._g,24),_.writeInt32BE(this._h,28),_},q.exports=g},76540:(q,n,u)=>{var l=u(83894),v=u(10117),E=u(86692),M=u(73502).Buffer,s=new Array(160);function g(){this.init(),this._w=s,E.call(this,128,112)}l(g,v),g.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},g.prototype._hash=function(){var y=M.allocUnsafe(48);function f(d,p,m){y.writeInt32BE(d,m),y.writeInt32BE(p,m+4)}return f(this._ah,this._al,0),f(this._bh,this._bl,8),f(this._ch,this._cl,16),f(this._dh,this._dl,24),f(this._eh,this._el,32),f(this._fh,this._fl,40),y},q.exports=g},10117:(q,n,u)=>{var l=u(83894),v=u(86692),E=u(73502).Buffer,M=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function g(){this.init(),this._w=s,v.call(this,128,112)}function y(x,C,N){return N^x&(C^N)}function f(x,C,N){return x&C|N&(x|C)}function d(x,C){return(x>>>28|C<<4)^(C>>>2|x<<30)^(C>>>7|x<<25)}function p(x,C){return(x>>>14|C<<18)^(x>>>18|C<<14)^(C>>>9|x<<23)}function m(x,C){return(x>>>1|C<<31)^(x>>>8|C<<24)^x>>>7}function S(x,C){return(x>>>1|C<<31)^(x>>>8|C<<24)^(x>>>7|C<<25)}function _(x,C){return(x>>>19|C<<13)^(C>>>29|x<<3)^x>>>6}function D(x,C){return(x>>>19|C<<13)^(C>>>29|x<<3)^(x>>>6|C<<26)}function P(x,C){return x>>>0>>0?1:0}l(g,v),g.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},g.prototype._update=function(x){for(var C=this._w,N=0|this._ah,k=0|this._bh,U=0|this._ch,z=0|this._dh,Y=0|this._eh,G=0|this._fh,F=0|this._gh,j=0|this._hh,Z=0|this._al,T=0|this._bl,o=0|this._cl,h=0|this._dl,w=0|this._el,I=0|this._fl,R=0|this._gl,V=0|this._hl,H=0;H<32;H+=2)C[H]=x.readInt32BE(4*H),C[H+1]=x.readInt32BE(4*H+4);for(;H<160;H+=2){var L=C[H-30],b=C[H-30+1],B=m(L,b),re=S(b,L),ne=_(L=C[H-4],b=C[H-4+1]),te=D(b,L),ae=C[H-14],ge=C[H-14+1],pe=C[H-32],we=C[H-32+1],ce=re+ge|0,le=B+ae+P(ce,re)|0;le=(le=le+ne+P(ce=ce+te|0,te)|0)+pe+P(ce=ce+we|0,we)|0,C[H]=le,C[H+1]=ce}for(var ue=0;ue<160;ue+=2){le=C[ue],ce=C[ue+1];var fe=f(N,k,U),he=f(Z,T,o),Ae=d(N,Z),Pe=d(Z,N),Re=p(Y,w),ot=p(w,Y),nt=M[ue],Ye=M[ue+1],It=y(Y,G,F),st=y(w,I,R),He=V+ot|0,ze=j+Re+P(He,V)|0;ze=(ze=(ze=ze+It+P(He=He+st|0,st)|0)+nt+P(He=He+Ye|0,Ye)|0)+le+P(He=He+ce|0,ce)|0;var Be=Pe+he|0,Ze=Ae+fe+P(Be,Pe)|0;j=F,V=R,F=G,R=I,G=Y,I=w,Y=z+ze+P(w=h+He|0,h)|0,z=U,h=o,U=k,o=T,k=N,T=Z,N=ze+Ze+P(Z=He+Be|0,He)|0}this._al=this._al+Z|0,this._bl=this._bl+T|0,this._cl=this._cl+o|0,this._dl=this._dl+h|0,this._el=this._el+w|0,this._fl=this._fl+I|0,this._gl=this._gl+R|0,this._hl=this._hl+V|0,this._ah=this._ah+N+P(this._al,Z)|0,this._bh=this._bh+k+P(this._bl,T)|0,this._ch=this._ch+U+P(this._cl,o)|0,this._dh=this._dh+z+P(this._dl,h)|0,this._eh=this._eh+Y+P(this._el,w)|0,this._fh=this._fh+G+P(this._fl,I)|0,this._gh=this._gh+F+P(this._gl,R)|0,this._hh=this._hh+j+P(this._hl,V)|0},g.prototype._hash=function(){var x=E.allocUnsafe(64);function C(N,k,U){x.writeInt32BE(N,U),x.writeInt32BE(k,U+4)}return C(this._ah,this._al,0),C(this._bh,this._bl,8),C(this._ch,this._cl,16),C(this._dh,this._dl,24),C(this._eh,this._el,32),C(this._fh,this._fl,40),C(this._gh,this._gl,48),C(this._hh,this._hl,56),x},q.exports=g},9562:(q,n,u)=>{var l,v,E,s;l=u(25585),v=u(83018).utf8,E=u(83018).bin,(s=function(g,y){var f=l.wordsToBytes(function(g){g.constructor==String?g=v.stringToBytes(g):typeof Buffer<"u"&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(g)?g=Array.prototype.slice.call(g,0):Array.isArray(g)||(g=g.toString());var y=l.bytesToWords(g),f=8*g.length,d=[],p=1732584193,m=-271733879,S=-1732584194,_=271733878,D=-1009589776;y[f>>5]|=128<<24-f%32,y[15+(f+64>>>9<<4)]=f;for(var P=0;P>>31}var G=(p<<5|p>>>27)+D+(d[z]>>>0)+(z<20?1518500249+(m&S|~m&_):z<40?1859775393+(m^S^_):z<60?(m&S|m&_|S&_)-1894007588:(m^S^_)-899497514);D=_,_=S,S=m<<30|m>>>2,m=p,p=G}p+=x,m+=C,S+=N,_+=k,D+=U}return[p,m,S,_,D]}(g));return y&&y.asBytes?f:y&&y.asString?E.bytesToString(f):l.bytesToHex(f)})._blocksize=16,s._digestsize=20,q.exports=s},78951:q=>{"use strict";q.exports=(n,u)=>{if("string"!=typeof n||"string"!=typeof u)throw new TypeError("Expected the arguments to be of type `string`");if(""===u)return[n];const l=n.indexOf(u);return-1===l?[n]:[n.slice(0,l),n.slice(l+u.length)]}},295:(q,n,u)=>{q.exports=E;var l=u(59069).EventEmitter;function E(){l.call(this)}u(83894)(E,l),E.Readable=u(3154),E.Writable=u(20520),E.Duplex=u(41339),E.Transform=u(6025),E.PassThrough=u(56071),E.finished=u(67542),E.pipeline=u(90954),E.Stream=E,E.prototype.pipe=function(M,s){var g=this;function y(D){M.writable&&!1===M.write(D)&&g.pause&&g.pause()}function f(){g.readable&&g.resume&&g.resume()}g.on("data",y),M.on("drain",f),!M._isStdio&&(!s||!1!==s.end)&&(g.on("end",p),g.on("close",m));var d=!1;function p(){d||(d=!0,M.end())}function m(){d||(d=!0,"function"==typeof M.destroy&&M.destroy())}function S(D){if(_(),0===l.listenerCount(this,"error"))throw D}function _(){g.removeListener("data",y),M.removeListener("drain",f),g.removeListener("end",p),g.removeListener("close",m),g.removeListener("error",S),M.removeListener("error",S),g.removeListener("end",_),g.removeListener("close",_),M.removeListener("close",_)}return g.on("error",S),M.on("error",S),g.on("end",_),g.on("close",_),M.on("close",_),M.emit("pipe",g),M}},74216:(q,n,u)=>{var l=u(3724),v=u(62359),E=u(44703),M=u(94525),s=u(68762),g=n;g.request=function(y,f){y="string"==typeof y?s.parse(y):E(y);var d=-1===global.location.protocol.search(/^https?:$/)?"http:":"",p=y.protocol||d,m=y.hostname||y.host,S=y.port,_=y.path||"/";m&&-1!==m.indexOf(":")&&(m="["+m+"]"),y.url=(m?p+"//"+m:"")+(S?":"+S:"")+_,y.method=(y.method||"GET").toUpperCase(),y.headers=y.headers||{};var D=new l(y);return f&&D.on("response",f),D},g.get=function(f,d){var p=g.request(f,d);return p.end(),p},g.ClientRequest=l,g.IncomingMessage=v.IncomingMessage,g.Agent=function(){},g.Agent.defaultMaxSockets=4,g.globalAgent=new g.Agent,g.STATUS_CODES=M,g.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},57976:(q,n)=>{var u;function l(){if(void 0!==u)return u;if(global.XMLHttpRequest){u=new global.XMLHttpRequest;try{u.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{u=null}}else u=null;return u}function v(M){var s=l();if(!s)return!1;try{return s.responseType=M,s.responseType===M}catch{}return!1}function E(M){return"function"==typeof M}n.fetch=E(global.fetch)&&E(global.ReadableStream),n.writableStream=E(global.WritableStream),n.abortController=E(global.AbortController),n.arraybuffer=n.fetch||v("arraybuffer"),n.msstream=!n.fetch&&v("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&v("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!l()&&E(l().overrideMimeType),u=null},3724:(q,n,u)=>{var l=u(57976),v=u(83894),E=u(62359),M=u(65685),s=E.IncomingMessage,g=E.readyStates;var f=q.exports=function(m){var S=this;M.Writable.call(S),S._opts=m,S._body=[],S._headers={},m.auth&&S.setHeader("Authorization","Basic "+Buffer.from(m.auth).toString("base64")),Object.keys(m.headers).forEach(function(P){S.setHeader(P,m.headers[P])});var _,D=!0;if("disable-fetch"===m.mode||"requestTimeout"in m&&!l.abortController)D=!1,_=!0;else if("prefer-streaming"===m.mode)_=!1;else if("allow-wrong-content-type"===m.mode)_=!l.overrideMimeType;else{if(m.mode&&"default"!==m.mode&&"prefer-fast"!==m.mode)throw new Error("Invalid value for opts.mode");_=!0}S._mode=function y(m,S){return l.fetch&&S?"fetch":l.mozchunkedarraybuffer?"moz-chunked-arraybuffer":l.msstream?"ms-stream":l.arraybuffer&&m?"arraybuffer":"text"}(_,D),S._fetchTimer=null,S._socketTimeout=null,S._socketTimer=null,S.on("finish",function(){S._onFinish()})};v(f,M.Writable),f.prototype.setHeader=function(m,S){var D=m.toLowerCase();-1===p.indexOf(D)&&(this._headers[D]={name:m,value:S})},f.prototype.getHeader=function(m){var S=this._headers[m.toLowerCase()];return S?S.value:null},f.prototype.removeHeader=function(m){delete this._headers[m.toLowerCase()]},f.prototype._onFinish=function(){var m=this;if(!m._destroyed){var S=m._opts;"timeout"in S&&0!==S.timeout&&m.setTimeout(S.timeout);var _=m._headers,D=null;"GET"!==S.method&&"HEAD"!==S.method&&(D=new Blob(m._body,{type:(_["content-type"]||{}).value||""}));var P=[];if(Object.keys(_).forEach(function(k){var U=_[k].name,z=_[k].value;Array.isArray(z)?z.forEach(function(Y){P.push([U,Y])}):P.push([U,z])}),"fetch"===m._mode){var x=null;if(l.abortController){var C=new AbortController;x=C.signal,m._fetchAbortController=C,"requestTimeout"in S&&0!==S.requestTimeout&&(m._fetchTimer=global.setTimeout(function(){m.emit("requestTimeout"),m._fetchAbortController&&m._fetchAbortController.abort()},S.requestTimeout))}global.fetch(m._opts.url,{method:m._opts.method,headers:P,body:D||void 0,mode:"cors",credentials:S.withCredentials?"include":"same-origin",signal:x}).then(function(k){m._fetchResponse=k,m._resetTimers(!1),m._connect()},function(k){m._resetTimers(!0),m._destroyed||m.emit("error",k)})}else{var N=m._xhr=new global.XMLHttpRequest;try{N.open(m._opts.method,m._opts.url,!0)}catch(k){return void process.nextTick(function(){m.emit("error",k)})}"responseType"in N&&(N.responseType=m._mode),"withCredentials"in N&&(N.withCredentials=!!S.withCredentials),"text"===m._mode&&"overrideMimeType"in N&&N.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in S&&(N.timeout=S.requestTimeout,N.ontimeout=function(){m.emit("requestTimeout")}),P.forEach(function(k){N.setRequestHeader(k[0],k[1])}),m._response=null,N.onreadystatechange=function(){switch(N.readyState){case g.LOADING:case g.DONE:m._onXHRProgress()}},"moz-chunked-arraybuffer"===m._mode&&(N.onprogress=function(){m._onXHRProgress()}),N.onerror=function(){m._destroyed||(m._resetTimers(!0),m.emit("error",new Error("XHR error")))};try{N.send(D)}catch(k){return void process.nextTick(function(){m.emit("error",k)})}}}},f.prototype._onXHRProgress=function(){var m=this;m._resetTimers(!1),function d(m){try{var S=m.status;return null!==S&&0!==S}catch{return!1}}(m._xhr)&&!m._destroyed&&(m._response||m._connect(),m._response._onXHRProgress(m._resetTimers.bind(m)))},f.prototype._connect=function(){var m=this;m._destroyed||(m._response=new s(m._xhr,m._fetchResponse,m._mode,m._resetTimers.bind(m)),m._response.on("error",function(S){m.emit("error",S)}),m.emit("response",m._response))},f.prototype._write=function(m,S,_){this._body.push(m),_()},f.prototype._resetTimers=function(m){var S=this;global.clearTimeout(S._socketTimer),S._socketTimer=null,m?(global.clearTimeout(S._fetchTimer),S._fetchTimer=null):S._socketTimeout&&(S._socketTimer=global.setTimeout(function(){S.emit("timeout")},S._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(m){var S=this;S._destroyed=!0,S._resetTimers(!0),S._response&&(S._response._destroyed=!0),S._xhr?S._xhr.abort():S._fetchAbortController&&S._fetchAbortController.abort(),m&&S.emit("error",m)},f.prototype.end=function(m,S,_){"function"==typeof m&&(_=m,m=void 0),M.Writable.prototype.end.call(this,m,S,_)},f.prototype.setTimeout=function(m,S){var _=this;S&&_.once("timeout",S),_._socketTimeout=m,_._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},62359:(q,n,u)=>{var l=u(57976),v=u(83894),E=u(65685),M=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},s=n.IncomingMessage=function(g,y,f,d){var p=this;if(E.Readable.call(p),p._mode=f,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){process.nextTick(function(){p.emit("close")})}),"fetch"===f){let C=function(){S.read().then(function(N){if(!p._destroyed){if(d(N.done),N.done)return void p.push(null);p.push(Buffer.from(N.value)),C()}}).catch(function(N){d(!0),p._destroyed||p.emit("error",N)})};if(p._fetchResponse=y,p.url=y.url,p.statusCode=y.status,p.statusMessage=y.statusText,y.headers.forEach(function(N,k){p.headers[k.toLowerCase()]=N,p.rawHeaders.push(k,N)}),l.writableStream){var m=new WritableStream({write:function(N){return d(!1),new Promise(function(k,U){p._destroyed?U():p.push(Buffer.from(N))?k():p._resumeFetch=k})},close:function(){d(!0),p._destroyed||p.push(null)},abort:function(N){d(!0),p._destroyed||p.emit("error",N)}});try{return void y.body.pipeTo(m).catch(function(N){d(!0),p._destroyed||p.emit("error",N)})}catch{}}var S=y.body.getReader();C()}else{if(p._xhr=g,p._pos=0,p.url=g.responseURL,p.statusCode=g.status,p.statusMessage=g.statusText,g.getAllResponseHeaders().split(/\r?\n/).forEach(function(C){var N=C.match(/^([^:]+):\s*(.*)/);if(N){var k=N[1].toLowerCase();"set-cookie"===k?(void 0===p.headers[k]&&(p.headers[k]=[]),p.headers[k].push(N[2])):void 0!==p.headers[k]?p.headers[k]+=", "+N[2]:p.headers[k]=N[2],p.rawHeaders.push(N[1],N[2])}}),p._charset="x-user-defined",!l.overrideMimeType){var D=p.rawHeaders["mime-type"];if(D){var P=D.match(/;\s*charset=([^;])(;|$)/);P&&(p._charset=P[1].toLowerCase())}p._charset||(p._charset="utf-8")}}};v(s,E.Readable),s.prototype._read=function(){var y=this._resumeFetch;y&&(this._resumeFetch=null,y())},s.prototype._onXHRProgress=function(g){var y=this,f=y._xhr,d=null;switch(y._mode){case"text":if((d=f.responseText).length>y._pos){var p=d.substr(y._pos);if("x-user-defined"===y._charset){for(var m=Buffer.alloc(p.length),S=0;Sy._pos&&(y.push(Buffer.from(new Uint8Array(_.result.slice(y._pos)))),y._pos=_.result.byteLength)},_.onload=function(){g(!0),y.push(null)},_.readAsArrayBuffer(d)}y._xhr.readyState===M.DONE&&"ms-stream"!==y._mode&&(g(!0),y.push(null))}},18372:q=>{"use strict";q.exports=n=>encodeURIComponent(n).replace(/[!'()*]/g,u=>`%${u.charCodeAt(0).toString(16).toUpperCase()}`)},77826:(q,n)=>{var u=n.range=function(M){return null==M?{}:"string"==typeof u?{min:u,max:u+"\xff"}:M},v=(n.prefix=function(M,s,g){var y={};return g=g||"\xff",(M=n.range(M))instanceof RegExp||"function"==typeof M?(y.min=s,y.max=s+g,y.inner=function(f){var d=f.substring(s.length);return M.test?M.test(d):M(d)}):"object"==typeof M&&(y.min=s+(M.min||M.start||""),y.max=s+(M.max||M.end||g||"~"),y.reverse=!!M.reverse),y},n.checker=function(M){return M||(M={}),"string"==typeof M?function(s){return 0==s.indexOf(M)}:M instanceof RegExp?function(s){return M.test(s)}:"object"==typeof M?function(s){var g=M.min||M.start,y=M.max||M.end;return s=String(s),(!g||s>=g)&&(!y||s<=y)&&(!M.inner||(M.inner.test?M.inner.test(s):M.inner(s)))}:"function"==typeof M?M:void 0});n.satisfies=function(M,s){return v(s)(M)}},15453:(q,n,u)=>{var l=u(93172).Buffer,v=l.isEncoding||function(f){switch(f&&f.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var M=n.s=function(f){switch(this.encoding=(f||"utf8").toLowerCase().replace(/[-_]/,""),function E(f){if(f&&!v(f))throw new Error("Unknown encoding: "+f)}(f),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=g;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=y;break;default:return void(this.write=s)}this.charBuffer=new l(6),this.charReceived=0,this.charLength=0};function s(f){return f.toString(this.encoding)}function g(f){this.charReceived=f.length%2,this.charLength=this.charReceived?2:0}function y(f){this.charReceived=f.length%3,this.charLength=this.charReceived?3:0}M.prototype.write=function(f){for(var d="";this.charLength;){var p=f.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:f.length;if(f.copy(this.charBuffer,this.charReceived,0,p),this.charReceived+=p,this.charReceived=55296&&S<=56319)){if(this.charReceived=this.charLength=0,0===f.length)return d;break}this.charLength+=this.surrogateSize,d=""}this.detectIncompleteChar(f);var m=f.length;this.charLength&&(f.copy(this.charBuffer,0,f.length-this.charReceived,m),m-=this.charReceived);var S;m=(d+=f.toString(this.encoding,0,m)).length-1;if((S=d.charCodeAt(m))>=55296&&S<=56319){var _=this.surrogateSize;return this.charLength+=_,this.charReceived+=_,this.charBuffer.copy(this.charBuffer,_,0,_),f.copy(this.charBuffer,0,0,_),d.substring(0,m)}return d},M.prototype.detectIncompleteChar=function(f){for(var d=f.length>=3?3:f.length;d>0;d--){var p=f[f.length-d];if(1==d&&p>>5==6){this.charLength=2;break}if(d<=2&&p>>4==14){this.charLength=3;break}if(d<=3&&p>>3==30){this.charLength=4;break}}this.charReceived=d},M.prototype.end=function(f){var d="";if(f&&f.length&&(d=this.write(f)),this.charReceived){var p=this.charReceived,m=this.charBuffer,S=this.encoding;d+=m.slice(0,p).toString(S)}return d}},43675:q=>{q.exports=function(){var n=document.getSelection();if(!n.rangeCount)return function(){};for(var u=document.activeElement,l=[],v=0;v{"use strict";q.exports=function n(u){return u.split(" ").map(function(l){return l.slice(0,1).toUpperCase()+l.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},40489:(q,n,u)=>{!function(l){"use strict";var v=function(Te){var Se,Oe=new Float64Array(16);if(Te)for(Se=0;Se>24&255,Te[Se+1]=Oe>>16&255,Te[Se+2]=Oe>>8&255,Te[Se+3]=255&Oe,Te[Se+4]=_e>>24&255,Te[Se+5]=_e>>16&255,Te[Se+6]=_e>>8&255,Te[Se+7]=255&_e}function P(Te,Se,Oe,_e,Le){var Xe,At=0;for(Xe=0;Xe>>8)-1}function x(Te,Se,Oe,_e){return P(Te,Se,Oe,_e,16)}function C(Te,Se,Oe,_e){return P(Te,Se,Oe,_e,32)}function U(Te,Se,Oe,_e){!function N(Te,Se,Oe,_e){for(var _t,Le=255&_e[0]|(255&_e[1])<<8|(255&_e[2])<<16|(255&_e[3])<<24,Xe=255&Oe[0]|(255&Oe[1])<<8|(255&Oe[2])<<16|(255&Oe[3])<<24,At=255&Oe[4]|(255&Oe[5])<<8|(255&Oe[6])<<16|(255&Oe[7])<<24,dt=255&Oe[8]|(255&Oe[9])<<8|(255&Oe[10])<<16|(255&Oe[11])<<24,gt=255&Oe[12]|(255&Oe[13])<<8|(255&Oe[14])<<16|(255&Oe[15])<<24,nn=255&_e[4]|(255&_e[5])<<8|(255&_e[6])<<16|(255&_e[7])<<24,Wt=255&Se[0]|(255&Se[1])<<8|(255&Se[2])<<16|(255&Se[3])<<24,hn=255&Se[4]|(255&Se[5])<<8|(255&Se[6])<<16|(255&Se[7])<<24,rn=255&Se[8]|(255&Se[9])<<8|(255&Se[10])<<16|(255&Se[11])<<24,gn=255&Se[12]|(255&Se[13])<<8|(255&Se[14])<<16|(255&Se[15])<<24,on=255&_e[8]|(255&_e[9])<<8|(255&_e[10])<<16|(255&_e[11])<<24,An=255&Oe[16]|(255&Oe[17])<<8|(255&Oe[18])<<16|(255&Oe[19])<<24,mn=255&Oe[20]|(255&Oe[21])<<8|(255&Oe[22])<<16|(255&Oe[23])<<24,On=255&Oe[24]|(255&Oe[25])<<8|(255&Oe[26])<<16|(255&Oe[27])<<24,Cn=255&Oe[28]|(255&Oe[29])<<8|(255&Oe[30])<<16|(255&Oe[31])<<24,yn=255&_e[12]|(255&_e[13])<<8|(255&_e[14])<<16|(255&_e[15])<<24,en=Le,wn=Xe,ln=At,cn=dt,Sn=gt,fn=nn,Ft=Wt,jt=hn,dn=rn,$t=gn,qt=on,vn=An,$n=mn,hr=On,ur=Cn,yr=yn,_r=0;_r<20;_r+=2)en^=(_t=($n^=(_t=(dn^=(_t=(Sn^=(_t=en+$n|0)<<7|_t>>>25)+en|0)<<9|_t>>>23)+Sn|0)<<13|_t>>>19)+dn|0)<<18|_t>>>14,fn^=(_t=(wn^=(_t=(hr^=(_t=($t^=(_t=fn+wn|0)<<7|_t>>>25)+fn|0)<<9|_t>>>23)+$t|0)<<13|_t>>>19)+hr|0)<<18|_t>>>14,qt^=(_t=(Ft^=(_t=(ln^=(_t=(ur^=(_t=qt+Ft|0)<<7|_t>>>25)+qt|0)<<9|_t>>>23)+ur|0)<<13|_t>>>19)+ln|0)<<18|_t>>>14,yr^=(_t=(vn^=(_t=(jt^=(_t=(cn^=(_t=yr+vn|0)<<7|_t>>>25)+yr|0)<<9|_t>>>23)+cn|0)<<13|_t>>>19)+jt|0)<<18|_t>>>14,en^=(_t=(cn^=(_t=(ln^=(_t=(wn^=(_t=en+cn|0)<<7|_t>>>25)+en|0)<<9|_t>>>23)+wn|0)<<13|_t>>>19)+ln|0)<<18|_t>>>14,fn^=(_t=(Sn^=(_t=(jt^=(_t=(Ft^=(_t=fn+Sn|0)<<7|_t>>>25)+fn|0)<<9|_t>>>23)+Ft|0)<<13|_t>>>19)+jt|0)<<18|_t>>>14,qt^=(_t=($t^=(_t=(dn^=(_t=(vn^=(_t=qt+$t|0)<<7|_t>>>25)+qt|0)<<9|_t>>>23)+vn|0)<<13|_t>>>19)+dn|0)<<18|_t>>>14,yr^=(_t=(ur^=(_t=(hr^=(_t=($n^=(_t=yr+ur|0)<<7|_t>>>25)+yr|0)<<9|_t>>>23)+$n|0)<<13|_t>>>19)+hr|0)<<18|_t>>>14;en=en+Le|0,wn=wn+Xe|0,ln=ln+At|0,cn=cn+dt|0,Sn=Sn+gt|0,fn=fn+nn|0,Ft=Ft+Wt|0,jt=jt+hn|0,dn=dn+rn|0,$t=$t+gn|0,qt=qt+on|0,vn=vn+An|0,$n=$n+mn|0,hr=hr+On|0,ur=ur+Cn|0,yr=yr+yn|0,Te[0]=en>>>0&255,Te[1]=en>>>8&255,Te[2]=en>>>16&255,Te[3]=en>>>24&255,Te[4]=wn>>>0&255,Te[5]=wn>>>8&255,Te[6]=wn>>>16&255,Te[7]=wn>>>24&255,Te[8]=ln>>>0&255,Te[9]=ln>>>8&255,Te[10]=ln>>>16&255,Te[11]=ln>>>24&255,Te[12]=cn>>>0&255,Te[13]=cn>>>8&255,Te[14]=cn>>>16&255,Te[15]=cn>>>24&255,Te[16]=Sn>>>0&255,Te[17]=Sn>>>8&255,Te[18]=Sn>>>16&255,Te[19]=Sn>>>24&255,Te[20]=fn>>>0&255,Te[21]=fn>>>8&255,Te[22]=fn>>>16&255,Te[23]=fn>>>24&255,Te[24]=Ft>>>0&255,Te[25]=Ft>>>8&255,Te[26]=Ft>>>16&255,Te[27]=Ft>>>24&255,Te[28]=jt>>>0&255,Te[29]=jt>>>8&255,Te[30]=jt>>>16&255,Te[31]=jt>>>24&255,Te[32]=dn>>>0&255,Te[33]=dn>>>8&255,Te[34]=dn>>>16&255,Te[35]=dn>>>24&255,Te[36]=$t>>>0&255,Te[37]=$t>>>8&255,Te[38]=$t>>>16&255,Te[39]=$t>>>24&255,Te[40]=qt>>>0&255,Te[41]=qt>>>8&255,Te[42]=qt>>>16&255,Te[43]=qt>>>24&255,Te[44]=vn>>>0&255,Te[45]=vn>>>8&255,Te[46]=vn>>>16&255,Te[47]=vn>>>24&255,Te[48]=$n>>>0&255,Te[49]=$n>>>8&255,Te[50]=$n>>>16&255,Te[51]=$n>>>24&255,Te[52]=hr>>>0&255,Te[53]=hr>>>8&255,Te[54]=hr>>>16&255,Te[55]=hr>>>24&255,Te[56]=ur>>>0&255,Te[57]=ur>>>8&255,Te[58]=ur>>>16&255,Te[59]=ur>>>24&255,Te[60]=yr>>>0&255,Te[61]=yr>>>8&255,Te[62]=yr>>>16&255,Te[63]=yr>>>24&255}(Te,Se,Oe,_e)}function z(Te,Se,Oe,_e){!function k(Te,Se,Oe,_e){for(var _t,en=255&_e[0]|(255&_e[1])<<8|(255&_e[2])<<16|(255&_e[3])<<24,wn=255&Oe[0]|(255&Oe[1])<<8|(255&Oe[2])<<16|(255&Oe[3])<<24,ln=255&Oe[4]|(255&Oe[5])<<8|(255&Oe[6])<<16|(255&Oe[7])<<24,cn=255&Oe[8]|(255&Oe[9])<<8|(255&Oe[10])<<16|(255&Oe[11])<<24,Sn=255&Oe[12]|(255&Oe[13])<<8|(255&Oe[14])<<16|(255&Oe[15])<<24,fn=255&_e[4]|(255&_e[5])<<8|(255&_e[6])<<16|(255&_e[7])<<24,Ft=255&Se[0]|(255&Se[1])<<8|(255&Se[2])<<16|(255&Se[3])<<24,jt=255&Se[4]|(255&Se[5])<<8|(255&Se[6])<<16|(255&Se[7])<<24,dn=255&Se[8]|(255&Se[9])<<8|(255&Se[10])<<16|(255&Se[11])<<24,$t=255&Se[12]|(255&Se[13])<<8|(255&Se[14])<<16|(255&Se[15])<<24,qt=255&_e[8]|(255&_e[9])<<8|(255&_e[10])<<16|(255&_e[11])<<24,vn=255&Oe[16]|(255&Oe[17])<<8|(255&Oe[18])<<16|(255&Oe[19])<<24,$n=255&Oe[20]|(255&Oe[21])<<8|(255&Oe[22])<<16|(255&Oe[23])<<24,hr=255&Oe[24]|(255&Oe[25])<<8|(255&Oe[26])<<16|(255&Oe[27])<<24,ur=255&Oe[28]|(255&Oe[29])<<8|(255&Oe[30])<<16|(255&Oe[31])<<24,yr=255&_e[12]|(255&_e[13])<<8|(255&_e[14])<<16|(255&_e[15])<<24,_r=0;_r<20;_r+=2)en^=(_t=($n^=(_t=(dn^=(_t=(Sn^=(_t=en+$n|0)<<7|_t>>>25)+en|0)<<9|_t>>>23)+Sn|0)<<13|_t>>>19)+dn|0)<<18|_t>>>14,fn^=(_t=(wn^=(_t=(hr^=(_t=($t^=(_t=fn+wn|0)<<7|_t>>>25)+fn|0)<<9|_t>>>23)+$t|0)<<13|_t>>>19)+hr|0)<<18|_t>>>14,qt^=(_t=(Ft^=(_t=(ln^=(_t=(ur^=(_t=qt+Ft|0)<<7|_t>>>25)+qt|0)<<9|_t>>>23)+ur|0)<<13|_t>>>19)+ln|0)<<18|_t>>>14,yr^=(_t=(vn^=(_t=(jt^=(_t=(cn^=(_t=yr+vn|0)<<7|_t>>>25)+yr|0)<<9|_t>>>23)+cn|0)<<13|_t>>>19)+jt|0)<<18|_t>>>14,en^=(_t=(cn^=(_t=(ln^=(_t=(wn^=(_t=en+cn|0)<<7|_t>>>25)+en|0)<<9|_t>>>23)+wn|0)<<13|_t>>>19)+ln|0)<<18|_t>>>14,fn^=(_t=(Sn^=(_t=(jt^=(_t=(Ft^=(_t=fn+Sn|0)<<7|_t>>>25)+fn|0)<<9|_t>>>23)+Ft|0)<<13|_t>>>19)+jt|0)<<18|_t>>>14,qt^=(_t=($t^=(_t=(dn^=(_t=(vn^=(_t=qt+$t|0)<<7|_t>>>25)+qt|0)<<9|_t>>>23)+vn|0)<<13|_t>>>19)+dn|0)<<18|_t>>>14,yr^=(_t=(ur^=(_t=(hr^=(_t=($n^=(_t=yr+ur|0)<<7|_t>>>25)+yr|0)<<9|_t>>>23)+$n|0)<<13|_t>>>19)+hr|0)<<18|_t>>>14;Te[0]=en>>>0&255,Te[1]=en>>>8&255,Te[2]=en>>>16&255,Te[3]=en>>>24&255,Te[4]=fn>>>0&255,Te[5]=fn>>>8&255,Te[6]=fn>>>16&255,Te[7]=fn>>>24&255,Te[8]=qt>>>0&255,Te[9]=qt>>>8&255,Te[10]=qt>>>16&255,Te[11]=qt>>>24&255,Te[12]=yr>>>0&255,Te[13]=yr>>>8&255,Te[14]=yr>>>16&255,Te[15]=yr>>>24&255,Te[16]=Ft>>>0&255,Te[17]=Ft>>>8&255,Te[18]=Ft>>>16&255,Te[19]=Ft>>>24&255,Te[20]=jt>>>0&255,Te[21]=jt>>>8&255,Te[22]=jt>>>16&255,Te[23]=jt>>>24&255,Te[24]=dn>>>0&255,Te[25]=dn>>>8&255,Te[26]=dn>>>16&255,Te[27]=dn>>>24&255,Te[28]=$t>>>0&255,Te[29]=$t>>>8&255,Te[30]=$t>>>16&255,Te[31]=$t>>>24&255}(Te,Se,Oe,_e)}var Y=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function G(Te,Se,Oe,_e,Le,Xe,At){var nn,Wt,dt=new Uint8Array(16),gt=new Uint8Array(64);for(Wt=0;Wt<16;Wt++)dt[Wt]=0;for(Wt=0;Wt<8;Wt++)dt[Wt]=Xe[Wt];for(;Le>=64;){for(U(gt,dt,At,Y),Wt=0;Wt<64;Wt++)Te[Se+Wt]=Oe[_e+Wt]^gt[Wt];for(nn=1,Wt=8;Wt<16;Wt++)nn=nn+(255&dt[Wt])|0,dt[Wt]=255&nn,nn>>>=8;Le-=64,Se+=64,_e+=64}if(Le>0)for(U(gt,dt,At,Y),Wt=0;Wt=64;){for(U(At,Xe,Le,Y),gt=0;gt<64;gt++)Te[Se+gt]=At[gt];for(dt=1,gt=8;gt<16;gt++)dt=dt+(255&Xe[gt])|0,Xe[gt]=255&dt,dt>>>=8;Oe-=64,Se+=64}if(Oe>0)for(U(At,Xe,Le,Y),gt=0;gt>>13|Oe<<3),_e=255&Te[4]|(255&Te[5])<<8,this.r[2]=7939&(Oe>>>10|_e<<6),Le=255&Te[6]|(255&Te[7])<<8,this.r[3]=8191&(_e>>>7|Le<<9),Xe=255&Te[8]|(255&Te[9])<<8,this.r[4]=255&(Le>>>4|Xe<<12),this.r[5]=Xe>>>1&8190,At=255&Te[10]|(255&Te[11])<<8,this.r[6]=8191&(Xe>>>14|At<<2),dt=255&Te[12]|(255&Te[13])<<8,this.r[7]=8065&(At>>>11|dt<<5),gt=255&Te[14]|(255&Te[15])<<8,this.r[8]=8191&(dt>>>8|gt<<8),this.r[9]=gt>>>5&127,this.pad[0]=255&Te[16]|(255&Te[17])<<8,this.pad[1]=255&Te[18]|(255&Te[19])<<8,this.pad[2]=255&Te[20]|(255&Te[21])<<8,this.pad[3]=255&Te[22]|(255&Te[23])<<8,this.pad[4]=255&Te[24]|(255&Te[25])<<8,this.pad[5]=255&Te[26]|(255&Te[27])<<8,this.pad[6]=255&Te[28]|(255&Te[29])<<8,this.pad[7]=255&Te[30]|(255&Te[31])<<8};function o(Te,Se,Oe,_e,Le,Xe){var At=new T(Xe);return At.update(Oe,_e,Le),At.finish(Te,Se),0}function h(Te,Se,Oe,_e,Le,Xe){var At=new Uint8Array(16);return o(At,0,Oe,_e,Le,Xe),x(Te,Se,At,0)}function w(Te,Se,Oe,_e,Le){var Xe;if(Oe<32)return-1;for(Z(Te,0,Se,0,Oe,_e,Le),o(Te,16,Te,32,Oe-32,Te),Xe=0;Xe<16;Xe++)Te[Xe]=0;return 0}function I(Te,Se,Oe,_e,Le){var Xe,At=new Uint8Array(32);if(Oe<32||(j(At,0,32,_e,Le),0!==h(Se,16,Se,32,Oe-32,At)))return-1;for(Z(Te,0,Se,0,Oe,_e,Le),Xe=0;Xe<32;Xe++)Te[Xe]=0;return 0}function R(Te,Se){var Oe;for(Oe=0;Oe<16;Oe++)Te[Oe]=0|Se[Oe]}function V(Te){var Se,Oe,_e=1;for(Se=0;Se<16;Se++)Oe=Te[Se]+_e+65535,_e=Math.floor(Oe/65536),Te[Se]=Oe-65536*_e;Te[0]+=_e-1+37*(_e-1)}function H(Te,Se,Oe){for(var _e,Le=~(Oe-1),Xe=0;Xe<16;Xe++)_e=Le&(Te[Xe]^Se[Xe]),Te[Xe]^=_e,Se[Xe]^=_e}function L(Te,Se){var Oe,_e,Le,Xe=v(),At=v();for(Oe=0;Oe<16;Oe++)At[Oe]=Se[Oe];for(V(At),V(At),V(At),_e=0;_e<2;_e++){for(Xe[0]=At[0]-65517,Oe=1;Oe<15;Oe++)Xe[Oe]=At[Oe]-65535-(Xe[Oe-1]>>16&1),Xe[Oe-1]&=65535;Xe[15]=At[15]-32767-(Xe[14]>>16&1),Le=Xe[15]>>16&1,Xe[14]&=65535,H(At,Xe,1-Le)}for(Oe=0;Oe<16;Oe++)Te[2*Oe]=255&At[Oe],Te[2*Oe+1]=At[Oe]>>8}function b(Te,Se){var Oe=new Uint8Array(32),_e=new Uint8Array(32);return L(Oe,Te),L(_e,Se),C(Oe,0,_e,0)}function B(Te){var Se=new Uint8Array(32);return L(Se,Te),1&Se[0]}function re(Te,Se){var Oe;for(Oe=0;Oe<16;Oe++)Te[Oe]=Se[2*Oe]+(Se[2*Oe+1]<<8);Te[15]&=32767}function ne(Te,Se,Oe){for(var _e=0;_e<16;_e++)Te[_e]=Se[_e]+Oe[_e]}function te(Te,Se,Oe){for(var _e=0;_e<16;_e++)Te[_e]=Se[_e]-Oe[_e]}function ae(Te,Se,Oe){var _e,Le,Xe=0,At=0,dt=0,gt=0,nn=0,Wt=0,hn=0,rn=0,gn=0,on=0,An=0,mn=0,On=0,Cn=0,yn=0,en=0,wn=0,ln=0,cn=0,Sn=0,fn=0,Ft=0,jt=0,dn=0,$t=0,qt=0,vn=0,$n=0,hr=0,ur=0,yr=0,_t=Oe[0],_r=Oe[1],Br=Oe[2],Sr=Oe[3],wr=Oe[4],xr=Oe[5],Dr=Oe[6],Jr=Oe[7],Kr=Oe[8],nr=Oe[9],ri=Oe[10],Qr=Oe[11],li=Oe[12],vi=Oe[13],mo=Oe[14],ei=Oe[15];Xe+=(_e=Se[0])*_t,At+=_e*_r,dt+=_e*Br,gt+=_e*Sr,nn+=_e*wr,Wt+=_e*xr,hn+=_e*Dr,rn+=_e*Jr,gn+=_e*Kr,on+=_e*nr,An+=_e*ri,mn+=_e*Qr,On+=_e*li,Cn+=_e*vi,yn+=_e*mo,en+=_e*ei,At+=(_e=Se[1])*_t,dt+=_e*_r,gt+=_e*Br,nn+=_e*Sr,Wt+=_e*wr,hn+=_e*xr,rn+=_e*Dr,gn+=_e*Jr,on+=_e*Kr,An+=_e*nr,mn+=_e*ri,On+=_e*Qr,Cn+=_e*li,yn+=_e*vi,en+=_e*mo,wn+=_e*ei,dt+=(_e=Se[2])*_t,gt+=_e*_r,nn+=_e*Br,Wt+=_e*Sr,hn+=_e*wr,rn+=_e*xr,gn+=_e*Dr,on+=_e*Jr,An+=_e*Kr,mn+=_e*nr,On+=_e*ri,Cn+=_e*Qr,yn+=_e*li,en+=_e*vi,wn+=_e*mo,ln+=_e*ei,gt+=(_e=Se[3])*_t,nn+=_e*_r,Wt+=_e*Br,hn+=_e*Sr,rn+=_e*wr,gn+=_e*xr,on+=_e*Dr,An+=_e*Jr,mn+=_e*Kr,On+=_e*nr,Cn+=_e*ri,yn+=_e*Qr,en+=_e*li,wn+=_e*vi,ln+=_e*mo,cn+=_e*ei,nn+=(_e=Se[4])*_t,Wt+=_e*_r,hn+=_e*Br,rn+=_e*Sr,gn+=_e*wr,on+=_e*xr,An+=_e*Dr,mn+=_e*Jr,On+=_e*Kr,Cn+=_e*nr,yn+=_e*ri,en+=_e*Qr,wn+=_e*li,ln+=_e*vi,cn+=_e*mo,Sn+=_e*ei,Wt+=(_e=Se[5])*_t,hn+=_e*_r,rn+=_e*Br,gn+=_e*Sr,on+=_e*wr,An+=_e*xr,mn+=_e*Dr,On+=_e*Jr,Cn+=_e*Kr,yn+=_e*nr,en+=_e*ri,wn+=_e*Qr,ln+=_e*li,cn+=_e*vi,Sn+=_e*mo,fn+=_e*ei,hn+=(_e=Se[6])*_t,rn+=_e*_r,gn+=_e*Br,on+=_e*Sr,An+=_e*wr,mn+=_e*xr,On+=_e*Dr,Cn+=_e*Jr,yn+=_e*Kr,en+=_e*nr,wn+=_e*ri,ln+=_e*Qr,cn+=_e*li,Sn+=_e*vi,fn+=_e*mo,Ft+=_e*ei,rn+=(_e=Se[7])*_t,gn+=_e*_r,on+=_e*Br,An+=_e*Sr,mn+=_e*wr,On+=_e*xr,Cn+=_e*Dr,yn+=_e*Jr,en+=_e*Kr,wn+=_e*nr,ln+=_e*ri,cn+=_e*Qr,Sn+=_e*li,fn+=_e*vi,Ft+=_e*mo,jt+=_e*ei,gn+=(_e=Se[8])*_t,on+=_e*_r,An+=_e*Br,mn+=_e*Sr,On+=_e*wr,Cn+=_e*xr,yn+=_e*Dr,en+=_e*Jr,wn+=_e*Kr,ln+=_e*nr,cn+=_e*ri,Sn+=_e*Qr,fn+=_e*li,Ft+=_e*vi,jt+=_e*mo,dn+=_e*ei,on+=(_e=Se[9])*_t,An+=_e*_r,mn+=_e*Br,On+=_e*Sr,Cn+=_e*wr,yn+=_e*xr,en+=_e*Dr,wn+=_e*Jr,ln+=_e*Kr,cn+=_e*nr,Sn+=_e*ri,fn+=_e*Qr,Ft+=_e*li,jt+=_e*vi,dn+=_e*mo,$t+=_e*ei,An+=(_e=Se[10])*_t,mn+=_e*_r,On+=_e*Br,Cn+=_e*Sr,yn+=_e*wr,en+=_e*xr,wn+=_e*Dr,ln+=_e*Jr,cn+=_e*Kr,Sn+=_e*nr,fn+=_e*ri,Ft+=_e*Qr,jt+=_e*li,dn+=_e*vi,$t+=_e*mo,qt+=_e*ei,mn+=(_e=Se[11])*_t,On+=_e*_r,Cn+=_e*Br,yn+=_e*Sr,en+=_e*wr,wn+=_e*xr,ln+=_e*Dr,cn+=_e*Jr,Sn+=_e*Kr,fn+=_e*nr,Ft+=_e*ri,jt+=_e*Qr,dn+=_e*li,$t+=_e*vi,qt+=_e*mo,vn+=_e*ei,On+=(_e=Se[12])*_t,Cn+=_e*_r,yn+=_e*Br,en+=_e*Sr,wn+=_e*wr,ln+=_e*xr,cn+=_e*Dr,Sn+=_e*Jr,fn+=_e*Kr,Ft+=_e*nr,jt+=_e*ri,dn+=_e*Qr,$t+=_e*li,qt+=_e*vi,vn+=_e*mo,$n+=_e*ei,Cn+=(_e=Se[13])*_t,yn+=_e*_r,en+=_e*Br,wn+=_e*Sr,ln+=_e*wr,cn+=_e*xr,Sn+=_e*Dr,fn+=_e*Jr,Ft+=_e*Kr,jt+=_e*nr,dn+=_e*ri,$t+=_e*Qr,qt+=_e*li,vn+=_e*vi,$n+=_e*mo,hr+=_e*ei,yn+=(_e=Se[14])*_t,en+=_e*_r,wn+=_e*Br,ln+=_e*Sr,cn+=_e*wr,Sn+=_e*xr,fn+=_e*Dr,Ft+=_e*Jr,jt+=_e*Kr,dn+=_e*nr,$t+=_e*ri,qt+=_e*Qr,vn+=_e*li,$n+=_e*vi,hr+=_e*mo,ur+=_e*ei,en+=(_e=Se[15])*_t,At+=38*(ln+=_e*Br),dt+=38*(cn+=_e*Sr),gt+=38*(Sn+=_e*wr),nn+=38*(fn+=_e*xr),Wt+=38*(Ft+=_e*Dr),hn+=38*(jt+=_e*Jr),rn+=38*(dn+=_e*Kr),gn+=38*($t+=_e*nr),on+=38*(qt+=_e*ri),An+=38*(vn+=_e*Qr),mn+=38*($n+=_e*li),On+=38*(hr+=_e*vi),Cn+=38*(ur+=_e*mo),yn+=38*(yr+=_e*ei),Xe=(_e=(Xe+=38*(wn+=_e*_r))+(Le=1)+65535)-65536*(Le=Math.floor(_e/65536)),At=(_e=At+Le+65535)-65536*(Le=Math.floor(_e/65536)),dt=(_e=dt+Le+65535)-65536*(Le=Math.floor(_e/65536)),gt=(_e=gt+Le+65535)-65536*(Le=Math.floor(_e/65536)),nn=(_e=nn+Le+65535)-65536*(Le=Math.floor(_e/65536)),Wt=(_e=Wt+Le+65535)-65536*(Le=Math.floor(_e/65536)),hn=(_e=hn+Le+65535)-65536*(Le=Math.floor(_e/65536)),rn=(_e=rn+Le+65535)-65536*(Le=Math.floor(_e/65536)),gn=(_e=gn+Le+65535)-65536*(Le=Math.floor(_e/65536)),on=(_e=on+Le+65535)-65536*(Le=Math.floor(_e/65536)),An=(_e=An+Le+65535)-65536*(Le=Math.floor(_e/65536)),mn=(_e=mn+Le+65535)-65536*(Le=Math.floor(_e/65536)),On=(_e=On+Le+65535)-65536*(Le=Math.floor(_e/65536)),Cn=(_e=Cn+Le+65535)-65536*(Le=Math.floor(_e/65536)),yn=(_e=yn+Le+65535)-65536*(Le=Math.floor(_e/65536)),en=(_e=en+Le+65535)-65536*(Le=Math.floor(_e/65536)),Xe=(_e=(Xe+=Le-1+37*(Le-1))+(Le=1)+65535)-65536*(Le=Math.floor(_e/65536)),At=(_e=At+Le+65535)-65536*(Le=Math.floor(_e/65536)),dt=(_e=dt+Le+65535)-65536*(Le=Math.floor(_e/65536)),gt=(_e=gt+Le+65535)-65536*(Le=Math.floor(_e/65536)),nn=(_e=nn+Le+65535)-65536*(Le=Math.floor(_e/65536)),Wt=(_e=Wt+Le+65535)-65536*(Le=Math.floor(_e/65536)),hn=(_e=hn+Le+65535)-65536*(Le=Math.floor(_e/65536)),rn=(_e=rn+Le+65535)-65536*(Le=Math.floor(_e/65536)),gn=(_e=gn+Le+65535)-65536*(Le=Math.floor(_e/65536)),on=(_e=on+Le+65535)-65536*(Le=Math.floor(_e/65536)),An=(_e=An+Le+65535)-65536*(Le=Math.floor(_e/65536)),mn=(_e=mn+Le+65535)-65536*(Le=Math.floor(_e/65536)),On=(_e=On+Le+65535)-65536*(Le=Math.floor(_e/65536)),Cn=(_e=Cn+Le+65535)-65536*(Le=Math.floor(_e/65536)),yn=(_e=yn+Le+65535)-65536*(Le=Math.floor(_e/65536)),en=(_e=en+Le+65535)-65536*(Le=Math.floor(_e/65536)),Xe+=Le-1+37*(Le-1),Te[0]=Xe,Te[1]=At,Te[2]=dt,Te[3]=gt,Te[4]=nn,Te[5]=Wt,Te[6]=hn,Te[7]=rn,Te[8]=gn,Te[9]=on,Te[10]=An,Te[11]=mn,Te[12]=On,Te[13]=Cn,Te[14]=yn,Te[15]=en}function ge(Te,Se){ae(Te,Se,Se)}function pe(Te,Se){var _e,Oe=v();for(_e=0;_e<16;_e++)Oe[_e]=Se[_e];for(_e=253;_e>=0;_e--)ge(Oe,Oe),2!==_e&&4!==_e&&ae(Oe,Oe,Se);for(_e=0;_e<16;_e++)Te[_e]=Oe[_e]}function we(Te,Se){var _e,Oe=v();for(_e=0;_e<16;_e++)Oe[_e]=Se[_e];for(_e=250;_e>=0;_e--)ge(Oe,Oe),1!==_e&&ae(Oe,Oe,Se);for(_e=0;_e<16;_e++)Te[_e]=Oe[_e]}function ce(Te,Se,Oe){var Xe,At,_e=new Uint8Array(32),Le=new Float64Array(80),dt=v(),gt=v(),nn=v(),Wt=v(),hn=v(),rn=v();for(At=0;At<31;At++)_e[At]=Se[At];for(_e[31]=127&Se[31]|64,_e[0]&=248,re(Le,Oe),At=0;At<16;At++)gt[At]=Le[At],Wt[At]=dt[At]=nn[At]=0;for(dt[0]=Wt[0]=1,At=254;At>=0;--At)H(dt,gt,Xe=_e[At>>>3]>>>(7&At)&1),H(nn,Wt,Xe),ne(hn,dt,nn),te(dt,dt,nn),ne(nn,gt,Wt),te(gt,gt,Wt),ge(Wt,hn),ge(rn,dt),ae(dt,nn,dt),ae(nn,gt,hn),ne(hn,dt,nn),te(dt,dt,nn),ge(gt,dt),te(nn,Wt,rn),ae(dt,nn,f),ne(dt,dt,Wt),ae(nn,nn,dt),ae(dt,Wt,rn),ae(Wt,gt,Le),ge(gt,hn),H(dt,gt,Xe),H(nn,Wt,Xe);for(At=0;At<16;At++)Le[At+16]=dt[At],Le[At+32]=nn[At],Le[At+48]=gt[At],Le[At+64]=Wt[At];var gn=Le.subarray(32),on=Le.subarray(16);return pe(gn,gn),ae(on,on,gn),L(Te,on),0}function le(Te,Se){return ce(Te,Se,s)}function ue(Te,Se){return E(Se,32),le(Te,Se)}function fe(Te,Se,Oe){var _e=new Uint8Array(32);return ce(_e,Oe,Se),z(Te,M,_e,Y)}T.prototype.blocks=function(Te,Se,Oe){for(var Le,Xe,At,dt,gt,nn,Wt,hn,rn,gn,on,An,mn,On,Cn,yn,en,wn,ln,_e=this.fin?0:2048,cn=this.h[0],Sn=this.h[1],fn=this.h[2],Ft=this.h[3],jt=this.h[4],dn=this.h[5],$t=this.h[6],qt=this.h[7],vn=this.h[8],$n=this.h[9],hr=this.r[0],ur=this.r[1],yr=this.r[2],_t=this.r[3],_r=this.r[4],Br=this.r[5],Sr=this.r[6],wr=this.r[7],xr=this.r[8],Dr=this.r[9];Oe>=16;)gn=rn=0,gn+=(cn+=8191&(Le=255&Te[Se+0]|(255&Te[Se+1])<<8))*hr,gn+=(Sn+=8191&(Le>>>13|(Xe=255&Te[Se+2]|(255&Te[Se+3])<<8)<<3))*(5*Dr),gn+=(fn+=8191&(Xe>>>10|(At=255&Te[Se+4]|(255&Te[Se+5])<<8)<<6))*(5*xr),gn+=(Ft+=8191&(At>>>7|(dt=255&Te[Se+6]|(255&Te[Se+7])<<8)<<9))*(5*wr),rn=(gn+=(jt+=8191&(dt>>>4|(gt=255&Te[Se+8]|(255&Te[Se+9])<<8)<<12))*(5*Sr))>>>13,gn&=8191,gn+=(dn+=gt>>>1&8191)*(5*Br),gn+=($t+=8191&(gt>>>14|(nn=255&Te[Se+10]|(255&Te[Se+11])<<8)<<2))*(5*_r),gn+=(qt+=8191&(nn>>>11|(Wt=255&Te[Se+12]|(255&Te[Se+13])<<8)<<5))*(5*_t),gn+=(vn+=8191&(Wt>>>8|(hn=255&Te[Se+14]|(255&Te[Se+15])<<8)<<8))*(5*yr),on=rn+=(gn+=($n+=hn>>>5|_e)*(5*ur))>>>13,on+=cn*ur,on+=Sn*hr,on+=fn*(5*Dr),on+=Ft*(5*xr),rn=(on+=jt*(5*wr))>>>13,on&=8191,on+=dn*(5*Sr),on+=$t*(5*Br),on+=qt*(5*_r),on+=vn*(5*_t),rn+=(on+=$n*(5*yr))>>>13,on&=8191,An=rn,An+=cn*yr,An+=Sn*ur,An+=fn*hr,An+=Ft*(5*Dr),rn=(An+=jt*(5*xr))>>>13,An&=8191,An+=dn*(5*wr),An+=$t*(5*Sr),An+=qt*(5*Br),An+=vn*(5*_r),mn=rn+=(An+=$n*(5*_t))>>>13,mn+=cn*_t,mn+=Sn*yr,mn+=fn*ur,mn+=Ft*hr,rn=(mn+=jt*(5*Dr))>>>13,mn&=8191,mn+=dn*(5*xr),mn+=$t*(5*wr),mn+=qt*(5*Sr),mn+=vn*(5*Br),On=rn+=(mn+=$n*(5*_r))>>>13,On+=cn*_r,On+=Sn*_t,On+=fn*yr,On+=Ft*ur,rn=(On+=jt*hr)>>>13,On&=8191,On+=dn*(5*Dr),On+=$t*(5*xr),On+=qt*(5*wr),On+=vn*(5*Sr),Cn=rn+=(On+=$n*(5*Br))>>>13,Cn+=cn*Br,Cn+=Sn*_r,Cn+=fn*_t,Cn+=Ft*yr,rn=(Cn+=jt*ur)>>>13,Cn&=8191,Cn+=dn*hr,Cn+=$t*(5*Dr),Cn+=qt*(5*xr),Cn+=vn*(5*wr),yn=rn+=(Cn+=$n*(5*Sr))>>>13,yn+=cn*Sr,yn+=Sn*Br,yn+=fn*_r,yn+=Ft*_t,rn=(yn+=jt*yr)>>>13,yn&=8191,yn+=dn*ur,yn+=$t*hr,yn+=qt*(5*Dr),yn+=vn*(5*xr),en=rn+=(yn+=$n*(5*wr))>>>13,en+=cn*wr,en+=Sn*Sr,en+=fn*Br,en+=Ft*_r,rn=(en+=jt*_t)>>>13,en&=8191,en+=dn*yr,en+=$t*ur,en+=qt*hr,en+=vn*(5*Dr),wn=rn+=(en+=$n*(5*xr))>>>13,wn+=cn*xr,wn+=Sn*wr,wn+=fn*Sr,wn+=Ft*Br,rn=(wn+=jt*_r)>>>13,wn&=8191,wn+=dn*_t,wn+=$t*yr,wn+=qt*ur,wn+=vn*hr,ln=rn+=(wn+=$n*(5*Dr))>>>13,ln+=cn*Dr,ln+=Sn*xr,ln+=fn*wr,ln+=Ft*Sr,rn=(ln+=jt*Br)>>>13,ln&=8191,ln+=dn*_r,ln+=$t*_t,ln+=qt*yr,ln+=vn*ur,cn=gn=8191&(rn=(rn=((rn+=(ln+=$n*hr)>>>13)<<2)+rn|0)+(gn&=8191)|0),Sn=on+=rn>>>=13,fn=An&=8191,Ft=mn&=8191,jt=On&=8191,dn=Cn&=8191,$t=yn&=8191,qt=en&=8191,vn=wn&=8191,$n=ln&=8191,Se+=16,Oe-=16;this.h[0]=cn,this.h[1]=Sn,this.h[2]=fn,this.h[3]=Ft,this.h[4]=jt,this.h[5]=dn,this.h[6]=$t,this.h[7]=qt,this.h[8]=vn,this.h[9]=$n},T.prototype.finish=function(Te,Se){var _e,Le,Xe,At,Oe=new Uint16Array(10);if(this.leftover){for(At=this.leftover,this.buffer[At++]=1;At<16;At++)this.buffer[At]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(_e=this.h[1]>>>13,this.h[1]&=8191,At=2;At<10;At++)this.h[At]+=_e,_e=this.h[At]>>>13,this.h[At]&=8191;for(this.h[0]+=5*_e,_e=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=_e,_e=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=_e,Oe[0]=this.h[0]+5,_e=Oe[0]>>>13,Oe[0]&=8191,At=1;At<10;At++)Oe[At]=this.h[At]+_e,_e=Oe[At]>>>13,Oe[At]&=8191;for(Oe[9]-=8192,Le=(1^_e)-1,At=0;At<10;At++)Oe[At]&=Le;for(Le=~Le,At=0;At<10;At++)this.h[At]=this.h[At]&Le|Oe[At];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),Xe=this.h[0]+this.pad[0],this.h[0]=65535&Xe,At=1;At<8;At++)Xe=(this.h[At]+this.pad[At]|0)+(Xe>>>16)|0,this.h[At]=65535&Xe;Te[Se+0]=this.h[0]>>>0&255,Te[Se+1]=this.h[0]>>>8&255,Te[Se+2]=this.h[1]>>>0&255,Te[Se+3]=this.h[1]>>>8&255,Te[Se+4]=this.h[2]>>>0&255,Te[Se+5]=this.h[2]>>>8&255,Te[Se+6]=this.h[3]>>>0&255,Te[Se+7]=this.h[3]>>>8&255,Te[Se+8]=this.h[4]>>>0&255,Te[Se+9]=this.h[4]>>>8&255,Te[Se+10]=this.h[5]>>>0&255,Te[Se+11]=this.h[5]>>>8&255,Te[Se+12]=this.h[6]>>>0&255,Te[Se+13]=this.h[6]>>>8&255,Te[Se+14]=this.h[7]>>>0&255,Te[Se+15]=this.h[7]>>>8&255},T.prototype.update=function(Te,Se,Oe){var _e,Le;if(this.leftover){for((Le=16-this.leftover)>Oe&&(Le=Oe),_e=0;_e=16&&(Le=Oe-Oe%16,this.blocks(Te,Se,Le),Se+=Le,Oe-=Le),Oe){for(_e=0;_e=128;){for(Sn=0;Sn<16;Sn++)fn=8*Sn+li,Le[Sn]=Oe[fn+0]<<24|Oe[fn+1]<<16|Oe[fn+2]<<8|Oe[fn+3],Xe[Sn]=Oe[fn+4]<<24|Oe[fn+5]<<16|Oe[fn+6]<<8|Oe[fn+7];for(Sn=0;Sn<80;Sn++)if(At=$n,dt=hr,gt=ur,nn=yr,Wt=_t,hn=_r,rn=Br,Sr,on=wr,An=xr,mn=Dr,On=Jr,Cn=Kr,yn=nr,en=ri,Qr,dn=65535&(jt=Qr),$t=jt>>>16,qt=65535&(Ft=Sr),vn=Ft>>>16,dn+=65535&(jt=(Kr>>>14|_t<<18)^(Kr>>>18|_t<<14)^(_t>>>9|Kr<<23)),$t+=jt>>>16,qt+=65535&(Ft=(_t>>>14|Kr<<18)^(_t>>>18|Kr<<14)^(Kr>>>9|_t<<23)),vn+=Ft>>>16,dn+=65535&(jt=Kr&nr^~Kr&ri),$t+=jt>>>16,qt+=65535&(Ft=_t&_r^~_t&Br),vn+=Ft>>>16,Ft=ot[2*Sn],dn+=65535&(jt=ot[2*Sn+1]),$t+=jt>>>16,qt+=65535&Ft,vn+=Ft>>>16,Ft=Le[Sn%16],$t+=(jt=Xe[Sn%16])>>>16,qt+=65535&Ft,vn+=Ft>>>16,qt+=($t+=(dn+=65535&jt)>>>16)>>>16,dn=65535&(jt=cn=65535&dn|$t<<16),$t=jt>>>16,qt=65535&(Ft=ln=65535&qt|(vn+=qt>>>16)<<16),vn=Ft>>>16,dn+=65535&(jt=(wr>>>28|$n<<4)^($n>>>2|wr<<30)^($n>>>7|wr<<25)),$t+=jt>>>16,qt+=65535&(Ft=($n>>>28|wr<<4)^(wr>>>2|$n<<30)^(wr>>>7|$n<<25)),vn+=Ft>>>16,$t+=(jt=wr&xr^wr&Dr^xr&Dr)>>>16,qt+=65535&(Ft=$n&hr^$n&ur^hr&ur),vn+=Ft>>>16,gn=65535&(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)|(vn+=qt>>>16)<<16,wn=65535&dn|$t<<16,dn=65535&(jt=On),$t=jt>>>16,qt=65535&(Ft=nn),vn=Ft>>>16,$t+=(jt=cn)>>>16,qt+=65535&(Ft=ln),vn+=Ft>>>16,hr=At,ur=dt,yr=gt,_t=nn=65535&(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)|(vn+=qt>>>16)<<16,_r=Wt,Br=hn,Sr=rn,$n=gn,xr=on,Dr=An,Jr=mn,Kr=On=65535&dn|$t<<16,nr=Cn,ri=yn,Qr=en,wr=wn,Sn%16==15)for(fn=0;fn<16;fn++)Ft=Le[fn],dn=65535&(jt=Xe[fn]),$t=jt>>>16,qt=65535&Ft,vn=Ft>>>16,Ft=Le[(fn+9)%16],dn+=65535&(jt=Xe[(fn+9)%16]),$t+=jt>>>16,qt+=65535&Ft,vn+=Ft>>>16,ln=Le[(fn+1)%16],dn+=65535&(jt=((cn=Xe[(fn+1)%16])>>>1|ln<<31)^(cn>>>8|ln<<24)^(cn>>>7|ln<<25)),$t+=jt>>>16,qt+=65535&(Ft=(ln>>>1|cn<<31)^(ln>>>8|cn<<24)^ln>>>7),vn+=Ft>>>16,ln=Le[(fn+14)%16],$t+=(jt=((cn=Xe[(fn+14)%16])>>>19|ln<<13)^(ln>>>29|cn<<3)^(cn>>>6|ln<<26))>>>16,qt+=65535&(Ft=(ln>>>19|cn<<13)^(cn>>>29|ln<<3)^ln>>>6),vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Le[fn]=65535&qt|vn<<16,Xe[fn]=65535&dn|$t<<16;dn=65535&(jt=wr),$t=jt>>>16,qt=65535&(Ft=$n),vn=Ft>>>16,Ft=Te[0],$t+=(jt=Se[0])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[0]=$n=65535&qt|vn<<16,Se[0]=wr=65535&dn|$t<<16,dn=65535&(jt=xr),$t=jt>>>16,qt=65535&(Ft=hr),vn=Ft>>>16,Ft=Te[1],$t+=(jt=Se[1])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[1]=hr=65535&qt|vn<<16,Se[1]=xr=65535&dn|$t<<16,dn=65535&(jt=Dr),$t=jt>>>16,qt=65535&(Ft=ur),vn=Ft>>>16,Ft=Te[2],$t+=(jt=Se[2])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[2]=ur=65535&qt|vn<<16,Se[2]=Dr=65535&dn|$t<<16,dn=65535&(jt=Jr),$t=jt>>>16,qt=65535&(Ft=yr),vn=Ft>>>16,Ft=Te[3],$t+=(jt=Se[3])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[3]=yr=65535&qt|vn<<16,Se[3]=Jr=65535&dn|$t<<16,dn=65535&(jt=Kr),$t=jt>>>16,qt=65535&(Ft=_t),vn=Ft>>>16,Ft=Te[4],$t+=(jt=Se[4])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[4]=_t=65535&qt|vn<<16,Se[4]=Kr=65535&dn|$t<<16,dn=65535&(jt=nr),$t=jt>>>16,qt=65535&(Ft=_r),vn=Ft>>>16,Ft=Te[5],$t+=(jt=Se[5])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[5]=_r=65535&qt|vn<<16,Se[5]=nr=65535&dn|$t<<16,dn=65535&(jt=ri),$t=jt>>>16,qt=65535&(Ft=Br),vn=Ft>>>16,Ft=Te[6],$t+=(jt=Se[6])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[6]=Br=65535&qt|vn<<16,Se[6]=ri=65535&dn|$t<<16,dn=65535&(jt=Qr),$t=jt>>>16,qt=65535&(Ft=Sr),vn=Ft>>>16,Ft=Te[7],$t+=(jt=Se[7])>>>16,qt+=65535&Ft,vn+=Ft>>>16,vn+=(qt+=($t+=(dn+=65535&jt)>>>16)>>>16)>>>16,Te[7]=Sr=65535&qt|vn<<16,Se[7]=Qr=65535&dn|$t<<16,li+=128,_e-=128}return _e}function Ye(Te,Se,Oe){var At,_e=new Int32Array(8),Le=new Int32Array(8),Xe=new Uint8Array(256),dt=Oe;for(_e[0]=1779033703,_e[1]=3144134277,_e[2]=1013904242,_e[3]=2773480762,_e[4]=1359893119,_e[5]=2600822924,_e[6]=528734635,_e[7]=1541459225,Le[0]=4089235720,Le[1]=2227873595,Le[2]=4271175723,Le[3]=1595750129,Le[4]=2917565137,Le[5]=725511199,Le[6]=4215389547,Le[7]=327033209,nt(_e,Le,Se,Oe),Oe%=128,At=0;At=0;--Le)st(Te,Se,_e=Oe[Le/8|0]>>(7&Le)&1),It(Se,Te),It(Te,Te),st(Te,Se,_e)}function Be(Te,Se){var Oe=[v(),v(),v(),v()];R(Oe[0],m),R(Oe[1],S),R(Oe[2],y),ae(Oe[3],m,S),ze(Te,Oe,Se)}function Ze(Te,Se,Oe){var Xe,_e=new Uint8Array(64),Le=[v(),v(),v(),v()];for(Oe||E(Se,32),Ye(_e,Se,32),_e[0]&=248,_e[31]&=127,_e[31]|=64,Be(Le,_e),He(Te,Le),Xe=0;Xe<32;Xe++)Se[Xe+32]=Te[Xe];return 0}var ut=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Me(Te,Se){var Oe,_e,Le,Xe;for(_e=63;_e>=32;--_e){for(Oe=0,Le=_e-32,Xe=_e-12;Le>4)*ut[Le],Oe=Se[Le]>>8,Se[Le]&=255;for(Le=0;Le<32;Le++)Se[Le]-=Oe*ut[Le];for(_e=0;_e<32;_e++)Se[_e+1]+=Se[_e]>>8,Te[_e]=255&Se[_e]}function ve(Te){var Oe,Se=new Float64Array(64);for(Oe=0;Oe<64;Oe++)Se[Oe]=Te[Oe];for(Oe=0;Oe<64;Oe++)Te[Oe]=0;Me(Te,Se)}function xe(Te,Se,Oe,_e){var dt,gt,Le=new Uint8Array(64),Xe=new Uint8Array(64),At=new Uint8Array(64),nn=new Float64Array(64),Wt=[v(),v(),v(),v()];Ye(Le,_e,32),Le[0]&=248,Le[31]&=127,Le[31]|=64;var hn=Oe+64;for(dt=0;dt>7&&te(Te[0],g,Te[0]),ae(Te[3],Te[0],Te[1]),0)}(gt,_e))return-1;for(Le=0;Le=0},l.sign.keyPair=function(){var Te=new Uint8Array(32),Se=new Uint8Array(64);return Ze(Te,Se),{publicKey:Te,secretKey:Se}},l.sign.keyPair.fromSecretKey=function(Te){if(Rt(Te),64!==Te.length)throw new Error("bad secret key size");for(var Se=new Uint8Array(32),Oe=0;Oe{q.exports=function(n){return"function"==typeof Buffer._augment&&Buffer.TYPED_ARRAY_SUPPORT?Buffer._augment(n):new Buffer(n)}},69830:(q,n)=>{var L,b,m,u=void 0,l=1e5,v=(L=Object.prototype.toString,b=Object.prototype.hasOwnProperty,{Class:function(B){return L.call(B).replace(/^\[object *|\]$/g,"")},HasProperty:function(B,re){return re in B},HasOwnProperty:function(B,re){return b.call(B,re)},IsCallable:function(B){return"function"==typeof B},ToInt32:function(B){return B>>0},ToUint32:function(B){return B>>>0}}),E=Math.LN2,M=Math.abs,s=Math.floor,g=Math.log,y=Math.min,f=Math.pow,d=Math.round;function p(L){if(S&&m){var B,b=S(L);for(B=0;B>B}function P(L,b){var B=32-b;return L<>>B}function x(L){return[255&L]}function C(L){return D(L[0],8)}function N(L){return[255&L]}function k(L){return P(L[0],8)}function U(L){return[(L=d(Number(L)))<0?0:L>255?255:255&L]}function z(L){return[L>>8&255,255&L]}function Y(L){return D(L[0]<<8|L[1],16)}function G(L){return[L>>8&255,255&L]}function F(L){return P(L[0]<<8|L[1],16)}function j(L){return[L>>24&255,L>>16&255,L>>8&255,255&L]}function Z(L){return D(L[0]<<24|L[1]<<16|L[2]<<8|L[3],32)}function T(L){return[L>>24&255,L>>16&255,L>>8&255,255&L]}function o(L){return P(L[0]<<24|L[1]<<16|L[2]<<8|L[3],32)}function h(L,b,B){var ne,te,ae,pe,we,ce,le,re=(1<.5||he%2?he+1:he}for(L!=L?(te=(1<=f(2,1-re)?(te=y(s(g(L)/E),1023),(ae=ue(L/f(2,te)*f(2,B)))/f(2,B)>=2&&(te+=1,ae=1),te>re?(te=(1<>=1;return re.reverse(),ge=re.join(""),pe=(1<0?we*f(2,ce-pe)*(1+le/f(2,B)):0!==le?we*f(2,-(pe-1))*(le/f(2,B)):we<0?-0:0}function I(L){return w(L,11,52)}function R(L){return h(L,11,52)}function V(L){return w(L,8,23)}function H(L){return h(L,8,23)}(function(){var L=function(fe){if((fe=v.ToInt32(fe))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var he;for(this.byteLength=fe,this._bytes=[],this._bytes.length=fe,he=0;hethis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=v.ToUint32(ot),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(Ye=arguments[0],this.length=v.ToUint32(Ye.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new L(this.byteLength),this.byteOffset=0,It=0;Itl)throw new RangeError("Array too large for polyfill");var B;for(B=0;B=this.length)return u;var ot,nt,Re=[];for(ot=0,nt=this.byteOffset+Pe*this.BYTES_PER_ELEMENT;ot=this.length)return u;var nt,Ye,ot=this._pack(Re);for(nt=0,Ye=this.byteOffset+Pe*this.BYTES_PER_ELEMENT;ntthis.length)throw new RangeError("Offset plus length of array is out of range");if(Be=this.byteOffset+Ye*this.BYTES_PER_ELEMENT,Ze=ot.length*this.BYTES_PER_ELEMENT,ot.buffer===this.buffer){for(ut=[],st=0,He=ot.byteOffset;stthis.length)throw new RangeError("Offset plus length of array is out of range");for(st=0;stst?st:Ye}Pe=v.ToInt32(Pe),Re=v.ToInt32(Re),arguments.length<1&&(Pe=0),arguments.length<2&&(Re=this.length),Pe<0&&(Pe=this.length+Pe),Re<0&&(Re=this.length+Re),Pe=ot(Pe,0,this.length);var nt=(Re=ot(Re,0,this.length))-Pe;return nt<0&&(nt=0),new this.constructor(this.buffer,this.byteOffset+Pe*this.BYTES_PER_ELEMENT,nt)},Ae}var re=B(1,x,C),ne=B(1,N,k),te=B(1,U,k),ae=B(2,z,Y),ge=B(2,G,F),pe=B(4,j,Z),we=B(4,T,o),ce=B(4,H,V),le=B(8,R,I);n.iq=n.iq||re,n.U2=n.U2||ne,n.we=n.we||te,n.M2=n.M2||ae,n.HA=n.HA||ge,n.ZV=n.ZV||pe,n._R=n._R||we,n.$L=n.$L||ce,n.I=n.I||le})(),function(){function L(te,ae){return v.IsCallable(te.get)?te.get(ae):te[ae]}var te,b=(te=new n.HA([4660]),18===L(new n.U2(te.buffer),0)),B=function(ae,ge,pe){if(0===arguments.length)ae=new n.eT(0);else if(!(ae instanceof n.eT||"ArrayBuffer"===v.Class(ae)))throw new TypeError("TypeError");if(this.buffer=ae||new n.eT(0),this.byteOffset=v.ToUint32(ge),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=v.ToUint32(pe),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");p(this)};function re(te){return function(ae,ge){if((ae=v.ToUint32(ae))+te.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");ae+=this.byteOffset;var ce,pe=new n.U2(this.buffer,ae,te.BYTES_PER_ELEMENT),we=[];for(ce=0;cethis.byteLength)throw new RangeError("Array index out of range");var ue,we=new te([ge]),ce=new n.U2(we.buffer),le=[];for(ue=0;ue{q.exports=u(62074)},46564:q=>{q.exports=function(u){var v,l=!1;return u instanceof Function||(l=!0,v=u,u=null),function(){return l||(l=!0,v=u.apply(this,arguments),u=null),v}}},25554:q=>{q.exports=function n(u,l,v){if(v||(v=[]),v.length{q.exports={cache:u(46564),eachCombination:u(25554)}},75557:(q,n,u)=>{"use strict";function l(v,E){return E=E||{},new Promise(function(M,s){var g=new XMLHttpRequest,y=[],f=[],d={},p=function(){return{ok:2==(g.status/100|0),statusText:g.statusText,status:g.status,url:g.responseURL,text:function(){return Promise.resolve(g.responseText)},json:function(){return Promise.resolve(g.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([g.response]))},clone:p,headers:{keys:function(){return y},entries:function(){return f},get:function(S){return d[S.toLowerCase()]},has:function(S){return S.toLowerCase()in d}}}};for(var m in g.open(E.method||"get",v,!0),g.onload=function(){g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(S,_,D){y.push(_=_.toLowerCase()),f.push([_,D]),d[_]=d[_]?d[_]+","+D:D}),M(p())},g.onerror=s,g.withCredentials="include"==E.credentials,E.headers)g.setRequestHeader(m,E.headers[m]);g.send(E.body||null)})}u.r(n),u.d(n,{default:()=>l})},96482:function(q,n){!function(u){"use strict";function l(){for(var Te=arguments.length,Se=Array(Te),Oe=0;Oe1){Se[0]=Se[0].slice(0,-1);for(var _e=Se.length-1,Le=1;Le<_e;++Le)Se[Le]=Se[Le].slice(1,-1);return Se[_e]=Se[_e].slice(1),Se.join("")}return Se[0]}function v(Te){return"(?:"+Te+")"}function E(Te){return void 0===Te?"undefined":null===Te?"null":Object.prototype.toString.call(Te).split(" ").pop().split("]").shift().toLowerCase()}function M(Te){return Te.toUpperCase()}function s(Te){return null!=Te?Te instanceof Array?Te:"number"!=typeof Te.length||Te.split||Te.setInterval||Te.call?[Te]:Array.prototype.slice.call(Te):[]}function g(Te,Se){var Oe=Te;if(Se)for(var _e in Se)Oe[_e]=Se[_e];return Oe}function y(Te){var Se="[A-Za-z]",_e="[0-9]",Xe=l(_e,"[A-Fa-f]"),gt=v(v("%[EFef]"+Xe+"%"+Xe+Xe+"%"+Xe+Xe)+"|"+v("%[89A-Fa-f]"+Xe+"%"+Xe+Xe)+"|"+v("%"+Xe+Xe)),Wt="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",hn=l("[\\:\\/\\?\\#\\[\\]\\@]",Wt),gn=Te?"[\\uE000-\\uF8FF]":"[]",on=l(Se,_e,"[\\-\\.\\_\\~]",Te?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),An=v(Se+l(Se,_e,"[\\+\\-\\.]")+"*"),mn=v(v(gt+"|"+l(on,Wt,"[\\:]"))+"*"),Cn=(v(v("25[0-5]")+"|"+v("2[0-4]"+_e)+"|"+v("1"+_e+_e)+"|"+v("[1-9]"+_e)+"|"+_e),v(v("25[0-5]")+"|"+v("2[0-4]"+_e)+"|"+v("1"+_e+_e)+"|"+v("0?[1-9]"+_e)+"|0?0?"+_e)),yn=v(Cn+"\\."+Cn+"\\."+Cn+"\\."+Cn),en=v(Xe+"{1,4}"),wn=v(v(en+"\\:"+en)+"|"+yn),ln=v(v(en+"\\:")+"{6}"+wn),cn=v("\\:\\:"+v(en+"\\:")+"{5}"+wn),Sn=v(v(en)+"?\\:\\:"+v(en+"\\:")+"{4}"+wn),fn=v(v(v(en+"\\:")+"{0,1}"+en)+"?\\:\\:"+v(en+"\\:")+"{3}"+wn),Ft=v(v(v(en+"\\:")+"{0,2}"+en)+"?\\:\\:"+v(en+"\\:")+"{2}"+wn),jt=v(v(v(en+"\\:")+"{0,3}"+en)+"?\\:\\:"+en+"\\:"+wn),dn=v(v(v(en+"\\:")+"{0,4}"+en)+"?\\:\\:"+wn),$t=v(v(v(en+"\\:")+"{0,5}"+en)+"?\\:\\:"+en),qt=v(v(v(en+"\\:")+"{0,6}"+en)+"?\\:\\:"),vn=v([ln,cn,Sn,fn,Ft,jt,dn,$t,qt].join("|")),$n=v(v(on+"|"+gt)+"+"),ur=(v(vn+"\\%25"+$n),v(vn+v("\\%25|\\%(?!"+Xe+"{2})")+$n)),yr=v("[vV]"+Xe+"+\\."+l(on,Wt,"[\\:]")+"+"),_t=v("\\["+v(ur+"|"+vn+"|"+yr)+"\\]"),_r=v(v(gt+"|"+l(on,Wt))+"*"),Br=v(_t+"|"+yn+"(?!"+_r+")|"+_r),Sr=v(_e+"*"),wr=v(v(mn+"@")+"?"+Br+v("\\:"+Sr)+"?"),xr=v(gt+"|"+l(on,Wt,"[\\:\\@]")),Dr=v(xr+"*"),Jr=v(xr+"+"),Kr=v(v(gt+"|"+l(on,Wt,"[\\@]"))+"+"),nr=v(v("\\/"+Dr)+"*"),ri=v("\\/"+v(Jr+nr)+"?"),Qr=v(Kr+nr),li=v(Jr+nr),vi="(?!"+xr+")",ei=(v(nr+"|"+ri+"|"+Qr+"|"+li+"|"+vi),v(v(xr+"|"+l("[\\/\\?]",gn))+"*")),Wa=v(v(xr+"|[\\/\\?]")+"*"),us=v(v("\\/\\/"+wr+nr)+"|"+ri+"|"+li+"|"+vi),Xs=v(An+"\\:"+us+v("\\?"+ei)+"?"+v("\\#"+Wa)+"?"),qs=v(v("\\/\\/"+wr+nr)+"|"+ri+"|"+Qr+"|"+vi),ks=v(qs+v("\\?"+ei)+"?"+v("\\#"+Wa)+"?");return v(Xs+"|"+ks),v(An+"\\:"+us+v("\\?"+ei)+"?"),v(v("\\/\\/("+v("("+mn+")@")+"?("+Br+")"+v("\\:("+Sr+")")+"?)")+"?("+nr+"|"+ri+"|"+li+"|"+vi+")"),v("\\?("+ei+")"),v("\\#("+Wa+")"),v(v("\\/\\/("+v("("+mn+")@")+"?("+Br+")"+v("\\:("+Sr+")")+"?)")+"?("+nr+"|"+ri+"|"+Qr+"|"+vi+")"),v("\\?("+ei+")"),v("\\#("+Wa+")"),v(v("\\/\\/("+v("("+mn+")@")+"?("+Br+")"+v("\\:("+Sr+")")+"?)")+"?("+nr+"|"+ri+"|"+li+"|"+vi+")"),v("\\?("+ei+")"),v("\\#("+Wa+")"),v("("+mn+")@"),v("\\:("+Sr+")"),{NOT_SCHEME:new RegExp(l("[^]",Se,_e,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(l("[^\\%\\:]",on,Wt),"g"),NOT_HOST:new RegExp(l("[^\\%\\[\\]\\:]",on,Wt),"g"),NOT_PATH:new RegExp(l("[^\\%\\/\\:\\@]",on,Wt),"g"),NOT_PATH_NOSCHEME:new RegExp(l("[^\\%\\/\\@]",on,Wt),"g"),NOT_QUERY:new RegExp(l("[^\\%]",on,Wt,"[\\:\\@\\/\\?]",gn),"g"),NOT_FRAGMENT:new RegExp(l("[^\\%]",on,Wt,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(l("[^]",on,Wt),"g"),UNRESERVED:new RegExp(on,"g"),OTHER_CHARS:new RegExp(l("[^\\%]",on,hn),"g"),PCT_ENCODED:new RegExp(gt,"g"),IPV4ADDRESS:new RegExp("^("+yn+")$"),IPV6ADDRESS:new RegExp("^\\[?("+vn+")"+v(v("\\%25|\\%(?!"+Xe+"{2})")+"("+$n+")")+"?\\]?$")}}var f=y(!1),d=y(!0),p=function(){function Te(Se,Oe){var _e=[],Le=!0,Xe=!1,At=void 0;try{for(var gt,dt=Se[Symbol.iterator]();!(Le=(gt=dt.next()).done)&&(_e.push(gt.value),!Oe||_e.length!==Oe);Le=!0);}catch(nn){Xe=!0,At=nn}finally{try{!Le&&dt.return&&dt.return()}finally{if(Xe)throw At}}return _e}return function(Se,Oe){if(Array.isArray(Se))return Se;if(Symbol.iterator in Object(Se))return Te(Se,Oe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(Te){if(Array.isArray(Te)){for(var Se=0,Oe=Array(Te.length);Se= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=_-D,Z=Math.floor,T=String.fromCharCode;function o(Te){throw new RangeError(F[Te])}function h(Te,Se){for(var Oe=[],_e=Te.length;_e--;)Oe[_e]=Se(Te[_e]);return Oe}function w(Te,Se){var Oe=Te.split("@"),_e="";return Oe.length>1&&(_e=Oe[0]+"@",Te=Oe[1]),_e+h((Te=Te.replace(G,".")).split("."),Se).join(".")}function I(Te){for(var Se=[],Oe=0,_e=Te.length;Oe<_e;){var Le=Te.charCodeAt(Oe++);if(Le>=55296&&Le<=56319&&Oe<_e){var Xe=Te.charCodeAt(Oe++);56320==(64512&Xe)?Se.push(((1023&Le)<<10)+(1023&Xe)+65536):(Se.push(Le),Oe--)}else Se.push(Le)}return Se}var V=function(Se){return Se-48<10?Se-22:Se-65<26?Se-65:Se-97<26?Se-97:_},H=function(Se,Oe){return Se+22+75*(Se<26)-((0!=Oe)<<5)},L=function(Se,Oe,_e){var Le=0;for(Se=_e?Z(Se/C):Se>>1,Se+=Z(Se/Oe);Se>j*P>>1;Le+=_)Se=Z(Se/j);return Z(Le+(j+1)*Se/(Se+x))},b=function(Se){var Oe=[],_e=Se.length,Le=0,Xe=k,At=N,dt=Se.lastIndexOf(U);dt<0&&(dt=0);for(var gt=0;gt=128&&o("not-basic"),Oe.push(Se.charCodeAt(gt));for(var nn=dt>0?dt+1:0;nn<_e;){for(var Wt=Le,hn=1,rn=_;;rn+=_){nn>=_e&&o("invalid-input");var gn=V(Se.charCodeAt(nn++));(gn>=_||gn>Z((S-Le)/hn))&&o("overflow"),Le+=gn*hn;var on=rn<=At?D:rn>=At+P?P:rn-At;if(gnZ(S/An)&&o("overflow"),hn*=An}var mn=Oe.length+1;At=L(Le-Wt,mn,0==Wt),Z(Le/mn)>S-Xe&&o("overflow"),Xe+=Z(Le/mn),Le%=mn,Oe.splice(Le++,0,Xe)}return String.fromCodePoint.apply(String,Oe)},B=function(Se){var Oe=[],_e=(Se=I(Se)).length,Le=k,Xe=0,At=N,dt=!0,gt=!1,nn=void 0;try{for(var hn,Wt=Se[Symbol.iterator]();!(dt=(hn=Wt.next()).done);dt=!0){var rn=hn.value;rn<128&&Oe.push(T(rn))}}catch(ur){gt=!0,nn=ur}finally{try{!dt&&Wt.return&&Wt.return()}finally{if(gt)throw nn}}var gn=Oe.length,on=gn;for(gn&&Oe.push(U);on<_e;){var An=S,mn=!0,On=!1,Cn=void 0;try{for(var en,yn=Se[Symbol.iterator]();!(mn=(en=yn.next()).done);mn=!0){var wn=en.value;wn>=Le&&wnZ((S-Xe)/ln)&&o("overflow"),Xe+=(An-Le)*ln,Le=An;var cn=!0,Sn=!1,fn=void 0;try{for(var jt,Ft=Se[Symbol.iterator]();!(cn=(jt=Ft.next()).done);cn=!0){var dn=jt.value;if(dnS&&o("overflow"),dn==Le){for(var $t=Xe,qt=_;;qt+=_){var vn=qt<=At?D:qt>=At+P?P:qt-At;if($t>6|192).toString(16).toUpperCase()+"%"+(63&Se|128).toString(16).toUpperCase():"%"+(Se>>12|224).toString(16).toUpperCase()+"%"+(Se>>6&63|128).toString(16).toUpperCase()+"%"+(63&Se|128).toString(16).toUpperCase()}function pe(Te){for(var Se="",Oe=0,_e=Te.length;Oe<_e;){var Le=parseInt(Te.substr(Oe+1,2),16);if(Le<128)Se+=String.fromCharCode(Le),Oe+=3;else if(Le>=194&&Le<224){if(_e-Oe>=6){var Xe=parseInt(Te.substr(Oe+4,2),16);Se+=String.fromCharCode((31&Le)<<6|63&Xe)}else Se+=Te.substr(Oe,6);Oe+=6}else if(Le>=224){if(_e-Oe>=9){var At=parseInt(Te.substr(Oe+4,2),16),dt=parseInt(Te.substr(Oe+7,2),16);Se+=String.fromCharCode((15&Le)<<12|(63&At)<<6|63&dt)}else Se+=Te.substr(Oe,9);Oe+=9}else Se+=Te.substr(Oe,3),Oe+=3}return Se}function we(Te,Se){function Oe(_e){var Le=pe(_e);return Le.match(Se.UNRESERVED)?Le:_e}return Te.scheme&&(Te.scheme=String(Te.scheme).replace(Se.PCT_ENCODED,Oe).toLowerCase().replace(Se.NOT_SCHEME,"")),void 0!==Te.userinfo&&(Te.userinfo=String(Te.userinfo).replace(Se.PCT_ENCODED,Oe).replace(Se.NOT_USERINFO,ge).replace(Se.PCT_ENCODED,M)),void 0!==Te.host&&(Te.host=String(Te.host).replace(Se.PCT_ENCODED,Oe).toLowerCase().replace(Se.NOT_HOST,ge).replace(Se.PCT_ENCODED,M)),void 0!==Te.path&&(Te.path=String(Te.path).replace(Se.PCT_ENCODED,Oe).replace(Te.scheme?Se.NOT_PATH:Se.NOT_PATH_NOSCHEME,ge).replace(Se.PCT_ENCODED,M)),void 0!==Te.query&&(Te.query=String(Te.query).replace(Se.PCT_ENCODED,Oe).replace(Se.NOT_QUERY,ge).replace(Se.PCT_ENCODED,M)),void 0!==Te.fragment&&(Te.fragment=String(Te.fragment).replace(Se.PCT_ENCODED,Oe).replace(Se.NOT_FRAGMENT,ge).replace(Se.PCT_ENCODED,M)),Te}function ce(Te){return Te.replace(/^0*(.*)/,"$1")||"0"}function le(Te,Se){var Oe=Te.match(Se.IPV4ADDRESS)||[],Le=p(Oe,2)[1];return Le?Le.split(".").map(ce).join("."):Te}function ue(Te,Se){var Oe=Te.match(Se.IPV6ADDRESS)||[],_e=p(Oe,3),Le=_e[1],Xe=_e[2];if(Le){for(var At=Le.toLowerCase().split("::").reverse(),dt=p(At,2),gt=dt[0],nn=dt[1],Wt=nn?nn.split(":").map(ce):[],hn=gt.split(":").map(ce),rn=Se.IPV4ADDRESS.test(hn[hn.length-1]),gn=rn?7:8,on=hn.length-gn,An=Array(gn),mn=0;mn1){var en=An.slice(0,Cn.index),wn=An.slice(Cn.index+Cn.length);yn=en.join(":")+"::"+wn.join(":")}else yn=An.join(":");return Xe&&(yn+="%"+Xe),yn}return Te}var fe=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,he=void 0==="".match(/(){0}/)[1];function Ae(Te){var Se=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Oe={},_e=!1!==Se.iri?d:f;"suffix"===Se.reference&&(Te=(Se.scheme?Se.scheme+":":"")+"//"+Te);var Le=Te.match(fe);if(Le){he?(Oe.scheme=Le[1],Oe.userinfo=Le[3],Oe.host=Le[4],Oe.port=parseInt(Le[5],10),Oe.path=Le[6]||"",Oe.query=Le[7],Oe.fragment=Le[8],isNaN(Oe.port)&&(Oe.port=Le[5])):(Oe.scheme=Le[1]||void 0,Oe.userinfo=-1!==Te.indexOf("@")?Le[3]:void 0,Oe.host=-1!==Te.indexOf("//")?Le[4]:void 0,Oe.port=parseInt(Le[5],10),Oe.path=Le[6]||"",Oe.query=-1!==Te.indexOf("?")?Le[7]:void 0,Oe.fragment=-1!==Te.indexOf("#")?Le[8]:void 0,isNaN(Oe.port)&&(Oe.port=Te.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Le[4]:void 0)),Oe.host&&(Oe.host=ue(le(Oe.host,_e),_e)),void 0!==Oe.scheme||void 0!==Oe.userinfo||void 0!==Oe.host||void 0!==Oe.port||Oe.path||void 0!==Oe.query?void 0===Oe.scheme?Oe.reference="relative":void 0===Oe.fragment?Oe.reference="absolute":Oe.reference="uri":Oe.reference="same-document",Se.reference&&"suffix"!==Se.reference&&Se.reference!==Oe.reference&&(Oe.error=Oe.error||"URI is not a "+Se.reference+" reference.");var Xe=ae[(Se.scheme||Oe.scheme||"").toLowerCase()];if(Se.unicodeSupport||Xe&&Xe.unicodeSupport)we(Oe,_e);else{if(Oe.host&&(Se.domainHost||Xe&&Xe.domainHost))try{Oe.host=te.toASCII(Oe.host.replace(_e.PCT_ENCODED,pe).toLowerCase())}catch(At){Oe.error=Oe.error||"Host's domain name can not be converted to ASCII via punycode: "+At}we(Oe,f)}Xe&&Xe.parse&&Xe.parse(Oe,Se)}else Oe.error=Oe.error||"URI can not be parsed.";return Oe}function Pe(Te,Se){var Oe=!1!==Se.iri?d:f,_e=[];return void 0!==Te.userinfo&&(_e.push(Te.userinfo),_e.push("@")),void 0!==Te.host&&_e.push(ue(le(String(Te.host),Oe),Oe).replace(Oe.IPV6ADDRESS,function(Le,Xe,At){return"["+Xe+(At?"%25"+At:"")+"]"})),("number"==typeof Te.port||"string"==typeof Te.port)&&(_e.push(":"),_e.push(String(Te.port))),_e.length?_e.join(""):void 0}var Re=/^\.\.?\//,ot=/^\/\.(\/|$)/,nt=/^\/\.\.(\/|$)/,Ye=/^\/?(?:.|\n)*?(?=\/|$)/;function It(Te){for(var Se=[];Te.length;)if(Te.match(Re))Te=Te.replace(Re,"");else if(Te.match(ot))Te=Te.replace(ot,"/");else if(Te.match(nt))Te=Te.replace(nt,"/"),Se.pop();else if("."===Te||".."===Te)Te="";else{var Oe=Te.match(Ye);if(!Oe)throw new Error("Unexpected dot segment condition");var _e=Oe[0];Te=Te.slice(_e.length),Se.push(_e)}return Se.join("")}function st(Te){var Se=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Oe=Se.iri?d:f,_e=[],Le=ae[(Se.scheme||Te.scheme||"").toLowerCase()];if(Le&&Le.serialize&&Le.serialize(Te,Se),Te.host&&!Oe.IPV6ADDRESS.test(Te.host)&&(Se.domainHost||Le&&Le.domainHost))try{Te.host=Se.iri?te.toUnicode(Te.host):te.toASCII(Te.host.replace(Oe.PCT_ENCODED,pe).toLowerCase())}catch(dt){Te.error=Te.error||"Host's domain name can not be converted to "+(Se.iri?"Unicode":"ASCII")+" via punycode: "+dt}we(Te,Oe),"suffix"!==Se.reference&&Te.scheme&&(_e.push(Te.scheme),_e.push(":"));var Xe=Pe(Te,Se);if(void 0!==Xe&&("suffix"!==Se.reference&&_e.push("//"),_e.push(Xe),Te.path&&"/"!==Te.path.charAt(0)&&_e.push("/")),void 0!==Te.path){var At=Te.path;!Se.absolutePath&&(!Le||!Le.absolutePath)&&(At=It(At)),void 0===Xe&&(At=At.replace(/^\/\//,"/%2F")),_e.push(At)}return void 0!==Te.query&&(_e.push("?"),_e.push(Te.query)),void 0!==Te.fragment&&(_e.push("#"),_e.push(Te.fragment)),_e.join("")}function He(Te,Se){var Oe=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Le={};return arguments[3]||(Te=Ae(st(Te,Oe),Oe),Se=Ae(st(Se,Oe),Oe)),!(Oe=Oe||{}).tolerant&&Se.scheme?(Le.scheme=Se.scheme,Le.userinfo=Se.userinfo,Le.host=Se.host,Le.port=Se.port,Le.path=It(Se.path||""),Le.query=Se.query):(void 0!==Se.userinfo||void 0!==Se.host||void 0!==Se.port?(Le.userinfo=Se.userinfo,Le.host=Se.host,Le.port=Se.port,Le.path=It(Se.path||""),Le.query=Se.query):(Se.path?("/"===Se.path.charAt(0)?Le.path=It(Se.path):(void 0===Te.userinfo&&void 0===Te.host&&void 0===Te.port||Te.path?Te.path?Le.path=Te.path.slice(0,Te.path.lastIndexOf("/")+1)+Se.path:Le.path=Se.path:Le.path="/"+Se.path,Le.path=It(Le.path)),Le.query=Se.query):(Le.path=Te.path,void 0!==Se.query?Le.query=Se.query:Le.query=Te.query),Le.userinfo=Te.userinfo,Le.host=Te.host,Le.port=Te.port),Le.scheme=Te.scheme),Le.fragment=Se.fragment,Le}function ze(Te,Se,Oe){var _e=g({scheme:"null"},Oe);return st(He(Ae(Te,_e),Ae(Se,_e),_e,!0),_e)}function Be(Te,Se){return"string"==typeof Te?Te=st(Ae(Te,Se),Se):"object"===E(Te)&&(Te=Ae(st(Te,Se),Se)),Te}function Ze(Te,Se,Oe){return"string"==typeof Te?Te=st(Ae(Te,Oe),Oe):"object"===E(Te)&&(Te=st(Te,Oe)),"string"==typeof Se?Se=st(Ae(Se,Oe),Oe):"object"===E(Se)&&(Se=st(Se,Oe)),Te===Se}function ut(Te,Se){return Te&&Te.toString().replace(Se&&Se.iri?d.ESCAPE:f.ESCAPE,ge)}function Me(Te,Se){return Te&&Te.toString().replace(Se&&Se.iri?d.PCT_ENCODED:f.PCT_ENCODED,pe)}var ve={scheme:"http",domainHost:!0,parse:function(Se,Oe){return Se.host||(Se.error=Se.error||"HTTP URIs must have a host."),Se},serialize:function(Se,Oe){var _e="https"===String(Se.scheme).toLowerCase();return(Se.port===(_e?443:80)||""===Se.port)&&(Se.port=void 0),Se.path||(Se.path="/"),Se}},xe={scheme:"https",domainHost:ve.domainHost,parse:ve.parse,serialize:ve.serialize};function je(Te){return"boolean"==typeof Te.secure?Te.secure:"wss"===String(Te.scheme).toLowerCase()}var Ge={scheme:"ws",domainHost:!0,parse:function(Se,Oe){var _e=Se;return _e.secure=je(_e),_e.resourceName=(_e.path||"/")+(_e.query?"?"+_e.query:""),_e.path=void 0,_e.query=void 0,_e},serialize:function(Se,Oe){if((Se.port===(je(Se)?443:80)||""===Se.port)&&(Se.port=void 0),"boolean"==typeof Se.secure&&(Se.scheme=Se.secure?"wss":"ws",Se.secure=void 0),Se.resourceName){var _e=Se.resourceName.split("?"),Le=p(_e,2),Xe=Le[0],At=Le[1];Se.path=Xe&&"/"!==Xe?Xe:void 0,Se.query=At,Se.resourceName=void 0}return Se.fragment=void 0,Se}},Qe={scheme:"wss",domainHost:Ge.domainHost,parse:Ge.parse,serialize:Ge.serialize},ye={},et="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",qe="[0-9A-Fa-f]",at=v(v("%[EFef]"+qe+"%"+qe+qe+"%"+qe+qe)+"|"+v("%[89A-Fa-f]"+qe+"%"+qe+qe)+"|"+v("%"+qe+qe)),bt="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",xt=l("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),kn="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Nt=new RegExp(et,"g"),Ot=new RegExp(at,"g"),Mn=new RegExp(l("[^]",bt,"[\\.]",'[\\"]',xt),"g"),Tt=new RegExp(l("[^]",et,kn),"g"),Pt=Tt;function Hn(Te){var Se=pe(Te);return Se.match(Nt)?Se:Te}var Bt={scheme:"mailto",parse:function(Se,Oe){var _e=Se,Le=_e.to=_e.path?_e.path.split(","):[];if(_e.path=void 0,_e.query){for(var Xe=!1,At={},dt=_e.query.split("&"),gt=0,nn=dt.length;gt= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=f-d,z=Math.floor,Y=String.fromCharCode;function F(b){throw RangeError(k[b])}function j(b,B){for(var re=b.length,ne=[];re--;)ne[re]=B(b[re]);return ne}function Z(b,B){var re=b.split("@"),ne="";return re.length>1&&(ne=re[0]+"@",b=re[1]),ne+j((b=b.replace(N,".")).split("."),B).join(".")}function T(b){for(var te,ae,B=[],re=0,ne=b.length;re=55296&&te<=56319&&re65535&&(re+=Y((B-=65536)>>>10&1023|55296),B=56320|1023&B),re+=Y(B)}).join("")}function h(b){return b-48<10?b-22:b-65<26?b-65:b-97<26?b-97:f}function w(b,B){return b+22+75*(b<26)-((0!=B)<<5)}function I(b,B,re){var ne=0;for(b=re?z(b/S):b>>1,b+=z(b/B);b>U*p>>1;ne+=f)b=z(b/U);return z(ne+(U+1)*b/(b+m))}function R(b){var ne,pe,we,ce,le,ue,fe,he,Ae,Pe,B=[],re=b.length,te=0,ae=D,ge=_;for((pe=b.lastIndexOf(P))<0&&(pe=0),we=0;we=128&&F("not-basic"),B.push(b.charCodeAt(we));for(ce=pe>0?pe+1:0;ce=re&&F("invalid-input"),((he=h(b.charCodeAt(ce++)))>=f||he>z((y-te)/ue))&&F("overflow"),te+=he*ue,!(he<(Ae=fe<=ge?d:fe>=ge+p?p:fe-ge));fe+=f)ue>z(y/(Pe=f-Ae))&&F("overflow"),ue*=Pe;ge=I(te-le,ne=B.length+1,0==le),z(te/ne)>y-ae&&F("overflow"),ae+=z(te/ne),te%=ne,B.splice(te++,0,ae)}return o(B)}function V(b){var B,re,ne,te,ae,ge,pe,we,ce,le,ue,he,Ae,Pe,Re,fe=[];for(he=(b=T(b)).length,B=D,re=0,ae=_,ge=0;ge=B&&uez((y-re)/(Ae=ne+1))&&F("overflow"),re+=(pe-B)*Ae,B=pe,ge=0;gey&&F("overflow"),ue==B){for(we=re,ce=f;!(we<(le=ce<=ae?d:ce>=ae+p?p:ce-ae));ce+=f)Re=we-le,Pe=f-le,fe.push(Y(w(le+Re%Pe,0))),we=z(Re/Pe);fe.push(Y(w(we,0))),ae=I(re,Ae,ne==te),re=0,++ne}++re,++B}return fe.join("")}g={version:"1.3.2",ucs2:{decode:T,encode:o},decode:R,encode:V,toASCII:function L(b){return Z(b,function(B){return C.test(B)?"xn--"+V(B):B})},toUnicode:function H(b){return Z(b,function(B){return x.test(B)?R(B.slice(4).toLowerCase()):B})}},void 0!==(l=function(){return g}.call(n,u,n,q))&&(q.exports=l)}()},68762:(q,n,u)=>{"use strict";var l=u(11308),v=u(70796);function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}n.parse=k,n.resolve=function z(G,F){return k(G,!1,!0).resolve(F)},n.resolveObject=function Y(G,F){return G?k(G,!1,!0).resolveObject(F):F},n.format=function U(G){return v.isString(G)&&(G=k(G)),G instanceof E?G.format():E.prototype.format.call(G)},n.Url=E;var M=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,g=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,y=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(y),d=["'"].concat(f),p=["%","/","?",";","#"].concat(d),m=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,D=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,P={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},C={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=u(17137);function k(G,F,j){if(G&&v.isObject(G)&&G instanceof E)return G;var Z=new E;return Z.parse(G,F,j),Z}E.prototype.parse=function(G,F,j){if(!v.isString(G))throw new TypeError("Parameter 'url' must be a string, not "+typeof G);var Z=G.indexOf("?"),T=-1!==Z&&Z127?we+="x":we+=pe[ce];if(!we.match(_)){var ue=ae.slice(0,b),fe=ae.slice(b+1),he=pe.match(D);he&&(ue.push(he[1]),fe.unshift(he[2])),fe.length&&(w="/"+fe.join(".")+w),this.hostname=ue.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),te||(this.hostname=l.toASCII(this.hostname));var Ae=this.port?":"+this.port:"",Pe=this.hostname||"";this.host=Pe+Ae,this.href+=this.host,te&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!P[V])for(b=0,ge=d.length;b0)&&j.host.split("@"))&&(j.auth=we.shift(),j.host=j.hostname=we.shift());return j.search=G.search,j.query=G.query,(!v.isNull(j.pathname)||!v.isNull(j.search))&&(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.href=j.format(),j}if(!ae.length)return j.pathname=null,j.search?j.path="/"+j.search:j.path=null,j.href=j.format(),j;for(var ce=ae.slice(-1)[0],le=(j.host||G.host||ae.length>1)&&("."===ce||".."===ce)||""===ce,ue=0,fe=ae.length;fe>=0;fe--)"."===(ce=ae[fe])?ae.splice(fe,1):".."===ce?(ae.splice(fe,1),ue++):ue&&(ae.splice(fe,1),ue--);if(!ne&&!te)for(;ue--;ue)ae.unshift("..");ne&&""!==ae[0]&&(!ae[0]||"/"!==ae[0].charAt(0))&&ae.unshift(""),le&&"/"!==ae.join("/").substr(-1)&&ae.push("");var we,he=""===ae[0]||ae[0]&&"/"===ae[0].charAt(0);pe&&(j.hostname=j.host=he?"":ae.length?ae.shift():"",(we=!!(j.host&&j.host.indexOf("@")>0)&&j.host.split("@"))&&(j.auth=we.shift(),j.host=j.hostname=we.shift()));return(ne=ne||j.host&&ae.length)&&!he&&ae.unshift(""),ae.length?j.pathname=ae.join("/"):(j.pathname=null,j.path=null),(!v.isNull(j.pathname)||!v.isNull(j.search))&&(j.path=(j.pathname?j.pathname:"")+(j.search?j.search:"")),j.auth=G.auth||j.auth,j.slashes=j.slashes||G.slashes,j.href=j.format(),j},E.prototype.parseHost=function(){var G=this.host,F=s.exec(G);F&&(":"!==(F=F[0])&&(this.port=F.substr(1)),G=G.substr(0,G.length-F.length)),G&&(this.hostname=G)}},70796:q=>{"use strict";q.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}}},23532:q=>{function u(l){try{if(!global.localStorage)return!1}catch{return!1}var v=global.localStorage[l];return null!=v&&"true"===String(v).toLowerCase()}q.exports=function n(l,v){if(u("noDeprecation"))return l;var E=!1;return function M(){if(!E){if(u("throwDeprecation"))throw new Error(v);u("traceDeprecation")?console.trace(v):console.warn(v),E=!0}return l.apply(this,arguments)}}},11451:q=>{q.exports=function(u){return u&&"object"==typeof u&&"function"==typeof u.copy&&"function"==typeof u.fill&&"function"==typeof u.readUInt8}},78791:(q,n,u)=>{"use strict";var l=u(13407),v=u(20110),E=u(42031),M=u(80597);function s(Ye){return Ye.call.bind(Ye)}var g=typeof BigInt<"u",y=typeof Symbol<"u",f=s(Object.prototype.toString),d=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),m=s(Boolean.prototype.valueOf);if(g)var S=s(BigInt.prototype.valueOf);if(y)var _=s(Symbol.prototype.valueOf);function D(Ye,It){if("object"!=typeof Ye)return!1;try{return It(Ye),!0}catch{return!1}}function o(Ye){return"[object Map]"===f(Ye)}function w(Ye){return"[object Set]"===f(Ye)}function R(Ye){return"[object WeakMap]"===f(Ye)}function H(Ye){return"[object WeakSet]"===f(Ye)}function b(Ye){return"[object ArrayBuffer]"===f(Ye)}function B(Ye){return!(typeof ArrayBuffer>"u")&&(b.working?b(Ye):Ye instanceof ArrayBuffer)}function re(Ye){return"[object DataView]"===f(Ye)}function ne(Ye){return!(typeof DataView>"u")&&(re.working?re(Ye):Ye instanceof DataView)}n.isArgumentsObject=l,n.isGeneratorFunction=v,n.isTypedArray=M,n.isPromise=function P(Ye){return typeof Promise<"u"&&Ye instanceof Promise||null!==Ye&&"object"==typeof Ye&&"function"==typeof Ye.then&&"function"==typeof Ye.catch},n.isArrayBufferView=function x(Ye){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Ye):M(Ye)||ne(Ye)},n.isUint8Array=function C(Ye){return"Uint8Array"===E(Ye)},n.isUint8ClampedArray=function N(Ye){return"Uint8ClampedArray"===E(Ye)},n.isUint16Array=function k(Ye){return"Uint16Array"===E(Ye)},n.isUint32Array=function U(Ye){return"Uint32Array"===E(Ye)},n.isInt8Array=function z(Ye){return"Int8Array"===E(Ye)},n.isInt16Array=function Y(Ye){return"Int16Array"===E(Ye)},n.isInt32Array=function G(Ye){return"Int32Array"===E(Ye)},n.isFloat32Array=function F(Ye){return"Float32Array"===E(Ye)},n.isFloat64Array=function j(Ye){return"Float64Array"===E(Ye)},n.isBigInt64Array=function Z(Ye){return"BigInt64Array"===E(Ye)},n.isBigUint64Array=function T(Ye){return"BigUint64Array"===E(Ye)},o.working=typeof Map<"u"&&o(new Map),n.isMap=function h(Ye){return!(typeof Map>"u")&&(o.working?o(Ye):Ye instanceof Map)},w.working=typeof Set<"u"&&w(new Set),n.isSet=function I(Ye){return!(typeof Set>"u")&&(w.working?w(Ye):Ye instanceof Set)},R.working=typeof WeakMap<"u"&&R(new WeakMap),n.isWeakMap=function V(Ye){return!(typeof WeakMap>"u")&&(R.working?R(Ye):Ye instanceof WeakMap)},H.working=typeof WeakSet<"u"&&H(new WeakSet),n.isWeakSet=function L(Ye){return H(Ye)},b.working=typeof ArrayBuffer<"u"&&b(new ArrayBuffer),n.isArrayBuffer=B,re.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&re(new DataView(new ArrayBuffer(1),0,1)),n.isDataView=ne;var te=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ae(Ye){return"[object SharedArrayBuffer]"===f(Ye)}function ge(Ye){return!(typeof te>"u")&&(typeof ae.working>"u"&&(ae.working=ae(new te)),ae.working?ae(Ye):Ye instanceof te)}function fe(Ye){return D(Ye,d)}function he(Ye){return D(Ye,p)}function Ae(Ye){return D(Ye,m)}function Pe(Ye){return g&&D(Ye,S)}function Re(Ye){return y&&D(Ye,_)}n.isSharedArrayBuffer=ge,n.isAsyncFunction=function pe(Ye){return"[object AsyncFunction]"===f(Ye)},n.isMapIterator=function we(Ye){return"[object Map Iterator]"===f(Ye)},n.isSetIterator=function ce(Ye){return"[object Set Iterator]"===f(Ye)},n.isGeneratorObject=function le(Ye){return"[object Generator]"===f(Ye)},n.isWebAssemblyCompiledModule=function ue(Ye){return"[object WebAssembly.Module]"===f(Ye)},n.isNumberObject=fe,n.isStringObject=he,n.isBooleanObject=Ae,n.isBigIntObject=Pe,n.isSymbolObject=Re,n.isBoxedPrimitive=function ot(Ye){return fe(Ye)||he(Ye)||Ae(Ye)||Pe(Ye)||Re(Ye)},n.isAnyArrayBuffer=function nt(Ye){return typeof Uint8Array<"u"&&(B(Ye)||ge(Ye))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Ye){Object.defineProperty(n,Ye,{enumerable:!1,value:function(){throw new Error(Ye+" is not supported in userland")}})})},26788:(q,n,u)=>{var l=Object.getOwnPropertyDescriptors||function(ne){for(var te=Object.keys(ne),ae={},ge=0;ge=ge)return ce;switch(ce){case"%s":return String(ae[te++]);case"%d":return Number(ae[te++]);case"%j":try{return JSON.stringify(ae[te++])}catch{return"[Circular]"}default:return ce}}),we=ae[te];te"u")return function(){return n.deprecate(re,ne).apply(this,arguments)};var te=!1;return function ae(){if(!te){if(process.throwDeprecation)throw new Error(ne);process.traceDeprecation?console.trace(ne):console.error(ne),te=!0}return re.apply(this,arguments)}};var E={},M=/^$/;if(process.env.NODE_DEBUG){var s=process.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),M=new RegExp("^"+s+"$","i")}function g(re,ne){var te={seen:[],stylize:f};return arguments.length>=3&&(te.depth=arguments[2]),arguments.length>=4&&(te.colors=arguments[3]),C(ne)?te.showHidden=ne:ne&&n._extend(te,ne),G(te.showHidden)&&(te.showHidden=!1),G(te.depth)&&(te.depth=2),G(te.colors)&&(te.colors=!1),G(te.customInspect)&&(te.customInspect=!0),te.colors&&(te.stylize=y),p(te,re,te.depth)}function y(re,ne){var te=g.styles[ne];return te?"\x1b["+g.colors[te][0]+"m"+re+"\x1b["+g.colors[te][1]+"m":re}function f(re,ne){return re}function p(re,ne,te){if(re.customInspect&&ne&&o(ne.inspect)&&ne.inspect!==n.inspect&&(!ne.constructor||ne.constructor.prototype!==ne)){var ae=ne.inspect(te,re);return z(ae)||(ae=p(re,ae,te)),ae}var ge=function m(re,ne){if(G(ne))return re.stylize("undefined","undefined");if(z(ne)){var te="'"+JSON.stringify(ne).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return re.stylize(te,"string")}if(U(ne))return re.stylize(""+ne,"number");if(C(ne))return re.stylize(""+ne,"boolean");if(N(ne))return re.stylize("null","null")}(re,ne);if(ge)return ge;var pe=Object.keys(ne),we=function d(re){var ne={};return re.forEach(function(te,ae){ne[te]=!0}),ne}(pe);if(re.showHidden&&(pe=Object.getOwnPropertyNames(ne)),T(ne)&&(pe.indexOf("message")>=0||pe.indexOf("description")>=0))return S(ne);if(0===pe.length){if(o(ne)){var ce=ne.name?": "+ne.name:"";return re.stylize("[Function"+ce+"]","special")}if(F(ne))return re.stylize(RegExp.prototype.toString.call(ne),"regexp");if(Z(ne))return re.stylize(Date.prototype.toString.call(ne),"date");if(T(ne))return S(ne)}var Ae,le="",ue=!1,fe=["{","}"];(x(ne)&&(ue=!0,fe=["[","]"]),o(ne))&&(le=" [Function"+(ne.name?": "+ne.name:"")+"]");return F(ne)&&(le=" "+RegExp.prototype.toString.call(ne)),Z(ne)&&(le=" "+Date.prototype.toUTCString.call(ne)),T(ne)&&(le=" "+S(ne)),0!==pe.length||ue&&0!=ne.length?te<0?F(ne)?re.stylize(RegExp.prototype.toString.call(ne),"regexp"):re.stylize("[Object]","special"):(re.seen.push(ne),Ae=ue?function _(re,ne,te,ae,ge){for(var pe=[],we=0,ce=ne.length;we=0&&0,pe+we.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ge>60?te[0]+(""===ne?"":ne+"\n ")+" "+re.join(",\n ")+" "+te[1]:te[0]+ne+" "+re.join(", ")+" "+te[1]}(Ae,le,fe)):fe[0]+le+fe[1]}function S(re){return"["+Error.prototype.toString.call(re)+"]"}function D(re,ne,te,ae,ge,pe){var we,ce,le;if((le=Object.getOwnPropertyDescriptor(ne,ge)||{value:ne[ge]}).get?ce=le.set?re.stylize("[Getter/Setter]","special"):re.stylize("[Getter]","special"):le.set&&(ce=re.stylize("[Setter]","special")),H(ae,ge)||(we="["+ge+"]"),ce||(re.seen.indexOf(le.value)<0?(ce=N(te)?p(re,le.value,null):p(re,le.value,te-1)).indexOf("\n")>-1&&(ce=pe?ce.split("\n").map(function(ue){return" "+ue}).join("\n").slice(2):"\n"+ce.split("\n").map(function(ue){return" "+ue}).join("\n")):ce=re.stylize("[Circular]","special")),G(we)){if(pe&&ge.match(/^\d+$/))return ce;(we=JSON.stringify(""+ge)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(we=we.slice(1,-1),we=re.stylize(we,"name")):(we=we.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),we=re.stylize(we,"string"))}return we+": "+ce}function x(re){return Array.isArray(re)}function C(re){return"boolean"==typeof re}function N(re){return null===re}function U(re){return"number"==typeof re}function z(re){return"string"==typeof re}function G(re){return void 0===re}function F(re){return j(re)&&"[object RegExp]"===w(re)}function j(re){return"object"==typeof re&&null!==re}function Z(re){return j(re)&&"[object Date]"===w(re)}function T(re){return j(re)&&("[object Error]"===w(re)||re instanceof Error)}function o(re){return"function"==typeof re}function w(re){return Object.prototype.toString.call(re)}function I(re){return re<10?"0"+re.toString(10):re.toString(10)}n.debuglog=function(re){if(re=re.toUpperCase(),!E[re])if(M.test(re)){var ne=process.pid;E[re]=function(){var te=n.format.apply(n,arguments);console.error("%s %d: %s",re,ne,te)}}else E[re]=function(){};return E[re]},n.inspect=g,g.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.types=u(78791),n.isArray=x,n.isBoolean=C,n.isNull=N,n.isNullOrUndefined=function k(re){return null==re},n.isNumber=U,n.isString=z,n.isSymbol=function Y(re){return"symbol"==typeof re},n.isUndefined=G,n.isRegExp=F,n.types.isRegExp=F,n.isObject=j,n.isDate=Z,n.types.isDate=Z,n.isError=T,n.types.isNativeError=T,n.isFunction=o,n.isPrimitive=function h(re){return null===re||"boolean"==typeof re||"number"==typeof re||"string"==typeof re||"symbol"==typeof re||typeof re>"u"},n.isBuffer=u(11451);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function H(re,ne){return Object.prototype.hasOwnProperty.call(re,ne)}n.log=function(){console.log("%s - %s",function V(){var re=new Date,ne=[I(re.getHours()),I(re.getMinutes()),I(re.getSeconds())].join(":");return[re.getDate(),R[re.getMonth()],ne].join(" ")}(),n.format.apply(n,arguments))},n.inherits=u(83894),n._extend=function(re,ne){if(!ne||!j(ne))return re;for(var te=Object.keys(ne),ae=te.length;ae--;)re[te[ae]]=ne[te[ae]];return re};var L=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function b(re,ne){if(!re){var te=new Error("Promise was rejected with a falsy value");te.reason=re,re=te}return ne(re)}n.promisify=function(ne){if("function"!=typeof ne)throw new TypeError('The "original" argument must be of type Function');if(L&&ne[L]){var te;if("function"!=typeof(te=ne[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(te,L,{value:te,enumerable:!1,writable:!1,configurable:!0}),te}function te(){for(var ae,ge,pe=new Promise(function(le,ue){ae=le,ge=ue}),we=[],ce=0;ce{"use strict";var l=u(9435),v=u(87029),E=u(55685),M=u(75834),s=u(47378),g=M("Object.prototype.toString"),y=u(46259)(),f=typeof globalThis>"u"?global:globalThis,d=v(),p=M("String.prototype.slice"),m=Object.getPrototypeOf,S=M("Array.prototype.indexOf",!0)||function(C,N){for(var k=0;k-1?N:"Object"===N&&function(C){var N=!1;return l(_,function(k,U){if(!N)try{k(C),N=p(U,1)}catch{}}),N}(C)}return s?function(C){var N=!1;return l(_,function(k,U){if(!N)try{"$"+k(C)===U&&(N=p(U,1))}catch{}}),N}(C):null}},99136:q=>{q.exports=function n(u,l){if(u&&l)return n(u)(l);if("function"!=typeof u)throw new TypeError("need wrapper function");return Object.keys(u).forEach(function(E){v[E]=u[E]}),v;function v(){for(var E=new Array(arguments.length),M=0;M{q.exports=function u(){for(var l={},v=0;v{"use strict";u.r(n),u.d(n,{__assign:()=>E,__asyncDelegator:()=>N,__asyncGenerator:()=>C,__asyncValues:()=>k,__await:()=>x,__awaiter:()=>f,__classPrivateFieldGet:()=>G,__classPrivateFieldSet:()=>F,__createBinding:()=>p,__decorate:()=>s,__exportStar:()=>m,__extends:()=>v,__generator:()=>d,__importDefault:()=>Y,__importStar:()=>z,__makeTemplateObject:()=>U,__metadata:()=>y,__param:()=>g,__read:()=>_,__rest:()=>M,__spread:()=>D,__spreadArrays:()=>P,__values:()=>S});var l=function(j,Z){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,o){T.__proto__=o}||function(T,o){for(var h in o)o.hasOwnProperty(h)&&(T[h]=o[h])})(j,Z)};function v(j,Z){function T(){this.constructor=j}l(j,Z),j.prototype=null===Z?Object.create(Z):(T.prototype=Z.prototype,new T)}var E=function(){return E=Object.assign||function(Z){for(var T,o=1,h=arguments.length;o=0;R--)(I=j[R])&&(w=(h<3?I(w):h>3?I(Z,T,w):I(Z,T))||w);return h>3&&w&&Object.defineProperty(Z,T,w),w}function g(j,Z){return function(T,o){Z(T,o,j)}}function y(j,Z){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(j,Z)}function f(j,Z,T,o){return new(T||(T=Promise))(function(w,I){function R(L){try{H(o.next(L))}catch(b){I(b)}}function V(L){try{H(o.throw(L))}catch(b){I(b)}}function H(L){L.done?w(L.value):function h(w){return w instanceof T?w:new T(function(I){I(w)})}(L.value).then(R,V)}H((o=o.apply(j,Z||[])).next())})}function d(j,Z){var o,h,w,I,T={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return I={next:R(0),throw:R(1),return:R(2)},"function"==typeof Symbol&&(I[Symbol.iterator]=function(){return this}),I;function R(H){return function(L){return function V(H){if(o)throw new TypeError("Generator is already executing.");for(;T;)try{if(o=1,h&&(w=2&H[0]?h.return:H[0]?h.throw||((w=h.return)&&w.call(h),0):h.next)&&!(w=w.call(h,H[1])).done)return w;switch(h=0,w&&(H=[2&H[0],w.value]),H[0]){case 0:case 1:w=H;break;case 4:return T.label++,{value:H[1],done:!1};case 5:T.label++,h=H[1],H=[0];continue;case 7:H=T.ops.pop(),T.trys.pop();continue;default:if(!(w=(w=T.trys).length>0&&w[w.length-1])&&(6===H[0]||2===H[0])){T=0;continue}if(3===H[0]&&(!w||H[1]>w[0]&&H[1]=j.length&&(j=void 0),{value:j&&j[o++],done:!j}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(j,Z){var T="function"==typeof Symbol&&j[Symbol.iterator];if(!T)return j;var h,I,o=T.call(j),w=[];try{for(;(void 0===Z||Z-- >0)&&!(h=o.next()).done;)w.push(h.value)}catch(R){I={error:R}}finally{try{h&&!h.done&&(T=o.return)&&T.call(o)}finally{if(I)throw I.error}}return w}function D(){for(var j=[],Z=0;Z1||R(B,re)})})}function R(B,re){try{!function V(B){B.value instanceof x?Promise.resolve(B.value.v).then(H,L):b(w[0][2],B)}(o[B](re))}catch(ne){b(w[0][3],ne)}}function H(B){R("next",B)}function L(B){R("throw",B)}function b(B,re){B(re),w.shift(),w.length&&R(w[0][0],w[0][1])}}function N(j){var Z,T;return Z={},o("next"),o("throw",function(h){throw h}),o("return"),Z[Symbol.iterator]=function(){return this},Z;function o(h,w){Z[h]=j[h]?function(I){return(T=!T)?{value:x(j[h](I)),done:"return"===h}:w?w(I):I}:w}}function k(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T,Z=j[Symbol.asyncIterator];return Z?Z.call(j):(j=S(j),T={},o("next"),o("throw"),o("return"),T[Symbol.asyncIterator]=function(){return this},T);function o(w){T[w]=j[w]&&function(I){return new Promise(function(R,V){(function h(w,I,R,V){Promise.resolve(V).then(function(H){w({value:H,done:R})},I)})(R,V,(I=j[w](I)).done,I.value)})}}}function U(j,Z){return Object.defineProperty?Object.defineProperty(j,"raw",{value:Z}):j.raw=Z,j}function z(j){if(j&&j.__esModule)return j;var Z={};if(null!=j)for(var T in j)Object.hasOwnProperty.call(j,T)&&(Z[T]=j[T]);return Z.default=j,Z}function Y(j){return j&&j.__esModule?j:{default:j}}function G(j,Z){if(!Z.has(j))throw new TypeError("attempted to get private field on non-instance");return Z.get(j)}function F(j,Z,T){if(!Z.has(j))throw new TypeError("attempted to set private field on non-instance");return Z.set(j,T),T}},39653:(q,n,u)=>{"use strict";u.r(n),u.d(n,{__assign:()=>E,__asyncDelegator:()=>N,__asyncGenerator:()=>C,__asyncValues:()=>k,__await:()=>x,__awaiter:()=>f,__classPrivateFieldGet:()=>G,__classPrivateFieldSet:()=>F,__createBinding:()=>p,__decorate:()=>s,__exportStar:()=>m,__extends:()=>v,__generator:()=>d,__importDefault:()=>Y,__importStar:()=>z,__makeTemplateObject:()=>U,__metadata:()=>y,__param:()=>g,__read:()=>_,__rest:()=>M,__spread:()=>D,__spreadArrays:()=>P,__values:()=>S});var l=function(j,Z){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,o){T.__proto__=o}||function(T,o){for(var h in o)o.hasOwnProperty(h)&&(T[h]=o[h])})(j,Z)};function v(j,Z){function T(){this.constructor=j}l(j,Z),j.prototype=null===Z?Object.create(Z):(T.prototype=Z.prototype,new T)}var E=function(){return E=Object.assign||function(Z){for(var T,o=1,h=arguments.length;o=0;R--)(I=j[R])&&(w=(h<3?I(w):h>3?I(Z,T,w):I(Z,T))||w);return h>3&&w&&Object.defineProperty(Z,T,w),w}function g(j,Z){return function(T,o){Z(T,o,j)}}function y(j,Z){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(j,Z)}function f(j,Z,T,o){return new(T||(T=Promise))(function(w,I){function R(L){try{H(o.next(L))}catch(b){I(b)}}function V(L){try{H(o.throw(L))}catch(b){I(b)}}function H(L){L.done?w(L.value):function h(w){return w instanceof T?w:new T(function(I){I(w)})}(L.value).then(R,V)}H((o=o.apply(j,Z||[])).next())})}function d(j,Z){var o,h,w,I,T={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return I={next:R(0),throw:R(1),return:R(2)},"function"==typeof Symbol&&(I[Symbol.iterator]=function(){return this}),I;function R(H){return function(L){return function V(H){if(o)throw new TypeError("Generator is already executing.");for(;T;)try{if(o=1,h&&(w=2&H[0]?h.return:H[0]?h.throw||((w=h.return)&&w.call(h),0):h.next)&&!(w=w.call(h,H[1])).done)return w;switch(h=0,w&&(H=[2&H[0],w.value]),H[0]){case 0:case 1:w=H;break;case 4:return T.label++,{value:H[1],done:!1};case 5:T.label++,h=H[1],H=[0];continue;case 7:H=T.ops.pop(),T.trys.pop();continue;default:if(!(w=(w=T.trys).length>0&&w[w.length-1])&&(6===H[0]||2===H[0])){T=0;continue}if(3===H[0]&&(!w||H[1]>w[0]&&H[1]=j.length&&(j=void 0),{value:j&&j[o++],done:!j}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(j,Z){var T="function"==typeof Symbol&&j[Symbol.iterator];if(!T)return j;var h,I,o=T.call(j),w=[];try{for(;(void 0===Z||Z-- >0)&&!(h=o.next()).done;)w.push(h.value)}catch(R){I={error:R}}finally{try{h&&!h.done&&(T=o.return)&&T.call(o)}finally{if(I)throw I.error}}return w}function D(){for(var j=[],Z=0;Z1||R(B,re)})})}function R(B,re){try{!function V(B){B.value instanceof x?Promise.resolve(B.value.v).then(H,L):b(w[0][2],B)}(o[B](re))}catch(ne){b(w[0][3],ne)}}function H(B){R("next",B)}function L(B){R("throw",B)}function b(B,re){B(re),w.shift(),w.length&&R(w[0][0],w[0][1])}}function N(j){var Z,T;return Z={},o("next"),o("throw",function(h){throw h}),o("return"),Z[Symbol.iterator]=function(){return this},Z;function o(h,w){Z[h]=j[h]?function(I){return(T=!T)?{value:x(j[h](I)),done:"return"===h}:w?w(I):I}:w}}function k(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T,Z=j[Symbol.asyncIterator];return Z?Z.call(j):(j=S(j),T={},o("next"),o("throw"),o("return"),T[Symbol.asyncIterator]=function(){return this},T);function o(w){T[w]=j[w]&&function(I){return new Promise(function(R,V){(function h(w,I,R,V){Promise.resolve(V).then(function(H){w({value:H,done:R})},I)})(R,V,(I=j[w](I)).done,I.value)})}}}function U(j,Z){return Object.defineProperty?Object.defineProperty(j,"raw",{value:Z}):j.raw=Z,j}function z(j){if(j&&j.__esModule)return j;var Z={};if(null!=j)for(var T in j)Object.hasOwnProperty.call(j,T)&&(Z[T]=j[T]);return Z.default=j,Z}function Y(j){return j&&j.__esModule?j:{default:j}}function G(j,Z){if(!Z.has(j))throw new TypeError("attempted to get private field on non-instance");return Z.get(j)}function F(j,Z,T){if(!Z.has(j))throw new TypeError("attempted to set private field on non-instance");return Z.set(j,T),T}},30004:(q,n,u)=>{"use strict";u.r(n),u.d(n,{__assign:()=>E,__asyncDelegator:()=>N,__asyncGenerator:()=>C,__asyncValues:()=>k,__await:()=>x,__awaiter:()=>f,__classPrivateFieldGet:()=>G,__classPrivateFieldSet:()=>F,__createBinding:()=>p,__decorate:()=>s,__exportStar:()=>m,__extends:()=>v,__generator:()=>d,__importDefault:()=>Y,__importStar:()=>z,__makeTemplateObject:()=>U,__metadata:()=>y,__param:()=>g,__read:()=>_,__rest:()=>M,__spread:()=>D,__spreadArrays:()=>P,__values:()=>S});var l=function(j,Z){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,o){T.__proto__=o}||function(T,o){for(var h in o)o.hasOwnProperty(h)&&(T[h]=o[h])})(j,Z)};function v(j,Z){function T(){this.constructor=j}l(j,Z),j.prototype=null===Z?Object.create(Z):(T.prototype=Z.prototype,new T)}var E=function(){return E=Object.assign||function(Z){for(var T,o=1,h=arguments.length;o=0;R--)(I=j[R])&&(w=(h<3?I(w):h>3?I(Z,T,w):I(Z,T))||w);return h>3&&w&&Object.defineProperty(Z,T,w),w}function g(j,Z){return function(T,o){Z(T,o,j)}}function y(j,Z){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(j,Z)}function f(j,Z,T,o){return new(T||(T=Promise))(function(w,I){function R(L){try{H(o.next(L))}catch(b){I(b)}}function V(L){try{H(o.throw(L))}catch(b){I(b)}}function H(L){L.done?w(L.value):function h(w){return w instanceof T?w:new T(function(I){I(w)})}(L.value).then(R,V)}H((o=o.apply(j,Z||[])).next())})}function d(j,Z){var o,h,w,I,T={label:0,sent:function(){if(1&w[0])throw w[1];return w[1]},trys:[],ops:[]};return I={next:R(0),throw:R(1),return:R(2)},"function"==typeof Symbol&&(I[Symbol.iterator]=function(){return this}),I;function R(H){return function(L){return function V(H){if(o)throw new TypeError("Generator is already executing.");for(;T;)try{if(o=1,h&&(w=2&H[0]?h.return:H[0]?h.throw||((w=h.return)&&w.call(h),0):h.next)&&!(w=w.call(h,H[1])).done)return w;switch(h=0,w&&(H=[2&H[0],w.value]),H[0]){case 0:case 1:w=H;break;case 4:return T.label++,{value:H[1],done:!1};case 5:T.label++,h=H[1],H=[0];continue;case 7:H=T.ops.pop(),T.trys.pop();continue;default:if(!(w=(w=T.trys).length>0&&w[w.length-1])&&(6===H[0]||2===H[0])){T=0;continue}if(3===H[0]&&(!w||H[1]>w[0]&&H[1]=j.length&&(j=void 0),{value:j&&j[o++],done:!j}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(j,Z){var T="function"==typeof Symbol&&j[Symbol.iterator];if(!T)return j;var h,I,o=T.call(j),w=[];try{for(;(void 0===Z||Z-- >0)&&!(h=o.next()).done;)w.push(h.value)}catch(R){I={error:R}}finally{try{h&&!h.done&&(T=o.return)&&T.call(o)}finally{if(I)throw I.error}}return w}function D(){for(var j=[],Z=0;Z1||R(B,re)})})}function R(B,re){try{!function V(B){B.value instanceof x?Promise.resolve(B.value.v).then(H,L):b(w[0][2],B)}(o[B](re))}catch(ne){b(w[0][3],ne)}}function H(B){R("next",B)}function L(B){R("throw",B)}function b(B,re){B(re),w.shift(),w.length&&R(w[0][0],w[0][1])}}function N(j){var Z,T;return Z={},o("next"),o("throw",function(h){throw h}),o("return"),Z[Symbol.iterator]=function(){return this},Z;function o(h,w){Z[h]=j[h]?function(I){return(T=!T)?{value:x(j[h](I)),done:"return"===h}:w?w(I):I}:w}}function k(j){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T,Z=j[Symbol.asyncIterator];return Z?Z.call(j):(j=S(j),T={},o("next"),o("throw"),o("return"),T[Symbol.asyncIterator]=function(){return this},T);function o(w){T[w]=j[w]&&function(I){return new Promise(function(R,V){(function h(w,I,R,V){Promise.resolve(V).then(function(H){w({value:H,done:R})},I)})(R,V,(I=j[w](I)).done,I.value)})}}}function U(j,Z){return Object.defineProperty?Object.defineProperty(j,"raw",{value:Z}):j.raw=Z,j}function z(j){if(j&&j.__esModule)return j;var Z={};if(null!=j)for(var T in j)Object.hasOwnProperty.call(j,T)&&(Z[T]=j[T]);return Z.default=j,Z}function Y(j){return j&&j.__esModule?j:{default:j}}function G(j,Z){if(!Z.has(j))throw new TypeError("attempted to get private field on non-instance");return Z.get(j)}function F(j,Z,T){if(!Z.has(j))throw new TypeError("attempted to set private field on non-instance");return Z.set(j,T),T}},80950:()=>{},46601:()=>{},96419:()=>{},56353:()=>{},7716:()=>{},53383:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},6297:()=>{},70131:()=>{},94093:()=>{},61695:()=>{},56619:()=>{},77108:()=>{},52361:()=>{},94616:()=>{},59344:q=>{function n(l,v,E,M,s,g,y){try{var f=l[g](y),d=f.value}catch(p){return void E(p)}f.done?v(d):Promise.resolve(d).then(M,s)}q.exports=function u(l){return function(){var v=this,E=arguments;return new Promise(function(M,s){var g=l.apply(v,E);function y(d){n(g,M,s,y,f,"next",d)}function f(d){n(g,M,s,y,f,"throw",d)}y(void 0)})}},q.exports.__esModule=!0,q.exports.default=q.exports},82253:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(s,g,y,f){return new(y||(y=Promise))(function(p,m){function S(P){try{D(f.next(P))}catch(x){m(x)}}function _(P){try{D(f.throw(P))}catch(x){m(x)}}function D(P){P.done?p(P.value):function d(p){return p instanceof y?p:new y(function(m){m(p)})}(P.value).then(S,_)}D((f=f.apply(s,g||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.HereKeyStore=void 0;const v=u(35802),E=u(37996);n.HereKeyStore=class M{constructor(g=new E.StateStorage){this.storage=g}setActiveAccount(g,y){return l(this,void 0,void 0,function*(){const f=yield this.storage.getState(g);f.activeAccount=y,this.storage.setState(g,f)})}setKey(g,y,f){return l(this,void 0,void 0,function*(){const d=yield this.storage.getState(g);d.accounts[y]=f.toString(),this.storage.setState(g,d)})}getAccounts(g){return l(this,void 0,void 0,function*(){const y=yield this.storage.getState(g);return Object.keys(y.accounts)})}getActiveAccount(g){return l(this,void 0,void 0,function*(){return(yield this.storage.getState(g)).activeAccount})}getKey(g,y){return l(this,void 0,void 0,function*(){const d=(yield this.storage.getState(g)).accounts[y];if(null==d)throw Error(`For ${y} in ${g} network key not found`);return v.KeyPair.fromString(d)})}removeKey(g,y){return l(this,void 0,void 0,function*(){let f=yield this.storage.getState(g);f.activeAccount===y&&(f.activeAccount=null),delete f.accounts[y],this.storage.setState(g,f)})}getNetworks(){return l(this,void 0,void 0,function*(){let g=yield this.storage.getFullState();return Object.keys(g.accounts)})}clear(){return l(this,void 0,void 0,function*(){yield this.storage.clear()})}}},37996:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(M,s,g,y){return new(g||(g=Promise))(function(d,p){function m(D){try{_(y.next(D))}catch(P){p(P)}}function S(D){try{_(y.throw(D))}catch(P){p(P)}}function _(D){D.done?d(D.value):function f(d){return d instanceof g?d:new g(function(p){p(d)})}(D.value).then(m,S)}_((y=y.apply(M,s||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.StateStorage=void 0;const v=u(73530);n.StateStorage=class E{constructor(){this.dataKey="herewallet:keystore",v.waitInjectedHereWallet.then(s=>{s&&this.setState(s.network,{accounts:{[s.accountId]:s.publicKey},activeAccount:s.accountId})})}setState(s,g){return l(this,void 0,void 0,function*(){yield v.waitInjectedHereWallet;const y=yield this.getFullState();y[s]=g,window.localStorage.setItem(this.dataKey,JSON.stringify(y))})}getFullState(){return l(this,void 0,void 0,function*(){yield v.waitInjectedHereWallet;try{return JSON.parse(window.localStorage.getItem(this.dataKey))||{}}catch{return{}}})}getState(s){return l(this,void 0,void 0,function*(){return yield v.waitInjectedHereWallet,(yield this.getFullState())[s]||{activeAccount:null,accounts:{}}})}clear(){return l(this,void 0,void 0,function*(){window.localStorage.removeItem(this.dataKey)})}}},45173:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetStrategy=n.defaultUrl=void 0;n.defaultUrl="https://my.herewallet.app/connector/index.html";class l{constructor(E={widget:n.defaultUrl,lazy:!1}){this.options={lazy:"object"==typeof E&&E.lazy||!1,widget:"string"==typeof E?E:E.widget||n.defaultUrl},this.options.lazy||this.initIframe()}initIframe(){return null==l.connector&&(l.connector=(v=>{const E=document.createElement("iframe");return E.src=v,E.allow="usb",E.style.border="none",E.style.zIndex="10000",E.style.position="fixed",E.style.display="none",E.style.top="0",E.style.left="0",E.style.width="100%",E.style.height="100%",document.body.appendChild(E),E})(this.options.widget),l.connector.addEventListener("load",()=>{l.isLoaded=!0})),l.connector}onRequested(E,M,s){const g=this.initIframe();g.style.display="block";const y=()=>{var f,d,p;null===(f=l.connector)||void 0===f||f.removeEventListener("load",y),null===(p=null===(d=l.connector)||void 0===d?void 0:d.contentWindow)||void 0===p||p.postMessage(JSON.stringify({type:"request",payload:{id:E,request:M}}),new URL(this.options.widget).origin)};l.isLoaded?y():g.addEventListener("load",y),this.messageHandler=f=>{try{if(f.origin!==new URL(this.options.widget).origin)return;"reject"===JSON.parse(f.data).type&&s()}catch{}},window.addEventListener("message",this.messageHandler)}postMessage(E){var M;const s=this.initIframe(),g=JSON.stringify(E),y=new URL(this.options.widget).origin;null===(M=s.contentWindow)||void 0===M||M.postMessage(g,y)}onApproving(){this.postMessage({type:"approving"})}onSuccess(E){console.log(E),this.postMessage({type:"result",payload:{request:E}}),this.close()}onFailed(E){this.postMessage({type:"result",payload:{request:E}}),this.close()}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),l.connector&&(l.connector.style.display="none")}}n.WidgetStrategy=l,l.isLoaded=!1},55217:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WindowStrategy=void 0;n.WindowStrategy=class u{constructor(v="https://my.herewallet.app"){this.endpoint=v,this.signWindow=null,this.onFailed=()=>this.close(),this.onSuccess=()=>this.close()}onInitialized(){if(this.signWindow)return;const v=window.innerWidth/2-210,E=window.innerHeight/2-350;this.signWindow=window.open(`${this.endpoint}/loading`,"_blank",`popup=1,width=420,height=700,top=${E},left=${v}`)}onRequested(v,E,M){null!=this.signWindow&&(this.unloadHandler=()=>{var s;return null===(s=this.signWindow)||void 0===s?void 0:s.close()},window.addEventListener("beforeunload",this.unloadHandler),this.signWindow.location=`${this.endpoint}/request/${v}`,this.timerHandler=setInterval(()=>{var s;null!==(s=this.signWindow)&&void 0!==s&&s.closed&&M("CLOSED")},1e3))}close(){var v;clearInterval(this.timerHandler),null===(v=this.signWindow)||void 0===v||v.close(),this.signWindow=null,this.unloadHandler&&window.removeEventListener("beforeunload",this.unloadHandler)}}},64099:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAction=n.parseArgs=void 0;const l=u(98538),v=u(82692);n.parseArgs=g=>"string"==typeof g?Buffer.from(g,"base64"):g;n.createAction=g=>{switch(g.type){case"CreateAccount":return v.transactions.createAccount();case"DeployContract":{const{code:y}=g.params;return v.transactions.deployContract(y)}case"FunctionCall":{const{methodName:y,args:f,gas:d,deposit:p}=g.params;return v.transactions.functionCall(y,(0,n.parseArgs)(f),new l.BN(d),new l.BN(p))}case"Transfer":{const{deposit:y}=g.params;return v.transactions.transfer(new l.BN(y))}case"Stake":{const{stake:y,publicKey:f}=g.params;return v.transactions.stake(new l.BN(y),v.utils.PublicKey.from(f))}case"AddKey":{const{publicKey:y,accessKey:f}=g.params;return v.transactions.addKey(v.utils.PublicKey.from(y),(g=>{if("FullAccess"===g)return v.transactions.fullAccessKey();const{receiverId:y,methodNames:f=[]}=g,d=g.allowance?new l.BN(g.allowance):void 0;return v.transactions.functionCallAccessKey(y,f,d)})(f.permission))}case"DeleteKey":{const{publicKey:y}=g.params;return v.transactions.deleteKey(v.utils.PublicKey.from(y))}case"DeleteAccount":{const{beneficiaryId:y}=g.params;return v.transactions.deleteAccount(y)}default:throw new Error("Invalid action type")}}},19169:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},73530:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(d,p,m,S){return new(m||(m=Promise))(function(D,P){function x(k){try{N(S.next(k))}catch(U){P(U)}}function C(k){try{N(S.throw(k))}catch(U){P(U)}}function N(k){k.done?D(k.value):function _(D){return D instanceof m?D:new m(function(P){P(D)})}(k.value).then(x,C)}N((S=S.apply(d,p||[])).next())})},v=this&&this.__rest||function(d,p){var m={};for(var S in d)Object.prototype.hasOwnProperty.call(d,S)&&p.indexOf(S)<0&&(m[S]=d[S]);if(null!=d&&"function"==typeof Object.getOwnPropertySymbols){var _=0;for(S=Object.getOwnPropertySymbols(d);_{if(typeof window>"u"||window.self===window.top)return d(null);const p=m=>{"here-wallet-injected"===m.data.type&&(window.parent.postMessage("here-sdk-init","*"),window.removeEventListener("message",p),d({accountId:m.data.accountId,publicKey:m.data.publicKey,network:m.data.network||"mainnet"}))};window.addEventListener("message",p),setTimeout(()=>d(null),2e3)});n.proxyProvider=d=>l(void 0,void 0,void 0,function*(){if((yield n.waitInjectedHereWallet)&&typeof window<"u")return new Promise(C=>{const N=(0,M.default)(),k=U=>{if(U.data.id===N&&(U.data.status===g.HereProviderStatus.SUCCESS||U.data.status===g.HereProviderStatus.FAILED))return window.removeEventListener("message",k),C(U.data)};window.parent.postMessage(Object.assign(Object.assign({$here:!0},d.request),{id:N}),"*"),window.addEventListener("message",k)});let{strategy:m,request:S,disableCleanupRequest:_,id:D,signal:P}=d,x=v(d,["strategy","request","disableCleanupRequest","id","signal"]);return null!=D?S=yield(0,y.getRequest)(D,P):D=yield(0,y.createRequest)(S,P),new Promise((C,N)=>{var k,U;const z=y.proxyApi.replace("https","wss");let Y=null,G=null;const F=()=>l(void 0,void 0,void 0,function*(){Y=-1,clearInterval(Y),G?.close(),!0!==_&&(yield(0,y.deleteRequest)(D))}),j=o=>{var h,w,I,R,V,H;switch(o.status){case g.HereProviderStatus.APPROVING:return null===(h=x.onApproving)||void 0===h||h.call(x,o),void(null===(w=m?.onApproving)||void 0===w||w.call(m,o));case g.HereProviderStatus.FAILED:return F(),N(new g.HereProviderError(o.payload)),null===(I=x.onFailed)||void 0===I||I.call(x,o),void(null===(R=m?.onFailed)||void 0===R||R.call(m,o));case g.HereProviderStatus.SUCCESS:return F(),C(o),null===(V=x.onSuccess)||void 0===V||V.call(x,o),void(null===(H=m?.onSuccess)||void 0===H||H.call(m,o))}},Z=o=>{var h;j({type:(null===(h=S.selector)||void 0===h?void 0:h.type)||"local",status:g.HereProviderStatus.FAILED,payload:o})};null===(k=x.onRequested)||void 0===k||k.call(x,D,S,Z),null===(U=m?.onRequested)||void 0===U||U.call(m,D,S,Z),P?.addEventListener("abort",()=>Z());const T=()=>{-1!==Y&&(Y=setTimeout(()=>l(void 0,void 0,void 0,function*(){var o,h,w,I;try{const R=yield(0,y.getResponse)(D);if(-1===Y)return;j(R),T()}catch(R){const V=g.HereProviderStatus.FAILED,H=R instanceof Error?R:void 0,L=H?.message;F(),N(new g.HereProviderError(L,H)),null===(o=x.onFailed)||void 0===o||o.call(x,{type:(null===(h=S.selector)||void 0===h?void 0:h.type)||"local",status:V,payload:L}),null===(w=m?.onFailed)||void 0===w||w.call(m,{type:(null===(I=S.selector)||void 0===I?void 0:I.type)||"local",status:V,payload:L})}}),3e3))};if(T(),!1===(0,s.isMobile)()){G=new WebSocket(`${z}/ws/${D}`),G.onmessage=h=>{if(null!=h.data)try{const w=JSON.parse(h.data);j(w)}catch{}}}})})},66212:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(m,S,_,D){return new(_||(_=Promise))(function(x,C){function N(z){try{U(D.next(z))}catch(Y){C(Y)}}function k(z){try{U(D.throw(z))}catch(Y){C(Y)}}function U(z){z.done?x(z.value):function P(x){return x instanceof _?x:new _(function(C){C(x)})}(z.value).then(N,k)}U((D=D.apply(m,S||[])).next())})},v=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.createRequest=n.deleteRequest=n.getResponse=n.getRequest=n.proxyApi=void 0;const E=v(u(9562)),M=v(u(78948)),s=u(41327),g=u(45530);n.proxyApi="https://h4n.app";n.getRequest=(m,S)=>l(void 0,void 0,void 0,function*(){const _=yield fetch(`${n.proxyApi}/${m}/request`,{signal:S,headers:{"content-type":"application/json"},method:"GET"});if(!1===_.ok)throw Error(yield _.text());const{data:D}=yield _.json();return JSON.parse(Buffer.from((0,s.base_decode)(D)).toString("utf8"))});n.getResponse=m=>l(void 0,void 0,void 0,function*(){var S;const _=yield fetch(`${n.proxyApi}/${m}/response`,{headers:{"content-type":"application/json"},method:"GET"});if(!1===_.ok)throw Error(yield _.text());const{data:D}=yield _.json(),P=null!==(S=JSON.parse(D))&&void 0!==S?S:{};return Object.assign({type:"here",public_key:"",account_id:"",payload:"",status:-1,path:""},P)});n.deleteRequest=m=>l(void 0,void 0,void 0,function*(){const S=yield fetch(`${n.proxyApi}/${m}`,{headers:{"content-type":"application/json"},method:"DELETE"});if(!1===S.ok)throw Error(yield S.text())});n.createRequest=(m,S)=>l(void 0,void 0,void 0,function*(){const _=(0,s.base_encode)(JSON.stringify(Object.assign(Object.assign({},m),{_id:(0,M.default)()}))),D=(0,E.default)(_),x=Buffer.from(D,"hex").toString("base64").replaceAll("/","_").replaceAll("-","+").slice(0,13),C=yield fetch(`${n.proxyApi}/${x}/request`,{method:"POST",signal:S,body:JSON.stringify({topic_id:(0,g.getDeviceId)(),data:_}),headers:{"content-type":"application/json"}});if(!1===C.ok)throw Error(yield C.text());return x})},84960:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(M,s,g,y){void 0===y&&(y=g),Object.defineProperty(M,y,{enumerable:!0,get:function(){return s[g]}})}:function(M,s,g,y){void 0===y&&(y=g),M[y]=s[g]}),v=this&&this.__exportStar||function(M,s){for(var g in M)"default"!==g&&!Object.prototype.hasOwnProperty.call(s,g)&&l(s,M,g)};Object.defineProperty(n,"__esModule",{value:!0}),n.HereWallet=void 0;var E=u(5238);Object.defineProperty(n,"HereWallet",{enumerable:!0,get:function(){return E.HereWallet}}),v(u(64099),n),v(u(82253),n),v(u(37996),n),v(u(19169),n),v(u(45173),n),v(u(55217),n),v(u(67701),n),v(u(37874),n),v(u(45530),n),v(u(73530),n)},11867:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(p,m,S,_){void 0===_&&(_=S),Object.defineProperty(p,_,{enumerable:!0,get:function(){return m[S]}})}:function(p,m,S,_){void 0===_&&(_=S),p[_]=m[S]}),v=this&&this.__setModuleDefault||(Object.create?function(p,m){Object.defineProperty(p,"default",{enumerable:!0,value:m})}:function(p,m){p.default=m}),E=this&&this.__importStar||function(p){if(p&&p.__esModule)return p;var m={};if(null!=p)for(var S in p)"default"!==S&&Object.prototype.hasOwnProperty.call(p,S)&&l(m,p,S);return v(m,p),m},M=this&&this.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifySignature=n.authPayloadSchema=n.AuthPayload=void 0;const s=E(u(21531)),g=M(u(1520)),y=u(55183);class f{constructor({message:m,nonce:S,recipient:_,callbackUrl:D}){this.tag=2147484061,this.message=m,this.nonce=S,this.recipient=_,D&&(this.callbackUrl=D)}}n.AuthPayload=f,n.authPayloadSchema={struct:{tag:"u32",message:"string",nonce:{array:{type:"u8",len:32}},recipient:"string",callbackUrl:{option:"string"}}},n.verifySignature=function d(p,m){const S=new f(p),_=s.serialize(n.authPayloadSchema,S),D=Uint8Array.from(g.default.sha256.array(_));let P=new Uint8Array(Buffer.from(m.signature,"base64"));return y.PublicKey.from(m.publicKey).verify(D,P)}},67701:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.HereProviderError=n.HereProviderStatus=void 0,(v=n.HereProviderStatus||(n.HereProviderStatus={}))[v.APPROVING=1]="APPROVING",v[v.FAILED=2]="FAILED",v[v.SUCCESS=3]="SUCCESS";class l extends Error{constructor(E,M){super(E??M?.message),this.payload=E,this.parentError=M}}n.HereProviderError=l},37874:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0})},45530:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(m,S,_,D){return new(_||(_=Promise))(function(x,C){function N(z){try{U(D.next(z))}catch(Y){C(Y)}}function k(z){try{U(D.throw(z))}catch(Y){C(Y)}}function U(z){z.done?x(z.value):function P(x){return x instanceof _?x:new _(function(C){C(x)})}(z.value).then(N,k)}U((D=D.apply(m,S||[])).next())})},v=this&&this.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(n,"__esModule",{value:!0}),n.isValidAccessKey=n.internalThrow=n.getPublicKeys=n.serializeActions=n.isMobile=n.getDeviceId=void 0;const E=v(u(78948)),M=u(67701);n.getDeviceId=()=>{const m=window.localStorage.getItem("herewallet-topic")||(0,E.default)();return window.localStorage.setItem("herewallet-topic",m),m};n.isMobile=()=>window.matchMedia("(any-pointer:coarse)").matches;n.serializeActions=m=>m.map(S=>{if("FunctionCall"!==S.type)return S;let{args:_,deposit:D,gas:P,methodName:x}=S.params;return ArrayBuffer.isView(_)&&(_=Buffer.from(_.buffer,_.byteOffset,_.byteLength)),_ instanceof Buffer&&(_=_.toString("base64")),{type:S.type,params:{args:_,deposit:D,gas:P,methodName:x}}});n.getPublicKeys=(m,S)=>l(void 0,void 0,void 0,function*(){const _=yield fetch(m,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:"dontcare",method:"query",params:{request_type:"view_access_key_list",finality:"final",account_id:S}}),headers:{"content-type":"application/json"}});return!1===_.ok?[]:(yield _.json()).result.keys});n.internalThrow=(m,S)=>{var _,D,P,x,C;if(m instanceof M.HereProviderError)throw m;const N={payload:m instanceof Error?m.message:"UNKNOWN",status:M.HereProviderStatus.FAILED,type:(null===(_=S.selector)||void 0===_?void 0:_.type)||"local",account_id:(null===(D=S.selector)||void 0===D?void 0:D.id)||""};throw null===(P=S.onFailed)||void 0===P||P.call(S,N),null===(C=null===(x=S?.strategy)||void 0===x?void 0:x.onFailed)||void 0===C||C.call(x,N),m};n.isValidAccessKey=(m,S,_)=>{const{permission:D}=S.access_key;if("FullAccess"===D)return!0;if(D.FunctionCall){const{receiver_id:P,method_names:x}=D.FunctionCall;if(P===m&&x.includes("add_request_and_confirm"))return!0;if(P===_.receiverId)return 1===_.actions.length&&_.actions.every(C=>"FunctionCall"===C.type&&((!C.params.deposit||"0"===C.params.deposit.toString())&&(0===x.length||x.includes(C.params.methodName))))}return!1}},5238:function(q,n,u){"use strict";var l=this&&this.__awaiter||function(k,U,z,Y){return new(z||(z=Promise))(function(F,j){function Z(h){try{o(Y.next(h))}catch(w){j(w)}}function T(h){try{o(Y.throw(h))}catch(w){j(w)}}function o(h){h.done?F(h.value):function G(F){return F instanceof z?F:new z(function(j){j(F)})}(h.value).then(Z,T)}o((Y=Y.apply(k,U||[])).next())})},v=this&&this.__rest||function(k,U){var z={};for(var Y in k)Object.prototype.hasOwnProperty.call(k,Y)&&U.indexOf(Y)<0&&(z[Y]=k[Y]);if(null!=k&&"function"==typeof Object.getOwnPropertySymbols){var G=0;for(Y=Object.getOwnPropertySymbols(k);Gnew P.WidgetStrategy),defaultProvider:F=_.proxyProvider}={}){this.authStorage=Y,this.defaultProvider=F,this.defaultStrategy=G;const j=new M.InMemorySigner(this.authStorage),Z=new s.JsonRpcProvider({url:U??`https://rpc.${z}.near.org`});this.connection=M.Connection.fromConfig({jsvmAccountId:`jsvm.${z}`,provider:Z,networkId:z,signer:j})}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}account(U){return l(this,void 0,void 0,function*(){const z=U??(yield this.authStorage.getActiveAccount(this.networkId));if(null==z)throw new C("Wallet not signed in");return new M.Account(this.connection,z)})}isSignedIn(){return l(this,void 0,void 0,function*(){return null!=(yield this.authStorage.getActiveAccount(this.networkId))})}signOut(){return l(this,void 0,void 0,function*(){const U=yield this.authStorage.getActiveAccount(this.networkId);if(null==U)throw new Error("Wallet not signed in");const z=yield this.authStorage.getKey(this.networkId,U);if(null!=z){const Y=z.getPublicKey().toString();yield this.silentSignAndSendTransaction({receiverId:U,actions:[{type:"DeleteKey",params:{publicKey:Y}}]}).catch(()=>{})}yield this.authStorage.removeKey(this.networkId,U)})}getHereBalance(U){return l(this,void 0,void 0,function*(){const z=yield this.account(U),Y="mainnet"===this.networkId?"here.storage.near":"here.storage.testnet",G=yield z.viewFunction({args:{account_id:z.accountId},methodName:"ft_balance_of",contractId:Y}).catch(()=>"0");return new d.default(G)})}getAvailableBalance(U){return l(this,void 0,void 0,function*(){const Y=yield(yield this.account(U)).getAccountBalance(),G=yield this.getHereBalance();return new d.default(Y.available).add(new d.default(G))})}getAccounts(){return l(this,void 0,void 0,function*(){return yield this.authStorage.getAccounts(this.networkId)})}getAccountId(){return l(this,void 0,void 0,function*(){const U=yield this.authStorage.getActiveAccount(this.networkId);if(null==U)throw new Error("Wallet not signed in");return U})}switchAccount(U){return l(this,void 0,void 0,function*(){if(null==(yield this.authStorage.getKey(this.networkId,U)))throw new Error(`Account ${U} not signed in`);yield this.authStorage.setActiveAccount(this.networkId,U)})}signIn(U={}){var z,Y,G,F,j,{contractId:Z,allowance:T,methodNames:o=[],selector:h}=U,w=v(U,["contractId","allowance","methodNames","selector"]);return l(this,void 0,void 0,function*(){if(null==Z){const{accountId:I}=yield this.authenticate(w);return yield this.authStorage.setKey(this.networkId,I,g.KeyPairEd25519.fromRandom()),yield this.authStorage.setActiveAccount(this.networkId,I),I}w.strategy=null!==(z=w.strategy)&&void 0!==z?z:this.defaultStrategy(),w.provider=null!==(Y=w.provider)&&void 0!==Y?Y:this.defaultProvider,null===(G=w.onInitialized)||void 0===G||G.call(w),null===(j=null===(F=w.strategy)||void 0===F?void 0:F.onInitialized)||void 0===j||j.call(F);try{const I=M.KeyPair.fromRandom("ed25519"),R={receiverId:Z,methodNames:o,allowance:T},V=yield w.provider(Object.assign(Object.assign({},w),{request:{type:"call",network:this.networkId,selector:h||{},transactions:[{actions:[{type:"AddKey",params:{publicKey:I.getPublicKey().toString(),accessKey:{permission:R}}}]}]}}));if(null==V.account_id)throw Error("Transaction is failed");return yield this.authStorage.setKey(this.networkId,V.account_id,I),yield this.authStorage.setActiveAccount(this.networkId,V.account_id),V.account_id}catch(I){throw(0,S.internalThrow)(I,w),I}})}silentSignAndSendTransaction({actions:U,receiverId:z,signerId:Y}){return l(this,void 0,void 0,function*(){const G=yield this.account(Y),F=yield this.authStorage.getKey(this.networkId,G.accountId).catch(()=>null);if(null==F)throw new C;const j=F.getPublicKey(),Z=yield G.getAccessKeys(),T={receiverId:z,actions:U};if(!1===Z.some(h=>h.public_key===j.toString()&&(0,S.isValidAccessKey)(G.accountId,h,T)))throw new C;return yield G.signAndSendTransaction({actions:U.map(h=>(0,D.createAction)(h)),receiverId:z??G.accountId})})}signAndSendTransaction(U){var z,Y,G,F,j,Z,T,o;return l(this,void 0,void 0,function*(){const{signerId:h,receiverId:w,actions:I}=U,V=v(U,["signerId","receiverId","actions"]);V.strategy=null!==(z=V.strategy)&&void 0!==z?z:this.defaultStrategy(),V.provider=null!==(Y=V.provider)&&void 0!==Y?Y:this.defaultProvider,null===(G=V.onInitialized)||void 0===G||G.call(V),null===(j=null===(F=V.strategy)||void 0===F?void 0:F.onInitialized)||void 0===j||j.call(F);try{const H=yield this.silentSignAndSendTransaction({receiverId:w,actions:I,signerId:h}),L={type:"local",status:m.HereProviderStatus.SUCCESS,payload:H?.transaction_outcome.id};return null===(Z=V.onSuccess)||void 0===Z||Z.call(V,L),null===(o=null===(T=V.strategy)||void 0===T?void 0:T.onSuccess)||void 0===o||o.call(T,L),H}catch(H){try{if(!(H instanceof C)&&"NotEnoughAllowance"!==H?.type)throw(0,S.internalThrow)(H,V),H;const L=yield this.getAccountId().catch(()=>{}),b=yield V.provider(Object.assign(Object.assign({},V),{request:{type:"call",network:this.networkId,transactions:[{actions:(0,S.serializeActions)(I),receiverId:w,signerId:h}],selector:U.selector||{id:h||L}}}));if(null==b.payload||null==b.account_id)throw Error("Transaction not found, but maybe executed");return yield this.rpc.txStatus(b.payload,b.account_id)}catch(L){throw(0,S.internalThrow)(L,V),L}}})}verifyMessageNEP0413(U,z){return l(this,void 0,void 0,function*(){if(!(0,x.verifySignature)(U,z))throw Error("Incorrect signature");if(!(yield(yield this.account(z.accountId)).getAccessKeys()).some(Z=>!(Z.public_key!==z.publicKey||"FullAccess"!==Z.access_key.permission)))throw Error("Signer public key is not full access");return!0})}authenticate(U={}){var z,Y,G;return l(this,void 0,void 0,function*(){const F={nonce:null!==(z=U.nonce)&&void 0!==z?z:(0,f.randomBytes)(32),recipient:null!==(Y=U.recipient)&&void 0!==Y?Y:window.location.host,message:null!==(G=U.message)&&void 0!==G?G:"Authenticate"},j=yield this.signMessage(Object.assign(Object.assign({},F),U));return yield this.verifyMessageNEP0413(F,j),j})}signMessage(U){var z,Y,G,F,j;return l(this,void 0,void 0,function*(){if(U.strategy=null!==(z=U.strategy)&&void 0!==z?z:this.defaultStrategy(),U.provider=null!==(Y=U.provider)&&void 0!==Y?Y:this.defaultProvider,null===(G=U.onInitialized)||void 0===G||G.call(U),null===(j=null===(F=U.strategy)||void 0===F?void 0:F.onInitialized)||void 0===j||j.call(F),"receiver"in U)return yield this.legacySignMessage(U);const Z=yield this.getAccountId().catch(()=>{}),T=yield U.provider(Object.assign(Object.assign({},U),{request:{type:"sign",message:U.message,recipient:U.recipient,nonce:Array.from(U.nonce),network:this.networkId,selector:U.selector||{id:Z}}}));if(null==T?.payload)throw Error("Signature not found");const{publicKey:o,signature:h,accountId:w}=JSON.parse(T.payload);return{publicKey:o,signature:h,accountId:w}})}legacySignMessage(U){var z,{message:Y,receiver:G,nonce:F,selector:j}=U,Z=v(U,["message","receiver","nonce","selector"]);return l(this,void 0,void 0,function*(){if(null==F){let h=new Uint8Array(32);F=[...crypto.getRandomValues(h)]}const T=yield this.getAccountId().catch(()=>{}),o=yield null===(z=Z.provider)||void 0===z?void 0:z.call(Z,Object.assign(Object.assign({},Z),{request:{type:"sign",network:this.networkId,selector:j||{id:T},message:Y,receiver:G,nonce:F}}));if(null==o?.payload)throw Error("Signature not found");try{const{publicKey:h,signature:w,accountId:I}=JSON.parse(o.payload),R=new Uint8Array(Buffer.from(w,"base64")),V=JSON.stringify({message:Y,receiver:G,nonce:F}),H=new Uint8Array(y.sha256.digest("NEP0413:"+V));if(!1===g.PublicKey.from(h).verify(H,R))throw Error();const B=yield(yield this.account(I)).getAccessKeys(),re=h.toString();if(!1===B.some(te=>!(te.public_key!==re||"FullAccess"!==te.access_key.permission)))throw Error();return{signature:new Uint8Array(Buffer.from(w,"base64")),publicKey:g.PublicKey.from(h),message:"NEP0413:"+V,receiver:G,accountId:I,nonce:F}}catch{throw Error("Signature not correct")}})}signAndSendTransactions(U){var z,Y,G,F,j,Z,T,o,{transactions:h,selector:w}=U,I=v(U,["transactions","selector"]);return l(this,void 0,void 0,function*(){I.strategy=null!==(z=I.strategy)&&void 0!==z?z:this.defaultStrategy(),I.provider=null!==(Y=I.provider)&&void 0!==Y?Y:this.defaultProvider,null===(G=I.onInitialized)||void 0===G||G.call(I),null===(j=null===(F=I.strategy)||void 0===F?void 0:F.onInitialized)||void 0===j||j.call(F);let R=[];try{for(const L of h){const b=yield this.silentSignAndSendTransaction(L);R.push(b)}const V=R.map(L=>L.transaction_outcome.id).join(","),H={type:"local",status:m.HereProviderStatus.SUCCESS,payload:V};return null===(Z=I.onSuccess)||void 0===Z||Z.call(I,H),null===(o=null===(T=I.strategy)||void 0===T?void 0:T.onSuccess)||void 0===o||o.call(T,H),R}catch(V){try{if(!(V instanceof C)&&"NotEnoughAllowance"!==V?.type)throw(0,S.internalThrow)(V,I),V;const H=yield this.getAccountId().catch(()=>{}),L=h.slice(R.length),b=yield I.provider(Object.assign(Object.assign({},I),{request:{type:"call",network:this.networkId,selector:w||{id:L[0].signerId||H},transactions:L.map(re=>Object.assign(Object.assign({},re),{actions:(0,S.serializeActions)(re.actions)}))}}));if(null==b.payload||null==b.account_id)throw Error("Transaction not found, but maybe executed");const B=b.payload.split(",").map(re=>this.rpc.txStatus(re,b.account_id));return yield Promise.all(B)}catch(H){throw(0,S.internalThrow)(H,I),H}}})}}},82945:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.THEME_SMALL_WINDOW_WIDTH_MAX=n.THEME_CONSTANT_BADGE_GREY_COLOR=n.THEME_CONSTANT_GREEN_COLOR=n.THEME_CONSTANT_RED_COLOR=n.THEME_CONSTANT_COLOR_DARK=n.THEME_CONSTANT_COLOR_BRAND=n.SIGN_POPUP_HEIGHT=n.SIGN_POPUP_WIDTH=void 0,n.SIGN_POPUP_WIDTH=390,n.SIGN_POPUP_HEIGHT=650,n.THEME_CONSTANT_COLOR_BRAND="#471be8",n.THEME_CONSTANT_COLOR_DARK="#101046",n.THEME_CONSTANT_RED_COLOR="#e25252",n.THEME_CONSTANT_GREEN_COLOR="#8bdaa1",n.THEME_CONSTANT_BADGE_GREY_COLOR="rgba(116,117,126,0.67)",n.THEME_SMALL_WINDOW_WIDTH_MAX=600},20534:(q,n)=>{"use strict";var v;Object.defineProperty(n,"__esModule",{value:!0}),n.ENearNetworkSuffix=n.ENearNetwork=void 0,(v=n.ENearNetwork||(n.ENearNetwork={})).localnet="localnet",v.testnet="testnet",v.betanet="betanet",v.mainnet="mainnet",function(v){v.testnet=".testnet",v.mainnet=".near"}(n.ENearNetworkSuffix||(n.ENearNetworkSuffix={}))},61483:(q,n)=>{"use strict";var u,E;Object.defineProperty(n,"__esModule",{value:!0}),n.getExternalActionErrorMessageForEndTag=n.EDappActionErrorTag=void 0,(E=u=n.EDappActionErrorTag||(n.EDappActionErrorTag={})).NEW_ACTION_STARTED="NEW_ACTION_STARTED",E.INCOMPLETE_ACTION="INCOMPLETE_ACTION",E.NO_ACCOUNTS="NO_ACCOUNTS",E.WINDOW_CLOSED="WINDOW_CLOSED",E.USER_CANCELLED="USER_CANCELLED",E.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",E.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED";const l={[u.WINDOW_CLOSED]:"User closed the window",[u.INCOMPLETE_ACTION]:"User didn't complete the action",[u.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[u.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[u.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[u.USER_CANCELLED]:"User cancelled the action",[u.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};n.getExternalActionErrorMessageForEndTag=function v(E){return l[E]??"An unknown error occurred"}},18788:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.EDappActionConnectionStatus=n.EDappActionSource=n.EMeteorInjectedFeature=n.EMeteorExtensionDirectActionType=n.EWalletExternalActionStatus=n.EWalletExternalAction_SignIn_AccessType=n.EMeteorWalletSignInType=n.EExternalActionType=n.MeteorActionError=void 0;const l=u(61483);class v extends Error{constructor(S,_){super(),null==S.message&&(S.message=(0,l.getExternalActionErrorMessageForEndTag)(S.endTags?.[S.endTags.length-1]??"unknown")),this._reason=S,this.message=S.message,this.name="MeteorActionError",this.cause=_}}var m;n.MeteorActionError=v,(m=n.EExternalActionType||(n.EExternalActionType={})).login="login",m.sign="sign",m.logout="logout",m.verify_owner="verify_owner",m.keypom_claim="keypom_claim",m.sign_message="sign_message",function(m){m.ALL_METHODS="ALL_METHODS",m.SELECTED_METHODS="SELECTED_METHODS",m.FULL_ACCESS="FULL_ACCESS"}(n.EMeteorWalletSignInType||(n.EMeteorWalletSignInType={})),function(m){m.FULL_ACCESS="fullAccess",m.LIMITED_ACCESS="limitedAccess"}(n.EWalletExternalAction_SignIn_AccessType||(n.EWalletExternalAction_SignIn_AccessType={})),function(m){m.UNCONFIRMED="UNCONFIRMED",m.PENDING="PENDING",m.SUCCESS="SUCCESS",m.FAILURE="FAILURE"}(n.EWalletExternalActionStatus||(n.EWalletExternalActionStatus={})),function(m){m.check_sync_status="check_sync_status",m.sync_accounts="sync_accounts",m.open_page="open_page"}(n.EMeteorExtensionDirectActionType||(n.EMeteorExtensionDirectActionType={})),function(m){m.open_page="open_page",m.batch_import="batch_import",m.sync_check="sync_check",m.account_sync="account_sync"}(n.EMeteorInjectedFeature||(n.EMeteorInjectedFeature={})),function(m){m.website_callback="wcb",m.website_post_message="wpm",m.website_visit="wv",m.extension_injected="ext"}(n.EDappActionSource||(n.EDappActionSource={})),function(m){m.initializing="initializing",m.connected="connected",m.attempting_reconnect="attempting_reconnect",m.disconnected="disconnected",m.closed_success="closed_success",m.closed_fail="closed_fail",m.closed_window="closed_window"}(n.EDappActionConnectionStatus||(n.EDappActionConnectionStatus={}))},74577:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StringUtils=n.stringToConstantStyledString=n.convertToSlug=n.pad=n.createPadder=n.BetterStringArray=n.safeAppend=n.firstNotNullEmpty=n.nullEmpty=n.notNullEmpty=n.StringRegex=void 0,n.StringRegex={digitsRegex:/\b\d+\b/gi};n.notNullEmpty=o=>null!=o&&o.length>0;n.nullEmpty=o=>!(0,n.notNullEmpty)(o);n.firstNotNullEmpty=(...o)=>{for(const h of o)if((0,n.notNullEmpty)(h))return h};n.safeAppend=(o,h,w=null)=>(0,n.notNullEmpty)(o)?o+h:w??h;function g(o,h,w=!1){return I=>y(I,o,h,w)}function y(o,h,w,I=!1){const R=w-`${o}`.length;if(R>0){const V=new Array(R).fill(h);return I?`${o}${V.join("")}`:`${V.join("")}${o}`}return`${o}`}n.BetterStringArray=class s extends Array{pushIfNotNullEmpty(h){(0,n.notNullEmpty)(h)&&this.push(h)}},n.createPadder=g,n.pad=y;const f=new RegExp("\\s+","g"),d=new RegExp("--+","g"),p=new RegExp("^-+","g"),m=new RegExp("-+$","g"),S=new RegExp("-","g"),_=new RegExp("[^\\w\\-]+","g"),D=new RegExp("_","g");n.convertToSlug=(o,{slugDivider:h="-",letterCase:w="LOWER",normalize:I=!0,excludeCharacters:R=[]}={})=>{if(!o||0===o.length)return"";let V=o.toString();return I&&(V=V.normalize("NFD")),"LOWER"===w?V=V.toLowerCase():"UPPER"===w&&(V=V.toUpperCase()),V.replace(f,"-").replace(R.length>0?new RegExp(`[^\\w\\-${R.map(H=>function P(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(H)).join("")}]+`,"g"):_,"").replace(R.includes("_")?f:D,"-").replace(d,"-").replace(p,"").replace(m,"").replace(S,h)};n.stringToConstantStyledString=o=>(0,n.convertToSlug)(o,{normalize:!0,slugDivider:"_",letterCase:"UPPER"});function k(o){return(o=o||"")!==decodeURIComponent(o)}const j=(...o)=>o.filter(h=>h).map((h,w,I)=>{const R=0!==w,V=w!==I.length-1;return R&&(h=h.startsWith("/")?h.slice(1):h),V&&(h=h.endsWith("/")?h.slice(0,-1):h),h}).join("/");n.StringUtils={isUriEncoded:k,decodeUriFully:o=>{let h=0;for(;k(o);)if(h+=1,o=decodeURIComponent(o),h>20)throw new Error("String Utils: Decode URI Fully: Enacted while loop too many times with attempt to decode fully.");return o},StringRegex:n.StringRegex,reverse:o=>{let h="";for(const w of o)h=`${w}${h}`;return h},notNullEmpty:n.notNullEmpty,nullEmpty:n.nullEmpty,anyNullEmpty:o=>{for(const h of o)if((0,n.nullEmpty)(h))return!0;return!1},safeAppend:n.safeAppend,createPadder:g,pad:y,convertToSlug:n.convertToSlug,stringToConstantStyledString:n.stringToConstantStyledString,removeAndTrim:(o,h,{spaceAware:w=!0,insideWords:I=!1}={})=>{let R=`${o}`;for(const V of h)if(w)if(I){const H=[new RegExp(`\\s${V}\\s`,"g"),new RegExp(`\\s${V}`,"g"),new RegExp(`${V}\\s`,"g")];for(const L of H)L.test(R)&&(console.log(`Replacing "${L}" in "${R}"`),R=R.replace(L," "),console.log(`Text after: "${R}"`))}else R.indexOf(` ${V} `)>=0?R=R.replace(` ${V} `," "):(R.startsWith(`${V} `)&&(R=R.substring(V.length+1)),R.endsWith(` ${V}`)&&(R=R.substring(0,R.length-(V.length+1))));else R.indexOf(V)>=0&&(R=R.replace(V,""));return R.trim()},sortCompareStrings:function Y(o,h){const w=o.toLowerCase(),I=h.toLowerCase();return wI?1:0},comparePure:function G(o,h){return o>h?1:oh.startsWith("http://")||h.startsWith("https://")?h:j(o,h),isHashId:o=>{const h=o.match(/^[a-zA-Z0-9]+$/);return Boolean(h)}}},18015:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.EnvironmentStateAdapter_Sync=n.EnvironmentStateAdapter=void 0;n.EnvironmentStateAdapter=class v{constructor(s){this.implementation=s}setJson(s,g){var y=this;return l(function*(){yield y.implementation.setString(s,JSON.stringify(g))})()}getJson(s){var g=this;return l(function*(){const y=yield g.implementation.getString(s);if(null!=y&&"undefined"!==y&&"null"!==y)return JSON.parse(y)})()}setString(s,g){var y=this;return l(function*(){yield y.implementation.setString(s,g)})()}getString(s){var g=this;return l(function*(){const y=yield g.implementation.getString(s);if(null!=y)return y})()}createJsonGetterSetter(s){return{get:()=>this.getJson(s),set:g=>this.setJson(s,g)}}createStringGetterSetter(s){return{get:()=>this.getString(s),set:g=>this.setString(s,g)}}};n.EnvironmentStateAdapter_Sync=class E{constructor(s){this.implementation=s}setJson(s,g){this.implementation.setString(s,JSON.stringify(g))}getJson(s){const g=this.implementation.getString(s);if(null!=g&&"undefined"!==g&&"null"!==g)return JSON.parse(g)}setString(s,g){this.implementation.setString(s,g)}getString(s){const g=this.implementation.getString(s);if(null!=g)return g}clear(s){this.implementation.clear(s)}createJsonGetterSetter(s){return{get:()=>this.getJson(s),set:g=>this.setJson(s,g)}}createStringGetterSetter(s){return{get:()=>this.getString(s),set:g=>this.setString(s,g)}}}},15973:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.ConnectedMeteorWalletAccount=n.MeteorWallet=void 0;const v=u(71836),E=u(38445),M=u(18788),s=u(21531),g=u(74577),y=u(18015),f=u(61445),d=u(34552),p=u(18223),m=u(29761),S=u(6213),_=u(98538),k=new y.EnvironmentStateAdapter_Sync({getString:G=>window.localStorage.getItem(G),setString:(G,F)=>window.localStorage.setItem(G,F),clear:G=>window.localStorage.removeItem(G)});new y.EnvironmentStateAdapter_Sync({getString:G=>window.sessionStorage.getItem(G),setString:(G,F)=>window.sessionStorage.setItem(G,F),clear:G=>window.sessionStorage.removeItem(G)});class z{static init({walletUrl:F,...j}){return l(function*(){const Z=new v.keyStores.BrowserLocalStorageKeyStore,T=yield(0,v.connect)({keyStore:Z,headers:{},walletUrl:(0,f.resolveWalletUrl)(j.networkId,F),...(0,f.getNetworkPreset)(j.networkId),...j}),o=new z({near:T,appKeyPrefix:"near_app"});return o.isSignedIn()||(yield Z.clear()),o})()}constructor({near:F,appKeyPrefix:j=F.config.contractName??"default"}){this._initializationPromises=[],this._near=F;const Z=j+"_meteor_wallet_auth_key";this._authDataKey=Z,this._authData=k.getJson(Z)??{allKeys:[]},this._networkId=F.config.networkId,this._walletBaseUrl=F.config.walletUrl,this._keyStore=F.connection.signer.keyStore}isExtensionInstalled(){return null!=window.meteorWallet}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}verifyOwner(F){var j=this;return l(function*(){const Z=F.accountId??j.getAccountId(),T=yield(0,d.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:M.EExternalActionType.verify_owner,inputs:{accountId:Z,message:F.message},network:j._networkId});if(T.success)return T;throw new M.MeteorActionError({endTags:T.endTags,message:T.message})})()}requestSignIn(F){var j=this;return l(function*(){const{keyPair:Z,...T}=F,o=Z??v.KeyPair.fromRandom("ed25519");let h=o.getPublicKey().toString();const w=yield(0,d.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:M.EExternalActionType.login,inputs:{public_key:h,...T},network:j._networkId});if(w.success){const{allKeys:I,accountId:R}=w.payload;return j._authData={accountId:R,allKeys:I,signedInContract:{contract_id:T.contract_id,public_key:h}},k.setJson(j._authDataKey,j._authData),yield j._keyStore.setKey(j._networkId,R,o),{success:!0,endTags:[],payload:{accessKey:o,accountId:R}}}throw new M.MeteorActionError({endTags:w.endTags,message:w.message})})()}signOut(){var F=this;return l(function*(){const j=F.getAccountId();if(null!=F._authData.signedInContract&&null!=j){const Z={accountId:j,contractInfo:F._authData.signedInContract};yield(0,d.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:M.EExternalActionType.logout,inputs:Z,network:F._networkId})}F._authData={allKeys:[]},k.clear(F._authDataKey)})()}signMessage({message:F,nonce:j,recipient:Z,callbackUrl:T,state:o,accountId:h}){var w=this;return l(function*(){const I=yield(0,d.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:M.EExternalActionType.sign_message,inputs:{message:F,nonce:j,recipient:Z,callbackUrl:T,state:o,accountId:h},network:w._networkId});if(I.success)return I.payload.state=o,I;throw new M.MeteorActionError({endTags:I.endTags,message:I.message})})()}requestSignTransactions(F){var j=this;return l(function*(){const{transactions:Z}=F,T=yield j.transformTransactions(Z);console.log("Transformed transactions",T);const o=yield(0,d.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:M.EExternalActionType.sign,inputs:{transactions:T.map(h=>(0,s.serialize)(p.SCHEMA_V2,h)).map(h=>Buffer.from(h).toString("base64")).join(",")},network:j._networkId});if(o.success)return o.payload.executionOutcomes;throw new M.MeteorActionError({endTags:o.endTags,message:o.message})})()}account(){const F=this.getAccountId();return(0,g.notNullEmpty)(F)&&this._connectedAccount?.accountId!==F&&(this._connectedAccount=new Y(this,this._near.connection,F)),this._connectedAccount}transformTransactions(F){var j=this;return l(function*(){const Z=j.account(),{networkId:T,signer:o,provider:h}=Z.connection,w=yield o.getPublicKey(Z.accountId,T);return Promise.all(F.map(function(){var I=l(function*(R,V){const H=yield Z.accessKeyForTransaction(w);if(!H)throw new Error(`Failed to find matching key for transaction sent to ${R.receiverId}`);const L=R.actions.map(B=>(0,S.createAction)(B)),b=yield h.block({finality:"final"});return(0,E.createTransaction)(Z.accountId,m.PublicKey.from(H.public_key),R.receiverId,new _.BN(H.access_key.nonce).add(new _.BN(V)).add(new _.BN(1)),L,v.utils.serialize.base_decode(b.header.hash))});return function(R,V){return I.apply(this,arguments)}}()))})()}}n.MeteorWallet=z;class Y extends v.Account{constructor(F,j,Z){super(j,Z),this.meteorWallet=F}signAndSendTransaction(...F){var j=this;return l(function*(){return"string"==typeof F[0]?j.signAndSendTransaction_direct({receiverId:F[0],actions:F[1]}):j.signAndSendTransaction_direct(F[0])})()}trySendOrCreateTransaction({receiverId:F,actions:j}){var Z=()=>super.signAndSendTransaction,T=this;return l(function*(){const o=yield T.connection.signer.getPublicKey(T.accountId,T.connection.networkId);let h=yield T.accessKeyForTransaction(o);if(null!=h&&"FullAccess"!==h.access_key.permission&&!(yield T.accessKeyMatchesTransaction(h,F,j)))return{sent:!1,transaction:{receiverId:F,signerId:T.accountId,actions:j}};if(h&&o&&o.toString()===h.public_key)try{return{executionOutcome:yield Z().call(T,{receiverId:F,actions:j.map(w=>(0,S.createAction)(w))}),sent:!0}}catch(w){if("NotEnoughAllowance"!==w.type)throw w}return{sent:!1,transaction:{receiverId:F,signerId:T.accountId,actions:j}}})()}signAndSendTransaction_direct({receiverId:F,actions:j}){var Z=this;return l(function*(){const{transaction:T,sent:o,executionOutcome:h}=yield Z.trySendOrCreateTransaction({receiverId:F,actions:j});return o?h:(yield Z.meteorWallet.requestSignTransactions({transactions:[T]}))[0]})()}accessKeyMatchesTransaction(F,j,Z){return l(function*(){const{access_key:{permission:T}}=F;if("FullAccess"===T)return!0;if(console.log("Comparing access key and actions",{accessKey:F,receiverId:j,actions:Z}),T.FunctionCall){const{receiver_id:o,method_names:h}=T.FunctionCall;if(o===j&&h.includes("add_request_and_confirm"))return!0;if(o===j){if(1!==Z.length)return!1;const w=Z[0];if(console.log(w),"FunctionCall"===w.type){const I=w.params;return(!I.deposit||"0"===I.deposit.toString())&&(0===h.length||h.includes(I.methodName))}}}return!1})()}accessKeyForTransaction(F){var j=this;return l(function*(){const Z=yield j.getAccessKeys();if(console.log("accessKeys",Z),F){const o=Z.find(h=>h.public_key.toString()===F.toString());if(o)return o}const T=j.meteorWallet._authData.allKeys;for(const o of Z)if(-1!==T.indexOf(o.public_key))return o;for(const o of Z)if("FullAccess"===o.access_key.permission)return o;return null})()}}n.ConnectedMeteorWalletAccount=Y},83635:(q,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WALLET_URL_LOCALHOST_BASE=n.WALLET_URL_PRODUCTION_BASE=n.WALLET_URL_DEV_BASE=void 0,n.WALLET_URL_DEV_BASE="https://dev.wallet.meteorwallet.app",n.WALLET_URL_PRODUCTION_BASE="https://wallet.meteorwallet.app",n.WALLET_URL_LOCALHOST_BASE="https://localhost:3000"},85538:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setEnvConfig=n.envConfig=void 0;const l=u(83635),v=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0;n.envConfig={wallet_base_url:v??l.WALLET_URL_PRODUCTION_BASE},n.setEnvConfig=function E(M){Object.assign(n.envConfig,M)}},96831:function(q,n,u){"use strict";var l=this&&this.__createBinding||(Object.create?function(s,g,y,f){void 0===f&&(f=y);var d=Object.getOwnPropertyDescriptor(g,y);(!d||("get"in d?!g.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(s,f,d)}:function(s,g,y,f){void 0===f&&(f=y),s[f]=g[y]}),v=this&&this.__exportStar||function(s,g){for(var y in s)"default"!==y&&!Object.prototype.hasOwnProperty.call(g,y)&&l(g,s,y)};Object.defineProperty(n,"__esModule",{value:!0}),n.setEnvConfig=n.ENearNetwork=void 0,v(u(15973),n),v(u(61445),n),v(u(83635),n),v(u(18788),n);var E=u(20534);Object.defineProperty(n,"ENearNetwork",{enumerable:!0,get:function(){return E.ENearNetwork}});var M=u(85538);Object.defineProperty(n,"setEnvConfig",{enumerable:!0,get:function(){return M.setEnvConfig}})},18223:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SCHEMA_V2=void 0;const l=u(29761),v=u(38445);n.SCHEMA_V2=new Map([[v.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[v.SignedTransaction,{kind:"struct",fields:[["transaction",v.Transaction],["signature",v.Signature]]}],[v.Transaction,{kind:"struct",fields:[["signerId","string"],["publicKey",l.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[v.Action]]]}],[l.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[v.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",v.AccessKeyPermission]]}],[v.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",v.FunctionCallPermission],["fullAccess",v.FullAccessPermission]]}],[v.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[v.FullAccessPermission,{kind:"struct",fields:[]}],[v.Action,{kind:"enum",field:"enum",values:[["createAccount",v.CreateAccount],["deployContract",v.DeployContract],["functionCall",v.FunctionCall],["transfer",v.Transfer],["stake",v.Stake],["addKey",v.AddKey],["deleteKey",v.DeleteKey],["deleteAccount",v.DeleteAccount],["signedDelegate",v.SignedDelegate]]}],[v.CreateAccount,{kind:"struct",fields:[]}],[v.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[v.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[v.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[v.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",l.PublicKey]]}],[v.AddKey,{kind:"struct",fields:[["publicKey",l.PublicKey],["accessKey",v.AccessKey]]}],[v.DeleteKey,{kind:"struct",fields:[["publicKey",l.PublicKey]]}],[v.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[v.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[v.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",l.PublicKey]]}],[v.SignedDelegate,{kind:"struct",fields:[["delegateAction",v.DelegateAction],["signature",v.Signature]]}]])},34552:(q,n,u)=>{"use strict";var l=u(59344).default;Object.defineProperty(n,"__esModule",{value:!0}),n.getMeteorPostMessenger=void 0;const v=u(27184),E=u(85538),M=u(18788),s=u(63230),g=u(61483),y=u(82945);class f{constructor(D,P){const x=E.envConfig.wallet_base_url,C=new URL(x);if(this.walletOrigin=C.origin,null==window.meteorCom){this.comType=M.EDappActionSource.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");const N={source:M.EDappActionSource.website_post_message,connectionUid:D.uid},k=y.SIGN_POPUP_WIDTH,U=y.SIGN_POPUP_HEIGHT,z=window.top.outerHeight/2+window.top.screenY-U/2,Y=window.top.outerWidth/2+window.top.screenX-k/2,G=window.open(`${x}/connect/${D.network}/${D.actionType}?${(0,s.stringify)(N)}`,"_blank",`popup=1,width=${k},height=${U},top=${z},left=${Y}`);if(null==G)throw new M.MeteorActionError({message:"Couldn't open popup window to complete wallet action",endTags:[g.EDappActionErrorTag.POPUP_WINDOW_OPEN_FAILED]});this.websiteWindow=G,window.addEventListener("message",F=>P(F.data)),this.wasOpened=!1}else this.comType=M.EDappActionSource.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(P)}focus(){this.comType===M.EDappActionSource.website_post_message&&this.websiteWindow?.focus()}sendMessage(D){this.comType===M.EDappActionSource.website_post_message?this.websiteWindow?.postMessage(D,this.walletOrigin):window.meteorCom?.sendMessageData(D)}isWindowClosed(){return this.comType===M.EDappActionSource.website_post_message&&(this.websiteWindow?.closed??!0)}hasActiveWindow(){return this.comType!==M.EDappActionSource.website_post_message||null!=this.websiteWindow}close(){this.comType===M.EDappActionSource.website_post_message&&delete this.websiteWindow}}class p{constructor(){this.connections=[];const D=E.envConfig.wallet_base_url,P=new URL(D);this.baseWalletUrl=D,this.walletOrigin=P.origin,this.listener=x=>{if(null!=x){const C=this.connections.find(N=>N.uid===x.uid);null!=C&&(this.updateConnection(C.uid,{lastConnection:Date.now()}),x.status===M.EDappActionConnectionStatus.attempting_reconnect&&(this.updateConnection(C.uid,{status:M.EDappActionConnectionStatus.initializing}),this.sendComs()),x.status===M.EDappActionConnectionStatus.connected&&C.status===M.EDappActionConnectionStatus.initializing&&this.updateConnection(C.uid,{status:M.EDappActionConnectionStatus.connected}),x.status===M.EDappActionConnectionStatus.closed_success&&(C.resolve({success:!0,endTags:[],payload:x.payload}),this.updateConnection(C.uid,{status:M.EDappActionConnectionStatus.closed_success}),this.sendComs()),x.status===M.EDappActionConnectionStatus.closed_fail&&(this.updateConnection(C.uid,{status:M.EDappActionConnectionStatus.closed_fail}),this.sendComs(),C.reject(new M.MeteorActionError({endTags:x.endTags}))),x.status===M.EDappActionConnectionStatus.closed_window&&(this.updateConnection(C.uid,{status:M.EDappActionConnectionStatus.closed_window}),C.reject(new M.MeteorActionError({endTags:x.endTags,message:"User closed the window"}))),[M.EDappActionConnectionStatus.disconnected,M.EDappActionConnectionStatus.closed_fail,M.EDappActionConnectionStatus.closed_window,M.EDappActionConnectionStatus.closed_success].includes(x.status)&&this.removeConnection(C.uid))}}}removeConnection(D){this.connections=this.connections.filter(P=>P.uid!==D),0===this.connections.length&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(D,P){this.connections=this.connections.map(x=>x.uid===D?{...x,...P,uid:x.uid}:x)}sendComs(){if(this.comWindow?.hasActiveWindow()&&this.connections.length>0)if(null==this.comInterval&&(this.comInterval=setInterval(()=>this.sendComs(),450)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(const D of this.connections)D.reject(new M.MeteorActionError({message:"User closed the window before completing the action",endTags:[g.EDappActionErrorTag.INCOMPLETE_ACTION,g.EDappActionErrorTag.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(const{network:D,actionType:P,endTags:x,status:C,inputs:N,uid:k}of this.connections){const U={endTags:x,actionType:P,status:C,uid:k,network:D};C===M.EDappActionConnectionStatus.initializing&&(U.inputs=N),this.comWindow.sendMessage(U)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(D){if(this.connections.length>0)for(const P of this.connections)P.status=M.EDappActionConnectionStatus.disconnected,P.endTags=[g.EDappActionErrorTag.NEW_ACTION_STARTED];this.connections.push(D),null!=this.comWindow&&this.comWindow.hasActiveWindow()?this.comWindow.focus():this.comWindow=new f(D,this.listener),this.sendComs()}connectAndWaitForResponse({actionType:D,network:P,inputs:x}){var C=this;return l(function*(){let N={uid:(0,v.nanoid)(),actionType:D,lastAttemptedConnection:0,lastConnection:0,status:M.EDappActionConnectionStatus.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:x,network:P,endTags:[]};const k=new Promise((U,z)=>{N.resolve=U,N.reject=Y=>{C.connections=C.connections.filter(G=>G.uid!==N.uid),z(Y)}});return N.promise=k,C.addAndStartConnection(N),yield k})()}}let m;n.getMeteorPostMessenger=function S(){return null==m&&(m=new p),m}},61445:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getNetworkPreset=n.resolveWalletUrl=void 0;const l=u(85538);n.resolveWalletUrl=(M,s)=>{if(s)return s;const g=l.envConfig.wallet_base_url;switch(M){case"mainnet":return`${g}/connect/mainnet`;case"testnet":return`${g}/connect/testnet`;case"betanet":return`${g}/connect/betanet`;default:throw new Error("Invalid wallet URL")}};n.getNetworkPreset=M=>{switch(M){case"mainnet":return{networkId:M,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org"};case"testnet":return{networkId:M,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"};case"betanet":return{networkId:M,nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"};default:throw Error(`Failed to find config for: '${M}'`)}}},6213:(q,n,u)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAction=n.parseArgs=void 0;const l=u(98538),v=u(38445),E=u(29761);n.parseArgs=y=>"string"==typeof y?Buffer.from(y,"base64"):y;n.createAction=y=>{switch(y.type){case"CreateAccount":return v.actionCreators.createAccount();case"DeployContract":{const{code:f}=y.params;return v.actionCreators.deployContract(f)}case"FunctionCall":{const{methodName:f,args:d,gas:p,deposit:m}=y.params;return v.actionCreators.functionCall(f,(0,n.parseArgs)(d),new l.BN(p),new l.BN(m))}case"Transfer":{const{deposit:f}=y.params;return v.actionCreators.transfer(new l.BN(f))}case"Stake":{const{stake:f,publicKey:d}=y.params;return v.actionCreators.stake(new l.BN(f),E.PublicKey.from(d))}case"AddKey":{const{publicKey:f,accessKey:d}=y.params;return v.actionCreators.addKey(E.PublicKey.from(f),(y=>{if("FullAccess"===y)return v.actionCreators.fullAccessKey();const{receiverId:f,methodNames:d=[]}=y,p=y.allowance?new l.BN(y.allowance):void 0;return v.actionCreators.functionCallAccessKey(f,d,p)})(d.permission))}case"DeleteKey":{const{publicKey:f}=y.params;return v.actionCreators.deleteKey(E.PublicKey.from(f))}case"DeleteAccount":{const{beneficiaryId:f}=y.params;return v.actionCreators.deleteAccount(f)}default:throw new Error("Invalid action type")}}},87029:(q,n,u)=>{"use strict";var l=u(13846),v=typeof globalThis>"u"?global:globalThis;q.exports=function(){for(var M=[],s=0;s{"use strict";const l=u(18958);q.exports=s;const v=function Y(){function G(F){return typeof F<"u"&&F}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return G(self)||G(window)||G(this)||{}}}().console||{},E={mapHttpRequest:P,mapHttpResponse:P,wrapRequestSerializer:x,wrapResponseSerializer:x,wrapErrorSerializer:x,req:P,res:P,err:function _(G){const F={type:G.constructor.name,msg:G.message,stack:G.stack};for(const j in G)void 0===F[j]&&(F[j]=G[j]);return F}};function s(G){(G=G||{}).browser=G.browser||{};const F=G.browser.transmit;if(F&&"function"!=typeof F.send)throw Error("pino: transmit option must have a send function");const j=G.browser.write||v;G.browser.write&&(G.browser.asObject=!0);const Z=G.serializers||{},T=function M(G,F){return Array.isArray(G)?G.filter(function(Z){return"!stdSerializers.err"!==Z}):!0===G&&Object.keys(F)}(G.browser.serialize,Z);let o=G.browser.serialize;Array.isArray(G.browser.serialize)&&G.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);"function"==typeof j&&(j.error=j.fatal=j.warn=j.info=j.debug=j.trace=j),!1===G.enabled&&(G.level="silent");const w=G.level||"info",I=Object.create(j);I.log||(I.log=C),Object.defineProperty(I,"levelVal",{get:function V(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(I,"level",{get:function H(){return this._level},set:function L(B){if("silent"!==B&&!this.levels.values[B])throw Error("unknown level "+B);this._level=B,g(R,I,"error","log"),g(R,I,"fatal","error"),g(R,I,"warn","error"),g(R,I,"info","log"),g(R,I,"debug","log"),g(R,I,"trace","log")}});const R={transmit:F,serialize:T,asObject:G.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:D(G)};return I.levels=s.levels,I.level=w,I.setMaxListeners=I.getMaxListeners=I.emit=I.addListener=I.on=I.prependListener=I.once=I.prependOnceListener=I.removeListener=I.removeAllListeners=I.listeners=I.listenerCount=I.eventNames=I.write=I.flush=C,I.serializers=Z,I._serialize=T,I._stdErrSerialize=o,I.child=function b(B,re){if(!B)throw new Error("missing bindings for child Pino");re=re||{},T&&B.serializers&&(re.serializers=B.serializers);const ne=re.serializers;if(T&&ne){var te=Object.assign({},Z,ne),ae=!0===G.browser.serialize?Object.keys(te):T;delete B.serializers,d([B],ae,te,this._stdErrSerialize)}function ge(pe){this._childLevel=1+(0|pe._childLevel),this.error=p(pe,B,"error"),this.fatal=p(pe,B,"fatal"),this.warn=p(pe,B,"warn"),this.info=p(pe,B,"info"),this.debug=p(pe,B,"debug"),this.trace=p(pe,B,"trace"),te&&(this.serializers=te,this._serialize=ae),F&&(this._logEvent=S([].concat(pe._logEvent.bindings,B)))}return ge.prototype=this,new ge(this)},F&&(I._logEvent=S()),I}function g(G,F,j,Z){const T=Object.getPrototypeOf(F);F[j]=F.levelVal>F.levels.values[j]?C:T[j]?T[j]:v[j]||v[Z]||C,function y(G,F,j){!G.transmit&&F[j]===C||(F[j]=function(Z){return function(){const o=G.timestamp(),h=new Array(arguments.length),w=Object.getPrototypeOf&&Object.getPrototypeOf(this)===v?v:this;for(var I=0;I-1&&o in j&&(G[T][o]=j[o](G[T][o]))}function p(G,F,j){return function(){const Z=new Array(1+arguments.length);Z[0]=F;for(var T=1;T{"use strict";function l(E,M,s,g,y,f,d){try{var p=E[f](d),m=p.value}catch(S){return void s(S)}p.done?M(m):Promise.resolve(m).then(g,y)}function v(E){return function(){var M=this,s=arguments;return new Promise(function(g,y){var f=E.apply(M,s);function d(m){l(f,g,y,d,p,"next",m)}function p(m){l(f,g,y,d,p,"throw",m)}d(void 0)})}}u.d(n,{Z:()=>v})},27184:(q,n,u)=>{"use strict";u.r(n),u.d(n,{customAlphabet:()=>M,customRandom:()=>E,nanoid:()=>s,random:()=>v,urlAlphabet:()=>l});let l="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",v=g=>crypto.getRandomValues(new Uint8Array(g)),E=(g,y,f)=>{let d=(2<{let S="";for(;;){let _=f(p),D=p;for(;D--;)if(S+=g[_[D]&d]||"",S.length===m)return S}}},M=(g,y=21)=>E(g,y,v),s=(g=21)=>crypto.getRandomValues(new Uint8Array(g)).reduce((y,f)=>y+=(f&=63)<36?f.toString(36):f<62?(f-26).toString(36).toUpperCase():f>62?"-":"_","")},62949:(q,n,u)=>{"use strict";function l(x,C,N){return C<=x&&x<=N}function v(x){if(void 0===x)return{};if(x===Object(x))return x;throw TypeError("Could not convert argument to dictionary")}u.r(n),u.d(n,{TextDecoder:()=>S,TextEncoder:()=>_});var s=-1;function g(x){this.tokens=[].slice.call(x)}g.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():s},prepend:function(x){if(Array.isArray(x))for(var C=x;C.length;)this.tokens.unshift(C.pop());else this.tokens.unshift(x)},push:function(x){if(Array.isArray(x))for(var C=x;C.length;)this.tokens.push(C.shift());else this.tokens.push(x)}};var y=-1;function f(x,C){if(x)throw TypeError("Decoder error");return C||65533}(function d(){}).prototype={handler:function(x,C){}},function p(){}.prototype={handler:function(x,C){}};var m="utf-8";function S(x,C){if(!(this instanceof S))return new S(x,C);if((x=void 0!==x?String(x).toLowerCase():m)!==m)throw new Error("Encoding not supported. Only utf-8 is supported");C=v(C),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(C.fatal),this._ignoreBOM=Boolean(C.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function _(x,C){if(!(this instanceof _))return new _(x,C);if((x=void 0!==x?String(x).toLowerCase():m)!==m)throw new Error("Encoding not supported. Only utf-8 is supported");C=v(C),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(C.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function D(x){var C=x.fatal,N=0,k=0,U=0,z=128,Y=191;this.handler=function(G,F){if(F===s&&0!==U)return U=0,f(C);if(F===s)return y;if(0===U){if(l(F,0,127))return F;if(l(F,194,223))U=1,N=F-192;else if(l(F,224,239))224===F&&(z=160),237===F&&(Y=159),U=2,N=F-224;else{if(!l(F,240,244))return f(C);240===F&&(z=144),244===F&&(Y=143),U=3,N=F-240}return N<<=6*U,null}if(!l(F,z,Y))return N=U=k=0,z=128,Y=191,G.prepend(F),f(C);if(z=128,Y=191,N+=F-128<<6*(U-(k+=1)),k!==U)return null;var j=N;return N=U=k=0,j}}function P(x){x.fatal;this.handler=function(N,k){if(k===s)return y;if(l(k,0,127))return k;var U,z;l(k,128,2047)?(U=1,z=192):l(k,2048,65535)?(U=2,z=224):l(k,65536,1114111)&&(U=3,z=240);for(var Y=[(k>>6*U)+z];U>0;){var G=k>>6*(U-1);Y.push(128|63&G),U-=1}return Y}}S.prototype={decode:function(C,N){var k;k="object"==typeof C&&C instanceof ArrayBuffer?new Uint8Array(C):"object"==typeof C&&"buffer"in C&&C.buffer instanceof ArrayBuffer?new Uint8Array(C.buffer,C.byteOffset,C.byteLength):new Uint8Array(0),N=v(N),this._streaming||(this._decoder=new D({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(N.stream);for(var Y,U=new g(k),z=[];!U.endOfStream()&&(Y=this._decoder.handler(U,U.read()))!==y;)null!==Y&&(Array.isArray(Y)?z.push.apply(z,Y):z.push(Y));if(!this._streaming){do{if((Y=this._decoder.handler(U,U.read()))===y)break;null!==Y&&(Array.isArray(Y)?z.push.apply(z,Y):z.push(Y))}while(!U.endOfStream());this._decoder=null}return z.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===z[0]?(this._BOMseen=!0,z.shift()):this._BOMseen=!0),function M(x){for(var C="",N=0;N>10),56320+(1023&k)))}return C}(z)}},_.prototype={encode:function(C,N){C=C?String(C):"",N=v(N),this._streaming||(this._encoder=new P(this._options)),this._streaming=Boolean(N.stream);for(var z,k=[],U=new g(function E(x){for(var C=String(x),N=C.length,k=0,U=[];k57343)U.push(z);else if(56320<=z&&z<=57343)U.push(65533);else if(55296<=z&&z<=56319)if(k===N-1)U.push(65533);else{var Y=x.charCodeAt(k+1);if(56320<=Y&&Y<=57343){var G=1023&z,F=1023&Y;U.push(65536+(G<<10)+F),k+=1}else U.push(65533)}k+=1}return U}(C));!U.endOfStream()&&(z=this._encoder.handler(U,U.read()))!==y;)Array.isArray(z)?k.push.apply(k,z):k.push(z);if(!this._streaming){for(;(z=this._encoder.handler(U,U.read()))!==y;)Array.isArray(z)?k.push.apply(k,z):k.push(z);this._encoder=null}return new Uint8Array(k)}}},78948:(q,n,u)=>{"use strict";u.r(n),u.d(n,{default:()=>M,uuid4:()=>E,valid:()=>v});const l=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function v(s){return l.test(s)}function E(){var s=URL.createObjectURL(new Blob),g=s.toString();return URL.revokeObjectURL(s),g.split(/[:\/]/g).pop().toLowerCase()}E.valid=v;const M=E},54615:q=>{"use strict";q.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},87088:q=>{"use strict";q.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},37520:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},63902:q=>{"use strict";q.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},88546:q=>{"use strict";q.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},63478:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},66117:q=>{"use strict";q.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},38512:q=>{"use strict";q.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},22701:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},83584:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},77994:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},30888:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},8424:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},81217:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},86164:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},3427:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},56584:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},96747:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},97092:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},41355:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},50539:q=>{"use strict";q.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":"near-mobile-wallet://sign"}')},87908:q=>{"use strict";q.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},13917:q=>{"use strict";q.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend_production.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend_production.peersyst.tech"}')},15247:q=>{"use strict";q.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},93224:q=>{"use strict";q.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":""}')},19472:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},5027:q=>{"use strict";q.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},31008:q=>{"use strict";q.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},64775:q=>{"use strict";q.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:q=>{"use strict";q.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},24457:q=>{"use strict";q.exports=JSON.parse('["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]')},44946:q=>{"use strict";q.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:q=>{"use strict";q.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:q=>{"use strict";q.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},29799:q=>{"use strict";q.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:q=>{"use strict";q.exports={i8:"6.5.5"}},39526:q=>{"use strict";q.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},73619:q=>{"use strict";q.exports=JSON.parse('{"v6":{"ct":"~0.10.0"}}')},59514:q=>{"use strict";q.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","AccessKeyDoesNotExist":"Can\'t complete the action because access key {{public_key}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},83073:q=>{"use strict";q.exports=JSON.parse('{"schema":{"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed","DeleteAccountWithLargeState","DelegateActionInvalidSignature","DelegateActionSenderDoesNotMatchTxReceiver","DelegateActionExpired","DelegateActionAccessKeyError","DelegateActionInvalidNonce","DelegateActionNonceTooLarge"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas","DelegateActionMustBeOnlyOne","UnsupportedProtocolFeature"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"AltBn128InvalidInput":{"name":"AltBn128InvalidInput","subtypes":[],"props":{"msg":""}},"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DelegateActionExpired":{"name":"DelegateActionExpired","subtypes":[],"props":{}},"DelegateActionInvalidNonce":{"name":"DelegateActionInvalidNonce","subtypes":[],"props":{"ak_nonce":"","delegate_nonce":""}},"DelegateActionInvalidSignature":{"name":"DelegateActionInvalidSignature","subtypes":[],"props":{}},"DelegateActionMustBeOnlyOne":{"name":"DelegateActionMustBeOnlyOne","subtypes":[],"props":{}},"DelegateActionNonceTooLarge":{"name":"DelegateActionNonceTooLarge","subtypes":[],"props":{"delegate_nonce":"","upper_bound":""}},"DelegateActionSenderDoesNotMatchTxReceiver":{"name":"DelegateActionSenderDoesNotMatchTxReceiver","subtypes":[],"props":{"receiver_id":"","sender_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteAccountWithLargeState":{"name":"DeleteAccountWithLargeState","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"ECRecoverError":{"name":"ECRecoverError","subtypes":[],"props":{"msg":""}},"Ed25519VerifyInvalidInput":{"name":"Ed25519VerifyInvalidInput","subtypes":[],"props":{"msg":""}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated","ECRecoverError","AltBn128InvalidInput","Ed25519VerifyInvalidInput"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"IndirectCallToNull":{"name":"IndirectCallToNull","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","NonceTooLarge","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation","TransactionSizeExceeded"],"props":{}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodNotFound","MethodInvalidSignature"],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NonceTooLarge":{"name":"NonceTooLarge","subtypes":[],"props":{"tx_nonce":"","upper_bound":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory","TooManyFunctions","TooManyLocals"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TooManyFunctions":{"name":"TooManyFunctions","subtypes":[],"props":{}},"TooManyLocals":{"name":"TooManyLocals","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TransactionSizeExceeded":{"name":"TransactionSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"UnsupportedProtocolFeature":{"name":"UnsupportedProtocolFeature","subtypes":[],"props":{"protocol_feature":"","version":""}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","IndirectCallToNull","StackOverflow","GenericTrap"],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},22562:q=>{"use strict";q.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},q=>{var l;l=13912,q(q.s=l)}]); \ No newline at end of file diff --git a/main.e1ce724cb7747843.js b/main.e1ce724cb7747843.js deleted file mode 100644 index 917e2f41b..000000000 --- a/main.e1ce724cb7747843.js +++ /dev/null @@ -1,13 +0,0 @@ -(self.webpackChunkangular=self.webpackChunkangular||[]).push([[179],{40744:(ne,r,d)=>{"use strict";var l={};d.r(l),d.d(l,{identity:()=>iW});var _={};d.r(_),d.d(_,{base2:()=>oW});var E={};d.r(E),d.d(E,{base8:()=>sW});var S={};d.r(S),d.d(S,{base10:()=>aW});var a={};d.r(a),d.d(a,{base16:()=>uW,base16upper:()=>cW});var h={};d.r(h),d.d(h,{base32:()=>lW,base32hex:()=>pW,base32hexpad:()=>yW,base32hexpadupper:()=>mW,base32hexupper:()=>gW,base32pad:()=>dW,base32padupper:()=>hW,base32upper:()=>fW,base32z:()=>vW});var g={};d.r(g),d.d(g,{base36:()=>bW,base36upper:()=>wW});var y={};d.r(y),d.d(y,{base58btc:()=>EW,base58flickr:()=>AW});var v={};d.r(v),d.d(v,{base64:()=>_W,base64pad:()=>SW,base64url:()=>MW,base64urlpad:()=>IW});var b={};d.r(b),d.d(b,{base256emoji:()=>xW});var A={};d.r(A),d.d(A,{sha256:()=>QW,sha512:()=>XW});var O={};d.r(O),d.d(O,{identity:()=>eG});var C={};d.r(C),d.d(C,{code:()=>nG,decode:()=>iG,encode:()=>rG,name:()=>tG});var T={};d.r(T),d.d(T,{code:()=>uG,decode:()=>lG,encode:()=>cG,name:()=>aG});var N={};d.r(N),d.d(N,{identity:()=>jG});var M={};d.r(M),d.d(M,{base2:()=>FG});var P={};d.r(P),d.d(P,{base8:()=>UG});var R={};d.r(R),d.d(R,{base10:()=>KG});var L={};d.r(L),d.d(L,{base16:()=>zG,base16upper:()=>VG});var H={};d.r(H),d.d(H,{base32:()=>HG,base32hex:()=>JG,base32hexpad:()=>$G,base32hexpadupper:()=>QG,base32hexupper:()=>YG,base32pad:()=>GG,base32padupper:()=>ZG,base32upper:()=>WG,base32z:()=>XG});var V={};d.r(V),d.d(V,{base36:()=>qG,base36upper:()=>eZ});var J={};d.r(J),d.d(J,{base58btc:()=>tZ,base58flickr:()=>nZ});var Y={};d.r(Y),d.d(Y,{base64:()=>rZ,base64pad:()=>iZ,base64url:()=>oZ,base64urlpad:()=>sZ});var Z={};d.r(Z),d.d(Z,{base256emoji:()=>fZ});var W={};d.r(W),d.d(W,{sha256:()=>xZ,sha512:()=>PZ});var Q={};d.r(Q),d.d(Q,{identity:()=>RZ});var D={};d.r(D),d.d(D,{code:()=>LZ,decode:()=>jZ,encode:()=>BZ,name:()=>kZ});var o={};d.r(o),d.d(o,{code:()=>zZ,decode:()=>HZ,encode:()=>VZ,name:()=>KZ});var u={};d.r(u),d.d(u,{identity:()=>s$});var m={};d.r(m),d.d(m,{base2:()=>a$});var w={};d.r(w),d.d(w,{base8:()=>u$});var x={};d.r(x),d.d(x,{base10:()=>c$});var F={};d.r(F),d.d(F,{base16:()=>l$,base16upper:()=>f$});var G={};d.r(G),d.d(G,{base32:()=>d$,base32hex:()=>y$,base32hexpad:()=>v$,base32hexpadupper:()=>b$,base32hexupper:()=>m$,base32pad:()=>p$,base32padupper:()=>g$,base32upper:()=>h$,base32z:()=>w$});var k={};d.r(k),d.d(k,{base36:()=>E$,base36upper:()=>A$});var p={};d.r(p),d.d(p,{base58btc:()=>_$,base58flickr:()=>S$});var B={};d.r(B),d.d(B,{base64:()=>M$,base64pad:()=>I$,base64url:()=>D$,base64urlpad:()=>C$});var ie={};d.r(ie),d.d(ie,{base256emoji:()=>N$});var te={};d.r(te),d.d(te,{sha256:()=>q$,sha512:()=>eQ});var ee={};d.r(ee),d.d(ee,{identity:()=>nQ});var ue={};d.r(ue),d.d(ue,{code:()=>iQ,decode:()=>sQ,encode:()=>oQ,name:()=>rQ});var we={};function me(t){return"function"==typeof t}function ve(t){const n=t(s=>{Error.call(s),s.stack=(new Error).stack});return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}d.r(we),d.d(we,{code:()=>lQ,decode:()=>dQ,encode:()=>fQ,name:()=>cQ});const ce=ve(t=>function(n){t(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((s,f)=>`${f+1}) ${s.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n});function he(t,e){if(t){const n=t.indexOf(e);0<=n&&t.splice(n,1)}}class le{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;const{_parentage:n}=this;if(n)if(this._parentage=null,Array.isArray(n))for(const I of n)I.remove(this);else n.remove(this);const{initialTeardown:s}=this;if(me(s))try{s()}catch(I){e=I instanceof ce?I.errors:[I]}const{_finalizers:f}=this;if(f){this._finalizers=null;for(const I of f)try{ye(I)}catch(j){e=e??[],j instanceof ce?e=[...e,...j.errors]:e.push(j)}}if(e)throw new ce(e)}}add(e){var n;if(e&&e!==this)if(this.closed)ye(e);else{if(e instanceof le){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}}_hasParent(e){const{_parentage:n}=this;return n===e||Array.isArray(n)&&n.includes(e)}_addParent(e){const{_parentage:n}=this;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e}_removeParent(e){const{_parentage:n}=this;n===e?this._parentage=null:Array.isArray(n)&&he(n,e)}remove(e){const{_finalizers:n}=this;n&&he(n,e),e instanceof le&&e._removeParent(this)}}le.EMPTY=(()=>{const t=new le;return t.closed=!0,t})();const de=le.EMPTY;function ae(t){return t instanceof le||t&&"closed"in t&&me(t.remove)&&me(t.add)&&me(t.unsubscribe)}function ye(t){me(t)?t():t.unsubscribe()}const Ce={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Pe={setTimeout(t,e,...n){const{delegate:s}=Pe;return s?.setTimeout?s.setTimeout(t,e,...n):setTimeout(t,e,...n)},clearTimeout(t){const{delegate:e}=Pe;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Ge(t){Pe.setTimeout(()=>{const{onUnhandledError:e}=Ce;if(!e)throw t;e(t)})}function Ve(){}const Ue=$e("C",void 0,void 0);function $e(t,e,n){return{kind:t,value:e,error:n}}let Pt=null;function nt(t){if(Ce.useDeprecatedSynchronousErrorHandling){const e=!Pt;if(e&&(Pt={errorThrown:!1,error:null}),t(),e){const{errorThrown:n,error:s}=Pt;if(Pt=null,n)throw s}}else t()}class Lt extends le{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,ae(e)&&e.add(this)):this.destination=at}static create(e,n,s){return new je(e,n,s)}next(e){this.isStopped?Je(function Ze(t){return $e("N",t,void 0)}(e),this):this._next(e)}error(e){this.isStopped?Je(function _t(t){return $e("E",void 0,t)}(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?Je(Ue,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Re=Function.prototype.bind;function Ae(t,e){return Re.call(t,e)}class xe{constructor(e){this.partialObserver=e}next(e){const{partialObserver:n}=this;if(n.next)try{n.next(e)}catch(s){He(s)}}error(e){const{partialObserver:n}=this;if(n.error)try{n.error(e)}catch(s){He(s)}else He(e)}complete(){const{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(n){He(n)}}}class je extends Lt{constructor(e,n,s){let f;if(super(),me(e)||!e)f={next:e??void 0,error:n??void 0,complete:s??void 0};else{let I;this&&Ce.useDeprecatedNextContext?(I=Object.create(e),I.unsubscribe=()=>this.unsubscribe(),f={next:e.next&&Ae(e.next,I),error:e.error&&Ae(e.error,I),complete:e.complete&&Ae(e.complete,I)}):f=e}this.destination=new xe(f)}}function He(t){Ce.useDeprecatedSynchronousErrorHandling?function rt(t){Ce.useDeprecatedSynchronousErrorHandling&&Pt&&(Pt.errorThrown=!0,Pt.error=t)}(t):Ge(t)}function Je(t,e){const{onStoppedNotification:n}=Ce;n&&Pe.setTimeout(()=>n(t,e))}const at={closed:!0,next:Ve,error:function lt(t){throw t},complete:Ve},fn="function"==typeof Symbol&&Symbol.observable||"@@observable";function ct(t){return t}function yn(t){return 0===t.length?ct:1===t.length?t[0]:function(n){return t.reduce((s,f)=>f(s),n)}}class ht{constructor(e){e&&(this._subscribe=e)}lift(e){const n=new ht;return n.source=this,n.operator=e,n}subscribe(e,n,s){const f=function Dt(t){return t&&t instanceof Lt||function or(t){return t&&me(t.next)&&me(t.error)&&me(t.complete)}(t)&&ae(t)}(e)?e:new je(e,n,s);return nt(()=>{const{operator:I,source:j}=this;f.add(I?I.call(f,j):j?this._subscribe(f):this._trySubscribe(f))}),f}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return new(n=It(n))((s,f)=>{const I=new je({next:j=>{try{e(j)}catch(q){f(q),I.unsubscribe()}},error:f,complete:s});this.subscribe(I)})}_subscribe(e){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(e)}[fn](){return this}pipe(...e){return yn(e)(this)}toPromise(e){return new(e=It(e))((n,s)=>{let f;this.subscribe(I=>f=I,I=>s(I),()=>n(f))})}}function It(t){var e;return null!==(e=t??Ce.Promise)&&void 0!==e?e:Promise}ht.create=t=>new ht(t);const Mt=ve(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});class In extends ht{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){const n=new yt(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new Mt}next(e){nt(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(e)}})}error(e){nt(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;const{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){nt(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){const{hasError:n,isStopped:s,observers:f}=this;return n||s?de:(this.currentObservers=null,f.push(e),new le(()=>{this.currentObservers=null,he(f,e)}))}_checkFinalizedStatuses(e){const{hasError:n,thrownError:s,isStopped:f}=this;n?e.error(s):f&&e.complete()}asObservable(){const e=new ht;return e.source=this,e}}In.create=(t,e)=>new yt(t,e);class yt extends In{constructor(e,n){super(),this.destination=e,this.source=n}next(e){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===s||s.call(n,e)}error(e){var n,s;null===(s=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===s||s.call(n,e)}complete(){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===n||n.call(e)}_subscribe(e){var n,s;return null!==(s=null===(n=this.source)||void 0===n?void 0:n.subscribe(e))&&void 0!==s?s:de}}function Pn(t){return e=>{if(function wt(t){return me(t?.lift)}(e))return e.lift(function(n){try{return t(n,this)}catch(s){this.error(s)}});throw new TypeError("Unable to lift unknown Observable type")}}function vt(t,e,n,s,f){return new St(t,e,n,s,f)}class St extends Lt{constructor(e,n,s,f,I,j){super(e),this.onFinalize=I,this.shouldUnsubscribe=j,this._next=n?function(q){try{n(q)}catch(re){e.error(re)}}:super._next,this._error=f?function(q){try{f(q)}catch(re){e.error(re)}finally{this.unsubscribe()}}:super._error,this._complete=s?function(){try{s()}catch(q){e.error(q)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:n}=this;super.unsubscribe(),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}}}function Fn(t,e){return Pn((n,s)=>{let f=0;n.subscribe(vt(s,I=>{s.next(t.call(e,I,f++))}))})}function Ft(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})}Object.create;function Qt(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],s=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ln(t){return this instanceof ln?(this.v=t,this):new ln(t)}function Xt(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var f,s=n.apply(t,e||[]),I=[];return f={},j("next"),j("throw"),j("return"),f[Symbol.asyncIterator]=function(){return this},f;function j(_e){s[_e]&&(f[_e]=function(Oe){return new Promise(function(Te,Be){I.push([_e,Oe,Te,Be])>1||q(_e,Oe)})})}function q(_e,Oe){try{!function re(_e){_e.value instanceof ln?Promise.resolve(_e.value.v).then(se,fe):be(I[0][2],_e)}(s[_e](Oe))}catch(Te){be(I[0][3],Te)}}function se(_e){q("next",_e)}function fe(_e){q("throw",_e)}function be(_e,Oe){_e(Oe),I.shift(),I.length&&q(I[0][0],I[0][1])}}function on(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,e=t[Symbol.asyncIterator];return e?e.call(t):(t=Qt(t),n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n);function s(I){n[I]=t[I]&&function(j){return new Promise(function(q,re){(function f(I,j,q,re){Promise.resolve(re).then(function(se){I({value:se,done:q})},j)})(q,re,(j=t[I](j)).done,j.value)})}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;const Un=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function Bn(t){return me(t?.then)}function Vn(t){return me(t[fn])}function st(t){return Symbol.asyncIterator&&me(t?.[Symbol.asyncIterator])}function Jn(t){return new TypeError(`You provided ${null!==t&&"object"==typeof t?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const Yn=function ur(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function Gn(t){return me(t?.[Yn])}function $n(t){return Xt(this,arguments,function*(){const n=t.getReader();try{for(;;){const{value:s,done:f}=yield ln(n.read());if(f)return yield ln(void 0);yield yield ln(s)}}finally{n.releaseLock()}})}function er(t){return me(t?.getReader)}function wr(t){if(t instanceof ht)return t;if(null!=t){if(Vn(t))return function dr(t){return new ht(e=>{const n=t[fn]();if(me(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(t);if(Un(t))return function Rn(t){return new ht(e=>{for(let n=0;n{t.then(n=>{e.closed||(e.next(n),e.complete())},n=>e.error(n)).then(null,Ge)})}(t);if(st(t))return jr(t);if(Gn(t))return function _r(t){return new ht(e=>{for(const n of t)if(e.next(n),e.closed)return;e.complete()})}(t);if(er(t))return function Wr(t){return jr($n(t))}(t)}throw Jn(t)}function jr(t){return new ht(e=>{(function bi(t,e){var n,s,f,I;return Ft(this,void 0,void 0,function*(){try{for(n=on(t);!(s=yield n.next()).done;){const j=s.value;if(e.next(j),e.closed)return}}catch(j){f={error:j}}finally{try{s&&!s.done&&(I=n.return)&&(yield I.call(n))}finally{if(f)throw f.error}}e.complete()})})(t,e).catch(n=>e.error(n))})}function Dr(t,e,n,s=0,f=!1){const I=e.schedule(function(){n(),f?t.add(this.schedule(null,s)):this.unsubscribe()},s);if(t.add(I),!f)return I}function go(t,e,n=1/0){return me(e)?go((s,f)=>Fn((I,j)=>e(s,I,f,j))(wr(t(s,f))),n):("number"==typeof e&&(n=e),Pn((s,f)=>function ea(t,e,n,s,f,I,j,q){const re=[];let se=0,fe=0,be=!1;const _e=()=>{be&&!re.length&&!se&&e.complete()},Oe=Be=>se{I&&e.next(Be),se++;let Fe=!1;wr(n(Be,fe++)).subscribe(vt(e,Ke=>{f?.(Ke),I?Oe(Ke):e.next(Ke)},()=>{Fe=!0},void 0,()=>{if(Fe)try{for(se--;re.length&&seTe(Ke)):Te(Ke)}_e()}catch(Ke){e.error(Ke)}}))};return t.subscribe(vt(e,Oe,()=>{be=!0,_e()})),()=>{q?.()}}(s,f,t,n)))}const us=new ht(t=>t.complete());function cs(t){return t[t.length-1]}function Il(t){return function Ma(t){return t&&me(t.schedule)}(cs(t))?t.pop():void 0}function ru(t,e=0){return Pn((n,s)=>{n.subscribe(vt(s,f=>Dr(s,t,()=>s.next(f),e),()=>Dr(s,t,()=>s.complete(),e),f=>Dr(s,t,()=>s.error(f),e)))})}function Dl(t,e=0){return Pn((n,s)=>{s.add(t.schedule(()=>n.subscribe(s),e))})}function mt(t,e){if(!t)throw new Error("Iterable cannot be null");return new ht(n=>{Dr(n,e,()=>{const s=t[Symbol.asyncIterator]();Dr(n,e,()=>{s.next().then(f=>{f.done?n.complete():n.next(f.value)})},0,!0)})})}function _n(t,e){if(null!=t){if(Vn(t))return function Cl(t,e){return wr(t).pipe(Dl(e),ru(e))}(t,e);if(Un(t))return function Hp(t,e){return new ht(n=>{let s=0;return e.schedule(function(){s===t.length?n.complete():(n.next(t[s++]),n.closed||this.schedule())})})}(t,e);if(Bn(t))return function gh(t,e){return wr(t).pipe(Dl(e),ru(e))}(t,e);if(st(t))return mt(t,e);if(Gn(t))return function tt(t,e){return new ht(n=>{let s;return Dr(n,e,()=>{s=t[Yn](),Dr(n,e,()=>{let f,I;try{({value:f,done:I}=s.next())}catch(j){return void n.error(j)}I?n.complete():n.next(f)},0,!0)}),()=>me(s?.return)&&s.return()})}(t,e);if(er(t))return function $t(t,e){return mt($n(t),e)}(t,e)}throw Jn(t)}function Gr(t,e){return e?_n(t,e):wr(t)}function cr(...t){const e=Il(t),n=function nu(t,e){return"number"==typeof cs(t)?t.pop():e}(t,1/0),s=t;return s.length?1===s.length?wr(s[0]):function as(t=1/0){return go(ct,t)}(n)(Gr(s,e)):us}function ri(t,e,...n){if(!0===e)return void t();if(!1===e)return;const s=new je({next:()=>{s.unsubscribe(),t()}});return wr(e(...n)).subscribe(s)}function Qn(t){for(let e in t)if(t[e]===Qn)return e;throw Error("Could not find renamed property on target object.")}function Zr(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function Xn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(Xn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function so(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const Di=Qn({__forward_ref__:Qn});function vr(t){return t.__forward_ref__=vr,t.toString=function(){return Xn(this())},t}function Tn(t){return Do(t)?t():t}function Do(t){return"function"==typeof t&&t.hasOwnProperty(Di)&&t.__forward_ref__===vr}function Vo(t){return t&&!!t.\u0275providers}const Rs="https://g.co/ng/security#xss";class hn extends Error{constructor(e,n){super(wi(e,n)),this.code=e}}function wi(t,e){return`NG0${Math.abs(t)}${e?": "+e.trim():""}`}function sr(t){return"string"==typeof t?t:null==t?"":String(t)}function kr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():sr(t)}function Bf(t,e){throw new hn(-201,!1)}function Vu(t,e,n){t!=e&&Lr(n,t,e,"==")}function ks(t,e){null==t&&Lr(e,t,null,"!=")}function Lr(t,e,n,s){throw new Error(`ASSERTION ERROR: ${t}`+(null==s?"":` [Expected=> ${n} ${s} ${e} <=Actual]`))}function tr(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Ls(t){return{providers:t.providers||[],imports:t.imports||[]}}function vh(t){return nv(t,Tl)||nv(t,iv)}function nv(t,e){return t.hasOwnProperty(e)?t[e]:null}function rv(t){return t&&(t.hasOwnProperty(wc)||t.hasOwnProperty(ov))?t[wc]:null}const Tl=Qn({\u0275prov:Qn}),wc=Qn({\u0275inj:Qn}),iv=Qn({ngInjectableDef:Qn}),ov=Qn({ngInjectorDef:Qn});var Mr,t;let bh;function fs(t){const e=bh;return bh=t,e}function Ec(t,e,n){const s=vh(t);return s&&"root"==s.providedIn?void 0===s.value?s.value=s.factory():s.value:n&Mr.Optional?null:void 0!==e?e:void Bf(Xn(t))}(t=Mr||(Mr={}))[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional";const ii=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)();const Bs={},Ac="__NG_DI_FLAG__",wh="ngTempTokenPath",Eh="ngTokenPath",Aw=/\n/gm,av="\u0275",Ah="__source";let _c;function Sc(t){const e=_c;return _c=t,e}function uv(t,e=Mr.Default){if(void 0===_c)throw new hn(-203,!1);return null===_c?Ec(t,void 0,e):_c.get(t,e&Mr.Optional?null:void 0,e)}function Hn(t,e=Mr.Default){return(function sv(){return bh}()||uv)(Tn(t),e)}function cv(t){throw new hn(202,!1)}function Ki(t,e=Mr.Default){return Hn(t,_h(e))}function _h(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Gp(t){const e=[];for(let n=0;n ");else if("object"==typeof e){let I=[];for(let j in e)if(e.hasOwnProperty(j)){let q=e[j];I.push(j+":"+("string"==typeof q?JSON.stringify(q):Xn(q)))}f=`{${I.join(", ")}}`}return`${n}${s?"("+s+")":""}[${f}]: ${t.replace(Aw,"\n ")}`}("\n"+t.message,f,n,s),t[Eh]=f,t[wh]=null,t}function Ia(t){return{toString:t}.toString()}var Mc,Da;!function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"}(Mc||(Mc={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Da||(Da={}));const na={},Fr=[],Sh=Qn({\u0275cmp:Qn}),Hu=Qn({\u0275dir:Qn}),Uf=Qn({\u0275pipe:Qn}),Ol=Qn({\u0275mod:Qn}),ra=Qn({\u0275fac:Qn}),xl=Qn({__NG_ELEMENT_ID__:Qn});let Mh=0;function Ho(t){return Ia(()=>{const e=hv(t),n={...e,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Mc.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||Da.Emulated,id:"c"+Mh++,styles:t.styles||Fr,_:null,schemas:t.schemas||null,tView:null};Pl(n);const s=t.dependencies;return n.directiveDefs=Dh(s,!1),n.pipeDefs=Dh(s,!0),n})}function Zp(t,e,n){const s=t.\u0275cmp;s.directiveDefs=Dh(e,!1),s.pipeDefs=Dh(n,!0)}function fv(t){return Ur(t)||yi(t)}function Ih(t){return null!==t}function js(t){return Ia(()=>({type:t.type,bootstrap:t.bootstrap||Fr,declarations:t.declarations||Fr,imports:t.imports||Fr,exports:t.exports||Fr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function dv(t,e){return Ia(()=>{const n=ds(t,!0);n.declarations=e.declarations||Fr,n.imports=e.imports||Fr,n.exports=e.exports||Fr})}function Jp(t,e){if(null==t)return na;const n={};for(const s in t)if(t.hasOwnProperty(s)){let f=t[s],I=f;Array.isArray(f)&&(I=f[1],f=f[0]),n[f]=s,e&&(e[f]=I)}return n}function nr(t){return Ia(()=>{const e=hv(t);return Pl(e),e})}function Co(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Ur(t){return t[Sh]||null}function yi(t){return t[Hu]||null}function yo(t){return t[Uf]||null}function Ic(t){const e=Ur(t)||yi(t)||yo(t);return null!==e&&e.standalone}function ds(t,e){const n=t[Ol]||null;if(!n&&!0===e)throw new Error(`Type ${Xn(t)} does not have '\u0275mod' property.`);return n}function hv(t){const e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||Fr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Jp(t.inputs,e),outputs:Jp(t.outputs)}}function Pl(t){t.features?.forEach(e=>e(t))}function Dh(t,e){if(!t)return null;const n=e?yo:fv;return()=>("function"==typeof t?t():t).map(s=>n(s)).filter(Ih)}const Ca=0,Sn=1,Nn=2,li=3,Wo=4,ia=5,ao=6,Wu=7,oi=8,Dc=9,iu=10,yr=11,Yp=12,Kf=13,$p=14,ou=15,zi=16,Cc=17,Gu=18,Fs=19,Tc=20,pv=21,ei=22,Qp=1,Ch=2,oa=7,zf=8,sa=9,fi=10;function Ci(t){return Array.isArray(t)&&"object"==typeof t[Qp]}function hs(t){return Array.isArray(t)&&!0===t[Qp]}function Xp(t){return 0!=(4&t.flags)}function Vf(t){return t.componentOffset>-1}function Ta(t){return 1==(1&t.flags)}function To(t){return!!t.template}function Nl(t){return 0!=(256&t[Nn])}function Ju(t,e){return t.hasOwnProperty(ra)?t[ra]:null}class Mw{constructor(e,n,s){this.previousValue=e,this.currentValue=n,this.firstChange=s}isFirstChange(){return this.firstChange}}function uo(){return Pc}function Pc(t){return t.type.prototype.ngOnChanges&&(t.setInput=Oh),Ll}function Ll(){const t=ys(this),e=t?.current;if(e){const n=t.previous;if(n===na)t.previous=e;else for(let s in e)n[s]=e[s];t.current=null,this.ngOnChanges(e)}}function Oh(t,e,n,s){const f=this.declaredInputs[n],I=ys(t)||function Us(t,e){return t[Gf]=e}(t,{previous:na,current:null}),j=I.current||(I.current={}),q=I.previous,re=q[f];j[f]=new Mw(re&&re.currentValue,e,q===na),t[s]=e}uo.ngInherit=!0;const Gf="__ngSimpleChanges__";function ys(t){return t[Gf]||null}let su=null;const ki=function(t,e,n){su?.(t,e,n)},Yu="svg",ig="math";function Vi(t){for(;Array.isArray(t);)t=t[Ca];return t}function mo(t,e){return Vi(e[t])}function ai(t,e){return Vi(e[t.index])}function Ks(t,e){return t.data[e]}function Nc(t,e){return t[e]}function xo(t,e){const n=e[t];return Ci(n)?n:n[Ca]}function Bl(t){return 64==(64&t[Nn])}function aa(t,e){return null==e?null:t[e]}function ag(t){t[Gu]=0}function $u(t,e){t[ia]+=e;let n=t,s=t[li];for(;null!==s&&(1===e&&1===n[ia]||-1===e&&0===n[ia]);)s[ia]+=e,n=s,s=s[li]}const rr={lFrame:ca(null),bindingsEnabled:!0};function Nh(){return rr.bindingsEnabled}function ug(){rr.bindingsEnabled=!0}function cg(){rr.bindingsEnabled=!1}function nn(){return rr.lFrame.lView}function Er(){return rr.lFrame.tView}function Li(t){return rr.lFrame.contextLView=t,t[oi]}function Po(t){return rr.lFrame.contextLView=null,t}function Hi(){let t=lg();for(;null!==t&&64===t.type;)t=t.parent;return t}function lg(){return rr.lFrame.currentTNode}function ms(){const t=rr.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function co(t,e){const n=rr.lFrame;n.currentTNode=t,n.isParent=e}function Zf(){return rr.lFrame.isParent}function Rh(){rr.lFrame.isParent=!1}function vo(){const t=rr.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function zs(){return rr.lFrame.bindingIndex}function fg(t){return rr.lFrame.bindingIndex=t}function kc(){return rr.lFrame.bindingIndex++}function ua(t){const e=rr.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function dg(t){rr.lFrame.inI18n=t}function vv(t,e){const n=rr.lFrame;n.bindingIndex=n.bindingRootIndex=t,Yf(e)}function Yf(t){rr.lFrame.currentDirectiveIndex=t}function Lc(t){const e=rr.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function $f(){return rr.lFrame.currentQueryIndex}function Lh(t){rr.lFrame.currentQueryIndex=t}function wv(t){const e=t[Sn];return 2===e.type?e.declTNode:1===e.type?t[ao]:null}function Bc(t,e,n){if(n&Mr.SkipSelf){let f=e,I=t;for(;(f=f.parent,null===f&&!(n&Mr.Host))&&(f=wv(I),!(null===f||(I=I[ou],10&f.type))););if(null===f)return!1;e=f,t=I}const s=rr.lFrame=Fl();return s.currentTNode=e,s.lView=t,!0}function Bh(t){const e=Fl(),n=t[Sn];rr.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function Fl(){const t=rr.lFrame,e=null===t?null:t.child;return null===e?ca(t):e}function ca(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Ul(){const t=rr.lFrame;return rr.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Kl=Ul;function cu(){const t=Ul();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function hg(t){return(rr.lFrame.contextLView=function zl(t,e){for(;t>0;)e=e[ou],t--;return e}(t,rr.lFrame.contextLView))[oi]}function bo(){return rr.lFrame.selectedIndex}function lu(t){rr.lFrame.selectedIndex=t}function ir(){const t=rr.lFrame;return Ks(t.tView,t.selectedIndex)}function jh(){rr.lFrame.currentNamespace=Yu}function pg(){rr.lFrame.currentNamespace=ig}function gg(){!function Fh(){rr.lFrame.currentNamespace=null}()}function ti(t,e){for(let n=e.directiveStart,s=e.directiveEnd;n=s)break}else e[re]<0&&(t[Gu]+=65536),(q>11>16&&(3&t[Nn])===e){t[Nn]+=2048,ki(4,q,I);try{I.call(q)}finally{ki(5,q,I)}}}else{ki(4,q,I);try{I.call(q)}finally{ki(5,q,I)}}}const Wl=-1;class Bi{constructor(e,n,s){this.factory=e,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=s}}function Uh(t,e,n){let s=0;for(;se){j=I-1;break}}}for(;I>16}(t),s=e;for(;n>0;)s=s[ou],n--;return s}let Kh=!0;function Fc(t){const e=Kh;return Kh=t,e}const _g=255,zh=5;let Mv=0;const la={};function td(t,e){const n=Sg(t,e);if(-1!==n)return n;const s=e[Sn];s.firstCreatePass&&(t.injectorIndex=e.length,nd(s.data,t),nd(e,null),nd(s.blueprint,null));const f=Vh(t,e),I=t.injectorIndex;if(Eg(f)){const j=ed(f),q=Qu(f,e),re=q[Sn].data;for(let se=0;se<8;se++)e[I+se]=q[j+se]|re[j+se]}return e[I+8]=f,I}function nd(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Sg(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function Vh(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,s=null,f=e;for(;null!==f;){if(s=Tg(f),null===s)return Wl;if(n++,f=f[ou],-1!==s.injectorIndex)return s.injectorIndex|n<<16}return Wl}function Hh(t,e,n){!function Iv(t,e,n){let s;"string"==typeof n?s=n.charCodeAt(0)||0:n.hasOwnProperty(xl)&&(s=n[xl]),null==s&&(s=n[xl]=Mv++);const f=s&_g,I=1<>zh)]|=I}(t,e,n)}function Mg(t,e,n){if(n&Mr.Optional||void 0!==t)return t;Bf()}function Dv(t,e,n,s){if(n&Mr.Optional&&void 0===s&&(s=null),!(n&(Mr.Self|Mr.Host))){const f=t[Dc],I=fs(void 0);try{return f?f.get(e,s,n&Mr.Optional):Ec(e,s,n&Mr.Optional)}finally{fs(I)}}return Mg(s,0,n)}function Cv(t,e,n,s=Mr.Default,f){if(null!==t){if(1024&e[Nn]){const j=function Pv(t,e,n,s,f){let I=t,j=e;for(;null!==I&&null!==j&&1024&j[Nn]&&!(256&j[Nn]);){const q=Ig(I,j,n,s|Mr.Self,la);if(q!==la)return q;let re=I.parent;if(!re){const se=j[pv];if(se){const fe=se.get(n,la,s);if(fe!==la)return fe}re=Tg(j),j=j[ou]}I=re}return f}(t,e,n,s,la);if(j!==la)return j}const I=Ig(t,e,n,s,la);if(I!==la)return I}return Dv(e,n,s,f)}function Ig(t,e,n,s,f){const I=function Dw(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(xl)?t[xl]:void 0;return"number"==typeof e?e>=0?e&_g:Dg:e}(n);if("function"==typeof I){if(!Bc(e,t,s))return s&Mr.Host?Mg(f,0,s):Dv(e,n,s,f);try{const j=I(s);if(null!=j||s&Mr.Optional)return j;Bf()}finally{Kl()}}else if("number"==typeof I){let j=null,q=Sg(t,e),re=Wl,se=s&Mr.Host?e[zi][ao]:null;for((-1===q||s&Mr.SkipSelf)&&(re=-1===q?Vh(t,e):e[q+8],re!==Wl&&xv(s,!1)?(j=e[Sn],q=ed(re),e=Qu(re,e)):q=-1);-1!==q;){const fe=e[Sn];if(Ov(I,q,fe.data)){const be=Tv(q,e,n,j,s,se);if(be!==la)return be}re=e[q+8],re!==Wl&&xv(s,e[Sn].data[q+8]===se)&&Ov(I,q,e)?(j=fe,q=ed(re),e=Qu(re,e)):q=-1}}return f}function Tv(t,e,n,s,f,I){const j=e[Sn],q=j.data[t+8],fe=rd(q,j,n,null==s?Vf(q)&&Kh:s!=j&&0!=(3&q.type),f&Mr.Host&&I===q);return null!==fe?xa(e,j,fe,q):la}function rd(t,e,n,s,f){const I=t.providerIndexes,j=e.data,q=1048575&I,re=t.directiveStart,se=t.directiveEnd,fe=I>>20,_e=f?q+fe:se;for(let Oe=s?q:q+fe;Oe<_e;Oe++){const Te=j[Oe];if(Oe=re&&Te.type===n)return Oe}if(f){const Oe=j[re];if(Oe&&To(Oe)&&Oe.type===n)return re}return null}function xa(t,e,n,s){let f=t[n];const I=e.data;if(function mg(t){return t instanceof Bi}(f)){const j=f;j.resolving&&function Wp(t,e){const n=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new hn(-200,`Circular dependency in DI detected for ${t}${n}`)}(kr(I[n]));const q=Fc(j.canSeeViewProviders);j.resolving=!0;const re=j.injectImpl?fs(j.injectImpl):null;Bc(t,s,Mr.Default);try{f=t[n]=j.factory(void 0,I,t,s),e.firstCreatePass&&n>=s.directiveStart&&function jc(t,e,n){const{ngOnChanges:s,ngOnInit:f,ngDoCheck:I}=e.type.prototype;if(s){const j=Pc(e);(n.preOrderHooks??(n.preOrderHooks=[])).push(t,j),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,j)}f&&(n.preOrderHooks??(n.preOrderHooks=[])).push(0-t,f),I&&((n.preOrderHooks??(n.preOrderHooks=[])).push(t,I),(n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(t,I))}(n,I[n],e)}finally{null!==re&&fs(re),Fc(q),j.resolving=!1,Kl()}}return f}function Ov(t,e,n){const s=1<>zh)]&s)}function xv(t,e){return!(t&Mr.Self||t&Mr.Host&&e)}class fa{constructor(e,n){this._tNode=e,this._lView=n}get(e,n,s){return Cv(this._tNode,this._lView,e,_h(s),n)}}function Dg(){return new fa(Hi(),nn())}function Wi(t){return Ia(()=>{const e=t.prototype.constructor,n=e[ra]||Cg(e),s=Object.prototype;let f=Object.getPrototypeOf(t.prototype).constructor;for(;f&&f!==s;){const I=f[ra]||Cg(f);if(I&&I!==n)return I;f=Object.getPrototypeOf(f)}return I=>new I})}function Cg(t){return Do(t)?()=>{const e=Cg(Tn(t));return e&&e()}:Ju(t)}function Tg(t){const e=t[Sn],n=e.type;return 2===n?e.declTNode:1===n?t[ao]:null}function Wh(t){return function Iw(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const n=t.attrs;if(n){const s=n.length;let f=0;for(;f{const I=lo(e);function j(...q){if(this instanceof j)return I.call(this,...q),this;const re=new j(...q);return function(fe){return f&&f(fe,...q),(fe.hasOwnProperty(Uc)?fe[Uc]:Object.defineProperty(fe,Uc,{value:[]})[Uc]).push(re),s&&s(fe),fe}}return n&&(j.prototype=Object.create(n.prototype)),j.prototype.ngMetadataName=t,j.annotationCls=j,j})}function lo(t){return function(...n){if(t){const s=t(...n);for(const f in s)this[f]=s[f]}}}function zc(t,e,n){return Ia(()=>{const s=lo(e);function f(...I){if(this instanceof f)return s.apply(this,I),this;const j=new f(...I);return q.annotation=j,q;function q(re,se,fe){const be=re.hasOwnProperty(Kc)?re[Kc]:Object.defineProperty(re,Kc,{value:[]})[Kc];for(;be.length<=fe;)be.push(null);return(be[fe]=be[fe]||[]).push(j),re}}return n&&(f.prototype=Object.create(n.prototype)),f.prototype.ngMetadataName=t,f.annotationCls=f,f})}function du(t,e,n,s){return Ia(()=>{const f=lo(e);function I(...j){if(this instanceof I)return f.apply(this,j),this;const q=new I(...j);return function re(se,fe){const be=se.constructor,_e=be.hasOwnProperty(Zl)?be[Zl]:Object.defineProperty(be,Zl,{value:{}})[Zl];_e[fe]=_e.hasOwnProperty(fe)&&_e[fe]||[],_e[fe].unshift(q),s&&s(se,fe,...j)}}return n&&(I.prototype=Object.create(n.prototype)),I.prototype.ngMetadataName=t,I.annotationCls=I,I})}const Nv=zc("Attribute",t=>({attributeName:t,__NG_ELEMENT_ID__:()=>Wh(t)}));class qn{constructor(e,n){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=tr({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}new qn("AnalyzeForEntryComponents");class id{}du("ContentChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:true,...e}),id),du("ContentChild",(t,e={})=>({selector:t,first:!0,isViewQuery:!1,descendants:!0,...e}),id),du("ViewChildren",(t,e={})=>({selector:t,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:true,...e}),id),du("ViewChild",(t,e)=>({selector:t,first:!0,isViewQuery:!0,descendants:!0,...e}),id);var hu,Og,Zh;function Ai(t){const e=ii.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}!function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule"}(hu||(hu={})),function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"}(Og||(Og={})),function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(Zh||(Zh={}));const xg=Function;function Jl(t){return"function"==typeof t}function vs(t){return t.flat(Number.POSITIVE_INFINITY)}function Pa(t,e){t.forEach(n=>Array.isArray(n)?Pa(n,e):e(n))}function Na(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Jh(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function Yl(t,e){const n=[];for(let s=0;s=0?t[1|s]=n:(s=~s,function Lv(t,e,n,s){let f=t.length;if(f==e)t.push(n,s);else if(1===f)t.push(s,t[0]),t[0]=n;else{for(f--,t.push(t[f-1],t[f]);f>e;){const I=f-2;t[f]=t[I],f--}t[e]=n,t[e+1]=s}}(t,s,e,n)),s}function Rg(t,e){const n=$l(t,e);if(n>=0)return t[1|n]}function $l(t,e){return fo(t,e,1)}function fo(t,e,n){let s=0,f=t.length>>n;for(;f!==s;){const I=s+(f-s>>1),j=t[I<e?f=I:s=I+1}return~(f<new e(...n)}_zipTypesAndAnnotations(e,n){let s;s=Yl(typeof e>"u"?n.length:e.length);for(let f=0;f"u"?s[f]=[]:e[f]&&e[f]!=Object?s[f]=[e[f]]:s[f]=[],n&&null!=n[f]&&(s[f]=s[f].concat(n[f]));return s}_ownParameters(e,n){if(function Bv(t){return Pw.test(t)||Lg.test(t)||On.test(t)&&!Ql.test(t)}(e.toString()))return null;if(e.parameters&&e.parameters!==n.parameters)return e.parameters;const f=e.ctorParameters;if(f&&f!==n.ctorParameters){const q="function"==typeof f?f():f,re=q.map(fe=>fe&&fe.type),se=q.map(fe=>fe&&Vc(fe.decorators));return this._zipTypesAndAnnotations(re,se)}const I=e.hasOwnProperty(Kc)&&e[Kc],j=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",e);return j||I?this._zipTypesAndAnnotations(j,I):Yl(e.length)}parameters(e){if(!Jl(e))return[];const n=Hc(e);let s=this._ownParameters(e,n);return!s&&n!==Object&&(s=this.parameters(n)),s||[]}_ownAnnotations(e,n){if(e.annotations&&e.annotations!==n.annotations){let s=e.annotations;return"function"==typeof s&&s.annotations&&(s=s.annotations),s}return e.decorators&&e.decorators!==n.decorators?Vc(e.decorators):e.hasOwnProperty(Uc)?e[Uc]:null}annotations(e){if(!Jl(e))return[];const n=Hc(e),s=this._ownAnnotations(e,n)||[];return(n!==Object?this.annotations(n):[]).concat(s)}_ownPropMetadata(e,n){if(e.propMetadata&&e.propMetadata!==n.propMetadata){let s=e.propMetadata;return"function"==typeof s&&s.propMetadata&&(s=s.propMetadata),s}if(e.propDecorators&&e.propDecorators!==n.propDecorators){const s=e.propDecorators,f={};return Object.keys(s).forEach(I=>{f[I]=Vc(s[I])}),f}return e.hasOwnProperty(Zl)?e[Zl]:null}propMetadata(e){if(!Jl(e))return{};const n=Hc(e),s={};if(n!==Object){const I=this.propMetadata(n);Object.keys(I).forEach(j=>{s[j]=I[j]})}const f=this._ownPropMetadata(e,n);return f&&Object.keys(f).forEach(I=>{const j=[];s.hasOwnProperty(I)&&j.push(...s[I]),j.push(...f[I]),s[I]=j}),s}ownPropMetadata(e){return Jl(e)&&this._ownPropMetadata(e,Hc(e))||{}}hasLifecycleHook(e,n){return e instanceof xg&&n in e.prototype}}function Vc(t){return t?t.map(e=>new(0,e.type.annotationCls)(...e.args?e.args:[])):[]}function Hc(t){const e=t.prototype?Object.getPrototypeOf(t.prototype):null;return(e?e.constructor:null)||Object}const od=jf(zc("Inject",t=>({token:t})),-1),Xl=jf(zc("Optional"),8),$h=jf(zc("Self"),2),ql=jf(zc("SkipSelf"),4),Bg=jf(zc("Host"),1);let Qh=null;function Oi(){return Qh=Qh||new Nw}function Go(t){return pu(Oi().parameters(t))}function pu(t){return t.map(e=>function jv(t){const e={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(t)&&t.length>0)for(let n=0;n|^->||--!>|)/,r0="\u200b$1\u200b";function Eo(t){return t.replace(Ug,e=>e.replace(n0,r0))}const La=new Map;let da=0;const yu="__ngContext__";function to(t,e){Ci(e)?(t[yu]=e[Tc],function Vv(t){La.set(t[Tc],t)}(e)):t[yu]=e}let qu;function a0(t,e){return qu(t,e)}function fd(t){const e=t[li];return hs(e)?e[li]:e}function Gg(t){return Zg(t[Kf])}function u0(t){return Zg(t[Wo])}function Zg(t){for(;null!==t&&!hs(t);)t=t[Wo];return t}function of(t,e,n,s,f){if(null!=s){let I,j=!1;hs(s)?I=s:Ci(s)&&(j=!0,s=s[Ca]);const q=Vi(s);0===t&&null!==n?null==f?qg(e,n,q):Jc(e,n,q,f||null,!0):1===t&&null!==n?Jc(e,n,q,f||null,!0):2===t?pe(e,q,j):3===t&&e.destroyNode(q),null!=I&&function ft(t,e,n,s,f){const I=n[oa],j=Vi(n);I!==j&&of(e,t,s,I,f);for(let q=fi;q0&&(n[f-1][Wo]=e),s0&&(t[n-1][Wo]=s[Wo]);const I=Jh(t,fi+e);!function l0(t,e){ke(t,e,e[yr],2,null,null),e[Ca]=null,e[ao]=null}(s[Sn],s);const j=I[Fs];null!==j&&j.detachView(I[Sn]),s[li]=null,s[Wo]=null,s[Nn]&=-65}return s}function Qg(t,e){if(!(128&e[Nn])){const n=e[yr];n.destroyNode&&ke(t,e,n,3,null,null),function Jg(t){let e=t[Kf];if(!e)return h0(t[Sn],t);for(;e;){let n=null;if(Ci(e))n=e[Kf];else{const s=e[fi];s&&(n=s)}if(!n){for(;e&&!e[Wo]&&e!==t;)Ci(e)&&h0(e[Sn],e),e=e[li];null===e&&(e=t),Ci(e)&&h0(e[Sn],e),n=e&&e[Wo]}e=n}}(e)}}function h0(t,e){if(!(128&e[Nn])){e[Nn]&=-65,e[Nn]|=128,function g0(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let s=0;s=0?s[f=j]():s[f=-j].unsubscribe(),I+=2}else{const j=s[f=n[I+1]];n[I].call(j)}if(null!==s){for(let I=f+1;I-1){const{encapsulation:I}=t.data[s.directiveStart+f];if(I===Da.None||I===Da.Emulated)return null}return ai(s,n)}}function Jc(t,e,n,s,f){t.insertBefore(e,n,s,f)}function qg(t,e,n){t.appendChild(e,n)}function m0(t,e,n,s,f){null!==s?Jc(t,e,n,s,f):qg(t,e,n)}function Yc(t,e){return t.parentNode(e)}function Yv(t,e,n){return $v(t,e,n)}function dd(t,e,n){return 40&t.type?ai(t,n):null}let $c,En,gn,Kn,$v=dd;function Qv(t,e){$v=t,$c=e}function Qc(t,e,n,s){const f=Xg(t,s,e),I=e[yr],q=Yv(s.parent||e[ao],s,e);if(null!=f)if(Array.isArray(n))for(let re=0;ret,createScript:t=>t,createScriptURL:t=>t})}catch{}return En}function Dn(t){return xn()?.createHTML(t)||t}function Nt(t,e,n){const s=nn(),f=ir(),I=ai(f,s);if(2===f.type&&"iframe"===e.toLowerCase()){const j=I;j.src="",j.srcdoc=Dn(""),pe(s[yr],j);throw new hn(-910,!1)}return t}function Wn(){return void 0!==gn?gn:typeof document<"u"?document:void 0}function Zn(){if(void 0===Kn&&(Kn=null,ii.trustedTypes))try{Kn=ii.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Kn}function Yi(t){return Zn()?.createHTML(t)||t}function xr(t){return Zn()?.createScript(t)||t}function mu(t){return Zn()?.createScriptURL(t)||t}class Xc{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Rs})`}}class Ex extends Xc{getTypeName(){return"HTML"}}class Ax extends Xc{getTypeName(){return"Style"}}class _x extends Xc{getTypeName(){return"Script"}}class Sx extends Xc{getTypeName(){return"URL"}}class Mx extends Xc{getTypeName(){return"ResourceURL"}}function pa(t){return t instanceof Xc?t.changingThisBreaksApplicationSecurity:t}function ec(t,e){const n=function Ix(t){return t instanceof Xc&&t.getTypeName()||null}(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see ${Rs})`)}return n===e}function F3(t){const e=new Nx(t);return function Rx(){try{return!!(new window.DOMParser).parseFromString(Dn(""),"text/html")}catch{return!1}}()?new Px(e):e}class Px{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{const n=(new window.DOMParser).parseFromString(Dn(e),"text/html").body;return null===n?this.inertDocumentHelper.getInertBodyElement(e):(n.removeChild(n.firstChild),n)}catch{return null}}}class Nx{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){const n=this.inertDocument.createElement("template");return n.innerHTML=Dn(e),n}}const kx=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Xv(t){return(t=String(t)).match(kx)?t:"unsafe:"+t}function qc(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function ey(...t){const e={};for(const n of t)for(const s in n)n.hasOwnProperty(s)&&(e[s]=!0);return e}const U3=qc("area,br,col,hr,img,wbr"),K3=qc("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),z3=qc("rp,rt"),Lx=ey(z3,K3),Bx=ey(K3,qc("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),jx=ey(z3,qc("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),zw=ey(U3,Bx,jx,Lx),Vw=qc("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Fx=qc("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ux=qc("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),V3=ey(Vw,Fx,Ux),Kx=qc("script,style,template");class zx{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let n=e.firstChild,s=!0;for(;n;)if(n.nodeType===Node.ELEMENT_NODE?s=this.startElement(n):n.nodeType===Node.TEXT_NODE?this.chars(n.nodeValue):this.sanitizedSomething=!0,s&&n.firstChild)n=n.firstChild;else for(;n;){n.nodeType===Node.ELEMENT_NODE&&this.endElement(n);let f=this.checkClobberedElement(n,n.nextSibling);if(f){n=f;break}n=this.checkClobberedElement(n,n.parentNode)}return this.buf.join("")}startElement(e){const n=e.nodeName.toLowerCase();if(!zw.hasOwnProperty(n))return this.sanitizedSomething=!0,!Kx.hasOwnProperty(n);this.buf.push("<"),this.buf.push(n);const s=e.attributes;for(let f=0;f"),!0}endElement(e){const n=e.nodeName.toLowerCase();zw.hasOwnProperty(n)&&!U3.hasOwnProperty(n)&&(this.buf.push(""))}chars(e){this.buf.push(H3(e))}checkClobberedElement(e,n){if(n&&(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`);return n}}const Vx=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Hx=/([^\#-~ |!])/g;function H3(t){return t.replace(/&/g,"&").replace(Vx,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(Hx,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}let qv;function W3(t,e){let n=null;try{qv=qv||F3(t);let s=e?String(e):"";n=qv.getInertBodyElement(s);let f=5,I=s;do{if(0===f)throw new Error("Failed to sanitize html because the input is unstable");f--,s=I,I=n.innerHTML,n=qv.getInertBodyElement(s)}while(s!==I);return Dn((new zx).sanitizeChildren(Hw(n)||n))}finally{if(n){const s=Hw(n)||n;for(;s.firstChild;)s.removeChild(s.firstChild)}}}function Hw(t){return"content"in t&&function Wx(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var ga;function Gx(t){const e=ty();return e?Yi(e.sanitize(ga.HTML,t)||""):ec(t,"HTML")?Yi(pa(t)):W3(Wn(),sr(t))}function Zx(t){const e=ty();return e?e.sanitize(ga.STYLE,t)||"":ec(t,"Style")?pa(t):sr(t)}function G3(t){const e=ty();return e?e.sanitize(ga.URL,t)||"":ec(t,"URL")?pa(t):Xv(sr(t))}function Z3(t){const e=ty();if(e)return mu(e.sanitize(ga.RESOURCE_URL,t)||"");if(ec(t,"ResourceURL"))return mu(pa(t));throw new hn(904,!1)}function Jx(t){const e=ty();if(e)return xr(e.sanitize(ga.SCRIPT,t)||"");if(ec(t,"Script"))return xr(pa(t));throw new hn(905,!1)}function Yx(t){return Dn(t[0])}function $x(t){return function Ct(t){return xn()?.createScriptURL(t)||t}(t[0])}function Xx(t,e,n){return function Qx(t,e){return"src"===e&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===e&&("base"===t||"link"===t)?Z3:G3}(e,n)(t)}function ty(){const t=nn();return t&&t[Yp]}!function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"}(ga||(ga={}));const J3=new qn("ENVIRONMENT_INITIALIZER"),Y3=new qn("INJECTOR",-1),$3=new qn("INJECTOR_DEF_TYPES");class Q3{get(e,n=Bs){if(n===Bs){const s=new Error(`NullInjectorError: No provider for ${Xn(e)}!`);throw s.name="NullInjectorError",s}return n}}function qx(...t){return{\u0275providers:X3(!0,t),\u0275fromNgModule:!0}}function X3(t,...e){const n=[],s=new Set;let f;return Pa(e,I=>{const j=I;Ww(j,n,[],s)&&(f||(f=[]),f.push(j))}),void 0!==f&&q3(f,n),n}function q3(t,e){for(let n=0;n{e.push(I)})}}function Ww(t,e,n,s){if(!(t=Tn(t)))return!1;let f=null,I=rv(t);const j=!I&&Ur(t);if(I||j){if(j&&!j.standalone)return!1;f=t}else{const re=t.ngModule;if(I=rv(re),!I)return!1;f=re}const q=s.has(f);if(j){if(q)return!1;if(s.add(f),j.dependencies){const re="function"==typeof j.dependencies?j.dependencies():j.dependencies;for(const se of re)Ww(se,e,n,s)}}else{if(!I)return!1;{if(null!=I.imports&&!q){let se;s.add(f);try{Pa(I.imports,fe=>{Ww(fe,e,n,s)&&(se||(se=[]),se.push(fe))})}finally{}void 0!==se&&q3(se,e)}if(!q){const se=Ju(f)||(()=>new f);e.push({provide:f,useFactory:se,deps:Fr},{provide:$3,useValue:f,multi:!0},{provide:J3,useValue:()=>Hn(f),multi:!0})}const re=I.providers;if(null!=re&&!q){Gw(re,fe=>{e.push(fe)})}}}return f!==t&&void 0!==t.providers}function Gw(t,e){for(let n of t)Vo(n)&&(n=n.\u0275providers),Array.isArray(n)?Gw(n,e):e(n)}const e9=Qn({provide:String,useValue:Qn});function Zw(t){return null!==t&&"object"==typeof t&&e9 in t}function eS(t){return!(!t||!t.useExisting)}function tS(t){return!(!t||!t.useFactory)}function hd(t){return"function"==typeof t}const Jw=new qn("Set Injector scope."),e1={},n9={};let Yw;function t1(){return void 0===Yw&&(Yw=new Q3),Yw}class b0{}class nS extends b0{get destroyed(){return this._destroyed}constructor(e,n,s,f){super(),this.parent=n,this.source=s,this.scopes=f,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Qw(e,j=>this.processProvider(j)),this.records.set(Y3,w0(void 0,this)),f.has("environment")&&this.records.set(b0,w0(void 0,this));const I=this.records.get(Jw);null!=I&&"string"==typeof I.value&&this.scopes.add(I.value),this.injectorDefTypes=new Set(this.get($3.multi,Fr,Mr.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const e of this._ngOnDestroyHooks)e.ngOnDestroy();for(const e of this._onDestroyHooks)e()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(e){this._onDestroyHooks.push(e)}runInContext(e){this.assertNotDestroyed();const n=Sc(this),s=fs(void 0);try{return e()}finally{Sc(n),fs(s)}}get(e,n=Bs,s=Mr.Default){this.assertNotDestroyed(),s=_h(s);const f=Sc(this),I=fs(void 0);try{if(!(s&Mr.SkipSelf)){let q=this.records.get(e);if(void 0===q){const re=function a9(t){return"function"==typeof t||"object"==typeof t&&t instanceof qn}(e)&&vh(e);q=re&&this.injectableDefInScope(re)?w0($w(e),e1):null,this.records.set(e,q)}if(null!=q)return this.hydrate(e,q)}const j=s&Mr.Self?t1():this.parent;return n=s&Mr.Optional&&n===Bs?null:n,j.get(e,n)}catch(j){if("NullInjectorError"===j.name){if((j[wh]=j[wh]||[]).unshift(Xn(e)),f)throw j;return Ff(j,e,"R3InjectorError",this.source)}throw j}finally{fs(I),Sc(f)}}resolveInjectorInitializers(){const e=Sc(this),n=fs(void 0);try{const s=this.get(J3.multi,Fr,Mr.Self);for(const f of s)f()}finally{Sc(e),fs(n)}}toString(){const e=[],n=this.records;for(const s of n.keys())e.push(Xn(s));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new hn(205,!1)}processProvider(e){let n=hd(e=Tn(e))?e:Tn(e&&e.provide);const s=function i9(t){if(Zw(t))return w0(void 0,t.useValue);return w0(rS(t),e1)}(e);if(hd(e)||!0!==e.multi){this.records.get(n)}else{let f=this.records.get(n);f||(f=w0(void 0,e1,!0),f.factory=()=>Gp(f.multi),this.records.set(n,f)),n=e,f.multi.push(e)}this.records.set(n,s)}hydrate(e,n){return n.value===e1&&(n.value=n9,n.value=n.factory()),"object"==typeof n.value&&n.value&&function s9(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}injectableDefInScope(e){if(!e.providedIn)return!1;const n=Tn(e.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}}function $w(t){const e=vh(t),n=null!==e?e.factory:Ju(t);if(null!==n)return n;if(t instanceof qn)throw new hn(204,!1);if(t instanceof Function)return function r9(t){const e=t.length;if(e>0){Yl(e,"?");throw new hn(204,!1)}const n=function bw(t){return t&&(t[Tl]||t[iv])||null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new hn(204,!1)}function rS(t,e,n){let s;if(hd(t)){const f=Tn(t);return Ju(f)||$w(f)}if(Zw(t))s=()=>Tn(t.useValue);else if(tS(t))s=()=>t.useFactory(...Gp(t.deps||[]));else if(eS(t))s=()=>Hn(Tn(t.useExisting));else{const f=Tn(t&&(t.useClass||t.provide));if(!function o9(t){return!!t.deps}(t))return Ju(f)||$w(f);s=()=>new f(...Gp(t.deps))}return s}function w0(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Qw(t,e){for(const n of t)Array.isArray(n)?Qw(n,e):n&&Vo(n)?Qw(n.\u0275providers,e):e(n)}class u9{}class iS{}const oS="ngComponent";class l9{resolveComponentFactory(e){throw function c9(t){const e=Error(`No component factory found for ${Xn(t)}. Did you add it to @NgModule.entryComponents?`);return e[oS]=t,e}(e)}}class ny{}function E0(t,e){return new ya(ai(t,e))}ny.NULL=new l9;class ya{constructor(e){this.nativeElement=e}}function d9(t){return t instanceof ya?t.nativeElement:t}ya.__NG_ELEMENT_ID__=function f9(){return E0(Hi(),nn())};class sS{}class el{}el.__NG_ELEMENT_ID__=()=>function h9(){const t=nn(),n=xo(Hi().index,t);return(Ci(n)?n:t)[yr]}();class Xw{}Xw.\u0275prov=tr({token:Xw,providedIn:"root",factory:()=>null});class n1{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const p9=new n1("15.2.9"),qw={},eE="ngOriginalError";function tE(t){return t[eE]}class A0{constructor(){this._console=console}handleError(e){const n=this._findOriginalError(e);this._console.error("ERROR",e),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(e){let n=e&&tE(e);for(;n&&tE(n);)n=tE(n);return n||null}}function w9(t){return t.ownerDocument.defaultView}function E9(t){return t.ownerDocument}function A9(t){return t.ownerDocument.body}function tl(t){return t instanceof Function?t():t}function uS(t,e,n){let s=t.length;for(;;){const f=t.indexOf(e,n);if(-1===f)return f;if(0===f||t.charCodeAt(f-1)<=32){const I=e.length;if(f+I===s||t.charCodeAt(f+I)<=32)return f}n=f+1}}const cS="ng-template";function M9(t,e,n){let s=0,f=!0;for(;sI?"":f[be+1].toLowerCase();const Oe=8&s?_e:null;if(Oe&&-1!==uS(Oe,se,0)||2&s&&se!==_e){if(vu(s))return!1;j=!0}}}}else{if(!j&&!vu(s)&&!vu(re))return!1;if(j&&vu(re))continue;j=!1,s=re|1&s}}return vu(s)||j}function vu(t){return 0==(1&t)}function C9(t,e,n,s){if(null===e)return-1;let f=0;if(s||!n){let I=!1;for(;f-1)for(n++;n0?'="'+q+'"':"")+"]"}else 8&s?f+="."+j:4&s&&(f+=" "+j);else""!==f&&!vu(j)&&(e+=dS(I,f),f=""),s=j,I=I||!vu(s);n++}return""!==f&&(e+=dS(I,f)),e}const hr={};function Yo(t){hS(Er(),nn(),bo()+t,!1)}function hS(t,e,n,s){if(!s)if(3==(3&e[Nn])){const I=t.preOrderCheckHooks;null!==I&&Ei(e,I,n)}else{const I=t.preOrderHooks;null!==I&&Ti(e,I,0,n)}lu(n)}const pS={\u0275\u0275defineInjectable:tr,\u0275\u0275defineInjector:Ls,\u0275\u0275inject:Hn,\u0275\u0275invalidFactoryDep:cv,resolveForwardRef:Tn};function L9(t,e){let n=null,s=null;t.hasOwnProperty(Tl)||Object.defineProperty(t,Tl,{get:()=>(null===n&&(n=Ai().compileInjectable(pS,`ng:///${t.name}/\u0275prov.js`,function U9(t,e){const n=e||{providedIn:null},s={name:t.name,type:t,typeArgumentCount:0,providedIn:n.providedIn};return(gS(n)||yS(n))&&void 0!==n.deps&&(s.deps=pu(n.deps)),gS(n)?s.useClass=n.useClass:function j9(t){return B9 in t}(n)?s.useValue=n.useValue:yS(n)?s.useFactory=n.useFactory:function F9(t){return void 0!==t.useExisting}(n)&&(s.useExisting=n.useExisting),s}(t,e))),n)}),t.hasOwnProperty(ra)||Object.defineProperty(t,ra,{get:()=>{if(null===s){const f=Ai();s=f.compileFactory(pS,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,typeArgumentCount:0,deps:Go(t),target:f.FactoryTarget.Injectable})}return s},configurable:!0})}const B9=Qn({provide:String,useValue:Qn});function gS(t){return void 0!==t.useClass}function yS(t){return void 0!==t.useFactory}qi("Injectable",void 0,void 0,void 0,(t,e)=>L9(t,e));function mS(t,e=null,n=null,s){const f=vS(t,e,n,s);return f.resolveInjectorInitializers(),f}function vS(t,e=null,n=null,s,f=new Set){const I=[n||Fr,qx(t)];return s=s||("object"==typeof t?void 0:Xn(t)),new nS(I,e||t1(),s||null,f)}class $o{static create(e,n){if(Array.isArray(e))return mS({name:""},n,e,"");{const s=e.name??"";return mS({name:s},e.parent,e.providers,s)}}}function nE(t){return t.length>1?" ("+function K9(t){const e=[];for(let n=0;n-1)return e.push(t[n]),e;e.push(t[n])}return e}(t.slice().reverse()).map(s=>Xn(s.token)).join(" -> ")+")":""}function rE(t,e,n,s){const f=[e],I=n(f),j=s?function g9(t,e){const n=`${t} caused by: ${e instanceof Error?e.message:e}`,s=Error(n);return s[eE]=e,s}(I,s):Error(I);return j.addKey=z9,j.keys=f,j.injectors=[t],j.constructResolvingMessage=n,j[eE]=s,j}function z9(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function bS(t,e){const n=[];for(let s=0,f=e.length;sHn(Y3)}),$o.__NG_ELEMENT_ID__=-1;class sf{constructor(e,n){if(this.token=e,this.id=n,!e)throw new hn(208,!1);this.displayName=Xn(this.token)}static get(e){return wS.get(Tn(e))}static get numberOfKeys(){return wS.numberOfKeys}}const wS=new class Y9{constructor(){this._allKeys=new Map}get(e){if(e instanceof sf)return e;if(this._allKeys.has(e))return this._allKeys.get(e);const n=new sf(e,sf.numberOfKeys);return this._allKeys.set(e,n),n}get numberOfKeys(){return this._allKeys.size}};class r1{constructor(e,n,s){this.key=e,this.optional=n,this.visibility=s}static fromKey(e){return new r1(e,!1,null)}}const $9=[];class ES{constructor(e,n,s){this.key=e,this.resolvedFactories=n,this.multiProvider=s,this.resolvedFactory=this.resolvedFactories[0]}}class Q9{constructor(e,n){this.factory=e,this.dependencies=n}}function X9(t){let e,n;if(t.useClass){const s=Tn(t.useClass);e=Oi().factory(s),n=_S(s)}else t.useExisting?(e=s=>s,n=[r1.fromKey(sf.get(t.useExisting))]):t.useFactory?(e=t.useFactory,n=function nP(t,e){if(e){const n=e.map(s=>[s]);return e.map(s=>SS(t,s,n))}return _S(t)}(t.useFactory,t.deps)):(e=()=>t.useValue,n=$9);return new Q9(e,n)}function q9(t){return new ES(sf.get(t.provide),[X9(t)],t.multi||!1)}function eP(t){const s=function tP(t,e){for(let n=0;n{if(n instanceof xg)e.push({provide:n,useClass:n});else if(n&&"object"==typeof n&&void 0!==n.provide)e.push(n);else{if(!Array.isArray(n))throw function G9(t){return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${t}`)}(n);AS(n,e)}}),e}function _S(t){const e=Oi().parameters(t);if(!e)return[];if(e.some(n=>null==n))throw bS(t,e);return e.map(n=>SS(t,n,e))}function SS(t,e,n){let s=null,f=!1;if(!Array.isArray(e))return iE(e instanceof od?e.token:e,f,null);let I=null;for(let j=0;j=this._providers.length)throw function Z9(t){return Error(`Index ${t} is out-of-bounds.`)}(e);return this._providers[e]}_new(e){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw function H9(t,e){return rE(t,e,function(n){return`Cannot instantiate cyclic dependency!${nE(n)}`})}(this,e.key);return this._instantiateProvider(e)}_getMaxNumberOfObjects(){return this.objs.length}_instantiateProvider(e){if(e.multiProvider){const n=[];for(let s=0;sthis._getByReflectiveDependency(j))}catch(j){throw j.addKey&&j.addKey(this,e.key),j}try{I=s(...f)}catch(j){throw function W9(t,e,n,s){return rE(t,s,function(f){const I=Xn(f[0].token);return`${e.message}: Error during instantiation of ${I}!${nE(f)}.`},e)}(this,j,j.stack,e.key)}return I}_getByReflectiveDependency(e){return this._getByKey(e.key,e.visibility,e.optional?null:Bs)}_getByKey(e,n,s){return e===S0.INJECTOR_KEY?this:n instanceof $h?this._getByKeySelf(e,s):this._getByKeyDefault(e,s,n)}_getObjByKeyId(e){for(let n=0;n' "'+n.key.displayName+'" ').join(", ")}])`}toString(){return this.displayName}}function mn(t,e=Mr.Default){const n=nn();if(null===n)return Hn(t,e);return Cv(Hi(),n,Tn(t),e)}function iP(){throw new Error("invalid")}function MS(t,e){const n=t.contentQueries;if(null!==n)for(let s=0;sei&&hS(t,e,ei,!1),ki(j?2:0,f),n(s,f)}finally{lu(I),ki(j?3:1,f)}}function aE(t,e,n){if(Xp(e)){const s=e.directiveStart,f=e.directiveEnd;for(let I=s;I0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(j)!=q&&j.push(q),j.push(n,s,I)}}(t,e,s,oy(t,n,f.hostVars,hr),f)}function tc(t,e,n,s,f,I){const j=ai(t,e);hE(e[yr],j,I,t.value,n,s,f)}function hE(t,e,n,s,f,I,j){if(null==I)t.removeAttribute(e,f,n);else{const q=null==j?sr(I):j(I,s||"",f);t.setAttribute(e,f,q,n)}}function MP(t,e,n,s,f,I){const j=I[e];if(null!==j){const q=s.setInput;for(let re=0;re0&&pE(n)}}function pE(t){for(let s=Gg(t);null!==s;s=u0(s))for(let f=fi;f0&&pE(I)}const n=t[Sn].components;if(null!==n)for(let s=0;s0&&pE(f)}}function OP(t,e){const n=xo(e,t),s=n[Sn];(function xP(t,e){for(let n=e.length;n-1&&($g(e,s),Jh(n,s))}this._attachedToViewContainer=!1}Qg(this._lView[Sn],this._lView)}onDestroy(e){CS(this._lView[Sn],this._lView,null,e)}markForCheck(){a1(this._cdRefInjectingView||this._lView)}detach(){this._lView[Nn]&=-65}reattach(){this._lView[Nn]|=64}detectChanges(){u1(this._lView[Sn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new hn(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function f0(t,e){ke(t,e,e[yr],2,null,null)}(this._lView[Sn],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new hn(902,!1);this._appRef=e}}class PP extends sy{constructor(e){super(e),this._view=e}detectChanges(){const e=this._view;u1(e[Sn],e,e[oi],!1)}checkNoChanges(){}get context(){return null}}class jS extends ny{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const n=Ur(e);return new ay(n,this.ngModule)}}function FS(t){const e=[];for(let n in t)if(t.hasOwnProperty(n)){const s=t[n];e.push({propName:s,templateName:n})}return e}class RP{constructor(e,n){this.injector=e,this.parentInjector=n}get(e,n,s){s=_h(s);const f=this.injector.get(e,qw,s);return f!==qw||n===qw?f:this.parentInjector.get(e,n,s)}}class ay extends iS{get inputs(){return FS(this.componentDef.inputs)}get outputs(){return FS(this.componentDef.outputs)}constructor(e,n){super(),this.componentDef=e,this.ngModule=n,this.componentType=e.type,this.selector=function R9(t){return t.map(N9).join(",")}(e.selectors),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!n}create(e,n,s,f){let I=(f=f||this.ngModule)instanceof b0?f:f?.injector;I&&null!==this.componentDef.getStandaloneInjector&&(I=this.componentDef.getStandaloneInjector(I)||I);const j=I?new RP(e,I):e,q=j.get(sS,null);if(null===q)throw new hn(407,!1);const re=j.get(Xw,null),se=q.createRenderer(null,this.componentDef),fe=this.componentDef.selectors[0][0]||"div",be=s?function cP(t,e,n){const s=n===Da.ShadowDom;return t.selectRootElement(e,s)}(se,s,this.componentDef.encapsulation):Ba(se,fe,function NP(t){const e=t.toLowerCase();return"svg"===e?Yu:"math"===e?ig:null}(fe)),_e=this.componentDef.onPush?288:272,Oe=lE(0,null,null,1,0,null,null,null,null,null),Te=i1(null,Oe,null,_e,null,null,q,se,re,j,null);let Be,Fe;Bh(Te);try{const Ke=this.componentDef;let et,Ye=null;Ke.findHostDirectiveDefs?(et=[],Ye=new Map,Ke.findHostDirectiveDefs(Ke,et,Ye),et.push(Ke)):et=[Ke];const ut=function LP(t,e){const n=t[Sn],s=ei;return t[s]=e,M0(n,s,2,"#host",null)}(Te,be),Tt=function BP(t,e,n,s,f,I,j,q){const re=f[Sn];!function jP(t,e,n,s){for(const f of t)e.mergedAttrs=Gl(e.mergedAttrs,f.hostAttrs);null!==e.mergedAttrs&&(c1(e,e.mergedAttrs,!0),null!==n&&an(s,n,e))}(s,t,e,j);const se=I.createRenderer(e,n),fe=i1(f,DS(n),null,n.onPush?32:16,f[t.index],t,I,se,q||null,null,null);return re.firstCreatePass&&dE(re,t,s.length-1),s1(f,fe),f[t.index]=fe}(ut,be,Ke,et,Te,q,se);Fe=Ks(Oe,ei),be&&function UP(t,e,n,s){if(s)Uh(t,n,["ng-version",p9.full]);else{const{attrs:f,classes:I}=function k9(t){const e=[],n=[];let s=1,f=2;for(;s0&&dn(t,n,I.join(" "))}}(se,Ke,be,s),void 0!==n&&function KP(t,e,n){const s=t.projection=[];for(let f=0;f=0;s--){const f=t[s];f.hostVars=e+=f.hostVars,f.hostAttrs=Gl(f.hostAttrs,n=Gl(n,f.hostAttrs))}}(s)}function mE(t){return t===na?{}:t===Fr?[]:t}function HP(t,e){const n=t.viewQuery;t.viewQuery=n?(s,f)=>{e(s,f),n(s,f)}:e}function WP(t,e){const n=t.contentQueries;t.contentQueries=n?(s,f,I)=>{e(s,f,I),n(s,f,I)}:e}function GP(t,e){const n=t.hostBindings;t.hostBindings=n?(s,f)=>{e(s,f),n(s,f)}:e}const ZP=["providersResolver"],JP=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function YP(t){let n,e=US(t.type);n=To(t)?e.\u0275cmp:e.\u0275dir;const s=t;for(const f of ZP)s[f]=n[f];if(To(n))for(const f of JP)s[f]=n[f]}function $P(t){return e=>{e.findHostDirectiveDefs=KS,e.hostDirectives=(Array.isArray(t)?t:t()).map(n=>"function"==typeof n?{directive:Tn(n),inputs:na,outputs:na}:{directive:Tn(n.directive),inputs:zS(n.inputs),outputs:zS(n.outputs)})}}function KS(t,e,n){if(null!==t.hostDirectives)for(const s of t.hostDirectives){const f=yi(s.directive);QP(f.declaredInputs,s.inputs),KS(f,e,n),n.set(f,s),e.push(f)}}function zS(t){if(void 0===t||0===t.length)return na;const e={};for(let n=0;nj(Vi(ut[s.index])):s.index;let Ye=null;if(!j&&q&&(Ye=function aN(t,e,n,s){const f=t.cleanup;if(null!=f)for(let I=0;Ire?q[re]:null}"string"==typeof j&&(I+=2)}return null}(t,e,f,s.index)),null!==Ye){(Ye.__ngLastListenerFn__||Ye).__ngNextListenerFn__=I,Ye.__ngLastListenerFn__=I,_e=!1}else{I=o6(s,e,fe,I,!1);const ut=n.listen(Fe,f,I);be.push(I,ut),se&&se.push(f,et,Ke,Ke+1)}}else I=o6(s,e,fe,I,!1);const Oe=s.outputs;let Te;if(_e&&null!==Oe&&(Te=Oe[f])){const Be=Te.length;if(Be)for(let Fe=0;Fe-1?xo(t.index,e):e);let re=i6(e,n,s,j),se=I.__ngNextListenerFn__;for(;se;)re=i6(e,n,se,j)&&re,se=se.__ngNextListenerFn__;return f&&!1===re&&(j.preventDefault(),j.returnValue=!1),re}}function Ua(t=1){return hg(t)}function uN(t,e){let n=null;const s=function T9(t){const e=t.attrs;if(null!=e){const n=e.indexOf(5);if(!(1&n))return e[n+1]}return null}(t);for(let f=0;f>17&32767}function AE(t){return 2|t}function gd(t){return(131068&t)>>2}function _E(t,e){return-131069&t|e<<2}function SE(t){return 1|t}function pN(t,e,n,s,f,I){let j=I?e.classBindings:e.styleBindings,q=af(j),re=gd(j);t[s]=n;let fe,se=!1;if(Array.isArray(n)){const be=n;fe=be[1],(null===fe||$l(be,fe)>0)&&(se=!0)}else fe=n;if(f)if(0!==re){const _e=af(t[q+1]);t[s+1]=p1(_e,q),0!==_e&&(t[_e+1]=_E(t[_e+1],s)),t[q+1]=function dN(t,e){return 131071&t|e<<17}(t[q+1],s)}else t[s+1]=p1(q,0),0!==q&&(t[q+1]=_E(t[q+1],s)),q=s;else t[s+1]=p1(re,0),0===q?q=s:t[re+1]=_E(t[re+1],s),re=s;se&&(t[s+1]=AE(t[s+1])),p6(t,fe,s,!0,I),p6(t,fe,s,!1,I),function gN(t,e,n,s,f){const I=f?t.residualClasses:t.residualStyles;null!=I&&"string"==typeof e&&$l(I,e)>=0&&(n[s+1]=SE(n[s+1]))}(e,fe,t,s,I),j=p1(q,re),I?e.classBindings=j:e.styleBindings=j}function p6(t,e,n,s,f){const I=t[n+1],j=null===e;let q=s?af(I):gd(I),re=!1;for(;0!==q&&(!1===re||j);){const se=t[q],fe=t[q+1];yN(se,e)&&(re=!0,t[q+1]=s?SE(fe):AE(fe)),q=s?af(fe):gd(fe)}re&&(t[n+1]=s?AE(I):SE(I))}function yN(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&$l(t,e)>=0}const ho={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function g6(t){return t.substring(ho.key,ho.keyEnd)}function mN(t){return t.substring(ho.value,ho.valueEnd)}function y6(t,e){const n=ho.textEnd;return n===e?-1:(e=ho.keyEnd=function wN(t,e,n){for(;e32;)e++;return e}(t,ho.key=e,n),k0(t,e,n))}function m6(t,e){const n=ho.textEnd;let s=ho.key=k0(t,e,n);return n===s?-1:(s=ho.keyEnd=function EN(t,e,n){let s;for(;e=65&&(-33&s)<=90||s>=48&&s<=57);)e++;return e}(t,s,n),s=b6(t,s,n,58),s=ho.value=k0(t,s,n),s=ho.valueEnd=function AN(t,e,n){let s=-1,f=-1,I=-1,j=e,q=j;for(;j32&&(q=j),I=f,f=s,s=-33&re}return q}(t,s,n),b6(t,s,n,59))}function v6(t){ho.key=0,ho.keyEnd=0,ho.value=0,ho.valueEnd=0,ho.textEnd=t.length}function k0(t,e,n){for(;e=0;n=m6(e,n))_6(t,g6(e),mN(e))}function SN(t){wu(ON,ic,t,!0)}function ic(t,e){for(let n=function vN(t){return v6(t),y6(t,k0(t,0,ho.textEnd))}(e);n>=0;n=y6(e,n))Jr(t,g6(e),!0)}function bu(t,e,n,s){const f=nn(),I=Er(),j=ua(2);if(I.firstUpdatePass&&A6(I,t,j,s),e!==hr&&Qo(f,j,e)){S6(I,I.data[bo()],f,f[yr],t,f[j+1]=function PN(t,e){return null==t||""===t||("string"==typeof e?t+=e:"object"==typeof t&&(t=Xn(pa(t)))),t}(e,n),s,j)}}function wu(t,e,n,s){const f=Er(),I=ua(2);f.firstUpdatePass&&A6(f,null,I,s);const j=nn();if(n!==hr&&Qo(j,I,n)){const q=f.data[bo()];if(I6(q,s)&&!E6(f,I)){let re=s?q.classesWithoutHost:q.stylesWithoutHost;null!==re&&(n=so(re,n||"")),bE(f,q,j,n,s)}else!function xN(t,e,n,s,f,I,j,q){f===hr&&(f=Fr);let re=0,se=0,fe=0=t.expandoStartIndex}function A6(t,e,n,s){const f=t.data;if(null===f[n+1]){const I=f[bo()],j=E6(t,n);I6(I,s)&&null===e&&!j&&(e=!1),e=function MN(t,e,n,s){const f=Lc(t);let I=s?e.residualClasses:e.residualStyles;if(null===f)0===(s?e.classBindings:e.styleBindings)&&(n=IE(null,t,e,n,s),n=dy(n,e.attrs,s),I=null);else{const j=e.directiveStylingLast;if(-1===j||t[j]!==f)if(n=IE(f,t,e,n,s),null===I){let re=function IN(t,e,n){const s=n?e.classBindings:e.styleBindings;if(0!==gd(s))return t[af(s)]}(t,e,s);void 0!==re&&Array.isArray(re)&&(re=IE(null,t,e,re[1],s),re=dy(re,e.attrs,s),function DN(t,e,n,s){const f=n?e.classBindings:e.styleBindings;t[af(f)]=s}(t,e,s,re))}else I=function CN(t,e,n){let s;const f=e.directiveEnd;for(let I=1+e.directiveStylingLast;I0;){const re=t[f],se=Array.isArray(re),fe=se?re[1]:re,be=null===fe;let _e=n[f+1];_e===hr&&(_e=be?Fr:void 0);let Oe=be?Rg(_e,s):fe===s?_e:void 0;if(se&&!y1(Oe)&&(Oe=Rg(re,s)),y1(Oe)&&(q=Oe,j))return q;const Te=t[f+1];f=j?af(Te):gd(Te)}if(null!==e){let re=I?e.residualClasses:e.residualStyles;null!=re&&(q=Rg(re,s))}return q}function y1(t){return void 0!==t}function I6(t,e){return 0!=(t.flags&(e?8:16))}function Si(t,e=""){const n=nn(),s=Er(),f=t+ei,I=s.firstCreatePass?M0(s,f,1,e,null):s.data[f],j=n[f]=Jo(n[yr],e);Qc(s,n,j,I),co(I,!1)}function m1(t){return L0("",t,""),m1}function L0(t,e,n){const s=nn(),f=D0(s,t,e,n);return f!==hr&&nl(s,bo(),f),L0}function D6(t,e,n,s,f){const I=nn(),j=C0(I,t,e,n,s,f);return j!==hr&&nl(I,bo(),j),D6}function C6(t,e,n,s,f,I,j){const q=nn(),re=T0(q,t,e,n,s,f,I,j);return re!==hr&&nl(q,bo(),re),C6}function T6(t,e,n,s,f,I,j,q,re){const se=nn(),fe=O0(se,t,e,n,s,f,I,j,q,re);return fe!==hr&&nl(se,bo(),fe),T6}function O6(t,e,n,s,f,I,j,q,re,se,fe){const be=nn(),_e=x0(be,t,e,n,s,f,I,j,q,re,se,fe);return _e!==hr&&nl(be,bo(),_e),O6}function x6(t,e,n,s,f,I,j,q,re,se,fe,be,_e){const Oe=nn(),Te=P0(Oe,t,e,n,s,f,I,j,q,re,se,fe,be,_e);return Te!==hr&&nl(Oe,bo(),Te),x6}function P6(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te){const Be=nn(),Fe=N0(Be,t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te);return Fe!==hr&&nl(Be,bo(),Fe),P6}function N6(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe){const Ke=nn(),et=R0(Ke,t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe);return et!==hr&&nl(Ke,bo(),et),N6}function R6(t){const e=nn(),n=I0(e,t);return n!==hr&&nl(e,bo(),n),R6}function NN(t,e,n){wu(Jr,ic,D0(nn(),t,e,n),!0)}function RN(t,e,n,s,f){wu(Jr,ic,C0(nn(),t,e,n,s,f),!0)}function kN(t,e,n,s,f,I,j){wu(Jr,ic,T0(nn(),t,e,n,s,f,I,j),!0)}function LN(t,e,n,s,f,I,j,q,re){wu(Jr,ic,O0(nn(),t,e,n,s,f,I,j,q,re),!0)}function jN(t,e,n,s,f,I,j,q,re,se,fe){wu(Jr,ic,x0(nn(),t,e,n,s,f,I,j,q,re,se,fe),!0)}function FN(t,e,n,s,f,I,j,q,re,se,fe,be,_e){wu(Jr,ic,P0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e),!0)}function UN(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te){wu(Jr,ic,N0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te),!0)}function KN(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe){wu(Jr,ic,R0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe),!0)}function zN(t){wu(Jr,ic,I0(nn(),t),!0)}function VN(t,e,n){rc(D0(nn(),t,e,n))}function HN(t,e,n,s,f){rc(C0(nn(),t,e,n,s,f))}function WN(t,e,n,s,f,I,j){rc(T0(nn(),t,e,n,s,f,I,j))}function GN(t,e,n,s,f,I,j,q,re){rc(O0(nn(),t,e,n,s,f,I,j,q,re))}function ZN(t,e,n,s,f,I,j,q,re,se,fe){rc(x0(nn(),t,e,n,s,f,I,j,q,re,se,fe))}function JN(t,e,n,s,f,I,j,q,re,se,fe,be,_e){rc(P0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e))}function YN(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te){rc(N0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te))}function $N(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe){rc(R0(nn(),t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe))}function QN(t){rc(I0(nn(),t))}function k6(t,e,n,s,f){return bu(t,D0(nn(),e,n,s),f,!1),k6}function L6(t,e,n,s,f,I,j){return bu(t,C0(nn(),e,n,s,f,I),j,!1),L6}function B6(t,e,n,s,f,I,j,q,re){return bu(t,T0(nn(),e,n,s,f,I,j,q),re,!1),B6}function j6(t,e,n,s,f,I,j,q,re,se,fe){return bu(t,O0(nn(),e,n,s,f,I,j,q,re,se),fe,!1),j6}function F6(t,e,n,s,f,I,j,q,re,se,fe,be,_e){return bu(t,x0(nn(),e,n,s,f,I,j,q,re,se,fe,be),_e,!1),F6}function U6(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te){return bu(t,P0(nn(),e,n,s,f,I,j,q,re,se,fe,be,_e,Oe),Te,!1),U6}function K6(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe){return bu(t,N0(nn(),e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be),Fe,!1),K6}function z6(t,e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe,Ke,et){return bu(t,R0(nn(),e,n,s,f,I,j,q,re,se,fe,be,_e,Oe,Te,Be,Fe,Ke),et,!1),z6}function V6(t,e,n){return bu(t,I0(nn(),e),n,!1),V6}function H6(t,e,n){const s=nn();if(Qo(s,kc(),e)){ma(Er(),ir(),s,t,e,s[yr],n,!0)}return H6}function W6(t,e,n){const s=nn();if(Qo(s,kc(),e)){const I=Er(),j=ir();ma(I,j,s,t,e,LS(Lc(I.data),j,s),n,!0)}return W6}const yd=void 0;var qN=["en",[["a","p"],["AM","PM"],yd],[["AM","PM"],yd,yd],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],yd,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],yd,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",yd,"{1} 'at' {0}",yd],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function XN(t){const n=Math.floor(Math.abs(t)),s=t.toString().replace(/^[^.]*\.?/,"").length;return 1===n&&0===s?1:5}];let B0={};function As(t){const e=function e7(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=Z6(e);if(n)return n;const s=e.split("-")[0];if(n=Z6(s),n)return n;if("en"===s)return qN;throw new hn(701,!1)}function G6(t){return As(t)[ci.PluralCase]}function Z6(t){return t in B0||(B0[t]=ii.ng&&ii.ng.common&&ii.ng.common.locales&&ii.ng.common.locales[t]),B0[t]}var ci;!function(t){t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData"}(ci||(ci={}));const t7=["zero","one","two","few","many"];const j0="en-US",v1={marker:"element"},b1={marker:"ICU"};var _s;!function(t){t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT"}(_s||(_s={}));let J6=j0;function Y6(t){ks(t,"Expected localeId to be defined"),"string"==typeof t&&(J6=t.toLowerCase().replace(/_/g,"-"))}function $6(t,e,n){const s=e.insertBeforeIndex,f=Array.isArray(s)?s[0]:s;return null===f?dd(t,0,n):Vi(n[f])}function Q6(t,e,n,s,f){const I=e.insertBeforeIndex;if(Array.isArray(I)){let j=s,q=null;if(3&e.type||(q=j,j=f),null!==j&&-1===e.componentOffset)for(let re=1;re1)for(let n=t.length-2;n>=0;n--){const s=t[n];q6(s)||o7(s,e)&&null===s7(s)&&a7(s,e.index)}}function q6(t){return!(64&t.type)}function o7(t,e){return q6(e)||t.index>e.index}function s7(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function a7(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(Qv($6,Q6),t.insertBeforeIndex=e)}function hy(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function l7(t,e,n){const s=oE(t,n,64,null,null);return X6(e,s),s}function w1(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}function eM(t){return t>>>17}function tM(t){return(131070&t)>>>1}let py=0,gy=0;function rM(t,e,n,s){const f=n[yr];let j,I=null;for(let q=0;q>>1,Oe=e[++q],Te=e[++q];hE(f,mo(_e,n),null,null,Oe,Te,null)}else switch(re){case b1:const se=e[++q],fe=e[++q];if(null===n[fe]){to(n[fe]=Uw(f,se),n)}break;case v1:const be=e[++q],_e=e[++q];if(null===n[_e]){to(n[_e]=Ba(f,be,null),n)}}}}function iM(t,e,n,s,f){for(let I=0;I>>2;switch(3&fe){case 1:const _e=n[++se],Oe=n[++se],Te=t.data[be];"string"==typeof Te?hE(e[yr],e[be],null,Te,_e,re,Oe):ma(t,Te,e,_e,re,e[yr],Oe,!1);break;case 0:const Be=e[be];null!==Be&&c0(e[yr],Be,re);break;case 2:g7(t,hy(t,be),e,re);break;case 3:oM(t,hy(t,be),s,e)}}}}else{const re=n[I+1];if(re>0&&3==(3&re)){const fe=hy(t,re>>>2);e[fe.currentCaseLViewIndex]<0&&oM(t,fe,s,e)}}I+=q}}function oM(t,e,n,s){let f=s[e.currentCaseLViewIndex];if(null!==f){let I=py;f<0&&(f=s[e.currentCaseLViewIndex]=~f,I=-1),iM(t,s,e.update[f],n,I)}}function g7(t,e,n,s){const f=function y7(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const s=function n7(t,e){const n=G6(e)(parseInt(t,10)),s=t7[n];return void 0!==s?s:"other"}(e,function i7(){return J6}());n=t.cases.indexOf(s),-1===n&&"other"!==s&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,s);if(w1(e,n)!==f&&(sM(t,e,n),n[e.currentCaseLViewIndex]=null===f?null:~f,null!==f)){const j=n[e.anchorIdx];j&&rM(t,e.create[f],n,j)}}function sM(t,e,n){let s=w1(e,n);if(null!==s){const f=e.remove[s];for(let I=0;I0){const q=mo(j,n);null!==q&&pe(n[yr],q)}else sM(t,hy(t,~j),n)}}}function m7(){const t=[];let n,s,e=-1;function I(q,re){e=0;const se=w1(q,re);s=null!==se?q.remove[se]:Fr}function j(){if(e0)return n[q];{t.push(e,s);const re=~q;return I(n[Sn].data[re],n),j()}}return 0===t.length?null:(s=t.pop(),e=t.pop(),j())}return function f(q,re){for(n=re;t.length;)t.pop();return I(q.value,re),j}}const E1=/\ufffd(\d+):?\d*\ufffd/gi,v7=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,b7=/\ufffd(\d+)\ufffd/,uM=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,yy="\ufffd",w7=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,E7=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,A7=/\uE500/g;function S7(t,e,n,s,f,I){const j=ms(),q=[],re=[],se=[[]];f=function T7(t,e){if(function C7(t){return-1===t}(e))return fM(t);{const n=t.indexOf(`:${e}${yy}`)+2+e.toString().length,s=t.search(new RegExp(`${yy}\\/\\*\\d+:${e}${yy}`));return fM(t.substring(n,s))}}(f,I);const fe=function _7(t){return t.replace(A7," ")}(f).split(E7);for(let be=0;ben.length&&n.push(re)}return{type:s,mainBinding:f,cases:e,values:n}}function DE(t){if(!t)return[];let e=0;const n=[],s=[],f=/[{}]/g;let I;for(f.lastIndex=0;I=f.exec(t);){const q=I.index;if("}"==I[0]){if(n.pop(),0==n.length){const re=t.substring(e,q);uM.test(re)?s.push(O7(re)):s.push(re),e=q+1}}else{if(0==n.length){const re=t.substring(e,q);s.push(re),e=q+1}n.push("{")}}const j=t.substring(e);return s.push(j),s}function x7(t,e,n,s,f,I,j,q){const re=[],se=[],fe=[];e.cases.push(I),e.create.push(re),e.remove.push(se),e.update.push(fe);const _e=F3(Wn()).getInertBodyElement(j),Oe=Hw(_e)||_e;return Oe?hM(t,e,n,s,re,se,fe,Oe,f,q,0):0}function hM(t,e,n,s,f,I,j,q,re,se,fe){let be=0,_e=q.firstChild;for(;_e;){const Oe=oy(t,n,1,null);switch(_e.nodeType){case Node.ELEMENT_NODE:const Te=_e,Be=Te.tagName.toLowerCase();if(zw.hasOwnProperty(Be)){CE(f,v1,Be,re,Oe),t.data[Oe]=Be;const Ye=Te.attributes;for(let ut=0;ut>>_s.SHIFT;let be=t[fe];null===be&&(be=t[fe]=re?f.createComment(q):Jo(f,q)),se&&null!==n&&Jc(f,n,be,s,!1)}})(f,re.create,fe,be),dg(!0)}function mM(){dg(!1)}function H7(t,e,n){yM(t,e,n),mM()}function W7(t,e){const n=Er(),s=aa(n.consts,e);!function I7(t,e,n){const f=Hi().index,I=[];if(t.firstCreatePass&&null===t.data[e]){for(let j=0;j0){const s=t.data[n];iM(t,e,Array.isArray(s)?s:s.update,zs()-gy-1,py)}py=0,gy=0}(Er(),nn(),t+ei)}function Z7(t,e={}){return function V7(t,e={}){let n=t;if(L7.test(t)){const s={},f=[gM];n=n.replace(B7,(I,j,q)=>{const re=j||q,se=s[re]||[];if(se.length||(re.split("|").forEach(Be=>{const Fe=Be.match(z7),Ke=Fe?parseInt(Fe[1],10):gM,et=K7.test(Be);se.push([Ke,et,Be])}),s[re]=se),!se.length)throw new Error(`i18n postprocess: unmatched placeholder - ${re}`);const fe=f[f.length-1];let be=0;for(let Be=0;Bee.hasOwnProperty(I)?`${f}${e[I]}${re}`:s),n=n.replace(F7,(s,f)=>e.hasOwnProperty(f)?e[f]:s),n=n.replace(U7,(s,f)=>{if(e.hasOwnProperty(f)){const I=e[f];if(!I.length)throw new Error(`i18n postprocess: unmatched ICU - ${s} with key: ${f}`);return I.shift()}return s})),n}(t,e)}function TE(t,e,n,s,f){if(t=Tn(t),Array.isArray(t))for(let I=0;I>20;if(hd(t)||!t.multi){const Oe=new Bi(re,f,mn),Te=xE(q,e,f?fe:fe+_e,be);-1===Te?(Hh(td(se,j),I,q),OE(I,t,e.length),e.push(q),se.directiveStart++,se.directiveEnd++,f&&(se.providerIndexes+=1048576),n.push(Oe),j.push(Oe)):(n[Te]=Oe,j[Te]=Oe)}else{const Oe=xE(q,e,fe+_e,be),Te=xE(q,e,fe,fe+_e),Be=Oe>=0&&n[Oe],Fe=Te>=0&&n[Te];if(f&&!Fe||!f&&!Be){Hh(td(se,j),I,q);const Ke=function Q7(t,e,n,s,f){const I=new Bi(t,n,mn);return I.multi=[],I.index=e,I.componentProviders=0,bM(I,f,s&&!n),I}(f?$7:Y7,n.length,f,s,re);!f&&Fe&&(n[Te].providerFactory=Ke),OE(I,t,e.length,0),e.push(q),se.directiveStart++,se.directiveEnd++,f&&(se.providerIndexes+=1048576),n.push(Ke),j.push(Ke)}else{OE(I,t,Oe>-1?Oe:Te,bM(n[f?Te:Oe],re,!f&&s))}!f&&s&&Fe&&n[Te].componentProviders++}}}function OE(t,e,n,s){const f=hd(e),I=function t9(t){return!!t.useClass}(e);if(f||I){const re=(I?Tn(e.useClass):e).prototype.ngOnDestroy;if(re){const se=t.destroyHooks||(t.destroyHooks=[]);if(!f&&e.multi){const fe=se.indexOf(n);-1===fe?se.push(n,[s,re]):se[fe+1].push(s,re)}else se.push(n,re)}}}function bM(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function xE(t,e,n,s){for(let f=n;f{n.providersResolver=(s,f)=>function J7(t,e,n){const s=Er();if(s.firstCreatePass){const f=To(t);TE(n,s.data,s.blueprint,f,!0),TE(e,s.data,s.blueprint,f,!1)}}(s,f?f(t):t,e)}}class F0{}class X7{}class wM extends F0{constructor(e,n){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new jS(this);const s=ds(e);this._bootstrapComponents=tl(s.bootstrap),this._r3Injector=vS(e,n,[{provide:F0,useValue:this},{provide:ny,useValue:this.componentFactoryResolver}],Xn(e),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(e)}get injector(){return this._r3Injector}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class NE extends X7{constructor(e){super(),this.moduleType=e}create(e){return new wM(this.moduleType,e)}}class eR extends F0{constructor(e,n,s){super(),this.componentFactoryResolver=new jS(this),this.instance=null;const f=new nS([...e,{provide:F0,useValue:this},{provide:ny,useValue:this.componentFactoryResolver}],n||t1(),s,new Set(["environment"]));this.injector=f,f.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}}function EM(t,e,n=null){return new eR(t,e,n).injector}class A1{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const n=X3(0,e.type),s=n.length>0?EM([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,s)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}function tR(t){t.getStandaloneInjector=e=>e.get(A1).getOrCreateStandaloneInjector(t)}function lR(t,e,n){const s=vo()+t,f=nn();return f[s]===hr?nc(f,s,n?e.call(n):e()):uy(f,s)}function CM(t,e,n,s){return TM(nn(),vo(),t,e,n,s)}function fR(t,e,n,s,f){return OM(nn(),vo(),t,e,n,s,f)}function dR(t,e,n,s,f,I){return xM(nn(),vo(),t,e,n,s,f,I)}function hR(t,e,n,s,f,I,j){return PM(nn(),vo(),t,e,n,s,f,I,j)}function pR(t,e,n,s,f,I,j,q){const re=vo()+t,se=nn(),fe=ja(se,re,n,s,f,I);return Qo(se,re+4,j)||fe?nc(se,re+5,q?e.call(q,n,s,f,I,j):e(n,s,f,I,j)):uy(se,re+5)}function gR(t,e,n,s,f,I,j,q,re){const se=vo()+t,fe=nn(),be=ja(fe,se,n,s,f,I);return pd(fe,se+4,j,q)||be?nc(fe,se+6,re?e.call(re,n,s,f,I,j,q):e(n,s,f,I,j,q)):uy(fe,se+6)}function yR(t,e,n,s,f,I,j,q,re,se){const fe=vo()+t,be=nn();let _e=ja(be,fe,n,s,f,I);return d1(be,fe+4,j,q,re)||_e?nc(be,fe+7,se?e.call(se,n,s,f,I,j,q,re):e(n,s,f,I,j,q,re)):uy(be,fe+7)}function mR(t,e,n,s,f,I,j,q,re,se,fe){const be=vo()+t,_e=nn(),Oe=ja(_e,be,n,s,f,I);return ja(_e,be+4,j,q,re,se)||Oe?nc(_e,be+8,fe?e.call(fe,n,s,f,I,j,q,re,se):e(n,s,f,I,j,q,re,se)):uy(_e,be+8)}function vR(t,e,n,s){return NM(nn(),vo(),t,e,n,s)}function vy(t,e){const n=t[e];return n===hr?void 0:n}function TM(t,e,n,s,f,I){const j=e+n;return Qo(t,j,f)?nc(t,j+1,I?s.call(I,f):s(f)):vy(t,j+1)}function OM(t,e,n,s,f,I,j){const q=e+n;return pd(t,q,f,I)?nc(t,q+2,j?s.call(j,f,I):s(f,I)):vy(t,q+2)}function xM(t,e,n,s,f,I,j,q){const re=e+n;return d1(t,re,f,I,j)?nc(t,re+3,q?s.call(q,f,I,j):s(f,I,j)):vy(t,re+3)}function PM(t,e,n,s,f,I,j,q,re){const se=e+n;return ja(t,se,f,I,j,q)?nc(t,se+4,re?s.call(re,f,I,j,q):s(f,I,j,q)):vy(t,se+4)}function NM(t,e,n,s,f,I){let j=e+n,q=!1;for(let re=0;re=0;n--){const s=e[n];if(t===s.name)return s}}(e,n.pipeRegistry),n.data[f]=s,s.onDestroy&&(n.destroyHooks??(n.destroyHooks=[])).push(f,s.onDestroy)):s=n.data[f];const I=s.factory||(s.factory=Ju(s.type)),j=fs(mn);try{const q=Fc(!1),re=I();return Fc(q),function rN(t,e,n,s){n>=t.data.length&&(t.data[n]=null,t.blueprint[n]=null),e[n]=s}(n,nn(),f,re),re}finally{fs(j)}}function ER(t,e,n){const s=t+ei,f=nn(),I=Nc(f,s);return by(f,s)?TM(f,vo(),e,I.transform,n,I):I.transform(n)}function AR(t,e,n,s){const f=t+ei,I=nn(),j=Nc(I,f);return by(I,f)?OM(I,vo(),e,j.transform,n,s,j):j.transform(n,s)}function _R(t,e,n,s,f){const I=t+ei,j=nn(),q=Nc(j,I);return by(j,I)?xM(j,vo(),e,q.transform,n,s,f,q):q.transform(n,s,f)}function SR(t,e,n,s,f,I){const j=t+ei,q=nn(),re=Nc(q,j);return by(q,j)?PM(q,vo(),e,re.transform,n,s,f,I,re):re.transform(n,s,f,I)}function MR(t,e,n){const s=t+ei,f=nn(),I=Nc(f,s);return by(f,s)?NM(f,vo(),e,I.transform,n,I):I.transform.apply(I,n)}function by(t,e){return t[Sn].data[e].pure}A1.\u0275prov=tr({token:A1,providedIn:"environment",factory:()=>new A1(Hn(b0))});function kE(t){return e=>{setTimeout(t,void 0,e)}}const _o=class IR extends In{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,n,s){let f=e,I=n||(()=>null),j=s;if(e&&"object"==typeof e){const re=e;f=re.next?.bind(re),I=re.error?.bind(re),j=re.complete?.bind(re)}this.__isAsync&&(I=kE(I),f&&(f=kE(f)),j&&(j=kE(j)));const q=super.subscribe({next:f,error:I,complete:j});return e instanceof le&&e.add(q),q}};function DR(){return this._results[Symbol.iterator]()}class LE{get changes(){return this._changes||(this._changes=new _o)}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const n=LE.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=DR)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,n){return this._results.reduce(e,n)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,n){const s=this;s.dirty=!1;const f=vs(e);(this._changesDetected=!function Pg(t,e,n){if(t.length!==e.length)return!1;for(let s=0;s0;)this.remove(this.length-1)}get(e){const n=kM(this._lContainer);return null!==n&&n[e]||null}get length(){return this._lContainer.length-fi}createEmbeddedView(e,n,s){let f,I;"number"==typeof s?f=s:null!=s&&(f=s.index,I=s.injector);const j=e.createEmbeddedView(n||{},I);return this.insert(j,f),j}createComponent(e,n,s,f,I){const j=e&&!Jl(e);let q;if(j)q=n;else{const be=n||{};q=be.index,s=be.injector,f=be.projectableNodes,I=be.environmentInjector||be.ngModuleRef}const re=j?e:new ay(Ur(e)),se=s||this.parentInjector;if(!I&&null==re.ngModule){const _e=(j?se:this.parentInjector).get(b0,null);_e&&(I=_e)}const fe=re.create(se,f,void 0,I);return this.insert(fe.hostView,q),fe}insert(e,n){const s=e._lView,f=s[Sn];if(function yv(t){return hs(t[li])}(s)){const fe=this.indexOf(e);if(-1!==fe)this.detach(fe);else{const be=s[li],_e=new RM(be,be[ao],be[li]);_e.detach(_e.indexOf(e))}}const I=this._adjustIndex(n),j=this._lContainer;Yg(f,s,j,I);const q=oe(I,j),re=s[yr],se=Yc(re,j[oa]);return null!==se&&function Zc(t,e,n,s,f,I){s[Ca]=f,s[ao]=e,ke(t,s,n,1,f,I)}(f,j[ao],re,s,se,q),e.attachToViewContainerRef(),Na(BE(j),I,e),e}move(e,n){return this.insert(e,n)}indexOf(e){const n=kM(this._lContainer);return null!==n?n.indexOf(e):-1}remove(e){const n=this._adjustIndex(e,-1),s=$g(this._lContainer,n);s&&(Jh(BE(this._lContainer),n),Qg(s[Sn],s))}detach(e){const n=this._adjustIndex(e,-1),s=$g(this._lContainer,n);return s&&null!=Jh(BE(this._lContainer),n)?new sy(s):null}_adjustIndex(e,n=0){return e??this.length+n}};function kM(t){return t[zf]}function BE(t){return t[zf]||(t[zf]=[])}function LM(t,e){let n;const s=e[t.index];if(hs(s))n=s;else{let f;if(8&t.type)f=Vi(s);else{const I=e[yr];f=I.createComment("");const j=ai(t,e);Jc(I,Yc(I,j),f,function Jv(t,e){return t.nextSibling(e)}(I,j),!1)}e[t.index]=n=NS(s,e,f,t),s1(e,n)}return new RM(n,t,e)}class jE{constructor(e){this.queryList=e,this.matches=null}clone(){return new jE(this.queryList)}setDirty(){this.queryList.setDirty()}}class FE{constructor(e=[]){this.queries=e}createEmbeddedView(e){const n=e.queries;if(null!==n){const s=null!==e.contentQueries?e.contentQueries[0]:n.length,f=[];for(let I=0;I0)s.push(j[q/2]);else{const se=I[q+1],fe=e[-re];for(let be=fi;be(null===f&&(f=Ai().compileNgModule(Ss,`ng:///${t.name}/\u0275mod.js`,{type:t,bootstrap:vs(e.bootstrap||Fr).map(Tn),declarations:s.map(Tn),imports:vs(e.imports||Fr).map(Tn).map(YM),exports:vs(e.exports||Fr).map(Tn).map(YM),schemas:e.schemas?vs(e.schemas):null,id:e.id||null}),f.schemas||(f.schemas=[])),f)});let I=null;Object.defineProperty(t,ra,{get:()=>{if(null===I){const q=Ai();I=q.compileFactory(Ss,`ng:///${t.name}/\u0275fac.js`,{name:t.name,type:t,deps:Go(t),target:q.FactoryTarget.NgModule,typeArgumentCount:0})}return I},configurable:!1});let j=null;Object.defineProperty(t,wc,{get:()=>{if(null===j){const q={name:t.name,type:t,providers:e.providers||Fr,imports:[(e.imports||Fr).map(Tn),(e.exports||Fr).map(Tn)]};j=Ai().compileInjector(Ss,`ng:///${t.name}/\u0275inj.js`,q)}return j},configurable:!1})})(t,e),void 0!==e.id&&Gi(t,e.id),function GR(t,e){wy.push({moduleType:t,ngModule:e})}(t,e)}function QR(t,e){const n=vs(e.declarations||Fr),s=K0(t);n.forEach(f=>{if((f=Tn(f)).hasOwnProperty(Sh)){JM(Ur(f),s)}else!f.hasOwnProperty(Hu)&&!f.hasOwnProperty(Uf)&&(f.ngSelectorScope=t)})}function JM(t,e){t.directiveDefs=()=>Array.from(e.compilation.directives).map(n=>n.hasOwnProperty(Sh)?Ur(n):yi(n)).filter(n=>!!n),t.pipeDefs=()=>Array.from(e.compilation.pipes).map(n=>yo(n)),t.schemas=e.schemas,t.tView=null}function K0(t){if(VM(t))return function XR(t){const e=ds(t,!0);if(null!==e.transitiveCompileScopes)return e.transitiveCompileScopes;const n={schemas:e.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return tl(e.imports).forEach(s=>{const f=K0(s);f.exported.directives.forEach(I=>n.compilation.directives.add(I)),f.exported.pipes.forEach(I=>n.compilation.pipes.add(I))}),tl(e.declarations).forEach(s=>{yo(s)?n.compilation.pipes.add(s):n.compilation.directives.add(s)}),tl(e.exports).forEach(s=>{const f=s;if(VM(f)){const I=K0(f);I.exported.directives.forEach(j=>{n.compilation.directives.add(j),n.exported.directives.add(j)}),I.exported.pipes.forEach(j=>{n.compilation.pipes.add(j),n.exported.pipes.add(j)})}else yo(f)?n.exported.pipes.add(f):n.exported.directives.add(f)}),e.transitiveCompileScopes=n,n}(t);if(Ic(t)){if(null!==(Ur(t)||yi(t)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([t]),pipes:new Set}};if(null!==yo(t))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([t])}}}throw new Error(`${t.name} does not have a module def (\u0275mod property)`)}function YM(t){return zM(t)?t.ngModule:t}let GE=0;function qR(t,e){let n=null;(function Ra(t,e){jg(e)&&(wo.set(t,e),ef.add(t))})(t,e),XM(t,e),Object.defineProperty(t,Sh,{get:()=>{if(null===n){const s=Ai();if(jg(e)){const se=[`Component '${t.name}' is not resolved:`];throw e.templateUrl&&se.push(` - templateUrl: ${e.templateUrl}`),e.styleUrls&&e.styleUrls.length&&se.push(` - styleUrls: ${JSON.stringify(e.styleUrls)}`),se.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(se.join("\n"))}const f=function WR(){return U0}();let I=e.preserveWhitespaces;void 0===I&&(I=null!==f&&void 0!==f.preserveWhitespaces&&f.preserveWhitespaces);let j=e.encapsulation;void 0===j&&(j=null!==f&&void 0!==f.defaultEncapsulation?f.defaultEncapsulation:Da.Emulated);const q=e.templateUrl||`ng:///${t.name}/template.html`,re={...qM(t,e),typeSourceSpan:s.createParseSourceSpan("Component",t.name,q),template:e.template||"",preserveWhitespaces:I,styles:e.styles||Fr,animations:e.animations,declarations:[],changeDetection:e.changeDetection,encapsulation:j,interpolation:e.interpolation,viewProviders:e.viewProviders||null};GE++;try{if(re.usesInheritance&&e8(t),n=s.compileComponent(Ss,q,re),e.standalone){const se=vs(e.imports||Fr),{directiveDefs:fe,pipeDefs:be}=function tk(t,e){let n=null,s=null;return{directiveDefs:()=>{if(null===n){n=[Ur(t)];const j=new Set;for(const q of e){const re=Tn(q);if(!j.has(re))if(j.add(re),ds(re)){const se=K0(re);for(const fe of se.exported.directives){const be=Ur(fe)||yi(fe);be&&!j.has(fe)&&(j.add(fe),n.push(be))}}else{const se=Ur(re)||yi(re);se&&n.push(se)}}}return n},pipeDefs:()=>{if(null===s){s=[];const j=new Set;for(const q of e){const re=Tn(q);if(!j.has(re))if(j.add(re),ds(re)){const se=K0(re);for(const fe of se.exported.pipes){const be=yo(fe);be&&!j.has(fe)&&(j.add(fe),s.push(be))}}else{const se=yo(re);se&&s.push(se)}}}return s}}}(t,se);n.directiveDefs=fe,n.pipeDefs=be,n.dependencies=()=>se.map(Tn)}}finally{GE--}if(0===GE&&function ZR(){if(!VE){VE=!0;try{for(let t=wy.length-1;t>=0;t--){const{moduleType:e,ngModule:n}=wy[t];n.declarations&&n.declarations.every(HM)&&(wy.splice(t,1),QR(e,n))}}finally{VE=!1}}}(),function nk(t){return void 0!==t.ngSelectorScope}(t)){const se=K0(t.ngSelectorScope);JM(n,se)}if(e.schemas){if(!e.standalone)throw new Error(`The 'schemas' was specified for the ${kr(t)} but is only valid on a component that is standalone.`);n.schemas=e.schemas}else e.standalone&&(n.schemas=[])}return n},configurable:!1})}function $M(t,e){let n=null;XM(t,e||{}),Object.defineProperty(t,Hu,{get:()=>{if(null===n){const s=QM(t,e||{});n=Ai().compileDirective(Ss,s.sourceMapUrl,s.metadata)}return n},configurable:!1})}function QM(t,e){const n=t&&t.name,s=`ng:///${n}/\u0275dir.js`,f=Ai(),I=qM(t,e);return I.typeSourceSpan=f.createParseSourceSpan("Directive",n,s),I.usesInheritance&&e8(t),{metadata:I,sourceMapUrl:s}}function XM(t,e){let n=null;Object.defineProperty(t,ra,{get:()=>{if(null===n){const s=QM(t,e),f=Ai();n=f.compileFactory(Ss,`ng:///${t.name}/\u0275fac.js`,{name:s.metadata.name,type:s.metadata.type,typeArgumentCount:0,deps:Go(t),target:f.FactoryTarget.Directive})}return n},configurable:!1})}function rk(t){return Object.getPrototypeOf(t.prototype)===Object.prototype}function qM(t,e){const n=Oi(),s=n.ownPropMetadata(t);return{name:t.name,type:t,selector:void 0!==e.selector?e.selector:null,host:e.host||na,propMetadata:s,inputs:e.inputs||Fr,outputs:e.outputs||Fr,queries:t8(t,s,n8),lifecycle:{usesOnChanges:n.hasLifecycleHook(t,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!rk(t),exportAs:sk(e.exportAs),providers:e.providers||null,viewQueries:t8(t,s,r8),isStandalone:!!e.standalone,hostDirectives:e.hostDirectives?.map(f=>"function"==typeof f?{directive:f}:f)||null}}function e8(t){const e=Object.prototype;let n=Object.getPrototypeOf(t.prototype).constructor;for(;n&&n!==e;)!yi(n)&&!Ur(n)&&uk(n)&&$M(n,null),n=Object.getPrototypeOf(n)}function ik(t){return"string"==typeof t?o8(t):Tn(t)}function ok(t,e){return{propertyName:t,predicate:ik(e.selector),descendants:e.descendants,first:e.first,read:e.read?e.read:null,static:!!e.static,emitDistinctChangesOnly:!!e.emitDistinctChangesOnly}}function t8(t,e,n){const s=[];for(const f in e)if(e.hasOwnProperty(f)){const I=e[f];I.forEach(j=>{if(n(j)){if(!j.selector)throw new Error(`Can't construct a query for the property "${f}" of "${kr(t)}" since the query selector wasn't defined.`);if(I.some(i8))throw new Error("Cannot combine @Input decorators with query decorators");s.push(ok(f,j))}})}return s}function sk(t){return void 0===t?null:o8(t)}function n8(t){const e=t.ngMetadataName;return"ContentChild"===e||"ContentChildren"===e}function r8(t){const e=t.ngMetadataName;return"ViewChild"===e||"ViewChildren"===e}function i8(t){return"Input"===t.ngMetadataName}function o8(t){return t.split(",").map(e=>e.trim())}const ak=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function uk(t){const e=Oi();if(ak.some(s=>e.hasLifecycleHook(t,s)))return!0;const n=e.propMetadata(t);for(const s in n){const f=n[s];for(let I=0;It,void 0,void 0,(t,e)=>$M(t,e));qi("Component",(t={})=>({changeDetection:Mc.Default,...t}),lk,void 0,(t,e)=>qR(t,e)),qi("Pipe",t=>({pure:!0,...t}),void 0,void 0,(t,e)=>function ck(t,e){let n=null,s=null;Object.defineProperty(t,ra,{get:()=>{if(null===s){const f=s8(t,e),I=Ai(f.type);s=I.compileFactory(Ss,`ng:///${f.name}/\u0275fac.js`,{name:f.name,type:f.type,typeArgumentCount:0,deps:Go(t),target:I.FactoryTarget.Pipe})}return s},configurable:!1}),Object.defineProperty(t,Uf,{get:()=>{if(null===n){const f=s8(t,e);n=Ai(f.type).compilePipe(Ss,`ng:///${f.name}/\u0275pipe.js`,f)}return n},configurable:!1})}(t,e)),du("Input",t=>({bindingPropertyName:t})),du("Output",t=>({bindingPropertyName:t})),du("HostBinding",t=>({hostPropertyName:t})),du("HostListener",(t,e)=>({eventName:t,args:e})),qi("NgModule",t=>t,void 0,void 0,(t,e)=>JR(t,e));function M1(...t){}const a8=new qn("Application Initializer");class il{constructor(e){this.appInits=e,this.resolve=M1,this.reject=M1,this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,s)=>{this.resolve=n,this.reject=s})}runInitializers(){if(this.initialized)return;const e=[],n=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let s=0;s{f.subscribe({complete:j,error:q})});e.push(I)}}Promise.all(e).then(()=>{n()}).catch(s=>{this.reject(s)}),0===e.length&&n(),this.initialized=!0}}il.\u0275fac=function(e){return new(e||il)(Hn(a8,8))},il.\u0275prov=tr({token:il,factory:il.\u0275fac,providedIn:"root"});const z0=new qn("AppId",{providedIn:"root",factory:u8});function u8(){return`${ZE()}${ZE()}${ZE()}`}function ZE(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const c8=new qn("Platform Initializer"),JE=new qn("Platform ID",{providedIn:"platform",factory:()=>"unknown"});new qn("Application Packages Root URL"),new qn("AnimationModuleType");class md{log(e){console.log(e)}warn(e){console.warn(e)}}md.\u0275fac=function(e){return new(e||md)},md.\u0275prov=tr({token:md,factory:md.\u0275fac,providedIn:"platform"});const ol=new qn("LocaleId",{providedIn:"root",factory:()=>Ki(ol,Mr.Optional|Mr.SkipSelf)||function fk(){return typeof $localize<"u"&&$localize.locale||j0}()}),dk=new qn("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"});new qn("Translations"),new qn("TranslationsFormat");var l8;!function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"}(l8||(l8={}));class hk{constructor(e,n){this.ngModuleFactory=e,this.componentFactories=n}}class Ey{compileModuleSync(e){return new NE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const n=this.compileModuleSync(e),f=tl(ds(e).declarations).reduce((I,j)=>{const q=Ur(j);return q&&I.push(new ay(q)),I},[]);return new hk(n,f)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}Ey.\u0275fac=function(e){return new(e||Ey)},Ey.\u0275prov=tr({token:Ey,factory:Ey.\u0275fac,providedIn:"root"});new qn("compilerOptions");const yk=Promise.resolve(0);function YE(t){typeof Zone>"u"?yk.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class Xo{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:s=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new _o(!1),this.onMicrotaskEmpty=new _o(!1),this.onStable=new _o(!1),this.onError=new _o(!1),typeof Zone>"u")throw new hn(908,!1);Zone.assertZonePatched();const f=this;f._nesting=0,f._outer=f._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(f._inner=f._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(f._inner=f._inner.fork(Zone.longStackTraceZoneSpec)),f.shouldCoalesceEventChangeDetection=!s&&n,f.shouldCoalesceRunChangeDetection=s,f.lastRequestAnimationFrameId=-1,f.nativeRequestAnimationFrame=function mk(){let t=ii.requestAnimationFrame,e=ii.cancelAnimationFrame;if(typeof Zone<"u"&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const s=e[Zone.__symbol__("OriginalDelegate")];s&&(e=s)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function wk(t){const e=()=>{!function bk(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(ii,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,QE(t),t.isCheckStableRunning=!0,$E(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),QE(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,s,f,I,j,q)=>{try{return h8(t),n.invokeTask(f,I,j,q)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===I.type||t.shouldCoalesceRunChangeDetection)&&e(),p8(t)}},onInvoke:(n,s,f,I,j,q,re)=>{try{return h8(t),n.invoke(f,I,j,q,re)}finally{t.shouldCoalesceRunChangeDetection&&e(),p8(t)}},onHasTask:(n,s,f,I)=>{n.hasTask(f,I),s===f&&("microTask"==I.change?(t._hasPendingMicrotasks=I.microTask,QE(t),$E(t)):"macroTask"==I.change&&(t.hasPendingMacrotasks=I.macroTask))},onHandleError:(n,s,f,I)=>(n.handleError(f,I),t.runOutsideAngular(()=>t.onError.emit(I)),!1)})}(f)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Xo.isInAngularZone())throw new hn(909,!1)}static assertNotInAngularZone(){if(Xo.isInAngularZone())throw new hn(909,!1)}run(e,n,s){return this._inner.run(e,n,s)}runTask(e,n,s,f){const I=this._inner,j=I.scheduleEventTask("NgZoneEvent: "+f,e,vk,M1,M1);try{return I.runTask(j,n,s)}finally{I.cancelTask(j)}}runGuarded(e,n,s){return this._inner.runGuarded(e,n,s)}runOutsideAngular(e){return this._outer.run(e)}}const vk={};function $E(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function QE(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function h8(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function p8(t){t._nesting--,$E(t)}class Ek{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new _o,this.onMicrotaskEmpty=new _o,this.onStable=new _o,this.onError=new _o}run(e,n,s){return e.apply(n,s)}runGuarded(e,n,s){return e.apply(n,s)}runOutsideAngular(e){return e()}runTask(e,n,s,f){return e.apply(n,s)}}const g8=new qn(""),I1=new qn("");class uf{constructor(e,n,s){this._ngZone=e,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,XE||(function Ak(t){XE=t}(s),s.addToWindow(n)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Xo.assertNotInAngularZone(),YE(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())YE(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(e)||(clearTimeout(n.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,n,s){let f=-1;n&&n>0&&(f=setTimeout(()=>{this._callbacks=this._callbacks.filter(I=>I.timeoutId!==f),e(this._didWork,this.getPendingTasks())},n)),this._callbacks.push({doneCb:e,timeoutId:f,updateCb:s})}whenStable(e,n,s){if(s&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,n,s),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,n,s){return[]}}uf.\u0275fac=function(e){return new(e||uf)(Hn(Xo),Hn(cf),Hn(I1))},uf.\u0275prov=tr({token:uf,factory:uf.\u0275fac});class cf{constructor(){this._applications=new Map}registerApplication(e,n){this._applications.set(e,n)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,n=!0){return XE?.findTestabilityInTree(this,e,n)??null}}let XE;cf.\u0275fac=function(e){return new(e||cf)},cf.\u0275prov=tr({token:cf,factory:cf.\u0275fac,providedIn:"platform"});const sl=!1;let lf=null;const y8=new qn("AllowMultipleToken"),qE=new qn("PlatformDestroyListeners"),_k=new qn("appBootstrapListener");function m8(t){const e=t.get(c8,null);e&&e.forEach(n=>n())}function v8(t,e,n=[]){const s=`Platform: ${e}`,f=new qn(s);return(I=[])=>{let j=eA();if(!j||j.injector.get(y8,!1)){const q=[...n,...I,{provide:f,useValue:!0}];t?t(q):function Ik(t){if(lf&&!lf.get(y8,!1))throw new hn(400,!1);lf=t;const e=t.get(vd);return m8(t),e}(b8(q,s))}return function Ck(t){const e=eA();if(!e)throw new hn(401,!1);return e}()}}function b8(t=[],e){return $o.create({name:e,providers:[{provide:Jw,useValue:"platform"},{provide:qE,useValue:new Set([()=>lf=null])},...t]})}function eA(){return lf?.get(vd)??null}class vd{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,n){const s=E8(n?.ngZone,w8(n)),f=[{provide:Xo,useValue:s}];return s.run(()=>{const I=$o.create({providers:f,parent:this.injector,name:e.moduleType.name}),j=e.create(I),q=j.injector.get(A0,null);if(!q)throw new hn(402,!1);return s.runOutsideAngular(()=>{const re=s.onError.subscribe({next:se=>{q.handleError(se)}});j.onDestroy(()=>{D1(this._modules,j),re.unsubscribe()})}),A8(q,s,()=>{const re=j.injector.get(il);return re.runInitializers(),re.donePromise.then(()=>(Y6(j.injector.get(ol,j0)||j0),this._moduleDoBootstrap(j),j))})})}bootstrapModule(e,n=[]){const s=_8({},n);return function Sk(t,e,n){const s=new NE(n);return Promise.resolve(s)}(this.injector,0,e).then(f=>this.bootstrapModuleFactory(f,s))}_moduleDoBootstrap(e){const n=e.injector.get(ff);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(s=>n.bootstrap(s));else{if(!e.instance.ngDoBootstrap)throw new hn(-403,!1);e.instance.ngDoBootstrap(n)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new hn(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const e=this._injector.get(qE,null);e&&(e.forEach(n=>n()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}function w8(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}function E8(t,e){let n;return n="noop"===t?new Ek:("zone.js"===t?void 0:t)||new Xo(e),n}function A8(t,e,n){try{const s=n();return h1(s)?s.catch(f=>{throw e.runOutsideAngular(()=>t.handleError(f)),f}):s}catch(s){throw e.runOutsideAngular(()=>t.handleError(s)),s}}function _8(t,e){return t=Array.isArray(e)?e.reduce(_8,t):{...t,...e}}vd.\u0275fac=function(e){return new(e||vd)(Hn($o))},vd.\u0275prov=tr({token:vd,factory:vd.\u0275fac,providedIn:"platform"});class ff{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,n,s){this._zone=e,this._injector=n,this._exceptionHandler=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const f=new ht(j=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{j.next(this._stable),j.complete()})}),I=new ht(j=>{let q;this._zone.runOutsideAngular(()=>{q=this._zone.onStable.subscribe(()=>{Xo.assertNotInAngularZone(),YE(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,j.next(!0))})})});const re=this._zone.onUnstable.subscribe(()=>{Xo.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{j.next(!1)}))});return()=>{q.unsubscribe(),re.unsubscribe()}});this.isStable=cr(f,I.pipe(function qr(t={}){const{connector:e=(()=>new In),resetOnError:n=!0,resetOnComplete:s=!0,resetOnRefCountZero:f=!0}=t;return I=>{let j,q,re,se=0,fe=!1,be=!1;const _e=()=>{q?.unsubscribe(),q=void 0},Oe=()=>{_e(),j=re=void 0,fe=be=!1},Te=()=>{const Be=j;Oe(),Be?.unsubscribe()};return Pn((Be,Fe)=>{se++,!be&&!fe&&_e();const Ke=re=re??e();Fe.add(()=>{se--,0===se&&!be&&!fe&&(q=ri(Te,f))}),Ke.subscribe(Fe),!j&&se>0&&(j=new je({next:et=>Ke.next(et),error:et=>{be=!0,_e(),q=ri(Oe,n,et),Ke.error(et)},complete:()=>{fe=!0,_e(),q=ri(Oe,s),Ke.complete()}}),wr(Be).subscribe(j))})(I)}}()))}bootstrap(e,n){sl&&this.warnIfDestroyed();const s=e instanceof iS;if(!this._injector.get(il).done){const _e="Cannot bootstrap as there are still asynchronous initializers running."+(!s&&Ic(e)?"":" Bootstrap components in the `ngDoBootstrap` method of the root module.");throw new hn(405,sl&&_e)}let I;I=s?e:this._injector.get(ny).resolveComponentFactory(e),this.componentTypes.push(I.componentType);const j=function Mk(t){return t.isBoundToModule}(I)?void 0:this._injector.get(F0),q=n||I.selector,re=I.create($o.NULL,[],q,j),se=re.location.nativeElement,fe=re.injector.get(g8,null);return fe?.registerApplication(se),re.onDestroy(()=>{this.detachView(re.hostView),D1(this.components,re),fe?.unregisterApplication(se)}),this._loadComponent(re),re}tick(){if(sl&&this.warnIfDestroyed(),this._runningTick)throw new hn(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){sl&&this.warnIfDestroyed();const n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){sl&&this.warnIfDestroyed();const n=e;D1(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const n=this._injector.get(_k,[]);n.push(...this._bootstrapListeners),n.forEach(s=>s(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return sl&&this.warnIfDestroyed(),this._destroyListeners.push(e),()=>D1(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new hn(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){sl&&this._destroyed&&console.warn(wi(406,"This instance of the `ApplicationRef` has already been destroyed."))}}function D1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}ff.\u0275fac=function(e){return new(e||ff)(Hn(Xo),Hn(b0),Hn(A0))},ff.\u0275prov=tr({token:ff,factory:ff.\u0275fac,providedIn:"root"});class tA{}tA.__NG_ELEMENT_ID__=function Ok(t){return function xk(t,e,n){if(Vf(t)&&!n){const s=xo(t.index,e);return new sy(s,s)}if(47&t.type){const s=e[zi];return new sy(s,e)}return null}(Hi(),nn(),16==(16&t))};class C8{constructor(){}supports(e){return f1(e)}create(e){return new Bk(e)}}const Lk=(t,e)=>e;class Bk{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Lk}forEachItem(e){let n;for(n=this._itHead;null!==n;n=n._next)e(n)}forEachOperation(e){let n=this._itHead,s=this._removalsHead,f=0,I=null;for(;n||s;){const j=!s||n&&n.currentIndex{j=this._trackByFn(f,q),null!==n&&Object.is(n.trackById,j)?(s&&(n=this._verifyReinsertion(n,q,j,f)),Object.is(n.item,q)||this._addIdentityChange(n,q)):(n=this._mismatch(n,q,j,f),s=!0),n=n._next,f++}),this.length=f;return this._truncate(n),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,n,s,f){let I;return null===e?I=this._itTail:(I=e._prev,this._remove(e)),null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(s,null))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._reinsertAfter(e,I,f)):null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(s,f))?(Object.is(e.item,n)||this._addIdentityChange(e,n),this._moveAfter(e,I,f)):e=this._addAfter(new jk(n,s),I,f),e}_verifyReinsertion(e,n,s,f){let I=null===this._unlinkedRecords?null:this._unlinkedRecords.get(s,null);return null!==I?e=this._reinsertAfter(I,e._prev,f):e.currentIndex!=f&&(e.currentIndex=f,this._addToMoves(e,f)),e}_truncate(e){for(;null!==e;){const n=e._next;this._addToRemovals(this._unlink(e)),e=n}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,n,s){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const f=e._prevRemoved,I=e._nextRemoved;return null===f?this._removalsHead=I:f._nextRemoved=I,null===I?this._removalsTail=f:I._prevRemoved=f,this._insertAfter(e,n,s),this._addToMoves(e,s),e}_moveAfter(e,n,s){return this._unlink(e),this._insertAfter(e,n,s),this._addToMoves(e,s),e}_addAfter(e,n,s){return this._insertAfter(e,n,s),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,n,s){const f=null===n?this._itHead:n._next;return e._next=f,e._prev=n,null===f?this._itTail=e:f._prev=e,null===n?this._itHead=e:n._next=e,null===this._linkedRecords&&(this._linkedRecords=new T8),this._linkedRecords.put(e),e.currentIndex=s,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const n=e._prev,s=e._next;return null===n?this._itHead=s:n._next=s,null===s?this._itTail=n:s._prev=n,e}_addToMoves(e,n){return e.previousIndex===n||(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new T8),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,n){return e.item=n,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}}class jk{constructor(e,n){this.item=e,this.trackById=n,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Fk{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,n){let s;for(s=this._head;null!==s;s=s._nextDup)if((null===n||n<=s.currentIndex)&&Object.is(s.trackById,e))return s;return null}remove(e){const n=e._prevDup,s=e._nextDup;return null===n?this._head=s:n._nextDup=s,null===s?this._tail=n:s._prevDup=n,null===this._head}}class T8{constructor(){this.map=new Map}put(e){const n=e.trackById;let s=this.map.get(n);s||(s=new Fk,this.map.set(n,s)),s.add(e)}get(e,n){const s=e,f=this.map.get(s);return f?f.get(e,n):null}remove(e){const n=e.trackById;return this.map.get(n).remove(e)&&this.map.delete(n),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function O8(t,e,n){const s=t.previousIndex;if(null===s)return s;let f=0;return n&&s{if(n&&n.key===f)this._maybeAddToChanges(n,s),this._appendAfter=n,n=n._next;else{const I=this._getOrCreateRecordForKey(f,s);n=this._insertBeforeOrAppend(n,I)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(let s=n;null!==s;s=s._nextRemoved)s===this._mapHead&&(this._mapHead=null),this._records.delete(s.key),s._nextRemoved=s._next,s.previousValue=s.currentValue,s.currentValue=null,s._prev=null,s._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,n){if(e){const s=e._prev;return n._next=e,n._prev=s,e._prev=n,s&&(s._next=n),e===this._mapHead&&(this._mapHead=n),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=n,n._prev=this._appendAfter):this._mapHead=n,this._appendAfter=n,null}_getOrCreateRecordForKey(e,n){if(this._records.has(e)){const f=this._records.get(e);this._maybeAddToChanges(f,n);const I=f._prev,j=f._next;return I&&(I._next=j),j&&(j._prev=I),f._next=null,f._prev=null,f}const s=new Kk(e);return this._records.set(e,s),s.currentValue=n,this._addToAdditions(s),s}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,n){Object.is(n,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=n,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,n){e instanceof Map?e.forEach(n):Object.keys(e).forEach(s=>n(e[s],s))}}class Kk{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function P8(){return new _u([new C8])}class _u{constructor(e){this.factories=e}static create(e,n){if(null!=n){const s=n.factories.slice();e=e.concat(s)}return new _u(e)}static extend(e){return{provide:_u,useFactory:n=>_u.create(e,n||P8()),deps:[[_u,new ql,new Xl]]}}find(e){const n=this.factories.find(s=>s.supports(e));if(null!=n)return n;throw new hn(901,!1)}}function N8(){return new Ka([new x8])}_u.\u0275prov=tr({token:_u,providedIn:"root",factory:P8});class Ka{constructor(e){this.factories=e}static create(e,n){if(n){const s=n.factories.slice();e=e.concat(s)}return new Ka(e)}static extend(e){return{provide:Ka,useFactory:n=>Ka.create(e,n||N8()),deps:[[Ka,new ql,new Xl]]}}find(e){const n=this.factories.find(s=>s.supports(e));if(n)return n;throw new hn(901,!1)}}Ka.\u0275prov=tr({token:Ka,providedIn:"root",factory:N8});const zk=[new x8],Vk=[new C8],Hk=(new _u(Vk),new Ka(zk),v8(null,"core",[]));class V0{constructor(e){}}function sA(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}V0.\u0275fac=function(e){return new(e||V0)(Hn(ff))},V0.\u0275mod=js({type:V0}),V0.\u0275inj=Ls({});let aA=null;function sc(){return aA}class Zk{}const Ii=new qn("DocumentToken");class wd{historyGo(e){throw new Error("Not implemented")}}wd.\u0275fac=function(e){return new(e||wd)},wd.\u0275prov=tr({token:wd,factory:function(){return function Jk(){return Hn(H0)}()},providedIn:"platform"});new qn("Location Initialized");class H0 extends wd{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return sc().getBaseHref(this._doc)}onPopState(e){const n=sc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){const n=sc().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,s){R8()?this._history.pushState(e,n,s):this._location.hash=s}replaceState(e,n,s){R8()?this._history.replaceState(e,n,s):this._location.hash=s}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}function R8(){return!!window.history.pushState}function uA(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function k8(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length,s=n-("/"===t[n-1]?1:0);return t.slice(0,s)+t.slice(n)}function al(t){return t&&"?"!==t[0]?"?"+t:t}H0.\u0275fac=function(e){return new(e||H0)(Hn(Ii))},H0.\u0275prov=tr({token:H0,factory:function(){return function Yk(){return new H0(Hn(Ii))}()},providedIn:"platform"});class df{historyGo(e){throw new Error("Not implemented")}}df.\u0275fac=function(e){return new(e||df)},df.\u0275prov=tr({token:df,factory:function(){return Ki(W0)},providedIn:"root"});const L8=new qn("appBaseHref");class W0 extends df{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??Ki(Ii).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return uA(this._baseHref,e)}path(e=!1){const n=this._platformLocation.pathname+al(this._platformLocation.search),s=this._platformLocation.hash;return s&&e?`${n}${s}`:n}pushState(e,n,s,f){const I=this.prepareExternalUrl(s+al(f));this._platformLocation.pushState(e,n,I)}replaceState(e,n,s,f){const I=this.prepareExternalUrl(s+al(f));this._platformLocation.replaceState(e,n,I)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}W0.\u0275fac=function(e){return new(e||W0)(Hn(wd),Hn(L8,8))},W0.\u0275prov=tr({token:W0,factory:W0.\u0275fac,providedIn:"root"});class Ay extends df{constructor(e,n){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let n=this._platformLocation.hash;return null==n&&(n="#"),n.length>0?n.substring(1):n}prepareExternalUrl(e){const n=uA(this._baseHref,e);return n.length>0?"#"+n:n}pushState(e,n,s,f){let I=this.prepareExternalUrl(s+al(f));0==I.length&&(I=this._platformLocation.pathname),this._platformLocation.pushState(e,n,I)}replaceState(e,n,s,f){let I=this.prepareExternalUrl(s+al(f));0==I.length&&(I=this._platformLocation.pathname),this._platformLocation.replaceState(e,n,I)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}Ay.\u0275fac=function(e){return new(e||Ay)(Hn(wd),Hn(L8,8))},Ay.\u0275prov=tr({token:Ay,factory:Ay.\u0275fac});class ac{constructor(e){this._subject=new _o,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const n=this._locationStrategy.getBaseHref();this._basePath=function Xk(t){if(new RegExp("^(https?:)?//").test(t)){const[,n]=t.split(/\/\/[^\/]+/);return n}return t}(k8(B8(n))),this._locationStrategy.onPopState(s=>{this._subject.emit({url:this.path(!0),pop:!0,state:s.state,type:s.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+al(n))}normalize(e){return ac.stripTrailingSlash(function Qk(t,e){if(!t||!e.startsWith(t))return e;const n=e.substring(t.length);return""===n||["/",";","?","#"].includes(n[0])?n:e}(this._basePath,B8(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",s=null){this._locationStrategy.pushState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+al(n)),s)}replaceState(e,n="",s=null){this._locationStrategy.replaceState(s,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+al(n)),s)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)})),()=>{const n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(s=>s(e,n))}subscribe(e,n,s){return this._subject.subscribe({next:e,error:n,complete:s})}}function B8(t){return t.replace(/\/index.html$/,"")}ac.normalizeQueryParams=al,ac.joinWithSlash=uA,ac.stripTrailingSlash=k8,ac.\u0275fac=function(e){return new(e||ac)(Hn(df))},ac.\u0275prov=tr({token:ac,factory:function(){return function $k(){return new ac(Hn(df))}()},providedIn:"root"});const j8={ADP:[void 0,void 0,0],AFN:[void 0,"\u060b",0],ALL:[void 0,void 0,0],AMD:[void 0,"\u058f",2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],AZN:[void 0,"\u20bc"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,void 0,2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GHS:[void 0,"GH\u20b5"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:["\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLE:[void 0,void 0,2],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["F\u202fCFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var _y,Ed,qo,ni,Gs,ji,F8;function O1(t,e){return Va(As(t)[ci.DateFormat],e)}function x1(t,e){return Va(As(t)[ci.TimeFormat],e)}function P1(t,e){return Va(As(t)[ci.DateTimeFormat],e)}function za(t,e){const n=As(t),s=n[ci.NumberSymbols][e];if(typeof s>"u"){if(e===ji.CurrencyDecimal)return n[ci.NumberSymbols][ji.Decimal];if(e===ji.CurrencyGroup)return n[ci.NumberSymbols][ji.Group]}return s}function cA(t,e){return As(t)[ci.NumberFormats][e]}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific"}(_y||(_y={})),function(t){t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other"}(Ed||(Ed={})),function(t){t[t.Format=0]="Format",t[t.Standalone=1]="Standalone"}(qo||(qo={})),function(t){t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short"}(ni||(ni={})),function(t){t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full"}(Gs||(Gs={})),function(t){t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t.Infinity=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup"}(ji||(ji={})),function(t){t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday"}(F8||(F8={}));const oL=G6;function U8(t){if(!t[ci.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ci.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Va(t,e){for(let n=e;n>-1;n--)if(typeof t[n]<"u")return t[n];throw new Error("Locale data API: locale data undefined")}function lA(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}function uL(t,e,n="en"){const s=function iL(t){return As(t)[ci.Currencies]}(n)[t]||j8[t]||[],f=s[1];return"narrow"===e&&"string"==typeof f?f:s[0]||t}const cL=2;const fL=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Sy={},dL=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var uc,zr,Vr;function hL(t,e,n,s){let f=function AL(t){if(V8(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[f,I=1,j=1]=t.split("-").map(q=>+q);return N1(f,I-1,j)}const n=parseFloat(t);if(!isNaN(t-n))return new Date(n);let s;if(s=t.match(fL))return function _L(t){const e=new Date(0);let n=0,s=0;const f=t[8]?e.setUTCFullYear:e.setFullYear,I=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),s=Number(t[9]+t[11])),f.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const j=Number(t[4]||0)-n,q=Number(t[5]||0)-s,re=Number(t[6]||0),se=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return I.call(e,j,q,re,se),e}(s)}const e=new Date(t);if(!V8(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=ul(n,e)||e;let q,j=[];for(;e;){if(q=dL.exec(e),!q){j.push(e);break}{j=j.concat(q.slice(1));const fe=j.pop();if(!fe)break;e=fe}}let re=f.getTimezoneOffset();s&&(re=z8(s,re),f=function EL(t,e,n){const s=n?-1:1,f=t.getTimezoneOffset(),I=z8(e,f);return function wL(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}(t,s*(I-f))}(f,s,!0));let se="";return j.forEach(fe=>{const be=function bL(t){if(dA[t])return dA[t];let e;switch(t){case"G":case"GG":case"GGG":e=pi(Vr.Eras,ni.Abbreviated);break;case"GGGG":e=pi(Vr.Eras,ni.Wide);break;case"GGGGG":e=pi(Vr.Eras,ni.Narrow);break;case"y":e=no(zr.FullYear,1,0,!1,!0);break;case"yy":e=no(zr.FullYear,2,0,!0,!0);break;case"yyy":e=no(zr.FullYear,3,0,!1,!0);break;case"yyyy":e=no(zr.FullYear,4,0,!1,!0);break;case"Y":e=B1(1);break;case"YY":e=B1(2,!0);break;case"YYY":e=B1(3);break;case"YYYY":e=B1(4);break;case"M":case"L":e=no(zr.Month,1,1);break;case"MM":case"LL":e=no(zr.Month,2,1);break;case"MMM":e=pi(Vr.Months,ni.Abbreviated);break;case"MMMM":e=pi(Vr.Months,ni.Wide);break;case"MMMMM":e=pi(Vr.Months,ni.Narrow);break;case"LLL":e=pi(Vr.Months,ni.Abbreviated,qo.Standalone);break;case"LLLL":e=pi(Vr.Months,ni.Wide,qo.Standalone);break;case"LLLLL":e=pi(Vr.Months,ni.Narrow,qo.Standalone);break;case"w":e=fA(1);break;case"ww":e=fA(2);break;case"W":e=fA(1,!0);break;case"d":e=no(zr.Date,1);break;case"dd":e=no(zr.Date,2);break;case"c":case"cc":e=no(zr.Day,1);break;case"ccc":e=pi(Vr.Days,ni.Abbreviated,qo.Standalone);break;case"cccc":e=pi(Vr.Days,ni.Wide,qo.Standalone);break;case"ccccc":e=pi(Vr.Days,ni.Narrow,qo.Standalone);break;case"cccccc":e=pi(Vr.Days,ni.Short,qo.Standalone);break;case"E":case"EE":case"EEE":e=pi(Vr.Days,ni.Abbreviated);break;case"EEEE":e=pi(Vr.Days,ni.Wide);break;case"EEEEE":e=pi(Vr.Days,ni.Narrow);break;case"EEEEEE":e=pi(Vr.Days,ni.Short);break;case"a":case"aa":case"aaa":e=pi(Vr.DayPeriods,ni.Abbreviated);break;case"aaaa":e=pi(Vr.DayPeriods,ni.Wide);break;case"aaaaa":e=pi(Vr.DayPeriods,ni.Narrow);break;case"b":case"bb":case"bbb":e=pi(Vr.DayPeriods,ni.Abbreviated,qo.Standalone,!0);break;case"bbbb":e=pi(Vr.DayPeriods,ni.Wide,qo.Standalone,!0);break;case"bbbbb":e=pi(Vr.DayPeriods,ni.Narrow,qo.Standalone,!0);break;case"B":case"BB":case"BBB":e=pi(Vr.DayPeriods,ni.Abbreviated,qo.Format,!0);break;case"BBBB":e=pi(Vr.DayPeriods,ni.Wide,qo.Format,!0);break;case"BBBBB":e=pi(Vr.DayPeriods,ni.Narrow,qo.Format,!0);break;case"h":e=no(zr.Hours,1,-12);break;case"hh":e=no(zr.Hours,2,-12);break;case"H":e=no(zr.Hours,1);break;case"HH":e=no(zr.Hours,2);break;case"m":e=no(zr.Minutes,1);break;case"mm":e=no(zr.Minutes,2);break;case"s":e=no(zr.Seconds,1);break;case"ss":e=no(zr.Seconds,2);break;case"S":e=no(zr.FractionalSeconds,1);break;case"SS":e=no(zr.FractionalSeconds,2);break;case"SSS":e=no(zr.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=k1(uc.Short);break;case"ZZZZZ":e=k1(uc.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=k1(uc.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=k1(uc.Long);break;default:return null}return dA[t]=e,e}(fe);se+=be?be(f,n,re):"''"===fe?"'":fe.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),se}function N1(t,e,n){const s=new Date(0);return s.setFullYear(t,e,n),s.setHours(0,0,0),s}function ul(t,e){const n=function qk(t){return As(t)[ci.LocaleId]}(t);if(Sy[n]=Sy[n]||{},Sy[n][e])return Sy[n][e];let s="";switch(e){case"shortDate":s=O1(t,Gs.Short);break;case"mediumDate":s=O1(t,Gs.Medium);break;case"longDate":s=O1(t,Gs.Long);break;case"fullDate":s=O1(t,Gs.Full);break;case"shortTime":s=x1(t,Gs.Short);break;case"mediumTime":s=x1(t,Gs.Medium);break;case"longTime":s=x1(t,Gs.Long);break;case"fullTime":s=x1(t,Gs.Full);break;case"short":const f=ul(t,"shortTime"),I=ul(t,"shortDate");s=R1(P1(t,Gs.Short),[f,I]);break;case"medium":const j=ul(t,"mediumTime"),q=ul(t,"mediumDate");s=R1(P1(t,Gs.Medium),[j,q]);break;case"long":const re=ul(t,"longTime"),se=ul(t,"longDate");s=R1(P1(t,Gs.Long),[re,se]);break;case"full":const fe=ul(t,"fullTime"),be=ul(t,"fullDate");s=R1(P1(t,Gs.Full),[fe,be])}return s&&(Sy[n][e]=s),s}function R1(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(n,s){return null!=e&&s in e?e[s]:n})),t}function Su(t,e,n="-",s,f){let I="";(t<0||f&&t<=0)&&(f?t=1-t:(t=-t,I=n));let j=String(t);for(;j.length0||q>-n)&&(q+=n),t===zr.Hours)0===q&&-12===n&&(q=12);else if(t===zr.FractionalSeconds)return function pL(t,e){return Su(t,3).substring(0,e)}(q,e);const re=za(j,ji.MinusSign);return Su(q,e,re,s,f)}}function pi(t,e,n=qo.Format,s=!1){return function(f,I){return function yL(t,e,n,s,f,I){switch(n){case Vr.Months:return function nL(t,e,n){const s=As(t),I=Va([s[ci.MonthsFormat],s[ci.MonthsStandalone]],e);return Va(I,n)}(e,f,s)[t.getMonth()];case Vr.Days:return function tL(t,e,n){const s=As(t),I=Va([s[ci.DaysFormat],s[ci.DaysStandalone]],e);return Va(I,n)}(e,f,s)[t.getDay()];case Vr.DayPeriods:const j=t.getHours(),q=t.getMinutes();if(I){const se=function sL(t){const e=As(t);return U8(e),(e[ci.ExtraData][2]||[]).map(s=>"string"==typeof s?lA(s):[lA(s[0]),lA(s[1])])}(e),fe=function aL(t,e,n){const s=As(t);U8(s);const I=Va([s[ci.ExtraData][0],s[ci.ExtraData][1]],e)||[];return Va(I,n)||[]}(e,f,s),be=se.findIndex(_e=>{if(Array.isArray(_e)){const[Oe,Te]=_e,Be=j>=Oe.hours&&q>=Oe.minutes,Fe=j0?Math.floor(f/60):Math.ceil(f/60);switch(t){case uc.Short:return(f>=0?"+":"")+Su(j,2,I)+Su(Math.abs(f%60),2,I);case uc.ShortGMT:return"GMT"+(f>=0?"+":"")+Su(j,1,I);case uc.Long:return"GMT"+(f>=0?"+":"")+Su(j,2,I)+":"+Su(Math.abs(f%60),2,I);case uc.Extended:return 0===s?"Z":(f>=0?"+":"")+Su(j,2,I)+":"+Su(Math.abs(f%60),2,I);default:throw new Error(`Unknown zone width "${t}"`)}}}!function(t){t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended"}(uc||(uc={})),function(t){t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day"}(zr||(zr={})),function(t){t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras"}(Vr||(Vr={}));const mL=0,L1=4;function K8(t){return N1(t.getFullYear(),t.getMonth(),t.getDate()+(L1-t.getDay()))}function fA(t,e=!1){return function(n,s){let f;if(e){const I=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,j=n.getDate();f=1+Math.floor((j+I)/7)}else{const I=K8(n),j=function vL(t){const e=N1(t,mL,1).getDay();return N1(t,0,1+(e<=L1?L1:L1+7)-e)}(I.getFullYear()),q=I.getTime()-j.getTime();f=1+Math.round(q/6048e5)}return Su(f,t,za(s,ji.MinusSign))}}function B1(t,e=!1){return function(n,s){return Su(K8(n).getFullYear(),t,za(s,ji.MinusSign),e)}}const dA={};function z8(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function V8(t){return t instanceof Date&&!isNaN(t.valueOf())}const SL=/^(\d+)?\.((\d+)(-(\d+))?)?$/,H8=22,j1=".",My="0",ML=";",IL=",",hA="#",W8="\xa4",DL="%";function pA(t,e,n,s,f,I,j=!1){let q="",re=!1;if(isFinite(t)){let se=function PL(t){let s,f,I,j,q,e=Math.abs(t)+"",n=0;for((f=e.indexOf(j1))>-1&&(e=e.replace(j1,"")),(I=e.search(/e/i))>0?(f<0&&(f=I),f+=+e.slice(I+1),e=e.substring(0,I)):f<0&&(f=e.length),I=0;e.charAt(I)===My;I++);if(I===(q=e.length))s=[0],f=1;else{for(q--;e.charAt(q)===My;)q--;for(f-=I,s=[],j=0;I<=q;I++,j++)s[j]=Number(e.charAt(I))}return f>H8&&(s=s.splice(0,H8-1),n=f-1,f=1),{digits:s,exponent:n,integerLen:f}}(t);j&&(se=function xL(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(se));let fe=e.minInt,be=e.minFrac,_e=e.maxFrac;if(I){const et=I.match(SL);if(null===et)throw new Error(`${I} is not a valid digit info`);const Ye=et[1],ut=et[3],Tt=et[5];null!=Ye&&(fe=yA(Ye)),null!=ut&&(be=yA(ut)),null!=Tt?_e=yA(Tt):null!=ut&&be>_e&&(_e=be)}!function NL(t,e,n){if(e>n)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${n}).`);let s=t.digits,f=s.length-t.integerLen;const I=Math.min(Math.max(e,f),n);let j=I+t.integerLen,q=s[j];if(j>0){s.splice(Math.max(t.integerLen,j));for(let be=j;be=5)if(j-1<0){for(let be=0;be>j;be--)s.unshift(0),t.integerLen++;s.unshift(1),t.integerLen++}else s[j-1]++;for(;f=se?Te.pop():re=!1),_e>=10?1:0},0);fe&&(s.unshift(fe),t.integerLen++)}(se,be,_e);let Oe=se.digits,Te=se.integerLen;const Be=se.exponent;let Fe=[];for(re=Oe.every(et=>!et);Te0?Fe=Oe.splice(Te,Oe.length):(Fe=Oe,Oe=[0]);const Ke=[];for(Oe.length>=e.lgSize&&Ke.unshift(Oe.splice(-e.lgSize,Oe.length).join(""));Oe.length>e.gSize;)Ke.unshift(Oe.splice(-e.gSize,Oe.length).join(""));Oe.length&&Ke.unshift(Oe.join("")),q=Ke.join(za(n,s)),Fe.length&&(q+=za(n,f)+Fe.join("")),Be&&(q+=za(n,ji.Exponential)+"+"+Be)}else q=za(n,ji.Infinity);return q=t<0&&!re?e.negPre+q+e.negSuf:e.posPre+q+e.posSuf,q}function CL(t,e,n,s,f){const j=gA(cA(e,_y.Currency),za(e,ji.MinusSign));return j.minFrac=function lL(t){let e;const n=j8[t];return n&&(e=n[2]),"number"==typeof e?e:cL}(s),j.maxFrac=j.minFrac,pA(t,j,e,ji.CurrencyGroup,ji.CurrencyDecimal,f).replace(W8,n).replace(W8,"").trim()}function gA(t,e="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},s=t.split(ML),f=s[0],I=s[1],j=-1!==f.indexOf(j1)?f.split(j1):[f.substring(0,f.lastIndexOf(My)+1),f.substring(f.lastIndexOf(My)+1)],q=j[0],re=j[1]||"";n.posPre=q.substring(0,q.indexOf(hA));for(let fe=0;fe-1||(f=n.getPluralCategory(t,s),e.indexOf(f)>-1))return f;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}Ad.\u0275fac=function(e){return new(e||Ad)},Ad.\u0275prov=tr({token:Ad,factory:function(e){let n=null;return e?n=new e:(s=Hn(ol),n=new G0(s)),n;var s},providedIn:"root"});class G0 extends Ad{constructor(e){super(),this.locale=e}getPluralCategory(e,n){switch(oL(n||this.locale)(e)){case Ed.Zero:return"zero";case Ed.One:return"one";case Ed.Two:return"two";case Ed.Few:return"few";case Ed.Many:return"many";default:return"other"}}}G0.\u0275fac=function(e){return new(e||G0)(Hn(ol))},G0.\u0275prov=tr({token:G0,factory:G0.\u0275fac});const mA=/\s+/,Z8=[];class Z0{constructor(e,n,s,f){this._iterableDiffers=e,this._keyValueDiffers=n,this._ngEl=s,this._renderer=f,this.initialClasses=Z8,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(mA):Z8}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(mA):e}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const n of e)this._updateState(n,!0);else if(null!=e)for(const n of Object.keys(e))this._updateState(n,Boolean(e[n]));this._applyStateDiff()}_updateState(e,n){const s=this.stateMap.get(e);void 0!==s?(s.enabled!==n&&(s.changed=!0,s.enabled=n),s.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const n=e[0],s=e[1];s.changed?(this._toggleClass(n,s.enabled),s.changed=!1):s.touched||(s.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),s.touched=!1}}_toggleClass(e,n){(e=e.trim()).length>0&&e.split(mA).forEach(s=>{n?this._renderer.addClass(this._ngEl.nativeElement,s):this._renderer.removeClass(this._ngEl.nativeElement,s)})}}Z0.\u0275fac=function(e){return new(e||Z0)(mn(_u),mn(Ka),mn(ya),mn(el))},Z0.\u0275dir=nr({type:Z0,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0});class Iy{constructor(e){this._viewContainerRef=e,this.ngComponentOutlet=null}ngOnChanges(e){const{_viewContainerRef:n,ngComponentOutletNgModule:s,ngComponentOutletNgModuleFactory:f}=this;if(n.clear(),this._componentRef=void 0,this.ngComponentOutlet){const I=this.ngComponentOutletInjector||n.parentInjector;(e.ngComponentOutletNgModule||e.ngComponentOutletNgModuleFactory)&&(this._moduleRef&&this._moduleRef.destroy(),this._moduleRef=s?function q7(t,e){return new wM(t,e??null)}(s,J8(I)):f?f.create(J8(I)):void 0),this._componentRef=n.createComponent(this.ngComponentOutlet,{index:n.length,injector:I,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}function J8(t){return t.get(F0).injector}Iy.\u0275fac=function(e){return new(e||Iy)(mn(Eu))},Iy.\u0275dir=nr({type:Iy,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[uo]});class kL{constructor(e,n,s,f){this.$implicit=e,this.ngForOf=n,this.index=s,this.count=f}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}class J0{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,s){this._viewContainer=e,this._template=n,this._differs=s,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const n=this._viewContainer;e.forEachOperation((s,f,I)=>{if(null==s.previousIndex)n.createEmbeddedView(this._template,new kL(s.item,this._ngForOf,-1,-1),null===I?void 0:I);else if(null==I)n.remove(null===f?void 0:f);else if(null!==f){const j=n.get(f);n.move(j,I),$8(j,s)}});for(let s=0,f=n.length;s{$8(n.get(s.currentIndex),s)})}static ngTemplateContextGuard(e,n){return!0}}function $8(t,e){t.context.$implicit=e.item}J0.\u0275fac=function(e){return new(e||J0)(mn(Eu),mn(oc),mn(_u))},J0.\u0275dir=nr({type:J0,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});class cl{constructor(e,n){this._viewContainer=e,this._context=new BL,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Q8("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Q8("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}}cl.\u0275fac=function(e){return new(e||cl)(mn(Eu),mn(oc))},cl.\u0275dir=nr({type:cl,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});class BL{constructor(){this.$implicit=null,this.ngIf=null}}function Q8(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Xn(e)}'.`)}class vA{constructor(e,n){this._viewContainerRef=e,this._templateRef=n,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}class _d{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const n=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const n of this._defaultViews)n.enforceState(e)}}}_d.\u0275fac=function(e){return new(e||_d)},_d.\u0275dir=nr({type:_d,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});class Dy{constructor(e,n,s){this.ngSwitch=s,s._addCase(),this._view=new vA(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}Dy.\u0275fac=function(e){return new(e||Dy)(mn(Eu),mn(oc),mn(_d,9))},Dy.\u0275dir=nr({type:Dy,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});class Cy{constructor(e,n,s){s._addDefault(new vA(e,n))}}Cy.\u0275fac=function(e){return new(e||Cy)(mn(Eu),mn(oc),mn(_d,9))},Cy.\u0275dir=nr({type:Cy,selectors:[["","ngSwitchDefault",""]],standalone:!0});class Y0{constructor(e){this._localization=e,this._caseViews={}}set ngPlural(e){this._updateView(e)}addCase(e,n){this._caseViews[e]=n}_updateView(e){this._clearViews();const s=G8(e,Object.keys(this._caseViews),this._localization);this._activateView(this._caseViews[s])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(e){e&&(this._activeView=e,this._activeView.create())}}Y0.\u0275fac=function(e){return new(e||Y0)(mn(Ad))},Y0.\u0275dir=nr({type:Y0,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"},standalone:!0});class Ty{constructor(e,n,s,f){this.value=e;const I=!isNaN(Number(e));f.addCase(I?`=${e}`:e,new vA(s,n))}}Ty.\u0275fac=function(e){return new(e||Ty)(Wh("ngPluralCase"),mn(oc),mn(Eu),mn(Y0,1))},Ty.\u0275dir=nr({type:Ty,selectors:[["","ngPluralCase",""]],standalone:!0});class Oy{constructor(e,n,s){this._ngEl=e,this._differs=n,this._renderer=s,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,n){const[s,f]=e.split("."),I=-1===s.indexOf("-")?void 0:Es.DashCase;null!=n?this._renderer.setStyle(this._ngEl.nativeElement,s,f?`${n}${f}`:n,I):this._renderer.removeStyle(this._ngEl.nativeElement,s,I)}_applyChanges(e){e.forEachRemovedItem(n=>this._setStyle(n.key,null)),e.forEachAddedItem(n=>this._setStyle(n.key,n.currentValue)),e.forEachChangedItem(n=>this._setStyle(n.key,n.currentValue))}}Oy.\u0275fac=function(e){return new(e||Oy)(mn(ya),mn(Ka),mn(el))},Oy.\u0275dir=nr({type:Oy,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});class xy{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:s,ngTemplateOutletContext:f,ngTemplateOutletInjector:I}=this;this._viewRef=n.createEmbeddedView(s,f,I?{injector:I}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}xy.\u0275fac=function(e){return new(e||xy)(mn(Eu))},xy.\u0275dir=nr({type:xy,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[uo]});function Mu(t,e){return new hn(2100,!1)}const UL=new class FL{createSubscription(e,n){return e.then(n,s=>{throw s})}dispose(e){}},KL=new class jL{createSubscription(e,n){return e.subscribe({next:n,error:s=>{throw s}})}dispose(e){e.unsubscribe()}};class Sd{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,n=>this._updateLatestValue(e,n))}_selectStrategy(e){if(h1(e))return UL;if(e6(e))return KL;throw Mu()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,n){e===this._obj&&(this._latestValue=n,this._ref.markForCheck())}}Sd.\u0275fac=function(e){return new(e||Sd)(mn(tA,16))},Sd.\u0275pipe=Co({name:"async",type:Sd,pure:!1,standalone:!0});class Md{transform(e){if(null==e)return null;if("string"!=typeof e)throw Mu();return e.toLowerCase()}}Md.\u0275fac=function(e){return new(e||Md)},Md.\u0275pipe=Co({name:"lowercase",type:Md,pure:!0,standalone:!0});const zL=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g;class Id{transform(e){if(null==e)return null;if("string"!=typeof e)throw Mu();return e.replace(zL,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}}Id.\u0275fac=function(e){return new(e||Id)},Id.\u0275pipe=Co({name:"titlecase",type:Id,pure:!0,standalone:!0});class Dd{transform(e){if(null==e)return null;if("string"!=typeof e)throw Mu();return e.toUpperCase()}}Dd.\u0275fac=function(e){return new(e||Dd)},Dd.\u0275pipe=Co({name:"uppercase",type:Dd,pure:!0,standalone:!0});const HL=new qn("DATE_PIPE_DEFAULT_TIMEZONE"),WL=new qn("DATE_PIPE_DEFAULT_OPTIONS");class Cd{constructor(e,n,s){this.locale=e,this.defaultTimezone=n,this.defaultOptions=s}transform(e,n,s,f){if(null==e||""===e||e!=e)return null;try{const I=n??this.defaultOptions?.dateFormat??"mediumDate",j=s??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return hL(e,I,f||this.locale,j)}catch(I){throw Mu(0,I.message)}}}Cd.\u0275fac=function(e){return new(e||Cd)(mn(ol,16),mn(HL,24),mn(WL,24))},Cd.\u0275pipe=Co({name:"date",type:Cd,pure:!0,standalone:!0});const GL=/#/g;class Td{constructor(e){this._localization=e}transform(e,n,s){if(null==e)return"";if("object"!=typeof n||null===n)throw Mu();return n[G8(e,Object.keys(n),this._localization,s)].replace(GL,e.toString())}}Td.\u0275fac=function(e){return new(e||Td)(mn(Ad,16))},Td.\u0275pipe=Co({name:"i18nPlural",type:Td,pure:!0,standalone:!0});class Od{transform(e,n){if(null==e)return"";if("object"!=typeof n||"string"!=typeof e)throw Mu();return n.hasOwnProperty(e)?n[e]:n.hasOwnProperty("other")?n.other:""}}Od.\u0275fac=function(e){return new(e||Od)},Od.\u0275pipe=Co({name:"i18nSelect",type:Od,pure:!0,standalone:!0});class Py{transform(e){return JSON.stringify(e,null,2)}}Py.\u0275fac=function(e){return new(e||Py)},Py.\u0275pipe=Co({name:"json",type:Py,pure:!1,standalone:!0});class Ny{constructor(e){this.differs=e,this.keyValues=[],this.compareFn=X8}transform(e,n=X8){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const s=this.differ.diff(e),f=n!==this.compareFn;return s&&(this.keyValues=[],s.forEachItem(I=>{this.keyValues.push(function ZL(t,e){return{key:t,value:e}}(I.key,I.currentValue))})),(s||f)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}}function X8(t,e){const n=t.key,s=e.key;if(n===s)return 0;if(void 0===n)return 1;if(void 0===s)return-1;if(null===n)return 1;if(null===s)return-1;if("string"==typeof n&&"string"==typeof s)return nnew XL(Hn(Ii),window)});class XL{constructor(e,n){this.document=e,this.window=n,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(!this.supportsScrolling())return;const n=function qL(t,e){const n=t.getElementById(e)||t.getElementsByName(e)[0];if(n)return n;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const s=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let f=s.currentNode;for(;f;){const I=f.shadowRoot;if(I){const j=I.getElementById(e)||I.querySelector(`[name="${e}"]`);if(j)return j}f=s.nextNode()}}return null}(this.document,e);n&&(this.scrollToElement(n),n.focus())}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const n=this.window.history;n&&n.scrollRestoration&&(n.scrollRestoration=e)}}scrollToElement(e){const n=e.getBoundingClientRect(),s=n.left+this.window.pageXOffset,f=n.top+this.window.pageYOffset,I=this.offset();this.window.scrollTo(s-I[0],f-I[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const e=t5(this.window.history)||t5(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function t5(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}function F1(t,e){return EA(t)?new URL(t):new URL(t,e.location.href)}function EA(t){return/^https?:\/\//.test(t)}function n5(t){return EA(t)?new URL(t).hostname:t}function rB(t){return t.startsWith("/")?t.slice(1):t}const Ry=t=>t.src,r5=new qn("ImageLoader",{providedIn:"root",factory:()=>Ry});function U1(t,e){return function(s){return function tB(t){if("string"!=typeof t||""===t.trim())return!1;try{return new URL(t),!0}catch{return!1}}(s)||function iB(t,e){throw new hn(2959,!1)}(),s=function nB(t){return t.endsWith("/")?t.slice(0,-1):t}(s),[{provide:r5,useValue:j=>(EA(j.src)&&function oB(t,e){throw new hn(2959,!1)}(0,j.src),t(s,{...j,src:rB(j.src)}))}]}}U1(function sB(t,e){let n="format=auto";return e.width&&(n+=`,width=${e.width}`),`${t}/cdn-cgi/image/${n}/${e.src}`});U1(function lB(t,e){let n="f_auto,q_auto";return e.width&&(n+=`,w_${e.width}`),`${t}/image/upload/${n}/${e.src}`});U1(function pB(t,e){const{src:n,width:s}=e;let f;if(s){f=[t,`tr:w-${s}`,n]}else f=[t,n];return f.join("/")});U1(function vB(t,e){const n=new URL(`${t}/${e.src}`);return n.searchParams.set("auto","format"),e.width&&n.searchParams.set("w",e.width.toString()),n.href});function Fi(t,e=!0){return`The NgOptimizedImage directive ${e?`(activated on an element with the \`ngSrc="${t}"\`) `:""}has detected that`}function i5(t){throw new hn(2958,`Unexpected invocation of the ${t} in the prod mode. Please make sure that the prod mode is enabled for production builds.`)}class ky{constructor(){this.images=new Map,this.alreadyWarned=new Set,this.window=null,this.observer=null,i5("LCP checker");const e=Ki(Ii).defaultView;typeof e<"u"&&typeof PerformanceObserver<"u"&&(this.window=e,this.observer=this.initPerformanceObserver())}initPerformanceObserver(){const e=new PerformanceObserver(n=>{const s=n.getEntries();if(0===s.length)return;const I=s[s.length-1].element?.src??"";I.startsWith("data:")||I.startsWith("blob:")||this.images.get(I)&&!this.alreadyWarned.has(I)&&(this.alreadyWarned.add(I),function bB(t){const e=Fi(t);console.warn(wi(2955,`${e} this image is the Largest Contentful Paint (LCP) element but was not marked "priority". This image should be marked "priority" in order to prioritize its loading. To fix this, add the "priority" attribute.`))}(I))});return e.observe({type:"largest-contentful-paint",buffered:!0}),e}registerImage(e,n){this.observer&&this.images.set(F1(e,this.window).href,n)}unregisterImage(e){this.observer&&this.images.delete(F1(e,this.window).href)}ngOnDestroy(){this.observer&&(this.observer.disconnect(),this.images.clear(),this.alreadyWarned.clear())}}ky.\u0275fac=function(e){return new(e||ky)},ky.\u0275prov=tr({token:ky,factory:ky.\u0275fac,providedIn:"root"});const wB=new Set(["localhost","127.0.0.1","0.0.0.0"]),EB=new qn("PRECONNECT_CHECK_BLOCKLIST");class Ly{constructor(){this.document=Ki(Ii),this.preconnectLinks=null,this.alreadySeen=new Set,this.window=null,this.blocklist=new Set(wB),i5("preconnect link checker");const e=this.document.defaultView;typeof e<"u"&&(this.window=e);const n=Ki(EB,{optional:!0});n&&this.populateBlocklist(n)}populateBlocklist(e){Array.isArray(e)?o5(e,n=>{this.blocklist.add(n5(n))}):this.blocklist.add(n5(e))}assertPreconnect(e,n){if(!this.window)return;const s=F1(e,this.window);this.blocklist.has(s.hostname)||this.alreadySeen.has(s.origin)||(this.alreadySeen.add(s.origin),this.preconnectLinks||(this.preconnectLinks=this.queryPreconnectLinks()),this.preconnectLinks.has(s.origin)||console.warn(wi(2956,`${Fi(n)} there is no preconnect tag present for this image. Preconnecting to the origin(s) that serve priority images ensures that these images are delivered as soon as possible. To fix this, please add the following element into the of the document:\n `)))}queryPreconnectLinks(){const e=new Set,s=Array.from(this.document.querySelectorAll("link[rel=preconnect]"));for(let f of s){const I=F1(f.href,this.window);e.add(I.origin)}return e}ngOnDestroy(){this.preconnectLinks?.clear(),this.alreadySeen.clear()}}function o5(t,e){for(let n of t)Array.isArray(n)?o5(n,e):e(n)}Ly.\u0275fac=function(e){return new(e||Ly)},Ly.\u0275prov=tr({token:Ly,factory:Ly.\u0275fac,providedIn:"root"});const AB=new qn("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});class Q0{constructor(){this.preloadedImages=Ki(AB),this.document=Ki(Ii)}createPreloadLinkTag(e,n,s,f){if(this.preloadedImages.has(n))return;this.preloadedImages.add(n);const I=e.createElement("link");e.setAttribute(I,"as","image"),e.setAttribute(I,"href",n),e.setAttribute(I,"rel","preload"),e.setAttribute(I,"fetchpriority","high"),f&&e.setAttribute(I,"imageSizes",f),s&&e.setAttribute(I,"imageSrcset",s),e.appendChild(this.document.head,I)}}Q0.\u0275fac=function(e){return new(e||Q0)},Q0.\u0275prov=tr({token:Q0,factory:Q0.\u0275fac,providedIn:"root"});const a5=/^((\s*\d+w\s*(,|$)){1,})$/,SB=[1,2],l5={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},TB=new qn("ImageConfig",{providedIn:"root",factory:()=>l5});class K1{constructor(){this.imageLoader=Ki(r5),this.config=function OB(t){let e={};return t.breakpoints&&(e.breakpoints=t.breakpoints.sort((n,s)=>n-s)),Object.assign({},l5,t,e)}(Ki(TB)),this.renderer=Ki(el),this.imgElement=Ki(ya).nativeElement,this.injector=Ki($o),this.isServer=function QL(t){return t===JL}(Ki(JE)),this.preloadLinkChecker=Ki(Q0),this.lcpObserver=null,this._renderedSrc=null,this._priority=!1,this._disableOptimizedSrcset=!1,this._fill=!1}set width(e){this._width=f5(e)}get width(){return this._width}set height(e){this._height=f5(e)}get height(){return this._height}set priority(e){this._priority=_A(e)}get priority(){return this._priority}set disableOptimizedSrcset(e){this._disableOptimizedSrcset=_A(e)}get disableOptimizedSrcset(){return this._disableOptimizedSrcset}set fill(e){this._fill=_A(e)}get fill(){return this._fill}ngOnInit(){this.setHostAttributes()}setHostAttributes(){this.fill?this.sizes||(this.sizes="100vw"):(this.setHostAttribute("width",this.width.toString()),this.setHostAttribute("height",this.height.toString())),this.setHostAttribute("loading",this.getLoadingBehavior()),this.setHostAttribute("fetchpriority",this.getFetchPriority()),this.setHostAttribute("ng-img","true");const e=this.getRewrittenSrc();let n;this.setHostAttribute("src",e),this.sizes&&this.setHostAttribute("sizes",this.sizes),this.ngSrcset?n=this.getRewrittenSrcset():this.shouldGenerateAutomaticSrcset()&&(n=this.getAutomaticSrcset()),n&&this.setHostAttribute("srcset",n),this.isServer&&this.priority&&this.preloadLinkChecker.createPreloadLinkTag(this.renderer,e,n,this.sizes)}ngOnChanges(e){}callImageLoader(e){let n=e;return this.loaderParams&&(n.loaderParams=this.loaderParams),this.imageLoader(n)}getLoadingBehavior(){return this.priority||void 0===this.loading?this.priority?"eager":"lazy":this.loading}getFetchPriority(){return this.priority?"high":"auto"}getRewrittenSrc(){if(!this._renderedSrc){const e={src:this.ngSrc};this._renderedSrc=this.callImageLoader(e)}return this._renderedSrc}getRewrittenSrcset(){const e=a5.test(this.ngSrcset);return this.ngSrcset.split(",").filter(s=>""!==s).map(s=>{s=s.trim();const f=e?parseFloat(s):parseFloat(s)*this.width;return`${this.callImageLoader({src:this.ngSrc,width:f})} ${s}`}).join(", ")}getAutomaticSrcset(){return this.sizes?this.getResponsiveSrcset():this.getFixedSrcset()}getResponsiveSrcset(){const{breakpoints:e}=this.config;let n=e;return"100vw"===this.sizes?.trim()&&(n=e.filter(f=>f>=640)),n.map(f=>`${this.callImageLoader({src:this.ngSrc,width:f})} ${f}w`).join(", ")}getFixedSrcset(){return SB.map(n=>`${this.callImageLoader({src:this.ngSrc,width:this.width*n})} ${n}x`).join(", ")}shouldGenerateAutomaticSrcset(){return!this._disableOptimizedSrcset&&!this.srcset&&this.imageLoader!==Ry&&!(this.width>1920||this.height>1080)}ngOnDestroy(){}setHostAttribute(e,n){this.renderer.setAttribute(this.imgElement,e,n)}}function f5(t){return"string"==typeof t?parseInt(t,10):t}function _A(t){return null!=t&&"false"!=`${t}`}K1.\u0275fac=function(e){return new(e||K1)},K1.\u0275dir=nr({type:K1,selectors:[["img","ngSrc",""]],hostVars:8,hostBindings:function(e,n){2&e&&ME("position",n.fill?"absolute":null)("width",n.fill?"100%":null)("height",n.fill?"100%":null)("inset",n.fill?"0px":null)},inputs:{ngSrc:"ngSrc",ngSrcset:"ngSrcset",sizes:"sizes",width:"width",height:"height",loading:"loading",priority:"priority",loaderParams:"loaderParams",disableOptimizedSrcset:"disableOptimizedSrcset",fill:"fill",src:"src",srcset:"srcset"},standalone:!0,features:[uo]});class RB extends Zk{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class SA extends RB{static makeCurrent(){!function Gk(t){aA||(aA=t)}(new SA)}onAndCancel(e,n,s){return e.addEventListener(n,s,!1),()=>{e.removeEventListener(n,s,!1)}}dispatchEvent(e,n){e.dispatchEvent(n)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,n){return(n=n||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,n){return"window"===n?window:"document"===n?e:"body"===n?e.body:null}getBaseHref(e){const n=function kB(){return jy=jy||document.querySelector("base"),jy?jy.getAttribute("href"):null}();return null==n?null:function LB(t){z1=z1||document.createElement("a"),z1.setAttribute("href",t);const e=z1.pathname;return"/"===e.charAt(0)?e:`/${e}`}(n)}resetBaseElement(){jy=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return function RL(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const s=n.indexOf("="),[f,I]=-1==s?[n,""]:[n.slice(0,s),n.slice(s+1)];if(f.trim()===e)return decodeURIComponent(I)}return null}(document.cookie,e)}}let z1,jy=null;const d5=new qn("TRANSITION_ID");const jB=[{provide:a8,useFactory:function BB(t,e,n){return()=>{n.get(il).donePromise.then(()=>{const s=sc(),f=e.querySelectorAll(`style[ng-transition="${t}"]`);for(let I=0;I{s.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,s){return this._findPluginFor(n).addEventListener(e,n,s)}addGlobalEventListener(e,n,s){return this._findPluginFor(n).addGlobalEventListener(e,n,s)}getZone(){return this._zone}_findPluginFor(e){const n=this._eventNameToPlugin.get(e);if(n)return n;const s=this._plugins;for(let f=0;f0?s.set(e,f):s.delete(e),f}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}kd.\u0275fac=function(e){return new(e||kd)},kd.\u0275prov=tr({token:kd,factory:kd.\u0275fac});class cc extends kd{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const n of this.hostNodes)this.addStyleToHost(n,e)}onStyleRemoved(e){const n=this.styleRef;n.get(e)?.forEach(f=>f.remove()),n.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const n of this.getAllStyles())this.addStyleToHost(e,n)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,n){const s=this.doc.createElement("style");s.textContent=n,e.appendChild(s);const f=this.styleRef.get(n);f?f.push(s):this.styleRef.set(n,[s])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}cc.\u0275fac=function(e){return new(e||cc)(Hn(Ii))},cc.\u0275prov=tr({token:cc,factory:cc.\u0275fac});const IA={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},DA=/%COMP%/g,UB="_nghost-%COMP%",KB="_ngcontent-%COMP%",g5=new qn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>false});function y5(t,e){return e.flat(100).map(n=>n.replace(DA,t))}function m5(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}class hf{constructor(e,n,s,f){this.eventManager=e,this.sharedStylesHost=n,this.appId=s,this.removeStylesOnCompDestory=f,this.rendererByCompId=new Map,this.defaultRenderer=new CA(e)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;const s=this.getOrCreateRenderer(e,n);return s instanceof w5?s.applyToHost(e):s instanceof TA&&s.applyStyles(),s}getOrCreateRenderer(e,n){const s=this.rendererByCompId;let f=s.get(n.id);if(!f){const I=this.eventManager,j=this.sharedStylesHost,q=this.removeStylesOnCompDestory;switch(n.encapsulation){case Da.Emulated:f=new w5(I,j,n,this.appId,q);break;case Da.ShadowDom:return new GB(I,j,e,n);default:f=new TA(I,j,n,q)}f.onDestroy=()=>s.delete(n.id),s.set(n.id,f)}return f}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}hf.\u0275fac=function(e){return new(e||hf)(Hn(ll),Hn(cc),Hn(z0),Hn(g5))},hf.\u0275prov=tr({token:hf,factory:hf.\u0275fac});class CA{constructor(e){this.eventManager=e,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(e,n){return n?document.createElementNS(IA[n]||n,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,n){(b5(e)?e.content:e).appendChild(n)}insertBefore(e,n,s){e&&(b5(e)?e.content:e).insertBefore(n,s)}removeChild(e,n){e&&e.removeChild(n)}selectRootElement(e,n){let s="string"==typeof e?document.querySelector(e):e;if(!s)throw new Error(`The selector "${e}" did not match any elements`);return n||(s.textContent=""),s}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,n,s,f){if(f){n=f+":"+n;const I=IA[f];I?e.setAttributeNS(I,n,s):e.setAttribute(n,s)}else e.setAttribute(n,s)}removeAttribute(e,n,s){if(s){const f=IA[s];f?e.removeAttributeNS(f,n):e.removeAttribute(`${s}:${n}`)}else e.removeAttribute(n)}addClass(e,n){e.classList.add(n)}removeClass(e,n){e.classList.remove(n)}setStyle(e,n,s,f){f&(Es.DashCase|Es.Important)?e.style.setProperty(n,s,f&Es.Important?"important":""):e.style[n]=s}removeStyle(e,n,s){s&Es.DashCase?e.style.removeProperty(n):e.style[n]=""}setProperty(e,n,s){e[n]=s}setValue(e,n){e.nodeValue=n}listen(e,n,s){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,n,m5(s)):this.eventManager.addEventListener(e,n,m5(s))}}"@".charCodeAt(0);function b5(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class GB extends CA{constructor(e,n,s,f){super(e),this.sharedStylesHost=n,this.hostEl=s,this.shadowRoot=s.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const I=y5(f.id,f.styles);for(const j of I){const q=document.createElement("style");q.textContent=j,this.shadowRoot.appendChild(q)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,n){return super.appendChild(this.nodeOrShadowRoot(e),n)}insertBefore(e,n,s){return super.insertBefore(this.nodeOrShadowRoot(e),n,s)}removeChild(e,n){return super.removeChild(this.nodeOrShadowRoot(e),n)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class TA extends CA{constructor(e,n,s,f,I=s.id){super(e),this.sharedStylesHost=n,this.removeStylesOnCompDestory=f,this.rendererUsageCount=0,this.styles=y5(I,s.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class w5 extends TA{constructor(e,n,s,f,I){const j=f+"-"+s.id;super(e,n,s,I,j),this.contentAttr=function VB(t){return KB.replace(DA,t)}(j),this.hostAttr=function HB(t){return UB.replace(DA,t)}(j)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,n){const s=super.createElement(e,n);return super.setAttribute(s,this.contentAttr,""),s}}class q0 extends MA{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,s){return e.addEventListener(n,s,!1),()=>this.removeEventListener(e,n,s)}removeEventListener(e,n,s){return e.removeEventListener(n,s)}}q0.\u0275fac=function(e){return new(e||q0)(Hn(Ii))},q0.\u0275prov=tr({token:q0,factory:q0.\u0275fac});const E5=["alt","control","meta","shift"],ZB={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},JB={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};class Ha extends MA{constructor(e){super(e)}supports(e){return null!=Ha.parseEventName(e)}addEventListener(e,n,s){const f=Ha.parseEventName(n),I=Ha.eventCallback(f.fullKey,s,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>sc().onAndCancel(e,f.domEventName,I))}static parseEventName(e){const n=e.toLowerCase().split("."),s=n.shift();if(0===n.length||"keydown"!==s&&"keyup"!==s)return null;const f=Ha._normalizeKey(n.pop());let I="",j=n.indexOf("code");if(j>-1&&(n.splice(j,1),I="code."),E5.forEach(re=>{const se=n.indexOf(re);se>-1&&(n.splice(se,1),I+=re+".")}),I+=f,0!=n.length||0===f.length)return null;const q={};return q.domEventName=s,q.fullKey=I,q}static matchEventFullKeyCode(e,n){let s=ZB[e.key]||e.key,f="";return n.indexOf("code.")>-1&&(s=e.code,f="code."),!(null==s||!s)&&(s=s.toLowerCase()," "===s?s="space":"."===s&&(s="dot"),E5.forEach(I=>{if(I!==s){(0,JB[I])(e)&&(f+=I+".")}}),f+=s,f===n)}static eventCallback(e,n,s){return f=>{Ha.matchEventFullKeyCode(f,e)&&s.runGuarded(()=>n(f))}}static _normalizeKey(e){return"esc"===e?"escape":e}}Ha.\u0275fac=function(e){return new(e||Ha)(Hn(Ii))},Ha.\u0275prov=tr({token:Ha,factory:Ha.\u0275fac});const _5=[{provide:JE,useValue:q8},{provide:c8,useValue:function YB(){SA.makeCurrent()},multi:!0},{provide:Ii,useFactory:function QB(){return function Ln(t){gn=t}(document),document},deps:[]}],XB=v8(Hk,"browser",_5),S5=new qn(""),M5=[{provide:I1,useClass:class FB{addToWindow(e){ii.getAngularTestability=(s,f=!0)=>{const I=e.findTestabilityInTree(s,f);if(null==I)throw new Error("Could not find testability for element.");return I},ii.getAllAngularTestabilities=()=>e.getAllTestabilities(),ii.getAllAngularRootElements=()=>e.getAllRootElements();ii.frameworkStabilizers||(ii.frameworkStabilizers=[]),ii.frameworkStabilizers.push(s=>{const f=ii.getAllAngularTestabilities();let I=f.length,j=!1;const q=function(re){j=j||re,I--,0==I&&s(j)};f.forEach(function(re){re.whenStable(q)})})}findTestabilityInTree(e,n,s){if(null==n)return null;return e.getTestability(n)??(s?sc().isShadowRoot(n)?this.findTestabilityInTree(e,n.host,!0):this.findTestabilityInTree(e,n.parentElement,!0):null)}},deps:[]},{provide:g8,useClass:uf,deps:[Xo,cf,I1]},{provide:uf,useClass:uf,deps:[Xo,cf,I1]}],I5=[{provide:Jw,useValue:"root"},{provide:A0,useFactory:function $B(){return new A0},deps:[]},{provide:Fy,useClass:q0,multi:!0,deps:[Ii,Xo,JE]},{provide:Fy,useClass:Ha,multi:!0,deps:[Ii]},{provide:hf,useClass:hf,deps:[ll,cc,z0,g5]},{provide:sS,useExisting:hf},{provide:kd,useExisting:cc},{provide:cc,useClass:cc,deps:[Ii]},{provide:ll,useClass:ll,deps:[Fy,Xo]},{provide:class eB{},useClass:X0,deps:[]},[]];class pf{constructor(e){false}static withServerTransition(e){return{ngModule:pf,providers:[{provide:z0,useValue:e.appId},{provide:d5,useExisting:z0},jB]}}}pf.\u0275fac=function(e){return new(e||pf)(Hn(S5,12))},pf.\u0275mod=js({type:pf}),pf.\u0275inj=Ls({providers:[...I5,...M5],imports:[$0,V0]});class Uy{constructor(e){this._doc=e,this._dom=sc()}addTag(e,n=!1){return e?this._getOrCreateElement(e,n):null}addTags(e,n=!1){return e?e.reduce((s,f)=>(f&&s.push(this._getOrCreateElement(f,n)),s),[]):[]}getTag(e){return e&&this._doc.querySelector(`meta[${e}]`)||null}getTags(e){if(!e)return[];const n=this._doc.querySelectorAll(`meta[${e}]`);return n?[].slice.call(n):[]}updateTag(e,n){if(!e)return null;n=n||this._parseSelector(e);const s=this.getTag(n);return s?this._setMetaElementAttributes(e,s):this._getOrCreateElement(e,!0)}removeTag(e){this.removeTagElement(this.getTag(e))}removeTagElement(e){e&&this._dom.remove(e)}_getOrCreateElement(e,n=!1){if(!n){const I=this._parseSelector(e),j=this.getTags(I).filter(q=>this._containsAttributes(e,q))[0];if(void 0!==j)return j}const s=this._dom.createElement("meta");return this._setMetaElementAttributes(e,s),this._doc.getElementsByTagName("head")[0].appendChild(s),s}_setMetaElementAttributes(e,n){return Object.keys(e).forEach(s=>n.setAttribute(this._getMetaKeyMap(s),e[s])),n}_parseSelector(e){const n=e.name?"name":"property";return`${n}="${e[n]}"`}_containsAttributes(e,n){return Object.keys(e).every(s=>n.getAttribute(this._getMetaKeyMap(s))===e[s])}_getMetaKeyMap(e){return ej[e]||e}}Uy.\u0275fac=function(e){return new(e||Uy)(Hn(Ii))},Uy.\u0275prov=tr({token:Uy,factory:function(e){let n=null;return n=e?new e:function qB(){return new Uy(Hn(Ii))}(),n},providedIn:"root"});const ej={httpEquiv:"http-equiv"};class Ky{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}Ky.\u0275fac=function(e){return new(e||Ky)(Hn(Ii))},Ky.\u0275prov=tr({token:Ky,factory:function(e){let n=null;return n=e?new e:function tj(){return new Ky(Hn(Ii))}(),n},providedIn:"root"});typeof window<"u"&&window;class zy{constructor(){this.store={},this.onSerializeCallbacks={},this.store=function oj(t,e){const n=t.getElementById(e+"-state");let s={};if(n&&n.textContent)try{s=JSON.parse(function ij(t){const e={"&a;":"&","&q;":'"',"&s;":"'","&l;":"<","&g;":">"};return t.replace(/&[^;]+;/g,n=>e[n])}(n.textContent))}catch(f){console.warn("Exception while restoring TransferState for app "+e,f)}return s}(Ki(Ii),Ki(z0))}get(e,n){return void 0!==this.store[e]?this.store[e]:n}set(e,n){this.store[e]=n}remove(e){delete this.store[e]}hasKey(e){return this.store.hasOwnProperty(e)}get isEmpty(){return 0===Object.keys(this.store).length}onSerialize(e,n){this.onSerializeCallbacks[e]=n}toJson(){for(const e in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(e))try{this.store[e]=this.onSerializeCallbacks[e]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store)}}zy.\u0275fac=function(e){return new(e||zy)},zy.\u0275prov=tr({token:zy,factory:zy.\u0275fac,providedIn:"root"});class Vy{}Vy.\u0275fac=function(e){return new(e||Vy)},Vy.\u0275mod=js({type:Vy}),Vy.\u0275inj=Ls({});const aj={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0,doubletap:!0},PA=new qn("HammerGestureConfig"),T5=new qn("HammerLoader");class ep{constructor(){this.events=[],this.overrides={}}buildHammer(e){const n=new Hammer(e,this.options);n.get("pinch").set({enable:!0}),n.get("rotate").set({enable:!0});for(const s in this.overrides)n.get(s).set(this.overrides[s]);return n}}ep.\u0275fac=function(e){return new(e||ep)},ep.\u0275prov=tr({token:ep,factory:ep.\u0275fac});class tp extends MA{constructor(e,n,s,f){super(e),this._config=n,this.console=s,this.loader=f,this._loaderPromise=null}supports(e){return!(!aj.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&!this.loader)}addEventListener(e,n,s){const f=this.manager.getZone();if(n=n.toLowerCase(),!window.Hammer&&this.loader){this._loaderPromise=this._loaderPromise||f.runOutsideAngular(()=>this.loader());let I=!1,j=()=>{I=!0};return f.runOutsideAngular(()=>this._loaderPromise.then(()=>{window.Hammer?I||(j=this.addEventListener(e,n,s)):j=()=>{}}).catch(()=>{j=()=>{}})),()=>{j()}}return f.runOutsideAngular(()=>{const I=this._config.buildHammer(e),j=function(q){f.runGuarded(function(){s(q)})};return I.on(n,j),()=>{I.off(n,j),"function"==typeof I.destroy&&I.destroy()}})}isCustomEvent(e){return this._config.events.indexOf(e)>-1}}tp.\u0275fac=function(e){return new(e||tp)(Hn(Ii),Hn(PA),Hn(md),Hn(T5,8))},tp.\u0275prov=tr({token:tp,factory:tp.\u0275fac});class Hy{}Hy.\u0275fac=function(e){return new(e||Hy)},Hy.\u0275mod=js({type:Hy}),Hy.\u0275inj=Ls({providers:[{provide:Fy,useClass:tp,multi:!0,deps:[Ii,PA,md,[new Xl,T5]]},{provide:PA,useClass:ep,deps:[]}]});class np{}np.\u0275fac=function(e){return new(e||np)},np.\u0275prov=tr({token:np,factory:function(e){let n=null;return n=e?new(e||np):Hn(rp),n},providedIn:"root"});class rp extends np{constructor(e){super(),this._doc=e}sanitize(e,n){if(null==n)return null;switch(e){case ga.NONE:return n;case ga.HTML:return ec(n,"HTML")?pa(n):W3(this._doc,String(n)).toString();case ga.STYLE:return ec(n,"Style")?pa(n):n;case ga.SCRIPT:if(ec(n,"Script"))return pa(n);throw new Error("unsafe value used in a script context");case ga.URL:return ec(n,"URL")?pa(n):Xv(String(n));case ga.RESOURCE_URL:if(ec(n,"ResourceURL"))return pa(n);throw new Error(`unsafe value used in a resource URL context (see ${Rs})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Rs})`)}}bypassSecurityTrustHtml(e){return function Dx(t){return new Ex(t)}(e)}bypassSecurityTrustStyle(e){return function Cx(t){return new Ax(t)}(e)}bypassSecurityTrustScript(e){return function Tx(t){return new _x(t)}(e)}bypassSecurityTrustUrl(e){return function Ox(t){return new Sx(t)}(e)}bypassSecurityTrustResourceUrl(e){return function xx(t){return new Mx(t)}(e)}}rp.\u0275fac=function(e){return new(e||rp)(Hn(Ii))},rp.\u0275prov=tr({token:rp,factory:function(e){let n=null;return n=e?new e:function uj(t){return new rp(t.get(Ii))}(Hn($o)),n},providedIn:"root"});new n1("15.2.9");const{isArray:cj}=Array,{getPrototypeOf:lj,prototype:fj,keys:dj}=Object;function hj(t){if(1===t.length){const e=t[0];if(cj(e))return{args:e,keys:null};if(function pj(t){return t&&"object"==typeof t&&lj(t)===fj}(e)){const n=dj(e);return{args:n.map(s=>e[s]),keys:n}}}return{args:t,keys:null}}const{isArray:gj}=Array;function mj(t){return Fn(e=>function yj(t,e){return gj(e)?t(...e):t(e)}(t,e))}function vj(t,e){return t.reduce((n,s,f)=>(n[s]=e[f],n),{})}function bj(...t){const e=function Lf(t){return me(cs(t))?t.pop():void 0}(t),{args:n,keys:s}=hj(t),f=new ht(I=>{const{length:j}=n;if(!j)return void I.complete();const q=new Array(j);let re=j,se=j;for(let fe=0;fe{be||(be=!0,se--),q[fe]=_e},()=>re--,void 0,()=>{(!re||!be)&&(se||I.next(s?vj(s,q):q),I.complete())}))}});return e?f.pipe(mj(e)):f}class ip{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=s=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}ip.\u0275fac=function(e){return new(e||ip)(mn(el),mn(ya))},ip.\u0275dir=nr({type:ip});class Wa extends ip{}Wa.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Wa)))(n||Wa)}}(),Wa.\u0275dir=nr({type:Wa,features:[$r]});const lc=new qn("NgValueAccessor"),wj={provide:lc,useExisting:vr(()=>Ld),multi:!0};class Ld extends Wa{writeValue(e){this.setProperty("checked",e)}}Ld.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ld)))(n||Ld)}}(),Ld.\u0275dir=nr({type:Ld,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,n){1&e&&$i("change",function(f){return n.onChange(f.target.checked)})("blur",function(){return n.onTouched()})},features:[Mi([wj]),$r]});const Ej={provide:lc,useExisting:vr(()=>Bd),multi:!0};const _j=new qn("CompositionEventMode");class Bd extends ip{constructor(e,n,s){super(e,n),this._compositionMode=s,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function Aj(){const t=sc()?sc().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){const n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}Bd.\u0275fac=function(e){return new(e||Bd)(mn(el),mn(ya),mn(_j,8))},Bd.\u0275dir=nr({type:Bd,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,n){1&e&&$i("input",function(f){return n._handleInput(f.target.value)})("blur",function(){return n.onTouched()})("compositionstart",function(){return n._compositionStart()})("compositionend",function(f){return n._compositionEnd(f.target.value)})},features:[Mi([Ej]),$r]});const Sj=!1;function yf(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function O5(t){return null!=t&&"number"==typeof t.length}const es=new qn("NgValidators"),mf=new qn("NgAsyncValidators"),Mj=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function x5(t){return e=>{if(yf(e.value)||yf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(yf(e.value)||yf(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}function N5(t){return yf(t.value)?{required:!0}:null}function R5(t){return!0===t.value?null:{required:!0}}function k5(t){return yf(t.value)||Mj.test(t.value)?null:{email:!0}}function L5(t){return e=>yf(e.value)||!O5(e.value)?null:e.value.lengthO5(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function j5(t){if(!t)return V1;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),s=>{if(yf(s.value))return null;const f=s.value;return e.test(f)?null:{pattern:{requiredPattern:n,actualValue:f}}}}function V1(t){return null}function F5(t){return null!=t}function U5(t){const e=h1(t)?Gr(t):t;if(Sj&&!t6(e)){let n="Expected async validator to return Promise or Observable.";throw"object"==typeof t&&(n+=" Are you using a synchronous validator where an async validator is expected?"),new hn(-1101,n)}return e}function K5(t){let e={};return t.forEach(n=>{e=null!=n?{...e,...n}:e}),0===Object.keys(e).length?null:e}function z5(t,e){return e.map(n=>n(t))}function V5(t){return t.map(e=>function Ij(t){return!t.validate}(e)?e:n=>e.validate(n))}function H5(t){if(!t)return null;const e=t.filter(F5);return 0==e.length?null:function(n){return K5(z5(n,e))}}function NA(t){return null!=t?H5(V5(t)):null}function W5(t){if(!t)return null;const e=t.filter(F5);return 0==e.length?null:function(n){return bj(z5(n,e).map(U5)).pipe(Fn(K5))}}function RA(t){return null!=t?W5(V5(t)):null}function G5(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function Z5(t){return t._rawValidators}function J5(t){return t._rawAsyncValidators}function kA(t){return t?Array.isArray(t)?t:[t]:[]}function H1(t,e){return Array.isArray(t)?t.includes(e):t===e}function Y5(t,e){const n=kA(e);return kA(t).forEach(f=>{H1(n,f)||n.push(f)}),n}function $5(t,e){return kA(e).filter(n=>!H1(t,n))}class Q5{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=NA(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=RA(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e){this.control&&this.control.reset(e)}hasError(e,n){return!!this.control&&this.control.hasError(e,n)}getError(e,n){return this.control?this.control.getError(e,n):null}}class Ms extends Q5{get formDirective(){return null}get path(){return null}}class vf extends Q5{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class X5{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}class Wy extends X5{constructor(e){super(e)}}Wy.\u0275fac=function(e){return new(e||Wy)(mn(vf,2))},Wy.\u0275dir=nr({type:Wy,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,n){2&e&&g1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)},features:[$r]});class op extends X5{constructor(e){super(e)}}op.\u0275fac=function(e){return new(e||op)(mn(Ms,10))},op.\u0275dir=nr({type:op,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,n){2&e&&g1("ng-untouched",n.isUntouched)("ng-touched",n.isTouched)("ng-pristine",n.isPristine)("ng-dirty",n.isDirty)("ng-valid",n.isValid)("ng-invalid",n.isInvalid)("ng-pending",n.isPending)("ng-submitted",n.isSubmitted)},features:[$r]});function q5(t,e){return t?`with name: '${e}'`:`at index: ${e}`}const jA=!1,Gy="VALID",G1="INVALID",sp="PENDING",Zy="DISABLED";function FA(t){return(Z1(t)?t.validators:t)||null}function UA(t,e){return(Z1(e)?e.asyncValidators:t)||null}function Z1(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function e4(t,e,n){const s=t.controls;if(!(e?Object.keys(s):s).length)throw new hn(1e3,jA?function Oj(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(e):"");if(!s[n])throw new hn(1001,jA?function xj(t,e){return`Cannot find form control ${q5(t,e)}`}(e,n):"")}function t4(t,e,n){t._forEachChild((s,f)=>{if(void 0===n[f])throw new hn(1002,jA?function Pj(t,e){return`Must supply a value for form control ${q5(t,e)}`}(e,f):"")})}class J1{constructor(e,n){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(n)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Gy}get invalid(){return this.status===G1}get pending(){return this.status==sp}get disabled(){return this.status===Zy}get enabled(){return this.status!==Zy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Y5(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Y5(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators($5(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators($5(e,this._rawAsyncValidators))}hasValidator(e){return H1(this._rawValidators,e)}hasAsyncValidator(e){return H1(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(n=>{n.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(n=>{n.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=sp,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Zy,this.errors=null,this._forEachChild(s=>{s.disable({...e,onlySelf:!0})}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(s=>s(!0))}enable(e={}){const n=this._parentMarkedDirty(e.onlySelf);this.status=Gy,this._forEachChild(s=>{s.enable({...e,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors({...e,skipPristineCheck:n}),this._onDisabledChange.forEach(s=>s(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Gy||this.status===sp)&&this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(n=>n._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Zy:Gy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=sp,this._hasOwnPendingAsyncValidator=!0;const n=U5(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(s=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(s,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,n={}){this.errors=e,this._updateControlsErrors(!1!==n.emitEvent)}get(e){let n=e;return null==n||(Array.isArray(n)||(n=n.split(".")),0===n.length)?null:n.reduce((s,f)=>s&&s._find(f),this)}getError(e,n){const s=n?this.get(n):this;return s&&s.errors?s.errors[e]:null}hasError(e,n){return!!this.getError(e,n)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new _o,this.statusChanges=new _o}_calculateStatus(){return this._allControlsDisabled()?Zy:this.errors?G1:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(sp)?sp:this._anyControlsHaveStatus(G1)?G1:Gy}_anyControlsHaveStatus(e){return this._anyControls(n=>n.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Z1(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){const n=this._parent&&this._parent.dirty;return!e&&!!n&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=function Nj(t){return Array.isArray(t)?NA(t):t||null}(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=function Rj(t){return Array.isArray(t)?RA(t):t||null}(this._rawAsyncValidators)}}class Jy extends J1{constructor(e,n,s){super(FA(n),UA(s,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,n){return this.controls[e]?this.controls[e]:(this.controls[e]=n,n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange),n)}addControl(e,n,s={}){this.registerControl(e,n),this.updateValueAndValidity({emitEvent:s.emitEvent}),this._onCollectionChange()}removeControl(e,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}setControl(e,n,s={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],n&&this.registerControl(e,n),this.updateValueAndValidity({emitEvent:s.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,n={}){t4(this,!0,e),Object.keys(e).forEach(s=>{e4(this,!0,s),this.controls[s].setValue(e[s],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(Object.keys(e).forEach(s=>{const f=this.controls[s];f&&f.patchValue(e[s],{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e={},n={}){this._forEachChild((s,f)=>{s.reset(e[f],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this._reduceChildren({},(e,n,s)=>(e[s]=n.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(n,s)=>!!s._syncPendingControls()||n);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(n=>{const s=this.controls[n];s&&e(s,n)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const[n,s]of Object.entries(this.controls))if(this.contains(n)&&e(s))return!0;return!1}_reduceValue(){return this._reduceChildren({},(n,s,f)=>((s.enabled||this.disabled)&&(n[f]=s.value),n))}_reduceChildren(e,n){let s=e;return this._forEachChild((f,I)=>{s=n(s,f,I)}),s}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}}class n4 extends Jy{}const jd=new qn("CallSetDisabledState",{providedIn:"root",factory:()=>Yy}),Yy="always";function Y1(t,e){return[...e.path,t]}function $y(t,e,n=Yy){KA(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||"always"===n)&&e.valueAccessor.setDisabledState?.(t.disabled),function Lj(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&r4(t,e)})}(t,e),function jj(t,e){const n=(s,f)=>{e.valueAccessor.writeValue(s),f&&e.viewToModelUpdate(s)};t.registerOnChange(n),e._registerOnDestroy(()=>{t._unregisterOnChange(n)})}(t,e),function Bj(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&r4(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),function kj(t,e){if(e.valueAccessor.setDisabledState){const n=s=>{e.valueAccessor.setDisabledState(s)};t.registerOnDisabledChange(n),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(n)})}}(t,e)}function $1(t,e,n=!0){const s=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(s),e.valueAccessor.registerOnTouched(s)),X1(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Q1(t,e){t.forEach(n=>{n.registerOnValidatorChange&&n.registerOnValidatorChange(e)})}function KA(t,e){const n=Z5(t);null!==e.validator?t.setValidators(G5(n,e.validator)):"function"==typeof n&&t.setValidators([n]);const s=J5(t);null!==e.asyncValidator?t.setAsyncValidators(G5(s,e.asyncValidator)):"function"==typeof s&&t.setAsyncValidators([s]);const f=()=>t.updateValueAndValidity();Q1(e._rawValidators,f),Q1(e._rawAsyncValidators,f)}function X1(t,e){let n=!1;if(null!==t){if(null!==e.validator){const f=Z5(t);if(Array.isArray(f)&&f.length>0){const I=f.filter(j=>j!==e.validator);I.length!==f.length&&(n=!0,t.setValidators(I))}}if(null!==e.asyncValidator){const f=J5(t);if(Array.isArray(f)&&f.length>0){const I=f.filter(j=>j!==e.asyncValidator);I.length!==f.length&&(n=!0,t.setAsyncValidators(I))}}}const s=()=>{};return Q1(e._rawValidators,s),Q1(e._rawAsyncValidators,s),n}function r4(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function i4(t,e){KA(t,e)}function VA(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}function o4(t,e){t._syncPendingControls(),e.forEach(n=>{const s=n.control;"submit"===s.updateOn&&s._pendingChange&&(n.viewToModelUpdate(s._pendingValue),s._pendingChange=!1)})}function HA(t,e){if(!e)return null;let n,s,f;return Array.isArray(e),e.forEach(I=>{I.constructor===Bd?n=I:function Kj(t){return Object.getPrototypeOf(t.constructor)===Wa}(I)?s=I:f=I}),f||s||n||null}const Vj={provide:Ms,useExisting:vr(()=>bf)},Qy=Promise.resolve();class bf extends Ms{constructor(e,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._directives=new Set,this.ngSubmit=new _o,this.form=new Jy({},NA(e),RA(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Qy.then(()=>{const n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),$y(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Qy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Qy.then(()=>{const n=this._findContainer(e.path),s=new Jy({});i4(s,e),n.registerControl(e.name,s),s.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Qy.then(()=>{const n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){Qy.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,o4(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}function s4(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function a4(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}bf.\u0275fac=function(e){return new(e||bf)(mn(es,10),mn(mf,10),mn(jd,8))},bf.\u0275dir=nr({type:bf,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,n){1&e&&$i("submit",function(f){return n.onSubmit(f)})("reset",function(){return n.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([Vj]),$r]});const Xy=class extends J1{constructor(e=null,n,s){super(FA(n),UA(s,n)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(n),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Z1(n)&&(n.nonNullable||n.initialValueIsDefault)&&(a4(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,n={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach(s=>s(this.value,!1!==n.emitViewToModelChange)),this.updateValueAndValidity(n)}patchValue(e,n={}){this.setValue(e,n)}reset(e=this.defaultValue,n={}){this._applyFormState(e),this.markAsPristine(n),this.markAsUntouched(n),this.setValue(this.value,n),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){s4(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){s4(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange))&&(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0)}_applyFormState(e){a4(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};class Fd extends Ms{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Y1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}Fd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Fd)))(n||Fd)}}(),Fd.\u0275dir=nr({type:Fd,features:[$r]});const Wj={provide:Ms,useExisting:vr(()=>wf)};class wf extends Fd{constructor(e,n,s){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(s)}_checkParentType(){!(this._parent instanceof wf)&&this._parent}}wf.\u0275fac=function(e){return new(e||wf)(mn(Ms,5),mn(es,10),mn(mf,10))},wf.\u0275dir=nr({type:wf,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Mi([Wj]),$r]});const Gj={provide:vf,useExisting:vr(()=>ap)},u4=Promise.resolve();class ap extends vf{constructor(e,n,s,f,I,j){super(),this._changeDetectorRef=I,this.callSetDisabledState=j,this.control=new Xy,this._registered=!1,this.update=new _o,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=HA(0,f)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const n=e.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),VA(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){$y(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){u4.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const n=e.isDisabled.currentValue,s=0!==n&&sA(n);u4.then(()=>{s&&!this.control.disabled?this.control.disable():!s&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Y1(e,this._parent):[e]}}ap.\u0275fac=function(e){return new(e||ap)(mn(Ms,9),mn(es,10),mn(mf,10),mn(lc,10),mn(tA,8),mn(jd,8))},ap.\u0275dir=nr({type:ap,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Mi([Gj]),$r,uo]});class up{}up.\u0275fac=function(e){return new(e||up)},up.\u0275dir=nr({type:up,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});const Zj={provide:lc,useExisting:vr(()=>Ud),multi:!0};class Ud extends Wa{writeValue(e){const n=e??"";this.setProperty("value",n)}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}Ud.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ud)))(n||Ud)}}(),Ud.\u0275dir=nr({type:Ud,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,n){1&e&&$i("input",function(f){return n.onChange(f.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([Zj]),$r]});const Jj={provide:lc,useExisting:vr(()=>lp),multi:!0};class Kd{}Kd.\u0275fac=function(e){return new(e||Kd)},Kd.\u0275mod=js({type:Kd}),Kd.\u0275inj=Ls({});class cp{constructor(){this._accessors=[]}add(e,n){this._accessors.push([e,n])}remove(e){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===e)return void this._accessors.splice(n,1)}select(e){this._accessors.forEach(n=>{this._isSameGroup(n,e)&&n[1]!==e&&n[1].fireUncheck(e.value)})}_isSameGroup(e,n){return!!e[0].control&&(e[0]._parent===n._control._parent&&e[1].name===n.name)}}cp.\u0275fac=function(e){return new(e||cp)},cp.\u0275prov=tr({token:cp,factory:cp.\u0275fac,providedIn:Kd});class lp extends Wa{constructor(e,n,s,f){super(e,n),this._registry=s,this._injector=f,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=Ki(jd,{optional:!0})??Yy}ngOnInit(){this._control=this._injector.get(vf),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}}lp.\u0275fac=function(e){return new(e||lp)(mn(el),mn(ya),mn(cp),mn($o))},lp.\u0275dir=nr({type:lp,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,n){1&e&&$i("change",function(){return n.onChange()})("blur",function(){return n.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Mi([Jj]),$r]});const Yj={provide:lc,useExisting:vr(()=>zd),multi:!0};class zd extends Wa{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=n=>{e(""==n?null:parseFloat(n))}}}zd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(zd)))(n||zd)}}(),zd.\u0275dir=nr({type:zd,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,n){1&e&&$i("change",function(f){return n.onChange(f.target.value)})("input",function(f){return n.onChange(f.target.value)})("blur",function(){return n.onTouched()})},features:[Mi([Yj]),$r]});const WA=new qn("NgModelWithFormControlWarning"),$j={provide:vf,useExisting:vr(()=>Vd)};class Vd extends vf{set isDisabled(e){}constructor(e,n,s,f,I){super(),this._ngModelWarningConfig=f,this.callSetDisabledState=I,this.update=new _o,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=HA(0,s)}ngOnChanges(e){if(this._isControlChanged(e)){const n=e.form.previousValue;n&&$1(n,this,!1),$y(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}VA(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&$1(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}Vd._ngModelWarningSentOnce=!1,Vd.\u0275fac=function(e){return new(e||Vd)(mn(es,10),mn(mf,10),mn(lc,10),mn(WA,8),mn(jd,8))},Vd.\u0275dir=nr({type:Vd,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Mi([$j]),$r,uo]});const Qj={provide:Ms,useExisting:vr(()=>Hd)};class Hd extends Ms{constructor(e,n,s){super(),this.callSetDisabledState=s,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new _o,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(X1(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const n=this.form.get(e.path);return $y(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){$1(e.control||null,e,!1),function zj(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this.submitted=!0,o4(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const n=e.control,s=this.form.get(e.path);n!==s&&($1(n||null,e),(t=>t instanceof Xy)(s)&&($y(s,e,this.callSetDisabledState),e.control=s))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const n=this.form.get(e.path);i4(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const n=this.form.get(e.path);n&&function Fj(t,e){return X1(t,e)}(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){KA(this.form,this),this._oldForm&&X1(this._oldForm,this)}_checkFormPresent(){this.form}}Hd.\u0275fac=function(e){return new(e||Hd)(mn(es,10),mn(mf,10),mn(jd,8))},Hd.\u0275dir=nr({type:Hd,selectors:[["","formGroup",""]],hostBindings:function(e,n){1&e&&$i("submit",function(f){return n.onSubmit(f)})("reset",function(){return n.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Mi([Qj]),$r,uo]});const Xj={provide:Ms,useExisting:vr(()=>Wd)};class Wd extends Fd{constructor(e,n,s){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(s)}_checkParentType(){c4(this._parent)}}Wd.\u0275fac=function(e){return new(e||Wd)(mn(Ms,13),mn(es,10),mn(mf,10))},Wd.\u0275dir=nr({type:Wd,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Mi([Xj]),$r]});const qj={provide:Ms,useExisting:vr(()=>Gd)};class Gd extends Ms{constructor(e,n,s){super(),this._parent=e,this._setValidators(n),this._setAsyncValidators(s)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Y1(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){c4(this._parent)}}function c4(t){return!(t instanceof Wd||t instanceof Hd||t instanceof Gd)}Gd.\u0275fac=function(e){return new(e||Gd)(mn(Ms,13),mn(es,10),mn(mf,10))},Gd.\u0275dir=nr({type:Gd,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Mi([qj]),$r]});const eF={provide:vf,useExisting:vr(()=>Zd)};class Zd extends vf{set isDisabled(e){}constructor(e,n,s,f,I){super(),this._ngModelWarningConfig=I,this._added=!1,this.update=new _o,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(n),this._setAsyncValidators(s),this.valueAccessor=HA(0,f)}ngOnChanges(e){this._added||this._setUpControl(),VA(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Y1(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}Zd._ngModelWarningSentOnce=!1,Zd.\u0275fac=function(e){return new(e||Zd)(mn(Ms,13),mn(es,10),mn(mf,10),mn(lc,10),mn(WA,8))},Zd.\u0275dir=nr({type:Zd,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Mi([eF]),$r,uo]});const tF={provide:lc,useExisting:vr(()=>Ef),multi:!0};function l4(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Ef extends Wa{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const s=l4(this._getOptionId(e),e);this.setProperty("value",s)}registerOnChange(e){this.onChange=n=>{this.value=this._getOptionValue(n),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const n of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(n),e))return n;return null}_getOptionValue(e){const n=function nF(t){return t.split(":")[0]}(e);return this._optionMap.has(n)?this._optionMap.get(n):e}}Ef.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Ef)))(n||Ef)}}(),Ef.\u0275dir=nr({type:Ef,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,n){1&e&&$i("change",function(f){return n.onChange(f.target.value)})("blur",function(){return n.onTouched()})},inputs:{compareWith:"compareWith"},features:[Mi([tF]),$r]});class qy{constructor(e,n,s){this._element=e,this._renderer=n,this._select=s,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(l4(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}qy.\u0275fac=function(e){return new(e||qy)(mn(ya),mn(el),mn(Ef,9))},qy.\u0275dir=nr({type:qy,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});const rF={provide:lc,useExisting:vr(()=>Af),multi:!0};function f4(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}class Af extends Wa{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let n;if(this.value=e,Array.isArray(e)){const s=e.map(f=>this._getOptionId(f));n=(f,I)=>{f._setSelected(s.indexOf(I.toString())>-1)}}else n=(s,f)=>{s._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(e){this.onChange=n=>{const s=[],f=n.selectedOptions;if(void 0!==f){const I=f;for(let j=0;jJd),multi:!0};class Jd extends Iu{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>h4(e),this.createValidator=e=>P5(e)}}Jd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Jd)))(n||Jd)}}(),Jd.\u0275dir=nr({type:Jd,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("max",n._enabled?n.max:null)},inputs:{max:"max"},features:[Mi([oF]),$r]});const sF={provide:es,useExisting:vr(()=>Yd),multi:!0};class Yd extends Iu{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>h4(e),this.createValidator=e=>x5(e)}}Yd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Yd)))(n||Yd)}}(),Yd.\u0275dir=nr({type:Yd,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("min",n._enabled?n.min:null)},inputs:{min:"min"},features:[Mi([sF]),$r]});const aF={provide:es,useExisting:vr(()=>_f),multi:!0},uF={provide:es,useExisting:vr(()=>$d),multi:!0};class _f extends Iu{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=sA,this.createValidator=e=>N5}enabled(e){return e}}_f.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(_f)))(n||_f)}}(),_f.\u0275dir=nr({type:_f,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,n){2&e&&rl("required",n._enabled?"":null)},inputs:{required:"required"},features:[Mi([aF]),$r]});class $d extends _f{constructor(){super(...arguments),this.createValidator=e=>R5}}$d.\u0275fac=function(){let t;return function(n){return(t||(t=Wi($d)))(n||$d)}}(),$d.\u0275dir=nr({type:$d,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("required",n._enabled?"":null)},features:[Mi([uF]),$r]});const cF={provide:es,useExisting:vr(()=>Qd),multi:!0};class Qd extends Iu{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=sA,this.createValidator=e=>k5}enabled(e){return e}}Qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Qd)))(n||Qd)}}(),Qd.\u0275dir=nr({type:Qd,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Mi([cF]),$r]});const lF={provide:es,useExisting:vr(()=>Xd),multi:!0};class Xd extends Iu{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>d4(e),this.createValidator=e=>L5(e)}}Xd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(Xd)))(n||Xd)}}(),Xd.\u0275dir=nr({type:Xd,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("minlength",n._enabled?n.minlength:null)},inputs:{minlength:"minlength"},features:[Mi([lF]),$r]});const fF={provide:es,useExisting:vr(()=>qd),multi:!0};class qd extends Iu{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>d4(e),this.createValidator=e=>B5(e)}}qd.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(qd)))(n||qd)}}(),qd.\u0275dir=nr({type:qd,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("maxlength",n._enabled?n.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Mi([fF]),$r]});const dF={provide:es,useExisting:vr(()=>eh),multi:!0};class eh extends Iu{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>j5(e)}}eh.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(eh)))(n||eh)}}(),eh.\u0275dir=nr({type:eh,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,n){2&e&&rl("pattern",n._enabled?n.pattern:null)},inputs:{pattern:"pattern"},features:[Mi([dF]),$r]});class th{}th.\u0275fac=function(e){return new(e||th)},th.\u0275mod=js({type:th}),th.\u0275inj=Ls({imports:[Kd]});class p4 extends J1{constructor(e,n,s){super(FA(n),UA(s,n)),this.controls=e,this._initObservables(),this._setUpdateStrategy(n),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,n={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}insert(e,n,s={}){this.controls.splice(e,0,n),this._registerControl(n),this.updateValueAndValidity({emitEvent:s.emitEvent})}removeAt(e,n={}){let s=this._adjustIndex(e);s<0&&(s=0),this.controls[s]&&this.controls[s]._registerOnCollectionChange(()=>{}),this.controls.splice(s,1),this.updateValueAndValidity({emitEvent:n.emitEvent})}setControl(e,n,s={}){let f=this._adjustIndex(e);f<0&&(f=0),this.controls[f]&&this.controls[f]._registerOnCollectionChange(()=>{}),this.controls.splice(f,1),n&&(this.controls.splice(f,0,n),this._registerControl(n)),this.updateValueAndValidity({emitEvent:s.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,n={}){t4(this,!1,e),e.forEach((s,f)=>{e4(this,!1,f),this.at(f).setValue(s,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n)}patchValue(e,n={}){null!=e&&(e.forEach((s,f)=>{this.at(f)&&this.at(f).patchValue(s,{onlySelf:!0,emitEvent:n.emitEvent})}),this.updateValueAndValidity(n))}reset(e=[],n={}){this._forEachChild((s,f)=>{s.reset(e[f],{onlySelf:!0,emitEvent:n.emitEvent})}),this._updatePristine(n),this._updateTouched(n),this.updateValueAndValidity(n)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(n=>n._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((n,s)=>!!s._syncPendingControls()||n,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((n,s)=>{e(n,s)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(n=>n.enabled&&e(n))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}}function g4(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}class fl{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new fl;return e.useNonNullable=!0,e}group(e,n=null){const s=this._reduceControls(e);let f={};return g4(n)?f=n:null!==n&&(f.validators=n.validator,f.asyncValidators=n.asyncValidator),new Jy(s,f)}record(e,n=null){const s=this._reduceControls(e);return new n4(s,n)}control(e,n,s){let f={};return this.useNonNullable?(g4(n)?f=n:(f.validators=n,f.asyncValidators=s),new Xy(e,{...f,nonNullable:!0})):new Xy(e,n,s)}array(e,n,s){const f=e.map(I=>this._createControl(I));return new p4(f,n,s)}_reduceControls(e){const n={};return Object.keys(e).forEach(s=>{n[s]=this._createControl(e[s])}),n}_createControl(e){if(e instanceof Xy)return e;if(e instanceof J1)return e;if(Array.isArray(e)){const n=e[0],s=e.length>1?e[1]:null,f=e.length>2?e[2]:null;return this.control(n,s,f)}return this.control(e)}}fl.\u0275fac=function(e){return new(e||fl)},fl.\u0275prov=tr({token:fl,factory:fl.\u0275fac,providedIn:"root"});class q1{}q1.\u0275fac=function(e){return new(e||q1)},q1.\u0275prov=tr({token:q1,factory:function(){return Ki(fl).nonNullable},providedIn:"root"});class fp extends fl{group(e,n=null){return super.group(e,n)}control(e,n,s){return super.control(e,n,s)}array(e,n,s){return super.array(e,n,s)}}fp.\u0275fac=function(){let t;return function(n){return(t||(t=Wi(fp)))(n||fp)}}(),fp.\u0275prov=tr({token:fp,factory:fp.\u0275fac,providedIn:"root"});new n1("15.2.9");class Sf{static withConfig(e){return{ngModule:Sf,providers:[{provide:jd,useValue:e.callSetDisabledState??Yy}]}}}Sf.\u0275fac=function(e){return new(e||Sf)},Sf.\u0275mod=js({type:Sf}),Sf.\u0275inj=Ls({imports:[th]});class nh{static withConfig(e){return{ngModule:nh,providers:[{provide:WA,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:jd,useValue:e.callSetDisabledState??Yy}]}}}nh.\u0275fac=function(e){return new(e||nh)},nh.\u0275mod=js({type:nh}),nh.\u0275inj=Ls({imports:[th]});var Le=d(49671),lr=d(71836);class hF{constructor(e){this.provider=new lr.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:n}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:n})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class tm{constructor(e,n){this.storage=e,this.namespace=Array.isArray(n)?n.join(":"):n}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then(n=>"string"==typeof n?JSON.parse(n):null)}setItem(e,n){return this.storage.setItem(this.resolveKey(e),JSON.stringify(n))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}class pF{getItem(e){return new Promise(n=>{n(localStorage.getItem(e))})}setItem(e,n){return new Promise(s=>{localStorage.setItem(e,n),s()})}removeItem(e){return new Promise(n=>{localStorage.removeItem(e),n()})}}class dp{constructor(e){this.namespace=e}emit(e,...n){if(dp.debug){if(this.namespace&&"error"!==e)return void console[e](this.namespace,...n);console[e](...n)}}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}dp.debug=!1;const fc=new dp;var Du=d(59069),GA=d.n(Du);class ZA{constructor(){this.emitter=new Du.EventEmitter}on(e,n){return this.emitter.on(e,n),{remove:()=>this.emitter.off(e,n)}}off(e,n){this.emitter.off(e,n)}emit(e,n){this.emitter.emit(e,n)}}const nm="near-wallet-selector",rm="recentlySignedInWallets",m4="contract",JA="contract:pending",v4="selectedWalletId",YA="selectedWalletId:pending";class gF{constructor({factories:e,storage:n,options:s,store:f,emitter:I,provider:j}){this.factories=e,this.storage=n,this.options=s,this.store=f,this.emitter=I,this.provider=j,this.modules=[],this.instances={}}validateWallet(e){var n=this;return(0,Le.Z)(function*(){let s=[];const f=yield n.getWallet(e);return f&&(s=yield f.getAccounts().catch(I=>(fc.log(`Failed to validate ${f.id} during setup`),fc.error(I),[]))),s})()}resolveStorageState(){var e=this;return(0,Le.Z)(function*(){const n=new tm(e.storage,nm),s=yield n.getItem(YA),f=yield n.getItem(JA);if(s&&f){const se=yield e.validateWallet(s);if(yield n.removeItem(YA),yield n.removeItem(JA),se.length){const{selectedWalletId:fe}=e.store.getState(),be=yield e.getWallet(fe);be&&s!==fe&&(yield be.signOut().catch(Oe=>{fc.log("Failed to sign out existing wallet"),fc.error(Oe)}));return{accounts:se,contract:f,selectedWalletId:s,recentlySignedInWallets:yield e.setWalletAsRecentlySignedIn(s)}}}const{contract:I,selectedWalletId:j}=e.store.getState(),q=yield e.validateWallet(j),re=yield n.getItem(rm);return q.length?{accounts:q,contract:I,selectedWalletId:j,recentlySignedInWallets:re||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:re||[]}})()}setWalletAsRecentlySignedIn(e){var n=this;return(0,Le.Z)(function*(){const s=new tm(n.storage,nm);let f=yield s.getItem(rm);return f||(f=[]),f.includes(e)||(f.unshift(e),f=f.slice(0,5),yield s.setItem(rm,f)),f})()}signOutWallet(e){var n=this;return(0,Le.Z)(function*(){const s=yield n.getWallet(e);yield s.signOut().catch(f=>{fc.log(`Failed to sign out ${s.id}`),fc.error(f),n.onWalletSignedOut(s.id)})})()}onWalletSignedIn(e,{accounts:n,contractId:s,methodNames:f}){var I=this;return(0,Le.Z)(function*(){const{selectedWalletId:j}=I.store.getState(),q=new tm(I.storage,nm),re={contractId:s,methodNames:f};if(!n.length)return void("browser"===I.getModule(e).type&&(yield q.setItem(YA,e),yield q.setItem(JA,re)));j&&j!==e&&(yield I.signOutWallet(j));const se=yield I.setWalletAsRecentlySignedIn(e);I.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:re,accounts:n,recentlySignedInWallets:se}}),I.emitter.emit("signedIn",{walletId:e,contractId:s,methodNames:f,accounts:n})})()}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){var n=this;const s=new ZA;return s.on("signedOut",()=>{this.onWalletSignedOut(e.id)}),s.on("signedIn",f=>{this.onWalletSignedIn(e.id,f)}),s.on("accountsChanged",function(){var f=(0,Le.Z)(function*({accounts:I}){if(n.emitter.emit("accountsChanged",{walletId:e.id,accounts:I}),!I.length)return n.signOutWallet(e.id);n.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:I}})});return function(I){return f.apply(this,arguments)}}()),s.on("networkChanged",({networkId:f})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:f})}),s.on("uriChanged",({uri:f})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:f})}),s}validateSignMessageParams({message:e,nonce:n,recipient:s}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Buffer.isBuffer(n)||32!==n.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!s||""===s.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){var n=this;const s=e.signIn,f=e.signOut,I=e.signMessage;return e.signIn=function(){var j=(0,Le.Z)(function*(q){const re=yield s(q),{contractId:se,methodNames:fe=[]}=q;return yield n.onWalletSignedIn(e.id,{accounts:re,contractId:se,methodNames:fe}),re});return function(q){return j.apply(this,arguments)}}(),e.signOut=(0,Le.Z)(function*(){yield f(),n.onWalletSignedOut(e.id)}),e.signMessage=function(){var j=(0,Le.Z)(function*(q){if(void 0===I)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return n.validateSignMessageParams(q),yield I(q)});return function(q){return j.apply(this,arguments)}}(),e}setupInstance(e){var n=this;return(0,Le.Z)(function*(){if(!e.metadata.available){const f="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${f}`)}const s={id:e.id,type:e.type,metadata:e.metadata,...yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:n.options,store:n.store.toReadOnly(),provider:n.provider,emitter:n.setupWalletEmitter(e),logger:new dp(e.id),storage:new tm(n.storage,[nm,e.id])})};return n.decorateWallet(s)})()}getModule(e){return this.modules.find(n=>n.id===e)}getWallet(e){var n=this;return(0,Le.Z)(function*(){const s=n.getModule(e);if(!s)return null;const{selectedWalletId:f}=n.store.getState();return!s.metadata.available&&f?(n.onWalletSignedOut(f),null):yield s.wallet()})()}setup(){var e=this;return(0,Le.Z)(function*(){const n=[];for(let q=0;q(fc.log("Failed to setup module"),fc.error(se),null));re&&(n.some(se=>se.id===re.id)||n.push({id:re.id,type:re.type,metadata:re.metadata,wallet:function(){var se=(0,Le.Z)(function*(){let fe=e.instances[re.id];return fe||(fe=yield e.setupInstance(re),e.instances[re.id]=fe,fe)});return function(){return se.apply(this,arguments)}}()}))}e.modules=n;const{accounts:s,contract:f,selectedWalletId:I,recentlySignedInWallets:j}=yield e.resolveStorageState();e.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:n,accounts:s,contract:f,selectedWalletId:I,recentlySignedInWallets:j}});for(let q=0;q"string"==typeof t?(t=>{switch(t){case"mainnet":return{networkId:t,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:t,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${t}'`)}})(t):t;class bF extends In{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const n=super._subscribe(e);return!n.closed&&e.next(this._value),n}getValue(){const{hasError:e,thrownError:n,_value:s}=this;if(e)throw n;return this._throwIfClosed(),s}next(e){super.next(this._value=e)}}function EF(t,e){return Pn(function wF(t,e,n,s,f){return(I,j)=>{let q=n,re=e,se=0;I.subscribe(vt(j,fe=>{const be=se++;re=q?t(re,fe,be):(q=!0,fe),s&&j.next(re)},f&&(()=>{q&&j.next(re),j.complete()})))}}(t,e,arguments.length>=2,!0))}const AF=(t,e)=>{switch(fc.log("Store Action",e),e.type){case"SETUP_WALLET_MODULES":{const{modules:n,accounts:s,contract:f,selectedWalletId:I,recentlySignedInWallets:j}=e.payload,q=s.map((re,se)=>({...re,active:0===se}));return{...t,modules:n,accounts:q,contract:f,selectedWalletId:I,recentlySignedInWallets:j}}case"WALLET_CONNECTED":{const{walletId:n,contract:s,accounts:f,recentlySignedInWallets:I}=e.payload;if(!f.length)return t;const j=t.accounts.findIndex(re=>re.active),q=f.map((re,se)=>({...re,active:se===(j>-1?j:0)}));return{...t,contract:s,accounts:q,selectedWalletId:n,recentlySignedInWallets:I}}case"WALLET_DISCONNECTED":{const{walletId:n}=e.payload;return n!==t.selectedWalletId?t:{...t,contract:null,accounts:[],selectedWalletId:null}}case"ACCOUNTS_CHANGED":{const{walletId:n,accounts:s}=e.payload;if(n!==t.selectedWalletId)return t;const f=t.accounts.find(q=>q.active),I=!s.some(q=>q.accountId===f?.accountId),j=s.map((q,re)=>({...q,active:I?0===re:q.accountId===f?.accountId}));return{...t,accounts:j}}case"SET_ACTIVE_ACCOUNT":{const{accountId:n}=e.payload,s=t.accounts.map(f=>({...f,active:f.accountId===n}));return{...t,accounts:s}}default:return t}},_F=function(){var t=(0,Le.Z)(function*(e){const n=new tm(e,nm),s={modules:[],accounts:[],contract:yield n.getItem(m4),selectedWalletId:yield n.getItem(v4),recentlySignedInWallets:(yield n.getItem(rm))||[]},f=new bF(s),I=new In;I.pipe(EF(AF,s)).subscribe(f);const j=function(){var re=(0,Le.Z)(function*(se,fe,be,_e){if(fe[_e]!==se[_e]){if(fe[_e])return void(yield n.setItem(be,fe[_e]));yield n.removeItem(be)}});return function(fe,be,_e,Oe){return re.apply(this,arguments)}}();let q=f.getValue();return f.subscribe(re=>{j(q,re,v4,"selectedWalletId"),j(q,re,m4,"contract"),j(q,re,rm,"recentlySignedInWallets"),q=re}),{observable:f,getState:()=>f.getValue(),dispatch:re=>I.next(re),toReadOnly:()=>({getState:()=>f.getValue(),observable:f.asObservable()})}});return function(n){return t.apply(this,arguments)}}();let $A=null;const b4=(t,e,n,s)=>{return{options:t,store:e.toReadOnly(),wallet:(f=(0,Le.Z)(function*(I){const{selectedWalletId:j}=e.getState(),q=yield n.getWallet(I||j);if(!q)throw I?new Error("Invalid wallet id"):new Error("No wallet selected");return q}),function(j){return f.apply(this,arguments)}),setActiveAccount:f=>{const{accounts:I}=e.getState();if(!I.some(j=>j.accountId===f))throw new Error("Invalid account id");e.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:f}})},isSignedIn(){const{accounts:f}=e.getState();return Boolean(f.length)},on:(f,I)=>s.on(f,I),off:(f,I)=>{s.off(f,I)}};var f},w4=function(){var t=(0,Le.Z)(function*(e){const{options:n,storage:s}=(t=>({options:{languageCode:t.languageCode||void 0,network:mF(t.network),debug:t.debug||!1,optimizeWalletOrder:!1!==t.optimizeWalletOrder,randomizeWalletOrder:t.randomizeWalletOrder||!1,relayerUrl:t.relayerUrl||void 0},storage:t.storage||new pF}))(e);dp.debug=n.debug;const f=new ZA,I=yield _F(s),j=new gF({factories:e.modules,storage:s,options:n,store:I,emitter:f,provider:new hF(n.network.nodeUrl)});return yield j.setup(),e.allowMultipleSelectors?b4(n,I,j,f):($A||($A=b4(n,I,j,f)),$A)});return function(n){return t.apply(this,arguments)}}(),E4=t=>new Promise(e=>setTimeout(e,t)),A4=function(){var t=(0,Le.Z)(function*(e,n,s){const f=e();if(f)return f;if(!s)throw new Error("Exceeded timeout");return E4(n).then(()=>A4(e,n,s-1))});return function(n,s,f){return t.apply(this,arguments)}}(),Ga=function(){var t=(0,Le.Z)(function*(e,n={}){const{timeout:s=100,interval:f=50}=n;return Promise.race([E4(s).then(()=>{throw new Error("Exceeded timeout")}),A4(e,f,Math.floor(s/f))])});return function(n){return t.apply(this,arguments)}}(),Mf=t=>t.accounts.find(e=>e.active)||null,SF=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],QA=t=>{if(typeof navigator>"u")return!1;const e=(t=>""!==t&&SF.reduce((e,[n,s])=>{if(e)return e;const f=s.exec(t);return!!f&&[n,f]},!1))(navigator.userAgent);if(!e)return!1;const[n]=e;return"searchbot"!==n&&!!t.find(s=>s===n)};var _4=d(21531),IF=d(1520);class XA{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}}const S4=new Map([[XA,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),TF=function(){var t=(0,Le.Z)(function*({accountId:e,network:n,publicKey:s}){return yield new lr.providers.JsonRpcProvider({url:n.nodeUrl}).query({request_type:"view_access_key",account_id:e,finality:"final",public_key:s})});return function(n){return t.apply(this,arguments)}}(),OF=function(){var t=(0,Le.Z)(function*({publicKey:e,accountId:n,network:s}){const{permission:f}=yield TF({accountId:n,network:s,publicKey:e});return"FullAccess"===f});return function(n){return t.apply(this,arguments)}}(),M4=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Connect Your Wallet","whatIsAWallet":"What is a Wallet?","secureAndManage":"Secure & Manage Your Digital Assets","safelyStore":"Safely store and transfer your crypto and NFTs.","logInToAny":"Log In to Any NEAR App","noNeedToCreate":"No need to create new accounts or credentials. Connect your wallet and you are good to go!","getAWallet":"Get a Wallet","useAWallet":"Use a wallet to secure and manage your NEAR assets, and to log in to any NEAR app without the need for usernames and passwords.","connectionFailed":"Connection Failed","connectionSuccessful":"Connection Successful","connected":"Connected","connectingTo":"Connecting to","connectingMessage":{"injected":"Confirm the connection in the extension window","browser":"Confirm the connection in the wallet after redirect","hardware":"Confirm the connection in the ledger device","bridge":"Confirm the connection in the wallet"}},"ledger":{"connectWithLedger":"Connect with Ledger","makeSureYourLedger":"Make sure your Ledger is connected securely, and that the NEAR app is open on your device","continue":"Continue","specifyHDPath":"Specify HD Path","enterYourPreferredHDPath":"Enter your preferred HD path, then scan for any active accounts.","scan":"Scan","retry":"Retry","ledgerIsNotAvailable":"Ledger is not available","accessDeniedToUseLedgerDevice":"Access denied to use Ledger device","noAccountsFound":"No Accounts Found","selectYourAccounts":"Select Your Accounts","connecting1Account":"Connecting 1 Account","cantFindAnyAccount":"Can\'t find any account associated with this Ledger. Please create a new NEAR account on","orConnectAnAnotherLedger":"or connect an another Ledger.","connecting":"Connecting","ofAccounts":"of Accounts","failedToAutomatically":"Failed to automatically find account id. Provide it manually:","overviewTheListOfAuthorized":"Overview the list of authorized account(s), complete sign in by clicking the button below.","finish":"Finish"},"install":{"youllNeedToInstall":"You\'ll need to install","toContinueAfterInstalling":"to continue. After installing","refreshThePage":"refresh the page.","open":"Open"},"qr":{"copiedToClipboard":"Copied to clipboard","failedToCopy":"Failed to copy to clipboard","scanWithYourMobile":"Scan with Your Mobile Device","copyToClipboard":" Copy to clipboard","preferTheOfficial":"Prefer the official dialogue of","open":"Open"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Choose a Wallet","transferYourAccounts":"Transfer Your Accounts","selectAWallet":"Select a wallet that fits your needs and supports your connected accounts.","selectYourAccounts":"Select Your Accounts","afterDecide":"After you decide on a wallet, you can select which accounts you want to transfer.","disclaimer":"You won\u2019t be able to transfer accounts that have never been funded or used on NEAR.","warning":"does not support account export at this time. Please select another wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Select Accounts to Transfer","button":"Continue","deselectAll":"Deselect All","selectAll":"Select All","unavailable":"Transfer Unavailable","error":"Account does not exist","warningLedger":"Ledger support required","noBalance":"Account not funded"},"getPassphrase":{"title":"Copy Temporary Password","desc":"You\u2019ll need to enter this password when you begin exporting your accounts to a different wallet.","button":"Continue","transferButton":"Transfer Accounts","label":"Click to Copy","checkLabel":"I copied or wrote down the password"},"complete":{"title":"Complete the Transfer","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Once import part of process is completed from selected wallet, press button to complete the transfer process.","startOverButton":"Start Over","button":"Complete"}}},"component":{"clickToCopy":{"label":"Copied","tooltip":"Click to copy"}}}'),xF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Conecta Tu Billetera","whatIsAWallet":"\xbfQue es una Billetera?","secureAndManage":"Resguarda y Administrar Tus Activos Digitales","safelyStore":"Almacena de forma segura y transfiere tus cryptos y NFT\'s","logInToAny":"Inicie sesi\xf3n en Cualquier Aplicacion NEAR","noNeedToCreate":"No es necesario crear nuevas cuentas o credenciales, \xa1Conecta tu billetera y listo!","getAWallet":"Obten una Billetera","useAWallet":"Usa tu Billetera para resguardar y administrar tus activos en NEAR, e Iniciar sesi\xf3n en cualquier aplicacion NEAR sin la necesidad de nombres de usuarios y contrase\xf1as","connectionFailed":"Conexi\xf3n Fallida","connectionSuccessful":"Conexi\xf3n Existosa","connected":"Conectado","connectingTo":"Conectando a ","connectingMessage":{"injected":"Confirme la conexi\xf3n en la ventana de extensi\xf3n","browser":"Confirme la conexi\xf3n en la billetera despu\xe9s de la redirecci\xf3n","hardware":"Confirme la conexi\xf3n en el dispositivo de libro mayor","bridge":"Confirmar la conexi\xf3n en la billetera"}},"ledger":{"connectWithLedger":"Conectar con Ledger","makeSureYourLedger":"Aseg\xfarese de que su ledger est\xe1 conectada de forma segura y que la aplicacion NEAR est\xe9 abierta en su dispositivo","continue":"Continuar","specifyHDPath":"Especifique la ruta HD","enterYourPreferredHDPath":"Ingrese su ruta HD prerida,y luego busque cualquier cuenta activa.","scan":"Escanear","retry":"Reintentar","ledgerIsNotAvailable":"El Ledger no est\xe1 disponible","accessDeniedToUseLedgerDevice":"Acceso denegado para usar el dispositivo ledger","noAccountsFound":"No se encontraron cuentas","selectYourAccounts":"Selecciona tus cuentas","connecting1Account":"Conectando a 1 cuenta","cantFindAnyAccount":"No se pudo encontrar ninguna cuenta asociada con este ledger,Por favor crea una nueva cuenta en NEAR","orConnectAnAnotherLedger":"o conecta otro ledger","connecting":"Conectando","ofAccounts":"de Cuentas","failedToAutomatically":"No se pudo encontrar automaticamente el id de la cuenta,Ingresalo manualmente:","overviewTheListOfAuthorized":"Revise la lista de las cuentas autorizadas,Complete el inicio de sesi\xf3n haciedo click a countinuacion.","finish":"Finalizar"},"install":{"youllNeedToInstall":"Tendr\xe1s que instalar","toContinueAfterInstalling":"Para continuar, Despues de instalar","refreshThePage":"Recarga la pagina","open":"Abrir"},"qr":{"copiedToClipboard":"Copiado al Portapapeles","failedToCopy":"Fall\xf3 la copia al Portapapeles","scanWithYourMobile":"Busca con tu dispositivo movil","copyToClipboard":" Copiar al Portapapeles","preferTheOfficial":"\xbfPrefires el di\xe1logo oficial de","open":"Abrir"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),PF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u8fde\u63a5\u4f60\u7684\u94b1\u5305","whatIsAWallet":"\u4ec0\u4e48\u662f\u94b1\u5305\uff1f","secureAndManage":"\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684\u6570\u5b57\u8d44\u4ea7","safelyStore":"\u5b89\u5168\u5b58\u50a8\u548c\u8f6c\u79fb\u4f60\u7684\u52a0\u5bc6\u8d27\u5e01\u548cNFT","logInToAny":"\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","noNeedToCreate":"\u4e0d\u9700\u8981\u521b\u5efa\u65b0\u8d26\u6237\u6216\u5bc6\u7801\u3002\u8fde\u63a5\u4f60\u7684\u94b1\u5305\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff01","getAWallet":"\u83b7\u53d6\u65b0\u8d26\u6237","useAWallet":"\u4f7f\u7528\u94b1\u5305\u6765\u4fdd\u62a4\u548c\u7ba1\u7406\u4f60\u7684 NEAR \u8d44\u4ea7\uff0c\u65e0\u9700\u7528\u6237\u540d\u548c\u5bc6\u7801\u5373\u53ef\u767b\u5f55\u4efb\u4f55 NEAR \u5e94\u7528","connectionFailed":"\u8fde\u63a5\u5931\u8d25","connectionSuccessful":"\u8fde\u63a5\u6210\u529f","connected":"\u5df2\u8fde\u63a5","connectingTo":"\u6b63\u5728\u8fde\u63a5"},"ledger":{"connectWithLedger":"\u8fde\u63a5 Ledger","makeSureYourLedger":"\u786e\u4fdd\u4f60\u7684 Ledger \u5df2\u7ecf\u5b89\u5168\u8fde\u63a5\uff0c\u5e76\u4e14 NEAR \u5e94\u7528\u5df2\u7ecf\u5728\u4f60\u8bbe\u5907\u4e0a\u6253\u5f00","continue":"\u7ee7\u7eed","specifyHDPath":"\u6307\u5b9a HD \u8def\u5f84","enterYourPreferredHDPath":"\u8f93\u5165\u4f60\u504f\u597d\u7684 HD \u8def\u5f84\uff0c\u7136\u540e\u4e3a\u4efb\u610f\u6d3b\u8dc3\u8d26\u6237\u626b\u7801","scan":"\u626b\u7801","retry":"\u91cd\u8bd5","ledgerIsNotAvailable":"Ledger \u4e0d\u53ef\u7528","accessDeniedToUseLedgerDevice":"\u8bbf\u95ee Ledger \u8bbe\u5907\u88ab\u62d2\u7edd","noAccountsFound":"\u6ca1\u6709\u627e\u5230\u8d26\u6237","selectYourAccounts":"\u9009\u62e9\u4f60\u7684\u8d26\u6237","connecting1Account":"\u6b63\u5728\u8fde\u63a51\u4e2a\u8d26\u6237","cantFindAnyAccount":"\u6ca1\u6709\u627e\u5230\u4efb\u4f55\u4e0e\u8fd9\u4e2a Ledger \u76f8\u5173\u8054\u7684\u8d26\u6237\u3002\u8bf7\u521b\u5efa\u65b0\u8d26\u6237\u4e8e","orConnectAnAnotherLedger.":"\u6216\u8fde\u63a5\u53e6\u4e00\u4e2a Ledger","connecting":"\u6b63\u5728\u8fde\u63a5","ofAccounts":"\u4e2a\u8d26\u6237","failedToAutomatically":"\u65e0\u6cd5\u81ea\u52a8\u627e\u5230\u8d26\u6237ID\uff0c\u8bf7\u4e3b\u52a8\u63d0\u4f9b\uff1a","overviewTheListOfAuthorized":"\u8bf7\u67e5\u770b\u5df2\u6388\u6743\u7684\u8d26\u6237\u5217\u8868\uff0c\u70b9\u51fb\u4ee5\u4e0b\u6309\u94ae\u5b8c\u6210\u767b\u5f55","finish":"\u5b8c\u6210"},"install":{"youllNeedToInstall":"\u4f60\u5c06\u9700\u8981\u5b89\u88c5","toContinueAfterInstalling":"\u4ee5\u7ee7\u7eed\u3002\u5b89\u88c5\u5b8c","refreshThePage":"\u8bf7\u5237\u65b0\u9875\u9762","open":"\u6253\u5f00"},"qr":{"copiedToClipboard":"\u590d\u5236\u5230\u4e86\u526a\u8d34\u677f","failedToCopy":"\u590d\u5236\u5230\u526a\u8d34\u677f\u5931\u8d25","scanWithYourMobile":"\u7528\u4f60\u7684\u79fb\u52a8\u8bbe\u5907\u626b\u7801","copyToClipboard":" \u590d\u5236\u5230\u526a\u8d34\u677f","preferTheOfficial":"\u5e0c\u671b\u4f7f\u7528\u5b98\u65b9\u5bf9\u8bdd\u6846\u4e8e","open":"\u6253\u5f00"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),NF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u044f \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","whatIsAWallet":"\u041a\u0430\u043a\u0432\u043e \u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b?","secureAndManage":"\u0417\u0430\u0449\u0438\u0442\u0435\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0439\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438\u0442\u0435 \u0441\u0438 \u0430\u043a\u0442\u0438\u0432\u0438","safelyStore":"\u0421\u044a\u0445\u0440\u0430\u043d\u044f\u0432\u0430\u0439\u0442\u0435 \u0438 \u043f\u0440\u0435\u0445\u0432\u044a\u0440\u043b\u044f\u0439\u0442\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR","noNeedToCreate":"\u041d\u044f\u043c\u0430 \u043d\u0443\u0436\u0434\u0430 \u0434\u0430 \u0441\u044a\u0437\u0434\u0430\u0432\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438. \u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u0438 \u0438 \u0441\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u0438!","getAWallet":"\u0421\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u041f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","useAWallet":"\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430, \u0437\u0430 \u0434\u0430 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0432\u0430\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0435 \u0441\u0438 \u043d\u0430 NEAR \u043a\u0430\u043a\u0442\u043e \u0438 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0432\u0441\u044f\u043a\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 NEAR \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u0430 \u043e\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0441\u043a\u0438 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u0438.","connectionFailed":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e","connectionSuccessful":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e","connected":"\u0421\u0432\u044a\u0440\u0437\u0430\u043d","connectingTo":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043a\u044a\u043c","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446\u0430 \u043d\u0430 \u0440\u0430\u0437\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u0442\u043e","browser":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430 \u0441\u043b\u0435\u0434 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0432\u0430\u043d\u0435\u0442\u043e","hardware":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0441\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435\u0442\u043e \u0432 \u0445\u0430\u0440\u0434\u0443\u0435\u0440\u043d\u0438\u044f \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b","bridge":"\u041f\u043e\u0442\u0432\u044a\u0440\u0434\u0435\u0442\u0435 \u0432\u0440\u044a\u0437\u043a\u0430\u0442\u0430 \u0432 \u043f\u043e\u0440\u0442\u0444\u0435\u0439\u043b\u0430"}},"ledger":{"connectWithLedger":"\u0421\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0441\u0435 \u0441 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0435\u0442\u0435 \u0441\u0435, \u0447\u0435 \u0432\u0430\u0448\u0438\u044f\u0442 Ledger \u0435 \u0441\u0432\u044a\u0440\u0437\u0430\u043d \u0438 \u0447\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u0442\u043e NEAR \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u043e \u043da \u043d\u0435\u0433\u043e.","continue":"\u041f\u0440\u043e\u0434\u044a\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041f\u043e\u0441\u043e\u0447\u0435\u0442\u0435 HD \u043f\u044a\u0442","enterYourPreferredHDPath":"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d\u0438\u044f HD \u043f\u044a\u0442, \u0441\u043b\u0435\u0434 \u043a\u043e\u0435\u0442\u043e \u0441\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0437\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0438 \u0430\u043a\u0430\u0443\u043d\u0442\u0438.","scan":"\u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435","retry":"\u041e\u043f\u0438\u0442\u0430\u0439\u0442\u0435 \u043e\u0442\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u0442\u043e \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u044a\u043f\u043d\u043e","accessDeniedToUseLedgerDevice":"\u0414\u043e\u0441\u0442\u044a\u043f\u044a\u0442 \u0437\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 Ledger \u0435 \u043e\u0442\u043a\u0430\u0437\u0430\u043d","noAccountsFound":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","connecting1Account":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435 \u043d\u0430 1 \u043f\u0440\u043e\u0444\u0438\u043b","cantFindAnyAccount":"\u041d\u044f\u043c\u0430 \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0441\u044a\u0432\u0440\u0437\u0430\u043d\u0438 \u0441 \u0442\u043e\u0437\u0438 Ledger. \u041c\u043e\u043b\u044f, \u0441\u044a\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432 NEAR \u043f\u0440\u043e\u0444\u0438\u043b \u043d\u0430","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u0441\u0432\u044a\u0440\u0436\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 Ledger.","connecting":"\u0421\u0432\u044a\u0440\u0437\u0432\u0430\u043d\u0435","ofAccounts":"\u043e\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438","failedToAutomatically":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e\u0442\u043e \u043d\u0430\u043c\u0438\u0440\u0430\u043d\u0435 \u043d\u0430 \u043f\u0440\u043e\u0444\u0438\u043b\u0430 \u043d\u0435 \u0431\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0433\u043e \u0440\u044a\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u044a\u043a\u0430 \u0441 \u0443\u043f\u044a\u043b\u043d\u043e\u043c\u043e\u0449\u0435\u043d\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438, \u0437\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435 \u0432\u043b\u0438\u0437\u0430\u043d\u0435\u0442\u043e, \u043a\u0430\u0442\u043e \u0449\u0440\u0430\u043a\u043d\u0435\u0442\u0435 \u0432\u044a\u0440\u0445\u0443 \u0431\u0443\u0442\u043e\u043d\u0430 \u043f\u043e-\u0434\u043e\u043b\u0443..","finish":"\u0417\u0430\u0432\u044a\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0429\u0435 \u0442\u0440\u044f\u0431\u0432\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u044a\u043b\u0436\u0438\u0442\u0435. \u0421\u043b\u0435\u0434 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u043d\u0435","refreshThePage":"\u043f\u0440\u0435\u0437\u0430\u0440\u0435\u0434\u0435\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u043d\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","scanWithYourMobile":" \u0421\u043a\u0430\u043d\u0438\u0440\u0430\u0439\u0442\u0435 \u0441 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0442\u043e \u0441\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0439\u0442\u0435 \u0432 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u0430","preferTheOfficial":"\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u043d \u0435\u0437\u0438\u043a \u0437\u0430 \u043a\u043e\u0440\u0435\u0441\u043f\u043e\u043d\u0434\u0435\u043d\u0446\u0438\u044f","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),RF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\uc9c0\uac11 \uc5f0\uacb0\ud558\uae30","whatIsAWallet":"\uc9c0\uac11\uc740 \ubb34\uc2a8 \uc5ed\ud560\uc744 \ud558\ub098\uc694?","secureAndManage":"\ub2f9\uc2e0\uc758 \ub514\uc9c0\ud138 \uc790\uc0b0\uc744 \ubcf4\ud638\ud558\uace0 \uad00\ub9ac\ud569\ub2c8\ub2e4.","safelyStore":"\uc554\ud638\ud654\ud3d0\uc640 NFT\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uace0 \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","logInToAny":"NEAR App\uc5d0 \ub85c\uadf8\uc778\ud569\ub2c8\ub2e4.","noNeedToCreate":"\uc0c8\ub85c\uc6b4 \uacc4\uc815\uc774\ub098 \ube44\ubc00\ubc88\ud638\ub97c \ub9cc\ub4e4 \ud544\uc694 \uc5c6\uc774 \uc9c0\uac11\uc744 \uc5f0\uacb0\ud55c \ud6c4 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","getAWallet":"\uc9c0\uac11 \uac00\uc838\uc624\uae30","useAWallet":"\uc9c0\uac11\uc744 \uc0ac\uc6a9\ud558\uc5ec NEAR \uc790\uc0b0\uc744 \ubcf4\ud638\xb7\uad00\ub9ac\ud558\uace0, \uc544\uc774\ub514\uc640 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 NEAR \uc571\uc5d0 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","connectionFailed":"\uc5f0\uacb0 \uc2e4\ud328","connectionSuccessful":"\uc5f0\uacb0 \uc131\uacf5","connected":"Connected","connectingTo":"\uc5f0\uacb0 \uc911: ","connectingMessage":{"injected":"\uc775\uc2a4\ud150\uc158 \ucc3d\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","browser":"\ub9ac\ub2e4\uc774\ub809\ud2b8 \ub41c \uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","hardware":"Ledger \uae30\uae30\uc5d0\uc11c \uc5f0\uacb0\uc744 \ud655\uc778\ud558\uc138\uc694","bridge":"\uc9c0\uac11\uc5d0\uc11c \uc5f0\uacb0 \ud655\uc778"}},"ledger":{"connectWithLedger":"Ledger \uc5f0\uacb0\ud558\uae30","makeSureYourLedger":"Ledger\uac00 \uc548\uc804\ud558\uac8c \uc5f0\uacb0\ub418\uc5b4 \uc788\uace0, NEAR \uc571\uc774 \uc5f4\ub824 \uc788\ub294 \uc9c0 \ud655\uc778\ud558\uc138\uc694","continue":"\uacc4\uc18d\ud558\uae30","specifyHDPath":"HD Path \uc9c0\uc815\ud558\uae30","enterYourPreferredHDPath":"\uc6d0\ud558\ub294 HD Path\ub97c \uc120\ud0dd\ud558\uace0, \ud65c\uc131\ud654\ub41c \uacc4\uc815\uc774 \uc788\ub294 \uc9c0 \uac80\uc0c9\ud558\uc138\uc694","scan":"\uac80\uc0c9","retry":"\ub2e4\uc2dc \uc2dc\ub3c4","ledgerIsNotAvailable":"Ledger\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","accessDeniedToUseLedgerDevice":"Ledger \uae30\uae30 \uc811\uadfc \uad8c\ud55c\uc774 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4","noAccountsFound":"\uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4","selectYourAccounts":"\uacc4\uc815 \uc120\ud0dd\ud558\uae30","connecting1Account":"\ud558\ub098\uc758 \uacc4\uc815\uc5d0 \uc5f0\uacb0","cantFindAnyAccount":"Ledger\uc640 \uc5f0\uacb0\ub41c \uacc4\uc815\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc0c8\ub85c\uc6b4 \uacc4\uc815\uc744 \uc0dd\uc131\ud558\uac70\ub098 ","orConnectAnAnotherLedger":"\ub2e4\ub978 Ledger\ub97c \uc5f0\uacb0\ud558\uc138\uc694","connecting":"\uacc4\uc815 \uc5f0\uacb0\ud558\uae30: ","ofAccounts":"\uac1c \uacc4\uc815\uc744 \ucc3e\uc558\uc2b5\ub2c8\ub2e4","failedToAutomatically":"\uacc4\uc815 ID\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. \uc218\ub3d9\uc73c\ub85c \uc785\ub825\ud574\uc8fc\uc138\uc694.","overviewTheListOfAuthorized":"\uc778\uc99d\ub41c \uacc4\uc815 \ubaa9\ub85d\uc744 \ud655\uc778\ud55c \ud6c4 \uc544\ub798 \ubc84\ud2bc\uc744 \ud074\ub9ad\ud558\uc5ec \ub85c\uadf8\uc778\uc744 \uc644\ub8cc\ud558\uc138\uc694","finish":"\uc644\ub8cc"},"walletTypes":{"hardware":"\ud558\ub4dc\uc6e8\uc5b4 \uc9c0\uac11","browser":"\ube0c\ub77c\uc6b0\uc800 \uc9c0\uac11","injected":"\uc9c0\uac11 \ud655\uc7a5","bridge":"\ube0c\ub9ac\uc9c0 \uc9c0\uac11","mobile":"\ubaa8\ubc14\uc77c \uc9c0\uac11","instant-link":"\uc778\uc2a4\ud134\ud2b8 \uc9c0\uac11"},"install":{"youllNeedToInstall":"\ub2e4\uc74c \ud655\uc7a5 \ud504\ub85c\uadf8\ub7a8\uc744 \uc124\uce58\ud574\uc8fc\uc138\uc694:","toContinueAfterInstalling":". \uc124\uce58 \uc644\ub8cc \ud6c4 \ud398\uc774\uc9c0 \uc0c8\ub85c \uace0\uce68\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. ","refreshThePage":"\uc0c8\ub85c \uace0\uce68","open":"Open"},"qr":{"copiedToClipboard":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc644\ub8cc","failedToCopy":"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac \uc2e4\ud328","scanWithYourMobile":"\ubaa8\ubc14\uc77c \uc7a5\uce58\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc2a4\uce94\ud574\uc8fc\uc138\uc694","copyToClipboard":" \ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ud558\uae30","preferTheOfficial":"\ub2e4\uc74c \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \uacf5\uc2dd \ud504\ub85c\uc138\uc2a4\ub97c \uc120\ud638\ud558\uc2ed\ub2c8\uae4c: ","open":"Open"}}}'),kF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n","whatIsAWallet":"V\xed l\xe0 g\xec?","secureAndManage":"B\u1ea3o m\u1eadt & Qu\u1ea3n l\xfd t\xe0i s\u1ea3n s\u1ed1 c\u1ee7a b\u1ea1n","safelyStore":"L\u01b0u tr\u1eef v\xe0 chuy\u1ec3n ti\u1ec1n \u0111i\u1ec7n t\u1eed v\xe0 NFT c\u1ee7a b\u1ea1n m\u1ed9t c\xe1ch an to\xe0n.","logInToAny":"\u0110\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng tr\xean NEAR","noNeedToCreate":"Kh\xf4ng c\u1ea7n t\u1ea1o t\xe0i kho\u1ea3n ho\u1eb7c th\xf4ng tin \u0111\u0103ng nh\u1eadp m\u1edbi. K\u1ebft n\u1ed1i v\xed c\u1ee7a b\u1ea1n v\xe0 b\u1eaft \u0111\u1ea7u!","getAWallet":"T\u1ea1o V\xed","useAWallet":"S\u1eed d\u1ee5ng v\xed \u0111\u1ec3 b\u1ea3o m\u1eadt v\xe0 qu\u1ea3n l\xfd t\xe0i s\u1ea3n tr\xean NEAR c\u1ee7a b\u1ea1n v\xe0 \u0111\u0103ng nh\u1eadp v\xe0o b\u1ea5t k\u1ef3 \u1ee9ng d\u1ee5ng NEAR n\xe0o, kh\xf4ng c\u1ea7n t\xean ng\u01b0\u1eddi d\xf9ng v\xe0 m\u1eadt kh\u1ea9u.","connectionFailed":"K\u1ebft n\u1ed1i th\u1ea5t b\u1ea1i","connectionSuccessful":"K\u1ebft n\u1ed1i th\xe0nh c\xf4ng","connected":"\u0110\xe3 k\u1ebft n\u1ed1i","connectingTo":"\u0110ang k\u1ebft n\u1ed1i t\u1edbi","connectingMessage":{"injected":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong c\u1eeda s\u1ed5 ti\u1ec7n \xedch m\u1edf r\u1ed9ng","browser":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed sau khi \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng","hardware":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i v\u1edbi v\xed l\u1ea1nh","bridge":"X\xe1c nh\u1eadn k\u1ebft n\u1ed1i trong v\xed"}},"ledger":{"connectWithLedger":"K\u1ebft n\u1ed1i v\xed Ledger","makeSureYourLedger":"\u0110\u1ea3m b\u1ea3o Ledger c\u1ee7a b\u1ea1n \u0111\u01b0\u1ee3c k\u1ebft n\u1ed1i an to\xe0n v\xe0 \u1ee9ng d\u1ee5ng NEAR \u0111ang m\u1edf s\u1eb5n tr\xean thi\u1ebft b\u1ecb","continue":"Ti\u1ebfp t\u1ee5c","specifyHDPath":"Ch\u1ec9 \u0111\u1ecbnh HD Path","enterYourPreferredHDPath":"Nh\u1eadp HD Path c\u1ee7a b\u1ea1n, sau \u0111\xf3 qu\xe9t t\xecm c\xe1c t\xe0i kho\u1ea3n ho\u1ea1t \u0111\u1ed9ng","scan":"Qu\xe9t","retry":"Th\u1eed l\u1ea1i","ledgerIsNotAvailable":"Ledger kh\xf4ng kh\u1ea3 d\u1ee5ng","accessDeniedToUseLedgerDevice":"Truy c\u1eadp Ledger b\u1ecb t\u1eeb ch\u1ed1i","noAccountsFound":"Kh\xf4ng t\xecm th\u1ea5y t\xe0i kho\u1ea3n","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n c\u1ee7a b\u1ea1n","connecting1Account":"\u0110ang k\u1ebft n\u1ed1i 1 t\xe0i kho\u1ea3n","cantFindAnyAccount":"Kh\xf4ng th\u1ec3 t\xecm th\u1ea5y b\u1ea5t k\u1ef3 t\xe0i kho\u1ea3n n\xe0o \u0111\u01b0\u1ee3c li\xean k\u1ebft v\u1edbi Ledger n\xe0y. Vui l\xf2ng t\u1ea1o m\u1ed9t t\xe0i kho\u1ea3n NEAR m\u1edbi","orConnectAnAnotherLedger":"ho\u1eb7c k\u1ebft n\u1ed1i v\u1edbi v\xed Ledger kh\xe1c.","connecting":"\u0110ang k\u1ebft n\u1ed1i","ofAccounts":"c\u1ee7a t\xe0i kho\u1ea3n","failedToAutomatically":"Kh\xf4ng th\u1ec3 t\u1ef1 \u0111\u1ed9ng t\xecm id t\xe0i kho\u1ea3n. Nh\u1eadp th\u1ee7 c\xf4ng:","overviewTheListOfAuthorized":"T\u1ed5ng quan danh s\xe1ch c\xe1c t\xe0i kho\u1ea3n \u0111\u01b0\u1ee3c \u1ee7y quy\u1ec1n, ho\xe0n t\u1ea5t \u0111\u0103ng nh\u1eadp b\u1eb1ng c\xe1ch b\u1ea5m v\xe0o n\xfat b\xean d\u01b0\u1edbi.","finish":"Ho\xe0n th\xe0nh"},"install":{"youllNeedToInstall":"B\u1ea1n s\u1ebd c\u1ea7n c\xe0i \u0111\u1eb7t","toContinueAfterInstalling":"\u0111\u1ec3 b\u1eaft \u0111\u1ea7u. Sau khi c\xe0i \u0111\u1eb7t xong","refreshThePage":"T\u1ea3i l\u1ea1i trang.","open":"M\u1edf"},"qr":{"copiedToClipboard":"\u0110\xe3 sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","failedToCopy":"Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m th\u1ea5t b\u1ea1i","scanWithYourMobile":"Qu\xe9t v\u1edbi \u0111i\u1ec7n tho\u1ea1i c\u1ee7a b\u1ea1n","copyToClipboard":" Sao ch\xe9p v\xe0o b\u1ea3ng ghi t\u1ea1m","preferTheOfficial":"Dialogue ch\xednh th\u1ee9c c\u1ee7a","open":"M\u1edf"},"walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile","instant-link":"V\xed t\u1ee9c th\xec"},"exportAccounts":{"chooseAWallet":"Ch\u1ecdn v\xed","transferYourAccounts":"Chuy\u1ec3n t\xe0i kho\u1ea3n","selectAWallet":"Ch\u1ecdn v\xed ph\xf9 h\u1ee3p v\u1edbi nhu c\u1ea7u c\u1ee7a b\u1ea1n, v\xed \u0111\u01b0\u1ee3c ch\u1ecdn c\u1ea7n h\u1ed7 tr\u1ee3 c\xe1c t\xe0i kho\u1ea3n \u0111ang s\u1eed d\u1ee5ng.","selectYourAccounts":"Ch\u1ecdn t\xe0i kho\u1ea3n","afterDecide":"Sau khi ch\u1ecdn \u0111\u01b0\u1ee3c t\xe0i kho\u1ea3n b\u1ea1n c\xf3 chuy\u1ec3n.","disclaimer":"B\u1ea1n kh\xf4ng th\u1ec3 chuy\u1ec3n t\xe0i kho\u1ea3n n\u1ebfu t\xe0i kho\u1ea3n \u0111\xf3 ch\u01b0a \u0111\u01b0\u1ee3c nh\u1eadn ti\u1ec1n ho\u1eb7c ch\u01b0a ph\xe1t sinh giao d\u1ecbch tr\xean NEAR.","warning":"kh\xf4ng h\u1ed7 tr\u1ee3 xu\u1ea5t t\xe0i kho\u1ea3n. Vui l\xf2ng ch\u1ecdn v\xed kh\xe1c.","walletTypes":{"hardware":"V\xed l\u1ea1nh","browser":"V\xed tr\xecnh duy\u1ec7t","injected":"V\xed ti\u1ec7n \xedch m\u1edf r\u1ed9ng","bridge":"V\xed C\u1ea7u","mobile":"V\xed Mobile"},"selectAccounts":{"title":"Ch\u1ecdn t\xe0i kho\u1ea3n \u0111\u1ec3 chuy\u1ec3n","button":"L\u1ea5y c\u1ee5m m\u1eadt kh\u1ea9u","deselectAll":"B\u1ecf ch\u1ecdn t\u1ea5t c\u1ea3","selectAll":"Ch\u1ecdn t\u1ea5t c\u1ea3","unavailable":"Chuy\u1ec3n kh\xf4ng kh\u1ea3 d\u1ee5ng","error":"T\xe0i kho\u1ea3n kh\xf4ng t\u1ed3n t\u1ea1i","warningLedger":"Y\xeau c\u1ea7u h\u1ed7 tr\u1ee3 Ledger","noBalance":"T\xe0i kho\u1ea3n tr\u1ed1ng"},"getPassphrase":{"title":"Sao ch\xe9p m\u1eadt kh\u1ea9u t\u1ea1m th\u1eddi","desc":"B\u1ea1n s\u1ebd c\u1ea7n nh\u1eadp m\u1eadt kh\u1ea9u khi b\u1eaft \u0111\u1ea7u xu\u1ea5t c\xe1c kho\u1ea3n t\u1edbi v\xed kh\xe1c.","button":"Ti\u1ebfp t\u1ee5c","label":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p","checkLabel":"T\xf4i \u0111\xe3 ch\xe9p ho\u1eb7c ghi l\u1ea1i m\u1eadt kh\u1ea9u"},"complete":{"title":"Ho\xe0n th\xe0nh chuy\u1ec3n","descOne":"B\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c chuy\u1ec3n h\u01b0\u1edbng t\u1edbi t\xe0i kho\u1ea3n \u0111\xe3 ch\u1ecdn \u0111\u1ec3 ho\xe0n t\u1ea5t qu\xe1 tr\xecnh.","descTwo":"Sau khi nh\u1eadp, nh\u1ea5n n\xfat \u0111\u1ec3 ho\xe0n t\u1ea5t quy tr\xecnh chuy\u1ec3n.","button":"Ho\xe0n th\xe0nh"}}},"component":{"clickToCopy":{"label":"\u0110\xe3 sao ch\xe9p","tooltip":"B\u1ea5m \u0111\u1ec3 sao ch\xe9p"}}}'),LF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f (Wallet) \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","whatIsAWallet":"\u0935\u0949\u0932\u0947\u091f \u0915\u094d\u092f\u093e \u0939\u0948?","secureAndManage":"\u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0947\u0902\u0964","safelyStore":"\u0905\u092a\u0928\u0940 \u0915\u094d\u0930\u093f\u092a\u094d\u091f\u094b\u0915\u0930\u0947\u0902\u0938\u0940 \u0914\u0930 \u090f\u0928\u090f\u092b\u091f\u0940 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0938\u094d\u091f\u094b\u0930 \u0914\u0930 \u091f\u094d\u0930\u093e\u0902\u0938\u092b\u0930 \u0915\u0930\u0947\u0902\u0964","logInToAny":"NEAR \u092a\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0910\u092a \u092e\u0947\u0902 \u0938\u093e\u0907\u0928 \u0907\u0928 \u0915\u0930\u0947\u0902\u0964","noNeedToCreate":"\u0928\u090f \u0916\u093e\u0924\u0947 \u092f\u093e \u0932\u0949\u0917\u093f\u0928 \u092c\u0928\u093e\u0928\u0947 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0905\u092a\u0928\u093e \u0935\u0949\u0932\u0947\u091f(NEAR Wallet)\u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902 \u0914\u0930 \u0906\u0930\u0902\u092d \u0915\u0930\u0947\u0902\u0964","getAWallet":"\u090f\u0915 \u0935\u0949\u0932\u0947\u091f \u092c\u0928\u093e\u090f\u0901\u0964","useAWallet":"\u0905\u092a\u0928\u0940 NEAR \u0938\u0902\u092a\u0924\u094d\u0924\u093f\u092f\u094b\u0902 \u0915\u094b \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0914\u0930 \u092a\u094d\u0930\u092c\u0902\u0927\u093f\u0924 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0935\u0949\u0932\u0947\u091f \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0947\u0902 \u0914\u0930 \u0915\u093f\u0938\u0940 \u092d\u0940 NEAR \u0910\u092a (app) \u092e\u0947\u0902 \u0932\u0949\u0917 \u0907\u0928 \u0915\u0930\u0947\u0902, \u0915\u093f\u0938\u0940 \u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e (user) \u0928\u093e\u092e \u0914\u0930 \u092a\u093e\u0938\u0935\u0930\u094d\u0921 \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0928\u0939\u0940\u0902 \u0939\u0948\u0964","connectionFailed":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0935\u093f\u092b\u0932|","connectionSuccessful":"\u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0938\u092b\u0932|","connected":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0917\u092f\u093e|","connectingTo":"\u0935\u0949\u0932\u0947\u091f \u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","connectingMessage":{"injected":"\u090f\u0915\u094d\u0938\u091f\u0947\u0902\u0936\u0928 \u0935\u093f\u0902\u0921\u094b \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","browser":"\u0930\u0940\u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u0939\u094b\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0935\u0949\u0932\u0947\u091f \u092e\u0947\u0902 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|","hardware":"\u0915\u094b\u0932\u094d\u0921 \u0935\u0949\u0932\u0947\u091f \u0915\u0947 \u0938\u093e\u0925 \u0915\u0928\u0947\u0915\u094d\u0936\u0928 \u0915\u0940 \u092a\u0941\u0937\u094d\u091f\u093f \u0915\u0930\u0947\u0902|"}},"ledger":{"connectWithLedger":"\u0932\u0947\u091c\u0930(Ledger)\u0935\u0949\u0932\u0947\u091f \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902|","makeSureYourLedger":"\u0938\u0941\u0928\u093f\u0936\u094d\u091a\u093f\u0924 \u0915\u0930\u0947\u0902 \u0915\u093f \u0906\u092a\u0915\u093e \u0932\u0947\u091c\u0930 \u0938\u0941\u0930\u0915\u094d\u0937\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0939\u0941\u0906 \u0939\u0948 \u0914\u0930 NEAR \u0910\u092a \u0906\u092a\u0915\u0947 \u0921\u093f\u0935\u093e\u0907\u0938 (Device)\u092a\u0930 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0939\u0940 \u0916\u0941\u0932\u093e \u0939\u0948|","continue":"\u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","specifyHDPath":"\u0939\u093e\u0930\u094d\u0921 \u0921\u093f\u0938\u094d\u0915(Hard Disk)\u092a\u0925(Path)\u0928\u093f\u0930\u094d\u0927\u093e\u0930\u093f\u0924 \u0915\u0930\u0947|","enterYourPreferredHDPath":"\u0905\u092a\u0928\u093e \u090f\u091a\u0921\u0940 \u092a\u0925 \u0926\u0930\u094d\u091c \u0915\u0930\u0947\u0902, \u092b\u093f\u0930 \u0938\u0915\u094d\u0930\u093f\u092f \u0916\u093e\u0924\u094b\u0902 \u0915\u0947 \u0932\u093f\u090f \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","scan":"\u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947|","retry":"\u0926\u094b\u092c\u093e\u0930\u093e \u092a\u094d\u0930\u092f\u093e\u0938 \u0915\u0930\u0947|","ledgerIsNotAvailable":"\u0932\u0947\u091c\u0930 \u0909\u092a\u0932\u092c\u094d\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948|","accessDeniedToUseLedgerDevice":"\u0932\u0947\u091c\u0930 \u0921\u093f\u0935\u093e\u0907\u0938 \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u092a\u094d\u0930\u0935\u0947\u0936 \u0928\u093f\u0937\u0947\u0927|","noAccountsFound":"\u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e|","selectYourAccounts":"\u0905\u092a\u0928\u0947 \u0916\u093e\u0924\u0947 \u091a\u0941\u0928\u0947\u0902|","connecting1Account":"\u090f\u0915 \u0916\u093e\u0924\u093e \u0915\u0928\u0947\u0915\u094d\u091f \u0939\u094b \u0930\u0939\u093e \u0939\u0948|","cantFindAnyAccount":"\u0907\u0938 \u0932\u0947\u091c\u0930 \u0938\u0947 \u091c\u0941\u0921\u093c\u093e \u0915\u094b\u0908 \u0916\u093e\u0924\u093e \u0928\u0939\u0940\u0902 \u092e\u093f\u0932\u093e\u0964 \u0915\u0943\u092a\u092f\u093e \u090f\u0915 \u0928\u092f\u093e NEAR \u0916\u093e\u0924\u093e \u092c\u0928\u093e\u090f\u0901|","orConnectAnAnotherLedger":"\u0905\u0925\u0935\u093e \u0926\u0942\u0938\u0930\u0947 \u0932\u0947\u091c\u0930 \u0935\u0949\u0932\u0947\u091f \u0938\u0947 \u0915\u0928\u0947\u0915\u094d\u091f \u0915\u0930\u0947\u0902\u0964","connecting":"\u091c\u0941\u095c \u0930\u0939\u093e \u0939\u0947|","ofAccounts":"\u0916\u093e\u0924\u093e \u0905\u092c \u091c\u0941\u095c\u093e \u0928\u0939\u0940\u0902 \u0939\u0947|","failedToAutomatically":"\u0916\u093e\u0924\u093e \u0906\u0908\u0921\u0940 \u0938\u094d\u0935\u091a\u093e\u0932\u093f\u0924 \u0930\u0942\u092a \u0938\u0947 \u0916\u094b\u091c\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925\u0964 \u092e\u0948\u0928\u094d\u092f\u0941\u0905\u0932 (Manuall) \u0930\u0942\u092a \u0938\u0947 \u0915\u094b\u0936\u093f\u0936 \u0915\u0930\u0947\u0902|","overviewTheListOfAuthorized":"\u0905\u0935\u0932\u094b\u0915\u0928 \u0905\u0927\u093f\u0915\u0943\u0924 \u0915\u0940 \u0938\u0942\u091a\u0940, \u0928\u0940\u091a\u0947 \u0926\u093f\u090f \u0917\u090f \u092c\u091f\u0928 \u092a\u0930 \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0915\u0947 \u0932\u0949\u0917\u093f\u0928 \u092a\u0942\u0930\u093e \u0915\u0930\u0947\u0902\u0964","finish":"\u0938\u092e\u093e\u092a\u094d\u0924|"},"install":{"youllNeedToInstall":"\u0906\u092a\u0915\u094b \u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e|","toContinueAfterInstalling":"\u0907\u0902\u0938\u094d\u091f\u0949\u0932 \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u091c\u093e\u0930\u0940 \u0930\u0916\u0947|","refreshThePage":"\u092a\u0941\u0928: \u0932\u094b\u0921 \u0915\u0930\u0947\u0902\u0964","open":"\u0916\u094b\u0932\u0947|"},"qr":{"copiedToClipboard":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921(Clipboard)\u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u093f\u092f\u093e \u0917\u092f\u093e|","failedToCopy":"\u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0928\u093e \u0935\u093f\u092b\u0932 \u0930\u0939\u093e|","scanWithYourMobile":"\u0905\u092a\u0928\u0947 \u092b\u094b\u0928 (Mobile)\u0938\u0947 \u0938\u094d\u0915\u0948\u0928 \u0915\u0930\u0947\u0902|","copyToClipboard":" \u0915\u094d\u0932\u093f\u092a\u092c\u094b\u0930\u094d\u0921 \u092a\u0930 \u0915\u0949\u092a\u0940 \u0915\u0930\u0947\u0902|","preferTheOfficial":"\u0906\u0927\u093f\u0915\u093e\u0930\u093f\u0915 \u0938\u0902\u0935\u093e\u0926 \u0915\u094b \u092a\u094d\u0930\u093e\u0925\u092e\u093f\u0915\u0924\u093e \u0926\u0947\u0902|","open":"\u0916\u094b\u0932\u0947|"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),BF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u0635\u0644 \u0645\u062d\u0641\u0638\u062a\u0643","whatIsAWallet":"\u0645\u0627 \u0647\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629\u061f","secureAndManage":"\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0645\u0645\u062a\u0644\u0643\u0627\u062a \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643","safelyStore":"\u0642\u0645 \u0628\u062a\u062e\u0632\u064a\u0646 \u0648 \u0627\u0631\u0633\u0627\u0644 \u0639\u0645\u0644\u0627\u062a\u0643 \u0648 \u0623\u0635\u0648\u0644\u0643 \u0627\u0644\u0631\u0642\u0645\u064a\u0629 \u0628\u0623\u0645\u0627\u0646","logInToAny":"\u0633\u062c\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0625\u0644\u0649 \u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631","noNeedToCreate":".\u0644\u0627 \u062f\u0627\u0639\u064a \u0644\u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u062c\u062f\u064a\u062f. \u0641\u0642\u0637 \u0642\u0645 \u0628\u062a\u0648\u0635\u064a\u0644 \u0645\u062d\u0641\u0638\u062a\u0643 \u0648\u0627\u0646\u0637\u0644\u0642","getAWallet":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0645\u062d\u0641\u0638\u0629","useAWallet":"\u0627\u0633\u062a\u062e\u062f\u0645 \u0645\u062d\u0641\u0638\u0629 \u0644\u062a\u0623\u0645\u064a\u0646 \u0648\u0625\u062f\u0627\u0631\u0629 \u0623\u0635\u0648\u0644 \u0646\u064a\u0631 \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643\u060c \u0648\u0627\u062f\u062e\u0644 \u0644\u0623\u064a \u062a\u0637\u0628\u064a\u0642 \u064a\u0633\u062a\u062e\u062f\u0645 \u0646\u064a\u0631 \u062f\u0648\u0646 \u0627\u0644\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645 \u0648\u0643\u0644\u0645\u0629\u0627\u0644\u0645\u0631\u0648\u0631","connectionFailed":"\u0627\u062a\u0635\u0627\u0644 \u0641\u0627\u0634\u0644","connectionSuccessful":"\u0627\u062a\u0635\u0627\u0644 \u0646\u0627\u062c\u062d","connected":"\u0645\u062a\u0635\u0644","connectingTo":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628","connectingMessage":{"injected":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0625\u0636\u0627\u0641\u0629","browser":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629 \u0628\u0639\u062f \u0625\u0639\u0627\u062f\u0629 \u062a\u0648\u062c\u064a\u0647","hardware":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631","bridge":"\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0641\u064a \u0627\u0644\u0645\u062d\u0641\u0638\u0629"}},"ledger":{"connectWithLedger":"\u0627\u062a\u0635\u0644 \u0645\u0639 \u0644\u064a\u062f\u062c\u0631","makeSureYourLedger":"\u062a\u0623\u0643\u062f \u0623\u0646 \u0644\u064a\u062f\u062c\u0631 \u0645\u062a\u0635\u0644 \u0628\u0623\u0645\u0627\u0646, \u0648 \u0623\u0646 \u062a\u0637\u0628\u064a\u0642 \u0646\u064a\u0631 \u0645\u0641\u062a\u0648\u062d \u0641\u064a \u062c\u0647\u0627\u0632\u0643","continue":"\u062a\u0627\u0628\u0639","specifyHDPath":"\u062d\u062f\u062f \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628","enterYourPreferredHDPath":"\u0623\u062f\u062e\u0644 \u0645\u0633\u0627\u0631 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0645\u0641\u0636\u0644\u060c \u062b\u0645 \u0627\u0628\u062d\u062b \u0639\u0646 \u0643\u0644 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0646\u0634\u0637\u0629","scan":"\u0645\u0633\u062d","retry":"\u0623\u0639\u062f \u0627\u0644\u0645\u062d\u0627\u0648\u0644\u0629","ledgerIsNotAvailable":"\u0644\u064a\u062f\u062c\u0631 \u063a\u064a\u0631 \u0645\u062a\u0648\u0641\u0631","accessDeniedToUseLedgerDevice":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0644\u064a\u062f\u062c\u0631","noAccountsFound":"\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628\u0627\u062a","selectYourAccounts":"\u062d\u062f\u062f \u062d\u0633\u0627\u0628\u0627\u062a\u0643","connecting1Account":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u062d\u0633\u0627\u0628 \u0648\u0627\u062d\u062f","cantFindAnyAccount":"\u0644\u0627 \u064a\u0645\u0643\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0623\u064a \u062d\u0633\u0627\u0628 \u0645\u0631\u062a\u0628\u0637 \u0628\u0647\u0630\u0627 \u0644\u064a\u062f\u062c\u0631 \u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u062d\u0633\u0627\u0628 \u0646\u064a\u0631 \u062c\u062f\u064a\u062f \u0639\u0644\u0649","orConnectAnAnotherLedger":"\u0627\u0648 \u0627\u0631\u0628\u0637 \u062c\u0647\u0627\u0632 \u0644\u064a\u062f\u062c\u0631 \u0622\u062e\u0631","connecting":"\u062c\u0627\u0631\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644","ofAccounts":"\u0645\u0646 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a","failedToAutomatically":"\u0641\u0634\u0644 \u0641\u064a \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u062a\u0644\u0642\u0627\u0626\u064a\u0627. \u064a\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0627\u0644\u062d\u0633\u0627\u0628 \u064a\u062f\u0648\u064a\u0627","overviewTheListOfAuthorized":"\u0644\u0627\u0626\u062d\u0629 \u0627\u0644\u062d\u0633\u0627\u0628\u0627\u062a \u0627\u0644\u0645\u0635\u0631\u062d \u0628\u0647\u0627, \u0623\u0643\u0645\u0644 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062f\u062e\u0648\u0644 \u0628\u0627\u0644\u0646\u0642\u0631 \u0639\u0644\u0649 \u0627\u0644\u0632\u0631 \u0623\u062f\u0646\u0627\u0647","finish":"\u0625\u0646\u0647\u0627\u0621"},"install":{"youllNeedToInstall":"\u0633\u062a\u062d\u062a\u0627\u062c \u0644\u062a\u062b\u0628\u064a\u062a","toContinueAfterInstalling":"\u0644\u0644\u0627\u0633\u062a\u0643\u0645\u0627\u0644. \u0628\u0639\u062f \u0627\u0644\u062a\u062b\u0628\u064a\u062a","refreshThePage":"\u0642\u0645 \u0628\u062a\u062d\u062f\u064a\u062b \u0627\u0644\u0635\u0641\u062d\u0629","open":"\u0627\u0641\u062a\u062d"},"qr":{"copiedToClipboard":"\u062a\u0645 \u0627\u0644\u0646\u0633\u062e","failedToCopy":"\u0641\u0634\u0644 \u0627\u0644\u0646\u0633\u062e","scanWithYourMobile":"\u0627\u0645\u0633\u062d \u0628\u062c\u0647\u0627\u0632\u0643 \u0627\u0644\u0645\u062d\u0645\u0648\u0644","copyToClipboard":"\u0646\u0633\u062e","preferTheOfficial":"\u062a\u0641\u0636\u0644 \u0627\u0644\u062d\u0648\u0627\u0631 \u0627\u0644\u0631\u0633\u0645\u064a \u0644","open":"\u0641\u062a\u062d"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"}}}'),jF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Spojite crypto nov\u010danik!","whatIsAWallet":"\u0160to je to crypto nov\u010danik?","secureAndManage":"Osigurajte i upravljajte svojom digitalnom imovinom.","safelyStore":"Sigurno pohranite i prebacite svoj crypto i NFT-eve.","logInToAny":" Prijavite se u bilo koju NEAR aplikaciju","noNeedToCreate":"Nema potrebe za stvaranjem novih naloga ili korisni\u010dkih podataka. Spojite svoj crypto nov\u010danik i spremni ste!","getAWallet":"Otvorite crypto nov\u010danik","useAWallet":"Koristite crypto nov\u010danik da biste osigurali i upravljali svojom NEAR imovinom, te se prijavite u bilo koju NEAR aplikaciju bez korisni\u010dkog imena i lozinke.","connectionFailed":"Neuspje\u0161no povezivanje.","connectionSuccessful":"Uspje\u0161no povezivanje.","connected":"Povezano.","connectingTo":"Povezivanje u tijeku","connectingMessage":{"injected":"Potvrdite vezu u eksternom prozoru","browser":"Nakon redirekcije, potvrdite vezu u nov\u010daniku","hardware":"Potvrdite vezu sa nov\u010danikom","bridge":"Potvrdite vezu u nov\u010daniku"}},"ledger":{"connectWithLedger":"Pove\u017eite se hardverskim nov\u010danikom","makeSureYourLedger":"Osigurajte sigurnu vezu s hardverskim nov\u010danikom, te da je NEAR aplikacija otvorena na va\u0161em ure\u0111aju","continue":"Nastavite","specifyHDPath":"Specificirajte HD putanju","enterYourPreferredHDPath":"Upi\u0161ite preferiranu HD putanju, zatim skenirajte aktivne naloge","scan":"Skenirajte","retry":"Poku\u0161ajte ponovno","ledgerIsNotAvailable":"Hardverski nov\u010danik nije dostupan.","accessDeniedToUseLedgerDevice":"Odbijen pristup za kori\u0161tenjem hardverskog nov\u010danika","noAccountsFound":"Nalozi nisu prona\u0111eni","selectYourAccounts":"Odaberite svoje naloge","connecting1Account":"Povezivanje 1 naloga","cantFindAnyAccount":"Nije mogu\u0107e prona\u0107i niti jedan nalog povezan s ovim hardverskim nov\u010danikom. Molimo vas, kreirajte novi NEAR nalog","orConnectAnAnotherLedger":"Ili pove\u017eite drugi hardverski nov\u010danik.","connecting":"Povezivanje","ofAccounts":"naloga","failedToAutomatically":"Neuspje\u0161no automatsko pronala\u017eenje ID naloga. Unesite ru\u010dno:","overviewTheListOfAuthorized":"Pregledajte popis odobrenih naloga, zavr\u0161ite prijavu pritiskom na ni\u017ee prikazani gumb.","finish":"Zavr\u0161ite"},"install":{"youllNeedToInstall":" Potrebno je instalirati modal","toContinueAfterInstalling":"za nastavak. Nakon instalacije","refreshThePage":"osvje\u017eite stranicu.","open":"Otvorite QR modal"},"qr":{"copiedToClipboard":"Kopirano u me\u0111uspremnik","failedToCopy":"Neupsje\u0161no kopiranje u me\u0111uspremnik","scanWithYourMobile":"Skenirajte svojim mobilnim ure\u0111ajem","copyToClipboard":" Kopirajte u me\u0111uspremnik","preferTheOfficial":"Odaberite slu\u017ebeni dijalog","open":"Otvorite"},"walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet","instant-link":"Instant Wallet"},"exportAccounts":{"chooseAWallet":"Odaberi Wallet","transferYourAccounts":"Prenesi svoje naloge","selectAWallet":"Odaberite wallet koji odgovara va\u0161im potrebama i podr\u017eava va\u0161e povezane naloge.","selectYourAccounts":"Odaberi svoje naloge","afterDecide":"Nakon \u0161to odlu\u010dite koji wallet koristite, mo\u017eete odabrati koje ra\u010dune \u017eelite prebaciti.","disclaimer":"Ne\u0107ete mo\u0107i prebaciti naloge koji nisu nikada bili kori\u0161teni na NEAR-u.","warning":"ne podr\u017eava izvoz naloga u ovom trenutku. Molimo odaberite drugi wallet.","walletTypes":{"hardware":"Hardware Wallet","browser":"Browser Wallet","injected":"Wallet Extension","bridge":"Bridge Wallet","mobile":"Mobile Wallet"},"selectAccounts":{"title":"Odaberi naloge za prijenos","button":"Generiraj lozinku","deselectAll":"Makni odabir sa svih","selectAll":"Odaberi sve","unavailable":"Prijenos nije dostupan","error":"Nalog ne postoji","warningLedger":"Potrebna ledger podr\u0161ka","noBalance":"Nalog nema sredstava"},"getPassphrase":{"title":"Kopiraj privremenu lozinku","desc":"Bit \u0107e potrebno unijeti ovu lozinku na po\u010detku izvoza naloga na drugi wallet.","button":"Nastavi","label":"Klikni za kopiju","checkLabel":"Kopirao sam ili zapisao lozinku"},"complete":{"title":"Zavr\u0161i prijenos","descOne":"You will now be redirected to the wallet you selected to complete the transfer.","descTwo":"Kada je unos s odabranog walleta zavr\u0161en, pritisnite gumb da biste zavr\u0161ili prijenos.","button":"Zavr\u0161i"}}}}'),FF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u043e \u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u0417\u0430\u0448\u0442\u0438\u0442\u0435\u0442\u0435 \u0433\u0438 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0441\u043a\u043b\u0430\u0434\u0438\u0440\u0430\u0458\u0442\u0435 \u0438 \u0438\u0437\u0432\u0440\u0448\u0443\u0432\u0430\u0458\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0430\u043a\u0446\u0438\u0438 \u0441\u043e \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u0440\u0438\u043f\u0442\u043e \u0438 NFT.","logInToAny":"\u041d\u0430\u0458\u0430\u0432\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0438\u043b\u0438 \u0438\u043d\u0433\u0435\u0440\u0435\u043d\u0446\u0438\u0438. \u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0433\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0438 \u0441\u0442\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u0432\u0435\u043d\u0438!","getAWallet":"\u041d\u0430\u043f\u0440\u0430\u0432\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a \u0437\u0430 \u0434\u0430 \u0433\u0438 \u0437\u0430\u0448\u0442\u0438\u0442\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0438\u0442\u0435 \u043d\u0430 \u043a\u043e\u0458\u0430 \u0431\u0438\u043b\u043e NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0430 \u043e\u0434 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0438\u043c\u0438\u045a\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0438.","connectionFailed":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043d\u0435 \u0431\u0435\u0448\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.","connectionSuccessful":"\u0423\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435.","connected":"\u041f\u043e\u0432\u0440\u0437\u0430\u043d\u043e.","connectingTo":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u0441\u043e","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0432\u043e \u0435\u043a\u0441\u0442\u0435\u0440\u043d\u0438\u043e\u0442 \u043f\u0440\u043e\u0437\u043e\u0440\u0435\u0446","browser":"\u041f\u043e \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0443\u0432\u0430\u045a\u0435\u0442\u043e, \u043f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u043e\u0434 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043e\u043a\u0442","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0433\u043e \u043f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435\u0442\u043e \u0441\u043e \u043b\u0430\u0434\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0435\u0442\u0435 \u0458\u0430 \u0432\u0440\u0441\u043a\u0430\u0442\u0430 \u0432\u043e \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u0442"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0441\u0435 \u0441\u043e \u041b\u0435\u045f\u0435\u0440","makeSureYourLedger":"\u041e\u0441\u0438\u0433\u0443\u0440\u0430\u0458\u0442\u0435 \u0441\u0435 \u0434\u0435\u043a\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u041b\u0435\u045f\u0435\u0440 \u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e, \u0438 \u0434\u0435\u043a\u0430 NEAR \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430\u0442\u0430 \u0435 \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0438\u043e\u0442 \u0443\u0440\u0435\u0434","continue":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0435\u0442\u0435 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430","enterYourPreferredHDPath":"\u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0458\u0430 \u0432\u0430\u0448\u0430\u0442\u0430 \u043f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u043d\u0430 \u0425\u0414 \u043b\u043e\u043a\u0430\u0446\u0438\u0458\u0430, \u0430 \u043f\u043e\u0442\u043e\u0430 \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043d\u0430\u0458\u0434\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041e\u0431\u0438\u0434\u0435\u0442\u0435 \u0441\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e","ledgerIsNotAvailable":"\u041b\u0435\u045f\u0435\u0440\u043e\u0442 \u043d\u0435 \u0435 \u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0430\u043f\u043e\u0442 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u045a\u0435 \u043d\u0430 \u041b\u0435\u045f\u0435\u0440 \u0443\u0440\u0435\u0434 \u0435 \u043e\u0434\u0431\u0438\u0435\u043d","noAccountsFound":"\u041d\u0435\u043c\u0430 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438","connecting1Account":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u0435\u0434\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430","cantFindAnyAccount":"\u041d\u0435 \u0441\u0435 \u043d\u0430\u0458\u0434\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u0441\u043e \u043e\u0432\u043e\u0458 \u041b\u0435\u045f\u0435\u0440. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u043a\u0440\u0435\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u043e\u0432\u0430 NEAR \u0441\u043c\u0435\u0442\u043a\u0430 ","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0440\u0437\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u041b\u0435\u045f\u0435\u0440.","connecting":"\u041f\u043e\u0432\u0440\u0437\u0443\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0438","failedToAutomatically":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u0431\u0430\u0440\u0430\u045a\u0435 \u043d\u0430 \u0418\u0414 \u043d\u0430 \u0441\u043c\u0435\u0442\u043a\u0430\u0442\u0430. \u0412\u043d\u0435\u0441\u0435\u0442\u0435 \u0433\u043e \u0440\u0430\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434 \u043d\u0430 \u043b\u0438\u0441\u0442\u0430\u0442\u0430 \u043d\u0430 \u043e\u0432\u043b\u0430\u0441\u0442\u0435\u043d\u0438 \u0441\u043c\u0435\u0442\u043a\u0438, \u0437\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0441\u0435 \u043d\u0430\u0458\u0430\u0432\u0430\u0442\u0430 \u0441\u043e \u043a\u043b\u0438\u043a\u043d\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u043f\u043e\u0434\u043e\u043b\u0443.","finish":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"},"install":{"youllNeedToInstall":"\u0422\u0440\u0435\u0431\u0430 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u0434\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435. \u041f\u043e \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0435\u0442\u043e","refreshThePage":"\u041e\u0441\u0432\u0435\u0436\u0435\u0442\u0435 \u0458\u0430 \u0441\u0442\u0440\u0430\u043d\u0430\u0442\u0430.","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434\u043e\u0442","failedToCopy":"\u041d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u043e \u0432\u0430\u0448\u0438\u043e\u0442 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0441\u043a\u0438 \u0443\u0440\u0435\u0434","copyToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u043d\u0430 \u043a\u043b\u0438\u043f\u0431\u043e\u0440\u0434","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0458\u0442\u0435 \u043e\u0444\u0438\u0446\u0438\u0458\u0430\u043b\u0435\u043d \u0434\u0438\u0430\u043b\u043e\u0433 \u043d\u0430","open":"\u041e\u0442\u0432\u043e\u0440\u0435\u0442\u0435"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u041e\u0434\u0431\u0435\u0440\u0435\u0442\u0435 \u043f\u0430\u0440\u0438\u0447\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u0444\u0440\u043b\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","selectAWallet":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458 \u0433\u0438 \u0437\u0430\u0434\u043e\u0432\u043e\u043b\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u0431\u0430\u0440\u0430\u043d\u045a\u0430 \u0438 \u0433\u0438 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0432\u0430\u0448\u0438\u0442\u0435 \u043f\u043e\u0432\u0440\u0437\u0430\u043d\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438.","selectYourAccounts":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u0432\u0430\u0448\u0438\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438","afterDecide":"\u041e\u0434\u043a\u0430\u043a\u043e \u045c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u043a\u043e\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0441\u0430\u043a\u0430\u0442\u0435 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","disclaimer":"\u041d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0430 \u043f\u0440\u0444\u0440\u043b\u0430\u0442\u0435 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u043a\u043e\u0438 \u043d\u0438\u043a\u043e\u0433\u0430\u0448 \u043d\u0435 \u0431\u0438\u043b\u0435 \u043d\u0430\u0434\u043e\u043f\u043e\u043b\u043d\u0430\u0442\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u043d\u0435 \u043f\u043e\u0434\u0434\u0440\u0436\u0443\u0432\u0430 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438 \u0441\u043c\u0435\u0442\u043a\u0438 \u0432\u043e \u043e\u0432\u043e\u0458 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u0435 \u043c\u043e\u043b\u0438\u043c\u0435 \u0438\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0435\u043b\u0438\u0441\u0442\u0443\u0432\u0430\u0447","injected":"\u0415\u043a\u0441\u0442\u0435\u043d\u0437\u0438\u0458\u0430 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u0435\u043d \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0433\u0438 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u0437\u0430 \u0434\u0430 \u0433\u0438 \u043f\u0440\u0435\u0444\u0440\u043b\u0438\u0442\u0435.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","deselectAll":"\u041e\u0442\u0441\u0435\u043b\u0435\u043a\u0442\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0435","selectAll":"\u0418\u0437\u0431\u0435\u0440\u0435\u0442\u0435 \u0441\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440\u043e\u0442 \u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u043f\u0435\u043d","error":"\u041a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0430\u0442\u0430 \u0441\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u0435 \u043f\u043e\u0434\u0434\u0440\u0448\u043a\u0430 \u043e\u0434 \u041b\u0435\u045f\u0435\u0440","noBalance":"\u0421\u043c\u0435\u0442\u043a\u0430\u0442\u0430 \u043d\u0435 \u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0430"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458\u0442\u0435 \u0458\u0430 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0430\u0442\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430","desc":"\u040c\u0435 \u0442\u0440\u0435\u0431\u0430 \u0434\u0430 \u0458\u0430 \u0432\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0430\u0430 \u043b\u043e\u0437\u0438\u043d\u043a\u0430 \u043a\u043e\u0433\u0430 \u045c\u0435 \u0437\u0430\u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0433\u0438 \u0438\u0437\u0432\u0435\u0437\u0443\u0432\u0430\u0442\u0435 \u0432\u0430\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u0442\u043a\u0438 \u043d\u0430 \u0434\u0440\u0443\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0435\u0442\u0435 \u0437\u0430 \u0434\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0442\u0435","checkLabel":"\u0408\u0430 \u043a\u043e\u043f\u0438\u0440\u0430\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0448\u0430\u0432 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u0442\u0430"},"complete":{"title":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435 \u0433\u043e \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442","descOne":"\u0421\u0435\u0433\u0430 \u045c\u0435 \u0431\u0438\u0434\u0435\u0442\u0435 \u043f\u0440\u0435\u043d\u0430\u0441\u043e\u0447\u0435\u043d\u0438 \u043d\u0430 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430\u045a\u0435 \u043d\u0430 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","descTwo":"\u041e\u0442\u043a\u0430\u043a\u043e \u045c\u0435 \u0437\u0430\u0432\u0440\u0448\u0438 \u0443\u0432\u043e\u0437\u043e\u0442 \u043e\u0434 \u0438\u0437\u0431\u0440\u0430\u043d\u0438\u043e\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0435\u0442\u0435 \u0433\u043e \u043a\u043e\u043f\u0447\u0435\u0442\u043e \u0437\u0430 \u0434\u0430 \u0433\u043e \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0435\u043d\u043e\u0441\u043e\u0442.","button":"\u0417\u0430\u0432\u0440\u0448\u0435\u0442\u0435"}}}}'),UF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"Pove\u017eite svojo denarnico!","whatIsAWallet":"Kaj je denarnica?","secureAndManage":"Zavarujte in upravljajte svoja digitalna sredstva.","safelyStore":"Varno shranjujte in prena\u0161ajte svoje kriptovalute in NFTje.","logInToAny":"Prijavite se v katero koli aplikacijo na NEAR","noNeedToCreate":"Ni vam treba ustvarjati novih ra\u010dunov. Pove\u017eite svojo denarnico in za\u010dnite!","getAWallet":"Ustvarite denarnico","useAWallet":"Uporabite denarnico, da bi zavarovali in upravljali s svoja NEAR digitalna sredstva, in se prijavite v katero koli aplikacijo ekosistema NEAR","connectionFailed":"Povezava ni bila uspe\u0161na.","connectionSuccessful":"Povezava je bila uspe\u0161na.","connected":"Va\u0161a denarnica je povezana.","connectingTo":"Povezovanje z","connectingMessage":{"injected":"Potrdite povezavo v oknu raz\u0161iritve","browser":"Po preusmeritvi potrdite povezavo v denarnici","hardware":"Potrdite povezavo s hladno denarnico","bridge":"Potrdite povezavo v denarnici"}},"ledger":{"connectWithLedger":"Pove\u017eite se z Ledger","makeSureYourLedger":"Prepri\u010dajte se, da je va\u0161 Ledger varno povezan in da je aplikacija NEAR odprta v va\u0161i napravi","continue":"Nadaljuj","specifyHDPath":"Dolo\u010dite HD pot","enterYourPreferredHDPath":"Vnesite \u017eeleno HD pot, nato poi\u0161\u010dite vse aktivne ra\u010dune.","scan":"Skenirajte","retry":"Poskusite znova","ledgerIsNotAvailable":"Ledger ni na voljo","accessDeniedToUseLedgerDevice":"Dostop za uporabo naprave Ledger zavrnjen","noAccountsFound":"Ni najdenih ra\u010dunov","selectYourAccounts":"Izberite Va\u0161i ra\u010duni","connecting1Account":"Povezovanje enega ra\u010duna","cantFindAnyAccount":"Ni mogo\u010de najti nobenega ra\u010duna, povezanega s tem Ledgerjem. Ustvarite nov NEAR ra\u010dun ","orConnectAnAnotherLedger":"ali pove\u017eite drug Ledger..","connecting":"Povezovanje","ofAccounts":"ra\u010dunov","failedToAutomatically":"ID-ja ra\u010duna ni bilo mogo\u010de samodejno najti. Zagotovite ga ro\u010dno:","overviewTheListOfAuthorized":"Oglejte si seznam poobla\u0161\u010denih ra\u010dunov, dokon\u010dajte prijavo s klikom na spodnji gumb.","finish":"Kon\u010dajte"},"install":{"youllNeedToInstall":"Morali ga boste namestiti","toContinueAfterInstalling":"nadaljevati. Po namestitvi","refreshThePage":"Osve\u017eite stran.","open":"Odprite"},"qr":{"copiedToClipboard":"Kopirano v podlo\u017eni mapi","failedToCopy":"Kopiranje v podlo\u017eni mapi ni uspelo","scanWithYourMobile":"Skenirajte s svojo mobilno napravo","copyToClipboard":" Kopirajte v podlo\u017eni mapi","preferTheOfficial":"Preferirajte uradno pogovorno okno","open":"Odprite"},"walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica","instant-link":"Takoj\u0161nja denarnica"},"exportAccounts":{"chooseAWallet":"Izberite denarnico","transferYourAccounts":"Prenesite svoje ra\u010dune","selectAWallet":"Izberite denarnico, ki ustreza va\u0161im potrebam in podpira va\u0161e povezane ra\u010dune.","selectYourAccounts":"Izberite va\u0161i ra\u010duni","afterDecide":"Ko se odlo\u010dite za denarnico, lahko izberete, katere ra\u010dune \u017eelite prenesti.","disclaimer":"Ne boste mogli prenesti Ra\u010dunov, ki nikoli niso bili financirani ali uporabljeni na NEAR.","warning":"trenutno ne podpira izvoza ra\u010duna. Izberite drugo denarnico","walletTypes":{"hardware":"Hladna denarnica","browser":"Denarnica brskalnika","injected":"Raz\u0161iritev za denarnico","bridge":"Bridge denarnica","mobile":"Mobilna denarnica"},"selectAccounts":{"title":"Izberite ra\u010duni za prenos.","button":"Pridobite geslo","deselectAll":"Prekli\u010di izbiro vseh","selectAll":"Izberi vse","unavailable":"Prenos ni na voljo","error":"Ra\u010dun ne obstaja","warningLedger":"Potrebna je podpora za Ledger","noBalance":"Ra\u010dun ni financiran"},"getPassphrase":{"title":"Kopiraj za\u010dasno geslo","desc":"To geslo boste morali vnesti, ko boste za\u010deli izva\u017eati svoje ra\u010dune v drugo denarnico.","button":"Nadaljujte","label":"Kliknite za kopiranje","checkLabel":"Geslo sem kopiral ali zapisal"},"complete":{"title":"Dokon\u010dajte prenos","descOne":"Zdaj boste preusmerjeni v denarnico, ki ste jo izbrali za dokon\u010danje prenosa.","descTwo":"Ko je uvozni del postopka kon\u010dan iz izbrane denarnice, pritisnite gumb za dokon\u010danje postopka prenosa.","button":"Kon\u010dajte"}}}}'),KF=JSON.parse('{"modal":{"wallet":{"connectYourWallet":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0432\u043e\u0458 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a!","whatIsAWallet":"\u0428\u0442\u0430 \u0458\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a?","secureAndManage":"\u041e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0458\u0442\u0435 \u0441\u0432\u043e\u0458\u043e\u043c \u0434\u0438\u0433\u0438\u0442\u0430\u043b\u043d\u043e\u043c \u0438\u043c\u043e\u0432\u0438\u043d\u043e\u043c.","safelyStore":"\u0411\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u0447\u0443\u0432\u0430\u0458\u0442\u0435 \u0438 \u043f\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0432\u0430\u043b\u0443\u0442\u0435 \u0438 NFT.","logInToAny":"\u041f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0441\u0435 \u043d\u0430 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR","noNeedToCreate":"\u041d\u0435\u043c\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0434\u0430 \u043a\u0440\u0435\u0438\u0440\u0430\u0442\u0435 \u043d\u043e\u0432\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0438\u043b\u0438 \u0430\u043a\u0440\u0435\u0434\u0438\u0442\u0438\u0432\u0435. \u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0438 \u0441\u043f\u0440\u0435\u043c\u043d\u0438 \u0441\u0442e!","getAWallet":"\u041d\u0430\u0431\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","useAWallet":"\u041a\u043e\u0440\u0438\u0441\u0442\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u0434\u0430 \u043e\u0431\u0435\u0437\u0431\u0435\u0434\u0438\u0442\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u0459\u0430\u0442\u0435 \u0441\u0432\u043e\u0458\u0438\u043c NEAR \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0438\u043c\u0430 \u0438 \u0434\u0430 \u0441\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0438\u0442\u0435 \u0443 \u0431\u0438\u043b\u043e \u043a\u043e\u0458\u0443 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0443 NEAR \u0431\u0435\u0437 \u043f\u043e\u0442\u0440\u0435\u0431\u0435 \u0437\u0430 \u043a\u043e\u0440\u0438\u0441\u043d\u0438\u0447\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0438 \u043b\u043e\u0437\u0438\u043d\u043a\u0430\u043c\u0430.","connectionFailed":"\u0412\u0435\u0437\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u043e\u0441\u0442\u0430\u0432\u0459\u0435\u043d\u0430.","connectionSuccessful":"\u0412\u0435\u0437\u0430 \u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u0430.","connected":"\u041f\u043e\u0432\u0435\u0437\u0430\u043d.","connectingTo":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435 \u043d\u0430","connectingMessage":{"injected":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u0441\u043f\u043e\u0459\u043d\u043e\u043c \u043f\u0440\u043e\u0437\u043e\u0440\u0443","browser":"\u041d\u0430\u043a\u043e\u043d \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0430\u0432\u0430\u045a\u0430, \u043f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0443 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0443","hardware":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u0445\u043b\u0430\u0434\u043d\u0438\u043c \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c","bridge":"\u041f\u043e\u0442\u0432\u0440\u0434\u0438\u0442\u0435 \u0432\u0435\u0437\u0443 \u0441\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u043e\u043c"}},"ledger":{"connectWithLedger":"\u041f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0441\u0435 \u0441\u0430 Ledger","makeSureYourLedger":"\u0423\u0432\u0435\u0440\u0438\u0442\u0435 \u0441\u0435 \u0434\u0430 \u0458\u0435 \u0432\u0430\u0448 Ledger \u0431\u0435\u0437\u0431\u0435\u0434\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0438 \u0434\u0430 \u0458\u0435 \u0430\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u0458\u0430 NEAR \u043e\u0442\u0432\u043e\u0440\u0435\u043d\u0430 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0440\u0435\u0452\u0430\u0458\u0443","continue":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438","specifyHDPath":"\u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443","enterYourPreferredHDPath":"\u0423\u043d\u0435\u0441\u0438\u0442\u0435 \u0436\u0435\u0459\u0435\u043d\u0443 \u0436\u0435\u0459\u0435\u043d\u0443 \u0425\u0414 \u043f\u0443\u0442\u0430\u045a\u0443, \u0430 \u0437\u0430\u0442\u0438\u043c \u0441\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u0441\u0432\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","scan":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435","retry":"\u041f\u043e\u043a\u0443\u0448\u0430\u0458 \u043f\u043e\u043d\u043e\u0432\u043e","ledgerIsNotAvailable":"Ledger \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d.","accessDeniedToUseLedgerDevice":"\u041f\u0440\u0438\u0441\u0442\u0443\u043f \u0458\u0435 \u043e\u0434\u0431\u0438\u0458\u0435\u043d \u0437\u0430 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u045a\u0435 Ledger \u0443\u0440\u0435\u0452\u0430\u0458\u0430","noAccountsFound":"\u041d\u0430l\u043e\u0437\u0438 \u043d\u0438\u0441\u0443 \u043f\u0440\u043e\u043d\u0430\u0452\u0435\u043d\u0438","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0412\u0430\u0448 \u043d\u0430l\u043e\u0433","connecting1Account":"\u041f\u043e\u0432\u0435\u0437\u0430\u0442\u0438 1 \u043d\u0430l\u043e\u0433","cantFindAnyAccount":"\u041d\u0438\u0458\u0435 \u043c\u043e\u0433\u0443\u045b\u0435 \u043f\u0440\u043e\u043d\u0430\u045b\u0438 \u043d\u0438\u0458\u0435\u0434\u0430\u043d \u043d\u0430l\u043e\u0433 \u043f\u043e\u0432\u0435\u0437\u0430\u043d \u0441\u0430 \u043e\u0432\u0438\u043c Ledger-\u043e\u043c. \u041d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u0435 \u043d\u043e\u0432\u0438 NEAR \u043d\u0430l\u043e\u0433","orConnectAnAnotherLedger":"\u0438\u043b\u0438 \u043f\u043e\u0432\u0435\u0436\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 Ledger.","connecting":"\u041f\u043e\u0432\u0435\u0437\u0438\u0432\u0430\u045a\u0435","ofAccounts":"\u043d\u0430l\u043e\u0433\u0430","failedToAutomatically":"\u0410\u0443\u0442\u043e\u043c\u0430\u0442\u0441\u043a\u043e \u043f\u0440\u043e\u043d\u0430\u043b\u0430\u0436\u0435\u045a\u0435 ID-a \u043d\u0430l\u043e\u0433\u0430 \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e. \u041d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u0433\u0430 \u0440\u0443\u0447\u043d\u043e:","overviewTheListOfAuthorized":"\u041f\u0440\u0435\u0433\u043b\u0435\u0434\u0430\u0458\u0442\u0435 \u043b\u0438\u0441\u0442\u0443 \u043e\u0432\u043b\u0430\u0448\u045b\u0435\u043d\u0438\u0445 \u0440\u0430\u0447\u0443\u043d\u0430, \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u0438\u0458\u0430\u0432\u0443 \u043a\u043b\u0438\u043a\u043e\u043c \u043d\u0430 \u0434\u0443\u0433\u043c\u0435 \u0438\u0441\u043f\u043e\u0434.","finish":"\u0417\u0430\u0432\u0440\u0448\u0438"},"install":{"youllNeedToInstall":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u0442\u0435","toContinueAfterInstalling":"\u0437\u0430 \u043d\u0430\u0441\u0442\u0430\u0432\u0430\u043a. \u041d\u0430\u043a\u043e\u043d \u0438\u043d\u0441\u0442\u0430\u043b\u0438\u0440\u0430\u045a\u0430","refreshThePage":"\u043f\u043e\u043d\u043e\u0432\u043e \u0443\u0447\u0438\u0442\u0430\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"qr":{"copiedToClipboard":"\u041a\u043e\u043f\u0438\u0440\u0430\u043d\u043e \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","failedToCopy":"\u041a\u043e\u043f\u0438\u0440\u0430\u045a\u0435 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a \u043d\u0438\u0458\u0435 \u0443\u0441\u043f\u0435\u043b\u043e","scanWithYourMobile":"\u0421\u043a\u0435\u043d\u0438\u0440\u0430\u0458\u0442\u0435 \u043f\u043e\u043c\u043e\u045b\u0443 \u043c\u043e\u0431\u0438\u043b\u043d\u043e\u0433 \u0443\u0440\u0435\u0452\u0430\u0458\u0430","copyToClipboard":" \u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u0443 \u043c\u0435\u0452\u0443\u0441\u043f\u0440\u0435\u043c\u043d\u0438\u043a","preferTheOfficial":"\u041f\u0440\u0435\u0444\u0435\u0440\u0438\u0440\u0430\u0442\u0435 \u0437\u0432\u0430\u043d\u0438\u0447\u043d\u0438 \u0434\u0438\u0458\u0430\u043b\u043e\u0433 \u043e\u0434","open":"\u041e\u0442\u0432\u043e\u0440\u0438"},"walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","instant-link":"\u0418\u043d\u0441\u0442\u0430\u043d\u0442 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"exportAccounts":{"chooseAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","transferYourAccounts":"\u041f\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","selectAWallet":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u043e\u0434\u0433\u043e\u0432\u0430\u0440\u0430 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0430\u043c\u0430 \u0438 \u043a\u043e\u0458\u0438 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0432\u0430\u0448\u0435 \u043f\u043e\u0432\u0435\u0437\u0430\u043d\u0435 \u043d\u0430\u043b\u043e\u0433\u0435.","selectYourAccounts":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043d\u0430\u043b\u043e\u0433\u0435","afterDecide":"\u041d\u0430\u043a\u043e\u043d \u0448\u0442\u043e \u0441\u0435 \u043e\u0434\u043b\u0443\u0447\u0438\u0442\u0435 \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a, \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0436\u0435\u043b\u0438\u0442\u0435 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435.","disclaimer":"\u041d\u0435\u045b\u0435\u0442\u0435 \u043c\u043e\u045b\u0438 \u0434\u0430 \u043f\u0440\u0435\u043d\u0435\u0441\u0435\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u043a\u043e\u0458\u0438 \u043d\u0438\u043a\u0430\u0434\u0430 \u043d\u0438\u0441\u0443 \u0431\u0438\u043b\u0438 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d\u0438 \u0438\u043b\u0438 \u043a\u043e\u0440\u0438\u0448\u045b\u0435\u043d\u0438 \u043d\u0430 NEAR.","warning":"\u0442\u0440\u0435\u043d\u0443\u0442\u043d\u043e \u043d\u0435 \u043f\u043e\u0434\u0440\u0436\u0430\u0432\u0430 \u0438\u0437\u0432\u043e\u0437 \u043d\u0430\u043b\u043e\u0433\u0430. \u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","walletTypes":{"hardware":"\u0425\u0430\u0440\u0434\u0432\u0435\u0440\u0441\u043a\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","browser":"\u041d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043f\u0440\u0435\u0442\u0440\u0430\u0436\u0438\u0432\u0430\u0447\u0430,","injected":"\u0414\u043e\u0434\u0430\u0442\u0430\u043a \u0437\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a,","bridge":"Bridge \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a","mobile":"\u041c\u043e\u0431\u0438\u043b\u043d\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a"},"selectAccounts":{"title":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0437\u0430 \u043f\u0440\u0435\u043d\u043e\u0441.","button":"\u0414\u043e\u0431\u0438\u0458\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u043d\u0443 \u0444\u0440\u0430\u0437\u0443","deselectAll":"\u041f\u043e\u043d\u0438\u0448\u0442\u0438\u0442\u0435 \u0438\u0437\u0431\u043e\u0440","selectAll":"\u0418\u0437\u0430\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u0435","unavailable":"\u0422\u0440\u0430\u043d\u0441\u0444\u0435\u0440 \u043d\u0438\u0458\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430\u043d","error":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u0458\u0438","warningLedger":"\u041f\u043e\u0442\u0440\u0435\u0431\u043d\u0430 \u043f\u043e\u0434\u0440\u0448\u043a\u0430 \u0437\u0430 Ledger","noBalance":"\u041d\u0430\u043b\u043e\u0433 \u043d\u0438\u0458\u0435 \u0444\u0438\u043d\u0430\u043d\u0441\u0438\u0440\u0430\u043d"},"getPassphrase":{"title":"\u041a\u043e\u043f\u0438\u0440\u0430\u0458 \u043f\u0440\u0438\u0432\u0440\u0435\u043c\u0435\u043d\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443","desc":"\u041c\u043e\u0440\u0430\u045b\u0435\u0442\u0435 \u0434\u0430 \u0443\u043d\u0435\u0441\u0435\u0442\u0435 \u043e\u0432\u0443 \u043b\u043e\u0437\u0438\u043d\u043a\u0443 \u043a\u0430\u0434\u0430 \u043f\u043e\u0447\u043d\u0435\u0442\u0435 \u0434\u0430 \u0438\u0437\u0432\u043e\u0437\u0438\u0442\u0435 \u0441\u0432\u043e\u0458\u0435 \u043d\u0430\u043b\u043e\u0433\u0435 \u0443 \u0434\u0440\u0443\u0433\u0438 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a.","button":"\u041d\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u0435","label":"\u041a\u043b\u0438\u043a\u043d\u0438\u0442\u0435 \u0434\u0430 \u0431\u0438\u0441\u0442\u0435 \u043a\u043e\u043f\u0438\u0440\u0430\u043b\u0438","checkLabel":"\u041a\u043e\u043f\u0438\u0440\u0430\u043e \u0441\u0430\u043c \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u043e \u043b\u043e\u0437\u0438\u043d\u043a\u0443"},"complete":{"title":"\u0414\u043e\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440","descOne":"\u0421\u0430\u0434\u0430 \u045b\u0435\u0442\u0435 \u0431\u0438\u0442\u0438 \u043f\u0440\u0435\u0443\u0441\u043c\u0435\u0440\u0435\u043d\u0438 \u043d\u0430 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a \u043a\u043e\u0458\u0438 \u0441\u0442\u0435 \u0438\u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u0435\u0440.","descTwo":"\u041a\u0430\u0434\u0430 \u0441\u0435 \u0434\u0435\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0430 \u0443\u0432\u043e\u0437\u0430 \u0437\u0430\u0432\u0440\u0448\u0438 \u0438\u0437 \u0438\u0437\u0430\u0431\u0440\u0430\u043d\u043e\u0433 \u043d\u043e\u0432\u0447\u0430\u043d\u0438\u043a\u0430, \u043f\u0440\u0438\u0442\u0438\u0441\u043d\u0438\u0442\u0435 \u0434\u0443\u0433\u043c\u0435 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0438\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441 \u043f\u0440\u0435\u043d\u043e\u0441\u0430.","button":"\u0417\u0430\u0432\u0440\u0448\u0438\u0442\u0435"}}}}');let I4;const D4=(t,e)=>{if(!t)return"";const n=e.indexOf(".");if(n>-1){const s=e.substring(0,n),f=e.substring(n+1);return D4(t[s],f)}return t[e]},An=t=>{let e=window.navigator.languages?window.navigator.languages[0]:null;e=e||window.navigator.language;const n=(t=>-1!==t.indexOf("-")?t.split("-")[0]:t.split("_")[0])(I4||e),s=(t=>{switch(t){case"en":default:return M4;case"es":return xF;case"zh":return PF;case"bg":return NF;case"ko":return RF;case"vi":return kF;case"hi":return LF;case"ar":return BF;case"hr":return jF;case"mk":return FF;case"sl":return UF;case"sr":return KF}})(n),f=D4(s,t);return f&&"string"==typeof f?f:t},hp='\n\n \n \n',Za='\n\n \n \n \n';function qA(t,e){return e2.apply(this,arguments)}function e2(){return e2=(0,Le.Z)(function*(t,e){if(bn){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${An("modal.ledger.selectYourAccounts")}

\n \n
\n
\n
\n \n
\n `;for(let n=0;n
\n `);document.getElementById("change-derivation-path-button")?.addEventListener("click",()=>{O4(t)}),document.getElementById("connect-button")?.addEventListener("click",n=>{n.preventDefault();const s=Array.from(document.querySelectorAll("input[name='account']")).map(I=>I.checked),f=e.filter((I,j)=>s[j]);f.length<1||n2(t,e,f)})}}),e2.apply(this,arguments)}const WF='\n\n \n \n \n';function eb(t,e){return t2.apply(this,arguments)}function t2(){return t2=(0,Le.Z)(function*(t,e){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
${t.metadata.name}
\n

${t.metadata.name}

\n
\n
\n
\n
\n ${WF}\n ${An("modal.wallet.connectionFailed")}\n
\n

${e&&e.message?e.message:""}

\n ${!t?.metadata.deprecated&&t?.metadata.available?``:""}\n
\n
\n
\n
\n
\n
\n `,document.getElementById("retry-button")?.addEventListener("click",()=>{im(t,!1)})}),t2.apply(this,arguments)}function n2(t,e,n){return r2.apply(this,arguments)}function r2(){return r2=(0,Le.Z)(function*(t,e,n){document.querySelector(".modal-right").innerHTML=`\n
\n
\n \n
\n

\n ${An("modal.ledger.connecting")} ${n.length} ${An("modal.ledger.ofAccounts")}\n

\n \n
\n
\n
\n
\n

\n ${An("modal.ledger.overviewTheListOfAuthorized")}\n

\n
\n
\n \n
\n
\n
\n
\n `;for(let s=0;s\n \n \n `);document.getElementById("back-button")?.addEventListener("click",()=>{qA(t,e)}),document.getElementById("finish-button")?.addEventListener("click",(0,Le.Z)(function*(){try{if(!bn)return;(yield t.wallet()).signIn({contractId:bn.options.contractId,methodNames:bn.options.methodNames,accounts:n}),bn.container.children[0].classList.remove("open"),bn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(s){yield eb(t,s)}}))}),r2.apply(this,arguments)}function C4(t){return i2.apply(this,arguments)}function i2(){return i2=(0,Le.Z)(function*(t){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${An("modal.ledger.noAccountsFound")}\n

\n \n
\n
\n
\n
\n

\n ${An("modal.ledger.cantFindAnyAccount")}\n MyNearWallet\n ${An("modal.ledger.orConnectAnAnotherLedger")}\n

\n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{s2(t)})}),i2.apply(this,arguments)}function T4(){return o2.apply(this,arguments)}function o2(){return o2=(0,Le.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n
\n \n ${An("modal.wallet.connectingTo")} ${t?.metadata.name}...\n \n
\n
\n \n ${An("modal.wallet.connectingMessage."+t?.type)}\n \n
\n
\n
\n
\n `}),o2.apply(this,arguments)}const GF='\n\n \n',ZF='\n\n \n';function O4(t){if(!bn)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${An("modal.ledger.specifyHDPath")}\n

\n \n
\n
\n
\n
\n
\n
44'/397'/0'/0'/
\n
\n
\n
\n \n \n
\n
\n
\n

\n ${An("modal.ledger.enterYourPreferredHDPath")}\n

\n \n
\n \n
\n
\n
\n
\n `;const e=document.getElementById("derivation-path-index");e.innerText=bn.derivationPath.slice(-2,-1),document.getElementById("increase-index-button")?.addEventListener("click",()=>{if(!bn)return;const n=parseInt(e.innerText)+1;bn.derivationPath=bn.derivationPath.slice(0,-2)+n.toString()+"'",e.innerText=n.toString()}),document.getElementById("decrease-index-button")?.addEventListener("click",()=>{if(!bn)return;const n=parseInt(e.innerText)-1;bn.derivationPath=bn.derivationPath.slice(0,-2)+n.toString()+"'",n>=0&&(e.innerText=n.toString())}),document.getElementById("back-button")?.addEventListener("click",()=>{s2(t)}),document.getElementById("scan-button")?.addEventListener("click",(0,Le.Z)(function*(){try{const n=yield t.wallet();T4(t);const s=yield k4(n);if(!s||s.length<1)return C4(t);1===s.length&&n2(t,s,s),qA(t,s)}catch(n){yield eb(t,n)}}))}const JF='\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ';function s2(t){bn&&(bn.derivationPath=j4,document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n ${An("modal.ledger.connectWithLedger")}\n

\n \n
\n
\n
\n
\n
\n ${JF}\n
\n
\n

${An("modal.ledger.makeSureYourLedger")}

\n

${An("modal.ledger.specifyHDPath")}

\n
\n
\n
\n
\n
\n `,document.getElementById("continue-button")?.addEventListener("click",()=>{im(t,!1)}),document.getElementById("specify-derivation-path-button")?.addEventListener("click",()=>{O4(t)}))}const YF='\n\n \n \n \n \n \n \n \n',$F='\n\n \n \n \n';function x4(t){if(!bn)return;let e="";return"injected"===t.type&&(e=t.metadata.downloadUrl),"browser"===t.type&&(e=t.metadata.walletUrl),e}function P4(){return a2.apply(this,arguments)}function a2(){return(a2=(0,Le.Z)(function*(){if(!bn)return;document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n \n
\n

${An("modal.wallet.getAWallet")}

\n \n
\n
\n
\n\n
\n
\n
\n `;const e=bn.modules.filter(n=>"bridge"!==n.type&&"hardware"!==n.type&&"instant-link"!==n.type);for(let n=0;n\n
\n ${s&&I?`${YF}`:!s&&I?`${$F}`:""}\n\n
\n
\n
\n
\n
${e[n].metadata.name}
\n
${An(`modal.walletTypes.${f||e[n].type}`)}
\n
\n \n`)}Array.from(document.querySelectorAll(".single-wallet-get")).forEach(n=>{n.addEventListener("click",()=>{if(!bn)return;const s=bn.modules.find(I=>I.id===n.id);if(!s)return;const f=x4(s);f&&window.open(f,"_blank")})}),document.getElementById("back-button")?.addEventListener("click",()=>{u2()})})).apply(this,arguments)}const QF='\n\n \n',XF='\n\n \n \n \n';function u2(){return c2.apply(this,arguments)}function c2(){return(c2=(0,Le.Z)(function*(){document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n
\n

${An("modal.wallet.whatIsAWallet")}

\n \n
\n
\n\n
\n
\n
\n ${QF}\n
\n
\n

${An("modal.wallet.secureAndManage")}

\n

${An("modal.wallet.safelyStore")}

\n
\n
\n\n
\n
\n ${XF}\n
\n
\n

${An("modal.wallet.logInToAny")}

\n

${An("modal.wallet.noNeedToCreate")}

\n
\n
\n\n
\n \n
\n\n
\n

\n ${An("modal.wallet.useAWallet")}\n

\n \n
\n\n
\n \n
\n\n
\n
\n `,document.getElementById("get-a-wallet-button")?.addEventListener("click",()=>{P4()}),document.getElementById("get-a-wallet-button-mobile")?.addEventListener("click",()=>{P4()})})).apply(this,arguments)}const eU='\n\n \n \n';function N4(){return l2.apply(this,arguments)}function l2(){return l2=(0,Le.Z)(function*(t=null){document.querySelector(".modal-right").innerHTML=`\n
\n
\n

\n \n
\n
\n
\n
\n
\n ${t?.metadata.name}\n
\n

${t?.metadata.name}

\n
\n ${eU}\n \n ${An("modal.wallet.connectionSuccessful")}\n \n
\n
\n
\n
\n `}),l2.apply(this,arguments)}var tU=d(89093),nU=d.n(tU),rU=d(3259);const iU='\n\n \n \n';function f2(){return f2=(0,Le.Z)(function*(t,e){function s(){return(s=(0,Le.Z)(function*(se){return yield rU.toString(se,{margin:0,type:"svg"})})).apply(this,arguments)}const f=yield function n(se){return s.apply(this,arguments)}(e.uri);document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

${An("modal.qr.scanWithYourMobile")}

\n \n
\n
\n
\n ${f}\n
\n
\n
\n ${iU}\n ${An("modal.qr.copyToClipboard")}\n
\n
\n
\n

${An("modal.qr.preferTheOfficial")} ${t.metadata.name}?

\n \n
\n
\n
\n`,document.getElementById("continue-button")?.addEventListener("click",()=>{im(t,!1)});const I=document.getElementById("copy-uri-to-clipboard"),j=document.getElementById("uri-copy-notification"),q=se=>{j&&I&&(j.innerHTML=se,j.style.display="block",I.style.display="none")},re=()=>{j&&I&&(I.style.display="flex",j.style.display="none")};document.getElementById("copy-uri-to-clipboard")?.addEventListener("click",()=>{e.uri&&(nU()(e.uri)?(q(An("modal.qr.copiedToClipboard")),setTimeout(()=>re(),1200)):(q(An("modal.qr.failedToCopy")),setTimeout(()=>re(),1200)))}),document.getElementById("default-modal-trigger")?.addEventListener("click",()=>{e.handleOpenDefaultModal()})}),f2.apply(this,arguments)}const sU='\n\n \n \n \n ';let R4=!0;const aU=function(){var t=(0,Le.Z)(function*(e){if(!bn)return[];const n=yield fetch(`${bn.selector.options.network.indexerUrl}/publicKey/ed25519:${e}/accounts`);if(!n.ok)throw new Error("Failed to get account id from public key");const s=yield n.json();return Array.isArray(s)&&s.length?s:[]});return function(n){return t.apply(this,arguments)}}(),k4=function(){var t=(0,Le.Z)(function*(e){if(!bn)return[];const n=yield e.getPublicKey(bn.derivationPath);try{return(yield aU(n)).map((f,I)=>({derivationPath:bn.derivationPath,publicKey:n,accountId:f,selected:0===I}))}catch{return null}});return function(n){return t.apply(this,arguments)}}();function im(t){return d2.apply(this,arguments)}function d2(){return d2=(0,Le.Z)(function*(t,e=!1){if(!bn)return;const{selectedWalletId:n}=bn.selector.store.getState();if(n!==t.id)try{if("injected"===t.type&&!t.metadata.available)return function qF(t){bn&&(document.querySelector(".modal-right").innerHTML=`\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n

\n ${t.metadata.name}\n

\n
\n

\n ${An("modal.install.youllNeedToInstall")} ${t.metadata.name}\n ${An("modal.install.toContinueAfterInstalling")}\n  \n ${An("modal.install.refreshThePage")}\n \n

\n
\n \n
\n
\n
\n `,document.getElementById("back-button")?.addEventListener("click",()=>{u2()}),document.getElementById("refresh-page-lint")?.addEventListener("click",()=>{window.location.reload()}),document.getElementById("download-button")?.addEventListener("click",()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")}))}(t);if(t.metadata.deprecated)return eb(t,new Error("Wallet is deprecated"));const s=yield t.wallet();if(yield T4(t),"hardware"===s.type){const f=yield k4(s);return!f||f.length<1?C4(t):1===f.length?n2(t,f,f):qA(t,f)}if("bridge"===s.type){const f=bn.selector.on("uriChanged",({uri:I})=>{!function oU(t,e){return f2.apply(this,arguments)}(t,{uri:I,handleOpenDefaultModal:()=>{im(t,!0)}})});return yield s.signIn({contractId:bn.options.contractId,methodNames:bn.options.methodNames,qrCodeModal:e}),f.remove(),bn.container.children[0].classList.remove("open"),void bn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}if("browser"===s.type)return yield s.signIn({contractId:bn.options.contractId,methodNames:bn.options.methodNames,successUrl:s.metadata.successUrl,failureUrl:s.metadata.failureUrl}),bn.container.children[0].classList.remove("open"),void bn.emitter.emit("onHide",{hideReason:"wallet-navigation"});yield s.signIn({contractId:bn.options.contractId,methodNames:bn.options.methodNames}),bn.container.children[0].classList.remove("open"),bn.emitter.emit("onHide",{hideReason:"wallet-navigation"})}catch(s){const{name:f}=t.metadata,I=s&&"object"==typeof s&&"message"in s?s.message:"Something went wrong";yield eb(t,new Error(`Failed to sign in with ${f}: ${I}`))}else N4(t)}),d2.apply(this,arguments)}function tb(t,e){if(bn)for(let n=0;n\n
${f}
\n
\n
${f}
\n
${I}
\n
\n ${s.metadata.deprecated?`\n
\n ${sU}\n
\n `:""}\n \n `),document.getElementById("module-"+s.id)?.addEventListener("click",()=>{if(document.querySelectorAll(".selected-wallet").forEach(q=>{q.classList.remove("selected-wallet")}),document.getElementById("module-"+s.id)?.classList.add("selected-wallet"),"hardware"===s.type)return s2(s);im(s,!1)})}}function L4(){if(!bn)return;bn.container.innerHTML=`\n
\n
\n
\n \n \n
\n
\n `;const t=[],e=[];bn.modules.forEach(n=>{bn?.selector.store.getState().recentlySignedInWallets.includes(n.id)?e.push(n):t.push(n)}),bn.selector.options.optimizeWalletOrder&&e.length>0?(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
Recent
\n
\n
\n '),document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'\n
\n
More
\n
\n
\n '),tb(".recent-options-list-content",e),bn.selector.options.randomizeWalletOrder?tb(".more-options-list-content",t.sort(()=>Math.random()-.5)):tb(".more-options-list-content",t)):(document.querySelector(".wallet-options-wrapper")?.insertAdjacentHTML("beforeend",'
'),tb(".options-list",bn.modules)),document.querySelector(".nws-modal-overlay")?.addEventListener("click",()=>{bn&&(bn.container.children[0].classList.remove("open"),bn.emitter.emit("onHide",{hideReason:"user-triggered"}))}),R4&&(document.addEventListener("click",n=>{if(!bn)return;const s=n.target;s&&"close-button"===s.className&&(bn.container.children[0].classList.remove("open"),bn.emitter.emit("onHide",{hideReason:"user-triggered"}))}),R4=!1)}const B4="near-wallet-selector-modal",j4="44'/397'/0'/0'/1'";let h2=null,bn=null;if(typeof window<"u"){const t=document.createElement("div");t.id=B4,document.body.appendChild(t)}const uU=(t,e)=>{const n=new ZA;t.store.getState().modules.forEach(function(){var f=(0,Le.Z)(function*(I){if("topLevelInjected"in I.metadata){if(!I.metadata.topLevelInjected)return;const j=yield I.wallet();if("injected"!==j.type)return;yield j.signIn({contractId:e.contractId,methodNames:e.methodNames})}});return function(I){return f.apply(this,arguments)}}()),bn={container:document.getElementById(B4),selector:t,options:e,route:{name:"WalletOptions"},modules:[],derivationPath:j4,emitter:n},bn.selector.store.observable.subscribe(f=>{bn&&(t.options.optimizeWalletOrder&&(f.modules.sort((I,j)=>I.metadata.deprecated===j.metadata.deprecated?0:I.metadata.deprecated?1:-1),f.modules.sort((I,j)=>j.metadata.available===I.metadata.available?0:j.metadata.available?1:-1)),bn.modules=f.modules)});return window.addEventListener("keydown",f=>{if("Escape"===f.key){if(!bn)return;bn.container.children[0].classList.remove("open"),bn.emitter.emit("onHide",{hideReason:"user-triggered"})}}),L4(),h2||(h2={show:()=>{if(!bn)return;(t=>{I4=t})(bn.selector.options.languageCode),L4();const f=bn.selector.store.getState().selectedWalletId;if(f){N4(bn.modules.find(j=>j.id===f))}else u2();bn.container.children[0].classList.add("open")},hide:()=>{bn&&bn.container.children[0].classList.remove("open")},on:(f,I)=>bn.emitter.on(f,I),off:(f,I)=>{bn.emitter.off(f,I)}}),h2};var va=d(48214),F4=d.n(va);const cU="data:image/png;base64,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",lU=()=>Ga(()=>!!window.near?.isSender).catch(()=>!1),dU=function(){var t=(0,Le.Z)(function*({options:e,metadata:n,store:s,provider:f,emitter:I,logger:j,id:q}){const re={wallet:window.near},fe=function(){var Fe=(0,Le.Z)(function*(){if(!re.wallet.isSignedIn())return;(()=>{for(const Fe in re.wallet.callbacks)re.wallet.remove(Fe)})();const Ke=yield re.wallet.signOut();if(!0===Ke)return;const et=new Error("string"==typeof Ke.error?Ke.error:Ke.error.type);if("User reject"===et.message)throw et;j.log("Failed to sign out"),j.error(et)});return function(){return Fe.apply(this,arguments)}}(),be=()=>{re.wallet.on("accountChanged",function(){var Fe=(0,Le.Z)(function*(Ke){j.log("onAccountChange",Ke),I.emit("signedOut",null)});return function(Ke){return Fe.apply(this,arguments)}}()),re.wallet.on("rpcChanged",function(){var Fe=(0,Le.Z)(function*(Ke){j.log("onNetworkChange",Ke),e.network.networkId!==Ke.networkId&&(yield fe(),I.emit("signedOut",null),I.emit("networkChanged",{networkId:Ke.networkId}))});return function(Ke){return Fe.apply(this,arguments)}}())},_e=function(){var Fe=(0,Le.Z)(function*(){const{selectedWalletId:Ke}=s.getState();Ke===q&&(yield Ga(()=>!!re.wallet?.isSignedIn(),{timeout:1e3}).catch());const et=re.wallet.getAccountId();if(!et)return[];yield Ga(()=>!!re.wallet.account(),{timeout:100});const Ye=re.wallet.account();if(!Ye.connection.signer.getPublicKey)return[{accountId:et,publicKey:void 0}];const ut=yield Ye.connection.signer.getPublicKey(Ye.accountId,e.network.networkId);return[{accountId:et,publicKey:ut?ut.toString():void 0}]});return function(){return Fe.apply(this,arguments)}}(),Te=Fe=>{if(!(Fe=>Fe.every(Ke=>"FunctionCall"===Ke.type))(Fe))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return Fe.map(et=>et.params)},Be=Fe=>Fe.map(Ke=>({receiverId:Ke.receiverId,actions:Te(Ke.actions)}));return re.wallet&&re.wallet.isSignedIn()&&be(),{signIn:({contractId:Fe,methodNames:Ke})=>(0,Le.Z)(function*(){const et=yield _e();if(et.length)return et;const{accessKey:Ye,error:ut}=yield re.wallet.requestSignIn({contractId:Fe,methodNames:Ke});if(!Ye||ut)throw yield fe(),new Error(("string"==typeof ut?ut:ut.type)||"Failed to sign in");return be(),yield _e()})(),signOut:fe,getAccounts:()=>(0,Le.Z)(function*(){return _e()})(),verifyOwner:({message:Fe})=>(0,Le.Z)(function*(){j.log("Sender:verifyOwner",{message:Fe});const Ke=re.wallet.account();if(!Ke)throw new Error("Wallet not signed in");if(!Ke.connection.signer.signMessage)throw new Error("Wallet is locked");const et=e.network.networkId,Ye=Ke.accountId,ut=yield Ke.connection.signer.getPublicKey(Ye,et),Tt=yield f.block({finality:"final"}),Vt={accountId:Ye,message:Fe,blockId:Tt.header.hash,publicKey:Buffer.from(ut.data).toString("base64"),keyType:ut.keyType},vn=JSON.stringify(Vt),en=yield Ke.connection.signer.signMessage(new Uint8Array(Buffer.from(vn)),Ye,et);return{...Vt,signature:Buffer.from(en.signature).toString("base64"),keyType:en.publicKey.keyType}})(),signMessage:Fe=>(0,Le.Z)(function*(){return re.wallet.signMessage(Fe).then(Ke=>{if(Ke.error)throw new Error(Ke.error);if(!Ke?.response)throw new Error("Invalid response");return Ke.response})})(),signAndSendTransaction:({signerId:Fe,receiverId:Ke,actions:et})=>(0,Le.Z)(function*(){j.log("signAndSendTransaction",{signerId:Fe,receiverId:Ke,actions:et});const{contract:Ye}=s.getState();if(!re.wallet.isSignedIn()||!Ye)throw new Error("Wallet not signed in");return re.wallet.signAndSendTransaction({receiverId:Ke||Ye.contractId,actions:Te(et)}).then(ut=>{if(ut.error)throw new Error(ut.error);if(ut.response&&"error"in ut.response)throw new Error(ut.response.error.message);if(!ut.response?.length)throw new Error("Invalid response");return ut.response[0]})})(),signAndSendTransactions:({transactions:Fe})=>(0,Le.Z)(function*(){if(j.log("signAndSendTransactions",{transactions:Fe}),!re.wallet.isSignedIn())throw new Error("Wallet not signed in");return re.wallet.requestSignTransactions({transactions:Be(Fe)}).then(Ke=>{if(Ke.error)throw new Error(Ke.error);if(Ke.response&&"error"in Ke.response)throw new Error(Ke.response.error.message);if(!Ke.response?.length)throw new Error("Invalid response");return Ke.response})})(),importAccountsInSecureContext:({accounts:Fe})=>(0,Le.Z)(function*(){window.near&&window.near.isSender&&(yield window.near.batchImport({keystore:Fe,network:e.network.networkId}))})()}});return function(n){return t.apply(this,arguments)}}();function U4({iconUrl:t=cU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=yield lU();return{id:"sender",type:"injected",metadata:{name:"Sender",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/sender-wallet/epapihdplajcdnnkdeiahlgigofloibg",deprecated:e,available:s},init:dU}})}const hU="data:image/png;base64,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",pU=()=>Ga(()=>!!window.bitkeep.near).catch(()=>!1),yU=function(){var t=(0,Le.Z)(function*({options:e,store:n,provider:s,emitter:f,logger:I}){const j={wallet:window.bitkeep.near},re=function(){var _e=(0,Le.Z)(function*(){if(!j.wallet.isSignedIn())return;(()=>{for(const _e in j.wallet.callbacks)j.wallet.remove(_e)})();const Oe=yield j.wallet.signOut();if(!0===Oe)return;const Te=new Error("string"==typeof Oe.error?Oe.error:Oe.error.type);if("User reject"===Te.message)throw Te;I.log("Failed to sign out"),I.error(Te)});return function(){return _e.apply(this,arguments)}}(),se=()=>{j.wallet.on("accountChanged",function(){var _e=(0,Le.Z)(function*(Oe){I.log("onAccountChange",Oe),f.emit("signedOut",null)});return function(Oe){return _e.apply(this,arguments)}}()),j.wallet.on("rpcChanged",function(){var _e=(0,Le.Z)(function*(Oe){I.log("onNetworkChange",Oe),e.network.networkId!==Oe.networkId&&(yield re(),f.emit("signedOut",null),f.emit("networkChanged",{networkId:Oe.networkId}))});return function(Oe){return _e.apply(this,arguments)}}())},fe=function(){var _e=(0,Le.Z)(function*(){const Oe=j.wallet.getAccountId()||"";if(!Oe)return[];const Te=yield j.wallet.getPublicKey();return[{accountId:Oe,publicKey:Te?Te.toString():void 0}]});return function(){return _e.apply(this,arguments)}}(),be=_e=>_e.map(Oe=>({receiverId:Oe.receiverId,actions:Oe.actions}));return j.wallet&&j.wallet.isSignedIn()&&se(),{signIn:({contractId:_e,methodNames:Oe})=>(0,Le.Z)(function*(){const Te=yield fe();if(Te.length)return Te;const{accessKey:Be,error:Fe}=yield j.wallet.requestSignIn({contractId:_e,methodNames:Oe});if(!Be||Fe)throw yield re(),new Error(("string"==typeof Fe?Fe:Fe.type)||"Failed to sign in");return se(),yield fe()})(),signOut:re,getAccounts:()=>(0,Le.Z)(function*(){return fe()})(),verifyOwner:({message:_e})=>(0,Le.Z)(function*(){I.log("Bitget-wallet:verifyOwner",{message:_e});const Oe=e.network.networkId,Te=yield j.wallet.getAccountId(),Be=yield j.wallet.getPublicKey(),Fe=yield s.block({finality:"final"}),Ke={accountId:Te,message:_e,blockId:Fe.header.hash,publicKey:Be,keyType:"0"},et=JSON.stringify(Ke),Ye=yield j.wallet.verifyOwner(et,Te,Oe);return{...Ke,signature:Ye.signature,keyType:Ye.keyType}})(),signAndSendTransaction:({signerId:_e,receiverId:Oe,actions:Te})=>(0,Le.Z)(function*(){I.log("signAndSendTransaction",{signerId:_e,receiverId:Oe,actions:Te});const{contract:Be}=n.getState();if(!j.wallet.isSignedIn()||!Be)throw new Error("Wallet not signed in");return j.wallet.signAndSendTransaction({receiverId:Oe||Be.contractId,actions:Te}).then(Fe=>{if(Fe.error)throw new Error(Fe.error);if(Fe.response&&"error"in Fe.response)throw new Error(Fe.response.error.message);if(!Fe.response?.length)throw new Error("Invalid response");return Fe.response[0]})})(),signAndSendTransactions:({transactions:_e})=>(0,Le.Z)(function*(){if(I.log("signAndSendTransactions",{transactions:_e}),!j.wallet.isSignedIn())throw new Error("Wallet not signed in");return j.wallet.requestSignTransactions({transactions:be(_e)}).then(Oe=>{if(Oe.error)throw new Error(Oe.error);if(Oe.response&&"error"in Oe.response)throw new Error(Oe.response.error.message);if(!Oe.response?.length)throw new Error("Invalid response");return Oe.response})})()}});return function(n){return t.apply(this,arguments)}}();function K4({iconUrl:t=hU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=yield pU();return s&&(yield Ga(()=>!!window.bitkeep?.near?.isSignedIn()).catch(()=>!1)),{id:"bitget-wallet",type:"injected",metadata:{name:"Bitget Wallet",description:"Browser extension wallet built on NEAR.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/bitkeep-crypto-nft-wallet/jiidiaalihmmhddjgbnbgdfflelocpak",deprecated:e,available:s},init:yU}})}const mU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iYXV0byIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMTQuMjYyNyAxMy40MDEzQzEyLjQyMjcgMTQuNTMwNyA5Ljk1OTg3IDE1LjExMjQgNy40NjU1OCAxNC45ODgxQzUuMzY4NDQgMTQuODg2NSAzLjY0ODQ0IDE0LjE0MTEgMi42MDg0NCAxMi45MTU3QzEuNjk0MTYgMTEuODIwMSAxLjMzOTg3IDEwLjM3NDUgMS41Nzk4NyA4LjcxMTQzQzEuNjYxMjEgOC4xNTg3NCAxLjgyNzkxIDcuNjIxNjYgMi4wNzQxNSA3LjExODk2TDIuMTA4NDQgNy4wNDgzN0MyLjk3MTcgNS40MDU5NSA0LjI1MjgyIDQuMDEzOTcgNS44MjU3MyAzLjAwOTQyQzcuMzk4NjQgMi4wMDQ4NiA5LjIwOTEzIDEuNDIyMzYgMTEuMDc5IDEuMzE5MjRDMTIuOTQ4OSAxLjIxNjExIDE0LjgxMzcgMS41OTU5MiAxNi40OSAyLjQyMTI4QzE4LjE2NjIgMy4yNDY2NSAxOS41OTYxIDQuNDg5MTIgMjAuNjM4OSA2LjAyNjQxQzIxLjY4MTcgNy41NjM3MSAyMi4zMDE1IDkuMzQyODUgMjIuNDM3MyAxMS4xODg3QzIyLjU3MzEgMTMuMDM0NiAyMi4yMjAyIDE0Ljg4MzYgMjEuNDEzMyAxNi41NTM4QzIwLjYwNjQgMTguMjI0IDE5LjM3MzQgMTkuNjU3NyAxNy44MzU1IDIwLjcxNEMxNi4yOTc3IDIxLjc3MDIgMTQuNTA4IDIyLjQxMjYgMTIuNjQyNyAyMi41Nzc4TDEyLjc1NyAyMy44NzM4QzE0Ljg1MTMgMjMuNjg5NCAxNi44NjA4IDIyLjk2OTEgMTguNTg3NyAyMS43ODM3QzIwLjMxNDYgMjAuNTk4NCAyMS42OTkyIDE4Ljk4ODkgMjIuNjA1MSAxNy4xMTM4QzIzLjUxMSAxNS4yMzg3IDIzLjkwNyAxMy4xNjI3IDIzLjc1NDEgMTEuMDkwNEMyMy42MDExIDkuMDE4MDggMjIuOTA0NSA3LjAyMDg4IDIxLjczMjggNS4yOTU1NUMyMC41NjEyIDMuNTcwMjIgMTguOTU0OSAyLjE3NjMgMTcuMDcyMyAxLjI1MTExQzE1LjE4OTYgMC4zMjU5MDkgMTMuMDk1NiAtMC4wOTg2NDExIDEwLjk5NjQgMC4wMTkyNzg3QzguODk3MjIgMC4xMzcxOTggNi44NjUzMyAwLjc5MzUyIDUuMTAwOTEgMS45MjM1OUMzLjMzNjQ5IDMuMDUzNjUgMS45MDA0MiA0LjYxODQ4IDAuOTM0MTU3IDYuNDYzOUwwLjg4ODQ0MSA2LjU1NzA3QzAuNTgyOTc2IDcuMTgwOSAwLjM3Njc0IDcuODQ3NTYgMC4yNzcwMTMgOC41MzM1NEMtMC4wMDg3MDEzMiAxMC41NjA4IDAuNDM0MTUzIDEyLjM2NTEgMS41OTEzIDEzLjc1NDJDMi44NTcwMSAxNS4yNzMzIDQuOTE3MDEgMTYuMTc2OCA3LjM4ODQ0IDE2LjI5NTRDMTAuMzk3IDE2LjQ0NTEgMTMuMzg4NCAxNS42MzQ3IDE1LjUxMTMgMTQuMTQzOUwxNC4yNjI3IDEzLjQwMTNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+PHBhdGggZD0iTTE2Ljc4IDE0Ljg3NUMxNS41ODI5IDE1LjkwMjggMTIuOCAxNy43NjYzIDguMTgyODYgMTguMDIwNEMzLjAxNDI5IDE4LjMwMjggMC44NjAwMDEgMTYuNjQyNSAwLjg0MDAwMSAxNi42MjU2TDAuNDIyODU2IDE3LjEzMzhMMC44NDI4NTYgMTYuNjM0MUwwIDE3LjYzMzZDMC4wOTE0Mjg2IDE3LjcwOTggMi4xNTcxNCAxOS4zNTg4IDcuMDA4NTcgMTkuMzU4OEM3LjQwNTcxIDE5LjM1ODggNy44MjI4NiAxOS4zNTg4IDguMjU3MTQgMTkuMzI0OUMxMy44MzcxIDE5LjAxNzEgMTYuOTAyOSAxNi42MTE1IDE3Ljk3MTQgMTUuNTgzN0wxNi43OCAxNC44NzVaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+PHBhdGggZD0iTTE5LjAxOTkgMTYuMjE5MUMxOC4zMTIgMTcuMTM4NiAxNy40NDA3IDE3LjkyMzIgMTYuNDQ4NSAxOC41MzQ0QzEyLjk1MTMgMjAuNzY0OSA4LjUwMjc1IDIxLjA1MjkgNS4zODg0NyAyMC44OTc2TDUuMzIyNzUgMjIuMTk5M0M1Ljg0NTYxIDIyLjIyNDcgNi4zNDg0NyAyMi4yMzYgNi44MzcwNCAyMi4yMzZDMTUuNjE5OSAyMi4yMzYgMTkuMTY4NSAxOC4yODMxIDIwLjE1OTkgMTYuODcxM0wxOS4wMTcgMTYuMjA3OCIgZmlsbD0iIzIwNDFFMCI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC42ODU2IDExLjI5MjNDMTkuMjY3OSAxMS4yOTIzIDE5LjczOTkgMTAuODI1OCAxOS43Mzk5IDEwLjI1MDRDMTkuNzM5OSA5LjY3NDk2IDE5LjI2NzkgOS4yMDg1IDE4LjY4NTYgOS4yMDg1QzE4LjEwMzQgOS4yMDg1IDE3LjYzMTMgOS42NzQ5NiAxNy42MzEzIDEwLjI1MDRDMTcuNjMxMyAxMC44MjU4IDE4LjEwMzQgMTEuMjkyMyAxOC42ODU2IDExLjI5MjNaIiBmaWxsPSIjMjA0MUUwIj48L3BhdGg+Cjwvc3ZnPgo=",vU=function(){var t=(0,Le.Z)(function*(e,n){const{selectedWalletId:s}=e.getState(),f=window.xfi.near;return"xdefi"===s&&(yield f.connect(n.networkId).catch(()=>null)),{wallet:f,network:n}});return function(n,s){return t.apply(this,arguments)}}(),bU=()=>Ga(()=>!!window.xfi?.near).catch(()=>!1),wU=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,logger:s,options:f}){const I=yield vU(n,f.network),j=()=>I.wallet.accounts?I.wallet.accounts:[],q=re=>{const se=j(),{contract:fe}=n.getState();if(!se.length||!fe)throw new Error("Wallet not signed in");return re.map(be=>({signerId:be.signerId||se[0].accountId,receiverId:be.receiverId||fe.contractId,actions:be.actions}))};return{signIn:()=>(0,Le.Z)(function*(){const re=j().map(se=>({accountId:se.accountId,publicKey:se.publicKey.toString()}));return re.length?re:(yield I.wallet.connect(I.network.networkId),j().map(se=>({accountId:se.accountId,publicKey:se.publicKey.toString()})))})(),signOut:()=>(0,Le.Z)(function*(){yield I.wallet.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return j().map(re=>({accountId:re.accountId,publicKey:re.publicKey.toString()}))})(),verifyOwner:({message:re})=>(0,Le.Z)(function*(){throw s.log("XDEFI:verifyOwner",{message:re}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:re=>(0,Le.Z)(function*(){s.log("signAndSendTransaction",re);const{contract:se}=n.getState();if(!j().length||!se)throw new Error("Wallet not signed in");return yield I.wallet.signAndSendTransaction(q([re])[0])})(),signAndSendTransactions:({transactions:re})=>(0,Le.Z)(function*(){return s.log("signAndSendTransactions",{transactions:re}),yield I.wallet.signAndSendTransactions(q(re))})()}});return function(n){return t.apply(this,arguments)}}();function z4({iconUrl:t=mU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=yield bU();return{id:"xdefi",type:"injected",metadata:{name:"XDEFI Wallet",description:"One wallet for all your Crypto",iconUrl:t,downloadUrl:"https://www.xdefi.io",deprecated:e,available:s},init:wU}})}var ts=d(32184);const SU=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:s,provider:f,logger:I}){const j={wallet:window.nearWalletApi},q=function(){var se=(0,Le.Z)(function*(){const fe=j.wallet.signer.account;return fe?[{accountId:fe.accountId,publicKey:fe.publicKey}]:[]});return function(){return se.apply(this,arguments)}}(),re=se=>{const{contract:fe}=s.getState();if(!fe)throw new Error("Wallet not signed in");const be=Mf(s.getState());if(!be)throw new Error("No active account");return se.map(_e=>({signerId:_e.signerId||be.accountId,receiverId:_e.receiverId||fe.contractId,actions:_e.actions}))};return{signIn:({contractId:se})=>(0,Le.Z)(function*(){const fe=yield q();return fe.length?fe:(yield j.wallet.login({contractId:se}),q())})(),signOut:()=>(0,Le.Z)(function*(){yield j.wallet.logout()})(),getAccounts:()=>(0,Le.Z)(function*(){return q()})(),verifyOwner:({message:se})=>(0,Le.Z)(function*(){I.log("MathWallet:verifyOwner",{message:se});const fe=Mf(s.getState());if(!fe)throw new Error("No active account");const be=fe.accountId,_e=yield j.wallet.signer.getPublicKey(be),Oe=yield f.block({finality:"final"}),Te={accountId:be,message:se,blockId:Oe.header.hash,publicKey:Buffer.from(_e.data).toString("base64"),keyType:_e.keyType};JSON.stringify(Te);throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:se,receiverId:fe,actions:be})=>(0,Le.Z)(function*(){I.log("signAndSendTransaction",{signerId:se,receiverId:fe,actions:be});const _e=yield(0,ts.signTransactions)(re([{signerId:se,receiverId:fe,actions:be}]),j.wallet.signer,n.network);return f.sendTransaction(_e[0])})(),signAndSendTransactions:({transactions:se})=>(0,Le.Z)(function*(){I.log("signAndSendTransactions",{transactions:se});const fe=yield(0,ts.signTransactions)(re(se),j.wallet.signer,n.network);I.log("signAndSendTransactions:signedTransactions",fe);const be=[];for(let _e=0;_e(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=yield!!window.nearWalletApi;return{id:"math-wallet",type:"injected",metadata:{name:"Math Wallet",description:"World's First Insured Crypto Wallet.",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/math-wallet/afbcbjpbpfadlkmhmclhkeeodmamcflc",deprecated:e,available:s},init:SU}}),MU="data:image/png;base64,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",IU=function(){var t=(0,Le.Z)(function*(e,n){const{selectedWalletId:s}=e.getState(),f=window.nightly.near;return"nightly"===s&&(yield f.connect(I=>{I?n.emit("accountsChanged",{accounts:[{accountId:I.accountId,publicKey:f.account.publicKey.toString()}]}):n.emit("signedOut",null)},!0).catch(()=>null)),{wallet:f}});return function(n,s){return t.apply(this,arguments)}}(),DU=()=>Ga(()=>!!window.nightly?.near).catch(()=>!1),CU=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:s,logger:f,provider:I,emitter:j}){const q=yield IU(s,j),re=()=>{const{accountId:be,publicKey:_e}=q.wallet.account;return be?[{accountId:be,publicKey:_e.toString()}]:[]},se=be=>{const _e=re(),{contract:Oe}=s.getState();if(!_e.length||!Oe)throw new Error("Wallet not signed in");return be.map(Te=>({signerId:Te.signerId||_e[0].accountId,receiverId:Te.receiverId||Oe.contractId,actions:Te.actions}))},fe={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(be=(0,Le.Z)(function*(_e){const Te=re().find(Be=>Be.accountId===_e);if(!Te)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Te.publicKey)}),function(Oe){return be.apply(this,arguments)}),signMessage:function(){var be=(0,Le.Z)(function*(_e,Oe){if(!re().find(Fe=>Fe.accountId===Oe))throw new Error("Failed to find account for signing");try{const Fe=lr.transactions.Transaction.decode(Buffer.from(_e));return{signature:(yield q.wallet.signTransaction(Fe)).signature.data,publicKey:Fe.publicKey}}catch(Fe){throw f.log("Failed to sign message"),f.error(Fe),Error("Invalid message. Only transactions can be signed")}});return function(Oe,Te){return be.apply(this,arguments)}}()};var be;return{signIn:()=>(0,Le.Z)(function*(){const be=re();return be.length?be:(yield q.wallet.connect(_e=>{_e?j.emit("accountsChanged",{accounts:[{accountId:_e.accountId,publicKey:q.wallet.account.publicKey.toString()}]}):j.emit("signedOut",null)}),re())})(),signOut:()=>(0,Le.Z)(function*(){yield q.wallet.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return re()})(),verifyOwner:({message:be})=>(0,Le.Z)(function*(){throw f.log("Nightly:verifyOwner",{message:be}),new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:be,nonce:_e,recipient:Oe,state:Te})=>(0,Le.Z)(function*(){return f.log("Nightly:signMessage",{message:be,nonce:_e,recipient:Oe,state:Te}),q.wallet.isConnected||(yield q.wallet.connect()),yield q.wallet.signMessage({message:be,nonce:_e,recipient:Oe,state:Te})})(),signAndSendTransaction:({signerId:be,receiverId:_e,actions:Oe})=>(0,Le.Z)(function*(){f.log("signAndSendTransaction",{signerId:be,receiverId:_e,actions:Oe});const{contract:Te}=s.getState();if(!re().length||!Te)throw new Error("Wallet not signed in");const[Fe]=yield(0,ts.signTransactions)(se([{signerId:be,receiverId:_e,actions:Oe}]),fe,n.network);return I.sendTransaction(Fe)})(),signAndSendTransactions:({transactions:be})=>(0,Le.Z)(function*(){f.log("signAndSendTransactions",{transactions:be});const _e=yield(0,ts.signTransactions)(se(be),fe,n.network),Oe=[];for(let Te=0;Te<_e.length;Te++)Oe.push(yield I.sendTransaction(_e[Te]));return Oe})(),importAccountsInSecureContext:be=>(0,Le.Z)(function*(){q.wallet.importWalletsNear(be.accounts)})()}});return function(n){return t.apply(this,arguments)}}();function H4({iconUrl:t=MU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=yield DU();return{id:"nightly",type:"injected",metadata:{name:"Nightly",description:"Multichain crypto wallet.",iconUrl:t,downloadUrl:"https://wallet.nightly.app/download",deprecated:e,available:s},init:CU}})}var p2=d(96831);const TU="data:image/png;base64,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",OU=function(){var t=(0,Le.Z)(function*(e,n){const s=new lr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),f=yield lr.connect({keyStore:s,...n,headers:{}});return{wallet:new p2.MeteorWallet({near:f,appKeyPrefix:"near_app"}),keyStore:s}});return function(n,s){return t.apply(this,arguments)}}(),xU=function(){var t=(0,Le.Z)(function*({options:e,logger:n,store:s,params:f}){const I=yield OU(f,e.network),j=function(){var q=(0,Le.Z)(function*(){const re=I.wallet.getAccountId(),se=I.wallet.account();if(!re||!se)return[];const fe=yield se.connection.signer.getPublicKey(se.accountId,e.network.networkId);return[{accountId:re,publicKey:fe?fe.toString():""}]});return function(){return q.apply(this,arguments)}}();return{signIn:({contractId:q,methodNames:re=[]})=>(0,Le.Z)(function*(){n.log("MeteorWallet:signIn",{contractId:q,methodNames:re}),re.length?yield I.wallet.requestSignIn({methods:re,type:p2.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:q}):yield I.wallet.requestSignIn({type:p2.EMeteorWalletSignInType.ALL_METHODS,contract_id:q});const se=yield j();return n.log("MeteorWallet:signIn",{contractId:q,methodNames:re,account:se[0]}),se})(),signOut:()=>(0,Le.Z)(function*(){I.wallet.isSignedIn()&&(yield I.wallet.signOut())})(),isSignedIn:()=>(0,Le.Z)(function*(){return!!I.wallet&&I.wallet.isSignedIn()})(),getAccounts:()=>(0,Le.Z)(function*(){return j()})(),verifyOwner:({message:q})=>(0,Le.Z)(function*(){n.log("MeteorWallet:verifyOwner",{message:q});const re=yield I.wallet.verifyOwner({message:q});if(re.success)return re.payload;throw new Error(`Couldn't verify owner: ${re.message}`)})(),signMessage:({message:q,nonce:re,recipient:se,state:fe})=>(0,Le.Z)(function*(){n.log("MeteorWallet:signMessage",{message:q,nonce:re,recipient:se,state:fe});const be=I.wallet.getAccountId(),_e=yield I.wallet.signMessage({message:q,nonce:re,recipient:se,accountId:be,state:fe});if(_e.success)return _e.payload;throw new Error(`Couldn't sign message owner: ${_e.message}`)})(),signAndSendTransaction:({signerId:q,receiverId:re,actions:se})=>(0,Le.Z)(function*(){n.log("MeteorWallet:signAndSendTransaction",{signerId:q,receiverId:re,actions:se});const{contract:fe}=s.getState();if(!I.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!re&&!fe)throw new Error("No receiver found to send the transaction to");return I.wallet.account().signAndSendTransaction_direct({receiverId:re??fe.contractId,actions:se})})(),signAndSendTransactions:({transactions:q})=>(0,Le.Z)(function*(){if(n.log("MeteorWallet:signAndSendTransactions",{transactions:q}),!I.wallet.isSignedIn())throw new Error("Wallet not signed in");return I.wallet.requestSignTransactions({transactions:q})})(),buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${I.wallet._networkId}`}});return function(n){return t.apply(this,arguments)}}();function W4({iconUrl:t=TU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:t,deprecated:e,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:n=>xU({...n,params:{iconUrl:t}})}})}const pp_SIGN_IN="sign-in",pp_IS_SIGNED_IN="is-signed-in",pp_GET_ACCOUNT_ID="get-account-id",pp_SIGN_AND_SEND_TRANSACTION="sign-and-send-transaction",pp_SIGN_AND_SEND_TRANSACTIONS="sign-and-send-transactions";let g2=0;const nb=[],gp=(t,e=!1,n)=>new Promise((f,I)=>{let j;g2++,e&&(j=setTimeout(()=>I(Error("timeout")),2e3)),nb.push({id_wallet_selector:g2,code:t,resolve:f,reject:I,timeout:j}),window.postMessage({id:g2,src:"ws",type:"nw",code:t,dest:"ext",params:n})}),NU=function(){var t=(0,Le.Z)(function*(){return Ga(()=>!!window.narwallets).catch(()=>!1)});return function(){return t.apply(this,arguments)}}(),G4=()=>gp(pp_IS_SIGNED_IN,!0),FU=()=>{window.addEventListener("message",t=>{if(t.source!==window)return;const{data:e}=t;if(e&&"page"===e.dest&&e.id&&"nw"===e.type){const n=(t=>nb.filter(e=>e.id_wallet_selector===t)[0])(e.id);n&&((t=>{const e=nb.indexOf(t);e>-1&&nb.splice(e,1)})(n),n.timeout&&clearTimeout(n.timeout),e.result?e.result.err?n.reject(e.result.err):n.resolve(e.result.data):n.reject("result is empty"))}})},UU=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,logger:s}){return{signIn:()=>(0,Le.Z)(function*(){let j;return j=(yield G4())?pp_GET_ACCOUNT_ID:pp_SIGN_IN,[{accountId:yield gp(j)}]})(),signOut:function(){var I=(0,Le.Z)(function*(){if(!(yield G4()))return;const j=yield gp("sign-out");if(!0===j)return;const q=j,re=new Error("string"==typeof q.error?q.error:q.error.type);if("User reject"===re.message)throw re;s.log("Failed to sign out"),s.error(re)});return function(){return I.apply(this,arguments)}}(),getAccounts:()=>(0,Le.Z)(function*(){return[{accountId:yield gp(pp_GET_ACCOUNT_ID,!1)}]})(),verifyOwner:({message:I})=>(0,Le.Z)(function*(){throw s.log("Narwallets:verifyOwner",{message:I}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:I,receiverId:j,actions:q})=>(0,Le.Z)(function*(){s.log("signAndSendTransaction",{signerId:I,receiverId:j,actions:q});const{contract:re,accounts:se}=n.getState();if(!se||0===se.length||!re)throw new Error("Wallet not signed in");return(t=>gp(pp_SIGN_AND_SEND_TRANSACTION,!1,t))({signerId:I,receiverId:j||re.contractId,actions:q})})(),signAndSendTransactions:({transactions:I})=>(0,Le.Z)(function*(){s.log("signAndSendTransactions",{transactions:I});const{contract:j,accounts:q}=n.getState();if(!q||0===q.length||!j)throw new Error("Wallet not signed in");return(t=>gp(pp_SIGN_AND_SEND_TRANSACTIONS,!1,t))(I)})()}});return function(n){return t.apply(this,arguments)}}(),Z4=({iconUrl:t="data:image/png;base64,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",deprecated:e=!1}={})=>(0,Le.Z)(function*(){if((0,va.isMobile)())return null;FU();const s=yield NU();return{id:"narwallets",type:"injected",metadata:{name:"Narwallets",description:null,iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/narwallets-v4/lkpeokpdkmcdaiadpmnnpimlgmdobkdj",deprecated:e,available:s},init:UU}}),KU="data:image/png;base64,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",y2="account",zU=()=>Ga(()=>!!window.dapp).catch(()=>!1);function m2(){return m2=(0,Le.Z)(function*(t){const e=yield t.getItem(y2);return window.dapp?{wallet:window.dapp,account:e||void 0}:{}}),m2.apply(this,arguments)}const HU=function(){var t=(0,Le.Z)(function*({options:e,store:n,emitter:s,logger:f,storage:I,provider:j}){const q=yield function VU(t){return m2.apply(this,arguments)}(I),re=function(){var Fe=(0,Le.Z)(function*(){if(q.wallet){const Ke=yield q.wallet.request("near",{method:"dapp:accounts"});return Ke.near?[Ke.near.address,Ke.near.pubKey]:[]}return[]});return function(){return Fe.apply(this,arguments)}}(),se=function(){var Fe=(0,Le.Z)(function*({accountId:Ke,publicKey:et}){if(f.log("validateAccessKey",{accountId:Ke,publicKey:et}),!q.wallet)throw new Error("Wallet is not installed");const Ye=yield q.wallet.request("near",{method:"query",params:{request_type:"view_access_key",finality:"final",account_id:Ke,public_key:et}});if(f.log("validateAccessKey:accessKey",{accessKey:Ye}),"FullAccess"!==Ye.permission)throw new Error("Public key requires 'FullAccess' permission");return Ye});return function(et){return Fe.apply(this,arguments)}}(),be=()=>q.account?[{accountId:q.account.accountId,publicKey:q.account.publicKey}]:[],_e=function(){var Fe=(0,Le.Z)(function*(){q.account&&(I.removeItem(y2),delete q.account),s.emit("signedOut",null)});return function(){return Fe.apply(this,arguments)}}(),Oe=()=>{q.wallet&&(q.wallet.on("dapp:accountsChanged",function(){var Fe=(0,Le.Z)(function*(Ke){f.log("onAccountChange",Ke),yield _e()});return function(Ke){return Fe.apply(this,arguments)}}()),q.wallet.on("dapp:chainChanged",function(){var Fe=(0,Le.Z)(function*(Ke){f.log("onNetworkChange",Ke);const et="near"===Ke.split(":")[1]?"mainnet":"testnet";e.network.networkId!==et&&(yield _e(),s.emit("networkChanged",{networkId:et}))});return function(Ke){return Fe.apply(this,arguments)}}()))},Te={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Fe=(0,Le.Z)(function*(Ke){const Ye=be().find(ut=>ut.accountId===Ke);if(!Ye)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Ye.publicKey)}),function(et){return Fe.apply(this,arguments)}),signMessage:function(){var Fe=(0,Le.Z)(function*(Ke,et){if(!q.wallet)throw new Error("Wallet is not installed");if(!be().find(Tt=>Tt.accountId===et))throw new Error("Failed to find account for signing");try{const Tt=lr.transactions.Transaction.decode(Buffer.from(Ke)),Vt=Buffer.from(Tt.encode()).toString("hex"),vn=yield q.wallet.request("near",{method:"dapp:signTransaction",params:["0x"+Vt]});return{signature:Buffer.from(vn[0].signature.substr(2),"hex"),publicKey:lr.utils.PublicKey.from(vn[0].publicKey)}}catch{const Vt=yield q.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Buffer.from(Ke).toString("hex")]});return{signature:Buffer.from(Vt[0].signature.substr(2),"hex"),publicKey:lr.utils.PublicKey.from(Vt[0].publicKey)}}});return function(et,Ye){return Fe.apply(this,arguments)}}()},Be=Fe=>{const Ke=be(),{contract:et}=n.getState();if(!Ke.length||!et)throw new Error("Wallet not signed in");return Fe.map(Ye=>({signerId:Ye.signerId||Ke[0].accountId,receiverId:Ye.receiverId||et.contractId,actions:Ye.actions}))};var Fe;return{signIn:()=>(0,Le.Z)(function*(){const Fe=be();if(Fe.length)return Fe;q.account&&(yield _e());const Ke=yield re();if(!(yield se({accountId:Ke[0],publicKey:Ke[1]})))throw _e(),new Error(`Public key (${Ke[1]}) is not registered with the account '${Ke[0]}'.`);return yield I.setItem(y2,{accountId:Ke[0],publicKey:Ke[1]}),q.account={accountId:Ke[0],publicKey:Ke[1]},Oe(),be()})(),getAccounts:()=>(0,Le.Z)(function*(){return be()})(),signOut:_e,verifyOwner:({message:Fe})=>(0,Le.Z)(function*(){if(f.log("verifyOwner",{message:Fe}),!q.wallet)throw new Error("Wallet is not installed");const Ke=q.account;if(!Ke)throw new Error("Wallet not signed in");const et=Ke.accountId,Ye=lr.utils.PublicKey.fromString(Ke.publicKey),ut=yield j.block({finality:"final"}),Tt={accountId:et,message:Fe,blockId:ut.header.hash,publicKey:Buffer.from(Ye.data).toString("base64"),keyType:Ye.keyType},Vt=JSON.stringify(Tt),vn=yield Te.signMessage(new Uint8Array(Buffer.from(Vt)),et);return{...Tt,signature:Buffer.from(vn.signature).toString("base64")}})(),signMessage:Fe=>(0,Le.Z)(function*(){if(!q.wallet)throw new Error("Wallet is not installed");const et=(yield re())[0];if(!et)throw new Error("Failed to find account for signing");const Ye=(t=>{const e=new XA({...t});return Buffer.from((0,_4.serialize)(S4,e))})(Fe),ut=yield q.wallet.request("near",{method:"dapp:signMessage",params:["0x"+Ye.toString("hex")]}),Tt={accountId:et,publicKey:ut[0].publicKey,signature:Buffer.from(ut[0].signature.substr(2),"hex").toString("base64")};return Fe.state?{...Tt,state:Fe.state}:Tt})(),signAndSendTransaction:({signerId:Fe,receiverId:Ke,actions:et})=>(0,Le.Z)(function*(){f.log("signAndSendTransaction",{signerId:Fe,receiverId:Ke,actions:et});const{contract:Ye}=n.getState();if(!be().length||!Ye)throw new Error("Wallet not signed in");const[Tt]=yield(0,ts.signTransactions)(Be([{signerId:Fe,receiverId:Ke,actions:et}]),Te,e.network);return j.sendTransaction(Tt)})(),signAndSendTransactions:({transactions:Fe})=>(0,Le.Z)(function*(){f.log("signAndSendTransactions",{transactions:Fe});const Ke=yield(0,ts.signTransactions)(Be(Fe),Te,e.network),et=[];for(let Ye=0;Ye(0,Le.Z)(function*(){if(!q.wallet)throw new Error("Wallet is not installed");const Ke=[];Fe.forEach(({privateKey:Ye})=>{"ed25519:"===Ye.slice(0,8)?Ke.push(Ye.slice(8)):Ke.push(Ye)});const et={privateKey:Ke,network:e.network.networkId};yield q.wallet.request("near",{method:"experimental:near:importPrivatekey",params:[et]})})()}});return function(n){return t.apply(this,arguments)}}();function J4({iconUrl:t=KU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=F4()(),s=QA(["chrome","edge-chromium","opera"]);if(n||!s)return null;const f=yield zU();return{id:"welldone-wallet",type:"injected",metadata:{name:"WELLDONE Wallet",description:"WELLDONE Wallet for Multichains",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/welldone-wallet/bmkakpenjmcpfhhjadflneinmhboecjf",deprecated:e,available:f},init:HU}})}var v2=d(84960);const WU=function(){var t=(0,Le.Z)(function*(e){const{store:n,logger:s,emitter:f,options:I,defaultProvider:j,defaultStrategy:q}=e,re=new v2.HereWallet({networkId:I.network.networkId,nodeUrl:I.network.nodeUrl,defaultProvider:j,defaultStrategy:q});function se(){return fe.apply(this,arguments)}function fe(){return(fe=(0,Le.Z)(function*(){s.log("HereWallet:getAccounts");const be=yield re.getAccounts(),_e=[];for(let Oe=0;Oe`https://my.herewallet.app/import?network=${I.network.networkId}`,account:be=>(0,Le.Z)(function*(){return s.log("HereWallet:account"),yield re.account(be)})(),switchAccount:be=>(0,Le.Z)(function*(){s.log("HereWallet:switchAccount"),yield re.switchAccount(be)})(),getAccountId:()=>(0,Le.Z)(function*(){return s.log("HereWallet:getAccountId"),yield re.getAccountId()})(),isSignedIn:()=>(0,Le.Z)(function*(){return s.log("HereWallet:isSignedIn"),yield re.isSignedIn()})(),signIn:be=>(0,Le.Z)(function*(){if(s.log("HereWallet:signIn"),!(yield v2.waitInjectedHereWallet)){const Oe=""!==be.contractId?be.contractId:void 0;yield re.signIn({...be,contractId:Oe})}return f.emit("signedIn",{contractId:be.contractId,methodNames:be.methodNames??[],accounts:yield se()}),yield se()})(),getHereBalance:()=>(0,Le.Z)(function*(){return s.log("HereWallet:getHereBalance"),yield re.getHereBalance()})(),getAvailableBalance:()=>(0,Le.Z)(function*(){return s.log("HereWallet:getAvailableBalance"),yield re.getAvailableBalance()})(),signOut:()=>(0,Le.Z)(function*(){s.log("HereWallet:signOut"),yield re.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return se()})(),signAndSendTransaction:be=>(0,Le.Z)(function*(){s.log("HereWallet:signAndSendTransaction",be);const{contract:_e}=n.getState();return yield re.signAndSendTransaction({receiverId:_e?.contractId,...be})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:be=>(0,Le.Z)(function*(){return s.log("HereWallet:signMessage",be),yield re.signMessage(be)})(),signAndSendTransactions:be=>(0,Le.Z)(function*(){return s.log("HereWallet:signAndSendTransactions",be),yield re.signAndSendTransactions(be)})()}});return function(n){return t.apply(this,arguments)}}(),GU="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function Y4({deprecated:t=!1,iconUrl:e=GU,defaultStrategy:n,defaultProvider:s}={}){return(0,Le.Z)(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",topLevelInjected:null!=(yield v2.waitInjectedHereWallet),iconUrl:e,deprecated:t,available:!0},init:I=>WU({...I,defaultStrategy:n,defaultProvider:s})}})}const $U=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:s,provider:f,logger:I}){const j={wallet:window.coin98},q=function(){var se=(0,Le.Z)(function*(){const fe=j.wallet.near.account;if(!fe)return[];const be=yield j.wallet.near.signer.getPublicKey(fe,n.network.networkId);return[{accountId:fe,publicKey:be?be.toString():void 0}]});return function(){return se.apply(this,arguments)}}(),re=se=>{const{contract:fe}=s.getState();if(!fe)throw new Error("Wallet not signed in");const be=Mf(s.getState());if(!be)throw new Error("No active account");return se.map(_e=>({signerId:_e.signerId||be.accountId,receiverId:_e.receiverId||fe.contractId,actions:_e.actions}))};return{signIn:({contractId:se})=>(0,Le.Z)(function*(){const fe=yield q();return fe.length?fe:(yield j.wallet.near.connect({prefix:"near_selector",contractId:se}),q())})(),signOut:()=>(0,Le.Z)(function*(){yield j.wallet.near.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return q()})(),verifyOwner:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:se,receiverId:fe,actions:be})=>(0,Le.Z)(function*(){I.log("signAndSendTransaction",{signerId:se,receiverId:fe,actions:be});const _e=yield(0,ts.signTransactions)(re([{signerId:se,receiverId:fe,actions:be}]),j.wallet.near.signer,n.network);return f.sendTransaction(_e[0])})(),signAndSendTransactions:({transactions:se})=>(0,Le.Z)(function*(){I.log("signAndSendTransactions",{transactions:se});const fe=yield(0,ts.signTransactions)(re(se),j.wallet.near.signer,n.network);I.log("signAndSendTransactions:signedTransactions",fe);const be=[];for(let _e=0;_e(0,Le.Z)(function*(){if((0,va.isMobile)())return null;const s=!!window.coin98;return{id:"coin98-wallet",type:"injected",metadata:{name:"Coin98 Wallet",description:"Using a Decentralized Wallet With Experiences of a Centralized One",iconUrl:t,downloadUrl:"https://chrome.google.com/webstore/detail/coin98-wallet/aeachknmefphepccionboohckonoeemg",deprecated:e,available:s},init:$U}}),QU="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAIddJREFUeNrs3et/HFd5B/DRLu/6otsCIQFCxoQ4vltyILGNE48olNBCLcWOkzgXrwq5mJul9g/Q+A9opbzo7VPIblpKgLbshpAWQpKdALmQOOxCAm0gyU5C7s5lIG1feXb6PHPxzq5W0mo1M+fMzO/5fB7rsrb0ePbsV+ccnTlnTMlAnP7Lj6n0RqPktyZl/R1/db+lIBCITMVYBrBaoDezAx46oTjO4jv+ugG4EAiAJQVWFXpTHvig4/CfjNUcoVXFU41AACyRWDFUlRWwCkfLh8vAU45ApDcKKa79wJBYcYxTNk7/xWTt9NykiqcdgQBYSUdpSKxCjytT9Efz9JymU5bw9CMQAEtMrI5V8AdDNU/JcJXRBBAIgCUrVuHgoWHl9KzWoBxHU0AgAJasWIUec9dvNU/P7ie89mOYiEAALGmxCn/Aw8M2oaWjWSAQAEtmrIIo0Yfzp4/vb1NOoXkgEAArAcxGwir8oUpZI7Qap49fpqKZIBAAS1aswp/U3GHily9boMT8FgIBsKTFKvxm1odrFk0GgQBYMmMVBPewuKfFcGloOggEwJIVq3CoiuM0Tn/p0hqliiaEQAAsWbEK/3aSf4vYtr90qU6J+S0EAmBJi5Ub/lYX8z5cZTQnBAJgyYxVECV6vGJ/cV+TUkOzQiAAljKEPCKwCj/ubmNDaDFeKpoXAgGwhjQscazCwcPDpv2FfTol5rcQCIAlLVbB1/W3sXEIro/iNh8EAmBJi1X4HR4a1gitBiW2sUEgcg2W3FiFQ6NPNe3Pf7RCiWEiApE7sNKDVfhTZYWXQXx+r47mh0DkBax0YhV8wp3fIrTa9rG9GpohApGXIWH6sAq/qyq8DOLYXk4VzRGByDRYqcYqHJo7TDy2d8E+tgfzWwhE9sDKDFbhvzNLj7XtW/ZgGxsEIptDwsxgFTzmbmNDaDUpNTRRBCJLYGULq3B4t/ncsqdGqaKpIhCZWtaQKazCMUX1tO2bd+uUmN9CACxgJS1W4Xq8bWxu3l1Gs0UArKyMDbOJVRDcw6oQWg37pt0ami8CYAErWbEK/3PGitGq2DddoqIZIwAWsJIVq/AHPDxsElo6mjICYAErmbEKDxPn7RsvaVNiGxsEwAJW0mIV/pCHhjVCq0GJbWwQAEtWs4BVT2jupoE3XlyxP3cxlkEgABawkharcM+zrPAyiM9djNt8EABLXsiAVegx7zafz13McGlo7giABaxkxSocqsLLID77EU4VzR4BsICVrFiFv5/mDhM/+5EFSsxvIQAWsJIWq3DM+nCV8RJApCnG0lr46S9f1nB7DMBqrVj1P96iP+eKt5008HKINuzDW7kXO+UNySNoP6Oedh5hex4bvZ564a5nWvkGy3E0YLUurMIf1X24TFATCVbu9kCK+4uPmLFKqD2Prb+eKrcxgsvK35AQPasosVL8nkDT/vMP6/bMhzG/BayixoqjTJ+qrOfaZmIOC1itG6sgSvR15124Zi4qg56RYx5YLVvPVOfT52u5BQtYRYZV+PqoCm9jM3NRg1KDP2uOKWC1Yj0HcgkWsIoFq/BnGauGXb6oQolh4tDDQWC1Snse+V7X1IIFrGLHKvwpHh62CS0dJK0WTglYrVaPM/LVzeQ6LGAVy/XhOZl5u7yL4NqFbWxWbZPAasV6cgsWsEr6+qj0bs0+uqtBiW1sgFWE9WQdLGAl8vpoCv828eiuBUrMbwGr2LFKN1jASpbrM0sPtO0bJrCNjQKs4sQqG0NCYCUD5t42NjdMMFwagAJWcWCVPbCAleiep6rwMogbJjhVYAWsosQqW2ABK5mGyRo91ravH9cpczq/Bayixio7YAErueb0uo3fO636+vEysAJWAAtYyYxVEN5p1dePNyk1YJV3rPK8cBRYyY5VOMbpoYZ93XjFvm6nmmWvgNUq9eRyHRawShNW4Xp4eNgktHTK/MxvASssawBWqcMqPEz0trG5dmcZWAGrHIAFrFKKVfgxHhpWCK0GZTZv8wFWWNYwnF/ASnKswqG5p1Vfu4Pw2lHKVpsEVlFGxpY1AKsUYhX+RNldv3Vkhw6sgFU2wQJWWcEqeNed3yK0GK6p9LZJYBVHZGRZA7DKCFbhUClr9pHtDfua7SqwyghWWNYArDKIVbgeTeHV8tdsX6AspbBhAqsl9eR9x1FglVWswjHrwzWb7iaad6zyPCQEVnnBKghvG5trtrftq7dpwCpfWGUALGCVI6zC10dVeBubq7fVKFVglQ+sUg4WsMopVuGPptxh4tXbdMqSvE0UWAEsYJV3rMIx767fumpbGVhlF6v0gwWsgFX36/IxZBX7qq0NSk1omwRWQ9aTJ7CAFbAaXA9jxWhV7MNbVakaKLDK8ak5wApYrVwPDw+bhJZOWUq8HQKryLHKGFjAClgt+ZS/jY1DcG2ZSqwdAqtV6snnwtEWsAJWQ9bDQ8OafeWWBmWy29gAq5XryRFYdwIrYLXGejR3mHjllgplCVilC6tUg1X8u4cMuggGsAJWI9RTVnj91pWbdWCVHqzS3sPi6zDdOzQEVsBq6HpK9Ni8fWhzm1IDViLbT07AKv79wxa9maQ0gBWwGrEeVeFlEIc2c6rASl6s0t/D8tGiZLS4t2UCK2A1Yj2aO0w8uHnBPrgpovktYBUlVpkAKwRXnXIDXZQT9KEFrIDViNfH28bm4KYysJILq0yBdQauf3hYpzcTlFVgBaxGvD7eadUHNzUpNWAlB1aZBMtD6xGTcubM/BawAlajXZ9xd37rik01ShVYRVXP6IKNRQmF/YV9/NPoqOJOZDqa4k2G82/xbi3+zYOmKMDsm3Zz955XPKvAClit4/rwdMNi8dtPWcu2temNuuLtHgGslq/HKHz/+UmhYNlf3LdA9cyuUPwiP+HFv33QEoPWJdzNn/XgAlbAauTrY7rt+NtPVQdg5fbI6K+XgNWK9RiFewSCNQRWQTBWc4RWVVxv6xKV6llQvM3fgBWwGrUewx051J6qE1Qlvz0tAKuh6hEHlj8MbKyx+JYH10OGMLhuvERzG5g7TwGsgFWy9eQYq3WBFcWk+9ERih+ndxv2sb01SlUEWMV//IlBOUE1zbg9P2AFrICVgHqSB0tdR/HentzH9uqUJTFwPVqlejbQu4vAClgBK3mxigisSIr39iy6ZU9ZCFpfedSinKN3Nyjh23yAFbACVtJgFVUPK6qLyUPDCqHVoNQEwWVS8th6kl5sJl6MwApYyYNV9GBFczEZK0aL8VIFwWUUv/oY97YG3+aDFyOwAlbrqEeGHUejv5g8PGzaN+/WFUFBaOn+MLGKFyOwAlYJtJ9EwIqv8bt7chNabcopQWhZlPybxAmqx0BjA1bASgxW0YCVTOPnoWGN0GpQjguCq1W87WTvNjZobMAKWCWGVfRzWPE3fo3+bdO+aXeFUswyiNtO1hVvNwhvfguNDVgBq0SwihisJBs/z285bfumS2YFoWVR6lSPv40NsMKLEVjFjVWEYCWKVfAB97AWCK22f5tN8nBVTpqU3W1sgBWwAlaxYRURWEKwCn/I81sNQotTFQPX4wYlozVD9VjAClgBq3heazEua0gEq975Lb7N58aLdcqSILhoeKgE67eAFbDC9Rn0JRyBG/jZn9/L+/9ogrHq/aTjb2PzlUeriqCwyxdRb8/xtrHJLla86wZfa5PyuWWer/MU/i1v9yBTYJVnrLw/jMK9LwjaXubY3kZvQxSOVf8LiuEyhMF1dBdfG38bm9Q2Nsu9lo7ygHt4LQFV/MaT5kjX4/DWktdeXMxVYJU7rGQES7rj4+v0/eaKX33MFAhXsNtpKSWNzXSvm6LcWbzjiWXBt6/aRj1J966E8/wtqPnfnSh+8xemfdVWPqy0ovRsloieVc6xkg0s6bAKvh/3Em5VeE/urz5mCUKLsZrv7s4qXWPj68LD6NsJqSUnattXbwt21lSoh1X1wfK3nnbm+3pktxJaut+r4vZR6dlTH1jlFSuZwJIWq/6ewwlCS9z81g0TqvcC7uuZimts3kEhdzwx8JoQVFzn8d6ekjtEnCt+80nDg2tr7//JOXOtZ4rf+oX3dw5v0d2vs4ZthIFV5rCSBaxUYNVz0ejxE8XbThoC4Zry57dUIY3NOwLtxEpDvlDPqnuAR289jBzB9QvLh2vK3zNfDX2vuvt3vvVL075yi+r/n6eAVS6xkgEsR0sZVuHHvRfcbSctgXDpVM9xb34rkcZmuv/nrz9RX1LLNds1Fybv+syEJ9cJLq8X5YR61N0hIM9bLfpDwAC4/aG/13L/zrd+6cF25RatC6AzvnyvC1hlDCvv1Jz7hIG1Z4VlDdJj1TvnwrfbiELr+vGS3/Mox9vYCI2v/1wfANW4//21vuvjncX3jSfPgG5ftW3qzG/5utePe2u3BsO/ka7Boc2a/zV3+kPLcWCVOay8HpYwsG7Zs8yyhtRgFf7yXs+jcrIuEK4QHJE2NsPtMX395+bA73vNdr/35Ax6Lr3r8o0n61203F4U42pQz6oVy7U4uNmf5Hf2+0PIErDKRD0E1osSgpUurHrndly4Hm8Jg+u68bIy6LTq0Rrbcr2qKRecO56wQsO+7rza0m9RL37zyWlh1+TgJr4mR2PAHFglW8/IYBVia13pxUrxAW7aMxct2OWLxNzm87VWlerpbmMzWmPjfzfZjxVBVaLkHzQ19//pweV9X68XFXzfcM+TP55RBEbx3/+7Sjnpn3JUBVYZqEeKHla6sep/zJtQrj6+KK63tVN1e1tO3/zWyo2Ne4fT/UNAf1K91jO8cpzukLF/kt1RpqhXtahIGPYVF3rXJZj3A1ZpqUeiIWG2sAp/wnRf0NWfGsJeoNfu1JT+06oHl2/4WFkDhoEVJTyxv/T6LJlklz1cuJz+dW3ASuJ6JBkSZhcrxZ/TadhHd9UoVSFDon/5mUE54Q/NrGXKrxJUk4Owcr/GHU8E+3e1lrk+B5bMX0kexW8/ZRZrTwXbV1vAKm31iAAr21iF3/VOqz66S/dutRECV1XhbWyc0DxTF6uZAfNVFf+3gAFaPNHO8M0pvceYnaCe1QRlS0lhEFp1epJ4fqsOrLKHVXRDwsG/Cs8iVv3BP83nirc3q8KGQ0d2qP4wUSGspvux4l6h0t0pwhvu9f5WMFj/dTtBZSgZCXtq42xwXYCVdPUYhftFzWHdvHuFZQ2ZxkrpuxdvrvhPTWle8AOwCq6PqfStqcpqEFrj/jUoASup6hkZrBiXNeQGK8VHoWHfMFHxb2yWISoDsFKU4Mi0q7c1/N5VZqNY/xX/IJnwfqAAKynrkQKsfGEVjrLC65qun9D9W21E9q7MVa6PmabfBK4DLboODq/dagGrdGMVD1j5xSp4uOTvDUVwuavVk3+R3vGERTnn9y6MAdenSljNKDmJYv3X7gJaf+gOrFKK1ZLnbqSf5uE5LGA16B8b7pzRP7fE3eZz9TYeGgar2Vt5mL8aeB0OXFAaC8/rAStR9RiFxkuCJ92B1WpPbtWF62stS0EIiw6hxb1f73g4YCWonpHBimZICKyGeXLL7mnV1+3UwYa4KNxJw0OHF5g6FrCSpZ4kwQJWa3ly+af7PKHFcGngQxBa3/m1uwwFWKULq+h6WMBqrfXwvW8N+9qdnCoIEYHW0zxEXwRW6cEqQrCA1Yj1cC+rbV+7Y4GyBEYSD175bwKrdGAVEVjAKoJ6Zl24juyYhSGJ9rJ4HmsGWKUDq4iHhMBqnfW49/QRWk1KDZwkhpbhDQ2BVXL1yLDSHVhFVY93m8+RHTX7SHeHBUSc4fTu6gqsxNSTGFjAKo56+Hy/tn3Ndt2/1QYRVy/rrmeCU8GBlcRYRQMWsIq7Hr7Nh+Eqg5ZY0dIVnoAHVtJiFe2QEFjFWQ/3sHgTvoa/JzsilpFhqJcFrKTDKgawgFXMTy4fcsrbwlT8U5gR0UZVOTOXBaxkwypisIBV7E9u9/rw8LBJaOlZ39Mq0WHhd925rCqwkhOrCMECVgliFR4metvYuEfHIyJqy7cCKzmxiggsYCUAq/A/56Fhzb5qa4NyHOCst5f1rKm4JwoBq9jqEX5qDrAShVX4Hc3rbW2tUGKYuL72fDuwirMekQtHgZUMWIWj7K7fOrwVt/mMHnVglXA9ifawgJUsWAWf8m7zObyV4NqiwZ81vijudoeFJrCSC6v4wAJWIrEKf0JV+Dafw1sa9pVbVFC0pjCAlVxYxQMWsJIFq/C73MtqE1oLlJjfGi4eAFZyYRU9WMBKRqzCMevDVYZHqzbmFrCSC6towQJWsmMVBB9DVrEPbW5SaoBpmRfG3e0WsIq7HlFgAau0YBWux9vG5tDmGqUKogaGAazkwSoasIBVGrEKx5Q7TDy0WbcPbsb8Vm9YwEoerKIdEgKrNGIVfnie/mjaBzeV4dSZ+BmwiqMeGXYcBVZpxir4g4eGFUKrQanBK2AVez1SgAWs0n59GCtGq2JfsUkFVmjPMmAVD1jAKkvXh4eHTfuKC/WcYmUAK3mwih4sYJXF6+OdVn3FhW3KnG1jg/acTD0iwAJWWb8+PDSs2dMXNijzvY0NsBKCVXRgAas8XR/NHSZOX7hgT2/M+jKIEtqzPFhFAxawyuv18W7zmd6Y5W1sxtGe5cEq2iEhsMoj5iV6d8Ge2tim1DAMBFZxYhUfWMAqbz1PVeFlEFMbOdUMMfX7aM9x1CPTwlFgledhMvWynLZ94AKdMgvzW+PAKqZ6pAALWGFOz3vMO636wAXllA8DVWCVZD1JggWsgFXvY6UxRal0DlzQpNRSSpYKrOTBKjqwgBWw6ntsrHdY1ej82YdqlKmZ3+pcrmrASi6sogELWAGr5bEK18Or5JuElk6ZgvktRwNWcmEV4ZAQWAGrFbE6M0z057cYLtnnt3YCK7mwiggsYAWshsKqd27IUSqdz3yo0fnM+bLe5jMFrOTCKsIeFrACViPVo7m9rc+cT3idL+cwEVhJg1X0YAErYDVaPTw8bHc+fb4uEVUmsIqrHhkWjgIrYLW+etz5LUKL4RK/jY2jnABWAl5fiYAFrIBVdPWo9Ila59MfbFCqorwqfP+5Kr2ZdntawEoKrKIBC1gBq3jq0ejddudPP7hAWRKEVp3qmaB3ubdlASuxWEU/hwWsgFX09bjb2BBas2LQet6i1KkehqsOrMRhFTFYwApYxVYP97Cop7Wh3fmTDZoQuO553qTkIeIkZQtYJY9VhGABK2CVSD08p9UgtGqUqiC4DErubc1QPRawSg6riMACVsAq8Xrc06oJLZ2yJAiuKr3Z4M9vAasEsIp2SAisgFXy12fenZj/lFoWgtYPfmNR6j5cBrAash7h67CAFbASd324h1UhtJqUmiC4TMpJb37LMdF+RqwnEbCAFbCS4/qMu/Nbn1IZL1UQXEbh3he4tzWnKH3zW8BKUaTbcRRYASvx16dMDzU7l6t65/LzxMxv3fvCoj9MXARW0WEVE1jAClgJvz4EleNtY3P5eVOC0LIo5/z1WwawUmQEC1gBK6muDw8Na4RWo/PJ84RsY1O474UWJc9v+bf5ACtJwAJWwEra66O5va1PnlehFDNMvO/FOqW3DGLJ+i1glTBYwApYpeL6lPkYss4nP6ArgoLQ0v35rWousVrfsYQRLRwFVsAqPdfH28bmjz/QptSEoHX/ixblDNUzqfSs38oBVsJ7WMAKWKXz+vD8VoPQ4lTFwPWSQTlJ9cz0zG9lHiuZTn4GVsAqXdeHe1nU2zp3ofOJc8XMbzVe4uFhsI0NsEocLGAFrNJ3fbxtbD5x7qwgtCxKf37LqQOrpMACVsAqvdfH28bmE+c2KTVBcJmFxst929gAq3jAAlbAKuXXxw/vNp+Pn1vrfPz9Yua3jJcNSm8bm+A2n5xjFS1YwApYZQOrcD3eNjYff79OWRIEV9UdJjp8m09GsHJEgwWsgFX2sAp/Zt6HqywILavwwMtzSngbmxxiFQ1YwApYZRur8PxWpfNH729QipnfeuAVk9LfxsZfBpEjrCLqYQErYJV5rMJfl7ByCK33EV7vUwXBZVDyMNHfxiYfWEU7hwWsgFX2sQq/w8PDJqGlK4Ki8MNXeF4rdJtPWrCSbeEosAJW+ThNpkSfmu987H1tSjHb2PzwVYuSf5PobWOTYaziAQtYAav8HX3FQ8Na52PvbVCOC4KrRdm3jU22sIoeLGAFrPJ9Tp/mDhMn31uhFLMM4kev1imD03wsKbFyZAALWAErHCoavMvzW21CS8htPj5cujtMdPrmt1KMVXRgAStgBaz6H/Nu85l8L8F1jiYGrdfMwo9f4/mt7jY2KcYqGrCAFbACVivVo9JjjY52DqcqBK4fv2ZQMlq8B5eVVqwiHBICK2AFrFapR3OHido5C5QlQXBVqZ7Bp1WnAKuIwAJWwApYraEebxub/eeUhaD14CmLkue3GK56mrCKsIcFrIAV6llDPXwMWaWz/+wmpSYILpPS28bG4W1sksRKloWjwApYoZ611ONtY7P/7BqlKgguo/DQKV50usJp1QmPpBIBC1gBK9Qzaj3eNjaXna1Tipnfeuj1ZU6rlger6MACVsAK9URRzzy90+xc9p6yILQsyr5tbOTBKhqwgBWwQj1R1sNDwwqh1aDUBMFlFh5+fdI/hsyUBavo57CAFbBCPVHVo7nrty59T4VSzDDx4TcMyu5tPoKxihgsYAWsUE8M9ZTd+a1Lz9IVQUFo6f76rapIrCIEC1gBK9QTYz3eadWXntXu7DtLzDY2j7xhUfrb2DjGOq/PAwLBAlbACvUkVA/Pb9UIrQbluCC4WoVH3vRu83EGnVY91OvdED8kBFbD1MNP8KKfJrBCPSPWoym8jc2+sxY6+94tZn7rkTerSve0amstWBUefWtksMbWW7h97Y4GFagBq1XrmSvWf7XYc+2mNur0/z+ueHf2AyvUM0o9jMWJwoOnFkXNcXUu+UPu+fGSjPIq14cPhp0sPPaWJa6HhZ7VMPUs9mPFQZ/TFaU7mQmsUM8I9Xjb2Hz03W1KTUhv6ydvmpQ8RJxcYbhXXS9W0fSwjlAPS+nvYQGrvnc3EE7mij+lDlzAcxILivfrbLwYUc+o9fC+7jOFh06ZwnpcF//BuG9CyZ/64GFgJPXEABaw6n+XsBr6OhNc1K12+OBOFS9G1LOOenhuaZFXrysZiugXjgKr9d3ceeevues8YDITL0bUs6Z6vNOq976rDLCAVSxYnXlSvvO0Ran7cFXxYkQ9I9bjnVa9511NSg1gASsl1s3KvvO0SRlMZrbwYkQ9a67H+7S3jc2edxJe71RzDhawWrWe9T5Jdz1tUHJva6ZnmAgcUM/adgrl4SH1tt45nl+wgFVyN37e9QwPD72bUYED6hltW+OS29vanU60CrF+dWAV/RN21zMWpa707MkNHFDPUFgFn3LXbgEsYBUrVj1P3HefMSm9PbmD23yAA+oZfqdQLY29rAKwSh9WfXAZhe8+u4G+59I9uYEDsFq5nimABax6YiypJ/LuZ3v35AYOwGrYenILFrASglUILYvS35PbMYADsMoSVtGCBayEYtUHl1m4u81zWzzHZQIHYLW2erIOFrBaHiuBjaLwH+06ZXdPbuAArFLeySoAq7ixEt8yCC1dObONDZ4vYJXaEWGcyxqAlUwtg9CyKHml/OA9i4ADsMotWMBK2pZR+E/ToPT25F6yfgs4AKu8gQWsUtEyCC0aHioTVKo/vwUcgFXewAJWqWoZhJZV+J6pK942NnXgkDes0qdYDKfmAKvUNYLvmWbhe88Ft/m0gFVOsMrvsgZglYU+N6FlUPZtYwOsgFWWwAJWQ9aTokbx/eeqSrCNDbACVtkbEgKrrGAVQsui1F24nOWObgJWwCp1YAGrNdeTKrieNwv3PM9zW91tbIAVsEp3DwtYZRGrnoZyz/MGJQ8T5+j/ZQErYJV+sIBVJrHqg2uR/mt929gAK2CVNrCAVeaxOtNofvAbi5K3seHfKBrAClilCyxglRus+uBqUXrb2Dg8vwWsUoMVP+bkceEosFpjPZmEq1649ze929gAK7mxwo6jwCqPWPU0pntf0JXwadXACljJCxawyjNWIbRMSm8bmzPrt4AVsJIKLGAFrJbAZRTue2GSLkZ3GxtgBazEgwWshq4nj3Dd92LVHyaeAFbASp4hIbACVsujZVHq/vqtOrACVmLBAlbAapjGdv+LJqW/jY3TAlayDJPzBBawysVOjxHDZRTuf8nbxsYZdFo1sAJWcQ8JgRWwWjNcL1UVZdBtPsBKWGcgf2ABK2C1hgbYeMmi9E+r5mUQwApYJQYWsBrwmAWWhoLLpOS1W33b2AArYBUtWCawWrEeAxytoUEaLxuUS2/zAVa5xyoqsG4HVivWcysYGgkuXQlOqwZWwCoqsIr/+kvDP9sOWC2NauHuZ9HDGh0ti3KGLu7Esj1VYKXk6Y6MSOawiv/2X/zTcFoZeAtGLrHi6zBDWM2AnQga6QOvtCgnl7QxYKXk7faxsai/oH1oc4nejK/rCXZW+QdDPsFjUTW4leoZgBVBZYKZeKKz/2xuX7N03Y/T2xKwWhdWJwqP/1bPNVgIRCJwXXa2Sm/m6dVXBlYj96xSB1YBTR+RymHiD18xKb1tbIL5LWCV+dvHABYi5XC9alDy+q3QadXAKotYASxEduD60atV5cxp1cAqi1gBLETW0LIodR+uOrBSMnf7GMBCZBCu10xKfxsbpQWssoEVwEJkG64fv2ZQ8qJTvrnaAlapHxECLEQu4FqkV+kGeqEuAquUP5dozoh8oHXKKjx4KrSNDbACWAiE7A3+wVMmZfc2H2AFsBCIFMBVp6TelrPKadVZxgoLRxGIdL0AHnpdV4JtbPKGFZY1IBCpRMui5JXyE93TqoEVwEIg5IarVXj4dZ7f4j24TGAFsBAI+V8UD79eVbqnVVvACmAhEJKj9YZFqfvDxGoWsUrj3lIAC4FYGS6z8MgbwTY2LWAFsBAI+V8oj7xhUHqnVfMwEVgBLARCfrje5FN8gmPIgBXAQiAkf9H85E2LUleCbWzSiBU/5mDhKAKRJ7hMyml65fOOp2aqsMKOowhEXuF6yyg8+hb3tvxtbIAVwEIgZH8xPfrWoj9MXARWAAuBSANaFuUcuTBBOBjACmAhEPK/sB57q1V4zFp6WjWwAlgIhLxwWXXKYBmEBawAFgKRBrh0f/1WVQqsHAXbyyAQiBVebCcti7L3tGpRWKGHhUAghoPrtwalt43NkvVbSWKFhaMIBGJ4uGh4GN7GBlgBLARC5hfg47+1KHUChOGqAyuAhUCkAK7fmZTTZMmA06qBFcBCIGR8Qf70dwZldxsbYAWwEIgUwFVV3Nt8nMXYsMKyBgQCESFaVuGnb/ecVp1nrAAWApGGF2nzbZNycsxbv2XmFSuAhUCkKMaabxuUGwgc6nU5Vt6wAlgIRBrhar0dbGNTXR9WWDiKQCASQet/LErvtGqe38oBVgALgUg/XC3K0DY2a8LKTN3/F085ApGdcHb+nk5vjlOWVsNq7Of/twE9LAQCIa4H8rP/1f1hYnUFrHhfruk0/v/+X4ABAA6s0eytIzCSAAAAAElFTkSuQmCC",XU=()=>Ga(()=>!!window.nearFiWallet?.isNearFi,{timeout:200}).catch(()=>!1),eK=function(){var t=(0,Le.Z)(function*({options:e,metadata:n,store:s,emitter:f,logger:I}){const j={wallet:window.nearFiWallet},q=function(){var Oe=(0,Le.Z)(function*(){if(!j.wallet.isSignedIn())return;const Te=yield j.wallet.signOut();if(!0===Te)return;const Be=new Error("string"==typeof Te.error?Te.error:Te.error.type);if("User reject"===Be.message)throw Be;I.log("Failed to sign out"),I.error(Be)});return function(){return Oe.apply(this,arguments)}}(),re=()=>{j.wallet.on("accountChanged",function(){var Oe=(0,Le.Z)(function*(Te){I.log("onAccountChange",Te),f.emit("signedOut",null)});return function(Te){return Oe.apply(this,arguments)}}()),j.wallet.on("rpcChanged",function(){var Oe=(0,Le.Z)(function*(Te){I.log("onNetworkChange",Te),e.network.networkId!==Te.networkId&&(yield q(),f.emit("signedOut",null),f.emit("networkChanged",{networkId:Te.networkId}))});return function(Te){return Oe.apply(this,arguments)}}())},se=function(){var Oe=(0,Le.Z)(function*(){let Te=j.wallet.getAccountId();return Te||(yield j.wallet.resolveSignInState(),Te=j.wallet.getAccountId(),Te)?[{accountId:Te}]:[]});return function(){return Oe.apply(this,arguments)}}(),be=Oe=>{if(!(Oe=>Oe.every(Te=>"FunctionCall"===Te.type))(Oe))throw new Error(`Only 'FunctionCall' actions types are supported by ${n.name}`);return Oe.map(Be=>Be.params)},_e=Oe=>Oe.map(Te=>({receiverId:Te.receiverId,actions:be(Te.actions)}));return j.wallet&&j.wallet.isSignedIn()&&re(),{signIn:({contractId:Oe,methodNames:Te})=>(0,Le.Z)(function*(){const Be=yield se();if(Be.length)return Be;const{accessKey:Fe,error:Ke}=yield j.wallet.requestSignIn({contractId:Oe,methodNames:Te});if(!Fe||Ke)throw yield q(),new Error(("string"==typeof Ke?Ke:Ke.type)||"Failed to sign in");return re(),yield se()})(),signOut:q,getAccounts:()=>(0,Le.Z)(function*(){return yield se()})(),verifyOwner:({message:Oe})=>(0,Le.Z)(function*(){throw I.log("NearFi:verifyOwner",{message:Oe}),new Error(`Method not supported by ${n.name}`)})(),signAndSendTransaction:({signerId:Oe,receiverId:Te,actions:Be})=>(0,Le.Z)(function*(){I.log("signAndSendTransaction",{signerId:Oe,receiverId:Te,actions:Be});const{contract:Fe}=s.getState();if(!j.wallet.isSignedIn()||!Fe)throw new Error("Wallet not signed in");return j.wallet.signAndSendTransaction({receiverId:Te||Fe.contractId,actions:be(Be)}).then(Ke=>{if(Ke.error)throw new Error(Ke.error);if(!Ke.response?.length)throw new Error("Invalid response");return Ke.response[0]})})(),signAndSendTransactions:({transactions:Oe})=>(0,Le.Z)(function*(){if(I.log("signAndSendTransactions",{transactions:Oe}),!j.wallet.isSignedIn())throw new Error("Wallet not signed in");return j.wallet.requestSignTransactions({transactions:_e(Oe)}).then(Te=>{if(Te.error)throw new Error(Te.error);if(!Te.response?.length)throw new Error("Invalid response");return Te.response})})()}});return function(n){return t.apply(this,arguments)}}();function Q4({iconUrl:t=QU,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=(0,va.isMobile)(),s=yield XU();return n&&s?{id:"nearfi",type:"injected",metadata:{name:"NearFi",description:"Your NEAR DeFi experience On The Go",iconUrl:t,downloadUrl:"https://nearfi.finance",deprecated:e,available:s},init:eK}:null})}var b2=d(72487);const w2=new b2.NearSnap,tK=function(){var t=(0,Le.Z)(function*(e){const{store:n,logger:s,options:f}=e,I=f.network.networkId;let j=yield b2.NearSnapAccount.restore({network:I,snap:w2});return{isSignedIn:()=>(0,Le.Z)(function*(){return s.log("NearSnap:isSignedIn"),null!=j})(),signIn:({contractId:q,methodNames:re})=>(0,Le.Z)(function*(){return s.log("NearSnap:signIn"),j=yield b2.NearSnapAccount.connect({contractId:""===q?void 0:q,methods:re,network:I,snap:w2}),[{accountId:j.accountId}]})(),signOut:()=>(0,Le.Z)(function*(){s.log("NearSnap:signOut"),yield j?.disconnect()})(),getAccounts:()=>(0,Le.Z)(function*(){return j?[{accountId:j.accountId}]:[]})(),signAndSendTransaction:q=>(0,Le.Z)(function*(){if(s.log("NearSnap:signAndSendTransaction",q),null==j)throw new Error("Wallet not signed in");const{contract:re}=n.getState(),se=q.receiverId??re?.contractId;if(null==se)throw new Error("ReceiverId is not defined");return yield j.executeTransaction({receiverId:se,...q})})(),signMessage:({message:q,nonce:re,recipient:se})=>(0,Le.Z)(function*(){if(null==j)throw new Error("Wallet not signed in");return yield j.signMessage({message:q,nonce:re,recipient:se})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("NearSnap:verifyOwner is not released yet")})(),signAndSendTransactions:({transactions:q})=>(0,Le.Z)(function*(){if(s.log("NearSnap:signAndSendTransactions",{transactions:q}),null==j)throw new Error("Wallet not signed in");return yield j.executeTransactions(q)})()}});return function(n){return t.apply(this,arguments)}}(),nK="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIGlkPSJMYXllcl8xIiB4PSIwIiB5PSIwIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAzMTguNiAzMTguNiI+CiAgPHN0eWxlPgogICAgLnN0MSwuc3Q2e2ZpbGw6I2U0NzYxYjtzdHJva2U6I2U0NzYxYjtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmR9LnN0NntmaWxsOiNmNjg1MWI7c3Ryb2tlOiNmNjg1MWJ9CiAgPC9zdHlsZT4KICA8cGF0aCBmaWxsPSIjZTI3NjFiIiBzdHJva2U9IiNlMjc2MWIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTI3NC4xIDM1LjUtOTkuNSA3My45TDE5MyA2NS44eiIvPgogIDxwYXRoIGQ9Im00NC40IDM1LjUgOTguNyA3NC42LTE3LjUtNDQuM3ptMTkzLjkgMTcxLjMtMjYuNSA0MC42IDU2LjcgMTUuNiAxNi4zLTU1LjN6bS0yMDQuNC45TDUwLjEgMjYzbDU2LjctMTUuNi0yNi41LTQwLjZ6IiBjbGFzcz0ic3QxIi8+CiAgPHBhdGggZD0ibTEwMy42IDEzOC4yLTE1LjggMjMuOSA1Ni4zIDIuNS0yLTYwLjV6bTExMS4zIDAtMzktMzQuOC0xLjMgNjEuMiA1Ni4yLTIuNXpNMTA2LjggMjQ3LjRsMzMuOC0xNi41LTI5LjItMjIuOHptNzEuMS0xNi41IDMzLjkgMTYuNS00LjctMzkuM3oiIGNsYXNzPSJzdDEiLz4KICA8cGF0aCBmaWxsPSIjZDdjMWIzIiBzdHJva2U9IiNkN2MxYjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTIxMS44IDI0Ny40LTMzLjktMTYuNSAyLjcgMjIuMS0uMyA5LjN6bS0xMDUgMCAzMS41IDE0LjktLjItOS4zIDIuNS0yMi4xeiIvPgogIDxwYXRoIGZpbGw9IiMyMzM0NDciIHN0cm9rZT0iIzIzMzQ0NyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJtMTM4LjggMTkzLjUtMjguMi04LjMgMTkuOS05LjF6bTQwLjkgMCA4LjMtMTcuNCAyMCA5LjF6Ii8+CiAgPHBhdGggZmlsbD0iI2NkNjExNiIgc3Ryb2tlPSIjY2Q2MTE2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xMDYuOCAyNDcuNCA0LjgtNDAuNi0zMS4zLjl6TTIwNyAyMDYuOGw0LjggNDAuNiAyNi41LTM5Ljd6bTIzLjgtNDQuNy01Ni4yIDIuNSA1LjIgMjguOSA4LjMtMTcuNCAyMCA5LjF6bS0xMjAuMiAyMy4xIDIwLTkuMSA4LjIgMTcuNCA1LjMtMjguOS01Ni4zLTIuNXoiLz4KICA8cGF0aCBmaWxsPSIjZTQ3NTFmIiBzdHJva2U9IiNlNDc1MWYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTg3LjggMTYyLjEgMjMuNiA0Ni0uOC0yMi45em0xMjAuMyAyMy4xLTEgMjIuOSAyMy43LTQ2em0tNjQtMjAuNi01LjMgMjguOSA2LjYgMzQuMSAxLjUtNDQuOXptMzAuNSAwLTIuNyAxOCAxLjIgNDUgNi43LTM0LjF6Ii8+CiAgPHBhdGggZD0ibTE3OS44IDE5My41LTYuNyAzNC4xIDQuOCAzLjMgMjkuMi0yMi44IDEtMjIuOXptLTY5LjItOC4zLjggMjIuOSAyOS4yIDIyLjggNC44LTMuMy02LjYtMzQuMXoiIGNsYXNzPSJzdDYiLz4KICA8cGF0aCBmaWxsPSIjYzBhZDllIiBzdHJva2U9IiNjMGFkOWUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0ibTE4MC4zIDI2Mi4zLjMtOS4zLTIuNS0yLjJoLTM3LjdsLTIuMyAyLjIuMiA5LjMtMzEuNS0xNC45IDExIDkgMjIuMyAxNS41aDM4LjNsMjIuNC0xNS41IDExLTl6Ii8+CiAgPHBhdGggZmlsbD0iIzE2MTYxNiIgc3Ryb2tlPSIjMTYxNjE2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xNzcuOSAyMzAuOS00LjgtMy4zaC0yNy43bC00LjggMy4zLTIuNSAyMi4xIDIuMy0yLjJoMzcuN2wyLjUgMi4yeiIvPgogIDxwYXRoIGZpbGw9IiM3NjNkMTYiIHN0cm9rZT0iIzc2M2QxNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJtMjc4LjMgMTE0LjIgOC41LTQwLjgtMTIuNy0zNy45LTk2LjIgNzEuNCAzNyAzMS4zIDUyLjMgMTUuMyAxMS42LTEzLjUtNS0zLjYgOC03LjMtNi4yLTQuOCA4LTYuMXpNMzEuOCA3My40bDguNSA0MC44LTUuNCA0IDggNi4xLTYuMSA0LjggOCA3LjMtNSAzLjYgMTEuNSAxMy41IDUyLjMtMTUuMyAzNy0zMS4zLTk2LjItNzEuNHoiLz4KICA8cGF0aCBkPSJtMjY3LjIgMTUzLjUtNTIuMy0xNS4zIDE1LjkgMjMuOS0yMy43IDQ2IDMxLjItLjRoNDYuNXptLTE2My42LTE1LjMtNTIuMyAxNS4zLTE3LjQgNTQuMmg0Ni40bDMxLjEuNC0yMy42LTQ2em03MSAyNi40IDMuMy01Ny43IDE1LjItNDEuMWgtNjcuNWwxNSA0MS4xIDMuNSA1Ny43IDEuMiAxOC4yLjEgNDQuOGgyNy43bC4yLTQ0Ljh6IiBjbGFzcz0ic3Q2Ii8+Cjwvc3ZnPg==";function rK({deprecated:t=!1,iconUrl:e=nK}={}){return(0,Le.Z)(function*(){return(0,va.isMobile)()?null:{id:"near-snap",type:"injected",init:tK,metadata:{name:"Near Snap",description:"Metamask Snap for NEAR Protocol",downloadUrl:"https://near-snap.surge.sh",available:yield w2.provider.isSnapsAvailable(),deprecated:t,iconUrl:e}}})}var iK=d(35469),E2=d.n(iK);const oK="data:image/png;base64,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";let X4=!1,q4=!1;const rb={debug:1,default:2,info:2,warning:3,error:4,off:5};let eI=rb.default,A2=null;const tI=function aK(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test"!=="test".normalize(e))throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();var _2,Cu;!function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"}(_2||(_2={})),function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"}(Cu||(Cu={}));const nI="0123456789abcdef";class zt{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,n){const s=e.toLowerCase();null==rb[s]&&this.throwArgumentError("invalid log level name","logLevel",e),!(eI>rb[s])&&console.log.apply(console,n)}debug(...e){this._log(zt.levels.DEBUG,e)}info(...e){this._log(zt.levels.INFO,e)}warn(...e){this._log(zt.levels.WARNING,e)}makeError(e,n,s){if(q4)return this.makeError("censored error",n,{});n||(n=zt.errors.UNKNOWN_ERROR),s||(s={});const f=[];Object.keys(s).forEach(re=>{const se=s[re];try{if(se instanceof Uint8Array){let fe="";for(let be=0;be>4],fe+=nI[15&se[be]];f.push(re+"=Uint8Array(0x"+fe+")")}else f.push(re+"="+JSON.stringify(se))}catch{f.push(re+"="+JSON.stringify(s[re].toString()))}}),f.push(`code=${n}`),f.push(`version=${this.version}`);const I=e;let j="";switch(n){case Cu.NUMERIC_FAULT:{j="NUMERIC_FAULT";const re=e;switch(re){case"overflow":case"underflow":case"division-by-zero":j+="-"+re;break;case"negative-power":case"negative-width":j+="-unsupported";break;case"unbound-bitwise-result":j+="-unbound-result"}break}case Cu.CALL_EXCEPTION:case Cu.INSUFFICIENT_FUNDS:case Cu.MISSING_NEW:case Cu.NONCE_EXPIRED:case Cu.REPLACEMENT_UNDERPRICED:case Cu.TRANSACTION_REPLACED:case Cu.UNPREDICTABLE_GAS_LIMIT:j=n}j&&(e+=" [ See: https://links.ethers.org/v5-errors-"+j+" ]"),f.length&&(e+=" ("+f.join(", ")+")");const q=new Error(e);return q.reason=I,q.code=n,Object.keys(s).forEach(function(re){q[re]=s[re]}),q}throwError(e,n,s){throw this.makeError(e,n,s)}throwArgumentError(e,n,s){return this.throwError(e,zt.errors.INVALID_ARGUMENT,{argument:n,value:s})}assert(e,n,s,f){e||this.throwError(n,s,f)}assertArgument(e,n,s,f){e||this.throwArgumentError(n,s,f)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),tI&&this.throwError("platform missing String.prototype.normalize",zt.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:tI})}checkSafeUint53(e,n){"number"==typeof e&&(null==n&&(n="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(n,zt.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,n,s){s=s?": "+s:"",en&&this.throwError("too many arguments"+s,zt.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:n})}checkNew(e,n){(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}checkAbstract(e,n){e===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",zt.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",zt.errors.MISSING_NEW,{name:n.name})}static globalLogger(){return A2||(A2=new zt("logger/5.7.0")),A2}static setCensorship(e,n){if(!e&&n&&this.globalLogger().throwError("cannot permanently disable censorship",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),X4){if(!e)return;this.globalLogger().throwError("error censorship permanent",zt.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}q4=!!e,X4=!!n}static setLogLevel(e){const n=rb[e.toLowerCase()];null!=n?eI=n:zt.globalLogger().warn("invalid log level - "+e)}static from(e){return new zt(e)}}zt.errors=Cu,zt.levels=_2;const Ui=new zt("bytes/5.7.0");function rI(t){return!!t.toHexString}function yp(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return yp(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function S2(t){return gi(t)&&!(t.length%2)||ib(t)}function iI(t){return"number"==typeof t&&t==t&&t%1==0}function ib(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"==typeof t||!iI(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function Sr(t,e){if(e||(e={}),"number"==typeof t){Ui.checkSafeUint53(t,"invalid arrayify value");const n=[];for(;t;)n.unshift(255&t),t=parseInt(String(t/256));return 0===n.length&&n.push(0),yp(new Uint8Array(n))}if(e.allowMissingPrefix&&"string"==typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),rI(t)&&(t=t.toHexString()),gi(t)){let n=t.substring(2);n.length%2&&("left"===e.hexPad?n="0"+n:"right"===e.hexPad?n+="0":Ui.throwArgumentError("hex data is odd-length","value",t));const s=[];for(let f=0;fSr(f)),n=e.reduce((f,I)=>f+I.length,0),s=new Uint8Array(n);return e.reduce((f,I)=>(s.set(I,f),f+I.length),0),yp(s)}function mp(t){let e=Sr(t);if(0===e.length)return e;let n=0;for(;n>4]+M2[15&f]}return n}return Ui.throwArgumentError("invalid hexlify value","value",t)}function rh(t){if("string"!=typeof t)t=pr(t);else if(!gi(t)||t.length%2)return null;return(t.length-2)/2}function Is(t,e,n){return"string"!=typeof t?t=pr(t):(!gi(t)||t.length%2)&&Ui.throwArgumentError("invalid hexData","value",t),e=2+2*e,null!=n?"0x"+t.substring(e,2+2*n):"0x"+t.substring(e)}function ba(t){let e="0x";return t.forEach(n=>{e+=pr(n).substring(2)}),e}function I2(t){const e=function lK(t){"string"!=typeof t&&(t=pr(t)),gi(t)||Ui.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&Ui.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function om(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(S2(t)){let n=Sr(t);64===n.length?(e.v=27+(n[32]>>7),n[32]&=127,e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64))):65===n.length?(e.r=pr(n.slice(0,32)),e.s=pr(n.slice(32,64)),e.v=n[64]):Ui.throwArgumentError("invalid signature string","signature",t),e.v<27&&(0===e.v||1===e.v?e.v+=27:Ui.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(n[32]|=128),e._vs=pr(n.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,null!=e._vs){const f=function cK(t,e){(t=Sr(t)).length>e&&Ui.throwArgumentError("value out of range","value",arguments[0]);const n=new Uint8Array(e);return n.set(t,e-t.length),yp(n)}(Sr(e._vs),32);e._vs=pr(f);const I=f[0]>=128?1:0;null==e.recoveryParam?e.recoveryParam=I:e.recoveryParam!==I&&Ui.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),f[0]&=127;const j=pr(f);null==e.s?e.s=j:e.s!==j&&Ui.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==e.recoveryParam)null==e.v?Ui.throwArgumentError("signature missing v and recoveryParam","signature",t):0===e.v||1===e.v?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(null==e.v)e.v=27+e.recoveryParam;else{const f=0===e.v||1===e.v?e.v:1-e.v%2;e.recoveryParam!==f&&Ui.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=e.r&&gi(e.r)?e.r=ro(e.r,32):Ui.throwArgumentError("signature missing or invalid r","signature",t),null!=e.s&&gi(e.s)?e.s=ro(e.s,32):Ui.throwArgumentError("signature missing or invalid s","signature",t);const n=Sr(e.s);n[0]>=128&&Ui.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(n[0]|=128);const s=pr(n);e._vs&&(gi(e._vs)||Ui.throwArgumentError("signature invalid _vs","signature",t),e._vs=ro(e._vs,32)),null==e._vs?e._vs=s:e._vs!==s&&Ui.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}var fK=d(54237),dK=d.n(fK);function No(t){return"0x"+dK().keccak_256(Sr(t))}const oI=new zt("strings/5.7.0");var sm,wa;function sI(t,e,n,s,f){if(t===wa.BAD_PREFIX||t===wa.UNEXPECTED_CONTINUE){let I=0;for(let j=e+1;j>6==2;j++)I++;return I}return t===wa.OVERRUN?n.length-e-1:0}!function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"}(sm||(sm={})),function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"}(wa||(wa={}));const yK=Object.freeze({error:function pK(t,e,n,s,f){return oI.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",n)},ignore:sI,replace:function gK(t,e,n,s,f){return t===wa.OVERLONG?(s.push(f),0):(s.push(65533),sI(t,e,n))}});function D2(t,e){null==e&&(e=yK.error),t=Sr(t);const n=[];let s=0;for(;s>7)){n.push(f);continue}let I=null,j=null;if(192==(224&f))I=1,j=127;else if(224==(240&f))I=2,j=2047;else{if(240!=(248&f)){s+=e(128==(192&f)?wa.UNEXPECTED_CONTINUE:wa.BAD_PREFIX,s-1,t,n);continue}I=3,j=65535}if(s-1+I>=t.length){s+=e(wa.OVERRUN,s-1,t,n);continue}let q=f&(1<<8-I-1)-1;for(let re=0;re1114111){s+=e(wa.OUT_OF_RANGE,s-1-I,t,n,q);continue}if(q>=55296&&q<=57343){s+=e(wa.UTF16_SURROGATE,s-1-I,t,n,q);continue}if(q<=j){s+=e(wa.OVERLONG,s-1-I,t,n,q);continue}n.push(q)}}return n}function dl(t,e=sm.current){e!=sm.current&&(oI.checkNormalize(),t=t.normalize(e));let n=[];for(let s=0;s>6|192),n.push(63&f|128);else if(55296==(64512&f)){s++;const I=t.charCodeAt(s);if(s>=t.length||56320!=(64512&I))throw new Error("invalid utf-8 string");const j=65536+((1023&f)<<10)+(1023&I);n.push(j>>18|240),n.push(j>>12&63|128),n.push(j>>6&63|128),n.push(63&j|128)}else n.push(f>>12|224),n.push(f>>6&63|128),n.push(63&f|128)}return Sr(n)}function ob(t,e){return function mK(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))).join("")}(D2(t,e))}function T2(t){return No(dl(t))}var wK=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const sb=new zt("properties/5.7.0");function Pr(t,e,n){Object.defineProperty(t,e,{enumerable:!0,value:n,writable:!1})}function am(t,e){for(let n=0;n<32;n++){if(t[e])return t[e];if(!t.prototype||"object"!=typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function Ro(t){return wK(this,void 0,void 0,function*(){const e=Object.keys(t).map(s=>{const f=t[s];return Promise.resolve(f).then(I=>({key:s,value:I}))});return(yield Promise.all(e)).reduce((s,f)=>(s[f.key]=f.value,s),{})})}function Zs(t){const e={};for(const n in t)e[n]=t[n];return e}const AK={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function aI(t){if(null==t||AK[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let n=0;nih(e)));if("object"==typeof t){const e={};for(const n in t){const s=t[n];void 0!==s&&Pr(e,n,ih(s))}return e}return sb.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function ih(t){return _K(t)}class SK{constructor(e){for(const n in e)this[n]=ih(e[n])}}const ab="providers/5.7.2";var Tu=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const Ja=new zt("abstract-signer/5.7.0"),IK=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],DK=[zt.errors.INSUFFICIENT_FUNDS,zt.errors.NONCE_EXPIRED,zt.errors.REPLACEMENT_UNDERPRICED];class O2{constructor(){Ja.checkAbstract(new.target,O2),Pr(this,"_isSigner",!0)}getBalance(e){return Tu(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Tu(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Tu(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const n=yield Ro(this.checkTransaction(e));return yield this.provider.estimateGas(n)})}call(e,n){return Tu(this,void 0,void 0,function*(){this._checkProvider("call");const s=yield Ro(this.checkTransaction(e));return yield this.provider.call(s,n)})}sendTransaction(e){return Tu(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const n=yield this.populateTransaction(e),s=yield this.signTransaction(n);return yield this.provider.sendTransaction(s)})}getChainId(){return Tu(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Tu(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Tu(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Tu(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const s in e)-1===IK.indexOf(s)&&Ja.throwArgumentError("invalid transaction key: "+s,"transaction",e);const n=Zs(e);return null==n.from?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(s=>(s[0].toLowerCase()!==s[1].toLowerCase()&&Ja.throwArgumentError("from address mismatch","transaction",e),s[0])),n}populateTransaction(e){return Tu(this,void 0,void 0,function*(){const n=yield Ro(this.checkTransaction(e));null!=n.to&&(n.to=Promise.resolve(n.to).then(f=>Tu(this,void 0,void 0,function*(){if(null==f)return null;const I=yield this.resolveName(f);return null==I&&Ja.throwArgumentError("provided ENS name resolves to null","tx.to",f),I})),n.to.catch(f=>{}));const s=null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas;if(null==n.gasPrice||2!==n.type&&!s?(0===n.type||1===n.type)&&s&&Ja.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):Ja.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==n.type&&null!=n.type||null==n.maxFeePerGas||null==n.maxPriorityFeePerGas)if(0===n.type||1===n.type)null==n.gasPrice&&(n.gasPrice=this.getGasPrice());else{const f=yield this.getFeeData();if(null==n.type)if(null!=f.maxFeePerGas&&null!=f.maxPriorityFeePerGas)if(n.type=2,null!=n.gasPrice){const I=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=I,n.maxPriorityFeePerGas=I}else null==n.maxFeePerGas&&(n.maxFeePerGas=f.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=f.maxPriorityFeePerGas);else null!=f.gasPrice?(s&&Ja.throwError("network does not support EIP-1559",zt.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==n.gasPrice&&(n.gasPrice=f.gasPrice),n.type=0):Ja.throwError("failed to get consistent fee data",zt.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===n.type&&(null==n.maxFeePerGas&&(n.maxFeePerGas=f.maxFeePerGas),null==n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=f.maxPriorityFeePerGas))}else n.type=2;return null==n.nonce&&(n.nonce=this.getTransactionCount("pending")),null==n.gasLimit&&(n.gasLimit=this.estimateGas(n).catch(f=>{if(DK.indexOf(f.code)>=0)throw f;return Ja.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:f,tx:n})})),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then(f=>(0!==f[1]&&f[0]!==f[1]&&Ja.throwArgumentError("chainId address mismatch","transaction",e),f[0])),yield Ro(n)})}_checkProvider(e){this.provider||Ja.throwError("missing provider",zt.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}var CK=d(98538),fr=d.n(CK);var um=fr().BN;const hl=new zt("bignumber/5.7.0"),x2={},cI=9007199254740991;let lI=!1;class jn{constructor(e,n){e!==x2&&hl.throwError("cannot call constructor directly; use BigNumber.from",zt.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return Js(Tr(this).fromTwos(e))}toTwos(e){return Js(Tr(this).toTwos(e))}abs(){return"-"===this._hex[0]?jn.from(this._hex.substring(1)):this}add(e){return Js(Tr(this).add(Tr(e)))}sub(e){return Js(Tr(this).sub(Tr(e)))}div(e){return jn.from(e).isZero()&&Ya("division-by-zero","div"),Js(Tr(this).div(Tr(e)))}mul(e){return Js(Tr(this).mul(Tr(e)))}mod(e){const n=Tr(e);return n.isNeg()&&Ya("division-by-zero","mod"),Js(Tr(this).umod(n))}pow(e){const n=Tr(e);return n.isNeg()&&Ya("negative-power","pow"),Js(Tr(this).pow(n))}and(e){const n=Tr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","and"),Js(Tr(this).and(n))}or(e){const n=Tr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","or"),Js(Tr(this).or(n))}xor(e){const n=Tr(e);return(this.isNegative()||n.isNeg())&&Ya("unbound-bitwise-result","xor"),Js(Tr(this).xor(n))}mask(e){return(this.isNegative()||e<0)&&Ya("negative-width","mask"),Js(Tr(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Ya("negative-width","shl"),Js(Tr(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Ya("negative-width","shr"),Js(Tr(this).shrn(e))}eq(e){return Tr(this).eq(Tr(e))}lt(e){return Tr(this).lt(Tr(e))}lte(e){return Tr(this).lte(Tr(e))}gt(e){return Tr(this).gt(Tr(e))}gte(e){return Tr(this).gte(Tr(e))}isNegative(){return"-"===this._hex[0]}isZero(){return Tr(this).isZero()}toNumber(){try{return Tr(this).toNumber()}catch{Ya("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return hl.throwError("this platform does not support BigInt",zt.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?lI||(lI=!0,hl.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?hl.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",zt.errors.UNEXPECTED_ARGUMENT,{}):hl.throwError("BigNumber.toString does not accept parameters",zt.errors.UNEXPECTED_ARGUMENT,{})),Tr(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof jn)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new jn(x2,cm(e)):e.match(/^-?[0-9]+$/)?new jn(x2,cm(new um(e))):hl.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&Ya("underflow","BigNumber.from",e),(e>=cI||e<=-cI)&&Ya("overflow","BigNumber.from",e),jn.from(String(e));const n=e;if("bigint"==typeof n)return jn.from(n.toString());if(ib(n))return jn.from(pr(n));if(n)if(n.toHexString){const s=n.toHexString();if("string"==typeof s)return jn.from(s)}else{let s=n._hex;if(null==s&&"BigNumber"===n.type&&(s=n.hex),"string"==typeof s&&(gi(s)||"-"===s[0]&&gi(s.substring(1))))return jn.from(s)}return hl.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function cm(t){if("string"!=typeof t)return cm(t.toString(16));if("-"===t[0])return"-"===(t=t.substring(1))[0]&&hl.throwArgumentError("invalid hex","value",t),"0x00"===(t=cm(t))?t:"-"+t;if("0x"!==t.substring(0,2)&&(t="0x"+t),"0x"===t)return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&"0x00"===t.substring(0,4);)t="0x"+t.substring(4);return t}function Js(t){return jn.from(cm(t))}function Tr(t){const e=jn.from(t).toHexString();return"-"===e[0]?new um("-"+e.substring(3),16):new um(e.substring(2),16)}function Ya(t,e,n){const s={fault:t,operation:e};return null!=n&&(s.value=n),hl.throwError(t,zt.errors.NUMERIC_FAULT,s)}const dc=new zt("rlp/5.7.0");function fI(t){const e=[];for(;t;)e.unshift(255&t),t>>=8;return e}function dI(t,e,n){let s=0;for(let f=0;fe+1+s&&dc.throwError("child data too short",zt.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:f}}function gI(t,e){if(0===t.length&&dc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{}),t[e]>=248){const n=t[e]-247;e+1+n>t.length&&dc.throwError("data short segment too short",zt.errors.BUFFER_OVERRUN,{});const s=dI(t,e+1,n);return e+1+n+s>t.length&&dc.throwError("data long segment too short",zt.errors.BUFFER_OVERRUN,{}),pI(t,e,e+1+n,n+s)}if(t[e]>=192){const n=t[e]-192;return e+1+n>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{}),pI(t,e,e+1,n)}if(t[e]>=184){const n=t[e]-183;e+1+n>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});const s=dI(t,e+1,n);e+1+n+s>t.length&&dc.throwError("data array too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n+s,result:pr(t.slice(e+1+n,e+1+n+s))}}if(t[e]>=128){const n=t[e]-128;e+1+n>t.length&&dc.throwError("data too short",zt.errors.BUFFER_OVERRUN,{});return{consumed:1+n,result:pr(t.slice(e+1,e+1+n))}}return{consumed:1,result:pr(t[e])}}function P2(t){const e=Sr(t),n=gI(e,0);return n.consumed!==e.length&&dc.throwArgumentError("invalid rlp data","data",t),n.result}const Df=new zt("address/5.7.0");function yI(t){gi(t,20)||Df.throwArgumentError("invalid address","address",t);const e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let f=0;f<40;f++)n[f]=e[f].charCodeAt(0);const s=Sr(No(n));for(let f=0;f<40;f+=2)s[f>>1]>>4>=8&&(e[f]=e[f].toUpperCase()),(15&s[f>>1])>=8&&(e[f+1]=e[f+1].toUpperCase());return"0x"+e.join("")}const N2={};for(let t=0;t<10;t++)N2[String(t)]=String(t);for(let t=0;t<26;t++)N2[String.fromCharCode(65+t)]=String(10+t);const mI=Math.floor(function RK(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}(9007199254740991));function vI(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(s=>N2[s]).join("");for(;e.length>=mI;){let s=e.substring(0,mI);e=parseInt(s,10)%97+e.substring(s.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}function Ds(t){let e=null;if("string"!=typeof t&&Df.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==t.substring(0,2)&&(t="0x"+t),e=yI(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Df.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==vI(t)&&Df.throwArgumentError("bad icap checksum","address",t),e=function OK(t){return new um(t,36).toString(16)}(t.substring(4));e.length<40;)e="0"+e;e=yI("0x"+e)}else Df.throwArgumentError("invalid address","address",t);return e}const bI="hash/5.7.0";var LK=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const Ni=new zt(bI),wI=new Uint8Array(32);wI.fill(0);const BK=jn.from(-1),EI=jn.from(0),AI=jn.from(1),jK=jn.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const UK=ro(AI.toHexString(),32),KK=ro(EI.toHexString(),32),_I={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},R2=["name","version","chainId","verifyingContract","salt"];function SI(t){return function(e){return"string"!=typeof e&&Ni.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const zK={name:SI("name"),version:SI("version"),chainId:function(t){try{return jn.from(t).toString()}catch{}return Ni.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ds(t).toLowerCase()}catch{}return Ni.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=Sr(t);if(32!==e.length)throw new Error("bad length");return pr(e)}catch{}return Ni.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function k2(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const n=""===e[1],s=parseInt(e[2]||"256");(s%8!=0||s>256||e[2]&&e[2]!==String(s))&&Ni.throwArgumentError("invalid numeric width","type",t);const f=jK.mask(n?s-1:s),I=n?f.add(AI).mul(BK):EI;return function(j){const q=jn.from(j);return(q.lt(I)||q.gt(f))&&Ni.throwArgumentError(`value out-of-bounds for ${t}`,"value",j),ro(q.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const n=parseInt(e[1]);return(0===n||n>32||e[1]!==String(n))&&Ni.throwArgumentError("invalid bytes width","type",t),function(s){return Sr(s).length!==n&&Ni.throwArgumentError(`invalid length for ${t}`,"value",s),function FK(t){const e=Sr(t),n=e.length%32;return n?ba([e,wI.slice(n)]):pr(e)}(s)}}}switch(t){case"address":return function(e){return ro(Ds(e),32)};case"bool":return function(e){return e?UK:KK};case"bytes":return function(e){return No(e)};case"string":return function(e){return T2(e)}}return null}function MI(t,e){return`${t}(${e.map(({name:n,type:s})=>s+" "+n).join(",")})`}class Ea{constructor(e){Pr(this,"types",Object.freeze(ih(e))),Pr(this,"_encoderCache",{}),Pr(this,"_types",{});const n={},s={},f={};Object.keys(e).forEach(q=>{n[q]={},s[q]=[],f[q]={}});for(const q in e){const re={};e[q].forEach(se=>{re[se.name]&&Ni.throwArgumentError(`duplicate variable name ${JSON.stringify(se.name)} in ${JSON.stringify(q)}`,"types",e),re[se.name]=!0;const fe=se.type.match(/^([^\x5b]*)(\x5b|$)/)[1];fe===q&&Ni.throwArgumentError(`circular type reference to ${JSON.stringify(fe)}`,"types",e),!k2(fe)&&(s[fe]||Ni.throwArgumentError(`unknown type ${JSON.stringify(fe)}`,"types",e),s[fe].push(q),n[q][fe]=!0)})}const I=Object.keys(s).filter(q=>0===s[q].length);0===I.length?Ni.throwArgumentError("missing primary type","types",e):I.length>1&&Ni.throwArgumentError(`ambiguous primary types or unused types: ${I.map(q=>JSON.stringify(q)).join(", ")}`,"types",e),Pr(this,"primaryType",I[0]),function j(q,re){re[q]&&Ni.throwArgumentError(`circular type reference to ${JSON.stringify(q)}`,"types",e),re[q]=!0,Object.keys(n[q]).forEach(se=>{s[se]&&(j(se,re),Object.keys(re).forEach(fe=>{f[fe][se]=!0}))}),delete re[q]}(this.primaryType,{});for(const q in f){const re=Object.keys(f[q]);re.sort(),this._types[q]=MI(q,e[q])+re.map(se=>MI(se,e[se])).join("")}}getEncoder(e){let n=this._encoderCache[e];return n||(n=this._encoderCache[e]=this._getEncoder(e)),n}_getEncoder(e){{const f=k2(e);if(f)return f}const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const f=n[1],I=this.getEncoder(f),j=parseInt(n[3]);return q=>{j>=0&&q.length!==j&&Ni.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",q);let re=q.map(I);return this._types[f]&&(re=re.map(No)),No(ba(re))}}const s=this.types[e];if(s){const f=T2(this._types[e]);return I=>{const j=s.map(({name:q,type:re})=>{const se=this.getEncoder(re)(I[q]);return this._types[re]?No(se):se});return j.unshift(f),ba(j)}}return Ni.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const n=this._types[e];return n||Ni.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),n}encodeData(e,n){return this.getEncoder(e)(n)}hashStruct(e,n){return No(this.encodeData(e,n))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,n,s){if(k2(e))return s(e,n);const f=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(f){const j=f[1],q=parseInt(f[3]);return q>=0&&n.length!==q&&Ni.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",n),n.map(re=>this._visit(j,re,s))}const I=this.types[e];return I?I.reduce((j,{name:q,type:re})=>(j[q]=this._visit(re,n[q],s),j),{}):Ni.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,n){return this._visit(this.primaryType,e,n)}static from(e){return new Ea(e)}static getPrimaryType(e){return Ea.from(e).primaryType}static hashStruct(e,n,s){return Ea.from(n).hashStruct(e,s)}static hashDomain(e){const n=[];for(const s in e){const f=_I[s];f||Ni.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(s)}`,"domain",e),n.push({name:s,type:f})}return n.sort((s,f)=>R2.indexOf(s.name)-R2.indexOf(f.name)),Ea.hashStruct("EIP712Domain",{EIP712Domain:n},e)}static encode(e,n,s){return ba(["0x1901",Ea.hashDomain(e),Ea.from(n).hash(s)])}static hash(e,n,s){return No(Ea.encode(e,n,s))}static resolveNames(e,n,s,f){return LK(this,void 0,void 0,function*(){e=Zs(e);const I={};e.verifyingContract&&!gi(e.verifyingContract,20)&&(I[e.verifyingContract]="0x");const j=Ea.from(n);j.visit(s,(q,re)=>("address"===q&&!gi(re,20)&&(I[re]="0x"),re));for(const q in I)I[q]=yield f(q);return e.verifyingContract&&I[e.verifyingContract]&&(e.verifyingContract=I[e.verifyingContract]),s=j.visit(s,(q,re)=>"address"===q&&I[re]?I[re]:re),{domain:e,value:s}})}static getPayload(e,n,s){Ea.hashDomain(e);const f={},I=[];R2.forEach(re=>{const se=e[re];null!=se&&(f[re]=zK[re](se),I.push({name:re,type:_I[re]}))});const j=Ea.from(n),q=Zs(n);return q.EIP712Domain?Ni.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):q.EIP712Domain=I,j.encode(s),{types:q,domain:f,primaryType:j.primaryType,message:j.visit(s,(re,se)=>{if(re.match(/^bytes(\d*)/))return pr(Sr(se));if(re.match(/^u?int/))return jn.from(se).toString();switch(re){case"address":return se.toLowerCase();case"bool":return!!se;case"string":return"string"!=typeof se&&Ni.throwArgumentError("invalid string","value",se),se}return Ni.throwArgumentError("unsupported type","type",re)})}}}const VK=jn.from(0);var HK=d(37084),hc=d.n(HK);typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"&&self;function vp(t,e,n){return t(n={path:e,exports:{},require:function(s,f){return function WK(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(f??n.path)}},n.exports),n.exports}var L2=II;function II(t,e){if(!t)throw new Error(e||"Assertion failed")}II.equal=function(e,n,s){if(e!=n)throw new Error(s||"Assertion failed: "+e+" != "+n)};var Ou=vp(function(t,e){var n=e;function f(j){return 1===j.length?"0"+j:j}function I(j){for(var q="",re=0;re>8,_e=255&fe;be?re.push(be,_e):re.push(_e)}return re},n.zero2=f,n.toHex=I,n.encode=function(q,re){return"hex"===re?I(q):q}}),Aa=vp(function(t,e){var n=e;n.assert=L2,n.toArray=Ou.toArray,n.zero2=Ou.zero2,n.toHex=Ou.toHex,n.encode=Ou.encode,n.getNAF=function s(re,se,fe){var be=new Array(Math.max(re.bitLength(),fe)+1);be.fill(0);for(var _e=1<(_e>>1)-1?(_e>>1)-Fe:Fe,Oe.isubn(Be)):Be=0,be[Te]=Be,Oe.iushrn(1)}return be},n.getJSF=function f(re,se){var fe=[[],[]];re=re.clone(),se=se.clone();for(var Oe,be=0,_e=0;re.cmpn(-be)>0||se.cmpn(-_e)>0;){var Fe,Ke,Te=re.andln(3)+be&3,Be=se.andln(3)+_e&3;3===Te&&(Te=-1),3===Be&&(Be=-1),1&Te?Fe=3!==(Oe=re.andln(7)+be&7)&&5!==Oe||2!==Be?Te:-Te:Fe=0,fe[0].push(Fe),1&Be?Ke=3!==(Oe=se.andln(7)+_e&7)&&5!==Oe||2!==Te?Be:-Be:Ke=0,fe[1].push(Ke),2*be===Fe+1&&(be=1-be),2*_e===Ke+1&&(_e=1-_e),re.iushrn(1),se.iushrn(1)}return fe},n.cachedProperty=function I(re,se,fe){var be="_"+se;re.prototype[se]=function(){return void 0!==this[be]?this[be]:this[be]=fe.call(this)}},n.parseBytes=function j(re){return"string"==typeof re?n.toArray(re,"hex"):re},n.intFromLE=function q(re){return new(fr())(re,"hex","le")}}),cb=Aa.getNAF,GK=Aa.getJSF,lb=Aa.assert;function Cf(t,e){this.type=t,this.p=new(fr())(e.p,16),this.red=e.prime?fr().red(e.prime):fr().mont(this.p),this.zero=new(fr())(0).toRed(this.red),this.one=new(fr())(1).toRed(this.red),this.two=new(fr())(2).toRed(this.red),this.n=e.n&&new(fr())(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var oh=Cf;function $a(t,e){this.curve=t,this.type=e,this.precomputed=null}Cf.prototype.point=function(){throw new Error("Not implemented")},Cf.prototype.validate=function(){throw new Error("Not implemented")},Cf.prototype._fixedNafMul=function(e,n){lb(e.precomputed);var s=e._getDoubles(),f=cb(n,1,this._bitLength),I=(1<=q;se--)re=(re<<1)+f[se];j.push(re)}for(var fe=this.jpoint(null,null,null),be=this.jpoint(null,null,null),_e=I;_e>0;_e--){for(q=0;q=0;re--){for(var se=0;re>=0&&0===j[re];re--)se++;if(re>=0&&se++,q=q.dblp(se),re<0)break;var fe=j[re];lb(0!==fe),q="affine"===e.type?fe>0?q.mixedAdd(I[fe-1>>1]):q.mixedAdd(I[-fe-1>>1].neg()):fe>0?q.add(I[fe-1>>1]):q.add(I[-fe-1>>1].neg())}return"affine"===e.type?q.toP():q},Cf.prototype._wnafMulAdd=function(e,n,s,f,I){var fe,be,_e,j=this._wnafT1,q=this._wnafT2,re=this._wnafT3,se=0;for(fe=0;fe=1;fe-=2){var Te=fe-1,Be=fe;if(1===j[Te]&&1===j[Be]){var Fe=[n[Te],null,null,n[Be]];0===n[Te].y.cmp(n[Be].y)?(Fe[1]=n[Te].add(n[Be]),Fe[2]=n[Te].toJ().mixedAdd(n[Be].neg())):0===n[Te].y.cmp(n[Be].y.redNeg())?(Fe[1]=n[Te].toJ().mixedAdd(n[Be]),Fe[2]=n[Te].add(n[Be].neg())):(Fe[1]=n[Te].toJ().mixedAdd(n[Be]),Fe[2]=n[Te].toJ().mixedAdd(n[Be].neg()));var Ke=[-3,-1,-5,-7,0,7,5,1,3],et=GK(s[Te],s[Be]);for(se=Math.max(et[0].length,se),re[Te]=new Array(se),re[Be]=new Array(se),be=0;be=0;fe--){for(var vn=0;fe>=0;){var en=!0;for(be=0;be=0&&vn++,Tt=Tt.dblp(vn),fe<0)break;for(be=0;be0?_e=q[be][rn-1>>1]:rn<0&&(_e=q[be][-rn-1>>1].neg()),Tt="affine"===_e.type?Tt.mixedAdd(_e):Tt.add(_e))}}for(fe=0;fe=Math.ceil((e.bitLength()+1)/n.step)},$a.prototype._getDoubles=function(e,n){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var s=[this],f=this,I=0;I=0&&(Oe=se,Te=fe),be.negative&&(be=be.neg(),_e=_e.neg()),Oe.negative&&(Oe=Oe.neg(),Te=Te.neg()),[{a:be,b:_e},{a:Oe,b:Te}]},Qa.prototype._endoSplit=function(e){var n=this.endo.basis,s=n[0],f=n[1],I=f.b.mul(e).divRound(this.n),j=s.b.neg().mul(e).divRound(this.n),q=I.mul(s.a),re=j.mul(f.a),se=I.mul(s.b),fe=j.mul(f.b);return{k1:e.sub(q).sub(re),k2:se.add(fe).neg()}},Qa.prototype.pointFromX=function(e,n){(e=new(fr())(e,16)).red||(e=e.toRed(this.red));var s=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),f=s.redSqrt();if(0!==f.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var I=f.fromRed().isOdd();return(n&&!I||!n&&I)&&(f=f.redNeg()),this.point(e,f)},Qa.prototype.validate=function(e){if(e.inf)return!0;var n=e.x,s=e.y,f=this.a.redMul(n),I=n.redSqr().redMul(n).redIAdd(f).redIAdd(this.b);return 0===s.redSqr().redISub(I).cmpn(0)},Qa.prototype._endoWnafMulAdd=function(e,n,s){for(var f=this._endoWnafT1,I=this._endoWnafT2,j=0;j":""},So.prototype.isInfinity=function(){return this.inf},So.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var n=this.y.redSub(e.y);0!==n.cmpn(0)&&(n=n.redMul(this.x.redSub(e.x).redInvm()));var s=n.redSqr().redISub(this.x).redISub(e.x),f=n.redMul(this.x.redSub(s)).redISub(this.y);return this.curve.point(s,f)},So.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var n=this.curve.a,s=this.x.redSqr(),f=e.redInvm(),I=s.redAdd(s).redIAdd(s).redIAdd(n).redMul(f),j=I.redSqr().redISub(this.x.redAdd(this.x)),q=I.redMul(this.x.redSub(j)).redISub(this.y);return this.curve.point(j,q)},So.prototype.getX=function(){return this.x.fromRed()},So.prototype.getY=function(){return this.y.fromRed()},So.prototype.mul=function(e){return e=new(fr())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},So.prototype.mulAdd=function(e,n,s){var f=[this,n],I=[e,s];return this.curve.endo?this.curve._endoWnafMulAdd(f,I):this.curve._wnafMulAdd(1,f,I,2)},So.prototype.jmulAdd=function(e,n,s){var f=[this,n],I=[e,s];return this.curve.endo?this.curve._endoWnafMulAdd(f,I,!0):this.curve._wnafMulAdd(1,f,I,2,!0)},So.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},So.prototype.neg=function(e){if(this.inf)return this;var n=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var s=this.precomputed,f=function(I){return I.neg()};n.precomputed={naf:s.naf&&{wnd:s.naf.wnd,points:s.naf.points.map(f)},doubles:s.doubles&&{step:s.doubles.step,points:s.doubles.points.map(f)}}}return n},So.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},B2(ko,oh.BasePoint),Qa.prototype.jpoint=function(e,n,s){return new ko(this,e,n,s)},ko.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),n=e.redSqr(),s=this.x.redMul(n),f=this.y.redMul(n).redMul(e);return this.curve.point(s,f)},ko.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},ko.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var n=e.z.redSqr(),s=this.z.redSqr(),f=this.x.redMul(n),I=e.x.redMul(s),j=this.y.redMul(n.redMul(e.z)),q=e.y.redMul(s.redMul(this.z)),re=f.redSub(I),se=j.redSub(q);if(0===re.cmpn(0))return 0!==se.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var fe=re.redSqr(),be=fe.redMul(re),_e=f.redMul(fe),Oe=se.redSqr().redIAdd(be).redISub(_e).redISub(_e),Te=se.redMul(_e.redISub(Oe)).redISub(j.redMul(be)),Be=this.z.redMul(e.z).redMul(re);return this.curve.jpoint(Oe,Te,Be)},ko.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var n=this.z.redSqr(),s=this.x,f=e.x.redMul(n),I=this.y,j=e.y.redMul(n).redMul(this.z),q=s.redSub(f),re=I.redSub(j);if(0===q.cmpn(0))return 0!==re.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var se=q.redSqr(),fe=se.redMul(q),be=s.redMul(se),_e=re.redSqr().redIAdd(fe).redISub(be).redISub(be),Oe=re.redMul(be.redISub(_e)).redISub(I.redMul(fe)),Te=this.z.redMul(q);return this.curve.jpoint(_e,Oe,Te)},ko.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var n;if(this.curve.zeroA||this.curve.threeA){var s=this;for(n=0;n=0)return!1;if(s.redIAdd(I),0===this.x.cmp(s))return!0}},ko.prototype.inspect=function(){return this.isInfinity()?"":""},ko.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var fb=vp(function(t,e){var n=e;n.base=oh,n.short=JK,n.mont=null,n.edwards=null}),hb=vp(function(t,e){var j,n=e,s=Aa.assert;function f(q){"short"===q.type?this.curve=new fb.short(q):"edwards"===q.type?this.curve=new fb.edwards(q):this.curve=new fb.mont(q),this.g=this.curve.g,this.n=this.curve.n,this.hash=q.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function I(q,re){Object.defineProperty(n,q,{configurable:!0,enumerable:!0,get:function(){var se=new f(re);return Object.defineProperty(n,q,{configurable:!0,enumerable:!0,value:se}),se}})}n.PresetCurve=f,I("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hc().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),I("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hc().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),I("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hc().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),I("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hc().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),I("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hc().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),I("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hc().sha256,gRed:!1,g:["9"]}),I("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hc().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{j=null.crash()}catch{j=void 0}I("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hc().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",j]})});function Tf(t){if(!(this instanceof Tf))return new Tf(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ou.toArray(t.entropy,t.entropyEnc||"hex"),n=Ou.toArray(t.nonce,t.nonceEnc||"hex"),s=Ou.toArray(t.pers,t.persEnc||"hex");L2(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,s)}var DI=Tf;Tf.prototype._init=function(e,n,s){var f=e.concat(n).concat(s);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var I=0;I=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(s||[])),this._reseed=1},Tf.prototype.generate=function(e,n,s,f){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof n&&(f=s,s=n,n=null),s&&(s=Ou.toArray(s,f||"hex"),this._update(s));for(var I=[];I.length"};var YK=Aa.assert;function pb(t,e){if(t instanceof pb)return t;this._importDER(t,e)||(YK(t.r&&t.s,"Signature without r or s"),this.r=new(fr())(t.r,16),this.s=new(fr())(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var gb=pb;function $K(){this.place=0}function U2(t,e){var n=t[e.place++];if(!(128&n))return n;var s=15&n;if(0===s||s>4)return!1;for(var f=0,I=0,j=e.place;I>>=0;return!(f<=127)&&(e.place=j,f)}function CI(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}pb.prototype._importDER=function(e,n){e=Aa.toArray(e,n);var s=new $K;if(48!==e[s.place++])return!1;var f=U2(e,s);if(!1===f||f+s.place!==e.length||2!==e[s.place++])return!1;var I=U2(e,s);if(!1===I)return!1;var j=e.slice(s.place,I+s.place);if(s.place+=I,2!==e[s.place++])return!1;var q=U2(e,s);if(!1===q||e.length!==q+s.place)return!1;var re=e.slice(s.place,q+s.place);if(0===j[0]){if(!(128&j[1]))return!1;j=j.slice(1)}if(0===re[0]){if(!(128&re[1]))return!1;re=re.slice(1)}return this.r=new(fr())(j),this.s=new(fr())(re),this.recoveryParam=null,!0},pb.prototype.toDER=function(e){var n=this.r.toArray(),s=this.s.toArray();for(128&n[0]&&(n=[0].concat(n)),128&s[0]&&(s=[0].concat(s)),n=CI(n),s=CI(s);!(s[0]||128&s[1]);)s=s.slice(1);var f=[2];K2(f,n.length),(f=f.concat(n)).push(2),K2(f,s.length);var I=f.concat(s),j=[48];return K2(j,I.length),j=j.concat(I),Aa.encode(j,e)};var QK=function(){throw new Error("unsupported")},TI=Aa.assert;function Xa(t){if(!(this instanceof Xa))return new Xa(t);"string"==typeof t&&(TI(Object.prototype.hasOwnProperty.call(hb,t),"Unknown curve "+t),t=hb[t]),t instanceof hb.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var XK=Xa;Xa.prototype.keyPair=function(e){return new F2(this,e)},Xa.prototype.keyFromPrivate=function(e,n){return F2.fromPrivate(this,e,n)},Xa.prototype.keyFromPublic=function(e,n){return F2.fromPublic(this,e,n)},Xa.prototype.genKeyPair=function(e){e||(e={});for(var n=new DI({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||QK(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),s=this.n.byteLength(),f=this.n.sub(new(fr())(2));;){var I=new(fr())(n.generate(s));if(!(I.cmp(f)>0))return I.iaddn(1),this.keyFromPrivate(I)}},Xa.prototype._truncateToN=function(e,n){var s=8*e.byteLength()-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!n&&e.cmp(this.n)>=0?e.sub(this.n):e},Xa.prototype.sign=function(e,n,s,f){"object"==typeof s&&(f=s,s=null),f||(f={}),n=this.keyFromPrivate(n,s),e=this._truncateToN(new(fr())(e,16));for(var I=this.n.byteLength(),j=n.getPrivate().toArray("be",I),q=e.toArray("be",I),re=new DI({hash:this.hash,entropy:j,nonce:q,pers:f.pers,persEnc:f.persEnc||"utf8"}),se=this.n.sub(new(fr())(1)),fe=0;;fe++){var be=f.k?f.k(fe):new(fr())(re.generate(this.n.byteLength()));if(!((be=this._truncateToN(be,!0)).cmpn(1)<=0||be.cmp(se)>=0)){var _e=this.g.mul(be);if(!_e.isInfinity()){var Oe=_e.getX(),Te=Oe.umod(this.n);if(0!==Te.cmpn(0)){var Be=be.invm(this.n).mul(Te.mul(n.getPrivate()).iadd(e));if(0!==(Be=Be.umod(this.n)).cmpn(0)){var Fe=(_e.getY().isOdd()?1:0)|(0!==Oe.cmp(Te)?2:0);return f.canonical&&Be.cmp(this.nh)>0&&(Be=this.n.sub(Be),Fe^=1),new gb({r:Te,s:Be,recoveryParam:Fe})}}}}}},Xa.prototype.verify=function(e,n,s,f){e=this._truncateToN(new(fr())(e,16)),s=this.keyFromPublic(s,f);var I=(n=new gb(n,"hex")).r,j=n.s;if(I.cmpn(1)<0||I.cmp(this.n)>=0||j.cmpn(1)<0||j.cmp(this.n)>=0)return!1;var fe,q=j.invm(this.n),re=q.mul(e).umod(this.n),se=q.mul(I).umod(this.n);return this.curve._maxwellTrick?!(fe=this.g.jmulAdd(re,s.getPublic(),se)).isInfinity()&&fe.eqXToP(I):!(fe=this.g.mulAdd(re,s.getPublic(),se)).isInfinity()&&0===fe.getX().umod(this.n).cmp(I)},Xa.prototype.recoverPubKey=function(t,e,n,s){TI((3&n)===n,"The recovery param is more than two bits"),e=new gb(e,s);var f=this.n,I=new(fr())(t),j=e.r,q=e.s,re=1&n,se=n>>1;if(j.cmp(this.curve.p.umod(this.curve.n))>=0&&se)throw new Error("Unable to find sencond key candinate");j=se?this.curve.pointFromX(j.add(this.curve.n),re):this.curve.pointFromX(j,re);var fe=e.r.invm(f),be=f.sub(I).mul(fe).umod(f),_e=q.mul(fe).umod(f);return this.g.mulAdd(be,j,_e)},Xa.prototype.getKeyRecoveryParam=function(t,e,n,s){if(null!==(e=new gb(e,s)).recoveryParam)return e.recoveryParam;for(var f=0;f<4;f++){var I;try{I=this.recoverPubKey(t,e,f)}catch{continue}if(I.eq(n))return f}throw new Error("Unable to find valid recovery factor")};var ez=vp(function(t,e){var n=e;n.version="6.5.4",n.utils=Aa,n.rand=function(){throw new Error("unsupported")},n.curve=fb,n.curves=hb,n.ec=XK,n.eddsa=null}).ec;const z2=new zt("signing-key/5.7.0");let V2=null;function pc(){return V2||(V2=new ez("secp256k1")),V2}class nz{constructor(e){Pr(this,"curve","secp256k1"),Pr(this,"privateKey",pr(e)),32!==rh(this.privateKey)&&z2.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const n=pc().keyFromPrivate(Sr(this.privateKey));Pr(this,"publicKey","0x"+n.getPublic(!1,"hex")),Pr(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Pr(this,"_isSigningKey",!0)}_addPoint(e){const n=pc().keyFromPublic(Sr(this.publicKey)),s=pc().keyFromPublic(Sr(e));return"0x"+n.pub.add(s.pub).encodeCompressed("hex")}signDigest(e){const n=pc().keyFromPrivate(Sr(this.privateKey)),s=Sr(e);32!==s.length&&z2.throwArgumentError("bad digest length","digest",e);const f=n.sign(s,{canonical:!0});return om({recoveryParam:f.recoveryParam,r:ro("0x"+f.r.toString(16),32),s:ro("0x"+f.s.toString(16),32)})}computeSharedSecret(e){const n=pc().keyFromPrivate(Sr(this.privateKey)),s=pc().keyFromPublic(Sr(OI(e)));return ro("0x"+n.derive(s.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function OI(t,e){const n=Sr(t);if(32===n.length){const s=new nz(n);return e?"0x"+pc().keyFromPrivate(n).getPublic(!0,"hex"):s.publicKey}return 33===n.length?e?pr(n):"0x"+pc().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?e?"0x"+pc().keyFromPublic(n).getPublic(!0,"hex"):pr(n):z2.throwArgumentError("invalid public or private key","key","[REDACTED]")}const rs=new zt("transactions/5.7.0");var xI;function H2(t){return"0x"===t?null:Ds(t)}function is(t){return"0x"===t?VK:jn.from(t)}!function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"}(xI||(xI={}));function PI(t,e){return function az(t){return Ds(Is(No(Is(OI(t),1)),12))}(function rz(t,e){const n=om(e),s={r:Sr(n.r),s:Sr(n.s)};return"0x"+pc().recoverPubKey(Sr(t),s,n.recoveryParam).encode("hex",!1)}(Sr(t),e))}function _a(t,e){const n=mp(jn.from(t).toHexString());return n.length>32&&rs.throwArgumentError("invalid length for "+e,"transaction:"+e,t),n}function W2(t,e){return{address:Ds(t),storageKeys:(e||[]).map((n,s)=>(32!==rh(n)&&rs.throwArgumentError("invalid access list storageKey",`accessList[${t}:${s}]`,n),n.toLowerCase()))}}function lm(t){if(Array.isArray(t))return t.map((n,s)=>Array.isArray(n)?(n.length>2&&rs.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${s}]`,n),W2(n[0],n[1])):W2(n.address,n.storageKeys));const e=Object.keys(t).map(n=>{const s=t[n].reduce((f,I)=>(f[I]=!0,f),{});return W2(n,Object.keys(s).sort())});return e.sort((n,s)=>n.address.localeCompare(s.address)),e}function NI(t){return lm(t).map(e=>[e.address,e.storageKeys])}function RI(t,e){if(null!=t.gasPrice){const s=jn.from(t.gasPrice),f=jn.from(t.maxFeePerGas||0);s.eq(f)||rs.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:s,maxFeePerGas:f})}const n=[_a(t.chainId||0,"chainId"),_a(t.nonce||0,"nonce"),_a(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_a(t.maxFeePerGas||0,"maxFeePerGas"),_a(t.gasLimit||0,"gasLimit"),null!=t.to?Ds(t.to):"0x",_a(t.value||0,"value"),t.data||"0x",NI(t.accessList||[])];if(e){const s=om(e);n.push(_a(s.recoveryParam,"recoveryParam")),n.push(mp(s.r)),n.push(mp(s.s))}return ba(["0x02",ub(n)])}function kI(t,e){const n=[_a(t.chainId||0,"chainId"),_a(t.nonce||0,"nonce"),_a(t.gasPrice||0,"gasPrice"),_a(t.gasLimit||0,"gasLimit"),null!=t.to?Ds(t.to):"0x",_a(t.value||0,"value"),t.data||"0x",NI(t.accessList||[])];if(e){const s=om(e);n.push(_a(s.recoveryParam,"recoveryParam")),n.push(mp(s.r)),n.push(mp(s.s))}return ba(["0x01",ub(n)])}function LI(t,e,n){try{const s=is(e[0]).toNumber();if(0!==s&&1!==s)throw new Error("bad recid");t.v=s}catch{rs.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ro(e[1],32),t.s=ro(e[2],32);try{const s=No(n(t));t.from=PI(s,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function dz(t){const e=Sr(t);if(e[0]>127)return function fz(t){const e=P2(t);9!==e.length&&6!==e.length&&rs.throwArgumentError("invalid raw transaction","rawTransaction",t);const n={nonce:is(e[0]).toNumber(),gasPrice:is(e[1]),gasLimit:is(e[2]),to:H2(e[3]),value:is(e[4]),data:e[5],chainId:0};if(6===e.length)return n;try{n.v=jn.from(e[6]).toNumber()}catch{return n}if(n.r=ro(e[7],32),n.s=ro(e[8],32),jn.from(n.r).isZero()&&jn.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);let s=n.v-27;const f=e.slice(0,6);0!==n.chainId&&(f.push(pr(n.chainId)),f.push("0x"),f.push("0x"),s-=2*n.chainId+8);const I=No(ub(f));try{n.from=PI(I,{r:pr(n.r),s:pr(n.s),recoveryParam:s})}catch{}n.hash=No(t)}return n.type=null,n}(e);switch(e[0]){case 1:return function lz(t){const e=P2(t.slice(1));8!==e.length&&11!==e.length&&rs.throwArgumentError("invalid component count for transaction type: 1","payload",pr(t));const n={type:1,chainId:is(e[0]).toNumber(),nonce:is(e[1]).toNumber(),gasPrice:is(e[2]),gasLimit:is(e[3]),to:H2(e[4]),value:is(e[5]),data:e[6],accessList:lm(e[7])};return 8===e.length||(n.hash=No(t),LI(n,e.slice(8),kI)),n}(e);case 2:return function cz(t){const e=P2(t.slice(1));9!==e.length&&12!==e.length&&rs.throwArgumentError("invalid component count for transaction type: 2","payload",pr(t));const n=is(e[2]),s=is(e[3]),f={type:2,chainId:is(e[0]).toNumber(),nonce:is(e[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:s,gasPrice:null,gasLimit:is(e[4]),to:H2(e[5]),value:is(e[6]),data:e[7],accessList:lm(e[8])};return 9===e.length||(f.hash=No(t),LI(f,e.slice(9),RI)),f}(e)}return rs.throwError(`unsupported transaction type: ${e[0]}`,zt.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}function BI(t){t=atob(t);const e=[];for(let n=0;n{I[q.toLowerCase()]=j}):s.headers.keys().forEach(j=>{I[j.toLowerCase()]=s.headers.get(j)}),{headers:I,statusCode:s.status,statusMessage:s.statusText,body:Sr(new Uint8Array(f))}})}var yz=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const xu=new zt("web/5.7.1");function FI(t){return new Promise(e=>{setTimeout(e,t)})}function Of(t,e){if(null==t)return null;if("string"==typeof t)return t;if(S2(t)){if(e&&("text"===e.split("/")[0]||"application/json"===e.split(";")[0].trim()))try{return ob(t)}catch{}return pr(t)}return t}function mz(t){return dl(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,n)=>String.fromCharCode(parseInt(n,16))))}function G2(t,e,n){let f=null;if(null!=e){f=dl(e);const I="string"==typeof t?{url:t}:Zs(t);I.headers?0!==Object.keys(I.headers).filter(q=>"content-type"===q.toLowerCase()).length||(I.headers=Zs(I.headers),I.headers["content-type"]="application/json"):I.headers={"content-type":"application/json"},t=I}return function vz(t,e,n){const s="object"==typeof t&&null!=t.throttleLimit?t.throttleLimit:12;xu.assertArgument(s>0&&s%1==0,"invalid connection throttle limit","connection.throttleLimit",s);const f="object"==typeof t?t.throttleCallback:null,I="object"==typeof t&&"number"==typeof t.throttleSlotInterval?t.throttleSlotInterval:100;xu.assertArgument(I>0&&I%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",I);const j="object"==typeof t&&!!t.errorPassThrough,q={};let re=null;const se={method:"GET"};let fe=!1,be=12e4;if("string"==typeof t)re=t;else if("object"==typeof t){if((null==t||null==t.url)&&xu.throwArgumentError("missing URL","connection.url",t),re=t.url,"number"==typeof t.timeout&&t.timeout>0&&(be=t.timeout),t.headers)for(const Ke in t.headers)q[Ke.toLowerCase()]={key:Ke,value:String(t.headers[Ke])},["if-none-match","if-modified-since"].indexOf(Ke.toLowerCase())>=0&&(fe=!0);if(se.allowGzip=!!t.allowGzip,null!=t.user&&null!=t.password){"https:"!==re.substring(0,6)&&!0!==t.allowInsecureAuthentication&&xu.throwError("basic authentication requires a secure https url",zt.errors.INVALID_ARGUMENT,{argument:"url",url:re,user:t.user,password:"[REDACTED]"});const Ke=t.user+":"+t.password;q.authorization={key:"Authorization",value:"Basic "+jI(dl(Ke))}}null!=t.skipFetchSetup&&(se.skipFetchSetup=!!t.skipFetchSetup),null!=t.fetchOptions&&(se.fetchOptions=Zs(t.fetchOptions))}const _e=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),Oe=re?re.match(_e):null;if(Oe)try{const Ke={statusCode:200,statusMessage:"OK",headers:{"content-type":Oe[1]||"text/plain"},body:Oe[2]?BI(Oe[3]):mz(Oe[3])};let et=Ke.body;return n&&(et=n(Ke.body,Ke)),Promise.resolve(et)}catch(Ke){xu.throwError("processing response error",zt.errors.SERVER_ERROR,{body:Of(Oe[1],Oe[2]),error:Ke,requestBody:null,requestMethod:"GET",url:re})}e&&(se.method="POST",se.body=e,null==q["content-type"]&&(q["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==q["content-length"]&&(q["content-length"]={key:"Content-Length",value:String(e.length)}));const Te={};Object.keys(q).forEach(Ke=>{const et=q[Ke];Te[et.key]=et.value}),se.headers=Te;const Be=function(){let Ke=null;return{promise:new Promise(function(ut,Tt){be&&(Ke=setTimeout(()=>{null!=Ke&&(Ke=null,Tt(xu.makeError("timeout",zt.errors.TIMEOUT,{requestBody:Of(se.body,Te["content-type"]),requestMethod:se.method,timeout:be,url:re})))},be))}),cancel:function(){null!=Ke&&(clearTimeout(Ke),Ke=null)}}}(),Fe=function(){return yz(this,void 0,void 0,function*(){for(let Ke=0;Ke=300)&&(Be.cancel(),xu.throwError("bad response",zt.errors.SERVER_ERROR,{status:et.statusCode,headers:et.headers,body:Of(Ye,et.headers?et.headers["content-type"]:null),requestBody:Of(se.body,Te["content-type"]),requestMethod:se.method,url:re})),n)try{const ut=yield n(Ye,et);return Be.cancel(),ut}catch(ut){if(ut.throttleRetry&&Ke{let q=null;if(null!=I)try{q=JSON.parse(ob(I))}catch(re){xu.throwError("invalid JSON",zt.errors.SERVER_ERROR,{body:I,error:re})}return n&&(q=n(q,j)),q})}function fm(t,e){return e||(e={}),null==(e=Zs(e)).floor&&(e.floor=0),null==e.ceiling&&(e.ceiling=1e4),null==e.interval&&(e.interval=250),new Promise(function(n,s){let f=null,I=!1;const j=()=>!I&&(I=!0,f&&clearTimeout(f),!0);e.timeout&&(f=setTimeout(()=>{j()&&s(new Error("timeout"))},e.timeout));const q=e.retryLimit;let re=0;!function se(){return t().then(function(fe){if(void 0!==fe)j()&&n(fe);else if(e.oncePoll)e.oncePoll.once("poll",se);else if(e.onceBlock)e.onceBlock.once("block",se);else if(!I){if(re++,re>q)return void(j()&&s(new Error("retry limit reached")));let be=e.interval*parseInt(String(Math.random()*Math.pow(2,re)));bee.ceiling&&(be=e.ceiling),setTimeout(se,be)}return null},function(fe){j()&&s(fe)})}()})}var wz=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const dm=new zt("abstract-provider/5.7.0");class Ez extends SK{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class Z2{constructor(){dm.checkAbstract(new.target,Z2),Pr(this,"_isProvider",!0)}getFeeData(){return wz(this,void 0,void 0,function*(){const{block:e,gasPrice:n}=yield Ro({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(j=>null)});let s=null,f=null,I=null;return e&&e.baseFeePerGas&&(s=e.baseFeePerGas,I=jn.from("1500000000"),f=e.baseFeePerGas.mul(2).add(I)),{lastBaseFeePerGas:s,maxFeePerGas:f,maxPriorityFeePerGas:I,gasPrice:n}})}addListener(e,n){return this.on(e,n)}removeListener(e,n){return this.off(e,n)}static isProvider(e){return!(!e||!e._isProvider)}}class UI{constructor(e){Pr(this,"alphabet",e),Pr(this,"base",e.length),Pr(this,"_alphabetMap",{}),Pr(this,"_leader",e.charAt(0));for(let n=0;n0;)s.push(j%this.base),j=j/this.base|0}let f="";for(let I=0;0===n[I]&&I=0;--I)f+=this.alphabet[s[I]];return f}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let n=[];if(0===e.length)return new Uint8Array(n);n.push(0);for(let s=0;s>=8;for(;I>0;)n.push(255&I),I>>=8}for(let s=0;e[s]===this._leader&&s0&&Array.isArray(q)?f(q,j-1):n.push(q)})};return f(t,e),n}function Iz(t){return function Mz(t){let e=0;return()=>t[e++]}(function Sz(t){let e=0;function n(){return t[e++]<<8|t[e++]}let s=n(),f=1,I=[0,1];for(let Tt=1;Tt>--re&1}const _e=Math.pow(2,31),Oe=_e>>>1,Te=Oe>>1,Be=_e-1;let Fe=0;for(let Tt=0;Tt<31;Tt++)Fe=Fe<<1|fe();let Ke=[],et=0,Ye=_e;for(;;){let Tt=Math.floor(((Fe-et+1)*f-1)/Ye),Vt=0,vn=s;for(;vn-Vt>1;){let Mn=Vt+vn>>>1;Tt>>1|fe(),en=en<<1^Oe,rn=(rn^Oe)<<1|Oe|1;et=en,Ye=1+rn-en}let ut=s-4;return Ke.map(Tt=>{switch(Tt-ut){case 3:return ut+65792+(t[q++]<<16|t[q++]<<8|t[q++]);case 2:return ut+256+(t[q++]<<8|t[q++]);case 1:return ut+t[q++];default:return Tt-1}})}(t))}function Dz(t){return 1&t?~t>>1:t>>1}function zI(t,e){let n=Array(t);for(let s=0,f=-1;se[j]):n}function VI(t,e,n){let s=Array(t).fill(void 0).map(()=>[]);for(let f=0;fs[j].push(I));return s}function Pz(t,e){let n=1+e(),s=e(),f=function xz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(n)}return e}(e);return KI(VI(f.length,1+t,e).map((j,q)=>{const re=j[0],se=j.slice(1);return Array(f[q]).fill(void 0).map((fe,be)=>{let _e=be*s;return[re+be*n,se.map(Oe=>Oe+_e)]})}))}function Nz(t,e){return VI(1+e(),1+t,e).map(f=>[f[0],f.slice(1)])}const mb=function kz(){return Iz(BI("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}(),Lz=new Set(yb(mb)),Bz=new Set(yb(mb)),jz=function Oz(t){let e=[];for(;;){let n=t();if(0==n)break;e.push(Pz(n,t))}for(;;){let n=t()-1;if(n<0)break;e.push(Nz(n,t))}return function _z(t){const e={};for(let n=0;ns-f);return function n(){let s=[];for(;;){let se=yb(t,e);if(0==se.length)break;s.push({set:new Set(se),node:n()})}s.sort((se,fe)=>fe.set.size-se.set.size);let f=t(),I=f%3;f=f/3|0;let j=!!(1&f);return f>>=1,{branches:s,valid:I,fe0f:j,save:1==f,check:2==f}}()}(mb),HI=45,WI=95;function GI(t){return function vK(t,e=sm.current){return D2(dl(t,e))}(t)}function Uz(t){return t.filter(e=>65039!=e)}function ZI(t){for(let e of t.split(".")){let n=GI(e);try{for(let s=n.lastIndexOf(WI)-1;s>=0;s--)if(n[s]!==WI)throw new Error("underscore only allowed at start");if(n.length>=4&&n.every(s=>s<128)&&n[2]===HI&&n[3]===HI)throw new Error("invalid label extension")}catch(s){throw new Error(`Invalid label "${e}": ${s.message}`)}}return t}function Kz(t){return ZI(function zz(t,e){let n=GI(t).reverse(),s=[];for(;n.length;){let f=Hz(n);if(f){s.push(...e(f));continue}let I=n.pop();if(Lz.has(I)){s.push(I);continue}if(Bz.has(I))continue;let j=jz[I];if(!j)throw new Error(`Disallowed codepoint: 0x${I.toString(16).toUpperCase()}`);s.push(...j)}return ZI(function Vz(t){return t.normalize("NFC")}(String.fromCodePoint(...s)))}(t,Uz))}function Hz(t,e){var n;let f,I,s=Fz,j=[],q=t.length;for(e&&(e.length=0);q;){let re=t[--q];if(s=null===(n=s.branches.find(se=>se.set.has(re)))||void 0===n?void 0:n.node,!s)break;if(s.save)I=re;else if(s.check&&re===I)break;j.push(re),s.fe0f&&(j.push(65039),q>0&&65039==t[q-1]&&q--),s.valid&&(f=j.slice(),2==s.valid&&f.splice(1,1),e&&e.push(...t.slice(q).reverse()),t.length=q)}return f}const Wz=new zt(bI),JI=new Uint8Array(32);function YI(t){if(0===t.length)throw new Error("invalid ENS name; empty component");return t}function vb(t){const e=dl(Kz(t)),n=[];if(0===t.length)return n;let s=0;for(let f=0;f=e.length)throw new Error("invalid ENS name; empty component");return n.push(YI(e.slice(s))),n}function bb(t){"string"!=typeof t&&Wz.throwArgumentError("invalid ENS name; not a string","name",t);let e=JI;const n=vb(t);for(;n.length;)e=No(If([e,No(n.pop())]));return pr(e)}function Gz(t){return pr(If(vb(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const n=new Uint8Array(e.length+1);return n.set(e,1),n[0]=n.length-1,n})))+"00"}JI.fill(0);const $I=new zt("networks/5.7.1");function pl(t){const e=function(n,s){null==s&&(s={});const f=[];if(n.InfuraProvider&&"-"!==s.infura)try{f.push(new n.InfuraProvider(t,s.infura))}catch{}if(n.EtherscanProvider&&"-"!==s.etherscan)try{f.push(new n.EtherscanProvider(t,s.etherscan))}catch{}if(n.AlchemyProvider&&"-"!==s.alchemy)try{f.push(new n.AlchemyProvider(t,s.alchemy))}catch{}if(n.PocketProvider&&"-"!==s.pocket){const I=["goerli","ropsten","rinkeby","sepolia"];try{const j=new n.PocketProvider(t,s.pocket);j.network&&-1===I.indexOf(j.network.name)&&f.push(j)}catch{}}if(n.CloudflareProvider&&"-"!==s.cloudflare)try{f.push(new n.CloudflareProvider(t))}catch{}if(n.AnkrProvider&&"-"!==s.ankr)try{const I=["ropsten"],j=new n.AnkrProvider(t,s.ankr);j.network&&-1===I.indexOf(j.network.name)&&f.push(j)}catch{}if(0===f.length)return null;if(n.FallbackProvider){let I=1;return null!=s.quorum?I=s.quorum:"homestead"===t&&(I=2),new n.FallbackProvider(f,I)}return f[0]};return e.renetwork=function(n){return pl(n)},e}function wb(t,e){const n=function(s,f){return s.JsonRpcProvider?new s.JsonRpcProvider(t,e):null};return n.renetwork=function(s){return wb(t,s)},n}const QI={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:pl("homestead")},XI={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:pl("ropsten")},qI={chainId:63,name:"classicMordor",_defaultProvider:wb("https://www.ethercluster.com/mordor","classicMordor")},Eb={unspecified:{chainId:0,name:"unspecified"},homestead:QI,mainnet:QI,morden:{chainId:2,name:"morden"},ropsten:XI,testnet:XI,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:pl("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:pl("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:pl("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:pl("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:wb("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qI,classicTestnet:qI,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:wb("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:pl("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:pl("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};new zt("sha2/5.7.0");function eD(t){return"0x"+hc().sha256().update(Sr(t)).digest("hex")}var Xz=d(70988),tD=d.n(Xz);const hm=new zt(ab);class kn{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},n=this.address.bind(this),s=this.bigNumber.bind(this),f=this.blockTag.bind(this),I=this.data.bind(this),j=this.hash.bind(this),q=this.hex.bind(this),re=this.number.bind(this),se=this.type.bind(this);return e.transaction={hash:j,type:se,accessList:kn.allowNull(this.accessList.bind(this),null),blockHash:kn.allowNull(j,null),blockNumber:kn.allowNull(re,null),transactionIndex:kn.allowNull(re,null),confirmations:kn.allowNull(re,null),from:n,gasPrice:kn.allowNull(s),maxPriorityFeePerGas:kn.allowNull(s),maxFeePerGas:kn.allowNull(s),gasLimit:s,to:kn.allowNull(n,null),value:s,nonce:re,data:I,r:kn.allowNull(this.uint256),s:kn.allowNull(this.uint256),v:kn.allowNull(re),creates:kn.allowNull(n,null),raw:kn.allowNull(I)},e.transactionRequest={from:kn.allowNull(n),nonce:kn.allowNull(re),gasLimit:kn.allowNull(s),gasPrice:kn.allowNull(s),maxPriorityFeePerGas:kn.allowNull(s),maxFeePerGas:kn.allowNull(s),to:kn.allowNull(n),value:kn.allowNull(s),data:kn.allowNull(be=>this.data(be,!0)),type:kn.allowNull(re),accessList:kn.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:re,blockNumber:re,transactionHash:j,address:n,topics:kn.arrayOf(j),data:I,logIndex:re,blockHash:j},e.receipt={to:kn.allowNull(this.address,null),from:kn.allowNull(this.address,null),contractAddress:kn.allowNull(n,null),transactionIndex:re,root:kn.allowNull(q),gasUsed:s,logsBloom:kn.allowNull(I),blockHash:j,transactionHash:j,logs:kn.arrayOf(this.receiptLog.bind(this)),blockNumber:re,confirmations:kn.allowNull(re,null),cumulativeGasUsed:s,effectiveGasPrice:kn.allowNull(s),status:kn.allowNull(re),type:se},e.block={hash:kn.allowNull(j),parentHash:j,number:re,timestamp:re,nonce:kn.allowNull(q),difficulty:this.difficulty.bind(this),gasLimit:s,gasUsed:s,miner:kn.allowNull(n),extraData:I,transactions:kn.allowNull(kn.arrayOf(j)),baseFeePerGas:kn.allowNull(s)},e.blockWithTransactions=Zs(e.block),e.blockWithTransactions.transactions=kn.allowNull(kn.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:kn.allowNull(f,void 0),toBlock:kn.allowNull(f,void 0),blockHash:kn.allowNull(j,void 0),address:kn.allowNull(n,void 0),topics:kn.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:kn.allowNull(re),blockHash:kn.allowNull(j),transactionIndex:re,removed:kn.allowNull(this.boolean.bind(this)),address:n,data:kn.allowFalsish(I,"0x"),topics:kn.arrayOf(j),transactionHash:j,logIndex:re},e}accessList(e){return lm(e||[])}number(e){return"0x"===e?0:jn.from(e).toNumber()}type(e){return"0x"===e||null==e?0:jn.from(e).toNumber()}bigNumber(e){return jn.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,n){return"string"==typeof e&&(!n&&"0x"!==e.substring(0,2)&&(e="0x"+e),gi(e))?e.toLowerCase():hm.throwArgumentError("invalid hash","value",e)}data(e,n){const s=this.hex(e,n);if(s.length%2!=0)throw new Error("invalid data; odd-length - "+e);return s}address(e){return Ds(e)}callAddress(e){if(!gi(e,32))return null;const n=Ds(Is(e,12));return"0x0000000000000000000000000000000000000000"===n?null:n}contractAddress(e){return function kK(t){let e=null;try{e=Ds(t.from)}catch{Df.throwArgumentError("missing from address","transaction",t)}return Ds(Is(No(ub([e,mp(Sr(jn.from(t.nonce).toHexString()))])),12))}(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||gi(e))return I2(e);throw new Error("invalid blockTag")}hash(e,n){const s=this.hex(e,n);return 32!==rh(s)?hm.throwArgumentError("invalid hash","value",e):s}difficulty(e){if(null==e)return null;const n=jn.from(e);try{return n.toNumber()}catch{}return null}uint256(e){if(!gi(e))throw new Error("invalid uint256");return ro(e,32)}_block(e,n){null!=e.author&&null==e.miner&&(e.miner=e.author);const s=null!=e._difficulty?e._difficulty:e.difficulty,f=kn.check(n,e);return f._difficulty=null==s?null:jn.from(s),f}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return kn.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&jn.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),(1===e.type||2===e.type)&&null==e.accessList&&(e.accessList=[]);const n=kn.check(this.formats.transaction,e);if(null!=e.chainId){let s=e.chainId;gi(s)&&(s=jn.from(s).toNumber()),n.chainId=s}else{let s=e.networkId;null==s&&null==n.v&&(s=e.chainId),gi(s)&&(s=jn.from(s).toNumber()),"number"!=typeof s&&null!=n.v&&(s=(n.v-35)/2,s<0&&(s=0),s=parseInt(s)),"number"!=typeof s&&(s=0),n.chainId=s}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}transaction(e){return dz(e)}receiptLog(e){return kn.check(this.formats.receiptLog,e)}receipt(e){const n=kn.check(this.formats.receipt,e);if(null!=n.root)if(n.root.length<=4){const s=jn.from(n.root).toNumber();0===s||1===s?(null!=n.status&&n.status!==s&&hm.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=s,delete n.root):hm.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&hm.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}topics(e){return Array.isArray(e)?e.map(n=>this.topics(n)):null!=e?this.hash(e,!0):null}filter(e){return kn.check(this.formats.filter,e)}filterLog(e){return kn.check(this.formats.filterLog,e)}static check(e,n){const s={};for(const f in e)try{const I=e[f](n[f]);void 0!==I&&(s[f]=I)}catch(I){throw I.checkKey=f,I.checkValue=n[f],I}return s}static allowNull(e,n){return function(s){return null==s?n:e(s)}}static allowFalsish(e,n){return function(s){return s?e(s):n}}static arrayOf(e){return function(n){if(!Array.isArray(n))throw new Error("not an array");const s=[];return n.forEach(function(f){s.push(e(f))}),s}}}var gr=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const Ir=new zt(ab);function rD(t){return null==t?"null":(32!==rh(t)&&Ir.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function iD(t){for(t=t.slice();t.length>0&&null==t[t.length-1];)t.pop();return t.map(e=>{if(Array.isArray(e)){const n={};e.forEach(f=>{n[rD(f)]=!0});const s=Object.keys(n);return s.sort(),s.join("|")}return rD(e)}).join("&")}function bp(t){if("string"==typeof t){if(32===rh(t=t.toLowerCase()))return"tx:"+t;if(-1===t.indexOf(":"))return t}else{if(Array.isArray(t))return"filter:*:"+iD(t);if(Ez.isForkEvent(t))throw Ir.warn("not implemented"),new Error("not implemented");if(t&&"object"==typeof t)return"filter:"+(t.address||"*")+":"+iD(t.topics||[])}throw new Error("invalid event - "+t)}function pm(){return(new Date).getTime()}function oD(t){return new Promise(e=>{setTimeout(e,t)})}const rV=["block","network","pending","poll"];class iV{constructor(e,n,s){Pr(this,"tag",e),Pr(this,"listener",n),Pr(this,"once",s),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const n=e[1],s=function nV(t){return""===t?[]:t.split(/&/g).map(e=>{if(""===e)return[];const n=e.split("|").map(s=>"null"===s?null:s);return 1===n.length?n[0]:n})}(e[2]),f={};return s.length>0&&(f.topics=s),n&&"*"!==n&&(f.address=n),f}pollable(){return this.tag.indexOf(":")>=0||rV.indexOf(this.tag)>=0}}const oV={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Y2(t){return ro(jn.from(t).toHexString(),32)}function sD(t){return J2.encode(If([t,Is(eD(eD(t)),0,4)]))}const aD=new RegExp("^(ipfs)://(.*)$","i"),uD=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),aD,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ab(t,e){try{return ob(gm(t,e))}catch{}return null}function gm(t,e){if("0x"===t)return null;const n=jn.from(Is(t,e,e+32)).toNumber(),s=jn.from(Is(t,n,n+32)).toNumber();return Is(t,n+32,n+32+s)}function $2(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ir.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function cD(t){const e=Sr(t);if(e.length>32)throw new Error("internal; should not happen");const n=new Uint8Array(32);return n.set(e,32-e.length),n}function sV(t){if(t.length%32==0)return t;const e=new Uint8Array(32*Math.ceil(t.length/32));return e.set(t),e}function lD(t){const e=[];let n=0;for(let s=0;sjn.from(e).eq(1)).catch(e=>{if(e.code===zt.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,n){return gr(this,void 0,void 0,function*(){const s={to:this.address,ccipReadEnabled:!0,data:ba([e,bb(this.name),n||"0x"])};let f=!1;(yield this.supportsWildcard())&&(f=!0,s.data=ba(["0x9061b923",lD([Gz(this.name),s.data])]));try{let I=yield this.provider.call(s);return Sr(I).length%32==4&&Ir.throwError("resolver threw error",zt.errors.CALL_EXCEPTION,{transaction:s,data:I}),f&&(I=gm(I,0)),I}catch(I){if(I.code===zt.errors.CALL_EXCEPTION)return null;throw I}})}_fetchBytes(e,n){return gr(this,void 0,void 0,function*(){const s=yield this._fetch(e,n);return null!=s?gm(s,0):null})}_getAddress(e,n){const s=oV[String(e)];if(null==s&&Ir.throwError(`unsupported coin type: ${e}`,zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===s.ilk)return this.provider.formatter.address(n);const f=Sr(n);if(null!=s.p2pkh){const I=n.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(I){const j=parseInt(I[1],16);if(I[2].length===2*j&&j>=1&&j<=75)return sD(If([[s.p2pkh],"0x"+I[2]]))}}if(null!=s.p2sh){const I=n.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(I){const j=parseInt(I[1],16);if(I[2].length===2*j&&j>=1&&j<=75)return sD(If([[s.p2sh],"0x"+I[2]]))}}if(null!=s.prefix){const I=f[1];let j=f[0];if(0===j?20!==I&&32!==I&&(j=-1):j=-1,j>=0&&f.length===2+I&&I>=1&&I<=75){const q=tD().toWords(f.slice(2));return q.unshift(j),tD().encode(s.prefix,q)}}return null}getAddress(e){return gr(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{const f=yield this._fetch("0x3b3b57de");return"0x"===f||"0x0000000000000000000000000000000000000000000000000000000000000000"===f?null:this.provider.formatter.callAddress(f)}catch(f){if(f.code===zt.errors.CALL_EXCEPTION)return null;throw f}const n=yield this._fetchBytes("0xf1cb7e06",Y2(e));if(null==n||"0x"===n)return null;const s=this._getAddress(e,n);return null==s&&Ir.throwError("invalid or unsupported coin data",zt.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:n}),s})}getAvatar(){return gr(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const n=yield this.getText("avatar");if(null==n)return null;for(let s=0;sj[re])}return Ir.throwError("invalid or unsupported content hash data",zt.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return gr(this,void 0,void 0,function*(){let n=dl(e);n=If([Y2(64),Y2(n.length),n]),n.length%32!=0&&(n=If([n,ro("0x",32-e.length%32)]));const s=yield this._fetchBytes("0x59d1d43c",pr(n));return null==s||"0x"===s?null:ob(s)})}}let Q2=null,aV=1;class uV extends Z2{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),Pr(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(n=>{}),this._ready().catch(n=>{});else{const n=am(new.target,"getNetwork")(e);n?(Pr(this,"_network",n),this.emit("network",n,null)):Ir.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return gr(this,void 0,void 0,function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}null==e&&(e=yield this.detectNetwork()),e||Ir.throwError("no network detected",zt.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:Pr(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return fm(()=>this._ready().then(e=>e,e=>{if(e.code!==zt.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==Q2&&(Q2=new kn),Q2}static getNetwork(e){return function Yz(t){if(null==t)return null;if("number"==typeof t){for(const s in Eb){const f=Eb[s];if(f.chainId===t)return{name:f.name,chainId:f.chainId,ensAddress:f.ensAddress||null,_defaultProvider:f._defaultProvider||null}}return{chainId:t,name:"unknown"}}if("string"==typeof t){const s=Eb[t];return null==s?null:{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress,_defaultProvider:s._defaultProvider||null}}const e=Eb[t.name];if(!e)return"number"!=typeof t.chainId&&$I.throwArgumentError("invalid network chainId","network",t),t;0!==t.chainId&&t.chainId!==e.chainId&&$I.throwArgumentError("network chainId mismatch","network",t);let n=t._defaultProvider||null;return null==n&&e._defaultProvider&&(n=function Jz(t){return t&&"function"==typeof t.renetwork}(e._defaultProvider)?e._defaultProvider.renetwork(t):e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:n}}(e??"homestead")}ccipReadFetch(e,n,s){return gr(this,void 0,void 0,function*(){if(this.disableCcipRead||0===s.length)return null;const f=e.to.toLowerCase(),I=n.toLowerCase(),j=[];for(let q=0;q=0?null:JSON.stringify({data:I,sender:f}),be=yield G2({url:se,errorPassThrough:!0},fe,(Oe,Te)=>(Oe.status=Te.statusCode,Oe));if(be.data)return be.data;const _e=be.message||"unknown error";if(be.status>=400&&be.status<500)return Ir.throwError(`response not found during CCIP fetch: ${_e}`,zt.errors.SERVER_ERROR,{url:re,errorMessage:_e});j.push(_e)}return Ir.throwError(`error encountered during CCIP fetch: ${j.map(q=>JSON.stringify(q)).join(", ")}`,zt.errors.SERVER_ERROR,{urls:s,errorMessages:j})})}_getInternalBlockNumber(e){return gr(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const f=this._internalBlockNumber;try{const I=yield f;if(pm()-I.respTime<=e)return I.blockNumber;break}catch{if(this._internalBlockNumber===f)break}}const n=pm(),s=Ro({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(f=>null,f=>f)}).then(({blockNumber:f,networkError:I})=>{if(I)throw this._internalBlockNumber===s&&(this._internalBlockNumber=null),I;const j=pm();return(f=jn.from(f).toNumber()){this._internalBlockNumber===s&&(this._internalBlockNumber=null)}),(yield s).blockNumber})}poll(){return gr(this,void 0,void 0,function*(){const e=aV++,n=[];let s=null;try{s=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(f){return void this.emit("error",f)}if(this._setFastBlockNumber(s),this.emit("poll",e,s),s!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=s-1),Math.abs(this._emitted.block-s)>1e3)Ir.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${s})`),this.emit("error",Ir.makeError("network block skew detected",zt.errors.NETWORK_ERROR,{blockNumber:s,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",s);else for(let f=this._emitted.block+1;f<=s;f++)this.emit("block",f);this._emitted.block!==s&&(this._emitted.block=s,Object.keys(this._emitted).forEach(f=>{if("block"===f)return;const I=this._emitted[f];"pending"!==I&&s-I>12&&delete this._emitted[f]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=s-1),this._events.forEach(f=>{switch(f.type){case"tx":{const I=f.hash;let j=this.getTransactionReceipt(I).then(q=>(!q||null==q.blockNumber||(this._emitted["t:"+I]=q.blockNumber,this.emit(I,q)),null)).catch(q=>{this.emit("error",q)});n.push(j);break}case"filter":if(!f._inflight){f._inflight=!0,-2===f._lastBlockNumber&&(f._lastBlockNumber=s-1);const I=f.filter;I.fromBlock=f._lastBlockNumber+1,I.toBlock=s;const j=I.toBlock-this._maxFilterBlockRange;j>I.fromBlock&&(I.fromBlock=j),I.fromBlock<0&&(I.fromBlock=0);const q=this.getLogs(I).then(re=>{f._inflight=!1,0!==re.length&&re.forEach(se=>{se.blockNumber>f._lastBlockNumber&&(f._lastBlockNumber=se.blockNumber),this._emitted["b:"+se.blockHash]=se.blockNumber,this._emitted["t:"+se.transactionHash]=se.blockNumber,this.emit(I,se)})}).catch(re=>{this.emit("error",re),f._inflight=!1});n.push(q)}}}),this._lastBlockNumber=s,Promise.all(n).then(()=>{this.emit("didPoll",e)}).catch(f=>{this.emit("error",f)})}else this.emit("didPoll",e)})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return gr(this,void 0,void 0,function*(){return Ir.throwError("provider does not support network detection",zt.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return gr(this,void 0,void 0,function*(){const e=yield this._ready(),n=yield this.detectNetwork();if(e.chainId!==n.chainId){if(this.anyNetwork)return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,e),yield oD(0),this._network;const s=Ir.makeError("underlying network changed",zt.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:n});throw this.emit("error",s),s}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=pm();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(n=>((null==this._fastBlockNumber||n>this._fastBlockNumber)&&(this._fastBlockNumber=n),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,n,s){return gr(this,void 0,void 0,function*(){return this._waitForTransaction(e,n??1,s||0,null)})}_waitForTransaction(e,n,s,f){return gr(this,void 0,void 0,function*(){const I=yield this.getTransactionReceipt(e);return(I?I.confirmations:0)>=n?I:new Promise((j,q)=>{const re=[];let se=!1;const fe=function(){return!!se||(se=!0,re.forEach(_e=>{_e()}),!1)},be=_e=>{_e.confirmations{this.removeListener(e,be)}),f){let _e=f.startBlock,Oe=null;const Te=Be=>gr(this,void 0,void 0,function*(){se||(yield oD(1e3),this.getTransactionCount(f.from).then(Fe=>gr(this,void 0,void 0,function*(){if(!se){if(Fe<=f.nonce)_e=Be;else{{const Ke=yield this.getTransaction(e);if(Ke&&null!=Ke.blockNumber)return}for(null==Oe&&(Oe=_e-3,Oe{se||this.once("block",Te)}))});if(se)return;this.once("block",Te),re.push(()=>{this.removeListener("block",Te)})}if("number"==typeof s&&s>0){const _e=setTimeout(()=>{fe()||q(Ir.makeError("timeout exceeded",zt.errors.TIMEOUT,{timeout:s}))},s);_e.unref&&_e.unref(),re.push(()=>{clearTimeout(_e)})}})})}getBlockNumber(){return gr(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return jn.from(e)}catch(n){return Ir.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:n})}})}getBalance(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),f=yield this.perform("getBalance",s);try{return jn.from(f)}catch(I){return Ir.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getBalance",params:s,result:f,error:I})}})}getTransactionCount(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),f=yield this.perform("getTransactionCount",s);try{return jn.from(f).toNumber()}catch(I){return Ir.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getTransactionCount",params:s,result:f,error:I})}})}getCode(e,n){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(n)}),f=yield this.perform("getCode",s);try{return pr(f)}catch(I){return Ir.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getCode",params:s,result:f,error:I})}})}getStorageAt(e,n,s){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const f=yield Ro({address:this._getAddress(e),blockTag:this._getBlockTag(s),position:Promise.resolve(n).then(j=>I2(j))}),I=yield this.perform("getStorageAt",f);try{return pr(I)}catch(j){return Ir.throwError("bad result from backend",zt.errors.SERVER_ERROR,{method:"getStorageAt",params:f,result:I,error:j})}})}_wrapTransaction(e,n,s){if(null!=n&&32!==rh(n))throw new Error("invalid response - sendTransaction");const f=e;return null!=n&&e.hash!==n&&Ir.throwError("Transaction hash mismatch from Provider.sendTransaction.",zt.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:n}),f.wait=(I,j)=>gr(this,void 0,void 0,function*(){let q;null==I&&(I=1),null==j&&(j=0),0!==I&&null!=s&&(q={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:s});const re=yield this._waitForTransaction(e.hash,I,j,q);return null==re&&0===I?null:(this._emitted["t:"+e.hash]=re.blockNumber,0===re.status&&Ir.throwError("transaction failed",zt.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:re}),re)}),f}sendTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Promise.resolve(e).then(I=>pr(I)),s=this.formatter.transaction(e);null==s.confirmations&&(s.confirmations=0);const f=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const I=yield this.perform("sendTransaction",{signedTransaction:n});return this._wrapTransaction(s,I,f)}catch(I){throw I.transaction=s,I.transactionHash=s.hash,I}})}_getTransactionRequest(e){return gr(this,void 0,void 0,function*(){const n=yield e,s={};return["from","to"].forEach(f=>{null!=n[f]&&(s[f]=Promise.resolve(n[f]).then(I=>I?this._getAddress(I):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(f=>{null!=n[f]&&(s[f]=Promise.resolve(n[f]).then(I=>I?jn.from(I):null))}),["type"].forEach(f=>{null!=n[f]&&(s[f]=Promise.resolve(n[f]).then(I=>I??null))}),n.accessList&&(s.accessList=this.formatter.accessList(n.accessList)),["data"].forEach(f=>{null!=n[f]&&(s[f]=Promise.resolve(n[f]).then(I=>I?pr(I):null))}),this.formatter.transactionRequest(yield Ro(s))})}_getFilter(e){return gr(this,void 0,void 0,function*(){e=yield e;const n={};return null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach(s=>{null!=e[s]&&(n[s]=e[s])}),["fromBlock","toBlock"].forEach(s=>{null!=e[s]&&(n[s]=this._getBlockTag(e[s]))}),this.formatter.filter(yield Ro(n))})}_call(e,n,s){return gr(this,void 0,void 0,function*(){s>=10&&Ir.throwError("CCIP read exceeded maximum redirections",zt.errors.SERVER_ERROR,{redirects:s,transaction:e});const f=e.to,I=yield this.perform("call",{transaction:e,blockTag:n});if(s>=0&&"latest"===n&&null!=f&&"0x556f1830"===I.substring(0,10)&&rh(I)%32==4)try{const j=Is(I,4),q=Is(j,0,32);jn.from(q).eq(f)||Ir.throwError("CCIP Read sender did not match",zt.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:I});const re=[],se=jn.from(Is(j,32,64)).toNumber(),fe=jn.from(Is(j,se,se+32)).toNumber(),be=Is(j,se+32);for(let Ke=0;Kegr(this,void 0,void 0,function*(){const I=yield this.perform("getBlock",f);if(null==I)return null!=f.blockHash&&null==this._emitted["b:"+f.blockHash]||null!=f.blockTag&&s>this._emitted.block?null:void 0;if(n){let j=null;for(let re=0;rethis._wrapTransaction(re)),q}return this.formatter.block(I)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return fm(()=>gr(this,void 0,void 0,function*(){const s=yield this.perform("getTransaction",n);if(null==s)return null==this._emitted["t:"+e]?null:void 0;const f=this.formatter.transactionResponse(s);if(null==f.blockNumber)f.confirmations=0;else if(null==f.confirmations){let j=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-f.blockNumber+1;j<=0&&(j=1),f.confirmations=j}return this._wrapTransaction(f)}),{oncePoll:this})})}getTransactionReceipt(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const n={transactionHash:this.formatter.hash(e,!0)};return fm(()=>gr(this,void 0,void 0,function*(){const s=yield this.perform("getTransactionReceipt",n);if(null==s)return null==this._emitted["t:"+e]?null:void 0;if(null==s.blockHash)return;const f=this.formatter.receipt(s);if(null==f.blockNumber)f.confirmations=0;else if(null==f.confirmations){let j=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-f.blockNumber+1;j<=0&&(j=1),f.confirmations=j}return f}),{oncePoll:this})})}getLogs(e){return gr(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield Ro({filter:this._getFilter(e)}),s=yield this.perform("getLogs",n);return s.forEach(f=>{null==f.removed&&(f.removed=!1)}),kn.arrayOf(this.formatter.filterLog.bind(this.formatter))(s)})}getEtherPrice(){return gr(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return gr(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&Ir.throwArgumentError("invalid BlockTag","blockTag",e);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return n+=e,n<0&&(n=0),this.formatter.blockTag(n)}return this.formatter.blockTag(e)})}getResolver(e){return gr(this,void 0,void 0,function*(){let n=e;for(;;){if(""===n||"."===n||"eth"!==e&&"eth"===n)return null;const s=yield this._getResolver(n,"getResolver");if(null!=s){const f=new fD(this,s,e);return n===e||(yield f.supportsWildcard())?f:null}n=n.split(".").slice(1).join(".")}})}_getResolver(e,n){return gr(this,void 0,void 0,function*(){null==n&&(n="ENS");const s=yield this.getNetwork();s.ensAddress||Ir.throwError("network does not support ENS",zt.errors.UNSUPPORTED_OPERATION,{operation:n,network:s.name});try{const f=yield this.call({to:s.ensAddress,data:"0x0178b8bf"+bb(e).substring(2)});return this.formatter.callAddress(f)}catch{}return null})}resolveName(e){return gr(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(s){if(gi(e))throw s}"string"!=typeof e&&Ir.throwArgumentError("invalid ENS name","name",e);const n=yield this.getResolver(e);return n?yield n.getAddress():null})}lookupAddress(e){return gr(this,void 0,void 0,function*(){e=yield e;const n=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",s=yield this._getResolver(n,"lookupAddress");if(null==s)return null;const f=Ab(yield this.call({to:s,data:"0x691f3431"+bb(n).substring(2)}),0);return(yield this.resolveName(f))!=e?null:f})}getAvatar(e){return gr(this,void 0,void 0,function*(){let n=null;if(gi(e)){const I=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",j=yield this._getResolver(I,"getAvatar");if(!j)return null;n=new fD(this,j,I);try{const q=yield n.getAvatar();if(q)return q.url}catch(q){if(q.code!==zt.errors.CALL_EXCEPTION)throw q}try{const q=Ab(yield this.call({to:j,data:"0x691f3431"+bb(I).substring(2)}),0);n=yield this.getResolver(q)}catch(q){if(q.code!==zt.errors.CALL_EXCEPTION)throw q;return null}}else if(n=yield this.getResolver(e),!n)return null;const s=yield n.getAvatar();return null==s?null:s.url})}perform(e,n){return Ir.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(n=>n.pollable()).length>0}_addEventListener(e,n,s){const f=new iV(bp(e),n,s);return this._events.push(f),this._startEvent(f),this}on(e,n){return this._addEventListener(e,n,!1)}once(e,n){return this._addEventListener(e,n,!0)}emit(e,...n){let s=!1,f=[],I=bp(e);return this._events=this._events.filter(j=>j.tag!==I||(setTimeout(()=>{j.listener.apply(this,n)},0),s=!0,!j.once||(f.push(j),!1))),f.forEach(j=>{this._stopEvent(j)}),s}listenerCount(e){if(!e)return this._events.length;let n=bp(e);return this._events.filter(s=>s.tag===n).length}listeners(e){if(null==e)return this._events.map(s=>s.listener);let n=bp(e);return this._events.filter(s=>s.tag===n).map(s=>s.listener)}off(e,n){if(null==n)return this.removeAllListeners(e);const s=[];let f=!1,I=bp(e);return this._events=this._events.filter(j=>!(j.tag===I&&j.listener==n&&!f)||(f=!0,s.push(j),!1)),s.forEach(j=>{this._stopEvent(j)}),this}removeAllListeners(e){let n=[];if(null==e)n=this._events,this._events=[];else{const s=bp(e);this._events=this._events.filter(f=>f.tag!==s||(n.push(f),!1))}return n.forEach(s=>{this._stopEvent(s)}),this}}var gl=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};const io=new zt(ab),cV=["call","estimateGas"];function ym(t,e){if(null==t)return null;if("string"==typeof t.message&&t.message.match("reverted")){const n=gi(t.data)?t.data:null;if(!e||n)return{message:t.message,data:n}}if("object"==typeof t){for(const n in t){const s=ym(t[n],e);if(s)return s}return null}if("string"==typeof t)try{return ym(JSON.parse(t),e)}catch{}return null}function dD(t,e,n){const s=n.transaction||n.signedTransaction;if("call"===t){const I=ym(e,!0);if(I)return I.data;io.throwError("missing revert data in call exception; Transaction reverted without a reason string",zt.errors.CALL_EXCEPTION,{data:"0x",transaction:s,error:e})}if("estimateGas"===t){let I=ym(e.body,!1);null==I&&(I=ym(e,!1)),I&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{reason:I.message,method:t,transaction:s,error:e})}let f=e.message;throw e.code===zt.errors.SERVER_ERROR&&e.error&&"string"==typeof e.error.message?f=e.error.message:"string"==typeof e.body?f=e.body:"string"==typeof e.responseText&&(f=e.responseText),f=(f||"").toLowerCase(),f.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&io.throwError("insufficient funds for intrinsic transaction cost",zt.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:s}),f.match(/nonce (is )?too low/i)&&io.throwError("nonce has already been used",zt.errors.NONCE_EXPIRED,{error:e,method:t,transaction:s}),f.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&io.throwError("replacement fee too low",zt.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:s}),f.match(/only replay-protected/i)&&io.throwError("legacy pre-eip-155 transactions not supported",zt.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:s}),cV.indexOf(t)>=0&&f.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&io.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:s}),e}function hD(t){return new Promise(function(e){setTimeout(e,t)})}function lV(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function mm(t){return t&&t.toLowerCase()}const X2={};class pD extends O2{constructor(e,n,s){if(super(),e!==X2)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");Pr(this,"provider",n),null==s&&(s=0),"string"==typeof s?(Pr(this,"_address",this.provider.formatter.address(s)),Pr(this,"_index",null)):"number"==typeof s?(Pr(this,"_index",s),Pr(this,"_address",null)):io.throwArgumentError("invalid address or index","addressOrIndex",s)}connect(e){return io.throwError("cannot alter JSON-RPC Signer connection",zt.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new fV(X2,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&io.throwError("unknown account #"+this._index,zt.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Zs(e);const n=this.getAddress().then(s=>(s&&(s=s.toLowerCase()),s));if(null==e.gasLimit){const s=Zs(e);s.from=n,e.gasLimit=this.provider.estimateGas(s)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(s=>gl(this,void 0,void 0,function*(){if(null==s)return null;const f=yield this.provider.resolveName(s);return null==f&&io.throwArgumentError("provided ENS name resolves to null","tx.to",s),f}))),Ro({tx:Ro(e),sender:n}).then(({tx:s,sender:f})=>{null!=s.from?s.from.toLowerCase()!==f&&io.throwArgumentError("from address mismatch","transaction",e):s.from=f;const I=this.provider.constructor.hexlifyTransaction(s,{from:!0});return this.provider.send("eth_sendTransaction",[I]).then(j=>j,j=>("string"==typeof j.message&&j.message.match(/user denied/i)&&io.throwError("user rejected transaction",zt.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:s}),dD("sendTransaction",j,I)))})}signTransaction(e){return io.throwError("signing transactions is unsupported",zt.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return gl(this,void 0,void 0,function*(){const n=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),s=yield this.sendUncheckedTransaction(e);try{return yield fm(()=>gl(this,void 0,void 0,function*(){const f=yield this.provider.getTransaction(s);if(null!==f)return this.provider._wrapTransaction(f,s,n)}),{oncePoll:this.provider})}catch(f){throw f.transactionHash=s,f}})}signMessage(e){return gl(this,void 0,void 0,function*(){const n="string"==typeof e?dl(e):e,s=yield this.getAddress();try{return yield this.provider.send("personal_sign",[pr(n),s.toLowerCase()])}catch(f){throw"string"==typeof f.message&&f.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"signMessage",from:s,messageData:e}),f}})}_legacySignMessage(e){return gl(this,void 0,void 0,function*(){const n="string"==typeof e?dl(e):e,s=yield this.getAddress();try{return yield this.provider.send("eth_sign",[s.toLowerCase(),pr(n)])}catch(f){throw"string"==typeof f.message&&f.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:s,messageData:e}),f}})}_signTypedData(e,n,s){return gl(this,void 0,void 0,function*(){const f=yield Ea.resolveNames(e,n,s,j=>this.provider.resolveName(j)),I=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[I.toLowerCase(),JSON.stringify(Ea.getPayload(f.domain,n,f.value))])}catch(j){throw"string"==typeof j.message&&j.message.match(/user denied/i)&&io.throwError("user rejected signing",zt.errors.ACTION_REJECTED,{action:"_signTypedData",from:I,messageData:{domain:f.domain,types:n,value:f.value}}),j}})}unlock(e){return gl(this,void 0,void 0,function*(){const n=this.provider,s=yield this.getAddress();return n.send("personal_unlockAccount",[s.toLowerCase(),e,null])})}}class fV extends pD{sendTransaction(e){return this.sendUncheckedTransaction(e).then(n=>({hash:n,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:s=>this.provider.waitForTransaction(n,s)}))}}const dV={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class hV extends uV{constructor(e,n){let s=n;null==s&&(s=new Promise((f,I)=>{setTimeout(()=>{this.detectNetwork().then(j=>{f(j)},j=>{I(j)})},0)})),super(s),e||(e=am(this.constructor,"defaultUrl")()),Pr(this,"connection","string"==typeof e?Object.freeze({url:e}):Object.freeze(Zs(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return gl(this,void 0,void 0,function*(){yield hD(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(null!=e){const n=am(this.constructor,"getNetwork");try{return n(jn.from(e).toNumber())}catch(s){return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:s})}}return io.throwError("could not detect network",zt.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new pD(X2,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(n=>this.formatter.address(n)))}send(e,n){const s={method:e,params:n,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ih(s),provider:this});const f=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(f&&this._cache[e])return this._cache[e];const I=G2(this.connection,JSON.stringify(s),lV).then(j=>(this.emit("debug",{action:"response",request:s,response:j,provider:this}),j),j=>{throw this.emit("debug",{action:"response",error:j,request:s,provider:this}),j});return f&&(this._cache[e]=I,setTimeout(()=>{this._cache[e]=null},0)),I}prepareRequest(e,n){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[mm(n.address),n.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[mm(n.address),n.blockTag]];case"getCode":return["eth_getCode",[mm(n.address),n.blockTag]];case"getStorageAt":return["eth_getStorageAt",[mm(n.address),ro(n.position,32),n.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[n.signedTransaction]];case"getBlock":return n.blockTag?["eth_getBlockByNumber",[n.blockTag,!!n.includeTransactions]]:n.blockHash?["eth_getBlockByHash",[n.blockHash,!!n.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[n.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[n.transactionHash]];case"call":return["eth_call",[am(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0}),n.blockTag]];case"estimateGas":return["eth_estimateGas",[am(this.constructor,"hexlifyTransaction")(n.transaction,{from:!0})]];case"getLogs":return n.filter&&null!=n.filter.address&&(n.filter.address=mm(n.filter.address)),["eth_getLogs",[n.filter]]}return null}perform(e,n){return gl(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){const f=n.transaction;if(f&&null!=f.type&&jn.from(f.type).isZero()&&null==f.maxFeePerGas&&null==f.maxPriorityFeePerGas){const I=yield this.getFeeData();null==I.maxFeePerGas&&null==I.maxPriorityFeePerGas&&((n=Zs(n)).transaction=Zs(f),delete n.transaction.type)}}const s=this.prepareRequest(e,n);null==s&&io.throwError(e+" not implemented",zt.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(s[0],s[1])}catch(f){return dD(e,f,n)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,n=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=n,n.then(function(s){return function f(){e.send("eth_getFilterChanges",[s]).then(function(I){if(e._pendingFilter!=n)return null;let j=Promise.resolve();return I.forEach(function(q){e._emitted["t:"+q.toLowerCase()]="pending",j=j.then(function(){return e.getTransaction(q).then(function(re){return e.emit("pending",re),null})})}),j.then(function(){return hD(1e3)})}).then(function(){if(e._pendingFilter==n)return setTimeout(function(){f()},0),null;e.send("eth_uninstallFilter",[s])}).catch(I=>{})}(),s}).catch(s=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,n){const s=Zs(dV);if(n)for(const I in n)n[I]&&(s[I]=!0);!function EK(t,e){(!t||"object"!=typeof t)&&sb.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(n=>{e[n]||sb.throwArgumentError("invalid object key - "+n,"transaction:"+n,t)})}(e,s);const f={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(I){if(null==e[I])return;const j=I2(jn.from(e[I]));"gasLimit"===I&&(I="gas"),f[I]=j}),["from","to","data"].forEach(function(I){null!=e[I]&&(f[I]=pr(e[I]))}),e.accessList&&(f.accessList=lm(e.accessList)),f}}const gD=new zt(ab);let pV=1;function yD(t,e){const n="Web3LegacyFetcher";return function(s,f){const I={method:s,params:f,id:pV++,jsonrpc:"2.0"};return new Promise((j,q)=>{this.emit("debug",{action:"request",fetcher:n,request:ih(I),provider:this}),e(I,(re,se)=>{if(re)return this.emit("debug",{action:"response",fetcher:n,error:re,request:I,provider:this}),q(re);if(this.emit("debug",{action:"response",fetcher:n,request:I,response:se,provider:this}),se.error){const fe=new Error(se.error.message);return fe.code=se.error.code,fe.data=se.error.data,q(fe)}j(se.result)})})}}class mD extends hV{constructor(e,n){null==e&&gD.throwArgumentError("missing provider","provider",e);let s=null,f=null,I=null;"function"==typeof e?(s="unknown:",f=e):(s=e.host||e.path||"",!s&&e.isMetaMask&&(s="metamask"),I=e,e.request?(""===s&&(s="eip-1193:"),f=function gV(t){return function(e,n){null==n&&(n=[]);const s={method:e,params:n};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ih(s),provider:this}),t.request(s).then(f=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:s,response:f,provider:this}),f),f=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:s,error:f,provider:this}),f})}}(e)):e.sendAsync?f=yD(0,e.sendAsync.bind(e)):e.send?f=yD(0,e.send.bind(e)):gD.throwArgumentError("unsupported provider","provider",e),s||(s="unknown:")),super(s,n),Pr(this,"jsonRpcFetchFunc",f),Pr(this,"provider",I)}send(e,n){return this.jsonRpcFetchFunc(e,n)}}var yV=d(21087);const{Near:mV,Account:_b,KeyPair:q2,keyStores:{BrowserLocalStorageKeyStore:vV},transactions:{addKey:Fse,deleteKey:Use,functionCallAccessKey:Kse},utils:{PublicKey:bV,format:{parseNearAmount:sh}}}=lr,Sb="https://neth.app",EV={testnet:{FUNDING_ACCOUNT_ID:"neth.testnet",MAP_ACCOUNT_ID:"map.neth.testnet",ROOT_ACCOUNT_ID:"testnet"},mainnet:{MAP_ACCOUNT_ID:"nethmap.near",ROOT_ACCOUNT_ID:"near"}},Mb="__TX_ARGS_ATTEMPT",vm="__APP_KEY_SECRET",wp="__APP_KEY_ACCOUNT_ID",vD=(sh("0.4"),sh("0.49"),sh("0.5"),sh("0.05"),(t="")=>({getItem:e=>{const n=localStorage.getItem(t+e);if("{"!==n?.charAt(0))return n;try{return JSON.parse(n)}catch{}},setItem:(e,n)=>localStorage.setItem(t+e,"string"==typeof n?n:JSON.stringify(n)),removeItem:e=>localStorage.removeItem(t+e)})),DV=()=>({log:t=>console.log(...t)});let e_,t_,Ep,yl,os,Ap,Sa,Ib,bD;const n_=t=>pr(bV.fromString(t).data).substring(2),wD=t=>t.some(e=>{const n=e?.access_key?.permission?.FunctionCall;return null!==n.allowance&&"execute"===n.method_names[0]}),TV=function(){var t=(0,Le.Z)(function*(e,n){const{account:s,accountId:f}=yield ED(e,n),I=parseInt(yield s.viewFunction({contractId:f,methodName:"get_nonce"}),16).toString(),{publicKey:j,secretKey:q}=yield Cb(e,r_(f,I)),re=n_(j),se=[{type:"AddKey",public_key:re,allowance:sh("1"),receiver_id:f,method_names:"execute"}],fe=yield s.getAccessKeys();if(wD(fe)){const Oe=parseInt(yield s.viewFunction({contractId:f,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:Te}=yield Cb(e,r_(f,Oe)),Be=n_(Te);se.unshift({type:"DeleteKey",public_key:Be})}const be=yield Db(e,{nonce:I,receivers:[f],transactions:[{actions:se}]});return""!==(yield s.functionCall({contractId:f,methodName:"execute",args:be,gas:t_}))?.status?.SuccessValue?yl.log("App key rotation unsuccessful. Please refresh the page and try again."):(yield os.removeItem(vm),yield os.removeItem(wp),{publicKey:re,secretKey:q})});return function(n,s){return t.apply(this,arguments)}}(),ED=function(){var t=(0,Le.Z)(function*(e,n,s=!1){let f,I=yield os.getItem("__ATTEMPT_SECRET_KEY");if(I)f=yield os.getItem("__ATTEMPT_ACCOUNT_ID");else{f=yield ID(n);const{secretKey:fe}=yield Cb(e,OV(f,s));I=fe}const j=new _b(Ap,f),q=q2.fromString(I),re=q.getPublicKey().toString();return(yield j.getAccessKeys()).some(({public_key:fe})=>re===fe)?(Ep.setKey(Sa,f,q),{account:j,accountId:f,secretKey:I}):yield ED(e,n,!0)});return function(n,s){return t.apply(this,arguments)}}(),r_=(t,e)=>({WARNING:`Creating key for: ${t}`,nonce:e,description:"ONLY sign this on apps you trust! This key CAN use up to 1 N for transactions."}),OV=(t,e)=>({WARNING:`Creates a key with access to your (new) paired NEAR Account: ${t}`,description:`ONLY sign this message on this website: ${e?"neardefi.github.io/neth":Sb}`}),i_={name:"NETH",version:"1",chainId:1313161554},SD=t=>t.map(e=>{const n="string"==typeof e?e:Object.entries(e).map(([f,I])=>`|NETH_${f}:${"string"==typeof I?I:JSON.stringify(I)}_NETH|`).join("");return"NETH"+n.length.toString().padStart(8,"0")+"__"+n}).join(""),Db=function(){var t=(0,Le.Z)(function*(e,n){const f={Transaction:[]};if(Object.entries(n).forEach(([q])=>{f.Transaction.push({type:"string",name:q})}),n.transactions&&(Object.values(n.transactions).forEach((q,re)=>{q.actions.forEach(se=>{if(se.args){if(Buffer.isBuffer(se.args))return void(se.args="0x"+se.args.toString("hex"));Object.entries(se.args).forEach(([fe,be])=>{/receiver_id|account_id/g.test(fe)&&(se.args[fe]="|~-_NETH~-_-~RECEIVER_-~|",n.receivers.splice(re+1,0,be))})}})}),n.transactions=SD(n.transactions.map(({actions:q})=>SD(q)))),n.receivers){const q=n.receivers.length.toString();n.receivers="NETH"+n.receivers.join(",").length.toString().padStart(8,"0")+"__"+n.receivers.join(","),n.receivers=n.receivers.substring(0,4)+q.padStart(3,"0")+n.receivers.substring(7)}return{sig:yield e._signTypedData(i_,f,n),msg:n}});return function(n,s){return t.apply(this,arguments)}}(),Cb=function(){var t=(0,Le.Z)(function*(e,n){const{sig:s}=yield Db(e,n),f=T2(s);return(0,yV.generateSeedPhrase)(f.substring(2,34))});return function(n,s){return t.apply(this,arguments)}}(),MD=function(){var t=(0,Le.Z)(function*(){if(!(yield E2()()))return alert("Please install/activate MetaMask and try again.");try{yield window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+i_.chainId.toString(16)}]})}catch(I){if(yl.log(I),4902!==(I?.code||I?.data?.originalError?.code))throw I;try{yield window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0x"+i_.chainId.toString(16),chainName:"Aurora Mainnet",nativeCurrency:{name:"Ethereum",symbol:"ETH",decimals:18},blockExplorerUrls:["https://explorer.mainnet.aurora.dev/"],rpcUrls:["https://mainnet.aurora.dev"]}]})}catch(q){throw alert('Error adding chain. Please click "Choose Ethereum Account" and add the Aurora Network to continue.'),q}}const n=new mD(window.ethereum);0===(yield n.listAccounts()).length&&(yield n.send("eth_requestAccounts",[]));const f=n.getSigner();return{signer:f,ethAddress:yield f.getAddress()}});return function(){return t.apply(this,arguments)}}(),RV=function(){var t=(0,Le.Z)(function*(){yield(yield E2()()).send("wallet_requestPermissions",[{eth_accounts:{}}]);const s=new mD(window.ethereum).getSigner();return{signer:s,ethAddress:yield s.getAddress()}});return function(){return t.apply(this,arguments)}}(),ID=function(){var t=(0,Le.Z)(function*(e){return Ib.viewFunction({contractId:EV[Sa].MAP_ACCOUNT_ID,methodName:"get_near",args:{eth_address:e}})});return function(n){return t.apply(this,arguments)}}(),_p=function(){var t=(0,Le.Z)(function*(){const e=yield os.getItem(vm),n=yield os.getItem(wp);if(!e||!n){const I=yield MD();return!!(yield DD(I))&&(yield _p())}const s=new _b(Ap,n),f=q2.fromString(e);return Ep.setKey(Sa,n,f),{account:s,accountId:n,keyPair:f,secretKey:e}});return function(){return t.apply(this,arguments)}}(),kV=_p,LV=function(){var t=(0,Le.Z)(function*(){const e=yield os.getItem(wp);return e?(yield os.removeItem(vm),yield os.removeItem(wp),{accountId:e}):yl.log("already signed out")});return function(){return t.apply(this,arguments)}}(),BV=function(){var t=(0,Le.Z)(function*({message:e,provider:n,account:s}){let f;if(s)({accountId:f}=s);else{const _e=yield _p();_e&&({account:s,accountId:f}=_e)}if(!s)throw new Error("Wallet not signed in");const I=yield s.connection.signer.getPublicKey(f,Sa),j=Buffer.from(I.data).toString("base64"),se={accountId:f,message:e,blockId:(yield n.block({finality:"final"})).header.hash,publicKey:j,keyType:I.keyType},fe=JSON.stringify(se),be=yield s.connection.signer.signMessage(new Uint8Array(Buffer.from(fe)),f,Sa);return{...se,signature:Buffer.from(be.signature).toString("base64")}});return function(n){return t.apply(this,arguments)}}(),jV=function(){var t=(0,Le.Z)(function*(){const e=vD("near-wallet-selector:neth:");return!!(yield e.getItem(vm))||!!(yield e.getItem(wp))});return function(){return t.apply(this,arguments)}}(),DD=function(){var t=(0,Le.Z)(function*({signer:e,ethAddress:n}){const s=yield ID(n);if(!s){if(window.confirm(`Ethereum account ${n} is not connected to a NETH account. Would you like to try another Ethereum account?`)){try{const{signer:_e,ethAddress:Oe}=yield RV();return yield DD({signer:_e,ethAddress:Oe})}catch(_e){yl.log(_e)}return}const be=`${Sb}/${"testnet"===Sa?"?network=testnet":""}`;window.prompt("We couldn't find a NETH account. To set up a NETH account visit",be)}const f=parseInt(yield Ib.viewFunction({contractId:s,methodName:"get_app_key_nonce"}),16).toString(),{publicKey:I,secretKey:j}=yield Cb(e,r_(s,f)),q=new _b(Ap,s),re=yield q.getAccessKeys();wD(re)||(yield TV(e,n));const se=q2.fromString(j);return Ep.setKey(Sa,s,se),yield os.setItem(vm,j),yield os.setItem(wp,q.accountId),{publicKey:I,secretKey:j,account:q}});return function(n){return t.apply(this,arguments)}}(),CD=function(){var t=(0,Le.Z)(function*(){const e=yield _p();if(!e)return void yl.log("NETH: ERROR broadcasting tx. No account found.");const{account:n,accountId:s}=e,f=yield os.getItem(Mb);if(!f||0===f.length)return;const I=[];for(;f.length>0;){const j=f.shift();yl.log("NETH: broadcasting tx",j);try{const q=yield n.functionCall({contractId:s,methodName:"execute",args:j,gas:t_});yield os.setItem(Mb,f),I.push(q)}catch(q){yl.log("NETH: ERROR broadcasting tx",q)}}return yield os.removeItem(Mb),I});return function(){return t.apply(this,arguments)}}(),FV=function(){var t=(0,Le.Z)(function*({transactions:e,bundle:n}){const s=yield MD(),{signer:f}=s,I=yield _p();if(!I)return void yl.log("NETH: ERROR signing and sending transactions. No account found.");const{account:j,accountId:q}=I,re=e.map(({receiverId:Oe})=>Oe),se=e.map(({receiverId:Oe,actions:Te})=>({actions:UV(Te,q,Oe)})),fe=parseInt(yield j.viewFunction({contractId:q,methodName:"get_nonce"}),16),be=[];if(n)be.push(yield Db(f,{nonce:fe.toString(),receivers:re,transactions:se}));else for(let Oe=0;Oet.map(s=>{const{enum:f}=s,{gas:I,publicKey:j,methodName:q,args:re,deposit:se,accessKey:fe,code:be}=s[f]||s,_e={type:f&&f[0].toUpperCase()+f.substr(1)||"FunctionCall",gas:I&&I.toString()||void 0,public_key:j&&n_(j)||void 0,method_name:q,args:re||void 0,code:be||void 0,amount:se&&se.toString()||void 0,permission:void 0};if(Object.keys(_e).forEach(Oe=>{void 0===_e[Oe]&&delete _e[Oe]}),fe)if(n===e)_e.allowance=sh("1"),_e.method_names="execute",_e.receiver_id=e;else if("functionCall"===fe.permission.enum){const{receiverId:Oe,methodNames:Te,allowance:Be}=fe.permission.functionCall;_e.receiver_id=Oe,_e.allowance=Be&&Be.toString()||sh("0.25"),_e.method_names=Te.join(",")}return _e}),KV=function(){var t=(0,Le.Z)(function*(){return yield E2()({timeout:100}),!!window.ethereum});return function(){return t.apply(this,arguments)}}();let OD,TD=!0,o_=!1;const zV=function(){var t=(0,Le.Z)(function*({metadata:e,logger:n,store:s,storage:f,options:I,provider:j}){const q=(({network:t,gas:e="200000000000000",logger:n=DV(),storage:s=vD()})=>{t_=e,yl=n,os=s,Ep=new vV,e_=new mV({...t,keyStore:Ep}),Ap=e_.connection,Sa=t.networkId,Ib=new _b(Ap,"mainnet"===Sa?"near":Sa),bD="mainnet"===Sa?".near":"."+Sa;const f=document.createElement("div");return f.style.display="none",f.style.width="100%",f.style.height="100vh",f.style.zIndex="999999",f.style.position="fixed",f.style.top="0",f.style.background="rgba(0, 0, 0, 0.5)",document.body.appendChild(f),CD(),f})({network:I.network,gas:OD,logger:n,storage:f}),se=be=>{if(!(be=>be.every(_e=>"FunctionCall"===_e.type))(be))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return be.map(Oe=>Oe.params)},fe=function(){var be=(0,Le.Z)(function*(_e){n.log("NETH:signAndSendTransactions",{transactions:_e});const{contract:Oe}=s.getState();if(!(yield jV())||!Oe)throw new Error("Wallet not signed in");o_&&(q.style.display="block");const Te=_e.map(({receiverId:Fe,actions:Ke})=>({receiverId:Fe||Oe.contractId,actions:se(Ke)}));let Be;try{Be=yield FV({transactions:Te,bundle:TD})}catch(Fe){throw n.log("NETH:signAndSendTransactions Error",Fe),Fe}return o_&&(q.style.display="none"),Be});return function(Oe){return be.apply(this,arguments)}}();return{signIn:()=>(0,Le.Z)(function*(){let be;try{if(be=yield kV(),!be)return[]}catch(_e){if(!/not connected/.test(_e.toString()))throw _e}return[be]})(),signOut:()=>(0,Le.Z)(function*(){yield LV()})(),verifyOwner:({message:be})=>(0,Le.Z)(function*(){return n.log("NETH:verifyOwner",{message:be}),BV({message:be,provider:j,account:null})})(),getAccounts:()=>(0,Le.Z)(function*(){const be=yield _p();if(!be)return n.log("NETH:getAccounts"),[];const{account:_e,accountId:Oe}=be;return[{accountId:Oe,publicKey:(yield _e.connection.signer.getPublicKey(_e.accountId,I.network.networkId)).toString()}]})(),signAndSendTransaction:(be=(0,Le.Z)(function*({receiverId:_e,actions:Oe}){return fe([{receiverId:_e,actions:Oe}])}),function(Oe){return be.apply(this,arguments)}),signAndSendTransactions:function(){var be=(0,Le.Z)(function*({transactions:_e}){return fe(_e)});return function(Oe){return be.apply(this,arguments)}}()};var be});return function(n){return t.apply(this,arguments)}}();function xD({iconUrl:t=oK,gas:e,useModalCover:n=!1,bundle:s=!0,deprecated:f=!1}={}){return(0,Le.Z)(function*(){if(o_=n,OD=e,TD=s,F4()())return null;const j=yield KV();return{id:"neth",type:"injected",metadata:{name:"NETH Account",description:null,iconUrl:t,downloadUrl:Sb,deprecated:!1,available:j},deprecated:f,init:zV}})}const VV=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,HV=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,WV=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function GV(t,e){if(!("__proto__"===t||"constructor"===t&&e&&"object"==typeof e&&"prototype"in e))return e;(function ZV(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)})(t)}function bm(t,e={}){if("string"!=typeof t)return t;const n=t.trim();if('"'===t[0]&&'"'===t.at(-1)&&!t.includes("\\"))return n.slice(1,-1);if(n.length<=9){const s=n.toLowerCase();if("true"===s)return!0;if("false"===s)return!1;if("undefined"===s)return;if("null"===s)return null;if("nan"===s)return Number.NaN;if("infinity"===s)return Number.POSITIVE_INFINITY;if("-infinity"===s)return Number.NEGATIVE_INFINITY}if(!WV.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(VV.test(t)||HV.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,GV)}return JSON.parse(t)}catch(s){if(e.strict)throw s;return t}}function Mo(t,...e){try{return function JV(t){return t&&"function"==typeof t.then?t:Promise.resolve(t)}(t(...e))}catch(n){return Promise.reject(n)}}function Tb(t){if(function YV(t){const e=typeof t;return null===t||"object"!==e&&"function"!==e}(t))return String(t);if(function $V(t){const e=Object.getPrototypeOf(t);return!e||e.isPrototypeOf(Object)}(t)||Array.isArray(t))return JSON.stringify(t);if("function"==typeof t.toJSON)return Tb(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function PD(){if(void 0===typeof Buffer)throw new TypeError("[unstorage] Buffer is not supported!")}const s_="base64:";function Ys(t){return t?t.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function eH(...t){return Ys(t.join(":"))}function wm(t){return(t=Ys(t))?t+":":""}const nH=()=>{const t=new Map;return{name:"memory",options:{},hasItem:e=>t.has(e),getItem:e=>t.get(e)??null,getItemRaw:e=>t.get(e)??null,setItem(e,n){t.set(e,n)},setItemRaw(e,n){t.set(e,n)},removeItem(e){t.delete(e)},getKeys:()=>Array.from(t.keys()),clear(){t.clear()},dispose(){t.clear()}}};function rH(t={}){const e={mounts:{"":t.driver||nH()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=se=>{for(const fe of e.mountpoints)if(se.startsWith(fe))return{base:fe,relativeKey:se.slice(fe.length),driver:e.mounts[fe]};return{base:"",relativeKey:se,driver:e.mounts[""]}},s=(se,fe)=>e.mountpoints.filter(be=>be.startsWith(se)||fe&&se.startsWith(be)).map(be=>({relativeBase:se.length>be.length?se.slice(be.length):void 0,mountpoint:be,driver:e.mounts[be]})),f=(se,fe)=>{if(e.watching){fe=Ys(fe);for(const be of e.watchListeners)be(se,fe)}},I=function(){var se=(0,Le.Z)(function*(){if(!e.watching){e.watching=!0;for(const fe in e.mounts)e.unwatch[fe]=yield ND(e.mounts[fe],f,fe)}});return function(){return se.apply(this,arguments)}}(),j=function(){var se=(0,Le.Z)(function*(){if(e.watching){for(const fe in e.unwatch)yield e.unwatch[fe]();e.unwatch={},e.watching=!1}});return function(){return se.apply(this,arguments)}}(),q=(se,fe,be)=>{const _e=new Map,Oe=Te=>{let Be=_e.get(Te.base);return Be||(Be={driver:Te.driver,base:Te.base,items:[]},_e.set(Te.base,Be)),Be};for(const Te of se){const Be="string"==typeof Te,Fe=Ys(Be?Te:Te.key),Ke=Be?void 0:Te.value,et=Be||!Te.options?fe:{...fe,...Te.options},Ye=n(Fe);Oe(Ye).items.push({key:Fe,value:Ke,relativeKey:Ye.relativeKey,options:et})}return Promise.all([..._e.values()].map(Te=>be(Te))).then(Te=>Te.flat())},re={hasItem(se,fe={}){se=Ys(se);const{relativeKey:be,driver:_e}=n(se);return Mo(_e.hasItem,be,fe)},getItem(se,fe={}){se=Ys(se);const{relativeKey:be,driver:_e}=n(se);return Mo(_e.getItem,be,fe).then(Oe=>bm(Oe))},getItems:(se,fe)=>q(se,fe,be=>be.driver.getItems?Mo(be.driver.getItems,be.items.map(_e=>({key:_e.relativeKey,options:_e.options})),fe).then(_e=>_e.map(Oe=>({key:eH(be.base,Oe.key),value:bm(Oe.value)}))):Promise.all(be.items.map(_e=>Mo(be.driver.getItem,_e.relativeKey,_e.options).then(Oe=>({key:_e.key,value:bm(Oe)}))))),getItemRaw(se,fe={}){se=Ys(se);const{relativeKey:be,driver:_e}=n(se);return _e.getItemRaw?Mo(_e.getItemRaw,be,fe):Mo(_e.getItem,be,fe).then(Oe=>function XV(t){return"string"==typeof t&&t.startsWith(s_)?(PD(),Buffer.from(t.slice(s_.length),"base64")):t}(Oe))},setItem:(se,fe,be={})=>(0,Le.Z)(function*(){if(void 0===fe)return re.removeItem(se);se=Ys(se);const{relativeKey:_e,driver:Oe}=n(se);Oe.setItem&&(yield Mo(Oe.setItem,_e,Tb(fe),be),Oe.watch||f("update",se))})(),setItems:(se,fe)=>(0,Le.Z)(function*(){yield q(se,fe,function(){var be=(0,Le.Z)(function*(_e){_e.driver.setItems&&(yield Mo(_e.driver.setItems,_e.items.map(Oe=>({key:Oe.relativeKey,value:Tb(Oe.value),options:Oe.options})),fe)),_e.driver.setItem&&(yield Promise.all(_e.items.map(Oe=>Mo(_e.driver.setItem,Oe.relativeKey,Tb(Oe.value),Oe.options))))});return function(_e){return be.apply(this,arguments)}}())})(),setItemRaw:(se,fe,be={})=>(0,Le.Z)(function*(){if(void 0===fe)return re.removeItem(se,be);se=Ys(se);const{relativeKey:_e,driver:Oe}=n(se);if(Oe.setItemRaw)yield Mo(Oe.setItemRaw,_e,fe,be);else{if(!Oe.setItem)return;yield Mo(Oe.setItem,_e,function QV(t){if("string"==typeof t)return t;PD();const e=Buffer.from(t).toString("base64");return s_+e}(fe),be)}Oe.watch||f("update",se)})(),removeItem:(se,fe={})=>(0,Le.Z)(function*(){"boolean"==typeof fe&&(fe={removeMeta:fe}),se=Ys(se);const{relativeKey:be,driver:_e}=n(se);_e.removeItem&&(yield Mo(_e.removeItem,be,fe),(fe.removeMeta||fe.removeMata)&&(yield Mo(_e.removeItem,be+"$",fe)),_e.watch||f("remove",se))})(),getMeta:(se,fe={})=>(0,Le.Z)(function*(){"boolean"==typeof fe&&(fe={nativeOnly:fe}),se=Ys(se);const{relativeKey:be,driver:_e}=n(se),Oe=Object.create(null);if(_e.getMeta&&Object.assign(Oe,yield Mo(_e.getMeta,be,fe)),!fe.nativeOnly){const Te=yield Mo(_e.getItem,be+"$",fe).then(Be=>bm(Be));Te&&"object"==typeof Te&&("string"==typeof Te.atime&&(Te.atime=new Date(Te.atime)),"string"==typeof Te.mtime&&(Te.mtime=new Date(Te.mtime)),Object.assign(Oe,Te))}return Oe})(),setMeta(se,fe,be={}){return this.setItem(se+"$",fe,be)},removeMeta(se,fe={}){return this.removeItem(se+"$",fe)},getKeys:(se,fe={})=>(0,Le.Z)(function*(){se=wm(se);const be=s(se,!0);let _e=[];const Oe=[];for(const Te of be){const Fe=(yield Mo(Te.driver.getKeys,Te.relativeBase,fe)).map(Ke=>Te.mountpoint+Ys(Ke)).filter(Ke=>!_e.some(et=>Ke.startsWith(et)));Oe.push(...Fe),_e=[Te.mountpoint,..._e.filter(Ke=>!Ke.startsWith(Te.mountpoint))]}return se?Oe.filter(Te=>Te.startsWith(se)&&!Te.endsWith("$")):Oe.filter(Te=>!Te.endsWith("$"))})(),clear:(se,fe={})=>(0,Le.Z)(function*(){se=wm(se),yield Promise.all(s(se,!1).map(function(){var be=(0,Le.Z)(function*(_e){if(_e.driver.clear)return Mo(_e.driver.clear,_e.relativeBase,fe);if(_e.driver.removeItem){const Oe=yield _e.driver.getKeys(_e.relativeBase||"",fe);return Promise.all(Oe.map(Te=>_e.driver.removeItem(Te,fe)))}});return function(_e){return be.apply(this,arguments)}}()))})(),dispose:()=>(0,Le.Z)(function*(){yield Promise.all(Object.values(e.mounts).map(se=>RD(se)))})(),watch:se=>(0,Le.Z)(function*(){return yield I(),e.watchListeners.push(se),(0,Le.Z)(function*(){e.watchListeners=e.watchListeners.filter(fe=>fe!==se),0===e.watchListeners.length&&(yield j())})})(),unwatch:()=>(0,Le.Z)(function*(){e.watchListeners=[],yield j()})(),mount(se,fe){if((se=wm(se))&&e.mounts[se])throw new Error(`already mounted at ${se}`);return se&&(e.mountpoints.push(se),e.mountpoints.sort((be,_e)=>_e.length-be.length)),e.mounts[se]=fe,e.watching&&Promise.resolve(ND(fe,f,se)).then(be=>{e.unwatch[se]=be}).catch(console.error),re},unmount:(se,fe=!0)=>(0,Le.Z)(function*(){(se=wm(se))&&e.mounts[se]&&(e.watching&&se in e.unwatch&&(e.unwatch[se](),delete e.unwatch[se]),fe&&(yield RD(e.mounts[se])),e.mountpoints=e.mountpoints.filter(be=>be!==se),delete e.mounts[se])})(),getMount(se=""){se=Ys(se)+":";const fe=n(se);return{driver:fe.driver,base:fe.base}},getMounts:(se="",fe={})=>(se=Ys(se),s(se,fe.parents).map(_e=>({driver:_e.driver,base:_e.mountpoint})))};return re}function ND(t,e,n){return t.watch?t.watch((s,f)=>e(s,n+f)):()=>{}}function RD(t){return c_.apply(this,arguments)}function c_(){return c_=(0,Le.Z)(function*(t){"function"==typeof t.dispose&&(yield Mo(t.dispose))}),c_.apply(this,arguments)}function $s(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function kD(t,e){const n=indexedDB.open(t);n.onupgradeneeded=()=>n.result.createObjectStore(e);const s=$s(n);return(f,I)=>s.then(j=>I(j.transaction(e,f).objectStore(e)))}let l_;function Pu(){return l_||(l_=kD("keyval-store","keyval")),l_}function LD(t,e=Pu()){return e("readonly",n=>$s(n.get(t)))}function f_(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},$s(t.transaction)}function BD(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch{return t}}function jD(t){return"string"==typeof t?t:JSON.stringify(t)}var cH=(t={})=>{const e=t.base&&t.base.length>0?`${t.base}:`:"",n=f=>e+f;let s;return t.dbName&&t.storeName&&(s=kD(t.dbName,t.storeName)),{name:"idb-keyval",options:t,hasItem:f=>(0,Le.Z)(function*(){return!(typeof(yield LD(n(f),s))>"u")})(),getItem:f=>(0,Le.Z)(function*(){return(yield LD(n(f),s))??null})(),setItem:(f,I)=>function iH(t,e,n=Pu()){return n("readwrite",s=>(s.put(e,t),$s(s.transaction)))}(n(f),I,s),removeItem:f=>function oH(t,e=Pu()){return e("readwrite",n=>(n.delete(t),$s(n.transaction)))}(n(f),s),getKeys:()=>function aH(t=Pu()){return t("readonly",e=>{if(e.getAllKeys)return $s(e.getAllKeys());const n=[];return f_(e,s=>n.push(s.key)).then(()=>n)})}(s),clear:()=>function sH(t=Pu()){return t("readwrite",e=>(e.clear(),$s(e.transaction)))}(s)}};class dH{constructor(){this.indexedDb=rH({driver:cH({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}getKeys(){var e=this;return(0,Le.Z)(function*(){return e.indexedDb.getKeys()})()}getEntries(){var e=this;return(0,Le.Z)(function*(){return(yield e.indexedDb.getItems(yield e.indexedDb.getKeys())).map(n=>[n.key,n.value])})()}getItem(e){var n=this;return(0,Le.Z)(function*(){const s=yield n.indexedDb.getItem(e);if(null!==s)return s})()}setItem(e,n){var s=this;return(0,Le.Z)(function*(){yield s.indexedDb.setItem(e,jD(n))})()}removeItem(e){var n=this;return(0,Le.Z)(function*(){yield n.indexedDb.removeItem(e)})()}}var d_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ob={exports:{}};function hH(t){var e;return[t[0],BD(null!=(e=t[1])?e:"")]}!function(){let t;function e(){}t=e,t.prototype.getItem=function(n){return this.hasOwnProperty(n)?String(this[n]):null},t.prototype.setItem=function(n,s){this[n]=String(s)},t.prototype.removeItem=function(n){delete this[n]},t.prototype.clear=function(){const n=this;Object.keys(n).forEach(function(s){n[s]=void 0,delete n[s]})},t.prototype.key=function(n){return n=n||0,Object.keys(this)[n]},t.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof d_<"u"&&d_.localStorage?Ob.exports=d_.localStorage:typeof window<"u"&&window.localStorage?Ob.exports=window.localStorage:Ob.exports=new e}();class pH{constructor(){this.localStorage=Ob.exports}getKeys(){var e=this;return(0,Le.Z)(function*(){return Object.keys(e.localStorage)})()}getEntries(){var e=this;return(0,Le.Z)(function*(){return Object.entries(e.localStorage).map(hH)})()}getItem(e){var n=this;return(0,Le.Z)(function*(){const s=n.localStorage.getItem(e);if(null!==s)return BD(s)})()}setItem(e,n){var s=this;return(0,Le.Z)(function*(){s.localStorage.setItem(e,jD(n))})()}removeItem(e){var n=this;return(0,Le.Z)(function*(){n.localStorage.removeItem(e)})()}}const yH=function(){var t=(0,Le.Z)(function*(e,n,s){const f="wc_storage_version",I=yield n.getItem(f);if(I&&I>=1)return void s(n);const j=yield e.getKeys();if(!j.length)return void s(n);const q=[];for(;j.length;){const re=j.shift();if(!re)continue;const se=re.toLowerCase();if(se.includes("wc@")||se.includes("walletconnect")||se.includes("wc_")||se.includes("wallet_connect")){const fe=yield e.getItem(re);yield n.setItem(re,fe),q.push(re)}}yield n.setItem(f,1),s(n),mH(e,q)});return function(n,s,f){return t.apply(this,arguments)}}(),mH=function(){var t=(0,Le.Z)(function*(e,n){n.length&&n.forEach(function(){var s=(0,Le.Z)(function*(f){yield e.removeItem(f)});return function(f){return s.apply(this,arguments)}}())});return function(n,s){return t.apply(this,arguments)}}();class vH{constructor(){this.initialized=!1,this.setInitialized=n=>{this.storage=n,this.initialized=!0};const e=new pH;this.storage=e;try{const n=new dH;yH(e,n,this.setInitialized)}catch{this.initialized=!0}}getKeys(){var e=this;return(0,Le.Z)(function*(){return yield e.initialize(),e.storage.getKeys()})()}getEntries(){var e=this;return(0,Le.Z)(function*(){return yield e.initialize(),e.storage.getEntries()})()}getItem(e){var n=this;return(0,Le.Z)(function*(){return yield n.initialize(),n.storage.getItem(e)})()}setItem(e,n){var s=this;return(0,Le.Z)(function*(){return yield s.initialize(),s.storage.setItem(e,n)})()}removeItem(e){var n=this;return(0,Le.Z)(function*(){return yield n.initialize(),n.storage.removeItem(e)})()}initialize(){var e=this;return(0,Le.Z)(function*(){e.initialized||(yield new Promise(n=>{const s=setInterval(()=>{e.initialized&&(clearInterval(s),n())},20)}))})()}}var Em=d(72062),Kr=d(83767),Sp=d(42092);class bH extends Sp.q{constructor(e){super(),this.opts=e,this.protocol="wc",this.version=2}}class wH extends Sp.q{constructor(e,n){super(),this.core=e,this.logger=n,this.records=new Map}}class EH{constructor(e,n){this.logger=e,this.core=n}}class AH extends Sp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class _H extends Sp.q{constructor(e){super()}}class SH{constructor(e,n,s,f){this.core=e,this.logger=n,this.name=s}}class MH extends Sp.q{constructor(e,n){super(),this.relayer=e,this.logger=n}}class IH extends Sp.q{constructor(e,n){super(),this.core=e,this.logger=n}}class DH{constructor(e,n){this.projectId=e,this.logger=n}}class CH{constructor(e,n){this.projectId=e,this.logger=n}}class TH{constructor(e){this.opts=e,this.protocol="wc",this.version=2}}class OH{constructor(e){this.client=e}}const xH=t=>JSON.stringify(t,(e,n)=>"bigint"==typeof n?n.toString()+"n":n),PH=t=>{const n=t.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(n,(s,f)=>"string"==typeof f&&f.match(/^\d+n$/)?BigInt(f.substring(0,f.length-1)):f)};function UD(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return PH(t)}catch{return t}}function KD(t){return"string"==typeof t?t:xH(t)||""}var zD=d(65553),NH=d(5784),zn=d(43961);const RH="EdDSA",kH="JWT",VD=".",HD="base64url",LH="utf8",BH="utf8",jH=":",FH="did",UH="key",WD="base58btc",KH="z",zH="K36",VH=32;var GH=function WH(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s>>0,Ye=new Uint8Array(et);Te[Be];){var ut=n[Te.charCodeAt(Be)];if(255===ut)return;for(var Tt=0,Vt=et-1;(0!==ut||Tt>>0,Ye[Vt]=ut%256>>>0,ut=ut/256>>>0;if(0!==ut)throw new Error("Non-zero carry");Ke=Tt,Be++}if(" "!==Te[Be]){for(var vn=et-Ke;vn!==et&&0===Ye[vn];)vn++;for(var en=new Uint8Array(Fe+(et-vn)),rn=Fe;vn!==et;)en[rn++]=Ye[vn++];return en}}}return{encode:function be(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var Be=0,Fe=0,Ke=0,et=Te.length;Ke!==et&&0===Te[Ke];)Ke++,Be++;for(var Ye=(et-Ke)*fe+1>>>0,ut=new Uint8Array(Ye);Ke!==et;){for(var Tt=Te[Ke],Vt=0,vn=Ye-1;(0!==Tt||Vt>>0,ut[vn]=Tt%q>>>0,Tt=Tt/q>>>0;if(0!==Tt)throw new Error("Non-zero carry");Fe=Vt,Ke++}for(var en=Ye-Fe;en!==Ye&&0===ut[en];)en++;for(var rn=re.repeat(Be);en{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class XH{constructor(e,n,s){this.name=e,this.prefix=n,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class qH{constructor(e,n,s){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return GD(this,e)}}class eW{constructor(e){this.decoders=e}or(e){return GD(this,e)}decode(e){const n=e[0],s=this.decoders[n];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const GD=(t,e)=>new eW({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class tW{constructor(e,n,s,f){this.name=e,this.prefix=n,this.baseEncode=s,this.baseDecode=f,this.encoder=new XH(e,n,s),this.decoder=new qH(e,n,f)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Pb=({name:t,prefix:e,encode:n,decode:s})=>new tW(t,e,n,s),Am=({prefix:t,name:e,alphabet:n})=>{const{encode:s,decode:f}=JH(n,e);return Pb({prefix:t,name:e,encode:s,decode:I=>xb(f(I))})},Lo=({name:t,prefix:e,bitsPerChar:n,alphabet:s})=>Pb({prefix:e,name:t,encode:f=>((t,e,n)=>{const s="="===e[e.length-1],f=(1<n;)j-=n,I+=e[f&q>>j];if(j&&(I+=e[f&q<((t,e,n,s)=>{const f={};for(let fe=0;fe=8&&(q-=8,j[se++]=255&re>>q)}if(q>=n||255&re<<8-q)throw new SyntaxError("Unexpected end of data");return j})(f,s,n,t)}),iW=Pb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),oW=Lo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),sW=Lo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),aW=Am({prefix:"9",name:"base10",alphabet:"0123456789"}),uW=Lo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),cW=Lo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),lW=Lo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),fW=Lo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),dW=Lo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),hW=Lo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),pW=Lo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),gW=Lo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),yW=Lo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),mW=Lo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),vW=Lo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),bW=Am({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),wW=Am({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),EW=Am({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),AW=Am({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),_W=Lo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),SW=Lo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),MW=Lo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),IW=Lo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),ZD=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),DW=ZD.reduce((t,e,n)=>(t[n]=e,t),[]),CW=ZD.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const xW=Pb({prefix:"\u{1f680}",name:"base256emoji",encode:function TW(t){return t.reduce((e,n)=>e+=DW[n],"")},decode:function OW(t){const e=[];for(const n of t){const s=CW[n.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${n}`);e.push(s)}return new Uint8Array(e)}});var PW=function YD(t,e,n){e=e||[];for(var s=n=n||0;t>=kW;)e[n++]=255&t|JD,t/=128;for(;t&RW;)e[n++]=255&t|JD,t>>>=7;return e[n]=0|t,YD.bytes=n-s+1,e},JD=128,RW=-128,kW=Math.pow(2,31);var LW=function h_(t,s){var j,n=0,f=0,I=s=s||0,q=t.length;do{if(I>=q)throw h_.bytes=0,new RangeError("Could not decode varint");j=t[I++],n+=f<28?(j&$D)<=BW);return h_.bytes=I-s,n},BW=128,$D=127;var jW=Math.pow(2,7),FW=Math.pow(2,14),UW=Math.pow(2,21),KW=Math.pow(2,28),zW=Math.pow(2,35),VW=Math.pow(2,42),HW=Math.pow(2,49),WW=Math.pow(2,56),GW=Math.pow(2,63),JW={encode:PW,decode:LW,encodingLength:function(t){return t(QD.encode(t,e,n),e),qD=t=>QD.encodingLength(t),p_=(t,e)=>{const n=e.byteLength,s=qD(t),f=s+qD(n),I=new Uint8Array(f+n);return XD(t,I,0),XD(n,I,s),I.set(e,f),new eC(t,n,e,I)};class eC{constructor(e,n,s,f){this.code=e,this.size=n,this.digest=s,this.bytes=f}}const tC=({name:t,code:e,encode:n})=>new $W(t,e,n);class $W{constructor(e,n,s){this.name=e,this.code=n,this.encode=s}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?p_(this.code,n):n.then(s=>p_(this.code,s))}throw Error("Unknown type, must be binary type")}}const nC=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),QW=tC({name:"sha2-256",code:18,encode:nC("SHA-256")}),XW=tC({name:"sha2-512",code:19,encode:nC("SHA-512")}),iC=xb,eG={code:0,name:"identity",encode:iC,digest:t=>p_(0,iC(t))},tG="raw",nG=85,rG=t=>xb(t),iG=t=>xb(t),oG=new TextEncoder,sG=new TextDecoder,aG="json",uG=512,cG=t=>oG.encode(JSON.stringify(t)),lG=t=>JSON.parse(sG.decode(t));class Cs{constructor(e,n,s,f){this.code=n,this.version=e,this.multihash=s,this.bytes=f,this.byteOffset=f.byteOffset,this.byteLength=f.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Rb,byteLength:Rb,code:Nb,version:Nb,multihash:Nb,bytes:Nb,_baseCache:Rb,asCID:Rb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==_m)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==pG)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Cs.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,s=Digest.create(e,n);return Cs.createV1(this.code,s)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:s,_baseCache:f}=this;return 0===s?dG(n,f,e||base58btc.encoder):hG(n,f,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return yG(/^0\.0/,mG),!(!e||!e[sC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Cs)return e;if(null!=e&&e.asCID===e){const{version:n,code:s,multihash:f,bytes:I}=e;return new Cs(n,s,f,I||oC(n,s,f.bytes))}if(null!=e&&!0===e[sC]){const{version:n,multihash:s,code:f}=e,I=Digest.decode(s);return Cs.create(n,f,I)}return null}static create(e,n,s){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==_m)throw new Error(`Version 0 CID must use dag-pb (code: ${_m}) block encoding`);return new Cs(e,n,s,s.bytes);case 1:{const f=oC(e,n,s.bytes);return new Cs(e,n,s,f)}default:throw new Error("Invalid version")}}static createV0(e){return Cs.create(0,_m,e)}static createV1(e,n){return Cs.create(1,e,n)}static decode(e){const[n,s]=Cs.decodeFirst(e);if(s.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Cs.inspectBytes(e),s=n.size-n.multihashSize,f=coerce(e.subarray(s,s+n.multihashSize));if(f.byteLength!==n.multihashSize)throw new Error("Incorrect length");const I=f.subarray(n.multihashSize-n.digestSize),j=new Digest.Digest(n.multihashCode,n.digestSize,I,f);return[0===n.version?Cs.createV0(j):Cs.createV1(n.codec,j),e.subarray(n.size)]}static inspectBytes(e){let n=0;const s=()=>{const[be,_e]=varint.decode(e.subarray(n));return _e,be};let f=s(),I=_m;if(18===f?(0,0):1===f&&s(),0!==f&&1!==f)throw new RangeError(`Invalid CID version ${f}`);const j=n,q=s(),re=s(),se=n+re;return{version:f,codec:I,multihashCode:q,digestSize:re,multihashSize:se-j,size:se}}static parse(e,n){const[s,f]=fG(e,n),I=Cs.decode(f);return I._baseCache.set(s,e),I}}Symbol.for("@ipld/js-cid/CID");const aC={...l,..._,...E,...S,...a,...h,...g,...y,...v,...b};function uC(t,e,n,s){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:s}}}const cC=uC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),g_=uC("ascii","a",t=>{let e="a";for(let n=0;n{t=t.substring(1);const e=new Uint8Array(t.length);for(let n=0;nf+I.length,0));const n=new Uint8Array(e);let s=0;for(const f of t)n.set(f,s),s+=f.length;return n}([e,t]),WD);return[FH,UH,n].join(jH)}function bG(t){return y_(t,HD)}function dC(t=(0,NH.randomBytes)(VH)){return zD._w(t)}function v_(){return v_=(0,Le.Z)(function*(t,e,n,s,f=(0,zn.fromMiliseconds)(Date.now())){const I={alg:RH,typ:kH},re={iss:fC(s.publicKey),sub:t,aud:e,iat:f,exp:f+n},se=function EG(t){return m_([Lb(t.header),Lb(t.payload)].join(VD),BH)}({header:I,payload:re});return function AG(t){return[Lb(t.header),Lb(t.payload),bG(t.signature)].join(VD)}({header:I,payload:re,signature:zD.Xx(s.secretKey,se)})}),v_.apply(this,arguments)}d(6375);var hC=d(95876),SG=d(85705),pC=d(10976),w_=d(10893),gC=d(25006);function E_(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function yC(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?E_(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function mC(t,e){e||(e=t.reduce((f,I)=>f+I.length,0));const n=yC(e);let s=0;for(const f of t)n.set(f,s),s+=f.length;return E_(n)}var IG=function MG(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s>>0,Ye=new Uint8Array(et);Te[Be];){var ut=n[Te.charCodeAt(Be)];if(255===ut)return;for(var Tt=0,Vt=et-1;(0!==ut||Tt>>0,Ye[Vt]=ut%256>>>0,ut=ut/256>>>0;if(0!==ut)throw new Error("Non-zero carry");Ke=Tt,Be++}if(" "!==Te[Be]){for(var vn=et-Ke;vn!==et&&0===Ye[vn];)vn++;for(var en=new Uint8Array(Fe+(et-vn)),rn=Fe;vn!==et;)en[rn++]=Ye[vn++];return en}}}return{encode:function be(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var Be=0,Fe=0,Ke=0,et=Te.length;Ke!==et&&0===Te[Ke];)Ke++,Be++;for(var Ye=(et-Ke)*fe+1>>>0,ut=new Uint8Array(Ye);Ke!==et;){for(var Tt=Te[Ke],Vt=0,vn=Ye-1;(0!==Tt||Vt>>0,ut[vn]=Tt%q>>>0,Tt=Tt/q>>>0;if(0!==Tt)throw new Error("Non-zero carry");Fe=Vt,Ke++}for(var en=Ye-Fe;en!==Ye&&0===ut[en];)en++;for(var rn=re.repeat(Be);en{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class PG{constructor(e,n,s){this.name=e,this.prefix=n,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class NG{constructor(e,n,s){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return vC(this,e)}}class RG{constructor(e){this.decoders=e}or(e){return vC(this,e)}decode(e){const n=e[0],s=this.decoders[n];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const vC=(t,e)=>new RG({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class kG{constructor(e,n,s,f){this.name=e,this.prefix=n,this.baseEncode=s,this.baseDecode=f,this.encoder=new PG(e,n,s),this.decoder=new NG(e,n,f)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const jb=({name:t,prefix:e,encode:n,decode:s})=>new kG(t,e,n,s),Sm=({prefix:t,name:e,alphabet:n})=>{const{encode:s,decode:f}=CG(n,e);return jb({prefix:t,name:e,encode:s,decode:I=>Bb(f(I))})},Bo=({name:t,prefix:e,bitsPerChar:n,alphabet:s})=>jb({prefix:e,name:t,encode:f=>((t,e,n)=>{const s="="===e[e.length-1],f=(1<n;)j-=n,I+=e[f&q>>j];if(j&&(I+=e[f&q<((t,e,n,s)=>{const f={};for(let fe=0;fe=8&&(q-=8,j[se++]=255&re>>q)}if(q>=n||255&re<<8-q)throw new SyntaxError("Unexpected end of data");return j})(f,s,n,t)}),jG=jb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),FG=Bo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),UG=Bo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),KG=Sm({prefix:"9",name:"base10",alphabet:"0123456789"}),zG=Bo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),VG=Bo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),HG=Bo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),WG=Bo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),GG=Bo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ZG=Bo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),JG=Bo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),YG=Bo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),$G=Bo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),QG=Bo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),XG=Bo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),qG=Sm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),eZ=Sm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),tZ=Sm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),nZ=Sm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),rZ=Bo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iZ=Bo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),oZ=Bo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),sZ=Bo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),bC=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),aZ=bC.reduce((t,e,n)=>(t[n]=e,t),[]),uZ=bC.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const fZ=jb({prefix:"\u{1f680}",name:"base256emoji",encode:function cZ(t){return t.reduce((e,n)=>e+=aZ[n],"")},decode:function lZ(t){const e=[];for(const n of t){const s=uZ[n.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${n}`);e.push(s)}return new Uint8Array(e)}});var dZ=function EC(t,e,n){e=e||[];for(var s=n=n||0;t>=gZ;)e[n++]=255&t|wC,t/=128;for(;t&pZ;)e[n++]=255&t|wC,t>>>=7;return e[n]=0|t,EC.bytes=n-s+1,e},wC=128,pZ=-128,gZ=Math.pow(2,31);var yZ=function A_(t,s){var j,n=0,f=0,I=s=s||0,q=t.length;do{if(I>=q)throw A_.bytes=0,new RangeError("Could not decode varint");j=t[I++],n+=f<28?(j&AC)<=mZ);return A_.bytes=I-s,n},mZ=128,AC=127;var vZ=Math.pow(2,7),bZ=Math.pow(2,14),wZ=Math.pow(2,21),EZ=Math.pow(2,28),AZ=Math.pow(2,35),_Z=Math.pow(2,42),SZ=Math.pow(2,49),MZ=Math.pow(2,56),IZ=Math.pow(2,63),CZ={encode:dZ,decode:yZ,encodingLength:function(t){return t(_C.encode(t,e,n),e),MC=t=>_C.encodingLength(t),__=(t,e)=>{const n=e.byteLength,s=MC(t),f=s+MC(n),I=new Uint8Array(f+n);return SC(t,I,0),SC(n,I,s),I.set(e,f),new IC(t,n,e,I)};class IC{constructor(e,n,s,f){this.code=e,this.size=n,this.digest=s,this.bytes=f}}const DC=({name:t,code:e,encode:n})=>new OZ(t,e,n);class OZ{constructor(e,n,s){this.name=e,this.code=n,this.encode=s}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?__(this.code,n):n.then(s=>__(this.code,s))}throw Error("Unknown type, must be binary type")}}const CC=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),xZ=DC({name:"sha2-256",code:18,encode:CC("SHA-256")}),PZ=DC({name:"sha2-512",code:19,encode:CC("SHA-512")}),OC=Bb,RZ={code:0,name:"identity",encode:OC,digest:t=>__(0,OC(t))},kZ="raw",LZ=85,BZ=t=>Bb(t),jZ=t=>Bb(t),FZ=new TextEncoder,UZ=new TextDecoder,KZ="json",zZ=512,VZ=t=>FZ.encode(JSON.stringify(t)),HZ=t=>JSON.parse(UZ.decode(t));class Ts{constructor(e,n,s,f){this.code=n,this.version=e,this.multihash=s,this.bytes=f,this.byteOffset=f.byteOffset,this.byteLength=f.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Ub,byteLength:Ub,code:Fb,version:Fb,multihash:Fb,bytes:Fb,_baseCache:Ub,asCID:Ub})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==Mm)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==JZ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ts.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,s=Digest.create(e,n);return Ts.createV1(this.code,s)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:s,_baseCache:f}=this;return 0===s?GZ(n,f,e||base58btc.encoder):ZZ(n,f,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return $Z(/^0\.0/,QZ),!(!e||!e[PC]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Ts)return e;if(null!=e&&e.asCID===e){const{version:n,code:s,multihash:f,bytes:I}=e;return new Ts(n,s,f,I||xC(n,s,f.bytes))}if(null!=e&&!0===e[PC]){const{version:n,multihash:s,code:f}=e,I=Digest.decode(s);return Ts.create(n,f,I)}return null}static create(e,n,s){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==Mm)throw new Error(`Version 0 CID must use dag-pb (code: ${Mm}) block encoding`);return new Ts(e,n,s,s.bytes);case 1:{const f=xC(e,n,s.bytes);return new Ts(e,n,s,f)}default:throw new Error("Invalid version")}}static createV0(e){return Ts.create(0,Mm,e)}static createV1(e,n){return Ts.create(1,e,n)}static decode(e){const[n,s]=Ts.decodeFirst(e);if(s.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Ts.inspectBytes(e),s=n.size-n.multihashSize,f=coerce(e.subarray(s,s+n.multihashSize));if(f.byteLength!==n.multihashSize)throw new Error("Incorrect length");const I=f.subarray(n.multihashSize-n.digestSize),j=new Digest.Digest(n.multihashCode,n.digestSize,I,f);return[0===n.version?Ts.createV0(j):Ts.createV1(n.codec,j),e.subarray(n.size)]}static inspectBytes(e){let n=0;const s=()=>{const[be,_e]=varint.decode(e.subarray(n));return _e,be};let f=s(),I=Mm;if(18===f?(0,0):1===f&&s(),0!==f&&1!==f)throw new RangeError(`Invalid CID version ${f}`);const j=n,q=s(),re=s(),se=n+re;return{version:f,codec:I,multihashCode:q,digestSize:re,multihashSize:se-j,size:se}}static parse(e,n){const[s,f]=WZ(e,n),I=Ts.decode(f);return I._baseCache.set(s,e),I}}Symbol.for("@ipld/js-cid/CID");const NC={...N,...M,...P,...R,...L,...H,...V,...J,...Y,...Z};function RC(t,e,n,s){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:s}}}const kC=RC("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),S_=RC("ascii","a",t=>{let e="a";for(let n=0;n{const e=yC((t=t.substring(1)).length);for(let n=0;n"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new nJ:typeof navigator<"u"?KC(navigator.userAgent):function uJ(){var t=typeof process<"u"&&process.version;return t?new qZ(process.version.slice(1)):null}()}function UC(t){return""!==t&&oJ.reduce(function(e,n){var s=n[0],f=n[1];if(e)return e;var I=f.exec(t);return!!I&&[s,I]},!1)}function KC(t){var e=UC(t);if(!e)return null;var n=e[0],s=e[1];if("searchbot"===n)return new tJ;var f=s[1]&&s[1].split(".").join("_").split("_").slice(0,3);f?f.length"u")throw new Error("Missing sender public key for type 1 envelope");const n=typeof t.senderPublicKey<"u"?Nu(t.senderPublicKey,Os):void 0,s=typeof t.iv<"u"?Nu(t.iv,Os):(0,pC.O6)(T_);return function DJ(t){if(Dm(t.type)===ah){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Ru(mC([t.type,t.senderPublicKey,t.iv,t.sealed]),D_)}return Ru(mC([t.type,t.iv,t.sealed]),D_)}({type:e,sealed:new hC.OK(Nu(t.symKey,Os)).seal(s,Nu(t.message,C_)),iv:s,senderPublicKey:n})}function Vb(t){const e=Nu(t,D_),n=e.slice(wJ,GC),s=GC;if(Dm(n)===ah){const q=s+O_,re=q+T_,se=e.slice(s,q),fe=e.slice(q,re);return{type:n,sealed:e.slice(re),iv:fe,senderPublicKey:se}}const f=s+T_,I=e.slice(s,f);return{type:n,sealed:e.slice(f),iv:I}}function ZC(t){const e=t?.type||WC;if(e===ah){if(typeof t?.senderPublicKey>"u")throw new Error("missing sender public key");if(typeof t?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t?.senderPublicKey,receiverPublicKey:t?.receiverPublicKey}}function JC(t){return t.type===ah&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var TJ=Object.defineProperty,YC=Object.getOwnPropertySymbols,OJ=Object.prototype.hasOwnProperty,xJ=Object.prototype.propertyIsEnumerable,$C=(t,e,n)=>e in t?TJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QC=(t,e)=>{for(var n in e||(e={}))OJ.call(e,n)&&$C(t,n,e[n]);if(YC)for(var n of YC(e))xJ.call(e,n)&&$C(t,n,e[n]);return t};const PJ="ReactNative",Qs={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},RJ="js";function N_(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Ip(){return!(0,Im.getDocument)()&&!!(0,Im.getNavigator)()&&navigator.product===PJ}function Dp(){return!N_()&&!!(0,Im.getNavigator)()&&!!(0,Im.getDocument)()}function Cp(){return Ip()?Qs.reactNative:N_()?Qs.node:Dp()?Qs.browser:Qs.unknown}function UJ(t,e,n){const s=function jJ(){if(Cp()===Qs.reactNative&&typeof global<"u"&&typeof(null==global?void 0:global.Platform)<"u"){const{OS:n,Version:s}=global.Platform;return[n,s].join("-")}const t=sJ();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),f=function FJ(){var t;const e=Cp();return e===Qs.browser?[e,(null==(t=(0,Im.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[RJ,n].join("-"),s,f].join("/")}function KJ({protocol:t,version:e,relayUrl:n,sdkVersion:s,auth:f,projectId:I,useOnCloseEvent:j,bundleId:q}){const re=n.split("?"),fe={auth:f,ua:UJ(t,e,s),projectId:I,useOnCloseEvent:j||void 0,origin:q||void 0},be=function LJ(t,e){let n=Kb.parse(t);return n=QC(QC({},n),e),Kb.stringify(n)}(re[1]||"",fe);return re[0]+"?"+be}function uh(t,e){return t.filter(n=>e.includes(n)).length===t.length}function qC(t){return Object.fromEntries(t.entries())}function eT(t){return new Map(Object.entries(t))}function Tp(t=zn.FIVE_MINUTES,e){const n=(0,zn.toMiliseconds)(t||zn.FIVE_MINUTES);let s,f,I;return{resolve:j=>{I&&s&&(clearTimeout(I),s(j))},reject:j=>{I&&f&&(clearTimeout(I),f(j))},done:()=>new Promise((j,q)=>{I=setTimeout(()=>{q(new Error(e))},n),s=j,f=q})}}function Cm(t,e,n){return new Promise(function(){var s=(0,Le.Z)(function*(f,I){const j=setTimeout(()=>I(new Error(n)),e);try{f(yield t)}catch(q){I(q)}clearTimeout(j)});return function(f,I){return s.apply(this,arguments)}}())}function tT(t,e){if("string"==typeof e&&e.startsWith(`${t}:`))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function nT(t){const[e,n]=t.split(":"),s={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof n)s.topic=n;else{if("id"!==e||!Number.isInteger(Number(n)))throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${n}`);s.id=Number(n)}return s}function ku(t,e){return(0,zn.fromMiliseconds)((e||Date.now())+(0,zn.toMiliseconds)(t))}function xf(t){return Date.now()>=(0,zn.toMiliseconds)(t)}function oo(t,e){return`${t}${e?`:${e}`:""}`}function R_(){return R_=(0,Le.Z)(function*({id:t,topic:e,wcDeepLink:n}){try{if(!n)return;let f=("string"==typeof n?JSON.parse(n):n)?.href;if("string"!=typeof f)return;f.endsWith("/")&&(f=f.slice(0,-1));const I=`${f}/wc?requestId=${t}&sessionTopic=${e}`,j=Cp();j===Qs.browser?I.startsWith("https://")?window.open(I,"_blank","noreferrer noopener"):window.open(I,"_self","noreferrer noopener"):j===Qs.reactNative&&typeof(null==global?void 0:global.Linking)<"u"&&(yield global.Linking.openURL(I))}catch(s){console.error(s)}}),R_.apply(this,arguments)}function k_(){return k_=(0,Le.Z)(function*(t,e){try{return(yield t.getItem(e))||(Dp()?localStorage.getItem(e):void 0)}catch(n){console.error(n)}}),k_.apply(this,arguments)}const YJ="irn";function L_(t){return t?.relay||{protocol:YJ}}function Hb(t){const e=fJ[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var $J=Object.defineProperty,rT=Object.getOwnPropertySymbols,QJ=Object.prototype.hasOwnProperty,XJ=Object.prototype.propertyIsEnumerable,iT=(t,e,n)=>e in t?$J(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qJ=(t,e)=>{for(var n in e||(e={}))QJ.call(e,n)&&iT(t,n,e[n]);if(rT)for(var n of rT(e))XJ.call(e,n)&&iT(t,n,e[n]);return t};function eY(t,e="-"){const n={},s="relay"+e;return Object.keys(t).forEach(f=>{if(f.startsWith(s)){const I=f.replace(s,""),j=t[f];n[I]=j}}),n}function oT(t){const e=(t=(t=t.includes("wc://")?t.replace("wc://",""):t).includes("wc:")?t.replace("wc:",""):t).indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,s=t.substring(0,e),f=t.substring(e+1,n).split("@"),I=typeof n<"u"?t.substring(n):"",j=Kb.parse(I);return{protocol:s,topic:tY(f[0]),version:parseInt(f[1],10),symKey:j.symKey,relay:eY(j)}}function tY(t){return t.startsWith("//")?t.substring(2):t}function rY(t){return`${t.protocol}:${t.topic}@${t.version}?`+Kb.stringify(qJ({symKey:t.symKey},function nY(t,e="-"){const s={};return Object.keys(t).forEach(f=>{const I="relay"+e+f;t[f]&&(s[I]=t[f])}),s}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Op(t){const e=[];return t.forEach(n=>{const[s,f]=n.split(":");e.push(`${s}:${f}`)}),e}const yY={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},mY={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function wn(t,e){const{message:n,code:s}=mY[t];return{message:e?`${n} ${e}`:n,code:s}}function po(t,e){const{message:n,code:s}=yY[t];return{message:e?`${n} ${e}`:n,code:s}}function Tm(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function xp(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function xs(t){return typeof t>"u"}function Io(t,e){return!(!e||!xs(t))||"string"==typeof t&&!!t.trim().length}function B_(t,e){return!(!e||!xs(t))||"number"==typeof t&&!isNaN(t)}function Wb(t){return!(!Io(t,!1)||!t.includes(":"))&&2===t.split(":").length}function lT(t){let e=!0;return Tm(t)?t.length&&(e=t.every(n=>Io(n,!1))):e=!1,e}function MY(t,e,n){let s=null;return Object.entries(t).forEach(([f,I])=>{if(s)return;const j=function SY(t,e,n){let s=null;return Tm(e)&&e.length?e.forEach(f=>{s||Wb(f)||(s=po("UNSUPPORTED_CHAINS",`${n}, chain ${f} should be a string and conform to "namespace:chainId" format`))}):Wb(t)||(s=po("UNSUPPORTED_CHAINS",`${n}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),s}(f,M_(f,I),`${e} ${n}`);j&&(s=j)}),s}function IY(t,e){let n=null;return Tm(t)?t.forEach(s=>{n||function bY(t){if(Io(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const n=e[0]+":"+e[1];return!!e[2]&&Wb(n)}}return!1}(s)||(n=po("UNSUPPORTED_ACCOUNTS",`${e}, account ${s} should be a string and conform to "namespace:chainId:address" format`))}):n=po("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),n}function fT(t,e){let n=null;return Object.values(t).forEach(s=>{if(n)return;const f=function CY(t,e){let n=null;return lT(t?.methods)?lT(t?.events)||(n=po("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):n=po("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),n}(s,`${e}, namespace`);f&&(n=f)}),n}function Gb(t,e){let n=null;if(t&&xp(t)){const s=fT(t,e);s&&(n=s);const f=function DY(t,e){let n=null;return Object.values(t).forEach(s=>{if(n)return;const f=IY(s?.accounts,`${e} namespace`);f&&(n=f)}),n}(t,e);f&&(n=f)}else n=wn("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return n}function dT(t){return Io(t.protocol,!0)}function Xs(t){return typeof t<"u"&&null!==typeof t}function hT(t,e){return!(!Wb(e)||!function fY(t){const e=[];return Object.values(t).forEach(n=>{e.push(...Op(n.accounts))}),e}(t).includes(e))}function LY(t,e,n){return!!Io(n,!1)&&function dY(t,e){const n=[];return Object.values(t).forEach(s=>{Op(s.accounts).includes(e)&&n.push(...s.methods)}),n}(t,e).includes(n)}function BY(t,e,n){return!!Io(n,!1)&&function hY(t,e){const n=[];return Object.values(t).forEach(s=>{Op(s.accounts).includes(e)&&n.push(...s.events)}),n}(t,e).includes(n)}function j_(t,e,n){let s=null;const f=function jY(t){const e={};return Object.keys(t).forEach(n=>{var s;n.includes(":")?e[n]=t[n]:null==(s=t[n].chains)||s.forEach(f=>{e[f]={methods:t[n].methods,events:t[n].events}})}),e}(t),I=function FY(t){const e={};return Object.keys(t).forEach(n=>{n.includes(":")?e[n]=t[n]:Op(t[n].accounts)?.forEach(f=>{e[f]={accounts:t[n].accounts.filter(I=>I.includes(`${f}:`)),methods:t[n].methods,events:t[n].events}})}),e}(e),j=Object.keys(f),q=Object.keys(I),re=pT(Object.keys(t)),se=pT(Object.keys(e)),fe=re.filter(be=>!se.includes(be));return fe.length&&(s=wn("NON_CONFORMING_NAMESPACES",`${n} namespaces keys don't satisfy requiredNamespaces.\n Required: ${fe.toString()}\n Received: ${Object.keys(e).toString()}`)),uh(j,q)||(s=wn("NON_CONFORMING_NAMESPACES",`${n} namespaces chains don't satisfy required namespaces.\n Required: ${j.toString()}\n Approved: ${q.toString()}`)),Object.keys(e).forEach(be=>{if(!be.includes(":")||s)return;const _e=Op(e[be].accounts);_e.includes(be)||(s=wn("NON_CONFORMING_NAMESPACES",`${n} namespaces accounts don't satisfy namespace accounts for ${be}\n Required: ${be}\n Approved: ${_e.toString()}`))}),j.forEach(be=>{s||(uh(f[be].methods,I[be].methods)?uh(f[be].events,I[be].events)||(s=wn("NON_CONFORMING_NAMESPACES",`${n} namespaces events don't satisfy namespace events for ${be}`)):s=wn("NON_CONFORMING_NAMESPACES",`${n} namespaces methods don't satisfy namespace methods for ${be}`))}),s}function pT(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function gT(){const t=Cp();return new Promise(e=>{switch(t){case Qs.browser:e(function KY(){return Dp()&&navigator?.onLine}());break;case Qs.reactNative:e(function zY(){return F_.apply(this,arguments)}());break;case Qs.node:default:e(!0)}})}function F_(){return(F_=(0,Le.Z)(function*(){return!(Ip()&&typeof global<"u"&&null!=global&&global.NetInfo)||(yield null==global?void 0:global.NetInfo.fetch())?.isConnected})).apply(this,arguments)}function HY(t){switch(Cp()){case Qs.browser:!function WY(t){!Ip()&&Dp()&&(window.addEventListener("online",()=>t(!0)),window.addEventListener("offline",()=>t(!1)))}(t);break;case Qs.reactNative:!function GY(t){Ip()&&typeof global<"u"&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(e=>t(e?.isConnected))}(t);case Qs.node:}}const U_={};class Zb{static get(e){return U_[e]}static set(e,n){U_[e]=n}static delete(e){delete U_[e]}}var JY=function ZY(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s>>0,Ye=new Uint8Array(et);Te[Be];){var ut=n[Te.charCodeAt(Be)];if(255===ut)return;for(var Tt=0,Vt=et-1;(0!==ut||Tt>>0,Ye[Vt]=ut%256>>>0,ut=ut/256>>>0;if(0!==ut)throw new Error("Non-zero carry");Ke=Tt,Be++}if(" "!==Te[Be]){for(var vn=et-Ke;vn!==et&&0===Ye[vn];)vn++;for(var en=new Uint8Array(Fe+(et-vn)),rn=Fe;vn!==et;)en[rn++]=Ye[vn++];return en}}}return{encode:function be(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var Be=0,Fe=0,Ke=0,et=Te.length;Ke!==et&&0===Te[Ke];)Ke++,Be++;for(var Ye=(et-Ke)*fe+1>>>0,ut=new Uint8Array(Ye);Ke!==et;){for(var Tt=Te[Ke],Vt=0,vn=Ye-1;(0!==Tt||Vt>>0,ut[vn]=Tt%q>>>0,Tt=Tt/q>>>0;if(0!==Tt)throw new Error("Non-zero carry");Fe=Vt,Ke++}for(var en=Ye-Fe;en!==Ye&&0===ut[en];)en++;for(var rn=re.repeat(Be);en{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")});class e${constructor(e,n,s){this.name=e,this.prefix=n,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class t${constructor(e,n,s){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return yT(this,e)}}class n${constructor(e){this.decoders=e}or(e){return yT(this,e)}decode(e){const n=e[0],s=this.decoders[n];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const yT=(t,e)=>new n$({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class r${constructor(e,n,s,f){this.name=e,this.prefix=n,this.baseEncode=s,this.baseDecode=f,this.encoder=new e$(e,n,s),this.decoder=new t$(e,n,f)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Yb=({name:t,prefix:e,encode:n,decode:s})=>new r$(t,e,n,s),Om=({prefix:t,name:e,alphabet:n})=>{const{encode:s,decode:f}=$Y(n,e);return Yb({prefix:t,name:e,encode:s,decode:I=>Jb(f(I))})},jo=({name:t,prefix:e,bitsPerChar:n,alphabet:s})=>Yb({prefix:e,name:t,encode:f=>((t,e,n)=>{const s="="===e[e.length-1],f=(1<n;)j-=n,I+=e[f&q>>j];if(j&&(I+=e[f&q<((t,e,n,s)=>{const f={};for(let fe=0;fe=8&&(q-=8,j[se++]=255&re>>q)}if(q>=n||255&re<<8-q)throw new SyntaxError("Unexpected end of data");return j})(f,s,n,t)}),s$=Yb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)}),a$=jo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),u$=jo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),c$=Om({prefix:"9",name:"base10",alphabet:"0123456789"}),l$=jo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),f$=jo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),d$=jo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),h$=jo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),p$=jo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),g$=jo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),y$=jo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),m$=jo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),v$=jo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),b$=jo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),w$=jo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),E$=Om({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),A$=Om({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),_$=Om({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),S$=Om({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),M$=jo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),I$=jo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),D$=jo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),C$=jo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),mT=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),T$=mT.reduce((t,e,n)=>(t[n]=e,t),[]),O$=mT.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const N$=Yb({prefix:"\u{1f680}",name:"base256emoji",encode:function x$(t){return t.reduce((e,n)=>e+=T$[n],"")},decode:function P$(t){const e=[];for(const n of t){const s=O$[n.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${n}`);e.push(s)}return new Uint8Array(e)}});var R$=function bT(t,e,n){e=e||[];for(var s=n=n||0;t>=B$;)e[n++]=255&t|vT,t/=128;for(;t&L$;)e[n++]=255&t|vT,t>>>=7;return e[n]=0|t,bT.bytes=n-s+1,e},vT=128,L$=-128,B$=Math.pow(2,31);var j$=function K_(t,s){var j,n=0,f=0,I=s=s||0,q=t.length;do{if(I>=q)throw K_.bytes=0,new RangeError("Could not decode varint");j=t[I++],n+=f<28?(j&wT)<=F$);return K_.bytes=I-s,n},F$=128,wT=127;var U$=Math.pow(2,7),K$=Math.pow(2,14),z$=Math.pow(2,21),V$=Math.pow(2,28),H$=Math.pow(2,35),W$=Math.pow(2,42),G$=Math.pow(2,49),Z$=Math.pow(2,56),J$=Math.pow(2,63),$$={encode:R$,decode:j$,encodingLength:function(t){return t(ET.encode(t,e,n),e),_T=t=>ET.encodingLength(t),z_=(t,e)=>{const n=e.byteLength,s=_T(t),f=s+_T(n),I=new Uint8Array(f+n);return AT(t,I,0),AT(n,I,s),I.set(e,f),new ST(t,n,e,I)};class ST{constructor(e,n,s,f){this.code=e,this.size=n,this.digest=s,this.bytes=f}}const MT=({name:t,code:e,encode:n})=>new X$(t,e,n);class X${constructor(e,n,s){this.name=e,this.code=n,this.encode=s}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?z_(this.code,n):n.then(s=>z_(this.code,s))}throw Error("Unknown type, must be binary type")}}const IT=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),q$=MT({name:"sha2-256",code:18,encode:IT("SHA-256")}),eQ=MT({name:"sha2-512",code:19,encode:IT("SHA-512")}),CT=Jb,nQ={code:0,name:"identity",encode:CT,digest:t=>z_(0,CT(t))},rQ="raw",iQ=85,oQ=t=>Jb(t),sQ=t=>Jb(t),aQ=new TextEncoder,uQ=new TextDecoder,cQ="json",lQ=512,fQ=t=>aQ.encode(JSON.stringify(t)),dQ=t=>JSON.parse(uQ.decode(t));class Ps{constructor(e,n,s,f){this.code=n,this.version=e,this.multihash=s,this.bytes=f,this.byteOffset=f.byteOffset,this.byteLength=f.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Qb,byteLength:Qb,code:$b,version:$b,multihash:$b,bytes:$b,_baseCache:Qb,asCID:Qb})}toV0(){if(0===this.version)return this;{const{code:e,multihash:n}=this;if(e!==xm)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==yQ)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ps.createV0(n)}}toV1(){switch(this.version){case 0:{const{code:e,digest:n}=this.multihash,s=Digest.create(e,n);return Ps.createV1(this.code,s)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&Digest.equals(this.multihash,e.multihash)}toString(e){const{bytes:n,version:s,_baseCache:f}=this;return 0===s?pQ(n,f,e||base58btc.encoder):gQ(n,f,e||base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return vQ(/^0\.0/,bQ),!(!e||!e[OT]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof Ps)return e;if(null!=e&&e.asCID===e){const{version:n,code:s,multihash:f,bytes:I}=e;return new Ps(n,s,f,I||TT(n,s,f.bytes))}if(null!=e&&!0===e[OT]){const{version:n,multihash:s,code:f}=e,I=Digest.decode(s);return Ps.create(n,f,I)}return null}static create(e,n,s){if("number"!=typeof n)throw new Error("String codecs are no longer supported");switch(e){case 0:if(n!==xm)throw new Error(`Version 0 CID must use dag-pb (code: ${xm}) block encoding`);return new Ps(e,n,s,s.bytes);case 1:{const f=TT(e,n,s.bytes);return new Ps(e,n,s,f)}default:throw new Error("Invalid version")}}static createV0(e){return Ps.create(0,xm,e)}static createV1(e,n){return Ps.create(1,e,n)}static decode(e){const[n,s]=Ps.decodeFirst(e);if(s.length)throw new Error("Incorrect length");return n}static decodeFirst(e){const n=Ps.inspectBytes(e),s=n.size-n.multihashSize,f=coerce(e.subarray(s,s+n.multihashSize));if(f.byteLength!==n.multihashSize)throw new Error("Incorrect length");const I=f.subarray(n.multihashSize-n.digestSize),j=new Digest.Digest(n.multihashCode,n.digestSize,I,f);return[0===n.version?Ps.createV0(j):Ps.createV1(n.codec,j),e.subarray(n.size)]}static inspectBytes(e){let n=0;const s=()=>{const[be,_e]=varint.decode(e.subarray(n));return _e,be};let f=s(),I=xm;if(18===f?(0,0):1===f&&s(),0!==f&&1!==f)throw new RangeError(`Invalid CID version ${f}`);const j=n,q=s(),re=s(),se=n+re;return{version:f,codec:I,multihashCode:q,digestSize:re,multihashSize:se-j,size:se}}static parse(e,n){const[s,f]=hQ(e,n),I=Ps.decode(f);return I._baseCache.set(s,e),I}}Symbol.for("@ipld/js-cid/CID");const xT={...u,...m,...w,...x,...F,...G,...k,...p,...B,...ie};function EQ(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?function wQ(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function PT(t,e,n,s){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:s}}}const NT=PT("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),V_=PT("ascii","a",t=>{let e="a";for(let n=0;n{const e=EQ((t=t.substring(1)).length);for(let n=0;nn.code===t)||Pm[kT]}var xQ=d(71948);function W_(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))}function FT(t=6){return BigInt(W_(t))}function Pp(t,e,n){return{id:n||W_(),jsonrpc:"2.0",method:t,params:e}}function G_(t,e){return{id:t,jsonrpc:"2.0",result:e}}function Z_(t,e,n){return{id:t,jsonrpc:"2.0",error:PQ(e,n)}}function PQ(t,e){return typeof t>"u"?BT(RT):("string"==typeof t&&(t=Object.assign(Object.assign({},BT(H_)),{message:t})),typeof e<"u"&&(t.data=e),LT(t.code)&&(t=jT(t.code)),t)}class NQ{}class RQ extends NQ{constructor(){super()}}class kQ extends RQ{constructor(e){super()}}const BQ="^wss?:";function UT(t,e){const n=function jQ(t){const e=t.match(new RegExp(/^\w+:/,"gi"));if(e&&e.length)return e[0]}(t);return!(typeof n>"u")&&new RegExp(e).test(n)}function KT(t){return UT(t,BQ)}function FQ(t){return new RegExp("wss?://localhost(:d{2,5})?").test(t)}function zT(t){return"object"==typeof t&&"id"in t&&"jsonrpc"in t&&"2.0"===t.jsonrpc}function J_(t){return zT(t)&&"method"in t}function Xb(t){return zT(t)&&(ml(t)||Lu(t))}function ml(t){return"result"in t}function Lu(t){return"error"in t}class UQ extends kQ{constructor(e){super(e),this.events=new Du.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}connect(e=this.connection){var n=this;return(0,Le.Z)(function*(){yield n.open(e)})()}disconnect(){var e=this;return(0,Le.Z)(function*(){yield e.close()})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}request(e,n){var s=this;return(0,Le.Z)(function*(){return s.requestStrict(Pp(e.method,e.params||[],e.id||FT().toString()),n)})()}requestStrict(e,n){var s=this;return(0,Le.Z)(function*(){return new Promise(function(){var f=(0,Le.Z)(function*(I,j){if(!s.connection.connected)try{yield s.open()}catch(q){j(q)}s.events.on(`${e.id}`,q=>{Lu(q)?j(q.error):I(q.result)});try{yield s.connection.send(e,n)}catch(q){j(q)}});return function(I,j){return f.apply(this,arguments)}}())})()}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),Xb(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}open(e=this.connection){var n=this;return(0,Le.Z)(function*(){n.connection===e&&n.connection.connected||(n.connection.connected&&n.close(),"string"==typeof e&&(yield n.connection.open(e),e=n.connection),n.connection=n.setConnection(e),yield n.connection.open(),n.registerEventListeners(),n.events.emit("connect"))})()}close(){var e=this;return(0,Le.Z)(function*(){yield e.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const VT=t=>t.split("?")[0],VQ=typeof WebSocket<"u"?WebSocket:typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:typeof self<"u"&&typeof self.WebSocket<"u"?self.WebSocket:d(25504);class HQ{constructor(e){if(this.url=e,this.events=new Du.EventEmitter,this.registering=!1,!KT(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}open(e=this.url){var n=this;return(0,Le.Z)(function*(){yield n.register(e)})()}close(){var e=this;return(0,Le.Z)(function*(){return new Promise((n,s)=>{typeof e.socket>"u"?s(new Error("Connection already closed")):(e.socket.onclose=f=>{e.onClose(f),n()},e.socket.close())})})()}send(e){var n=this;return(0,Le.Z)(function*(){typeof n.socket>"u"&&(n.socket=yield n.register());try{n.socket.send(KD(e))}catch(s){n.onError(e.id,s)}})()}register(e=this.url){if(!KT(e))throw new Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){const n=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=n||this.events.listenerCount("open")>=n)&&this.events.setMaxListeners(n+1),new Promise((s,f)=>{this.events.once("register_error",I=>{this.resetMaxListeners(),f(I)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return f(new Error("WebSocket connection is missing or invalid"));s(this.socket)})})}return this.url=e,this.registering=!0,new Promise((n,s)=>{const f=new URLSearchParams(e).get("origin"),I=(0,xQ.isReactNative)()?{headers:{origin:f}}:{rejectUnauthorized:!FQ(e)},j=new VQ(e,[],I);typeof WebSocket<"u"||typeof global<"u"&&typeof global.WebSocket<"u"||typeof window<"u"&&typeof window.WebSocket<"u"||typeof self<"u"&&typeof self.WebSocket<"u"?j.onerror=q=>{const re=q;s(this.emitError(re.error))}:j.on("error",q=>{s(this.emitError(q))}),j.onopen=()=>{this.onOpen(j),n(j)}})}onOpen(e){e.onmessage=n=>this.onPayload(n),e.onclose=n=>this.onClose(n),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;const n="string"==typeof e.data?UD(e.data):e.data;this.events.emit("payload",n)}onError(e,n){const s=this.parseError(n),I=Z_(e,s.message||s.toString());this.events.emit("payload",I)}parseError(e,n=this.url){return function OQ(t,e,n){return t.message.includes("getaddrinfo ENOTFOUND")||t.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${n} RPC url at ${e}`):t}(e,VT(n),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){const n=this.parseError(new Error(e?.message||`WebSocket connection failed for host: ${VT(this.url)}`));return this.events.emit("register_error",n),n}}var WQ=d(88222),GQ=d.n(WQ),ZQ=d(33024),JQ=d.n(ZQ);var $Q=function YQ(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),s=0;s>>0,Ye=new Uint8Array(et);Te[Be];){var ut=n[Te.charCodeAt(Be)];if(255===ut)return;for(var Tt=0,Vt=et-1;(0!==ut||Tt>>0,Ye[Vt]=ut%256>>>0,ut=ut/256>>>0;if(0!==ut)throw new Error("Non-zero carry");Ke=Tt,Be++}if(" "!==Te[Be]){for(var vn=et-Ke;vn!==et&&0===Ye[vn];)vn++;for(var en=new Uint8Array(Fe+(et-vn)),rn=Fe;vn!==et;)en[rn++]=Ye[vn++];return en}}}return{encode:function be(Te){if(Te instanceof Uint8Array||(ArrayBuffer.isView(Te)?Te=new Uint8Array(Te.buffer,Te.byteOffset,Te.byteLength):Array.isArray(Te)&&(Te=Uint8Array.from(Te))),!(Te instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Te.length)return"";for(var Be=0,Fe=0,Ke=0,et=Te.length;Ke!==et&&0===Te[Ke];)Ke++,Be++;for(var Ye=(et-Ke)*fe+1>>>0,ut=new Uint8Array(Ye);Ke!==et;){for(var Tt=Te[Ke],Vt=0,vn=Ye-1;(0!==Tt||Vt>>0,ut[vn]=Tt%q>>>0,Tt=Tt/q>>>0;if(0!==Tt)throw new Error("Non-zero carry");Fe=Vt,Ke++}for(var en=Ye-Fe;en!==Ye&&0===ut[en];)en++;for(var rn=re.repeat(Be);en{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class eX{constructor(e,n,s){this.name=e,this.prefix=n,this.baseEncode=s}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class tX{constructor(e,n,s){if(this.name=e,this.prefix=n,void 0===n.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=s}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return GT(this,e)}}class nX{constructor(e){this.decoders=e}or(e){return GT(this,e)}decode(e){const n=e[0],s=this.decoders[n];if(s)return s.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const GT=(t,e)=>new nX({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class rX{constructor(e,n,s,f){this.name=e,this.prefix=n,this.baseEncode=s,this.baseDecode=f,this.encoder=new eX(e,n,s),this.decoder=new tX(e,n,f)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const qb=({name:t,prefix:e,encode:n,decode:s})=>new rX(t,e,n,s),Nm=({prefix:t,name:e,alphabet:n})=>{const{encode:s,decode:f}=QQ(n,e);return qb({prefix:t,name:e,encode:s,decode:I=>WT(f(I))})},Fo=({name:t,prefix:e,bitsPerChar:n,alphabet:s})=>qb({prefix:e,name:t,encode:f=>((t,e,n)=>{const s="="===e[e.length-1],f=(1<n;)j-=n,I+=e[f&q>>j];if(j&&(I+=e[f&q<((t,e,n,s)=>{const f={};for(let fe=0;fe=8&&(q-=8,j[se++]=255&re>>q)}if(q>=n||255&re<<8-q)throw new SyntaxError("Unexpected end of data");return j})(f,s,n,t)}),sX=qb({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var aX=Object.freeze({__proto__:null,identity:sX});const uX=Fo({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var cX=Object.freeze({__proto__:null,base2:uX});const lX=Fo({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var fX=Object.freeze({__proto__:null,base8:lX});const dX=Nm({prefix:"9",name:"base10",alphabet:"0123456789"});var hX=Object.freeze({__proto__:null,base10:dX});const pX=Fo({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),gX=Fo({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var yX=Object.freeze({__proto__:null,base16:pX,base16upper:gX});const mX=Fo({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),vX=Fo({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),bX=Fo({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),wX=Fo({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),EX=Fo({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),AX=Fo({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),_X=Fo({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),SX=Fo({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),MX=Fo({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var IX=Object.freeze({__proto__:null,base32:mX,base32upper:vX,base32pad:bX,base32padupper:wX,base32hex:EX,base32hexupper:AX,base32hexpad:_X,base32hexpadupper:SX,base32z:MX});const DX=Nm({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),CX=Nm({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var TX=Object.freeze({__proto__:null,base36:DX,base36upper:CX});const OX=Nm({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),xX=Nm({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var PX=Object.freeze({__proto__:null,base58btc:OX,base58flickr:xX});const NX=Fo({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),RX=Fo({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),kX=Fo({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),LX=Fo({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var BX=Object.freeze({__proto__:null,base64:NX,base64pad:RX,base64url:kX,base64urlpad:LX});const ZT=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),jX=ZT.reduce((t,e,n)=>(t[n]=e,t),[]),FX=ZT.reduce((t,e,n)=>(t[e.codePointAt(0)]=n,t),[]);const zX=qb({prefix:"\u{1f680}",name:"base256emoji",encode:function UX(t){return t.reduce((e,n)=>e+=jX[n],"")},decode:function KX(t){const e=[];for(const n of t){const s=FX[n.codePointAt(0)];if(void 0===s)throw new Error(`Non-base256emoji character: ${n}`);e.push(s)}return new Uint8Array(e)}});var VX=Object.freeze({__proto__:null,base256emoji:zX}),HX=function YT(t,e,n){e=e||[];for(var s=n=n||0;t>=ZX;)e[n++]=255&t|JT,t/=128;for(;t&GX;)e[n++]=255&t|JT,t>>>=7;return e[n]=0|t,YT.bytes=n-s+1,e},JT=128,GX=-128,ZX=Math.pow(2,31);var JX=function Y_(t,s){var j,n=0,f=0,I=s=s||0,q=t.length;do{if(I>=q)throw Y_.bytes=0,new RangeError("Could not decode varint");j=t[I++],n+=f<28?(j&$T)<=YX);return Y_.bytes=I-s,n},YX=128,$T=127;var $X=Math.pow(2,7),QX=Math.pow(2,14),XX=Math.pow(2,21),qX=Math.pow(2,28),eq=Math.pow(2,35),tq=Math.pow(2,42),nq=Math.pow(2,49),rq=Math.pow(2,56),iq=Math.pow(2,63),sq={encode:HX,decode:JX,encodingLength:function(t){return t<$X?1:t(QT.encode(t,e,n),e),qT=t=>QT.encodingLength(t),$_=(t,e)=>{const n=e.byteLength,s=qT(t),f=s+qT(n),I=new Uint8Array(f+n);return XT(t,I,0),XT(n,I,s),I.set(e,f),new aq(t,n,e,I)};class aq{constructor(e,n,s,f){this.code=e,this.size=n,this.digest=s,this.bytes=f}}const eO=({name:t,code:e,encode:n})=>new uq(t,e,n);class uq{constructor(e,n,s){this.name=e,this.code=n,this.encode=s}digest(e){if(e instanceof Uint8Array){const n=this.encode(e);return n instanceof Uint8Array?$_(this.code,n):n.then(s=>$_(this.code,s))}throw Error("Unknown type, must be binary type")}}const tO=t=>function(){var e=(0,Le.Z)(function*(n){return new Uint8Array(yield crypto.subtle.digest(t,n))});return function(n){return e.apply(this,arguments)}}(),cq=eO({name:"sha2-256",code:18,encode:tO("SHA-256")}),lq=eO({name:"sha2-512",code:19,encode:tO("SHA-512")});Object.freeze({__proto__:null,sha256:cq,sha512:lq});const rO=WT;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:rO,digest:t=>$_(0,rO(t))}});new TextEncoder,new TextDecoder;const iO={...aX,...cX,...fX,...hX,...yX,...IX,...TX,...PX,...BX,...VX};function oO(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function sO(t,e,n,s){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:n},decoder:{decode:s}}}const aO=sO("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>(new TextEncoder).encode(t.substring(1))),Q_=sO("ascii","a",t=>{let e="a";for(let n=0;n{const e=function pq(t=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?oO(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let n=0;n(this.isInitialized(),this.keychain.has(f)),this.set=function(){var f=(0,Le.Z)(function*(I,j){s.isInitialized(),s.keychain.set(I,j),yield s.persist()});return function(I,j){return f.apply(this,arguments)}}(),this.get=f=>{this.isInitialized();const I=this.keychain.get(f);if(typeof I>"u"){const{message:j}=wn("NO_MATCHING_KEY",`${this.name}: ${f}`);throw new Error(j)}return I},this.del=function(){var f=(0,Le.Z)(function*(I){s.isInitialized(),s.keychain.delete(I),yield s.persist()});return function(I){return f.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setKeyChain(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,qC(e))})()}getKeyChain(){var e=this;return(0,Le.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?eT(n):void 0})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setKeyChain(e.keychain)})()}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Yq{constructor(e,n,s){var f=this;this.core=e,this.logger=n,this.name="crypto",this.initialized=!1,this.init=(0,Le.Z)(function*(){f.initialized||(yield f.keychain.init(),f.initialized=!0)}),this.hasKeys=I=>(this.isInitialized(),this.keychain.has(I)),this.getClientId=(0,Le.Z)(function*(){f.isInitialized();return fC(dC(yield f.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const I=function EJ(){const t=gC.Au();return{privateKey:Ru(t.secretKey,Os),publicKey:Ru(t.publicKey,Os)}}();return this.setPrivateKey(I.publicKey,I.privateKey)},this.signJWT=function(){var I=(0,Le.Z)(function*(j){f.isInitialized();const re=dC(yield f.getClientSeed()),se=x_();return yield function _G(t,e,n,s){return v_.apply(this,arguments)}(se,j,Eq,re)});return function(j){return I.apply(this,arguments)}}(),this.generateSharedKey=(I,j,q)=>{this.isInitialized();const se=function AJ(t,e){const n=gC.gi(Nu(t,Os),Nu(e,Os),!0);return Ru(new SG.t(w_.mE,n).expand(O_),Os)}(this.getPrivateKey(I),j);return this.setSymKey(se,q)},this.setSymKey=function(){var I=(0,Le.Z)(function*(j,q){f.isInitialized();const re=q||function _J(t){return Ru((0,w_.vp)(Nu(t,Os)),Os)}(j);return yield f.keychain.set(re,j),re});return function(j,q){return I.apply(this,arguments)}}(),this.deleteKeyPair=function(){var I=(0,Le.Z)(function*(j){f.isInitialized(),yield f.keychain.del(j)});return function(j){return I.apply(this,arguments)}}(),this.deleteSymKey=function(){var I=(0,Le.Z)(function*(j){f.isInitialized(),yield f.keychain.del(j)});return function(j){return I.apply(this,arguments)}}(),this.encode=function(){var I=(0,Le.Z)(function*(j,q,re){f.isInitialized();const se=ZC(re),fe=KD(q);if(JC(se)){const Te=se.senderPublicKey,Be=se.receiverPublicKey;j=yield f.generateSharedKey(Te,Be)}const be=f.getSymKey(j),{type:_e,senderPublicKey:Oe}=se;return MJ({type:_e,symKey:be,message:fe,senderPublicKey:Oe})});return function(j,q,re){return I.apply(this,arguments)}}(),this.decode=function(){var I=(0,Le.Z)(function*(j,q,re){f.isInitialized();const se=function CJ(t,e){const n=Vb(t);return ZC({type:Dm(n.type),senderPublicKey:typeof n.senderPublicKey<"u"?Ru(n.senderPublicKey,Os):void 0,receiverPublicKey:e?.receiverPublicKey})}(q,re);if(JC(se)){const fe=se.receiverPublicKey,be=se.senderPublicKey;j=yield f.generateSharedKey(fe,be)}try{const be=function IJ(t){const e=new hC.OK(Nu(t.symKey,Os)),{sealed:n,iv:s}=Vb(t.encoded),f=e.open(s,n);if(null===f)throw new Error("Failed to decrypt");return Ru(f,C_)}({symKey:f.getSymKey(j),encoded:q});return UD(be)}catch(fe){f.logger.error(`Failed to decode message from topic: '${j}', clientId: '${yield f.getClientId()}'`),f.logger.error(fe)}});return function(j,q,re){return I.apply(this,arguments)}}(),this.getPayloadType=I=>Dm(Vb(I).type),this.getPayloadSenderPublicKey=I=>{const j=Vb(I);return j.senderPublicKey?function _Q(t,e="utf8"){const n=AQ[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(t).substring(1):globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8")}(j.senderPublicKey,Os):void 0},this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.keychain=s||new Jq(this.core,this.logger)}get context(){return(0,Kr.getLoggerContext)(this.logger)}setPrivateKey(e,n){var s=this;return(0,Le.Z)(function*(){return yield s.keychain.set(e,n),e})()}getPrivateKey(e){return this.keychain.get(e)}getClientSeed(){var e=this;return(0,Le.Z)(function*(){let n="";try{n=e.keychain.get(cO)}catch{n=x_(),yield e.keychain.set(cO,n)}return function yq(t,e="utf8"){const n=gq[e];if(!n)throw new Error(`Unsupported encoding "${e}"`);return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode(`${n.prefix}${t}`):oO(globalThis.Buffer.from(t,"utf-8"))}(n,"base16")})()}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class $q extends EH{constructor(e,n){var s;super(e,n),s=this,this.logger=e,this.core=n,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Pf,this.init=(0,Le.Z)(function*(){if(!s.initialized){s.logger.trace("Initialized");try{const f=yield s.getRelayerMessages();typeof f<"u"&&(s.messages=f),s.logger.debug(`Successfully Restored records for ${s.name}`),s.logger.trace({type:"method",method:"restore",size:s.messages.size})}catch(f){s.logger.debug(`Failed to Restore records for ${s.name}`),s.logger.error(f)}finally{s.initialized=!0}}}),this.set=function(){var f=(0,Le.Z)(function*(I,j){s.isInitialized();const q=Mp(j);let re=s.messages.get(I);return typeof re>"u"&&(re={}),typeof re[q]<"u"||(re[q]=j,s.messages.set(I,re),yield s.persist()),q});return function(I,j){return f.apply(this,arguments)}}(),this.get=f=>{this.isInitialized();let I=this.messages.get(f);return typeof I>"u"&&(I={}),I},this.has=(f,I)=>{this.isInitialized();return typeof this.get(f)[Mp(I)]<"u"},this.del=function(){var f=(0,Le.Z)(function*(I){s.isInitialized(),s.messages.delete(I),yield s.persist()});return function(I){return f.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(e,this.name),this.core=n}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}setRelayerMessages(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,qC(e))})()}getRelayerMessages(){var e=this;return(0,Le.Z)(function*(){const n=yield e.core.storage.getItem(e.storageKey);return typeof n<"u"?eT(n):void 0})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setRelayerMessages(e.messages)})()}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class Qq extends AH{constructor(e,n){var s;super(e,n),s=this,this.relayer=e,this.logger=n,this.events=new Du.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=(0,zn.toMiliseconds)(zn.TEN_SECONDS),this.needsTransportRestart=!1,this.publish=function(){var f=(0,Le.Z)(function*(I,j,q){var re;s.logger.debug("Publishing Payload"),s.logger.trace({type:"method",method:"publish",params:{topic:I,message:j,opts:q}});try{const se=q?.ttl||Iq,fe=L_(q),be=q?.prompt||!1,_e=q?.tag||0,Oe=q?.id||FT().toString(),Te={topic:I,message:j,opts:{ttl:se,relay:fe,prompt:be,tag:_e,id:Oe}},Be=setTimeout(()=>s.queue.set(Oe,Te),s.publishTimeout);try{yield yield Cm(s.rpcPublish(I,j,se,fe,be,_e,Oe),s.publishTimeout,"Failed to publish payload, please try again."),s.removeRequestFromQueue(Oe),s.relayer.events.emit(ss_publish,Te)}catch(Fe){if(s.logger.debug("Publishing Payload stalled"),s.needsTransportRestart=!0,null!=(re=q?.internal)&&re.throwOnFailedPublish)throw s.removeRequestFromQueue(Oe),Fe;return}finally{clearTimeout(Be)}s.logger.debug("Successfully Published Payload"),s.logger.trace({type:"method",method:"publish",params:{topic:I,message:j,opts:q}})}catch(se){throw s.logger.debug("Failed to Publish Payload"),s.logger.error(se),se}});return function(I,j,q){return f.apply(this,arguments)}}(),this.on=(f,I)=>{this.events.on(f,I)},this.once=(f,I)=>{this.events.once(f,I)},this.off=(f,I)=>{this.events.off(f,I)},this.removeListener=(f,I)=>{this.events.removeListener(f,I)},this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.registerEventListeners()}get context(){return(0,Kr.getLoggerContext)(this.logger)}rpcPublish(e,n,s,f,I,j,q){var re,se,fe,be;const _e={method:Hb(f.protocol).publish,params:{topic:e,message:n,ttl:s,prompt:I,tag:j},id:q};return xs(null==(re=_e.params)?void 0:re.prompt)&&(null==(se=_e.params)||delete se.prompt),xs(null==(fe=_e.params)?void 0:fe.tag)&&(null==(be=_e.params)||delete be.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:_e}),this.relayer.request(_e)}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){var e=this;this.queue.forEach(function(){var n=(0,Le.Z)(function*(s){const{topic:f,message:I,opts:j}=s;yield e.publish(f,I,j)});return function(s){return n.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(ss_connection_stalled);this.checkQueue()}),this.relayer.on(ss_message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}class Xq{constructor(){this.map=new Map,this.set=(e,n)=>{const s=this.get(e);this.exists(e,n)||this.map.set(e,[...s,n])},this.get=e=>this.map.get(e)||[],this.exists=(e,n)=>this.get(e).includes(n),this.delete=(e,n)=>{if(typeof n>"u")return void this.map.delete(e);if(!this.map.has(e))return;const s=this.get(e);if(!this.exists(e,n))return;const f=s.filter(I=>I!==n);f.length?this.map.set(e,f):this.map.delete(e)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var qq=Object.defineProperty,eee=Object.defineProperties,tee=Object.getOwnPropertyDescriptors,hO=Object.getOwnPropertySymbols,nee=Object.prototype.hasOwnProperty,ree=Object.prototype.propertyIsEnumerable,pO=(t,e,n)=>e in t?qq(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lm=(t,e)=>{for(var n in e||(e={}))nee.call(e,n)&&pO(t,n,e[n]);if(hO)for(var n of hO(e))ree.call(e,n)&&pO(t,n,e[n]);return t},t3=(t,e)=>eee(t,tee(e));class iee extends MH{constructor(e,n){var s;super(e,n),s=this,this.relayer=e,this.logger=n,this.subscriptions=new Map,this.topicMap=new Xq,this.events=new Du.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Pf,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=(0,Le.Z)(function*(){s.initialized||(s.logger.trace("Initialized"),s.registerEventListeners(),s.clientId=yield s.relayer.core.crypto.getClientId())}),this.subscribe=function(){var f=(0,Le.Z)(function*(I,j){yield s.restartToComplete(),s.isInitialized(),s.logger.debug("Subscribing Topic"),s.logger.trace({type:"method",method:"subscribe",params:{topic:I,opts:j}});try{const q=L_(j),re={topic:I,relay:q};s.pending.set(I,re);const se=yield s.rpcSubscribe(I,q);return s.onSubscribe(se,re),s.logger.debug("Successfully Subscribed Topic"),s.logger.trace({type:"method",method:"subscribe",params:{topic:I,opts:j}}),se}catch(q){throw s.logger.debug("Failed to Subscribe Topic"),s.logger.error(q),q}});return function(I,j){return f.apply(this,arguments)}}(),this.unsubscribe=function(){var f=(0,Le.Z)(function*(I,j){yield s.restartToComplete(),s.isInitialized(),typeof j?.id<"u"?yield s.unsubscribeById(I,j.id,j):yield s.unsubscribeByTopic(I,j)});return function(I,j){return f.apply(this,arguments)}}(),this.isSubscribed=function(){var f=(0,Le.Z)(function*(I){return!!s.topics.includes(I)||(yield new Promise((j,q)=>{const re=new zn.Watch;re.start(s.pendingSubscriptionWatchLabel);const se=setInterval(()=>{!s.pending.has(I)&&s.topics.includes(I)&&(clearInterval(se),re.stop(s.pendingSubscriptionWatchLabel),j(!0)),re.elapsed(s.pendingSubscriptionWatchLabel)>=jq&&(clearInterval(se),re.stop(s.pendingSubscriptionWatchLabel),q(new Error("Subscription resolution timeout")))},s.pollingInterval)}).catch(()=>!1))});return function(I){return f.apply(this,arguments)}}(),this.on=(f,I)=>{this.events.on(f,I)},this.once=(f,I)=>{this.events.once(f,I)},this.off=(f,I)=>{this.events.off(f,I)},this.removeListener=(f,I)=>{this.events.removeListener(f,I)},this.restart=(0,Le.Z)(function*(){s.restartInProgress=!0,yield s.restore(),yield s.reset(),s.restartInProgress=!1}),this.relayer=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.clientId=""}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(e,n){let s=!1;try{s=this.getSubscription(e).topic===n}catch{}return s}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(e,n){var s=this;return(0,Le.Z)(function*(){const f=s.topicMap.get(e);yield Promise.all(f.map(function(){var I=(0,Le.Z)(function*(j){return yield s.unsubscribeById(e,j,n)});return function(j){return I.apply(this,arguments)}}()))})()}unsubscribeById(e,n,s){var f=this;return(0,Le.Z)(function*(){f.logger.debug("Unsubscribing Topic"),f.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:s}});try{const I=L_(s);yield f.rpcUnsubscribe(e,n,I);const j=po("USER_DISCONNECTED",`${f.name}, ${e}`);yield f.onUnsubscribe(e,n,j),f.logger.debug("Successfully Unsubscribed Topic"),f.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:n,opts:s}})}catch(I){throw f.logger.debug("Failed to Unsubscribe Topic"),f.logger.error(I),I}})()}rpcSubscribe(e,n){var s=this;return(0,Le.Z)(function*(){const f={method:Hb(n.protocol).subscribe,params:{topic:e}};s.logger.debug("Outgoing Relay Payload"),s.logger.trace({type:"payload",direction:"outgoing",request:f});try{yield yield Cm(s.relayer.request(f),s.subscribeTimeout)}catch{s.logger.debug("Outgoing Relay Subscribe Payload stalled"),s.relayer.events.emit(ss_connection_stalled)}return Mp(e+s.clientId)})()}rpcBatchSubscribe(e){var n=this;return(0,Le.Z)(function*(){if(!e.length)return;const f={method:Hb(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(I=>I.topic)}};n.logger.debug("Outgoing Relay Payload"),n.logger.trace({type:"payload",direction:"outgoing",request:f});try{return yield yield Cm(n.relayer.request(f),n.subscribeTimeout)}catch{n.logger.debug("Outgoing Relay Payload stalled"),n.relayer.events.emit(ss_connection_stalled)}})()}rpcUnsubscribe(e,n,s){const f={method:Hb(s.protocol).unsubscribe,params:{topic:e,id:n}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:f}),this.relayer.request(f)}onSubscribe(e,n){this.setSubscription(e,t3(Lm({},n),{id:e})),this.pending.delete(n.topic)}onBatchSubscribe(e){e.length&&e.forEach(n=>{this.setSubscription(n.id,Lm({},n)),this.pending.delete(n.topic)})}onUnsubscribe(e,n,s){var f=this;return(0,Le.Z)(function*(){f.events.removeAllListeners(n),f.hasSubscription(n,e)&&f.deleteSubscription(n,s),yield f.relayer.messages.del(e)})()}setRelayerSubscriptions(e){var n=this;return(0,Le.Z)(function*(){yield n.relayer.core.storage.setItem(n.storageKey,e)})()}getRelayerSubscriptions(){var e=this;return(0,Le.Z)(function*(){return yield e.relayer.core.storage.getItem(e.storageKey)})()}setSubscription(e,n){this.subscriptions.has(e)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:n}),this.addSubscription(e,n))}addSubscription(e,n){this.subscriptions.set(e,Lm({},n)),this.topicMap.set(n.topic,e),this.events.emit(Bu_created,n)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});const n=this.subscriptions.get(e);if(!n){const{message:s}=wn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(s)}return n}deleteSubscription(e,n){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:n});const s=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(s.topic,e),this.events.emit(Bu_deleted,t3(Lm({},s),{reason:n}))}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setRelayerSubscriptions(e.values),e.events.emit(Bu_sync)})()}reset(){var e=this;return(0,Le.Z)(function*(){if(e.cached.length){const n=Math.ceil(e.cached.length/e.batchSubscribeTopicsLimit);for(let s=0;s"u"||!n.length)return;if(e.subscriptions.size){const{message:s}=wn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),e.logger.error(`${e.name}: ${JSON.stringify(e.values)}`),new Error(s)}e.cached=n,e.logger.debug(`Successfully Restored subscriptions for ${e.name}`),e.logger.trace({type:"method",method:"restore",subscriptions:e.values})}catch(n){e.logger.debug(`Failed to Restore subscriptions for ${e.name}`),e.logger.error(n)}})()}batchSubscribe(e){var n=this;return(0,Le.Z)(function*(){if(!e.length)return;const s=yield n.rpcBatchSubscribe(e);Tm(s)&&n.onBatchSubscribe(s.map((f,I)=>t3(Lm({},e[I]),{id:f})))})()}onConnect(){var e=this;return(0,Le.Z)(function*(){e.restartInProgress||(yield e.restart(),e.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var e=this;return(0,Le.Z)(function*(){if(!e.initialized||e.relayer.transportExplicitlyClosed)return;const n=[];e.pending.forEach(s=>{n.push(s)}),yield e.batchSubscribe(n)})()}registerEventListeners(){var e=this;this.relayer.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,(0,Le.Z)(function*(){yield e.checkPending()})),this.relayer.on(ss_connect,(0,Le.Z)(function*(){yield e.onConnect()})),this.relayer.on(ss_disconnect,()=>{this.onDisconnect()}),this.events.on(Bu_created,function(){var n=(0,Le.Z)(function*(s){const f=Bu_created;e.logger.info(`Emitting ${f}`),e.logger.debug({type:"event",event:f,data:s}),yield e.persist()});return function(s){return n.apply(this,arguments)}}()),this.events.on(Bu_deleted,function(){var n=(0,Le.Z)(function*(s){const f=Bu_deleted;e.logger.info(`Emitting ${f}`),e.logger.debug({type:"event",event:f,data:s}),yield e.persist()});return function(s){return n.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}restartToComplete(){var e=this;return(0,Le.Z)(function*(){e.restartInProgress&&(yield new Promise(n=>{const s=setInterval(()=>{e.restartInProgress||(clearInterval(s),n())},e.pollingInterval)}))})()}}var oee=Object.defineProperty,gO=Object.getOwnPropertySymbols,see=Object.prototype.hasOwnProperty,aee=Object.prototype.propertyIsEnumerable,yO=(t,e,n)=>e in t?oee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class cee extends _H{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.events=new Du.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.connectionAttemptInProgress=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.hasExperiencedNetworkDisruption=!1,this.request=function(){var s=(0,Le.Z)(function*(f){n.logger.debug("Publishing Request Payload");try{return yield n.toEstablishConnection(),yield n.provider.request(f)}catch(I){throw n.logger.debug("Failed to Publish Request"),n.logger.error(I),I}});return function(f){return s.apply(this,arguments)}}(),this.onPayloadHandler=s=>{this.onProviderPayload(s)},this.onConnectHandler=()=>{this.events.emit(ss_connect)},this.onDisconnectHandler=()=>{this.onProviderDisconnect()},this.onProviderErrorHandler=s=>{this.logger.error(s),this.events.emit(ss_error,s),this.logger.info("Fatal socket error received, closing transport"),this.transportClose()},this.registerProviderListeners=()=>{this.provider.on(vl_payload,this.onPayloadHandler),this.provider.on(vl_connect,this.onConnectHandler),this.provider.on(vl_disconnect,this.onDisconnectHandler),this.provider.on(vl_error,this.onProviderErrorHandler)},this.core=e.core,this.logger=typeof e.logger<"u"&&"string"!=typeof e.logger?(0,Kr.generateChildLogger)(e.logger,this.name):(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e.logger||"error"})),this.messages=new $q(this.logger,e.core),this.subscriber=new iee(this,this.logger),this.publisher=new Qq(this,this.logger),this.relayUrl=e?.relayUrl||fO,this.projectId=e.projectId,this.bundleId=function kJ(){var t;try{return Ip()&&typeof global<"u"&&typeof(null==global?void 0:global.Application)<"u"?null==(t=global.Application)?void 0:t.applicationId:void 0}catch{return}}(),this.provider={}}init(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized"),e.registerEventListeners(),yield e.createProvider(),yield Promise.all([e.messages.init(),e.subscriber.init()]);try{yield e.transportOpen()}catch{e.logger.warn(`Connection via ${e.relayUrl} failed, attempting to connect via failover domain ${dO}...`),yield e.restartTransport(dO)}e.initialized=!0,setTimeout((0,Le.Z)(function*(){0===e.subscriber.topics.length&&(e.logger.info("No topics subscribed to after init, closing transport"),yield e.transportClose(),e.transportExplicitlyClosed=!1)}),1e4)})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(e,n,s){var f=this;return(0,Le.Z)(function*(){f.isInitialized(),yield f.publisher.publish(e,n,s),yield f.recordMessageEvent({topic:e,message:n,publishedAt:Date.now()})})()}subscribe(e,n){var s=this;return(0,Le.Z)(function*(){var f;s.isInitialized();let j,I=(null==(f=s.subscriber.topicMap.get(e))?void 0:f[0])||"";if(I)return I;const q=re=>{re.topic===e&&(s.subscriber.off(Bu_created,q),j())};return yield Promise.all([new Promise(re=>{j=re,s.subscriber.on(Bu_created,q)}),new Promise(function(){var re=(0,Le.Z)(function*(se){I=yield s.subscriber.subscribe(e,n),se()});return function(se){return re.apply(this,arguments)}}())]),I})()}unsubscribe(e,n){var s=this;return(0,Le.Z)(function*(){s.isInitialized(),yield s.subscriber.unsubscribe(e,n)})()}on(e,n){this.events.on(e,n)}once(e,n){this.events.once(e,n)}off(e,n){this.events.off(e,n)}removeListener(e,n){this.events.removeListener(e,n)}transportClose(){var e=this;return(0,Le.Z)(function*(){e.transportExplicitlyClosed=!0,e.hasExperiencedNetworkDisruption&&e.connected?yield Cm(e.provider.disconnect(),1e3,"provider.disconnect()").catch(()=>e.onProviderDisconnect()):e.connected&&(yield e.provider.disconnect())})()}transportOpen(e){var n=this;return(0,Le.Z)(function*(){if(n.transportExplicitlyClosed=!1,yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress){e&&e!==n.relayUrl&&(n.relayUrl=e,yield n.transportClose(),yield n.createProvider()),n.connectionAttemptInProgress=!0;try{yield Promise.all([new Promise(s=>{if(!n.initialized)return s();n.subscriber.once(Bu_resubscribed,()=>{s()})}),new Promise(function(){var s=(0,Le.Z)(function*(f,I){try{yield Cm(n.provider.connect(),1e4,`Socket stalled when trying to connect to ${n.relayUrl}`)}catch(j){return void I(j)}f()});return function(f,I){return s.apply(this,arguments)}}())])}catch(s){n.logger.error(s);const f=s;if(!n.isConnectionStalled(f.message))throw s;n.provider.events.emit(vl_disconnect)}finally{n.connectionAttemptInProgress=!1,n.hasExperiencedNetworkDisruption=!1}}})()}restartTransport(e){var n=this;return(0,Le.Z)(function*(){yield n.confirmOnlineStateOrThrow(),!n.connectionAttemptInProgress&&(n.relayUrl=e||n.relayUrl,yield n.transportClose(),yield n.createProvider(),yield n.transportOpen())})()}confirmOnlineStateOrThrow(){return(0,Le.Z)(function*(){if(!(yield gT()))throw new Error("No internet connection detected. Please restart your network and try again.")})()}isConnectionStalled(e){return this.staleConnectionErrors.some(n=>e.includes(n))}createProvider(){var e=this;return(0,Le.Z)(function*(){e.provider.connection&&e.unregisterProviderListeners();const n=yield e.core.crypto.signJWT(e.relayUrl);e.provider=new UQ(new HQ(KJ({sdkVersion:"2.11.0",protocol:e.protocol,version:e.version,relayUrl:e.relayUrl,projectId:e.projectId,auth:n,useOnCloseEvent:!0,bundleId:e.bundleId}))),e.registerProviderListeners()})()}recordMessageEvent(e){var n=this;return(0,Le.Z)(function*(){const{topic:s,message:f}=e;yield n.messages.set(s,f)})()}shouldIgnoreMessageEvent(e){var n=this;return(0,Le.Z)(function*(){const{topic:s,message:f}=e;if(!f||0===f.length)return n.logger.debug(`Ignoring invalid/empty message: ${f}`),!0;if(!(yield n.subscriber.isSubscribed(s)))return n.logger.debug(`Ignoring message for non-subscribed topic ${s}`),!0;const I=n.messages.has(s,f);return I&&n.logger.debug(`Ignoring duplicate message: ${f}`),I})()}onProviderPayload(e){var n=this;return(0,Le.Z)(function*(){if(n.logger.debug("Incoming Relay Payload"),n.logger.trace({type:"payload",direction:"incoming",payload:e}),J_(e)){if(!e.method.endsWith("_subscription"))return;const s=e.params,{topic:f,message:I,publishedAt:j}=s.data,q={topic:f,message:I,publishedAt:j};n.logger.debug("Emitting Relayer Payload"),n.logger.trace(((t,e)=>{for(var n in e||(e={}))see.call(e,n)&&yO(t,n,e[n]);if(gO)for(var n of gO(e))aee.call(e,n)&&yO(t,n,e[n]);return t})({type:"event",event:s.id},q)),n.events.emit(s.id,q),yield n.acknowledgePayload(e),yield n.onMessageEvent(q)}else Xb(e)&&n.events.emit(ss_message_ack,e)})()}onMessageEvent(e){var n=this;return(0,Le.Z)(function*(){(yield n.shouldIgnoreMessageEvent(e))||(n.events.emit(ss_message,e),yield n.recordMessageEvent(e))})()}acknowledgePayload(e){var n=this;return(0,Le.Z)(function*(){const s=G_(e.id,!0);yield n.provider.connection.send(s)})()}unregisterProviderListeners(){this.provider.off(vl_payload,this.onPayloadHandler),this.provider.off(vl_connect,this.onConnectHandler),this.provider.off(vl_disconnect,this.onDisconnectHandler),this.provider.off(vl_error,this.onProviderErrorHandler)}registerEventListeners(){var e=this;return(0,Le.Z)(function*(){e.events.on(ss_connection_stalled,()=>{e.restartTransport().catch(s=>e.logger.error(s))});let n=yield gT();HY(function(){var s=(0,Le.Z)(function*(f){e.initialized&&n!==f&&(n=f,f?yield e.restartTransport().catch(I=>e.logger.error(I)):(e.hasExperiencedNetworkDisruption=!0,yield e.transportClose().catch(I=>e.logger.error(I))))});return function(f){return s.apply(this,arguments)}}())})()}onProviderDisconnect(){this.events.emit(ss_disconnect),this.attemptToReconnect()}attemptToReconnect(){var e=this;this.transportExplicitlyClosed||(this.logger.info("attemptToReconnect called. Connecting..."),setTimeout((0,Le.Z)(function*(){yield e.restartTransport().catch(n=>e.logger.error(n))}),(0,zn.toMiliseconds)(xq)))}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}toEstablishConnection(){var e=this;return(0,Le.Z)(function*(){if(yield e.confirmOnlineStateOrThrow(),!e.connected){if(e.connectionAttemptInProgress)return yield new Promise(n=>{const s=setInterval(()=>{e.connected&&(clearInterval(s),n())},e.connectionStatusPollingInterval)});yield e.restartTransport()}})()}}var lee=Object.defineProperty,mO=Object.getOwnPropertySymbols,fee=Object.prototype.hasOwnProperty,dee=Object.prototype.propertyIsEnumerable,vO=(t,e,n)=>e in t?lee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bO=(t,e)=>{for(var n in e||(e={}))fee.call(e,n)&&vO(t,n,e[n]);if(mO)for(var n of mO(e))dee.call(e,n)&&vO(t,n,e[n]);return t};class ew extends SH{constructor(e,n,s,f=Pf,I){var j;super(e,n,s,f),j=this,this.core=e,this.logger=n,this.name=s,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Pf,this.init=(0,Le.Z)(function*(){j.initialized||(j.logger.trace("Initialized"),yield j.restore(),j.cached.forEach(q=>{j.getKey&&null!==q&&!xs(q)?j.map.set(j.getKey(q),q):function EY(t){var e;return null==(e=t?.proposer)?void 0:e.publicKey}(q)?j.map.set(q.id,q):function AY(t){return t?.topic}(q)&&j.map.set(q.topic,q)}),j.cached=[],j.initialized=!0)}),this.set=function(){var q=(0,Le.Z)(function*(re,se){j.isInitialized(),j.map.has(re)?yield j.update(re,se):(j.logger.debug("Setting value"),j.logger.trace({type:"method",method:"set",key:re,value:se}),j.map.set(re,se),yield j.persist())});return function(re,se){return q.apply(this,arguments)}}(),this.get=q=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:q}),this.getData(q)),this.getAll=q=>(this.isInitialized(),q?this.values.filter(re=>Object.keys(q).every(se=>GQ()(re[se],q[se]))):this.values),this.update=function(){var q=(0,Le.Z)(function*(re,se){j.isInitialized(),j.logger.debug("Updating value"),j.logger.trace({type:"method",method:"update",key:re,update:se});const fe=bO(bO({},j.getData(re)),se);j.map.set(re,fe),yield j.persist()});return function(re,se){return q.apply(this,arguments)}}(),this.delete=function(){var q=(0,Le.Z)(function*(re,se){j.isInitialized(),j.map.has(re)&&(j.logger.debug("Deleting value"),j.logger.trace({type:"method",method:"delete",key:re,reason:se}),j.map.delete(re),yield j.persist())});return function(re,se){return q.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.name),this.storagePrefix=f,this.getKey=I}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getDataStore(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getData(e){const n=this.map.get(e);if(!n){const{message:s}=wn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}return n}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setDataStore(e.values)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getDataStore();if(typeof n>"u"||!n.length)return;if(e.map.size){const{message:s}=wn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=n,e.logger.debug(`Successfully Restored value for ${e.name}`),e.logger.trace({type:"method",method:"restore",value:e.values})}catch(n){e.logger.debug(`Failed to Restore value for ${e.name}`),e.logger.error(n)}})()}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class hee{constructor(e,n){var s=this;this.core=e,this.logger=n,this.name="pairing",this.version="0.3",this.events=new(GA()),this.initialized=!1,this.storagePrefix=Pf,this.ignoredPayloadTypes=[ah],this.registeredMethods=[],this.init=(0,Le.Z)(function*(){s.initialized||(yield s.pairings.init(),yield s.cleanup(),s.registerRelayerEvents(),s.registerExpirerEvents(),s.initialized=!0,s.logger.trace("Initialized"))}),this.register=({methods:f})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...f])]},this.create=(0,Le.Z)(function*(){s.isInitialized();const f=x_(),I=yield s.core.crypto.setSymKey(f),j=ku(zn.FIVE_MINUTES),q={protocol:"irn"},re={topic:I,expiry:j,relay:q,active:!1},se=rY({protocol:s.core.protocol,version:s.core.version,topic:I,symKey:f,relay:q});return yield s.pairings.set(I,re),yield s.core.relayer.subscribe(I),s.core.expirer.set(I,j),{topic:I,uri:se}}),this.pair=function(){var f=(0,Le.Z)(function*(I){s.isInitialized(),s.isValidPair(I);const{topic:j,symKey:q,relay:re}=oT(I.uri);let se;if(s.pairings.keys.includes(j)&&(se=s.pairings.get(j),se.active))throw new Error(`Pairing already exists: ${j}. Please try again with a new connection URI.`);const fe=ku(zn.FIVE_MINUTES),be={topic:j,relay:re,expiry:fe,active:!1};return yield s.pairings.set(j,be),s.core.expirer.set(j,fe),I.activatePairing&&(yield s.activate({topic:j})),s.events.emit(km_create,be),s.core.crypto.keychain.has(j)||(yield s.core.crypto.setSymKey(q,j),yield s.core.relayer.subscribe(j,{relay:re})),be});return function(I){return f.apply(this,arguments)}}(),this.activate=function(){var f=(0,Le.Z)(function*({topic:I}){s.isInitialized();const j=ku(zn.THIRTY_DAYS);yield s.pairings.update(I,{active:!0,expiry:j}),s.core.expirer.set(I,j)});return function(I){return f.apply(this,arguments)}}(),this.ping=function(){var f=(0,Le.Z)(function*(I){s.isInitialized(),yield s.isValidPing(I);const{topic:j}=I;if(s.pairings.keys.includes(j)){const q=yield s.sendRequest(j,"wc_pairingPing",{}),{done:re,resolve:se,reject:fe}=Tp();s.events.once(oo("pairing_ping",q),({error:be})=>{be?fe(be):se()}),yield re()}});return function(I){return f.apply(this,arguments)}}(),this.updateExpiry=function(){var f=(0,Le.Z)(function*({topic:I,expiry:j}){s.isInitialized(),yield s.pairings.update(I,{expiry:j})});return function(I){return f.apply(this,arguments)}}(),this.updateMetadata=function(){var f=(0,Le.Z)(function*({topic:I,metadata:j}){s.isInitialized(),yield s.pairings.update(I,{peerMetadata:j})});return function(I){return f.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var f=(0,Le.Z)(function*(I){s.isInitialized(),yield s.isValidDisconnect(I);const{topic:j}=I;s.pairings.keys.includes(j)&&(yield s.sendRequest(j,"wc_pairingDelete",po("USER_DISCONNECTED")),yield s.deletePairing(j))});return function(I){return f.apply(this,arguments)}}(),this.sendRequest=function(){var f=(0,Le.Z)(function*(I,j,q){const re=Pp(j,q),se=yield s.core.crypto.encode(I,re),fe=Rm[j].req;return s.core.history.set(I,re),s.core.relayer.publish(I,se,fe),re.id});return function(I,j,q){return f.apply(this,arguments)}}(),this.sendResult=function(){var f=(0,Le.Z)(function*(I,j,q){const re=G_(I,q),se=yield s.core.crypto.encode(j,re),fe=yield s.core.history.get(j,I),be=Rm[fe.request.method].res;yield s.core.relayer.publish(j,se,be),yield s.core.history.resolve(re)});return function(I,j,q){return f.apply(this,arguments)}}(),this.sendError=function(){var f=(0,Le.Z)(function*(I,j,q){const re=Z_(I,q),se=yield s.core.crypto.encode(j,re),fe=yield s.core.history.get(j,I),be=Rm[fe.request.method]?Rm[fe.request.method].res:Rm.unregistered_method.res;yield s.core.relayer.publish(j,se,be),yield s.core.history.resolve(re)});return function(I,j,q){return f.apply(this,arguments)}}(),this.deletePairing=function(){var f=(0,Le.Z)(function*(I,j){yield s.core.relayer.unsubscribe(I),yield Promise.all([s.pairings.delete(I,po("USER_DISCONNECTED")),s.core.crypto.deleteSymKey(I),j?Promise.resolve():s.core.expirer.del(I)])});return function(I,j){return f.apply(this,arguments)}}(),this.cleanup=(0,Le.Z)(function*(){const f=s.pairings.getAll().filter(I=>xf(I.expiry));yield Promise.all(f.map(I=>s.deletePairing(I.topic)))}),this.onRelayEventRequest=f=>{const{topic:I,payload:j}=f;switch(j.method){case"wc_pairingPing":return this.onPairingPingRequest(I,j);case"wc_pairingDelete":return this.onPairingDeleteRequest(I,j);default:return this.onUnknownRpcMethodRequest(I,j)}},this.onRelayEventResponse=function(){var f=(0,Le.Z)(function*(I){const{topic:j,payload:q}=I,re=(yield s.core.history.get(j,q.id)).request.method;return"wc_pairingPing"===re?s.onPairingPingResponse(j,q):s.onUnknownRpcMethodResponse(re)});return function(I){return f.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var f=(0,Le.Z)(function*(I,j){const{id:q}=j;try{s.isValidPing({topic:I}),yield s.sendResult(q,I,!0),s.events.emit(km_ping,{id:q,topic:I})}catch(re){yield s.sendError(q,I,re),s.logger.error(re)}});return function(I,j){return f.apply(this,arguments)}}(),this.onPairingPingResponse=(f,I)=>{const{id:j}=I;setTimeout(()=>{ml(I)?this.events.emit(oo("pairing_ping",j),{}):Lu(I)&&this.events.emit(oo("pairing_ping",j),{error:I.error})},500)},this.onPairingDeleteRequest=function(){var f=(0,Le.Z)(function*(I,j){const{id:q}=j;try{s.isValidDisconnect({topic:I}),yield s.deletePairing(I),s.events.emit(km_delete,{id:q,topic:I})}catch(re){yield s.sendError(q,I,re),s.logger.error(re)}});return function(I,j){return f.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var f=(0,Le.Z)(function*(I,j){const{id:q,method:re}=j;try{if(s.registeredMethods.includes(re))return;const se=po("WC_METHOD_UNSUPPORTED",re);yield s.sendError(q,I,se),s.logger.error(se)}catch(se){yield s.sendError(q,I,se),s.logger.error(se)}});return function(I,j){return f.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=f=>{this.registeredMethods.includes(f)||this.logger.error(po("WC_METHOD_UNSUPPORTED",f))},this.isValidPair=f=>{var I;if(!Xs(f)){const{message:q}=wn("MISSING_OR_INVALID",`pair() params: ${f}`);throw new Error(q)}if(!function wY(t){if(Io(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}(f.uri)){const{message:q}=wn("MISSING_OR_INVALID",`pair() uri: ${f.uri}`);throw new Error(q)}const j=oT(f.uri);if(null==(I=j?.relay)||!I.protocol){const{message:q}=wn("MISSING_OR_INVALID","pair() uri#relay-protocol");throw new Error(q)}if(null==j||!j.symKey){const{message:q}=wn("MISSING_OR_INVALID","pair() uri#symKey");throw new Error(q)}},this.isValidPing=function(){var f=(0,Le.Z)(function*(I){if(!Xs(I)){const{message:q}=wn("MISSING_OR_INVALID",`ping() params: ${I}`);throw new Error(q)}const{topic:j}=I;yield s.isValidPairingTopic(j)});return function(I){return f.apply(this,arguments)}}(),this.isValidDisconnect=function(){var f=(0,Le.Z)(function*(I){if(!Xs(I)){const{message:q}=wn("MISSING_OR_INVALID",`disconnect() params: ${I}`);throw new Error(q)}const{topic:j}=I;yield s.isValidPairingTopic(j)});return function(I){return f.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var f=(0,Le.Z)(function*(I){if(!Io(I,!1)){const{message:j}=wn("MISSING_OR_INVALID",`pairing topic should be a string: ${I}`);throw new Error(j)}if(!s.pairings.keys.includes(I)){const{message:j}=wn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${I}`);throw new Error(j)}if(xf(s.pairings.get(I).expiry)){yield s.deletePairing(I);const{message:j}=wn("EXPIRED",`pairing topic: ${I}`);throw new Error(j)}});return function(I){return f.apply(this,arguments)}}(),this.core=e,this.logger=(0,Kr.generateChildLogger)(n,this.name),this.pairings=new ew(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Kr.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}registerRelayerEvents(){var e=this;this.core.relayer.on(ss_message,function(){var n=(0,Le.Z)(function*(s){const{topic:f,message:I}=s;if(!e.pairings.keys.includes(f)||e.ignoredPayloadTypes.includes(e.core.crypto.getPayloadType(I)))return;const j=yield e.core.crypto.decode(f,I);try{J_(j)?(e.core.history.set(f,j),e.onRelayEventRequest({topic:f,payload:j})):Xb(j)&&(yield e.core.history.resolve(j),yield e.onRelayEventResponse({topic:f,payload:j}),e.core.history.delete(f,j.id))}catch(q){e.logger.error(q)}});return function(s){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.core.expirer.on(qa_expired,function(){var n=(0,Le.Z)(function*(s){const{topic:f}=nT(s.target);f&&e.pairings.keys.includes(f)&&(yield e.deletePairing(f,!0),e.events.emit(km_expire,{topic:f}))});return function(s){return n.apply(this,arguments)}}())}}class pee extends wH{constructor(e,n){var s;super(e,n),s=this,this.core=e,this.logger=n,this.records=new Map,this.events=new Du.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Pf,this.init=(0,Le.Z)(function*(){s.initialized||(s.logger.trace("Initialized"),yield s.restore(),s.cached.forEach(f=>s.records.set(f.id,f)),s.cached=[],s.registerEventListeners(),s.initialized=!0)}),this.set=(f,I,j)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:f,request:I,chainId:j}),this.records.has(I.id))return;const q={id:I.id,topic:f,request:{method:I.method,params:I.params||null},chainId:j,expiry:ku(zn.THIRTY_DAYS)};this.records.set(q.id,q),this.events.emit(gc_created,q)},this.resolve=function(){var f=(0,Le.Z)(function*(I){if(s.isInitialized(),s.logger.debug("Updating JSON-RPC response history record"),s.logger.trace({type:"method",method:"update",response:I}),!s.records.has(I.id))return;const j=yield s.getRecord(I.id);typeof j.response>"u"&&(j.response=Lu(I)?{error:I.error}:{result:I.result},s.records.set(j.id,j),s.events.emit(gc_updated,j))});return function(I){return f.apply(this,arguments)}}(),this.get=function(){var f=(0,Le.Z)(function*(I,j){return s.isInitialized(),s.logger.debug("Getting record"),s.logger.trace({type:"method",method:"get",topic:I,id:j}),yield s.getRecord(j)});return function(I,j){return f.apply(this,arguments)}}(),this.delete=(f,I)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:I}),this.values.forEach(j=>{if(j.topic===f){if(typeof I<"u"&&j.id!==I)return;this.records.delete(j.id),this.events.emit(gc_deleted,j)}})},this.exists=function(){var f=(0,Le.Z)(function*(I,j){return s.isInitialized(),!!s.records.has(j)&&(yield s.getRecord(j)).topic===I});return function(I,j){return f.apply(this,arguments)}}(),this.on=(f,I)=>{this.events.on(f,I)},this.once=(f,I)=>{this.events.once(f,I)},this.off=(f,I)=>{this.events.off(f,I)},this.removeListener=(f,I)=>{this.events.removeListener(f,I)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const e=[];return this.values.forEach(n=>{if(typeof n.response<"u")return;const s={topic:n.topic,request:Pp(n.request.method,n.request.params,n.id),chainId:n.chainId};return e.push(s)}),e}setJsonRpcRecords(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getJsonRpcRecords(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}getRecord(e){this.isInitialized();const n=this.records.get(e);if(!n){const{message:s}=wn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw new Error(s)}return n}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setJsonRpcRecords(e.values),e.events.emit(gc_sync)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getJsonRpcRecords();if(typeof n>"u"||!n.length)return;if(e.records.size){const{message:s}=wn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=n,e.logger.debug(`Successfully Restored records for ${e.name}`),e.logger.trace({type:"method",method:"restore",records:e.values})}catch(n){e.logger.debug(`Failed to Restore records for ${e.name}`),e.logger.error(n)}})()}registerEventListeners(){this.events.on(gc_created,e=>{const n=gc_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(gc_updated,e=>{const n=gc_updated;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.events.on(gc_deleted,e=>{const n=gc_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,record:e}),this.persist()}),this.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(e=>{(0,zn.toMiliseconds)(e.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${e.id}`),this.delete(e.topic,e.id))})}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class gee extends IH{constructor(e,n){var s;super(e,n),s=this,this.core=e,this.logger=n,this.expirations=new Map,this.events=new Du.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Pf,this.init=(0,Le.Z)(function*(){s.initialized||(s.logger.trace("Initialized"),yield s.restore(),s.cached.forEach(f=>s.expirations.set(f.target,f)),s.cached=[],s.registerEventListeners(),s.initialized=!0)}),this.has=f=>{try{const I=this.formatTarget(f);return typeof this.getExpiration(I)<"u"}catch{return!1}},this.set=(f,I)=>{this.isInitialized();const j=this.formatTarget(f),q={target:j,expiry:I};this.expirations.set(j,q),this.checkExpiry(j,q),this.events.emit(qa_created,{target:j,expiration:q})},this.get=f=>{this.isInitialized();const I=this.formatTarget(f);return this.getExpiration(I)},this.del=f=>{if(this.isInitialized(),this.has(f)){const I=this.formatTarget(f),j=this.getExpiration(I);this.expirations.delete(I),this.events.emit(qa_deleted,{target:I,expiration:j})}},this.on=(f,I)=>{this.events.on(f,I)},this.once=(f,I)=>{this.events.once(f,I)},this.off=(f,I)=>{this.events.off(f,I)},this.removeListener=(f,I)=>{this.events.removeListener(f,I)},this.logger=(0,Kr.generateChildLogger)(n,this.name)}get context(){return(0,Kr.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return function WJ(t){return tT("topic",t)}(e);if("number"==typeof e)return function GJ(t){return tT("id",t)}(e);const{message:n}=wn("UNKNOWN_TYPE","Target type: "+typeof e);throw new Error(n)}setExpirations(e){var n=this;return(0,Le.Z)(function*(){yield n.core.storage.setItem(n.storageKey,e)})()}getExpirations(){var e=this;return(0,Le.Z)(function*(){return yield e.core.storage.getItem(e.storageKey)})()}persist(){var e=this;return(0,Le.Z)(function*(){yield e.setExpirations(e.values),e.events.emit(qa_sync)})()}restore(){var e=this;return(0,Le.Z)(function*(){try{const n=yield e.getExpirations();if(typeof n>"u"||!n.length)return;if(e.expirations.size){const{message:s}=wn("RESTORE_WILL_OVERRIDE",e.name);throw e.logger.error(s),new Error(s)}e.cached=n,e.logger.debug(`Successfully Restored expirations for ${e.name}`),e.logger.trace({type:"method",method:"restore",expirations:e.values})}catch(n){e.logger.debug(`Failed to Restore expirations for ${e.name}`),e.logger.error(n)}})()}getExpiration(e){const n=this.expirations.get(e);if(!n){const{message:s}=wn("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(s),new Error(s)}return n}checkExpiry(e,n){const{expiry:s}=n;(0,zn.toMiliseconds)(s)-Date.now()<=0&&this.expire(e,n)}expire(e,n){this.expirations.delete(e),this.events.emit(qa_expired,{target:e,expiration:n})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,n)=>this.checkExpiry(n,e))}registerEventListeners(){this.core.heartbeat.on(Em.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(qa_created,e=>{const n=qa_created;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(qa_expired,e=>{const n=qa_expired;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()}),this.events.on(qa_deleted,e=>{const n=qa_deleted;this.logger.info(`Emitting ${n}`),this.logger.debug({type:"event",event:n,data:e}),this.persist()})}isInitialized(){if(!this.initialized){const{message:e}=wn("NOT_INITIALIZED",this.name);throw new Error(e)}}}class yee extends DH{constructor(e,n){var s;super(e,n),s=this,this.projectId=e,this.logger=n,this.name=q_,this.initialized=!1,this.queue=[],this.verifyDisabled=!1,this.init=function(){var f=(0,Le.Z)(function*(I){if(s.verifyDisabled||Ip()||!Dp())return;const j=s.getVerifyUrl(I?.verifyUrl);s.verifyUrl!==j&&s.removeIframe(),s.verifyUrl=j;try{yield s.createIframe()}catch(q){s.logger.info(`Verify iframe failed to load: ${s.verifyUrl}`),s.logger.info(q)}if(!s.initialized){s.removeIframe(),s.verifyUrl=e3;try{yield s.createIframe()}catch(q){s.logger.info(`Verify iframe failed to load: ${s.verifyUrl}`),s.logger.info(q),s.verifyDisabled=!0}}});return function(I){return f.apply(this,arguments)}}(),this.register=function(){var f=(0,Le.Z)(function*(I){s.initialized?s.sendPost(I.attestationId):(s.addToQueue(I.attestationId),yield s.init())});return function(I){return f.apply(this,arguments)}}(),this.resolve=function(){var f=(0,Le.Z)(function*(I){if(s.isDevEnv)return"";const j=s.getVerifyUrl(I?.verifyUrl);let q;try{q=yield s.fetchAttestation(I.attestationId,j)}catch(re){s.logger.info(`failed to resolve attestation: ${I.attestationId} from url: ${j}`),s.logger.info(re),q=yield s.fetchAttestation(I.attestationId,e3)}return q});return function(I){return f.apply(this,arguments)}}(),this.fetchAttestation=function(){var f=(0,Le.Z)(function*(I,j){s.logger.info(`resolving attestation: ${I} from url: ${j}`);const q=s.startAbortTimer(2*zn.ONE_SECOND),re=yield fetch(`${j}/attestation/${I}`,{signal:s.abortController.signal});return clearTimeout(q),200===re.status?yield re.json():void 0});return function(I,j){return f.apply(this,arguments)}}(),this.addToQueue=f=>{this.queue.push(f)},this.processQueue=()=>{0!==this.queue.length&&(this.queue.forEach(f=>this.sendPost(f)),this.queue=[])},this.sendPost=f=>{var I;try{if(!this.iframe)return;null==(I=this.iframe.contentWindow)||I.postMessage(f,"*"),this.logger.info(`postMessage sent: ${f} ${this.verifyUrl}`)}catch{}},this.createIframe=(0,Le.Z)(function*(){let f;const I=j=>{"verify_ready"===j.data&&(s.initialized=!0,s.processQueue(),window.removeEventListener("message",I),f())};yield Promise.race([new Promise(j=>{if(document.getElementById(q_))return j();window.addEventListener("message",I);const q=document.createElement("iframe");q.id=q_,q.src=`${s.verifyUrl}/${s.projectId}`,q.style.display="none",document.body.append(q),s.iframe=q,f=j}),new Promise((j,q)=>setTimeout(()=>{window.removeEventListener("message",I),q("verify iframe load timeout")},(0,zn.toMiliseconds)(zn.FIVE_SECONDS)))])}),this.removeIframe=()=>{this.iframe&&(this.iframe.remove(),this.iframe=void 0,this.initialized=!1)},this.getVerifyUrl=f=>{let I=f||Np;return Wq.includes(I)||(this.logger.info(`verify url: ${I}, not included in trusted list, assigning default: ${Np}`),I=Np),I},this.logger=(0,Kr.generateChildLogger)(n,this.name),this.verifyUrl=Np,this.abortController=new AbortController,this.isDevEnv=N_()&&process.env.IS_VITEST}get context(){return(0,Kr.getLoggerContext)(this.logger)}startAbortTimer(e){return this.abortController=new AbortController,setTimeout(()=>this.abortController.abort(),(0,zn.toMiliseconds)(e))}}class mee extends CH{constructor(e,n){var s;super(e,n),s=this,this.projectId=e,this.logger=n,this.context="echo",this.registerDeviceToken=function(){var f=(0,Le.Z)(function*(I){const{clientId:j,token:q,notificationType:re,enableEncrypted:se=!1}=I,fe=`https://echo.walletconnect.com/${s.projectId}/clients`;yield JQ()(fe,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:j,type:re,token:q,always_raw:se})})});return function(I){return f.apply(this,arguments)}}(),this.logger=(0,Kr.generateChildLogger)(n,this.context)}}var vee=Object.defineProperty,wO=Object.getOwnPropertySymbols,bee=Object.prototype.hasOwnProperty,wee=Object.prototype.propertyIsEnumerable,EO=(t,e,n)=>e in t?vee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AO=(t,e)=>{for(var n in e||(e={}))bee.call(e,n)&&EO(t,n,e[n]);if(wO)for(var n of wO(e))wee.call(e,n)&&EO(t,n,e[n]);return t};class n3 extends bH{constructor(e){super(e),this.protocol="wc",this.version=2,this.name=X_,this.events=new Du.EventEmitter,this.initialized=!1,this.on=(s,f)=>this.events.on(s,f),this.once=(s,f)=>this.events.once(s,f),this.off=(s,f)=>this.events.off(s,f),this.removeListener=(s,f)=>this.events.removeListener(s,f),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||fO,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";const n=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||vq_logger}));this.logger=(0,Kr.generateChildLogger)(n,this.name),this.heartbeat=new Em.HeartBeat,this.crypto=new Yq(this,this.logger,e?.keychain),this.history=new pee(this,this.logger),this.expirer=new gee(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new vH(AO(AO({},bq),e?.storageOptions)),this.relayer=new cee({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new hee(this,this.logger),this.verify=new yee(this.projectId||"",this.logger),this.echoClient=new mee(this.projectId||"",this.logger)}static init(e){return(0,Le.Z)(function*(){const n=new n3(e);yield n.initialize();const s=yield n.crypto.getClientId();return yield n.storage.setItem("WALLETCONNECT_CLIENT_ID",s),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}start(){var e=this;return(0,Le.Z)(function*(){e.initialized||(yield e.initialize())})()}initialize(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized");try{yield e.crypto.init(),yield e.history.init(),yield e.expirer.init(),yield e.relayer.init(),yield e.heartbeat.init(),yield e.pairing.init(),e.initialized=!0,e.logger.info("Core Initialization Success")}catch(n){throw e.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,n),e.logger.error(n.message),n}})()}}const Eee=n3,r3="wc@2:client:",i3_name="client",i3_logger="error",IO="WALLETCONNECT_DEEPLINK_CHOICE",tw=zn.SEVEN_DAYS,Bm={wc_sessionPropose:{req:{ttl:zn.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:zn.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:zn.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:zn.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:zn.ONE_DAY,prompt:!1,tag:1104},res:{ttl:zn.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:zn.ONE_DAY,prompt:!1,tag:1106},res:{ttl:zn.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:zn.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:zn.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:zn.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:zn.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:zn.ONE_DAY,prompt:!1,tag:1112},res:{ttl:zn.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:zn.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:zn.THIRTY_SECONDS,prompt:!1,tag:1115}}},o3={min:zn.FIVE_MINUTES,max:zn.SEVEN_DAYS},bl_idle="IDLE",bl_active="ACTIVE",Dee=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Cee=Object.defineProperty,Tee=Object.defineProperties,Oee=Object.getOwnPropertyDescriptors,DO=Object.getOwnPropertySymbols,xee=Object.prototype.hasOwnProperty,Pee=Object.prototype.propertyIsEnumerable,CO=(t,e,n)=>e in t?Cee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qs=(t,e)=>{for(var n in e||(e={}))xee.call(e,n)&&CO(t,n,e[n]);if(DO)for(var n of DO(e))Pee.call(e,n)&&CO(t,n,e[n]);return t},jm=(t,e)=>Tee(t,Oee(e));class Nee extends OH{constructor(e){var n;super(e),n=this,this.name="engine",this.events=new(GA()),this.initialized=!1,this.ignoredPayloadTypes=[ah],this.requestQueue={state:bl_idle,queue:[]},this.sessionRequestQueue={state:bl_idle,queue:[]},this.requestQueueDelay=zn.ONE_SECOND,this.init=(0,Le.Z)(function*(){n.initialized||(yield n.cleanup(),n.registerRelayerEvents(),n.registerExpirerEvents(),n.registerPairingEvents(),n.client.core.pairing.register({methods:Object.keys(Bm)}),n.initialized=!0,setTimeout(()=>{n.sessionRequestQueue.queue=n.getPendingSessionRequests(),n.processSessionRequestQueue()},(0,zn.toMiliseconds)(n.requestQueueDelay)))}),this.connect=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized();const I=jm(qs({},f),{requiredNamespaces:f.requiredNamespaces||{},optionalNamespaces:f.optionalNamespaces||{}});yield n.isValidConnect(I);const{pairingTopic:j,requiredNamespaces:q,optionalNamespaces:re,sessionProperties:se,relays:fe}=I;let _e,be=j,Oe=!1;if(be&&(Oe=n.client.core.pairing.pairings.get(be).active),!be||!Oe){const{topic:Tt,uri:Vt}=yield n.client.core.pairing.create();be=Tt,_e=Vt}const Te=yield n.client.core.crypto.generateKeyPair(),Be=qs({requiredNamespaces:q,optionalNamespaces:re,relays:fe??[{protocol:"irn"}],proposer:{publicKey:Te,metadata:n.client.metadata}},se&&{sessionProperties:se}),{reject:Fe,resolve:Ke,done:et}=Tp(zn.FIVE_MINUTES,"Proposal expired");if(n.events.once(oo("session_connect"),function(){var Tt=(0,Le.Z)(function*({error:Vt,session:vn}){if(Vt)Fe(Vt);else if(vn){vn.self.publicKey=Te;const en=jm(qs({},vn),{requiredNamespaces:vn.requiredNamespaces,optionalNamespaces:vn.optionalNamespaces});yield n.client.session.set(vn.topic,en),yield n.setExpiry(vn.topic,vn.expiry),be&&(yield n.client.core.pairing.updateMetadata({topic:be,metadata:vn.peer.metadata})),Ke(en)}});return function(Vt){return Tt.apply(this,arguments)}}()),!be){const{message:Tt}=wn("NO_MATCHING_KEY",`connect() pairing topic: ${be}`);throw new Error(Tt)}const Ye=yield n.sendRequest({topic:be,method:"wc_sessionPropose",params:Be}),ut=ku(zn.FIVE_MINUTES);return yield n.setProposal(Ye,qs({id:Ye,expiry:ut},Be)),{uri:_e,approval:et}});return function(f){return s.apply(this,arguments)}}(),this.pair=function(){var s=(0,Le.Z)(function*(f){return yield n.isInitialized(),yield n.client.core.pairing.pair(f)});return function(f){return s.apply(this,arguments)}}(),this.approve=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidApprove(f);const{id:I,relayProtocol:j,namespaces:q,sessionProperties:re}=f,se=n.client.proposal.get(I);let{pairingTopic:fe,proposer:be,requiredNamespaces:_e,optionalNamespaces:Oe}=se;fe=fe||"",xp(_e)||(_e=function pY(t,e){const n=Gb(t,e);if(n)throw new Error(n.message);const s={};for(const[f,I]of Object.entries(t))s[f]={methods:I.methods,events:I.events,chains:I.accounts.map(j=>`${j.split(":")[0]}:${j.split(":")[1]}`)};return s}(q,"approve()"));const Te=yield n.client.core.crypto.generateKeyPair(),Be=be.publicKey,Fe=yield n.client.core.crypto.generateSharedKey(Te,Be);fe&&I&&(yield n.client.core.pairing.updateMetadata({topic:fe,metadata:be.metadata}),yield n.sendResult({id:I,topic:fe,result:{relay:{protocol:j??"irn"},responderPublicKey:Te}}),yield n.client.proposal.delete(I,po("USER_DISCONNECTED")),yield n.client.core.pairing.activate({topic:fe}));const Ke=qs({relay:{protocol:j??"irn"},namespaces:q,requiredNamespaces:_e,optionalNamespaces:Oe,pairingTopic:fe,controller:{publicKey:Te,metadata:n.client.metadata},expiry:ku(tw)},re&&{sessionProperties:re});yield n.client.core.relayer.subscribe(Fe),yield n.sendRequest({topic:Fe,method:"wc_sessionSettle",params:Ke,throwOnFailedPublish:!0});const et=jm(qs({},Ke),{topic:Fe,pairingTopic:fe,acknowledged:!1,self:Ke.controller,peer:{publicKey:be.publicKey,metadata:be.metadata},controller:Te});return yield n.client.session.set(Fe,et),yield n.setExpiry(Fe,ku(tw)),{topic:Fe,acknowledged:()=>new Promise(Ye=>setTimeout(()=>Ye(n.client.session.get(Fe)),500))}});return function(f){return s.apply(this,arguments)}}(),this.reject=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidReject(f);const{id:I,reason:j}=f,{pairingTopic:q}=n.client.proposal.get(I);q&&(yield n.sendError(I,q,j),yield n.client.proposal.delete(I,po("USER_DISCONNECTED")))});return function(f){return s.apply(this,arguments)}}(),this.update=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidUpdate(f);const{topic:I,namespaces:j}=f,q=yield n.sendRequest({topic:I,method:"wc_sessionUpdate",params:{namespaces:j}}),{done:re,resolve:se,reject:fe}=Tp();return n.events.once(oo("session_update",q),({error:be})=>{be?fe(be):se()}),yield n.client.session.update(I,{namespaces:j}),{acknowledged:re}});return function(f){return s.apply(this,arguments)}}(),this.extend=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidExtend(f);const{topic:I}=f,j=yield n.sendRequest({topic:I,method:"wc_sessionExtend",params:{}}),{done:q,resolve:re,reject:se}=Tp();return n.events.once(oo("session_extend",j),({error:fe})=>{fe?se(fe):re()}),yield n.setExpiry(I,ku(tw)),{acknowledged:q}});return function(f){return s.apply(this,arguments)}}(),this.request=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidRequest(f);const{chainId:I,request:j,topic:q,expiry:re}=f,se=W_(),{done:fe,resolve:be,reject:_e}=Tp(re,"Request expired. Please try again.");return n.events.once(oo("session_request",se),({error:Oe,result:Te})=>{Oe?_e(Oe):be(Te)}),yield Promise.all([new Promise(function(){var Oe=(0,Le.Z)(function*(Te){yield n.sendRequest({clientRpcId:se,topic:q,method:"wc_sessionRequest",params:{request:j,chainId:I},expiry:re,throwOnFailedPublish:!0}).catch(Be=>_e(Be)),n.client.events.emit("session_request_sent",{topic:q,request:j,chainId:I,id:se}),Te()});return function(Te){return Oe.apply(this,arguments)}}()),new Promise(function(){var Oe=(0,Le.Z)(function*(Te){const Be=yield function JJ(t,e){return k_.apply(this,arguments)}(n.client.core.storage,IO);(function ZJ(t){return R_.apply(this,arguments)})({id:se,topic:q,wcDeepLink:Be}),Te()});return function(Te){return Oe.apply(this,arguments)}}()),fe()]).then(Oe=>Oe[2])});return function(f){return s.apply(this,arguments)}}(),this.respond=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidRespond(f);const{topic:I,response:j}=f,{id:q}=j;ml(j)?yield n.sendResult({id:q,topic:I,result:j.result,throwOnFailedPublish:!0}):Lu(j)&&(yield n.sendError(q,I,j.error)),n.cleanupAfterResponse(f)});return function(f){return s.apply(this,arguments)}}(),this.ping=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidPing(f);const{topic:I}=f;if(n.client.session.keys.includes(I)){const j=yield n.sendRequest({topic:I,method:"wc_sessionPing",params:{}}),{done:q,resolve:re,reject:se}=Tp();n.events.once(oo("session_ping",j),({error:fe})=>{fe?se(fe):re()}),yield q()}else n.client.core.pairing.pairings.keys.includes(I)&&(yield n.client.core.pairing.ping({topic:I}))});return function(f){return s.apply(this,arguments)}}(),this.emit=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidEmit(f);const{topic:I,event:j,chainId:q}=f;yield n.sendRequest({topic:I,method:"wc_sessionEvent",params:{event:j,chainId:q}})});return function(f){return s.apply(this,arguments)}}(),this.disconnect=function(){var s=(0,Le.Z)(function*(f){yield n.isInitialized(),yield n.isValidDisconnect(f);const{topic:I}=f;n.client.session.keys.includes(I)?(yield n.sendRequest({topic:I,method:"wc_sessionDelete",params:po("USER_DISCONNECTED"),throwOnFailedPublish:!0}),yield n.deleteSession(I)):yield n.client.core.pairing.disconnect({topic:I})});return function(f){return s.apply(this,arguments)}}(),this.find=s=>(this.isInitialized(),this.client.session.getAll().filter(f=>function vY(t,e){const{requiredNamespaces:n}=e,s=Object.keys(t.namespaces),f=Object.keys(n);let I=!0;return!!uh(f,s)&&(s.forEach(j=>{const{accounts:q,methods:re,events:se}=t.namespaces[j],fe=Op(q),be=n[j];uh(M_(j,be),fe)&&uh(be.methods,re)&&uh(be.events,se)||(I=!1)}),I)}(f,s))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=function(){var s=(0,Le.Z)(function*(f){if(f.pairingTopic)try{const I=n.client.core.pairing.pairings.get(f.pairingTopic),j=n.client.core.pairing.pairings.getAll().filter(q=>{var re,se;return(null==(re=q.peerMetadata)?void 0:re.url)&&(null==(se=q.peerMetadata)?void 0:se.url)===f.peer.metadata.url&&q.topic&&q.topic!==I.topic});if(0===j.length)return;n.client.logger.info(`Cleaning up ${j.length} duplicate pairing(s)`),yield Promise.all(j.map(q=>n.client.core.pairing.disconnect({topic:q.topic}))),n.client.logger.info("Duplicate pairings clean up finished")}catch(I){n.client.logger.error(I)}});return function(f){return s.apply(this,arguments)}}(),this.deleteSession=function(){var s=(0,Le.Z)(function*(f,I){const{self:j}=n.client.session.get(f);yield n.client.core.relayer.unsubscribe(f),n.client.session.delete(f,po("USER_DISCONNECTED")),n.client.core.crypto.keychain.has(j.publicKey)&&(yield n.client.core.crypto.deleteKeyPair(j.publicKey)),n.client.core.crypto.keychain.has(f)&&(yield n.client.core.crypto.deleteSymKey(f)),I||n.client.core.expirer.del(f),n.client.core.storage.removeItem(IO).catch(q=>n.client.logger.warn(q)),n.getPendingSessionRequests().forEach(q=>{q.topic===f&&n.deletePendingSessionRequest(q.id,po("USER_DISCONNECTED"))})});return function(f,I){return s.apply(this,arguments)}}(),this.deleteProposal=function(){var s=(0,Le.Z)(function*(f,I){yield Promise.all([n.client.proposal.delete(f,po("USER_DISCONNECTED")),I?Promise.resolve():n.client.core.expirer.del(f)])});return function(f,I){return s.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var s=(0,Le.Z)(function*(f,I,j=!1){yield Promise.all([n.client.pendingRequest.delete(f,I),j?Promise.resolve():n.client.core.expirer.del(f)]),n.sessionRequestQueue.queue=n.sessionRequestQueue.queue.filter(q=>q.id!==f),j&&(n.sessionRequestQueue.state=bl_idle)});return function(f,I){return s.apply(this,arguments)}}(),this.setExpiry=function(){var s=(0,Le.Z)(function*(f,I){n.client.session.keys.includes(f)&&(yield n.client.session.update(f,{expiry:I})),n.client.core.expirer.set(f,I)});return function(f,I){return s.apply(this,arguments)}}(),this.setProposal=function(){var s=(0,Le.Z)(function*(f,I){yield n.client.proposal.set(f,I),n.client.core.expirer.set(f,I.expiry)});return function(f,I){return s.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var s=(0,Le.Z)(function*(f){const I=Bm.wc_sessionRequest.req.ttl,{id:j,topic:q,params:re,verifyContext:se}=f;yield n.client.pendingRequest.set(j,{id:j,topic:q,params:re,verifyContext:se}),I&&n.client.core.expirer.set(j,ku(I))});return function(f){return s.apply(this,arguments)}}(),this.sendRequest=function(){var s=(0,Le.Z)(function*(f){const{topic:I,method:j,params:q,expiry:re,relayRpcId:se,clientRpcId:fe,throwOnFailedPublish:be}=f,_e=Pp(j,q,fe);if(Dp()&&Dee.includes(j)){const Be=Mp(JSON.stringify(_e));n.client.core.verify.register({attestationId:Be})}const Oe=yield n.client.core.crypto.encode(I,_e),Te=Bm[j].req;return re&&(Te.ttl=re),se&&(Te.id=se),n.client.core.history.set(I,_e),be?(Te.internal=jm(qs({},Te.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(I,Oe,Te)):n.client.core.relayer.publish(I,Oe,Te).catch(Be=>n.client.logger.error(Be)),_e.id});return function(f){return s.apply(this,arguments)}}(),this.sendResult=function(){var s=(0,Le.Z)(function*(f){const{id:I,topic:j,result:q,throwOnFailedPublish:re}=f,se=G_(I,q),fe=yield n.client.core.crypto.encode(j,se),be=yield n.client.core.history.get(j,I),_e=Bm[be.request.method].res;re?(_e.internal=jm(qs({},_e.internal),{throwOnFailedPublish:!0}),yield n.client.core.relayer.publish(j,fe,_e)):n.client.core.relayer.publish(j,fe,_e).catch(Oe=>n.client.logger.error(Oe)),yield n.client.core.history.resolve(se)});return function(f){return s.apply(this,arguments)}}(),this.sendError=function(){var s=(0,Le.Z)(function*(f,I,j){const q=Z_(f,j),re=yield n.client.core.crypto.encode(I,q),se=yield n.client.core.history.get(I,f),fe=Bm[se.request.method].res;n.client.core.relayer.publish(I,re,fe),yield n.client.core.history.resolve(q)});return function(f,I,j){return s.apply(this,arguments)}}(),this.cleanup=(0,Le.Z)(function*(){const s=[],f=[];n.client.session.getAll().forEach(I=>{xf(I.expiry)&&s.push(I.topic)}),n.client.proposal.getAll().forEach(I=>{xf(I.expiry)&&f.push(I.id)}),yield Promise.all([...s.map(I=>n.deleteSession(I)),...f.map(I=>n.deleteProposal(I))])}),this.onRelayEventRequest=function(){var s=(0,Le.Z)(function*(f){n.requestQueue.queue.push(f),yield n.processRequestsQueue()});return function(f){return s.apply(this,arguments)}}(),this.processRequestsQueue=(0,Le.Z)(function*(){if(n.requestQueue.state!==bl_active){for(n.client.logger.info(`Request queue starting with ${n.requestQueue.queue.length} requests`);n.requestQueue.queue.length>0;){n.requestQueue.state=bl_active;const s=n.requestQueue.queue.shift();if(s)try{n.processRequest(s),yield new Promise(f=>setTimeout(f,300))}catch(f){n.client.logger.warn(f)}}n.requestQueue.state=bl_idle}else n.client.logger.info("Request queue already active, skipping...")}),this.processRequest=s=>{const{topic:f,payload:I}=s,j=I.method;switch(j){case"wc_sessionPropose":return this.onSessionProposeRequest(f,I);case"wc_sessionSettle":return this.onSessionSettleRequest(f,I);case"wc_sessionUpdate":return this.onSessionUpdateRequest(f,I);case"wc_sessionExtend":return this.onSessionExtendRequest(f,I);case"wc_sessionPing":return this.onSessionPingRequest(f,I);case"wc_sessionDelete":return this.onSessionDeleteRequest(f,I);case"wc_sessionRequest":return this.onSessionRequest(f,I);case"wc_sessionEvent":return this.onSessionEventRequest(f,I);default:return this.client.logger.info(`Unsupported request method ${j}`)}},this.onRelayEventResponse=function(){var s=(0,Le.Z)(function*(f){const{topic:I,payload:j}=f,q=(yield n.client.core.history.get(I,j.id)).request.method;switch(q){case"wc_sessionPropose":return n.onSessionProposeResponse(I,j);case"wc_sessionSettle":return n.onSessionSettleResponse(I,j);case"wc_sessionUpdate":return n.onSessionUpdateResponse(I,j);case"wc_sessionExtend":return n.onSessionExtendResponse(I,j);case"wc_sessionPing":return n.onSessionPingResponse(I,j);case"wc_sessionRequest":return n.onSessionRequestResponse(I,j);default:return n.client.logger.info(`Unsupported response method ${q}`)}});return function(f){return s.apply(this,arguments)}}(),this.onRelayEventUnknownPayload=s=>{const{topic:f}=s,{message:I}=wn("MISSING_OR_INVALID",`Decoded payload on topic ${f} is not identifiable as a JSON-RPC request or a response.`);throw new Error(I)},this.onSessionProposeRequest=function(){var s=(0,Le.Z)(function*(f,I){const{params:j,id:q}=I;try{n.isValidConnect(qs({},I.params));const re=ku(zn.FIVE_MINUTES),se=qs({id:q,pairingTopic:f,expiry:re},j);yield n.setProposal(q,se);const fe=Mp(JSON.stringify(I)),be=yield n.getVerifyContext(fe,se.proposer.metadata);n.client.events.emit("session_proposal",{id:q,params:se,verifyContext:be})}catch(re){yield n.sendError(q,f,re),n.client.logger.error(re)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var s=(0,Le.Z)(function*(f,I){const{id:j}=I;if(ml(I)){const{result:q}=I;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:q});const re=n.client.proposal.get(j);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:re});const se=re.proposer.publicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:se});const fe=q.responderPublicKey;n.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:fe});const be=yield n.client.core.crypto.generateSharedKey(se,fe);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:be});const _e=yield n.client.core.relayer.subscribe(be);n.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:_e}),yield n.client.core.pairing.activate({topic:f})}else Lu(I)&&(yield n.client.proposal.delete(j,po("USER_DISCONNECTED")),n.events.emit(oo("session_connect"),{error:I.error}))});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j,params:q}=I;try{n.isValidSessionSettleRequest(q);const{relay:re,controller:se,expiry:fe,namespaces:be,requiredNamespaces:_e,optionalNamespaces:Oe,sessionProperties:Te,pairingTopic:Be}=I.params,Fe=qs({topic:f,relay:re,expiry:fe,namespaces:be,acknowledged:!0,pairingTopic:Be,requiredNamespaces:_e,optionalNamespaces:Oe,controller:se.publicKey,self:{publicKey:"",metadata:n.client.metadata},peer:{publicKey:se.publicKey,metadata:se.metadata}},Te&&{sessionProperties:Te});yield n.sendResult({id:I.id,topic:f,result:!0}),n.events.emit(oo("session_connect"),{session:Fe}),n.cleanupDuplicatePairings(Fe)}catch(re){yield n.sendError(j,f,re),n.client.logger.error(re)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var s=(0,Le.Z)(function*(f,I){const{id:j}=I;ml(I)?(yield n.client.session.update(f,{acknowledged:!0}),n.events.emit(oo("session_approve",j),{})):Lu(I)&&(yield n.client.session.delete(f,po("USER_DISCONNECTED")),n.events.emit(oo("session_approve",j),{error:I.error}))});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var s=(0,Le.Z)(function*(f,I){const{params:j,id:q}=I;try{const re=`${f}_session_update`,se=Zb.get(re);if(se&&n.isRequestOutOfSync(se,q))return void n.client.logger.info(`Discarding out of sync request - ${q}`);n.isValidUpdate(qs({topic:f},j)),yield n.client.session.update(f,{namespaces:j.namespaces}),yield n.sendResult({id:q,topic:f,result:!0}),n.client.events.emit("session_update",{id:q,topic:f,params:j}),Zb.set(re,q)}catch(re){yield n.sendError(q,f,re),n.client.logger.error(re)}});return function(f,I){return s.apply(this,arguments)}}(),this.isRequestOutOfSync=(s,f)=>parseInt(f.toString().slice(0,-3))<=parseInt(s.toString().slice(0,-3)),this.onSessionUpdateResponse=(s,f)=>{const{id:I}=f;ml(f)?this.events.emit(oo("session_update",I),{}):Lu(f)&&this.events.emit(oo("session_update",I),{error:f.error})},this.onSessionExtendRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j}=I;try{n.isValidExtend({topic:f}),yield n.setExpiry(f,ku(tw)),yield n.sendResult({id:j,topic:f,result:!0}),n.client.events.emit("session_extend",{id:j,topic:f})}catch(q){yield n.sendError(j,f,q),n.client.logger.error(q)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionExtendResponse=(s,f)=>{const{id:I}=f;ml(f)?this.events.emit(oo("session_extend",I),{}):Lu(f)&&this.events.emit(oo("session_extend",I),{error:f.error})},this.onSessionPingRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j}=I;try{n.isValidPing({topic:f}),yield n.sendResult({id:j,topic:f,result:!0}),n.client.events.emit("session_ping",{id:j,topic:f})}catch(q){yield n.sendError(j,f,q),n.client.logger.error(q)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionPingResponse=(s,f)=>{const{id:I}=f;setTimeout(()=>{ml(f)?this.events.emit(oo("session_ping",I),{}):Lu(f)&&this.events.emit(oo("session_ping",I),{error:f.error})},500)},this.onSessionDeleteRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j}=I;try{n.isValidDisconnect({topic:f,reason:I.params}),yield Promise.all([new Promise(q=>{n.client.core.relayer.once(ss_publish,(0,Le.Z)(function*(){q(yield n.deleteSession(f))}))}),n.sendResult({id:j,topic:f,result:!0})]),n.client.events.emit("session_delete",{id:j,topic:f})}catch(q){n.client.logger.error(q)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j,params:q}=I;try{n.isValidRequest(qs({topic:f},q));const re=Mp(JSON.stringify(Pp("wc_sessionRequest",q,j))),se=n.client.session.get(f),be={id:j,topic:f,params:q,verifyContext:yield n.getVerifyContext(re,se.peer.metadata)};yield n.setPendingSessionRequest(be),n.addSessionRequestToSessionRequestQueue(be),n.processSessionRequestQueue()}catch(re){yield n.sendError(j,f,re),n.client.logger.error(re)}});return function(f,I){return s.apply(this,arguments)}}(),this.onSessionRequestResponse=(s,f)=>{const{id:I}=f;ml(f)?this.events.emit(oo("session_request",I),{result:f.result}):Lu(f)&&this.events.emit(oo("session_request",I),{error:f.error})},this.onSessionEventRequest=function(){var s=(0,Le.Z)(function*(f,I){const{id:j,params:q}=I;try{const re=`${f}_session_event_${q.event.name}`,se=Zb.get(re);if(se&&n.isRequestOutOfSync(se,j))return void n.client.logger.info(`Discarding out of sync request - ${j}`);n.isValidEmit(qs({topic:f},q)),n.client.events.emit("session_event",{id:j,topic:f,params:q}),Zb.set(re,j)}catch(re){yield n.sendError(j,f,re),n.client.logger.error(re)}});return function(f,I){return s.apply(this,arguments)}}(),this.addSessionRequestToSessionRequestQueue=s=>{this.sessionRequestQueue.queue.push(s)},this.cleanupAfterResponse=s=>{this.deletePendingSessionRequest(s.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=bl_idle,this.processSessionRequestQueue()},(0,zn.toMiliseconds)(this.requestQueueDelay))},this.processSessionRequestQueue=()=>{if(this.sessionRequestQueue.state===bl_active)return void this.client.logger.info("session request queue is already active.");const s=this.sessionRequestQueue.queue[0];if(s)try{this.sessionRequestQueue.state=bl_active,this.client.events.emit("session_request",s)}catch(f){this.client.logger.error(f)}else this.client.logger.info("session request queue is empty.")},this.onPairingCreated=s=>{if(s.active)return;const f=this.client.proposal.getAll().find(I=>I.pairingTopic===s.topic);f&&this.onSessionProposeRequest(s.topic,Pp("wc_sessionPropose",{requiredNamespaces:f.requiredNamespaces,optionalNamespaces:f.optionalNamespaces,relays:f.relays,proposer:f.proposer,sessionProperties:f.sessionProperties},f.id))},this.isValidConnect=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:fe}=wn("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(f)}`);throw new Error(fe)}const{pairingTopic:I,requiredNamespaces:j,optionalNamespaces:q,sessionProperties:re,relays:se}=f;if(xs(I)||(yield n.isValidPairingTopic(I)),!function OY(t,e){let n=!1;return e&&!t?n=!0:t&&Tm(t)&&t.length&&t.forEach(s=>{n=dT(s)}),n}(se,!0)){const{message:fe}=wn("MISSING_OR_INVALID",`connect() relays: ${se}`);throw new Error(fe)}!xs(j)&&0!==xp(j)&&n.validateNamespaces(j,"requiredNamespaces"),!xs(q)&&0!==xp(q)&&n.validateNamespaces(q,"optionalNamespaces"),xs(re)||n.validateSessionProps(re,"sessionProperties")});return function(f){return s.apply(this,arguments)}}(),this.validateNamespaces=(s,f)=>{const I=function TY(t,e,n){let s=null;if(t&&xp(t)){const f=fT(t,e);f&&(s=f);const I=MY(t,e,n);I&&(s=I)}else s=wn("MISSING_OR_INVALID",`${e}, ${n} should be an object with data`);return s}(s,"connect()",f);if(I)throw new Error(I.message)},this.isValidApprove=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f))throw new Error(wn("MISSING_OR_INVALID",`approve() params: ${f}`).message);const{id:I,namespaces:j,relayProtocol:q,sessionProperties:re}=f;yield n.isValidProposalId(I);const se=n.client.proposal.get(I),fe=Gb(j,"approve()");if(fe)throw new Error(fe.message);const be=j_(se.requiredNamespaces,j,"approve()");if(be)throw new Error(be.message);if(!Io(q,!0)){const{message:_e}=wn("MISSING_OR_INVALID",`approve() relayProtocol: ${q}`);throw new Error(_e)}xs(re)||n.validateSessionProps(re,"sessionProperties")});return function(f){return s.apply(this,arguments)}}(),this.isValidReject=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:q}=wn("MISSING_OR_INVALID",`reject() params: ${f}`);throw new Error(q)}const{id:I,reason:j}=f;if(yield n.isValidProposalId(I),!function PY(t){return!!(t&&"object"==typeof t&&t.code&&B_(t.code,!1)&&t.message&&Io(t.message,!1))}(j)){const{message:q}=wn("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(j)}`);throw new Error(q)}});return function(f){return s.apply(this,arguments)}}(),this.isValidSessionSettleRequest=s=>{if(!Xs(s)){const{message:fe}=wn("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${s}`);throw new Error(fe)}const{relay:f,controller:I,namespaces:j,expiry:q}=s;if(!dT(f)){const{message:fe}=wn("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(fe)}const re=function _Y(t,e){let n=null;return Io(t?.publicKey,!1)||(n=wn("MISSING_OR_INVALID",`${e} controller public key should be a string`)),n}(I,"onSessionSettleRequest()");if(re)throw new Error(re.message);const se=Gb(j,"onSessionSettleRequest()");if(se)throw new Error(se.message);if(xf(q)){const{message:fe}=wn("EXPIRED","onSessionSettleRequest()");throw new Error(fe)}},this.isValidUpdate=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:fe}=wn("MISSING_OR_INVALID",`update() params: ${f}`);throw new Error(fe)}const{topic:I,namespaces:j}=f;yield n.isValidSessionTopic(I);const q=n.client.session.get(I),re=Gb(j,"update()");if(re)throw new Error(re.message);const se=j_(q.requiredNamespaces,j,"update()");if(se)throw new Error(se.message)});return function(f){return s.apply(this,arguments)}}(),this.isValidExtend=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:j}=wn("MISSING_OR_INVALID",`extend() params: ${f}`);throw new Error(j)}const{topic:I}=f;yield n.isValidSessionTopic(I)});return function(f){return s.apply(this,arguments)}}(),this.isValidRequest=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:fe}=wn("MISSING_OR_INVALID",`request() params: ${f}`);throw new Error(fe)}const{topic:I,request:j,chainId:q,expiry:re}=f;yield n.isValidSessionTopic(I);const{namespaces:se}=n.client.session.get(I);if(!hT(se,q)){const{message:fe}=wn("MISSING_OR_INVALID",`request() chainId: ${q}`);throw new Error(fe)}if(!function NY(t){return!(xs(t)||!Io(t.method,!1))}(j)){const{message:fe}=wn("MISSING_OR_INVALID",`request() ${JSON.stringify(j)}`);throw new Error(fe)}if(!LY(se,q,j.method)){const{message:fe}=wn("MISSING_OR_INVALID",`request() method: ${j.method}`);throw new Error(fe)}if(re&&!function UY(t,e){return B_(t,!1)&&t<=e.max&&t>=e.min}(re,o3)){const{message:fe}=wn("MISSING_OR_INVALID",`request() expiry: ${re}. Expiry must be a number (in seconds) between ${o3.min} and ${o3.max}`);throw new Error(fe)}});return function(f){return s.apply(this,arguments)}}(),this.isValidRespond=function(){var s=(0,Le.Z)(function*(f){var I;if(!Xs(f)){const{message:re}=wn("MISSING_OR_INVALID",`respond() params: ${f}`);throw new Error(re)}const{topic:j,response:q}=f;try{yield n.isValidSessionTopic(j)}catch(re){throw null!=(I=f?.response)&&I.id&&n.cleanupAfterResponse(f),re}if(!function RY(t){return!(xs(t)||xs(t.result)&&xs(t.error)||!B_(t.id,!1)||!Io(t.jsonrpc,!1))}(q)){const{message:re}=wn("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(q)}`);throw new Error(re)}});return function(f){return s.apply(this,arguments)}}(),this.isValidPing=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:j}=wn("MISSING_OR_INVALID",`ping() params: ${f}`);throw new Error(j)}const{topic:I}=f;yield n.isValidSessionOrPairingTopic(I)});return function(f){return s.apply(this,arguments)}}(),this.isValidEmit=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:se}=wn("MISSING_OR_INVALID",`emit() params: ${f}`);throw new Error(se)}const{topic:I,event:j,chainId:q}=f;yield n.isValidSessionTopic(I);const{namespaces:re}=n.client.session.get(I);if(!hT(re,q)){const{message:se}=wn("MISSING_OR_INVALID",`emit() chainId: ${q}`);throw new Error(se)}if(!function kY(t){return!(xs(t)||!Io(t.name,!1))}(j)){const{message:se}=wn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(j)}`);throw new Error(se)}if(!BY(re,q,j.name)){const{message:se}=wn("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(j)}`);throw new Error(se)}});return function(f){return s.apply(this,arguments)}}(),this.isValidDisconnect=function(){var s=(0,Le.Z)(function*(f){if(!Xs(f)){const{message:j}=wn("MISSING_OR_INVALID",`disconnect() params: ${f}`);throw new Error(j)}const{topic:I}=f;yield n.isValidSessionOrPairingTopic(I)});return function(f){return s.apply(this,arguments)}}(),this.getVerifyContext=function(){var s=(0,Le.Z)(function*(f,I){const j={verified:{verifyUrl:I.verifyUrl||Np,validation:"UNKNOWN",origin:I.url||""}};try{const q=yield n.client.core.verify.resolve({attestationId:f,verifyUrl:I.verifyUrl});q&&(j.verified.origin=q.origin,j.verified.isScam=q.isScam,j.verified.validation=q.origin===new URL(I.url).origin?"VALID":"INVALID")}catch(q){n.client.logger.info(q)}return n.client.logger.info(`Verify context: ${JSON.stringify(j)}`),j});return function(f,I){return s.apply(this,arguments)}}(),this.validateSessionProps=(s,f)=>{Object.values(s).forEach(I=>{if(!Io(I,!1)){const{message:j}=wn("MISSING_OR_INVALID",`${f} must be in Record format. Received: ${JSON.stringify(I)}`);throw new Error(j)}})}}isInitialized(){var e=this;return(0,Le.Z)(function*(){if(!e.initialized){const{message:n}=wn("NOT_INITIALIZED",e.name);throw new Error(n)}yield e.client.core.relayer.confirmOnlineStateOrThrow()})()}registerRelayerEvents(){var e=this;this.client.core.relayer.on(ss_message,function(){var n=(0,Le.Z)(function*(s){const{topic:f,message:I}=s;if(e.ignoredPayloadTypes.includes(e.client.core.crypto.getPayloadType(I)))return;const j=yield e.client.core.crypto.decode(f,I);try{J_(j)?(e.client.core.history.set(f,j),e.onRelayEventRequest({topic:f,payload:j})):Xb(j)?(yield e.client.core.history.resolve(j),yield e.onRelayEventResponse({topic:f,payload:j}),e.client.core.history.delete(f,j.id)):e.onRelayEventUnknownPayload({topic:f,payload:j})}catch(q){e.client.logger.error(q)}});return function(s){return n.apply(this,arguments)}}())}registerExpirerEvents(){var e=this;this.client.core.expirer.on(qa_expired,function(){var n=(0,Le.Z)(function*(s){const{topic:f,id:I}=nT(s.target);if(I&&e.client.pendingRequest.keys.includes(I))return yield e.deletePendingSessionRequest(I,wn("EXPIRED"),!0);f?e.client.session.keys.includes(f)&&(yield e.deleteSession(f,!0),e.client.events.emit("session_expire",{topic:f})):I&&(yield e.deleteProposal(I,!0),e.client.events.emit("proposal_expire",{id:I}))});return function(s){return n.apply(this,arguments)}}())}registerPairingEvents(){this.client.core.pairing.events.on(km_create,e=>this.onPairingCreated(e))}isValidPairingTopic(e){if(!Io(e,!1)){const{message:n}=wn("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw new Error(n)}if(!this.client.core.pairing.pairings.keys.includes(e)){const{message:n}=wn("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw new Error(n)}if(xf(this.client.core.pairing.pairings.get(e).expiry)){const{message:n}=wn("EXPIRED",`pairing topic: ${e}`);throw new Error(n)}}isValidSessionTopic(e){var n=this;return(0,Le.Z)(function*(){if(!Io(e,!1)){const{message:s}=wn("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw new Error(s)}if(!n.client.session.keys.includes(e)){const{message:s}=wn("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw new Error(s)}if(xf(n.client.session.get(e).expiry)){yield n.deleteSession(e);const{message:s}=wn("EXPIRED",`session topic: ${e}`);throw new Error(s)}})()}isValidSessionOrPairingTopic(e){var n=this;return(0,Le.Z)(function*(){if(n.client.session.keys.includes(e))yield n.isValidSessionTopic(e);else{if(!n.client.core.pairing.pairings.keys.includes(e)){if(Io(e,!1)){const{message:s}=wn("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw new Error(s)}{const{message:s}=wn("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw new Error(s)}}n.isValidPairingTopic(e)}})()}isValidProposalId(e){var n=this;return(0,Le.Z)(function*(){if(!function xY(t){return"number"==typeof t}(e)){const{message:s}=wn("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw new Error(s)}if(!n.client.proposal.keys.includes(e)){const{message:s}=wn("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw new Error(s)}if(xf(n.client.proposal.get(e).expiry)){yield n.deleteProposal(e);const{message:s}=wn("EXPIRED",`proposal id: ${e}`);throw new Error(s)}})()}}class Ree extends ew{constructor(e,n){super(e,n,"proposal",r3),this.core=e,this.logger=n}}class kee extends ew{constructor(e,n){super(e,n,"session",r3),this.core=e,this.logger=n}}class Lee extends ew{constructor(e,n){super(e,n,"request",r3,s=>s.id),this.core=e,this.logger=n}}class s3 extends TH{constructor(e){var n;super(e),n=this,this.protocol="wc",this.version=2,this.name=i3_name,this.events=new Du.EventEmitter,this.on=(f,I)=>this.events.on(f,I),this.once=(f,I)=>this.events.once(f,I),this.off=(f,I)=>this.events.off(f,I),this.removeListener=(f,I)=>this.events.removeListener(f,I),this.removeAllListeners=f=>this.events.removeAllListeners(f),this.connect=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.connect(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.pair=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.pair(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.approve=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.approve(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.reject=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.reject(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.update=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.update(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.extend=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.extend(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.request=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.request(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.respond=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.respond(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.ping=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.ping(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.emit=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.emit(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.disconnect=function(){var f=(0,Le.Z)(function*(I){try{return yield n.engine.disconnect(I)}catch(j){throw n.logger.error(j.message),j}});return function(I){return f.apply(this,arguments)}}(),this.find=f=>{try{return this.engine.find(f)}catch(I){throw this.logger.error(I.message),I}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(f){throw this.logger.error(f.message),f}},this.name=e?.name||i3_name,this.metadata=e?.metadata||function BJ(){return(0,lJ.D)()||{name:"",description:"",url:"",icons:[""]}}();const s=typeof e?.logger<"u"&&"string"!=typeof e?.logger?e.logger:(0,Kr.pino)((0,Kr.getDefaultLoggerOptions)({level:e?.logger||i3_logger}));this.core=e?.core||new Eee(e),this.logger=(0,Kr.generateChildLogger)(s,this.name),this.session=new kee(this.core,this.logger),this.proposal=new Ree(this.core,this.logger),this.pendingRequest=new Lee(this.core,this.logger),this.engine=new Nee(this)}static init(e){return(0,Le.Z)(function*(){const n=new s3(e);return yield n.initialize(),n})()}get context(){return(0,Kr.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var e=this;return(0,Le.Z)(function*(){e.logger.trace("Initialized");try{yield e.core.start(),yield e.session.init(),yield e.proposal.init(),yield e.pendingRequest.init(),yield e.engine.init(),e.core.verify.init({verifyUrl:e.metadata.verifyUrl}),e.logger.info("SignClient Initialization Success")}catch(n){throw e.logger.info("SignClient Initialization Failure"),e.logger.error(n.message),n}})()}}let TO;d.e(283).then(d.bind(d,41283)).then(t=>{TO=t.WalletConnectModal});const jee=class Bee{init(e){var n=this;return(0,Le.Z)(function*(){n.client=yield s3.init(e)})()}constructor(e){this.emitter=e}get session(){return this.client.session}on(e,n){return this.client.on(e,n),{remove:()=>this.client.removeListener(e,n)}}once(e,n){this.client.once(e,n)}connect(e,n,s,f){var I=this;return(0,Le.Z)(function*(){return I.modal||(I.modal=new TO({projectId:s,chains:[f],explorerExcludedWalletIds:"ALL"})),new Promise((j,q)=>{I.client.connect(e).then(({uri:re,approval:se})=>{re&&(n?(I.modal.openModal({uri:re,standaloneChains:[f]}),I.modal.subscribeModal(({open:fe})=>{fe||q(new Error("User cancelled pairing"))})):I.emitter.emit("uriChanged",{uri:re})),se().then(j).catch(q).finally(()=>I.modal.closeModal())}).catch(q)})})()}request(e){var n=this;return(0,Le.Z)(function*(){return n.client.request(e)})()}disconnect(e){var n=this;return(0,Le.Z)(function*(){return n.client.disconnect(e)})()}},Fee="data:image/png;base64,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",Uee=["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions","near_verifyOwner","near_signMessage"],Kee=["chainChanged","accountsChanged"],zee=function(){var t=(0,Le.Z)(function*(e,n,s){const f=new jee(s);let I=null;const j=new lr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,`near-wallet-selector:${e}:keystore:`);if(yield f.init({projectId:n.projectId,metadata:n.metadata,relayUrl:n.relayUrl}),f.session.length){const q=f.session.keys.length-1;I=f.session.get(f.session.keys[q])}return{client:f,session:I,keystore:j,subscriptions:[]}});return function(n,s,f){return t.apply(this,arguments)}}(),OO=function(){var t=(0,Le.Z)(function*({state:e,chainId:n,qrCodeModal:s,projectId:f,methods:I,events:j}){return yield e.client.connect({requiredNamespaces:{near:{chains:[n],methods:I||Uee,events:j||Kee}}},s,f,n)});return function(n){return t.apply(this,arguments)}}(),a3=function(){var t=(0,Le.Z)(function*({state:e}){yield e.client.disconnect({topic:e.session.topic,reason:{code:5900,message:"User disconnected"}})});return function(n){return t.apply(this,arguments)}}(),Vee=function(){var t=(0,Le.Z)(function*({id:e,options:n,store:s,params:f,provider:I,emitter:j,logger:q}){const re=yield zee(e,f,j),se=()=>{if(f.chainId)return f.chainId;const{networkId:en}=n.network;if(["mainnet","testnet"].includes(en))return`near:${en}`;throw new Error("Invalid chain id")},fe=function(){var en=(0,Le.Z)(function*(){const rn=re.session?.namespaces.near.accounts||[],Mn=[];for(let br=0;brrn.remove()),re.subscriptions=[],re.session=null});return function(){return en.apply(this,arguments)}}(),_e=(en,rn)=>{if("FullAccess"===rn.permission)return rn;const{receiver_id:Mn,method_names:br}=rn.permission.FunctionCall;return en.receiverId!==Mn?null:en.actions.every(mr=>{if("FunctionCall"!==mr.type)return!1;const{methodName:ar,deposit:Ar}=mr.params;return(!br.length||!br.includes(ar))&&parseFloat(Ar)<=0})},Oe=function(){var en=(0,Le.Z)(function*(rn){const Mn=new lr.InMemorySigner(re.keystore),br=[],mr=yield I.block({finality:"final"});for(let ar=0;ar(0,ts.createAction)(tu)),lr.utils.serialize.base_decode(mr.header.hash)),[,vc]=yield lr.transactions.signTransaction(mc,Mn,rn[ar].signerId,n.network.networkId);br.push(vc)}return br});return function(Mn){return en.apply(this,arguments)}}(),Te=function(){var en=(0,Le.Z)(function*(){return re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_getAccounts",params:{}}})});return function(){return en.apply(this,arguments)}}(),Be=function(){var en=(0,Le.Z)(function*(rn,Mn){return re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_verifyOwner",params:{accountId:rn,message:Mn}}})});return function(Mn,br){return en.apply(this,arguments)}}(),Fe=function(){var en=(0,Le.Z)(function*(rn){const{message:Mn,nonce:br,recipient:mr,callbackUrl:ar,accountId:Ar}=rn;return re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_signMessage",params:{message:Mn,nonce:br,recipient:mr,...ar&&{callbackUrl:ar},...Ar&&{accountId:Ar}}}})});return function(Mn){return en.apply(this,arguments)}}(),Ke=function(){var en=(0,Le.Z)(function*(rn){const br=(yield Te()).find(Ko=>Ko.accountId===rn.signerId);if(!br)throw new Error("Invalid signer id");const[mr,ar]=yield Promise.all([I.block({finality:"final"}),I.query({request_type:"view_access_key",finality:"final",account_id:rn.signerId,public_key:br.publicKey})]),Ar=lr.transactions.createTransaction(rn.signerId,lr.utils.PublicKey.from(br.publicKey),rn.receiverId,ar.nonce+1,rn.actions.map(Ko=>(0,ts.createAction)(Ko)),lr.utils.serialize.base_decode(mr.header.hash)),Qi=yield re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_signTransaction",params:{transaction:Ar.encode()}}});return lr.transactions.SignedTransaction.decode(Buffer.from(Qi))});return function(Mn){return en.apply(this,arguments)}}(),et=function(){var en=(0,Le.Z)(function*(rn){if(!rn.length)return[];const Mn=[],[br,mr]=yield Promise.all([I.block({finality:"final"}),Te()]);for(let Ar=0;Arvc.accountId===Qi.signerId);if(!Ko)throw new Error("Invalid signer id");const mc=yield I.query({request_type:"view_access_key",finality:"final",account_id:Qi.signerId,public_key:Ko.publicKey});Mn.push(lr.transactions.createTransaction(Qi.signerId,lr.utils.PublicKey.from(Ko.publicKey),Qi.receiverId,mc.nonce+Ar+1,Qi.actions.map(vc=>(0,ts.createAction)(vc)),lr.utils.serialize.base_decode(br.header.hash)))}return(yield re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_signTransactions",params:{transactions:Mn.map(Ar=>Ar.encode())}}})).map(Ar=>lr.transactions.SignedTransaction.decode(Buffer.from(Ar)))});return function(Mn){return en.apply(this,arguments)}}(),Ye=function(){var en=(0,Le.Z)(function*(){return(yield fe()).map(({accountId:Mn})=>({accountId:Mn,keyPair:lr.utils.KeyPair.fromRandom("ed25519")}))});return function(){return en.apply(this,arguments)}}(),ut=function(){var en=(0,Le.Z)(function*(rn){const Mn=yield Ye(),br=Mn.map(({accountId:mr,keyPair:ar})=>({accountId:mr,publicKey:ar.getPublicKey().toString()}));yield re.client.request({topic:re.session.topic,chainId:se(),request:{method:"near_signIn",params:{permission:rn,accounts:br}}});for(let mr=0;mr(0,Le.Z)(function*(){try{const{contract:br}=s.getState();re.session&&!br&&(yield a3({state:re}),yield be());const mr=se();return re.session=yield OO({state:re,chainId:mr,qrCodeModal:Mn,projectId:f.projectId,methods:f.methods,events:f.events}),yield ut({receiverId:en,methodNames:rn}),yield vn(),yield fe()}catch(br){throw yield Vt(),br}})(),signOut:Vt,getAccounts:()=>(0,Le.Z)(function*(){return fe()})(),verifyOwner:({message:en})=>(0,Le.Z)(function*(){q.log("WalletConnect:verifyOwner",{message:en});const{contract:rn}=s.getState();if(!re.session||!rn)throw new Error("Wallet not signed in");const Mn=Mf(s.getState());if(!Mn)throw new Error("No active account");return Be(Mn.accountId,en)})(),signMessage:({message:en,nonce:rn,recipient:Mn,callbackUrl:br})=>(0,Le.Z)(function*(){q.log("WalletConnect:signMessage",{message:en,nonce:rn,recipient:Mn});try{const mr=se();re.session||(re.session=re.session=yield OO({state:re,chainId:mr,qrCodeModal:!0,projectId:f.projectId}));const ar=Mf(s.getState());return yield Fe({message:en,nonce:rn,recipient:Mn,callbackUrl:br,accountId:ar?.accountId})}catch(mr){throw yield a3({state:re}),yield be(),mr}})(),signAndSendTransaction:({signerId:en,receiverId:rn,actions:Mn})=>(0,Le.Z)(function*(){q.log("signAndSendTransaction",{signerId:en,receiverId:rn,actions:Mn});const{contract:br}=s.getState();if(!re.session||!br)throw new Error("Wallet not signed in");const mr=Mf(s.getState());if(!mr)throw new Error("No active account");const ar={signerId:en||mr.accountId,receiverId:rn||br.contractId,actions:Mn};try{const[Ar]=yield Oe([ar]);return I.sendTransaction(Ar)}catch(Ar){q.log("Falling back to WalletConnect to sign transaction",Ar);const Qi=yield Ke(ar);return I.sendTransaction(Qi)}})(),signAndSendTransactions:({transactions:en})=>(0,Le.Z)(function*(){q.log("signAndSendTransactions",{transactions:en});const{contract:rn}=s.getState();if(!re.session||!rn)throw new Error("Wallet not signed in");const Mn=Mf(s.getState());if(!Mn)throw new Error("No active account");const br=en.map(mr=>({signerId:mr.signerId||Mn.accountId,receiverId:mr.receiverId,actions:mr.actions}));try{const mr=yield Oe(br),ar=[];for(let Ar=0;ArVee({...re,params:{projectId:t,metadata:e,relayUrl:s,chainId:n,methods:j,events:q}})}})}const Hee="data:image/png;base64,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",PO=(t,e)=>{if(e)return e;switch(t.networkId){case"mainnet":return"https://app.mynearwallet.com";case"testnet":return"https://testnet.mynearwallet.com";default:throw new Error("Invalid wallet url")}},Wee=function(){var t=(0,Le.Z)(function*(e,n){const s=new lr.keyStores.BrowserLocalStorageKeyStore,f=yield lr.connect({keyStore:s,walletUrl:e.walletUrl,...n,headers:{}});return{wallet:new lr.WalletConnection(f,"near_app"),keyStore:s}});return function(n,s){return t.apply(this,arguments)}}(),Gee=function(){var t=(0,Le.Z)(function*({metadata:e,options:n,store:s,params:f,logger:I,id:j}){const q=yield Wee(f,n.network),re=function(){var fe=(0,Le.Z)(function*(){const be=q.wallet.getAccountId(),_e=q.wallet.account();if(!be||!_e)return[];const Oe=yield _e.connection.signer.getPublicKey(_e.accountId,n.network.networkId);return[{accountId:be,publicKey:Oe?Oe.toString():""}]});return function(){return fe.apply(this,arguments)}}(),se=function(){var fe=(0,Le.Z)(function*(be){const _e=q.wallet.account(),{networkId:Oe,signer:Te,provider:Be}=_e.connection,Fe=yield Te.getPublicKey(_e.accountId,Oe);return Promise.all(be.map(function(){var Ke=(0,Le.Z)(function*(et,Ye){const ut=et.actions.map(vn=>(0,ts.createAction)(vn)),Tt=yield _e.accessKeyForTransaction(et.receiverId,ut,Fe);if(!Tt)throw new Error(`Failed to find matching key for transaction sent to ${et.receiverId}`);const Vt=yield Be.block({finality:"final"});return lr.transactions.createTransaction(_e.accountId,lr.utils.PublicKey.from(Tt.public_key),et.receiverId,Tt.access_key.nonce+Ye+1,ut,lr.utils.serialize.base_decode(Vt.header.hash))});return function(et,Ye){return Ke.apply(this,arguments)}}()))});return function(_e){return fe.apply(this,arguments)}}();return{signIn:({contractId:fe,methodNames:be,successUrl:_e,failureUrl:Oe})=>(0,Le.Z)(function*(){const Te=yield re();return Te.length?Te:(yield q.wallet.requestSignIn({contractId:fe,methodNames:be,successUrl:_e,failureUrl:Oe}),re())})(),signOut:()=>(0,Le.Z)(function*(){q.wallet.isSignedIn()&&q.wallet.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return re()})(),verifyOwner:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:({message:fe,nonce:be,recipient:_e,callbackUrl:Oe,state:Te})=>(0,Le.Z)(function*(){if(I.log("sign message",{message:fe}),"my-near-wallet"!==j)throw Error(`The signMessage method is not supported by ${e.name}`);const Be=typeof window<"u"?window.location.href:"",Fe=Oe||Be;if(!Fe)throw new Error(`The callbackUrl is missing for ${e.name}`);const Ke=new URL(f.walletUrl);Ke.pathname="sign-message",Ke.searchParams.append("message",fe),Ke.searchParams.append("nonce",be.toString("base64")),Ke.searchParams.append("recipient",_e),Ke.searchParams.append("callbackUrl",Fe),Te&&Ke.searchParams.append("state",Te),window.location.replace(Ke.toString())})(),signAndSendTransaction:({signerId:fe,receiverId:be,actions:_e,callbackUrl:Oe})=>(0,Le.Z)(function*(){I.log("signAndSendTransaction",{signerId:fe,receiverId:be,actions:_e,callbackUrl:Oe});const{contract:Te}=s.getState();if(!q.wallet.isSignedIn()||!Te)throw new Error("Wallet not signed in");return q.wallet.account().signAndSendTransaction({receiverId:be||Te.contractId,actions:_e.map(Fe=>(0,ts.createAction)(Fe)),walletCallbackUrl:Oe})})(),signAndSendTransactions:({transactions:fe,callbackUrl:be})=>(0,Le.Z)(function*(){if(I.log("signAndSendTransactions",{transactions:fe,callbackUrl:be}),!q.wallet.isSignedIn())throw new Error("Wallet not signed in");return q.wallet.requestSignTransactions({transactions:yield se(fe),callbackUrl:be})})(),buildImportAccountsUrl:()=>`${f.walletUrl}/batch-import`}});return function(n){return t.apply(this,arguments)}}();function NO({walletUrl:t,iconUrl:e=Hee,deprecated:n=!1,successUrl:s="",failureUrl:f=""}={}){return function(){var I=(0,Le.Z)(function*(j){return{id:"my-near-wallet",type:"browser",metadata:{name:"MyNearWallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:e,deprecated:n,available:!0,successUrl:s,failureUrl:f,walletUrl:PO(j.options.network,t)},init:q=>Gee({...q,params:{walletUrl:PO(q.options.network,t)}})}});return function(j){return I.apply(this,arguments)}}()}const Zee="data:image/png;base64,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";var RO,kO,LO;function Jee(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})}const Fm=null!=(RO={}.NEXT_PUBLIC_RAMPER_ENV)?RO:globalThis.RAMPER_ENV,mi_LOCAL="local",mi_PREVIEW="preview",mi_DEV="dev",mi_STAGING="staging",mi_PROD="prod",Um=(kO={}.NEXT_PUBLIC_VERCEL_URL,LO={}.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF,()=>void 0===globalThis.window),ju=()=>!Um()&&window.location.hostname.includes("dev.ramper.xyz")?mi_DEV:!Um()&&window.location.hostname.includes("preview.ramper.xyz")?mi_PREVIEW:!Um()&&window.location.hostname.includes("staging.ramper.xyz")?mi_STAGING:Fm===mi_PROD?mi_PROD:Fm===mi_STAGING?mi_STAGING:Fm===mi_DEV?mi_DEV:Fm===mi_PREVIEW?mi_PREVIEW:Fm===mi_LOCAL?mi_LOCAL:mi_PROD;var BO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ete(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),e}var u3={exports:{}};(function(t,e){!function(n,s){var q="function",re="undefined",se="object",fe="string",_e="model",Oe="name",Te="type",Be="vendor",Fe="version",Ke="architecture",et="console",Ye="mobile",ut="tablet",Tt="smarttv",Vt="wearable",vn="embedded",rn="Amazon",Mn="Apple",mr="BlackBerry",ar="Browser",Ar="Chrome",Ko="Firefox",mc="Google",Fu="Microsoft",Ns="Motorola",Sl="Opera",$m="Samsung",Ml="Sony",Kp="Zebra",pw="Facebook",zp=function(Nr){for(var Xr={},Rr=0;Rr0?2===vi.length?typeof vi[1]==q?this[vi[0]]=vi[1].call(this,bc):this[vi[0]]=vi[1]:3===vi.length?typeof vi[1]!==q||vi[1].exec&&vi[1].test?this[vi[0]]=bc?bc.replace(vi[1],vi[2]):s:this[vi[0]]=bc?vi[1].call(this,bc,vi[2]):s:4===vi.length&&(this[vi[0]]=bc?vi[3].call(this,bc.replace(vi[1],vi[2])):s):this[vi]=bc||s;Rr+=2}},A3=function(Nr,Xr){for(var Rr in Xr)if(typeof Xr[Rr]===se&&Xr[Rr].length>0){for(var Xi=0;Xi255?E3(Br,255):Br,this},this.setUA(Rr),this};Ku.VERSION="1.0.2",Ku.BROWSER=zp([Oe,Fe,"major"]),Ku.CPU=zp([Ke]),Ku.DEVICE=zp([_e,Be,Te,et,Ye,Tt,ut,Vt,vn]),Ku.ENGINE=Ku.OS=zp([Oe,Fe]),t.exports&&(e=t.exports=Ku),e.UAParser=Ku;var Vp=typeof n!==re&&(n.jQuery||n.Zepto);if(Vp&&!Vp.ua){var gw=new Ku;Vp.ua=gw.getResult(),Vp.ua.get=function(){return gw.getUA()},Vp.ua.set=function(Nr){gw.setUA(Nr);var Xr=gw.getResult();for(var Rr in Xr)Vp.ua[Rr]=Xr[Rr]}}}("object"==typeof window?window:BO)})(u3,u3.exports),(new u3.exports.UAParser).getBrowser;!function(t,e){var f;f=function(){var n=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014c":"O","\u014d":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u018f":"E","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u0259":"e","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E\'","\u0538":"Y\'","\u0539":"T\'","\u053a":"JH","\u053b":"I","\u053c":"L","\u053d":"X","\u053e":"C\'","\u053f":"K","\u0540":"H","\u0541":"D\'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054a":"P","\u054b":"J","\u054c":"R\'","\u054d":"S","\u054e":"V","\u054f":"T","\u0550":"R","\u0551":"C","\u0553":"P\'","\u0554":"Q\'","\u0555":"O\'\'","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062a":"t","\u062b":"th","\u062c":"j","\u062d":"h","\u062e":"kh","\u062f":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063a":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064a":"y","\u064b":"an","\u064c":"on","\u064d":"en","\u064e":"a","\u064f":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067e":"p","\u0686":"ch","\u0698":"zh","\u06a9":"k","\u06af":"g","\u06cc":"y","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e62":"S","\u1e63":"s","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2013":"-","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u201e":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20ba":"turkish lira","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial","\ufef5":"laa","\ufef7":"laa","\ufef9":"lai","\ufefb":"la"}'),s=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042a":"A","\u042c":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044a":"a","\u044c":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221e":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","\u20a3":"francos","\u2211":"suma","\u221e":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","\u20a3":"franc","\u2211":"somme","\u221e":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","\u2211":"soma","\xa3":"libra","\u221e":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function f(I,j){if("string"!=typeof I)throw new Error("slugify: string argument expected");var q=s[(j="string"==typeof j?{replacement:j}:j||{}).locale]||{},re=void 0===j.replacement?"-":j.replacement,se=void 0===j.trim||j.trim,fe=I.normalize().split("").reduce(function(be,_e){var Oe=q[_e]||n[_e]||_e;return Oe===re&&(Oe=" "),be+Oe.replace(j.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return j.strict&&(fe=fe.replace(/[^A-Za-z0-9\s]/g,"")),se&&(fe=fe.trim()),fe=fe.replace(/\s+/g,re),j.lower&&(fe=fe.toLowerCase()),fe}return f.extend=function(I){Object.assign(n,I)},f},t.exports=f(),t.exports.default=f()}({exports:{}});const Rp=()=>Um()?"localhost":window.location.hostname;({local:`http://${Rp()}:3000`,preview:"https://auth.v1.preview.ramper.xyz",dev:"https://auth.v1.dev.ramper.xyz",staging:"https://auth.v1.staging.ramper.xyz",prod:"https://auth.v1.ramper.xyz"})[ju()];({local:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",preview:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",dev:"https://us-central1-bright-zodiac-339920.cloudfunctions.net",staging:"https://us-central1-ramper-prod.cloudfunctions.net",prod:"https://us-central1-ramper-prod.cloudfunctions.net"})[ju()],{local:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",preview:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",dev:"wss://a5wwvzpwt7.execute-api.us-west-2.amazonaws.com/dev",staging:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod",prod:"wss://tauokxd7fh.execute-api.us-west-2.amazonaws.com/prod"}[ju()],{local:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",preview:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",dev:"https://q1otyh6t0j.execute-api.us-west-2.amazonaws.com/dev/v1_0",staging:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0",prod:"https://cjbz1h17i7.execute-api.us-west-2.amazonaws.com/prod/v1_0"}[ju()],{local:"G-QDW3GW421L",preview:"G-QDW3GW421L",dev:"G-QDW3GW421L",staging:"G-7NRREF51EB",prod:"G-7NRREF51EB"}[ju()],{local:`http://${Rp()}:3001`,preview:"https://example.preview.ramper.xyz",dev:"https://example.dev.ramper.xyz",staging:"https://example.staging.ramper.xyz",prod:"https://example.ramper.xyz"}[ju()];({local:`http://${Rp()}:3002`,preview:"https://static.preview.ramper.xyz",dev:"https://static.dev.ramper.xyz",staging:"https://static.staging.ramper.xyz",prod:"https://static.ramper.xyz"})[ju()];({local:`http://${Rp()}:3004`,preview:"https://docs.preview.ramper.xyz",dev:"https://docs.dev.ramper.xyz",staging:"https://docs.staging.ramper.xyz",prod:"https://docs.ramper.xyz"})[ju()];const jO={local:`http://${Rp()}:3005`,preview:"https://js.preview.ramper.xyz",dev:"https://js.dev.ramper.xyz",staging:"https://js.staging.ramper.xyz",prod:"https://js.ramper.xyz"};jO[ju()],{local:"suyklxmori",preview:"suyklxmori",dev:"suyklxmori",staging:"dtofgevaxu",prod:"dtofgevaxu"}[ju()],{local:`http://${Rp()}:3008`,preview:"https://developer.preview.ramper.xyz",dev:"https://developer.dev.ramper.xyz",staging:"https://developer.staging.ramper.xyz",prod:"https://developer.ramper.xyz"}[ju()];const nw=t=>window[t];let rw;const Nf_GOOGLE="google",Nf_FACEBOOK="facebook",Nf_APPLE="apple",Nf_TWITTER="twitter",Nf_EMAIL="email",kp={MAINNET:"mainnet",ROPSTEN:"ropsten",GOERLI:"goerli",MATIC:"matic",MATICMUM:"maticmum"},FO_DARK=(kp.MAINNET,kp.GOERLI,kp.MATIC,kp.MATICMUM,"dark"),Lp=(kp.MAINNET,{ALL:"ALL",DEBUG:"DEBUG",INFO:"INFO",WARN:"WARN",ERROR:"ERROR"}),c3=Lp.DEBUG,iw=(t,...e)=>{};class lte{constructor(e=c3){this.debug=iw,this.info=iw,this.warn=iw,this.error=iw;const n=Object.values(Lp).includes(e)?e:c3;this.error=console.error.bind(console),n!==Lp.ERROR&&(this.warn=console.warn.bind(console),n!==Lp.WARN&&(this.info=console.info.bind(console),n!==Lp.INFO&&(this.debug=console.log.bind(console),Lp.DEBUG)))}}let fte;if(void 0!==globalThis.window){fte=new lte(window.localStorage.getItem("ramper_loggingLevel")||c3)}function l3(t){this.message=t}l3.prototype=new Error,l3.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function ow(t){this.message=t}ow.prototype=new Error,ow.prototype.name="InvalidTokenError";!function(){try{window&&window.Promise}catch{return null}}();var bte=ete(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(t){var e=bte,n={HS256:"sha256",HS384:"sha384",HS512:"sha512",RS256:"RSA-SHA256"},s={HS256:"hmac",HS384:"hmac",HS512:"hmac",RS256:"sign"},f=t.exports;function q(_e,Oe,Te,Be){var Fe;if("hmac"===Be)Fe=e.createHmac(Te,Oe).update(_e).digest("base64");else{if("sign"!=Be)throw new Error("Algorithm type not recognized");Fe=e.createSign(Te).update(_e).sign(Oe,"base64")}return be(Fe)}function re(_e){return Buffer.from(se(_e),"base64").toString()}function se(_e){return(_e+=new Array(5-_e.length%4).join("=")).replace(/\-/g,"+").replace(/_/g,"/")}function fe(_e){return be(Buffer.from(_e).toString("base64"))}function be(_e){return _e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}f.version="0.5.6",f.decode=function(Oe,Te,Be,Fe){if(!Oe)throw new Error("No token supplied");var Ke=Oe.split(".");if(3!==Ke.length)throw new Error("Not enough or too many segments");var et=Ke[0],Ye=Ke[1],ut=Ke[2],Tt=JSON.parse(re(et)),Vt=JSON.parse(re(Ye));if(!Be){!Fe&&/BEGIN( RSA)? PUBLIC KEY/.test(Te.toString())&&(Fe="RS256");var vn=n[Fe||Tt.alg],en=s[Fe||Tt.alg];if(!vn||!en)throw new Error("Algorithm not supported");if(!function j(_e,Oe,Te,Be,Fe){if("hmac"===Be)return Fe===q(_e,Oe,Te,Be);if("sign"==Be)return e.createVerify(Te).update(_e).verify(Oe,se(Fe),"base64");throw new Error("Algorithm type not recognized")}([et,Ye].join("."),Te,vn,en,ut))throw new Error("Signature verification failed");if(Vt.nbf&&Date.now()<1e3*Vt.nbf)throw new Error("Token not yet active");if(Vt.exp&&Date.now()>1e3*Vt.exp)throw new Error("Token expired")}return Vt},f.encode=function(Oe,Te,Be,Fe){if(!Te)throw new Error("Require key");Be||(Be="HS256");var Ke=n[Be],et=s[Be];if(!Ke||!et)throw new Error("Algorithm not supported");var Ye={typ:"JWT",alg:Be};Fe&&Fe.header&&function I(_e,Oe){for(var Te in Oe)Oe.hasOwnProperty(Te)&&(_e[Te]=Oe[Te])}(Ye,Fe.header);var ut=[];return ut.push(fe(JSON.stringify(Ye))),ut.push(fe(JSON.stringify(Oe))),ut.push(q(ut.join("."),Te,Ke,et)),ut.join(".")}}({exports:{}});const Ete=()=>`${jO[(()=>{const t=globalThis.RAMPER_ENV;return t===mi_PROD?mi_PROD:t===mi_STAGING?mi_STAGING:t===mi_DEV?mi_DEV:t===mi_PREVIEW?mi_PREVIEW:t===mi_LOCAL?mi_LOCAL:mi_PROD})()]}/v1/near`,Ate=({src:t})=>Um()?Promise.resolve({}):((t,e)=>{const n=document.querySelector(`[src="${t}"]`);if(null!=n&&void 0!==rw)return rw;if(null!=n&&void 0!==nw(e))return Promise.resolve(nw(e));const s=document.createElement("script");return s.src=t,rw=new Promise((f,I)=>{document.head.appendChild(s),window.addEventListener(`initialize:${e}`,()=>{void 0!==nw(e)?f(nw(e)):I(new Error(`Failed to load script: [${t}]`))})}),rw})(t,"ramper"),wl=()=>globalThis.ramper,zO=(...t)=>{var e;return null===(e=wl())||void 0===e?void 0:e.sendTransaction(...t)},Ite=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,options:s,logger:f}){yield((...t)=>Jee(void 0,void 0,void 0,function*(){const e=yield Ate({src:Ete()});return yield e?.init(...t),e}))({appName:"Ramper Wallet",authProviders:[Nf_GOOGLE,Nf_FACEBOOK,Nf_TWITTER,Nf_APPLE,Nf_EMAIL],walletProviders:[],network:s.network.networkId,theme:FO_DARK});const I={wallet:window.ramper},j=function(){var re=(0,Le.Z)(function*(){const{wallets:se}=I.wallet.getUser(),{publicKey:fe}=se.near;return fe?[{accountId:fe}]:[]});return function(){return re.apply(this,arguments)}}(),q=function(){var re=(0,Le.Z)(function*(se){const fe=yield j(),{contract:be}=n.getState();if(!fe.length||!be)throw new Error("Wallet not signed in");return se.map(_e=>{const Oe=_e.actions.map(Te=>(0,ts.createAction)(Te));return{receiverId:_e.receiverId||be.contractId,actions:Oe}})});return function(fe){return re.apply(this,arguments)}}();return{signIn:()=>(0,Le.Z)(function*(){const re=yield((...t)=>{var e;return null===(e=wl())||void 0===e?void 0:e.signIn(...t)})();if("cancel"===re.method||"none"===re.method)throw new Error("Something went wrong");const se=yield j();return se.length?se:j()})(),signOut:()=>(0,Le.Z)(function*(){I.wallet.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return j()})(),verifyOwner:({message:re})=>(0,Le.Z)(function*(){throw f.log("Ramper Wallet:verifyOwner",{message:re}),new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({receiverId:re,actions:se})=>(0,Le.Z)(function*(){f.log("signAndSendTransaction",{receiverId:re,actions:se});const{contract:fe}=n.getState();if(!(yield j()).length||!fe)throw new Error("Wallet not signed in");const _e=yield q([{receiverId:re,actions:se}]);try{const{result:Oe}=yield zO({transactionActions:_e});if(0===Object.keys(Oe[0]).length&&Oe[0].constructor===Object)throw new Error;return Oe[0]}catch{throw new Error("Failed to send transaction")}})(),signAndSendTransactions:({transactions:re})=>(0,Le.Z)(function*(){f.log("signAndSendTransactions",{transactions:re});const se=yield q(re);try{const{result:fe}=yield zO({transactionActions:se});if(0===Object.keys(fe[0]).length&&fe[0].constructor===Object)throw new Error;return fe}catch{throw new Error("Failed to send transactions")}})()}});return function(n){return t.apply(this,arguments)}}();function VO({iconUrl:t=Zee,deprecated:e=!1}={}){return(0,Le.Z)(function*(){return(0,va.isMobile)()?null:{id:"ramper-wallet",type:"injected",metadata:{name:"Ramper Wallet",description:null,iconUrl:t,downloadUrl:"https://docs.ramper.xyz/",deprecated:e,available:!0},init:Ite}})}const HO={},WO={},GO=(t,e)=>{WO[t]=e},Jt=t=>{class e extends Error{constructor(s,f,I){if(super(s||t,I),Object.setPrototypeOf(this,e.prototype),this.name=t,f)for(const j in f)this[j]=f[j];if(I&&function Dte(t){return"object"==typeof t}(I)&&"cause"in I&&!("cause"in this)){const j=I.cause;this.cause=j,"stack"in j&&(this.stack=this.stack+"\nCAUSE: "+j.stack)}}}return HO[t]=e,e};Jt("AccountNameRequired"),Jt("AccountNotSupported"),Jt("AmountRequired"),Jt("BluetoothRequired"),Jt("BtcUnmatchedApp"),Jt("CantOpenDevice"),Jt("CashAddrNotSupported"),Jt("ClaimRewardsFeesWarning"),Jt("CurrencyNotSupported"),Jt("DeviceAppVerifyNotSupported"),Jt("DeviceGenuineSocketEarlyClose"),Jt("DeviceNotGenuine"),Jt("DeviceOnDashboardExpected"),Jt("DeviceOnDashboardUnexpected"),Jt("DeviceInOSUExpected"),Jt("DeviceHalted"),Jt("DeviceNameInvalid"),Jt("DeviceSocketFail"),Jt("DeviceSocketNoBulkStatus"),Jt("DeviceSocketNoBulkStatus"),Jt("UnresponsiveDeviceError");const Tte=Jt("DisconnectedDevice"),Ote=Jt("DisconnectedDeviceDuringOperation"),JO=(Jt("DeviceExtractOnboardingStateError"),Jt("DeviceOnboardingStatePollingError"),Jt("EnpointConfig"),Jt("EthAppPleaseEnableContractData"),Jt("FeeEstimationFailed"),Jt("FirmwareNotRecognized"),Jt("HardResetFail"),Jt("InvalidXRPTag"),Jt("InvalidAddress"),Jt("InvalidNonce"),Jt("InvalidAddressBecauseDestinationIsAlsoSource"),Jt("LatestMCUInstalledError"),Jt("UnknownMCU"),Jt("LedgerAPIError"),Jt("LedgerAPIErrorWithMessage"),Jt("LedgerAPINotAvailable"),Jt("ManagerAppAlreadyInstalled"),Jt("ManagerAppRelyOnBTC"),Jt("ManagerAppDepInstallRequired"),Jt("ManagerAppDepUninstallRequired"),Jt("ManagerDeviceLocked"),Jt("ManagerFirmwareNotEnoughSpace"),Jt("ManagerNotEnoughSpace"),Jt("ManagerUninstallBTCDep"),Jt("NetworkDown"),Jt("NetworkError"),Jt("NoAddressesFound"),Jt("NotEnoughBalance"),Jt("NotEnoughBalanceToDelegate"),Jt("NotEnoughBalanceInParentAccount"),Jt("NotEnoughSpendableBalance"),Jt("NotEnoughBalanceBecauseDestinationNotCreated"),Jt("NoAccessToCamera"),Jt("NotEnoughGas"),Jt("NotEnoughGasSwap"),Jt("NotSupportedLegacyAddress"),Jt("GasLessThanEstimate"),Jt("PriorityFeeTooLow"),Jt("PriorityFeeTooHigh"),Jt("PriorityFeeHigherThanMaxFee"),Jt("MaxFeeTooLow"),Jt("PasswordsDontMatch"),Jt("PasswordIncorrect"),Jt("RecommendSubAccountsToEmpty"),Jt("RecommendUndelegation"),Jt("TimeoutTagged"),Jt("UnexpectedBootloader"),Jt("MCUNotGenuineToDashboard"),Jt("RecipientRequired"),Jt("UnavailableTezosOriginatedAccountReceive"),Jt("UnavailableTezosOriginatedAccountSend"),Jt("UpdateFetchFileFail"),Jt("UpdateIncorrectHash"),Jt("UpdateIncorrectSig"),Jt("UpdateYourApp"),Jt("UserRefusedDeviceNameChange"),Jt("UserRefusedAddress"),Jt("UserRefusedFirmwareUpdate"),Jt("UserRefusedAllowManager"),Jt("UserRefusedOnDevice"),Jt("ExpertModeRequired"),Jt("TransportOpenUserCancelled")),xte=(Jt("TransportInterfaceNotAvailable"),Jt("TransportRaceCondition"));Jt("TransportWebUSBGestureRequired"),Jt("TransactionHasBeenValidatedError"),Jt("TransportExchangeTimeoutError"),Jt("DeviceShouldStayInApp"),Jt("WebsocketConnectionError"),Jt("WebsocketConnectionFailed"),Jt("WrongDeviceForAccount"),Jt("WrongAppForCurrency"),Jt("ETHAddressNonEIP"),Jt("CantScanQRCode"),Jt("FeeNotLoaded"),Jt("FeeNotLoadedSwap"),Jt("FeeRequired"),Jt("FeeTooHigh"),Jt("PendingOperation"),Jt("SyncError"),Jt("PairingFailed"),Jt("PeerRemovedPairing"),Jt("GenuineCheckFailed"),Jt("LedgerAPI4xx"),Jt("LedgerAPI5xx"),Jt("FirmwareOrAppUpdateRequired"),Jt("ReplacementTransactionUnderpriced"),Jt("OpReturnSizeLimit"),Jt("DustLimit"),Jt("LanguageNotFound"),Jt("NoDBPathGiven"),Jt("DBWrongPassword"),Jt("DBNotReset");var YO;!function(t){t.Unknown="Unknown",t.LocationServicesDisabled="LocationServicesDisabled",t.LocationServicesUnauthorized="LocationServicesUnauthorized",t.BluetoothScanStartFailed="BluetoothScanStartFailed"}(YO||(YO={}));class $O extends Error{constructor(e,n){super(n),this.name="HwTransportError",this.type=e,Object.setPrototypeOf(this,$O.prototype)}}class El extends Error{constructor(e,n){const s="TransportError";super(e||s),this.name=s,this.message=e,this.stack=new Error(e).stack,this.id=n}}GO("TransportError",t=>new El(t.message,t.id));const Bp={ACCESS_CONDITION_NOT_FULFILLED:38916,ALGORITHM_NOT_SUPPORTED:38020,CLA_NOT_SUPPORTED:28160,CODE_BLOCKED:38976,CODE_NOT_INITIALIZED:38914,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,CONDITIONS_OF_USE_NOT_SATISFIED:27013,CONTRADICTION_INVALIDATION:38928,CONTRADICTION_SECRET_CODE_STATUS:38920,CUSTOM_IMAGE_BOOTLOADER:26159,CUSTOM_IMAGE_EMPTY:26158,FILE_ALREADY_EXISTS:27273,FILE_NOT_FOUND:37892,GP_AUTH_FAILED:25344,HALTED:28586,INCONSISTENT_FILE:37896,INCORRECT_DATA:27264,INCORRECT_LENGTH:26368,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,DEVICE_NOT_ONBOARDED:27911,DEVICE_NOT_ONBOARDED_2:26129,INVALID_KCV:38021,INVALID_OFFSET:37890,LICENSING:28482,LOCKED_DEVICE:21781,MAX_VALUE_REACHED:38992,MEMORY_PROBLEM:37440,MISSING_CRITICAL_PARAMETER:26624,NO_EF_SELECTED:37888,NOT_ENOUGH_MEMORY_SPACE:27268,OK:36864,PIN_REMAINING_ATTEMPTS:25536,REFERENCED_DATA_NOT_FOUND:27272,SECURITY_STATUS_NOT_SATISFIED:27010,TECHNICAL_PROBLEM:28416,UNKNOWN_APDU:27906,USER_REFUSED_ON_DEVICE:21761,NOT_ENOUGH_SPACE:20738};class sw extends Error{constructor(e,{canBeMappedToChildError:n=!0}={}){const s=Object.keys(Bp).find(q=>Bp[q]===e)||"UNKNOWN_ERROR",f=function Pte(t){switch(t){case 26368:return"Incorrect length";case 26624:return"Missing critical parameter";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received";case 21781:return"Locked device"}if(28416<=t&&t<=28671)return"Internal error, please report"}(e)||s,j=`Ledger device: ${f} (0x${e.toString(16)})`;if(super(j),this.name="TransportStatusError",this.statusCode=e,this.statusText=s,n&&e===Bp.LOCKED_DEVICE)return new Nte(j)}}class Nte extends sw{constructor(e){super(Bp.LOCKED_DEVICE,{canBeMappedToChildError:!1}),e&&(this.message=e),this.name="LockedDeviceError"}}GO("TransportStatusError",t=>new sw(t.statusCode));let QO=0;const Rf=[],XO=(t,e,n)=>{const s={type:t,id:String(++QO),date:new Date};e&&(s.message=e),n&&(s.data=n),qO(s)};class Km{constructor(e,n){this.type=e,this.context=n}trace(e,n){(({type:t,message:e,data:n,context:s})=>{const f={type:t,id:String(++QO),date:new Date};e&&(f.message=e),n&&(f.data=n),s&&(f.context=s),qO(f)})({type:this.type,message:e,data:n,context:this.context})}getContext(){return this.context}setContext(e){this.context=e}updateContext(e){this.context=Object.assign(Object.assign({},this.context),e)}getType(){return this.type}setType(e){this.type=e}withType(e){return new Km(e,this.context)}withContext(e){return new Km(this.type,e)}withUpdatedContext(e){return new Km(this.type,Object.assign(Object.assign({},this.context),e))}}function qO(t){for(let e=0;e(Rf.push(t),()=>{const e=Rf.indexOf(t);-1!==e&&(Rf[e]=Rf[Rf.length-1],Rf.pop())}));var aw=function(t,e,n,s){return new(n||(n=Promise))(function(I,j){function q(fe){try{se(s.next(fe))}catch(be){j(be)}}function re(fe){try{se(s.throw(fe))}catch(be){j(be)}}function se(fe){fe.done?I(fe.value):function f(I){return I instanceof n?I:new n(function(j){j(I)})}(fe.value).then(q,re)}se((s=s.apply(t,e||[])).next())})};class f3{constructor({context:e,logType:n}={}){this.exchangeTimeout=3e4,this.unresponsiveTimeout=15e3,this.deviceModel=null,this._events=new(GA()),this.send=(s,f,I,j,q=Buffer.alloc(0),re=[Bp.OK],{abortTimeoutMs:se}={})=>aw(this,void 0,void 0,function*(){const fe=this.tracer.withUpdatedContext({function:"send"});if(q.length>=256)throw fe.trace("data.length exceeded 256 bytes limit",{dataLength:q.length}),new El("data.length exceed 256 bytes limit. Got: "+q.length,"DataLengthTooBig");fe.trace("Starting an exchange",{abortTimeoutMs:se});const be=yield this.exchange(Buffer.concat([Buffer.from([s,f,I,j]),Buffer.from([q.length]),q]),{abortTimeoutMs:se});fe.trace("Received response from exchange");const _e=be.readUInt16BE(be.length-2);if(!re.some(Oe=>Oe===_e))throw new sw(_e);return be}),this._appAPIlock=null,this.tracer=new Km(n??"transport",e)}exchange(e,{abortTimeoutMs:n}={}){throw new Error("exchange not implemented")}exchangeBulk(e,n){let s=!1;return(()=>aw(this,void 0,void 0,function*(){if(!s)for(const j of e){const q=yield this.exchange(j);if(s)return;const re=q.readUInt16BE(q.length-2);if(re!==Bp.OK)throw new sw(re);n.next(q)}}))().then(()=>!s&&n.complete(),j=>!s&&n.error(j)),{unsubscribe:()=>{s=!0}}}setScrambleKey(e){}close(){return Promise.resolve()}on(e,n){this._events.on(e,n)}off(e,n){this._events.removeListener(e,n)}emit(e,...n){this._events.emit(e,...n)}setDebugMode(){console.warn("setDebugMode is deprecated. use @ledgerhq/logs instead. No logs are emitted in this anymore.")}setExchangeTimeout(e){this.exchangeTimeout=e}setExchangeUnresponsiveTimeout(e){this.unresponsiveTimeout=e}static create(e=3e3,n){return new Promise((s,f)=>{let I=!1;const j=this.listen({next:re=>{I=!0,j&&j.unsubscribe(),q&&clearTimeout(q),this.open(re.descriptor,e).then(s,f)},error:re=>{q&&clearTimeout(q),f(re)},complete:()=>{q&&clearTimeout(q),I||f(new El(this.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),q=n?setTimeout(()=>{j.unsubscribe(),f(new El(this.ErrorMessage_ListenTimeout,"ListenTimeout"))},n):null})}exchangeAtomicImpl(e){return aw(this,void 0,void 0,function*(){const n=this.tracer.withUpdatedContext({function:"exchangeAtomicImpl",unresponsiveTimeout:this.unresponsiveTimeout});if(this.exchangeBusyPromise)throw n.trace("Atomic exchange is already busy"),new xte("An action was already pending on the Ledger device. Please deny or reconnect.");let s;const f=new Promise(q=>{s=q});this.exchangeBusyPromise=f;let I=!1;const j=setTimeout(()=>{n.trace('Timeout reached, emitting Transport event "unresponsive"',{unresponsiveTimeout:this.unresponsiveTimeout}),I=!0,this.emit("unresponsive")},this.unresponsiveTimeout);try{const q=yield e();return I&&(n.trace("Device was unresponsive, emitting responsive"),this.emit("responsive")),q}finally{n.trace("Finalize, clearing busy guard"),clearTimeout(j),s&&s(),this.exchangeBusyPromise=null}})}decorateAppAPIMethods(e,n,s){for(const f of n)e[f]=this.decorateAppAPIMethod(f,e[f],e,s)}decorateAppAPIMethod(e,n,s,f){return(...I)=>aw(this,void 0,void 0,function*(){const{_appAPIlock:j}=this;if(j)return Promise.reject(new El("Ledger Device is busy (lock "+j+")","TransportLocked"));try{return this._appAPIlock=e,this.setScrambleKey(f),yield n.apply(s,I)}finally{this._appAPIlock=null}})}setTraceContext(e){this.tracer=this.tracer.withContext(e)}updateTraceContext(e){this.tracer.updateContext(e)}getTraceContext(){return this.tracer.getContext()}}f3.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",f3.ErrorMessage_NoDeviceFound="No Ledger device found";const Bte=f3;function jte(t){const e=Buffer.alloc(2);return e.writeUInt16BE(t,0),e}const Fte={data:Buffer.alloc(0),dataLength:0,sequence:0};var Kte=d(97858),tx=d.n(Kte);var Uo;!function(t){t.blue="blue",t.nanoS="nanoS",t.nanoSP="nanoSP",t.nanoX="nanoX",t.stax="stax"}(Uo||(Uo={}));const uw={[Uo.blue]:{id:Uo.blue,productName:"Ledger\xa0Blue",productIdMM:0,legacyUsbProductId:0,usbOnly:!0,memorySize:491520,masks:[822083584,822149120],getBlockSize:t=>4096},[Uo.nanoS]:{id:Uo.nanoS,productName:"Ledger\xa0Nano\xa0S",productIdMM:16,legacyUsbProductId:1,usbOnly:!0,memorySize:327680,masks:[823132160],getBlockSize:t=>{var e;return tx().lt(null!==(e=tx().coerce(t))&&void 0!==e?e:"","2.0.0")?4096:2048}},[Uo.nanoSP]:{id:Uo.nanoSP,productName:"Ledger Nano S Plus",productIdMM:80,legacyUsbProductId:5,usbOnly:!0,memorySize:1572864,masks:[856686592],getBlockSize:t=>32},[Uo.nanoX]:{id:Uo.nanoX,productName:"Ledger\xa0Nano\xa0X",productIdMM:64,legacyUsbProductId:4,usbOnly:!1,memorySize:2097152,masks:[855638016],getBlockSize:t=>4096,bluetoothSpec:[{serviceUuid:"13d63400-2c97-0004-0000-4c6564676572",notifyUuid:"13d63400-2c97-0004-0001-4c6564676572",writeUuid:"13d63400-2c97-0004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-0004-0003-4c6564676572"}]},[Uo.stax]:{id:Uo.stax,productName:"Ledger\xa0Stax",productIdMM:96,legacyUsbProductId:6,usbOnly:!1,memorySize:1572864,masks:[857735168],getBlockSize:t=>32,bluetoothSpec:[{serviceUuid:"13d63400-2c97-6004-0000-4c6564676572",notifyUuid:"13d63400-2c97-6004-0001-4c6564676572",writeUuid:"13d63400-2c97-6004-0002-4c6564676572",writeCmdUuid:"13d63400-2c97-6004-0003-4c6564676572"}]}},cw=(Uo.blue,Uo.nanoS,Uo.nanoSP,Uo.nanoX,Uo.stax,Object.values(uw)),nx=11415,rx=t=>{const e=cw.find(f=>f.legacyUsbProductId===t);if(e)return e;const n=t>>8;return cw.find(f=>f.productIdMM===n)},ix=[],d3={};for(const t in uw){const e=uw[t],{bluetoothSpec:n}=e;if(n)for(let s=0;s{const{hid:t}=navigator;if(!t)throw new El("navigator.hid is not supported","HIDNotSupported");return t};function ox(){return Al(this,void 0,void 0,function*(){const t=yield lw().requestDevice({filters:Vte});return Array.isArray(t)?t:[t]})}function h3(){return Al(this,void 0,void 0,function*(){return(yield lw().getDevices()).filter(e=>e.vendorId===nx)})}class kf extends Bte{constructor(e){super(),this.channel=Math.floor(65535*Math.random()),this.packetSize=64,this.inputs=[],this.read=()=>this.inputs.length?Promise.resolve(this.inputs.shift()):new Promise(n=>{this.inputCallback=n}),this.onInputReport=n=>{const s=Buffer.from(n.data.buffer);this.inputCallback?(this.inputCallback(s),this.inputCallback=null):this.inputs.push(s)},this._disconnectEmitted=!1,this._emitDisconnect=n=>{this._disconnectEmitted||(this._disconnectEmitted=!0,this.emit("disconnect",n))},this.exchange=n=>Al(this,void 0,void 0,function*(){return yield this.exchangeAtomicImpl(()=>Al(this,void 0,void 0,function*(){const{channel:f,packetSize:I}=this;XO("apdu","=> "+n.toString("hex"));const j=((t,e)=>({makeBlocks(n){let s=Buffer.concat([jte(n.length),n]);const f=e-5,I=Math.ceil(s.length/f);s=Buffer.concat([s,Buffer.alloc(I*f-s.length+1).fill(0)]);const j=[];for(let q=0;qI&&(f=f.slice(0,I)),{data:f,dataLength:I,sequence:j}},getReducedResult(n){if(n&&n.dataLength===n.data.length)return n.data}}))(f,I),q=j.makeBlocks(n);for(let fe=0;fe{throw f&&f.message&&f.message.includes("write")?(this._emitDisconnect(f),new Ote(f.message)):f})}),this.device=e,this.deviceModel="number"==typeof e.productId?rx(e.productId):void 0,e.addEventListener("inputreport",this.onInputReport)}static request(){return Al(this,void 0,void 0,function*(){const[e]=yield ox();return kf.open(e)})}static openConnected(){return Al(this,void 0,void 0,function*(){const e=yield h3();return 0===e.length?null:kf.open(e[0])})}static open(e){return Al(this,void 0,void 0,function*(){yield e.open();const n=new kf(e),s=f=>{e===f.device&&(lw().removeEventListener("disconnect",s),n._emitDisconnect(new Tte))};return lw().addEventListener("disconnect",s),n})}close(){return Al(this,void 0,void 0,function*(){yield this.exchangeBusyPromise,this.device.removeEventListener("inputreport",this.onInputReport),yield this.device.close()})}setScrambleKey(){}}kf.isSupported=()=>Promise.resolve(!(!window.navigator||!window.navigator.hid)),kf.list=h3,kf.listen=t=>{let e=!1;return function Wte(){return Al(this,void 0,void 0,function*(){const t=yield h3();return t.length>0?t[0]:(yield ox())[0]})}().then(s=>{if(s){if(!e){const f="number"==typeof s.productId?rx(s.productId):void 0;t.next({type:"add",descriptor:s,deviceModel:f}),t.complete()}}else t.error(new JO("Access denied to use Ledger device"))},s=>{t.error(new JO(s.message))}),{unsubscribe:function n(){e=!0}}};const Gte=kf;function sx(t){const e=t.split("/");return Buffer.concat(e.map(n=>n.endsWith("'")?2147483648|Math.abs(parseInt(n.slice(0,-1))):Math.abs(parseInt(n))).map(n=>Buffer.from([n>>24&255,n>>16&255,n>>8&255,255&n])))}const qte="W".charCodeAt(0),ene=()=>!!window.navigator?.hid;class tne{constructor(){var e=this;this.transport=null,this.isConnected=()=>Boolean(this.transport),this.connect=(0,Le.Z)(function*(){e.transport=yield Gte.create();const n=()=>{e.transport?.off("disconnect",n),e.transport=null};e.transport.on("disconnect",n)}),this.disconnect=(0,Le.Z)(function*(){if(!e.transport)throw new Error("Device not connected");yield e.transport.close(),e.transport=null}),this.setScrambleKey=n=>{if(!this.transport)throw new Error("Device not connected");this.transport.setScrambleKey(n)},this.on=(n,s)=>{if(!this.transport)throw new Error("Device not connected");return this.transport.on(n,s),{remove:()=>this.transport?.off(n,s)}},this.off=(n,s)=>{if(!this.transport)throw new Error("Device not connected");this.transport.off(n,s)},this.getVersion=(0,Le.Z)(function*(){if(!e.transport)throw new Error("Device not connected");const n=yield e.transport.send(128,6,0,0),[s,f,I]=Array.from(n);return`${s}.${f}.${I}`}),this.getPublicKey=function(){var n=(0,Le.Z)(function*({derivationPath:s}){if(!e.transport)throw new Error("Device not connected");const f=yield e.transport.send(128,4,0,qte,sx(s));return lr.utils.serialize.base_encode(f.subarray(0,-2))});return function(s){return n.apply(this,arguments)}}(),this.sign=function(){var n=(0,Le.Z)(function*({data:s,derivationPath:f}){if(!e.transport)throw new Error("Device not connected");yield e.getVersion();const j=Buffer.concat([sx(f),Buffer.from(s)]);for(let q=0;q=j.length,se=yield e.transport.send(128,2,re?128:0,0,Buffer.from(j.subarray(q,q+123)));if(re)return Buffer.from(se.subarray(0,-2))}throw new Error("Invalid data or derivation path")});return function(s){return n.apply(this,arguments)}}()}}const nne="data:image/png;base64,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",y3="accounts",rne=function(){var t=(0,Le.Z)(function*(e){const n=yield e.getItem(y3);return{client:new tne,subscriptions:[],accounts:n||[]}});return function(n){return t.apply(this,arguments)}}(),ine=function(){var t=(0,Le.Z)(function*({options:e,store:n,provider:s,logger:f,storage:I,metadata:j}){const q=yield rne(I),re={createKey:()=>{throw new Error("Not implemented")},getPublicKey:(Be=(0,Le.Z)(function*(Fe){const Ke=q.accounts.find(et=>et.accountId===Fe);if(!Ke)throw new Error("Failed to find public key for account");return lr.utils.PublicKey.from(Ke.publicKey)}),function(Ke){return Be.apply(this,arguments)}),signMessage:function(){var Be=(0,Le.Z)(function*(Fe,Ke){const et=q.accounts.find(ut=>ut.accountId===Ke);if(!et)throw new Error("Failed to find account for signing");return{signature:yield q.client.sign({data:Fe,derivationPath:et.derivationPath}),publicKey:lr.utils.PublicKey.from(et.publicKey)}});return function(Ke,et){return Be.apply(this,arguments)}}()},se=()=>q.accounts.map(Be=>({accountId:Be.accountId,publicKey:"ed25519:"+Be.publicKey})),be=function(){var Be=(0,Le.Z)(function*(){q.client.isConnected()&&(yield q.client.disconnect().catch(Fe=>{f.log("Failed to disconnect device"),f.error(Fe)})),q.subscriptions.forEach(Be=>Be.remove()),q.subscriptions=[],q.accounts=[],I.removeItem(y3)});return function(){return Be.apply(this,arguments)}}(),_e=function(){var Be=(0,Le.Z)(function*(){q.client.isConnected()||(yield q.client.connect())});return function(){return Be.apply(this,arguments)}}(),Oe=({accountId:Be,publicKey:Fe})=>(f.log("validateAccessKey",{accountId:Be,publicKey:Fe}),s.viewAccessKey({accountId:Be,publicKey:Fe}).then(Ke=>{if(f.log("validateAccessKey:accessKey",{accessKey:Ke}),"FullAccess"!==Ke.permission)throw new Error("Public key requires 'FullAccess' permission");return Ke},Ke=>{if("AccessKeyDoesNotExist"===Ke.type)return null;throw Ke})),Te=Be=>{const{contract:Fe}=n.getState();if(!Fe)throw new Error("Wallet not signed in");const Ke=Mf(n.getState());if(!Ke)throw new Error("No active account");return Be.map(et=>({signerId:et.signerId||Ke.accountId,receiverId:et.receiverId||Fe.contractId,actions:et.actions}))};var Be;return{signIn:({accounts:Be})=>(0,Le.Z)(function*(){const Fe=se();if(Fe.length)return Fe;const Ke=[];for(let et=0;et(0,Le.Z)(function*(){return se()})(),verifyOwner:({message:Be})=>(0,Le.Z)(function*(){throw f.log("Ledger:verifyOwner",{message:Be}),new Error(`Method not supported by ${j.name}`)})(),signAndSendTransaction:({signerId:Be,receiverId:Fe,actions:Ke})=>(0,Le.Z)(function*(){if(f.log("signAndSendTransaction",{signerId:Be,receiverId:Fe,actions:Ke}),!q.accounts.length)throw new Error("Wallet not signed in");yield _e();const et=yield(0,ts.signTransactions)(Te([{signerId:Be,receiverId:Fe,actions:Ke}]),re,e.network);return s.sendTransaction(et[0])})(),signAndSendTransactions:({transactions:Be})=>(0,Le.Z)(function*(){if(f.log("signAndSendTransactions",{transactions:Be}),!q.accounts.length)throw new Error("Wallet not signed in");yield _e();const Fe=yield(0,ts.signTransactions)(Te(Be),re,e.network),Ke=[];for(let et=0;et(0,Le.Z)(function*(){return yield _e(),yield q.client.getPublicKey({derivationPath:Be})})()}});return function(n){return t.apply(this,arguments)}}();function ax({iconUrl:t=nne,deprecated:e=!1}={}){return(0,Le.Z)(function*(){const n=(0,va.isMobile)(),s=ene();return n?null:{id:"ledger",type:"hardware",metadata:{name:"Ledger",description:"Protect crypto assets with the most popular hardware wallet.",iconUrl:t,deprecated:e,available:s},init:ine}})}var one=d(96105);const sne=function(){var t=(0,Le.Z)(function*(e){const{store:n,options:s,logger:f,dAppMetadata:I}=e,j=new one.NearMobileWallet({network:s.network.networkId,nodeUrl:s.network.nodeUrl,metadata:I});function q(){return re.apply(this,arguments)}function re(){return(re=(0,Le.Z)(function*(){f.log("[NearMobileWallet]:getAccounts");const se=yield j.getAccounts(),fe=[];for(let be=0;be(0,Le.Z)(function*(){f.log("[NearMobileWallet]: signIn");const fe=""!==se.contractId?se.contractId:void 0;return yield j.signIn({...se,contractId:fe}),yield q()})(),signOut:()=>(0,Le.Z)(function*(){f.log("[NearMobileWallet]: signOut"),yield j.signOut()})(),getAccounts:()=>(0,Le.Z)(function*(){return q()})(),signAndSendTransaction:se=>(0,Le.Z)(function*(){f.log("[NearMobileWallet]: signAndSendTransaction",se);const{contract:fe}=n.getState();if(!fe)throw new Error("Wallet not signed in");return yield j.signAndSendTransaction({receiverId:fe.contractId,...se})})(),verifyOwner:()=>(0,Le.Z)(function*(){throw Error("[NearMobileWallet]: verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")})(),signMessage:se=>(0,Le.Z)(function*(){const{recipient:fe,nonce:be,..._e}=se;f.log("[NearMobileWallet]: signMessage",se);const Oe=yield j.signMessage({..._e,receiver:fe,nonce:Array.from(be)});return{accountId:Oe.accountId,signature:Oe.signature.toString(),publicKey:Oe.publicKey.toString()}})(),signAndSendTransactions:se=>(0,Le.Z)(function*(){return f.log("[NearMobileWallet]: signAndSendTransactions",se),yield j.signAndSendTransactions(se)})()}});return function(n){return t.apply(this,arguments)}}(),ane="data:image/png;base64,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";function ux({dAppMetadata:t}={}){return(0,Le.Z)(function*(){return{id:"near-mobile-wallet",type:"injected",metadata:{iconUrl:ane,name:"Near Mobile Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!1,downloadUrl:"https://nearmobile.app/",deprecated:!1,available:!0},init:e=>sne({...e,dAppMetadata:t})}})}var cx=d(73597),une=d(45733);const cne="data:image/png;base64,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";let m3="https://chromewebstore.google.com/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/mcohilncbfahbmgdjkbpemcciiolgcge";QA(["safari"])&&(m3="https://apps.apple.com/us/app/okx-wallet/id6463797825"),QA(["edge-chromium"])&&(m3="https://microsoftedge.microsoft.com/addons/detail/%E6%AC%A7%E6%98%93-web3-%E9%92%B1%E5%8C%85/pbpjkcldjiffchgbbndmhojiacbgflha");const lne=()=>Ga(()=>!!window.okxwallet?.near).catch(()=>!1),dne=function(){var t=(0,Le.Z)(function*({metadata:e,store:n,emitter:s,logger:f,id:I,provider:j}){const q={wallet:window.okxwallet?.near},re=function(){var Be=(0,Le.Z)(function*(){q.wallet.isSignedIn()&&(yield q.wallet.signOut())});return function(){return Be.apply(this,arguments)}}(),se=()=>{q.wallet.on("accountChanged",function(){var Be=(0,Le.Z)(function*(Fe){f.log("onAccountChange",Fe),s.emit("signedOut",null)});return function(Fe){return Be.apply(this,arguments)}}())},be=Be=>{if(!(Be=>Be.every(Fe=>"FunctionCall"===Fe.type))(Be))throw new Error(`Only 'FunctionCall' actions types are supported by ${e.name}`);return Be.map(Ke=>Ke.params)},_e=Be=>Be.map(Fe=>({receiverId:Fe.receiverId,actions:be(Fe.actions)}));q.wallet&&q.wallet.isSignedIn()&&se();const Oe=function(){var Be=(0,Le.Z)(function*(){const{selectedWalletId:Fe}=n.getState();Fe===I&&(yield Ga(()=>!!q.wallet?.isSignedIn(),{timeout:1e3}).catch());const Ke=q.wallet.getAccountId();return Ke?[{accountId:Ke}]:[]});return function(){return Be.apply(this,arguments)}}(),Te=Be=>{const Fe=Buffer.from(Be,"base64");return une.SignedTransaction.decode(Fe)};return{signIn:({contractId:Be,methodNames:Fe})=>(0,Le.Z)(function*(){try{const{accessKey:Ke,accountId:et}=yield q.wallet.requestSignIn({contractId:Be,methodNames:Fe});se();const Ye=Ke?.publicKey;return[{accountId:et,publicKey:Ye?Ye.toString():void 0}]}catch{throw yield re(),new Error("Failed to sign in")}})(),signOut:re,getAccounts:Oe,verifyOwner:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signMessage:()=>(0,Le.Z)(function*(){throw new Error(`Method not supported by ${e.name}`)})(),signAndSendTransaction:({signerId:Be,receiverId:Fe,actions:Ke})=>(0,Le.Z)(function*(){f.log("signAndSendTransaction",{signerId:Be,receiverId:Fe,actions:Ke});const{contract:et}=n.getState();if(!q.wallet.isSignedIn()||!et)throw new Error("Wallet not signed in");try{const Ye=yield q.wallet.signTransaction({receiverId:Fe||et.contractId,actions:be(Ke)}),ut=Te(Ye);return j.sendTransaction(ut)}catch{throw new Error("sign Error")}})(),signAndSendTransactions:({transactions:Be})=>(0,Le.Z)(function*(){if(f.log("signAndSendTransactions",{transactions:Be}),!q.wallet.isSignedIn())throw new Error("Wallet not signed in");try{const Fe=yield q.wallet.requestSignTransactions({transactions:_e(Be)}),{txs:Ke}=Fe,et=[];for(let Ye=0;Ye=5||2===n&&(f[0]>5||5===f[0]&&(s||f[1]!==yc))),f.length=1,s?(t.e=t.e-e+1,f[0]=1):f[0]=t.e=0;else if(e=5||2===n&&(f[e]>5||5===f[e]&&(s||f[e+1]!==yc||1&f[e-1]))||3===n&&(s||!!f[0]),f.length=e,s)for(;++f[--e]>9;)if(f[e]=0,0===e){++t.e,f.unshift(1);break}for(e=f.length;!f[--e];)f.pop()}return t}function jp(t,e,n){var s=t.e,f=t.c.join(""),I=f.length;if(e)f=f.charAt(0)+(I>1?"."+f.slice(1):"")+(s<0?"e":"e+")+s;else if(s<0){for(;++s;)f="0"+f;f="0."+f}else if(s>0)if(++s>I)for(s-=I;s--;)f+="0";else s1&&(f=f.charAt(0)+"."+f.slice(1));return t.s<0&&n?"-"+f:f}Qr.abs=function(){var t=new this.constructor(this);return t.s=1,t},Qr.cmp=function(t){var e,n=this,s=n.c,f=(t=new n.constructor(t)).c,I=n.s,j=t.s,q=n.e,re=t.e;if(!s[0]||!f[0])return s[0]?I:f[0]?-j:0;if(I!=j)return I;if(e=I<0,q!=re)return q>re^e?1:-1;for(j=(q=s.length)<(re=f.length)?q:re,I=-1;++If[I]^e?1:-1;return q==re?0:q>re^e?1:-1},Qr.div=function(t){var e=this,n=e.constructor,s=e.c,f=(t=new n(t)).c,I=e.s==t.s?1:-1,j=n.DP;if(j!==~~j||j<0||j>fh)throw Error(fw);if(!f[0])throw Error(dx);if(!s[0])return t.s=I,t.c=[t.e=0],t;var q,re,se,fe,be,_e=f.slice(),Oe=q=f.length,Te=s.length,Be=s.slice(0,q),Fe=Be.length,Ke=t,et=Ke.c=[],Ye=0,ut=j+(Ke.e=e.e-t.e)+1;for(Ke.s=I,I=ut<0?0:ut,_e.unshift(0);Fe++Fe?1:-1;else for(be=-1,fe=0;++beBe[be]?1:-1;break}if(!(fe<0))break;for(re=Fe==q?f:_e;Fe;){if(Be[--Fe]ut&&hh(Ke,ut,n.RM,Be[0]!==yc),Ke},Qr.eq=function(t){return 0===this.cmp(t)},Qr.gt=function(t){return this.cmp(t)>0},Qr.gte=function(t){return this.cmp(t)>-1},Qr.lt=function(t){return this.cmp(t)<0},Qr.lte=function(t){return this.cmp(t)<1},Qr.minus=Qr.sub=function(t){var e,n,s,f,I=this,j=I.constructor,q=I.s,re=(t=new j(t)).s;if(q!=re)return t.s=-re,I.plus(t);var se=I.c.slice(),fe=I.e,be=t.c,_e=t.e;if(!se[0]||!be[0])return be[0]?t.s=-re:se[0]?t=new j(I):t.s=1,t;if(q=fe-_e){for((f=q<0)?(q=-q,s=se):(_e=fe,s=be),s.reverse(),re=q;re--;)s.push(0);s.reverse()}else for(n=((f=se.length0)for(;re--;)se[e++]=0;for(re=e;n>q;){if(se[--n]0?(re=j,s=se):(e=-e,s=q),s.reverse();e--;)s.push(0);s.reverse()}for(q.length-se.length<0&&(s=se,se=q,q=s),e=se.length,n=0;e;q[e]%=10)n=(q[--e]=q[e]+se[e]+n)/10|0;for(n&&(q.unshift(n),++re),e=q.length;0===q[--e];)q.pop();return t.c=q,t.e=re,t},Qr.pow=function(t){var e=this,n=new e.constructor("1"),s=n,f=t<0;if(t!==~~t||t<-1e6||t>1e6)throw Error(dh+"exponent");for(f&&(t=-t);1&t&&(s=s.times(e)),t>>=1;)e=e.times(e);return f?n.div(s):s},Qr.prec=function(t,e){if(t!==~~t||t<1||t>fh)throw Error(dh+"precision");return hh(new this.constructor(this),t,e)},Qr.round=function(t,e){if(t===yc)t=0;else if(t!==~~t||t<-fh||t>fh)throw Error(fw);return hh(new this.constructor(this),t+this.e+1,e)},Qr.sqrt=function(){var t,e,n,s=this,f=s.constructor,I=s.s,j=s.e,q=new f("0.5");if(!s.c[0])return new f(s);if(I<0)throw Error(Hm+"No square root");0===(I=Math.sqrt(s+""))||I===1/0?((e=s.c.join("")).length+j&1||(e+="0"),j=((j+1)/2|0)-(j<0||1&j),t=new f(((I=Math.sqrt(e))==1/0?"5e":(I=I.toExponential()).slice(0,I.indexOf("e")+1))+j)):t=new f(I+""),j=t.e+(f.DP+=4);do{n=t,t=q.times(n.plus(s.div(n)))}while(n.c.slice(0,j).join("")!==t.c.slice(0,j).join(""));return hh(t,(f.DP-=4)+t.e+1,f.RM)},Qr.times=Qr.mul=function(t){var e,n=this,s=n.constructor,f=n.c,I=(t=new s(t)).c,j=f.length,q=I.length,re=n.e,se=t.e;if(t.s=n.s==t.s?1:-1,!f[0]||!I[0])return t.c=[t.e=0],t;for(t.e=re+se,jre;)q=e[se]+I[re]*f[se-re-1]+q,e[se--]=q%10,q=q/10|0;e[se]=q}for(q?++t.e:e.shift(),re=e.length;!e[--re];)e.pop();return t.c=e,t},Qr.toExponential=function(t,e){var n=this,s=n.c[0];if(t!==yc){if(t!==~~t||t<0||t>fh)throw Error(fw);for(n=hh(new n.constructor(n),++t,e);n.c.lengthfh)throw Error(fw);for(t=t+(n=hh(new n.constructor(n),t+n.e+1,e)).e+1;n.c.length=e.PE,!!t.c[0])},Qr.toNumber=function(){var t=Number(jp(this,!0,!0));if(!0===this.constructor.strict&&!this.eq(t.toString()))throw Error(Hm+"Imprecise conversion");return t},Qr.toPrecision=function(t,e){var n=this,s=n.constructor,f=n.c[0];if(t!==yc){if(t!==~~t||t<1||t>fh)throw Error(dh+"precision");for(n=hh(new s(n),t,e);n.c.length=s.PE,!!f)},Qr.valueOf=function(){var t=this,e=t.constructor;if(!0===e.strict)throw Error(Hm+"valueOf disallowed");return jp(t,t.e<=e.NE||t.e>=e.PE,!0)};var Ine=function hx(){function t(e){var n=this;if(!(n instanceof t))return e===yc?hx():new t(e);if(e instanceof t)n.s=e.s,n.e=e.e,n.c=e.c.slice();else{if("string"!=typeof e){if(!0===t.strict&&"bigint"!=typeof e)throw TypeError(dh+"value");e=0===e&&1/e<0?"-0":String(e)}!function Mne(t,e){var n,s,f;if(!Sne.test(e))throw Error(dh+"number");for(t.s="-"==e.charAt(0)?(e=e.slice(1),-1):1,(n=e.indexOf("."))>-1&&(e=e.replace(".","")),(s=e.search(/e/i))>0?(n<0&&(n=s),n+=+e.slice(s+1),e=e.substring(0,s)):n<0&&(n=e.length),f=e.length,s=0;s0&&"0"==e.charAt(--f););for(t.e=n-s-1,t.c=[],n=0;s<=f;)t.c[n++]=+e.charAt(s++)}return t}(n,e)}n.constructor=t}return t.prototype=Qr,t.DP=vne,t.RM=bne,t.NE=wne,t.PE=Ene,t.strict=Ane,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();const Dne=Ine;class Wm{constructor(){this.addMessage=new _o}ngOnInit(){this.maxValue=Dne(this.account.amount).div(10**24).toString()}onSubmit(e){this.addMessage.emit(e)}}function Cne(t,e){if(1&t){const n=fy();ui(0,"button",1),$i("click",function(){Li(n);return Po(Ua(2).switchAccount())}),Si(1," Switch Account "),Hr()}}function Tne(t,e){if(1&t&&Ws(0,"near-wallet-selector-messages",5),2&t){Ao("messages",Ua(2).messages)}}function One(t,e){if(1&t){const n=fy();cy(0),ui(1,"div")(2,"button",1),$i("click",function(){Li(n);return Po(Ua().signOut())}),Si(3,"Log out"),Hr(),ui(4,"button",1),$i("click",function(){Li(n);return Po(Ua().switchWallet())}),Si(5,"Switch Wallet"),Hr(),ui(6,"button",1),$i("click",function(){Li(n);return Po(Ua().onVerifyOwner())}),Si(7,"Verify Owner"),Hr(),ui(8,"button",1),$i("click",function(){Li(n);return Po(Ua().onSignMessage())}),Si(9,"Sign Message"),Hr(),Fa(10,Cne,2,0,"button",2),Hr(),ui(11,"near-wallet-selector-form",3),$i("addMessage",function(f){Li(n);return Po(Ua().onSubmit(f))}),Hr(),Fa(12,Tne,1,1,"near-wallet-selector-messages",4),ly()}if(2&t){const n=Ua();Yo(10),Ao("ngIf",n.accounts.length>1),Yo(1),Ao("account",n.account),Yo(1),Ao("ngIf",!!n.messages.length)}}function xne(t,e){if(1&t){const n=fy();cy(0),ui(1,"button",1),$i("click",function(){Li(n);return Po(Ua().signIn())}),Si(2,"Log In"),Hr(),Ws(3,"near-wallet-selector-sign-in"),ly()}}Wm.\u0275fac=function(e){return new(e||Wm)},Wm.\u0275cmp=Ho({type:Wm,selectors:[["near-wallet-selector-form"]],inputs:{account:"account"},outputs:{addMessage:"addMessage"},decls:20,vars:3,consts:[[3,"ngSubmit"],["id","fieldset"],[1,"highlight"],["for","message"],["autoComplete","off","autoFocus","","id","message","required",""],["for","donation"],["autocomplete","off","id","donation","min","0","step","0.01","type","number",3,"defaultValue","max"],["title","NEAR Tokens"],["htmlFor","multiple"],["id","multiple","type","checkbox"],["type","submit"]],template:function(e,n){1&e&&(ui(0,"form",0),$i("ngSubmit",function(f){return n.onSubmit(f)}),ui(1,"fieldset",1)(2,"p"),Si(3),Hr(),ui(4,"p",2)(5,"label",3),Si(6,"Message:"),Hr(),Ws(7,"input",4),Hr(),ui(8,"p")(9,"label",5),Si(10,"Donation (optional):"),Hr(),Ws(11,"input",6),ui(12,"span",7),Si(13,"\u24c3"),Hr()(),ui(14,"p")(15,"label",8),Si(16,"Multiple Transactions:"),Hr(),Ws(17,"input",9),Hr(),ui(18,"button",10),Si(19,"Sign"),Hr()()()),2&e&&(Yo(3),L0("Sign the guest book, ",n.account.account_id,"!"),Yo(8),wE("max",n.maxValue),Ao("defaultValue","0"))},dependencies:[up,op,bf]});const px=lr.utils.format.parseNearAmount("0.00000000003");class Gm{ngOnInit(){var e=this;return(0,Le.Z)(function*(){const[n,s]=yield Promise.all([e.getMessages(),e.getAccount()]);e.account=s,e.messages=n,e.subscribeToEvents(),yield e.verifyMessageBrowserWallet()})()}getAccountBalance({provider:e,accountId:n}){return(0,Le.Z)(function*(){try{const{amount:s}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(s).isZero()}}catch{return{hasBalance:!1}}})()}getAccount(){var e=this;return(0,Le.Z)(function*(){if(!e.accountId)return null;const{network:n}=e.selector.options,s=new lr.providers.JsonRpcProvider({url:n.nodeUrl}),{hasBalance:f}=yield e.getAccountBalance({provider:s,accountId:e.accountId});return f?s.query({request_type:"view_account",finality:"final",account_id:e.accountId}).then(I=>({...I,account_id:e.accountId})):(window.alert(`Account ID: ${e.accountId} has not been founded. Please send some NEAR into this account.`),yield(yield e.selector.wallet()).signOut(),null)})()}signIn(){this.modal.show()}signOut(){var e=this;return(0,Le.Z)(function*(){(yield e.selector.wallet()).signOut().catch(s=>{console.log("Failed to sign out"),console.error(s)})})()}switchWallet(){this.modal.show()}getMessages(){const{network:e}=this.selector.options;return new lr.providers.JsonRpcProvider({url:e.nodeUrl}).query({request_type:"call_function",account_id:lx,method_name:"getMessages",args_base64:"",finality:"optimistic"}).then(s=>JSON.parse(Buffer.from(s.result).toString()))}switchAccount(){const e=this.accounts.findIndex(f=>f.accountId===this.accountId),n=e{const j=new XA({message:n,nonce:s,recipient:f,callbackUrl:I}),q=(0,_4.serialize)(S4,j),re=Uint8Array.from(IF.sha256.array(q)),se=Buffer.from(e,"base64");return lr.utils.PublicKey.from(t).verify(re,se)})({message:e.message,nonce:e.nonce,recipient:e.recipient,publicKey:n.publicKey,signature:n.signature,callbackUrl:e.callbackUrl}),q=(yield OF({publicKey:n.publicKey,accountId:n.accountId,network:s.selector.options.network}))&&f?"Successfully verified":"Failed to verify";alert(`${q} signed message: '${e.message}': \n ${JSON.stringify(n)}`)})()}verifyMessageBrowserWallet(){var e=this;return(0,Le.Z)(function*(){const n=new URLSearchParams(window.location.hash.substring(1)),s=n.get("accountId"),f=n.get("publicKey"),I=n.get("signature");if(!s&&!f&&!I)return;const j=JSON.parse(localStorage.getItem("message")),q={accountId:s,publicKey:f,signature:I};yield e.verifyMessage(j,q);const re=new URL(location.href);re.hash="",re.search="",window.history.replaceState({},document.title,re),localStorage.removeItem("message")})()}onSignMessage(){var e=this;return(0,Le.Z)(function*(){const n=yield e.selector.wallet(),s="test message to sign",f=Buffer.from(crypto.getRandomValues(new Uint8Array(32))),I="guest-book.testnet";"browser"===n.type&&localStorage.setItem("message",JSON.stringify({message:s,nonce:[...f],recipient:I,callbackUrl:location.href}));try{const j=yield n.signMessage({message:s,nonce:f,recipient:I});j&&(yield e.verifyMessage({message:s,nonce:f,recipient:I},j))}catch(j){const q=j instanceof Error?j.message:"Something went wrong";alert(q)}})()}subscribeToEvents(){this.subscription=this.selector.store.observable.pipe(Fn(e=>e.accounts),function pne(t,e=ct){return t=t??gne,Pn((n,s)=>{let f,I=!0;n.subscribe(vt(s,j=>{const q=e(j);(I||!t(f,q))&&(I=!1,f=q,s.next(j))}))})}()).subscribe(e=>{console.log("Accounts Update",e),this.accounts=e,this.accountId=e.find(n=>n.active)?.accountId||null,this.getAccount().then(n=>{this.account=n})}),this.modal.on("onHide",({hideReason:e})=>{console.log(`The reason for hiding the modal ${e}`)})}addMessages(e,n,s){var f=this;return(0,Le.Z)(function*(){const{contract:I}=f.selector.store.getState(),j=yield f.selector.wallet();if(!s)return j.signAndSendTransaction({signerId:f.accountId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:e},gas:px,deposit:lr.utils.format.parseNearAmount(n)}}]}).catch(re=>{throw alert("Failed to add message"),console.log("Failed to add message"),re});const q=[];for(let re=0;re<2;re+=1)q.push({signerId:f.accountId,receiverId:I.contractId,actions:[{type:"FunctionCall",params:{methodName:"addMessage",args:{text:`${e} (${re+1}/2)`},gas:px,deposit:lr.utils.format.parseNearAmount(n)}}]});return j.signAndSendTransactions({transactions:q}).catch(re=>{throw alert("Failed to add messages"),console.log("Failed to add messages"),re})})()}onSubmit(e){var n=this;return(0,Le.Z)(function*(){const{fieldset:s,message:f,donation:I,multiple:j}=e.target.elements;s.disabled=!0,n.addMessages(f.value,I.value||"0",j.checked).then(()=>n.getMessages().then(q=>{n.messages=q,f.value="",I.value="0",s.disabled=!1,j.checked=!1,f.focus()}).catch(q=>{throw alert("Failed to refresh messages"),console.log("Failed to refresh messages"),q})).catch(q=>{console.error(q),s.disabled=!1})})()}ngOnDestroy(){this.subscription?.unsubscribe()}}Gm.\u0275fac=function(e){return new(e||Gm)},Gm.\u0275cmp=Ho({type:Gm,selectors:[["near-wallet-selector-content"]],inputs:{selector:"selector",modal:"modal",accounts:"accounts",accountId:"accountId"},decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"],[3,"click",4,"ngIf"],[3,"account","addMessage"],[3,"messages",4,"ngIf"],[3,"messages"]],template:function(e,n){1&e&&(Fa(0,One,13,3,"ng-container",0),Fa(1,xne,4,0,"ng-container",0)),2&e&&(Ao("ngIf",n.account),Yo(1),Ao("ngIf",!n.accountId))},dependencies:[cl,zm,Vm,Wm]});class Fp{}function Nne(t,e){1&t&&Ws(0,"near-wallet-selector-loading")}function Rne(t,e){if(1&t&&Ws(0,"near-wallet-selector-content",2),2&t){const n=Ua();Ao("selector",n.selector)("accounts",n.accounts)("accountId",n.accountId)("modal",n.modal)}}Fp.\u0275fac=function(e){return new(e||Fp)},Fp.\u0275cmp=Ho({type:Fp,selectors:[["near-wallet-selector-loading"]],decls:5,vars:0,consts:[[1,"lds-ellipsis"]],template:function(e,n){1&e&&(ui(0,"div",0),Ws(1,"div")(2,"div")(3,"div")(4,"div"),Hr())},styles:[".lds-ellipsis[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;margin:auto}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--fg);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis1 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){left:8px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){left:32px;animation:_ngcontent-%COMP%_lds-ellipsis2 .6s infinite}.lds-ellipsis[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(4){left:56px;animation:_ngcontent-%COMP%_lds-ellipsis3 .6s infinite}@keyframes _ngcontent-%COMP%_lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes _ngcontent-%COMP%_lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes _ngcontent-%COMP%_lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}"]});class Zm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Le.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Le.Z)(function*(){const n=yield w4({network:"testnet",debug:!0,modules:[NO(),ax(),U4(),K4(),z4(),V4(),H4(),W4(),hne(),Z4(),J4(),Y4(),$4(),Q4(),rK(),xD({bundle:!1}),xO({projectId:"c8cb6204543639c31aef44ea4837a554",methods:["near_signIn","near_signOut","near_getAccounts","near_signTransaction","near_signTransactions"],metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),VO(),ux(),(0,cx.h)({contractId:"guest-book.testnet"})]}),s=uU(n,{contractId:lx}),f=n.store.getState();e.accounts=f.accounts,e.accountId=f.accounts.find(I=>I.active)?.accountId||null,window.selector=n,window.modal=s,e.selector=n,e.modal=s})()}}Zm.\u0275fac=function(e){return new(e||Zm)},Zm.\u0275cmp=Ho({type:Zm,selectors:[["near-wallet-selector-wallet-selector"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"selector","accounts","accountId","modal",4,"ngIf"],[3,"selector","accounts","accountId","modal"]],template:function(e,n){1&e&&(Fa(0,Nne,1,0,"near-wallet-selector-loading",0),Fa(1,Rne,1,4,"near-wallet-selector-content",1)),2&e&&(Ao("ngIf",!n.modal||!n.selector),Yo(1),Ao("ngIf",!!n.selector))},dependencies:[cl,Gm,Fp]});var Ot=d(18348),kne=d(49965),Yr=d(54284);const Lne=({selector:t,handleWalletClick:e})=>{const[n,s]=(0,Yr.useState)([]),[f,I]=(0,Yr.useState)("");function j(q){return q.reduce((re,se,fe)=>{const{selectedWalletId:be}=t.store.getState(),{name:_e,iconUrl:Oe,deprecated:Te}=se.metadata,Be=se.id===be;return re.push((0,Ot.jsxs)("li",{tabIndex:0,className:`single-wallet ${f===se.id?"selected-wallet":""} ${Be?"connected-wallet":""} ${Te?"deprecated-wallet":""} sidebar ${se.id}`,onClick:()=>(se.id===q[fe].id&&I(se.id),e(se)),children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:Oe,alt:_e})}),(0,Ot.jsxs)("div",{className:"import-content",children:[(0,Ot.jsx)("div",{className:"title",children:_e}),(0,Ot.jsx)("div",{className:"import-type",children:An(`modal.exportAccounts.walletTypes.${se.type}`)})]}),Te&&(0,Ot.jsx)("div",{className:"warning-triangle",children:(0,Ot.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("path",{d:"M4.95215 16.3536L10.2152 5.85657C10.9531 4.38481 13.0538 4.38519 13.7912 5.85723L19.0494 16.3543C19.7156 17.6841 18.7486 19.25 17.2612 19.25H6.74001C5.25228 19.25 4.28535 17.6835 4.95215 16.3536Z",stroke:"#E6B73E",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("path",{d:"M12 10V12",stroke:"#E6B73E",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Ot.jsx)("path",{d:"M12.5 16C12.5 16.2761 12.2761 16.5 12 16.5C11.7239 16.5 11.5 16.2761 11.5 16C11.5 15.7239 11.7239 15.5 12 15.5C12.2761 15.5 12.5 15.7239 12.5 16Z",stroke:"#E6B73E"})]})})]},se.id)),re},[])}return(0,Yr.useEffect)(()=>{const q=t.store.observable.subscribe(re=>{s(re.modules)});return()=>q.unsubscribe()},[]),(0,Ot.jsx)("div",{children:t.options.optimizeWalletOrder&&t.store.getState().recentlySignedInWallets.length>0?(0,Ot.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ot.jsx)("div",{className:"options-list-section",children:(0,Ot.jsx)("div",{className:"options-list more-options-list-content",children:j(n)})})}):(0,Ot.jsx)("div",{className:"wallet-options-wrapper",children:(0,Ot.jsx)("div",{className:"options-list",children:j(n)})})})},gx=({onClick:t})=>(0,Ot.jsx)("button",{onClick:t,className:"back-button",children:(0,Ot.jsx)("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Ot.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),Bne=({onClick:t})=>(0,Ot.jsx)("button",{onClick:t,className:"close-button",children:(0,Ot.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1",children:[(0,Ot.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Ot.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})}),ph=({title:t,onCloseModal:e,onBack:n})=>{const s="Get a Wallet"===t?" -open":"";return(0,Ot.jsxs)("div",{className:"nws-modal-header",children:[n&&(0,Ot.jsx)(gx,{onClick:n}),(0,Ot.jsx)("h3",{className:`middleTitle ${s}`,children:t}),(0,Ot.jsx)(Bne,{onClick:e})]})},jne=({message:t,module:e,onBack:n,onCloseModal:s})=>(0,Ot.jsxs)(Yr.Fragment,{children:[(0,Ot.jsx)(ph,{title:"",onCloseModal:s,onBack:n}),(0,Ot.jsx)("div",{className:"alert-message connecting-wrapper connecting-wrapper-err",children:(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:e?.metadata.iconUrl,alt:e?.metadata.name})}),(0,Ot.jsx)("h3",{className:"connecting-name",children:e?.metadata.name}),(0,Ot.jsx)("h4",{children:t})]})})]}),Fne=({module:t,onBack:e,onCloseModal:n})=>(0,Ot.jsxs)(Yr.Fragment,{children:[(0,Ot.jsxs)("div",{className:"nws-modal-header-wrapper",children:[(0,Ot.jsx)(gx,{onClick:e}),(0,Ot.jsx)(ph,{title:"",onCloseModal:n})]}),(0,Ot.jsxs)("div",{className:"wallet-not-installed-wrapper",children:[(0,Ot.jsxs)("div",{className:"wallet-data",children:[(0,Ot.jsx)("div",{className:`wallet-icon-box ${t.id}`,children:(0,Ot.jsx)("img",{src:t.metadata.iconUrl,alt:t.metadata.name})}),(0,Ot.jsx)("p",{children:t.metadata.name})]}),(0,Ot.jsxs)("p",{children:[An("modal.install.youllNeedToInstall")," ",t.metadata.name," ",An("modal.install.toContinueAfterInstalling"),(0,Ot.jsxs)("span",{className:"refresh-link",onClick:()=>window.location.reload(),children:[" ",An("modal.install.refreshThePage")]})]}),(0,Ot.jsx)("div",{className:"action-buttons",children:(0,Ot.jsxs)("button",{className:"middleButton",onClick:()=>{"injected"===t.type&&window.open(t.metadata.downloadUrl,"_blank")},children:[An("modal.install.open")," ",t.metadata.name]})})]})]}),Une=({onCloseModal:t})=>(0,Ot.jsxs)("div",{className:"wallet-home-wrapper",children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(ph,{title:An("modal.exportAccounts.transferYourAccounts"),onCloseModal:t})}),(0,Ot.jsxs)("div",{className:"wallet-info-wrapper what-wallet-hide",children:[(0,Ot.jsxs)("div",{className:"wallet-what",children:[(0,Ot.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17897)"}),(0,Ot.jsx)("g",{opacity:"0.7",children:(0,Ot.jsx)("path",{d:"M23 43.5H16.3333C15.4493 43.5 14.6014 43.1488 13.9763 42.5237C13.3512 41.8986 13 41.0507 13 40.1667V16.8333C13 15.9493 13.3512 15.1014 13.9763 14.4763C14.6014 13.8512 15.4493 13.5 16.3333 13.5H23M34.6667 36.8333L43 28.5M43 28.5L34.6667 20.1667M43 28.5H23",stroke:"#568FFC",strokeWidth:"3.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("radialGradient",{id:"paint0_radial_2563_17897",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ot.jsx)("stop",{stopColor:"#112140"}),(0,Ot.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ot.jsxs)("div",{className:"content-side",children:[(0,Ot.jsx)("h3",{children:An("modal.exportAccounts.chooseAWallet")}),(0,Ot.jsx)("p",{children:An("modal.exportAccounts.selectAWallet")})]})]}),(0,Ot.jsxs)("div",{className:"wallet-what",children:[(0,Ot.jsxs)("svg",{width:"56",height:"57",viewBox:"0 0 56 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ot.jsx)("rect",{y:"0.5",width:"56",height:"56",rx:"12",fill:"url(#paint0_radial_2563_17904)"}),(0,Ot.jsxs)("g",{opacity:"0.7",children:[(0,Ot.jsx)("path",{d:"M13 28.5C13 20.2157 19.7157 13.5 28 13.5C36.2843 13.5 43 20.2157 43 28.5C43 29.4205 43.7462 30.1667 44.6667 30.1667C45.5871 30.1667 46.3333 29.4205 46.3333 28.5C46.3333 18.3748 38.1252 10.1667 28 10.1667C17.8748 10.1667 9.66667 18.3748 9.66667 28.5C9.66667 29.4205 10.4129 30.1667 11.3333 30.1667C12.2538 30.1667 13 29.4205 13 28.5Z",fill:"#568FFC"}),(0,Ot.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38 28.5C38 31.0612 37.0372 33.3975 35.4537 35.1667H42.6434C43.8167 35.1667 44.6152 36.3476 44.0465 37.3738C40.9203 43.0147 34.9061 46.8333 28 46.8333C21.0939 46.8333 15.0796 43.0147 11.9535 37.3738C11.3848 36.3476 12.1833 35.1667 13.3566 35.1667H20.5463C18.9628 33.3975 18 31.0612 18 28.5C18 22.9771 22.4772 18.5 28 18.5C33.5228 18.5 38 22.9771 38 28.5ZM28 35.1667C31.6819 35.1667 34.6667 32.1819 34.6667 28.5C34.6667 24.8181 31.6819 21.8333 28 21.8333C24.3181 21.8333 21.3333 24.8181 21.3333 28.5C21.3333 32.1819 24.3181 35.1667 28 35.1667ZM16.8189 38.5H39.1811C36.4319 41.572 32.4397 43.5 28 43.5C23.5603 43.5 19.5681 41.572 16.8189 38.5Z",fill:"#568FFC"})]}),(0,Ot.jsx)("defs",{children:(0,Ot.jsxs)("radialGradient",{id:"paint0_radial_2563_17904",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(-3.5 79.5) rotate(-47.8271) scale(114.691 121.528)",children:[(0,Ot.jsx)("stop",{stopColor:"#112140"}),(0,Ot.jsx)("stop",{offset:"1",stopColor:"#1D5D72"})]})})]}),(0,Ot.jsxs)("div",{className:"content-side",children:[(0,Ot.jsx)("h3",{children:An("modal.exportAccounts.selectYourAccounts")}),(0,Ot.jsx)("p",{children:An("modal.exportAccounts.afterDecide")})]})]}),(0,Ot.jsx)("div",{className:"button-spacing"}),(0,Ot.jsx)("div",{className:"middleContainer",children:(0,Ot.jsx)("p",{children:An("modal.exportAccounts.disclaimer")})})]})]}),zne=({hasBalance:t,type:e})=>e===_l.UNKNOWN?(0,Ot.jsx)("span",{className:"error",children:An("modal.exportAccounts.selectAccounts.error")}):e===_l.LEDGER?(0,Ot.jsx)("span",{className:"warning",children:An("modal.exportAccounts.selectAccounts.warningLedger")}):t?null:(0,Ot.jsx)("span",{className:"warning",children:An("modal.exportAccounts.selectAccounts.noBalance")}),Vne=({onCloseModal:t,onBack:e,selectedAccounts:n,setSelectedAccounts:s,accountsWithDetail:f,disabledAccounts:I,onNextStep:j,isLoading:q,buttonLabel:re})=>{const se=(_e,Oe)=>{s(Oe?[...n,_e]:n.filter(Te=>Te!==_e))},be=n.length===f.length?An("modal.exportAccounts.selectAccounts.deselectAll"):An("modal.exportAccounts.selectAccounts.selectAll");return(0,Yr.useEffect)(()=>{n.length||s(f.map(({accountId:_e})=>_e))},[f.length]),(0,Ot.jsxs)(Yr.Fragment,{children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(ph,{title:An("modal.exportAccounts.selectAccounts.title"),onCloseModal:t,onBack:e})}),(0,Ot.jsx)("div",{className:"account-export connecting-wrapper",children:(0,Ot.jsx)("div",{className:"content",children:q?(0,Ot.jsx)("div",{className:"connecting-details",children:(0,Ot.jsx)("div",{className:"spinner account-selection-spinner",children:(0,Ot.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAR3SURBVHgBpVZ9aJVVGH+e55z33bi7zY9hMz+yMAeNoEIq6A9ZRKQWEsQNFIIpsf5Y9E+GsD9iBEEDMUkDa6ShRKKZYIWiRkaKaUGUGCKOTGMF84PNO99773vOefq9720yK5ZzD/dwPt/nd37P17lEk5Qnuz9roUkKT7T5bNe+QjTNLCHv24h1Xgh+OmtwQYPH2jUXwlnW9NRooqePfLS6MmmQ59cdeEGJlkJZA5MGVecoAwghBYZTVY9ftuaDSy8x8w9fbFl95JZAXuw9dmelkvRAyXxS7wMFryG4bIyWZiqzPgMhaFfGfn3NY3AZG9sPf/Dy8HidZvxkZc/h1pqnPlKey6yspMqUd9jVAEYY6RCGDQTwjGDwGTgAlbwRijV1C9vanz577tT+6r+YrOz5rlXFrQ/qZ+FbDxCfXS5oOgxln4v473f3rbgwdn7FK5/MCaH2eAg6X8g3K2iBMTiBkNJVKbod+ze9mgPZsY/UaicYzCE1HgpZc558olCTjTvWLxv9p1n3bV45iO7T5zq3TU9j9xTOLwQ5D9t48aEYrtGj2P/2BpNS78nZJoRdlDsYd8vphz273lqyhW5Rnlnz3hOe6SEwghvxPUMTVfYe2rpuUOqOkZeIxdSbsSJ8eTIAmXy5tftrMPkzi0C4B2ZDNHp+INvLQURkhYiJ6gDGko376DbEJ8k3mcnYBSeSM2ptL/XGsurNnxfnDIQNwCKADO1845Ef6Tbk0M51g4joMgncDyBmkrtsNEMQovcDxGYsGL2yDNAUxPv0VySs4yxhfeYbabJg0Awg+ILylEB6nKMpSOp0WCR1+QSuD4ELljNDEfyRrdXPCU1BTEgD7pyOzVmC2iBm0KgYAMCEeXovoClIjdKiVdQ3FYbzmatxWRqMPcNsDHyfNWskWk5TkJhNEwVyxA6hLL5clLJsW7voFxa6LiR5CCOeWzo3XFxKtyEdy3tnp7VahAoDp6PEVGvJye09l3P7K9k9WQijXBv4B6WG+0pvD0ybFEBHZ6OPh+/OGaBsIvNRAGp/ZHv1jJeon+omszBkFsr3FhsLB7rev3JLQKVSyfjmaW2BJSavDlqR7c5VrR+4AbLttbkXMehH7gjA8gZiD/tq+Or/ABZ3dUW/J62LcPUGcrW8pKSVFAg6cHz3O0l25qZHa/XGwWPg9aAwwzdZAaDX+7tbNsMYf5+bpaUS0dDQEF8rtsUxCbI5e5KRzGhBMiqNxllKju7d8NOYXjseRBytQngcVDL3wD9H+7vf3YS7mnnzqrZpwSxrwkh04cpM5NTMyJdHbIgaESyxJ6tZ5cDbw3qd0tqVCp25Se/4yYdr5/zm/ehjwvpxZHgN0Wlub0/Yt7awdykqRYFHy6NUQVrBd4o6p6ngrVL2Bo8ksuJqoXzq9Ln9m6rj9U74b6Wjo8OeP082aY5NUxRsYzwDkeFsU+MdUU3U4PG0QtbahqhadDMuHTy4fvS/9EwIUpdeuW/ZiShOipFxURRbNdWETFMRZrCFlEZGkuPHdycTafgLExNiI6YfUpcAAAAASUVORK5CYII=",alt:"loading-icon"})})}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsxs)("div",{className:"account-selection-container",children:[(0,Ot.jsx)("span",{className:"account-select-all",onClick:()=>{n.length!==f.length?s(f.map(({accountId:_e})=>_e)):s([])},children:be}),(0,Ot.jsx)("div",{className:"account-selection",children:f.map(({accountId:_e})=>(0,Ot.jsx)("div",{className:"account-selection-row",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:Oe=>{se(_e,Oe.target.checked)},checked:n.includes(_e),type:"checkbox",id:_e,name:_e,value:_e}),(0,Ot.jsx)("label",{htmlFor:_e,title:_e,children:(0,Ot.jsx)("span",{className:"label",children:_e})})]})},_e))}),I.length>0&&(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("span",{className:"account-unavailable",children:An("modal.exportAccounts.selectAccounts.unavailable")}),(0,Ot.jsx)("div",{className:"account-selection",children:I.map(({accountId:_e,type:Oe,hasBalance:Te})=>(0,Ot.jsx)("div",{className:"account-selection-row",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:Be=>{se(_e,Be.target.checked)},checked:n.includes(_e),type:"checkbox",id:_e,name:_e,value:_e,disabled:!0}),(0,Ot.jsxs)("label",{htmlFor:_e,title:_e,children:[(0,Ot.jsx)("span",{className:"account-id",children:_e}),zne({hasBalance:Te,type:Oe})]})]})},_e))})]}),(0,Ot.jsx)("div",{className:"filler"})]}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:j,disabled:0===n.length,children:An(re)})]})})})]})};var Hne=d(40489),dw=d.n(Hne),hw=d(47768);const Zne=({children:t,copy:e,onClick:n,id:s})=>{const[f,I]=(0,Yr.useState)(!1);return(0,Ot.jsxs)("button",{title:An("component.clickToCopy.tooltip"),className:"click-to-copy",onClick:()=>{I(!0),setTimeout(()=>I(!1),2e3);const q=document.createElement("textarea");q.innerHTML=e,document.body.appendChild(q),q.select();const re=document.execCommand("copy");return document.body.removeChild(q),n&&n(e),re},id:s,children:[t,(0,Ot.jsx)("div",{className:"copy-success"+(f?" show":""),children:An("component.clickToCopy.label")})]})},Jne=({onNextStep:t,hasCopied:e,setHasCopied:n,onCloseModal:s,onBack:f,onPassphraseSave:I})=>{const[j,q]=(0,Yr.useState)("");(0,Yr.useEffect)(()=>{const fe=(()=>{const t=dw().randomBytes(24);return(0,hw.encodeBase64)(t)})();q(fe)},[]);return(0,Ot.jsxs)(Yr.Fragment,{children:[(0,Ot.jsx)(ph,{title:An("modal.exportAccounts.getPassphrase.title"),onCloseModal:s,onBack:f}),(0,Ot.jsx)("div",{className:"account-export",children:(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("h4",{className:"passphrase-title",children:An("modal.exportAccounts.getPassphrase.desc")}),(0,Ot.jsx)(Zne,{copy:j,id:"passphraseButton",children:(0,Ot.jsx)("div",{className:"passphrase-text",children:j})}),(0,Ot.jsx)("label",{htmlFor:"passphraseButton",className:"passphrase-label",children:An("modal.exportAccounts.getPassphrase.label")}),(0,Ot.jsx)("div",{className:"filler"}),(0,Ot.jsx)("div",{className:"passphrase-check-container",children:(0,Ot.jsxs)("div",{className:"checkbox",children:[(0,Ot.jsx)("input",{onChange:fe=>{n(fe.target.checked),I(j)},checked:e,type:"checkbox",id:"passphrase-check",name:"passphrase-check",value:"passphrase-check"}),(0,Ot.jsx)("label",{htmlFor:"passphrase-check",children:(0,Ot.jsx)("span",{className:"label",children:An("modal.exportAccounts.getPassphrase.checkLabel")})})]})}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t()},disabled:!e,children:An("modal.exportAccounts.getPassphrase.transferButton")})]})})]})},Yne=({src:t,name:e,alertMessage:n,onCloseModal:s,onBack:f})=>(0,Ot.jsxs)("div",{className:"account-export connecting-wrapper",children:[(0,Ot.jsx)(ph,{title:"No interface found",onCloseModal:s,onBack:f}),(0,Ot.jsxs)("div",{className:"content",children:[(0,Ot.jsx)("div",{className:"icon",children:(0,Ot.jsx)("img",{src:t,alt:e})}),(0,Ot.jsx)("h3",{className:"connecting-name",children:e}),(0,Ot.jsx)("p",{children:n})]})]}),$ne=({onComplete:t,onBack:e,onCloseModal:n,onStartOver:s})=>(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("div",{className:"nws-modal-header-wrapper",children:(0,Ot.jsx)(ph,{title:An("modal.exportAccounts.complete.title"),onCloseModal:n,onBack:e})}),(0,Ot.jsxs)("div",{className:"complete-desc",children:[(0,Ot.jsx)("h4",{className:"content",children:An("modal.exportAccounts.complete.descOne")}),(0,Ot.jsx)("h4",{className:"content",children:An("modal.exportAccounts.complete.descTwo")})]}),(0,Ot.jsx)("button",{className:"middleButton account-export-button secondary",onClick:s,children:An("modal.exportAccounts.complete.startOverButton")}),(0,Ot.jsx)("button",{className:"middleButton account-export-button",onClick:()=>{t(),n()},children:An("modal.exportAccounts.complete.button")})]}),eu_ACCOUNT_SELECTION="ACCOUNT_SELECTION",eu_GET_PASSPHRASE="GET_PASSPHRASE",eu_NO_INTERFACE="NO_INTERFACE",eu_COMPLETE="COMPLETE",_l={LEDGER:"Ledger",FULL_ACCESS_KEY:"Full Access Key",MULTI_SIG:"Multi-Sig",UNKNOWN:"Unknown"},Qne=t=>{if("FullAccess"===t)return _l.FULL_ACCESS_KEY;if(t?.FunctionCall?.method_names.includes("__wallet__metadata"))return _l.LEDGER;const e=["add_request","add_request_and_confirm","delete_request","confirm"];return t?.FunctionCall?.method_names.every(n=>e.includes(n))?_l.MULTI_SIG:_l.UNKNOWN},Xne=function(){var t=(0,Le.Z)(function*({provider:e,accountId:n,publicKey:s}){try{const{permission:f}=yield e.query({request_type:"view_access_key",account_id:n,public_key:s,finality:"final"});return{type:Qne(f)}}catch{return{type:_l.UNKNOWN}}});return function(n){return t.apply(this,arguments)}}(),qne=function(){var t=(0,Le.Z)(function*({provider:e,accountId:n}){try{const{amount:s}=yield e.query({request_type:"view_account",finality:"final",account_id:n});return{hasBalance:!new(fr())(s).isZero()}}catch{return{hasBalance:!1}}});return function(n){return t.apply(this,arguments)}}(),ere=({alertMessage:t,module:e,onCloseModal:n,onWarning:s,accounts:f,selector:I,wallet:j,onBack:q,onComplete:re})=>{const[se,fe]=(0,Yr.useState)([]),[be,_e]=(0,Yr.useState)(!1),[Oe,Te]=(0,Yr.useState)([]),[Be,Fe]=(0,Yr.useState)([]),[Ke,et]=(0,Yr.useState)(""),[Ye,ut]=(0,Yr.useState)({});(0,Yr.useEffect)(()=>{!function(){var Fu=(0,Le.Z)(function*(){try{const{buildImportAccountsUrl:Ns,importAccountsInSecureContext:Sl}=yield j.wallet();ut({buildImportAccountsUrl:Ns,importAccountsInSecureContext:Sl}),!Ns&&!Sl&&s()}catch{s()}});return function(){return Fu.apply(this,arguments)}}()()},[e?.metadata.name,t]);const{network:Tt}=I.options,Vt=new lr.providers.JsonRpcProvider({url:Tt.nodeUrl}),[vn,en]=(0,Yr.useState)(!1);(0,Yr.useEffect)(()=>{const tu=function(){var Fu=(0,Le.Z)(function*(){_e(!0);const Ns=yield Promise.all(f.map(function(){var Ml=(0,Le.Z)(function*({accountId:Uu,privateKey:Kp}){const pw=lr.utils.KeyPair.fromString(Kp),{type:w3}=yield Xne({provider:Vt,accountId:Uu,publicKey:pw.getPublicKey().toString()}),{hasBalance:zp}=yield qne({provider:Vt,accountId:Uu});return{accountId:Uu,privateKey:Kp,type:w3,hasBalance:zp}});return function(Uu){return Ml.apply(this,arguments)}}())),Sl=Ns.filter(({hasBalance:Ml,type:Uu})=>Ml&&Uu===_l.FULL_ACCESS_KEY);Te(Sl);const $m=Ns.filter(({hasBalance:Ml,type:Uu})=>!Ml||Uu!==_l.FULL_ACCESS_KEY);Fe($m),_e(!1)});return function(){return Fu.apply(this,arguments)}}();0===Oe.length&&tu()},[Ye.buildImportAccountsUrl,Ye.importAccountsInSecureContext]);const[rn,Mn]=(0,Yr.useState)(eu_ACCOUNT_SELECTION);(0,Yr.useEffect)(()=>{Mn(t?eu_NO_INTERFACE:eu_ACCOUNT_SELECTION)},[t]);const mr=()=>{Mn(eu_GET_PASSPHRASE)},{buildImportAccountsUrl:ar,importAccountsInSecureContext:Ar}=Ye,Ko=function(){var tu=(0,Le.Z)(function*(){Ar?yield Ar({accounts:f.filter(({accountId:Fu})=>se.includes(Fu))}):Mn(eu_NO_INTERFACE)});return function(){return tu.apply(this,arguments)}}();return(0,Ot.jsxs)(Yr.Fragment,{children:[rn===eu_NO_INTERFACE&&(0,Ot.jsx)(Yne,{src:e?.metadata.iconUrl,name:e?.metadata.name,alertMessage:t,onBack:q,onCloseModal:n}),rn===eu_ACCOUNT_SELECTION&&(0,Ot.jsx)(Vne,{onCloseModal:n,onBack:q,selectedAccounts:se,setSelectedAccounts:fe,accountsWithDetail:Oe,disabledAccounts:Be,onNextStep:()=>{"injected"!==j.type||j.metadata.useUrlAccountImport?mr():(Ko(),Mn(eu_COMPLETE))},isLoading:be,buttonLabel:"injected"===j.type?"modal.exportAccounts.getPassphrase.button":"modal.exportAccounts.selectAccounts.button"}),rn===eu_GET_PASSPHRASE&&(0,Ot.jsx)(Jne,{onNextStep:()=>{const tu=(({accountData:t,secretKey:e})=>{if(!e)throw new Error("Secret key is required");try{const n=(0,hw.decodeBase64)(Buffer.from(e).toString("base64")),s=(0,hw.decodeUTF8)(JSON.stringify(t)),f=dw().randomBytes(dw().secretbox.nonceLength),I=dw().secretbox(s,f,n),j=new Uint8Array(f.length+I.length);return j.set(f),j.set(I,f.length),(0,hw.encodeBase64)(j)}catch{throw new Error("Unable to encrypt account data")}})({accountData:f.filter(({accountId:Ns})=>se.includes(Ns)),secretKey:Ke});if(("browser"===j.type||j.metadata.useUrlAccountImport)&&ar){const Ns=`${ar()}#${tu}`;window.open(Ns,"_blank")}Mn(eu_COMPLETE)},hasCopied:vn,setHasCopied:en,onCloseModal:n,onBack:()=>Mn(eu_ACCOUNT_SELECTION),onPassphraseSave:et}),rn===eu_COMPLETE&&(0,Ot.jsx)($ne,{onCloseModal:n,onBack:mr,onComplete:()=>{re&&re({accounts:se,walletName:e?.metadata.name||"Unknown"})},onStartOver:q})]})},tre=t=>{switch(t){case"dark":return"dark-theme";case"light":return"light-theme";default:return""}},nre=({selector:t,options:e,visible:n,hide:s})=>{const[f,I]=(0,Yr.useState)({name:"WalletHome"}),[j,q]=(0,Yr.useState)(null),[re,se]=(0,Yr.useState)(),fe=()=>{I({name:"WalletHome"})};(0,Yr.useEffect)(()=>{I({name:"WalletHome"});const{selectedWalletId:Te,modules:Be}=t.store.getState();if(Te){const Fe=Be.find(Ke=>Ke.id===Te);se(Fe)}},[n]);const be=(0,Yr.useCallback)(()=>{q(null),fe(),s()},[s]);(0,Yr.useEffect)(()=>{const Te=Be=>{"Escape"===Be.key&&be()};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[be]);const _e=function(){var Te=(0,Le.Z)(function*(Be){q(null),se(Be);try{const{deprecated:Fe,available:Ke}=Be.metadata;return"injected"!==Be.type||Ke?Fe?(q(`${Be.metadata.name} is deprecated. Please select another wallet.`),void I({name:"AlertMessage",params:{module:Be}})):void I({name:"ExportAccounts",params:{module:Be}}):void I({name:"WalletNotInstalled",params:{module:Be}})}catch(Fe){const{name:Ke}=Be.metadata,et=Fe instanceof Error?Fe.message:"Something went wrong";q(`Failed to sign in with ${Ke}: ${et}`),I({name:"AlertMessage",params:{module:Be}})}});return function(Fe){return Te.apply(this,arguments)}}(),Oe=(0,Yr.useCallback)(()=>{re&&(q(`${re?.metadata.name} ${An("modal.exportAccounts.warning")}`),I({name:"AlertMessage",params:{module:re}}))},[re]);return n?(0,Ot.jsxs)("div",{className:`nws-modal-wrapper ${tre(e?.theme)} ${n?"open":""}`,children:[(0,Ot.jsx)("div",{className:"nws-modal-overlay",onClick:be}),(0,Ot.jsxs)("div",{className:"nws-modal",children:[(0,Ot.jsxs)("div",{className:"modal-left",children:[(0,Ot.jsx)("div",{className:"modal-left-title",children:(0,Ot.jsx)("h2",{children:An("modal.exportAccounts.chooseAWallet")})}),(0,Ot.jsx)(Lne,{handleWalletClick:Te=>{_e(Te)},selector:t})]}),(0,Ot.jsx)("div",{className:"modal-right",children:(0,Ot.jsxs)("div",{className:"nws-modal-body account-export-body",children:["AlertMessage"===f.name&&j&&(0,Ot.jsx)(jne,{message:j,module:f.params?.module,onBack:()=>{q(null),fe()},onCloseModal:be}),"WalletNotInstalled"===f.name&&(0,Ot.jsx)(Fne,{module:f.params?.module,onBack:()=>{fe()},onCloseModal:be}),"WalletHome"===f.name&&(0,Ot.jsx)(Une,{onCloseModal:be}),"ExportAccounts"===f.name&&(0,Ot.jsx)(ere,{module:f.params?.module,alertMessage:j,onCloseModal:be,onWarning:Oe,onBack:fe,selector:t,accounts:e.accounts,wallet:re,onComplete:e?.onComplete})]})})]})]}):null};let v3=null,b3=null;function ore(t,e){1&t&&Ws(0,"near-wallet-selector-loading")}function sre(t,e){if(1&t){const n=fy();ui(0,"div")(1,"button",1),$i("click",function(){Li(n);return Po(Ua().show())}),Si(2,"Open Modal"),Hr(),ui(3,"p"),Si(4," The Export Accounts modal assists users in migrating their accounts to any Wallet Selector wallet supporting account imports. Any sensitive data in transit during this process will be encrypted with a randomly-generated password which the user will be required to copy down and use in the account import process on the target wallet. "),Hr()()}}class Jm{constructor(){this.accounts=[]}ngOnInit(){var e=this;return(0,Le.Z)(function*(){yield e.initialize().catch(n=>{console.error(n),alert("Failed to initialise wallet selector")})})()}initialize(){var e=this;return(0,Le.Z)(function*(){const n=yield w4({network:"testnet",debug:!0,modules:[NO(),ax(),U4(),K4(),z4(),V4(),H4(),W4(),Z4(),J4(),Y4(),$4(),Q4(),xD({bundle:!1}),xO({projectId:"c4f79cc...",metadata:{name:"NEAR Wallet Selector",description:"Example dApp used by NEAR Wallet Selector",url:"https://github.com/near/wallet-selector",icons:["https://avatars.githubusercontent.com/u/37784886"]}}),VO(),ux(),(0,cx.h)({contractId:"guest-book.testnet"})]}),s=((t,e)=>{if(!b3){const s=document.body,f=document.createElement("div");f.id="near-wallet-selector-modal",s.appendChild(f),b3=(0,kne.s)(f)}const n=s=>{b3.render((0,Ot.jsx)(nre,{selector:t,options:e,visible:s,hide:()=>n(!1)}))};return v3||(v3={show:()=>{n(!0)},hide:()=>{n(!1)}}),v3})(n,{accounts:[],onComplete:I=>{console.log("Transfer Completed: ",I)}}),f=n.store.getState();e.accounts=f.accounts,e.accountId=f.accounts.find(I=>I.active)?.accountId||null,window.exportSelector=n,window.exportModal=s,e.exportSelector=n,e.exportModal=s})()}show(){this.exportModal.show()}}function are(t,e){1&t&&Ws(0,"near-wallet-selector-wallet-selector")}function ure(t,e){1&t&&Ws(0,"near-wallet-selector-wallet-selector-export")}Jm.\u0275fac=function(e){return new(e||Jm)},Jm.\u0275cmp=Ho({type:Jm,selectors:[["near-wallet-selector-wallet-selector-export"]],decls:2,vars:2,consts:[[4,"ngIf"],[3,"click"]],template:function(e,n){1&e&&(Fa(0,ore,1,0,"near-wallet-selector-loading",0),Fa(1,sre,5,0,"div",0)),2&e&&(Ao("ngIf",!n.exportModal||!n.exportSelector),Yo(1),Ao("ngIf",n.exportModal||n.exportSelector))},dependencies:[cl,Fp]});class Ym{}Ym.\u0275fac=function(e){return new(e||Ym)},Ym.\u0275cmp=Ho({type:Ym,selectors:[["near-wallet-selector-root"]],decls:8,vars:4,consts:[[1,"title-container"],[3,"click"],[4,"ngIf"]],template:function(e,n){1&e&&(ui(0,"main")(1,"div",0)(2,"h1"),Si(3),Hr(),ui(4,"button",1),$i("click",function(){return n.showImport=!n.showImport}),Si(5),Hr()(),Fa(6,are,1,0,"near-wallet-selector-wallet-selector",2),Fa(7,ure,1,0,"near-wallet-selector-wallet-selector-export",2),Hr()),2&e&&(Yo(3),m1(n.showImport?"Export Account":"NEAR Guest Book"),Yo(2),L0(" ",n.showImport?"Back to Log in":"Try Export Account"," "),Yo(1),Ao("ngIf",!n.showImport),Yo(1),Ao("ngIf",n.showImport))},dependencies:[cl,Zm,Jm]});class Up{}Up.\u0275fac=function(e){return new(e||Up)},Up.\u0275mod=js({type:Up,bootstrap:[Ym]}),Up.\u0275inj=Ls({imports:[pf,Sf]}),XB().bootstrapModule(Up).catch(t=>console.error(t))},32184:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{createAction:()=>h,signTransactions:()=>y});var l=d(98538),_=d(71836);const{transactions:E,utils:S}=_,h=v=>{switch(v.type){case"CreateAccount":return E.createAccount();case"DeployContract":{const{code:b}=v.params;return E.deployContract(b)}case"FunctionCall":{const{methodName:b,args:A,gas:O,deposit:C}=v.params;return E.functionCall(b,A,new l.BN(O),new l.BN(C))}case"Transfer":{const{deposit:b}=v.params;return E.transfer(new l.BN(b))}case"Stake":{const{stake:b,publicKey:A}=v.params;return E.stake(new l.BN(b),S.PublicKey.from(A))}case"AddKey":{const{publicKey:b,accessKey:A}=v.params;return E.addKey(S.PublicKey.from(b),(v=>{if("FullAccess"===v)return E.fullAccessKey();const{receiverId:b,methodNames:A=[]}=v,O=v.allowance?new l.BN(v.allowance):void 0;return E.functionCallAccessKey(b,A,O)})(A.permission))}case"DeleteKey":{const{publicKey:b}=v.params;return E.deleteKey(S.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=v.params;return E.deleteAccount(b)}default:throw new Error("Invalid action type")}};var g=d(49671);const y=function(){var v=(0,g.Z)(function*(b,A,O){const C=new _.providers.JsonRpcProvider({url:O.nodeUrl}),T=[];for(let N=0;Nh(J)),H=_.transactions.createTransaction(b[N].signerId,_.utils.PublicKey.from(M.toString()),b[N].receiverId,R.nonce+N+1,L,_.utils.serialize.base_decode(P.header.hash)),V=yield _.transactions.signTransaction(H,A,b[N].signerId,O.networkId);T.push(V[1])}return T});return function(A,O,C){return v.apply(this,arguments)}}()},56618:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(W,Q,D,o){return new(D||(D=Promise))(function(m,w){function x(k){try{G(o.next(k))}catch(p){w(p)}}function F(k){try{G(o.throw(k))}catch(p){w(p)}}function G(k){k.done?m(k.value):function u(m){return m instanceof D?m:new D(function(w){w(m)})}(k.value).then(x,F)}G((o=o.apply(W,Q||[])).next())})},_=this&&this.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;const E=d(79189),S=d(1656),a=d(60898),h=d(17527),g=d(13162),y=_(d(98538)),{addKey:v,createAccount:b,deleteAccount:A,deleteKey:O,deployContract:C,fullAccessKey:T,functionCall:N,functionCallAccessKey:M,stake:P,transfer:R}=a.actionCreators;function J(W){return JSON.parse(Buffer.from(W).toString())}function Y(W){return Buffer.from(JSON.stringify(W))}class Z{constructor(Q,D){this.accessKeyByPublicKeyCache={},this.connection=Q,this.accountId=D}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(Q,D){return l(this,void 0,void 0,function*(){const o=yield this.findAccessKey(Q,D);if(!o)throw new h.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:u}=o,w=(yield this.connection.provider.block({finality:"final"})).header.hash,x=u.nonce.add(new y.default(1));return yield(0,a.signTransaction)(Q,x,D,(0,g.baseDecode)(w),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:Q,actions:D,returnError:o}){return l(this,void 0,void 0,function*(){let u,m;const w=yield(0,S.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[u,m]=yield this.signTransaction(Q,D);const x=m.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(m)}catch(F){if("InvalidNonce"===F.type)return g.Logger.warn(`Retrying transaction ${Q}:${(0,g.baseEncode)(u)} with new nonce.`),delete this.accessKeyByPublicKeyCache[x.toString()],null;if("Expired"===F.type)return g.Logger.warn(`Retrying transaction ${Q}:${(0,g.baseEncode)(u)} due to expired block hash`),null;throw F.context=new h.ErrorContext((0,g.baseEncode)(u)),F}}));if(!w)throw new h.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:m.transaction.receiverId,outcome:w}),!o&&"object"==typeof w.status&&"object"==typeof w.status.Failure&&null!==w.status.Failure)throw w.status.Failure.error_message&&w.status.Failure.error_type?new h.TypedError(`Transaction ${w.transaction_outcome.id} failed. ${w.status.Failure.error_message}`,w.status.Failure.error_type):(0,g.parseResultError)(w);return w})}findAccessKey(Q,D){return l(this,void 0,void 0,function*(){const o=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!o)throw new h.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const u=this.accessKeyByPublicKeyCache[o.toString()];if(void 0!==u)return{publicKey:o,accessKey:u};try{const m=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:o.toString(),finality:"optimistic"}),w=Object.assign(Object.assign({},m),{nonce:new y.default(m.nonce)});return this.accessKeyByPublicKeyCache[o.toString()]?{publicKey:o,accessKey:this.accessKeyByPublicKeyCache[o.toString()]}:(this.accessKeyByPublicKeyCache[o.toString()]=w,{publicKey:o,accessKey:w})}catch(m){if("AccessKeyDoesNotExist"==m.type)return null;throw m}})}createAndDeployContract(Q,D,o,u){return l(this,void 0,void 0,function*(){const m=T();return yield this.signAndSendTransaction({receiverId:Q,actions:[b(),R(u),v(E.PublicKey.from(D),m),C(o)]}),new Z(this.connection,Q)})}sendMoney(Q,D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:Q,actions:[R(D)]})})}createAccount(Q,D,o){return l(this,void 0,void 0,function*(){const u=T();return this.signAndSendTransaction({receiverId:Q,actions:[b(),R(o),v(E.PublicKey.from(D),u)]})})}deleteAccount(Q){return l(this,void 0,void 0,function*(){return g.Logger.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[A(Q)]})})}deployContract(Q){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[C(Q)]})})}encodeJSContractArgs(Q,D,o){return Buffer.concat([Buffer.from(Q),Buffer.from([0]),Buffer.from(D),Buffer.from([0]),Buffer.from(o)])}functionCall({contractId:Q,methodName:D,args:o={},gas:u=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:m,walletMeta:w,walletCallbackUrl:x,stringify:F,jsContract:G}){return l(this,void 0,void 0,function*(){let k;if(this.validateArgs(o),G)k=["call_js_contract",this.encodeJSContractArgs(Q,D,JSON.stringify(o)),u,m,null,!0];else{const p=void 0===F?a.stringifyJsonOrBytes:F;k=[D,o,u,m,p,!1]}return this.signAndSendTransaction({receiverId:G?this.connection.jsvmAccountId:Q,actions:[N.apply(void 0,k)],walletMeta:w,walletCallbackUrl:x})})}addKey(Q,D,o,u){return l(this,void 0,void 0,function*(){let m;return o||(o=[]),Array.isArray(o)||(o=[o]),m=D?M(D,o,u):T(),this.signAndSendTransaction({receiverId:this.accountId,actions:[v(E.PublicKey.from(Q),m)]})})}deleteKey(Q){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[O(E.PublicKey.from(Q))]})})}stake(Q,D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[P(D,E.PublicKey.from(Q))]})})}signedDelegate({actions:Q,blockHeightTtl:D,receiverId:o}){return l(this,void 0,void 0,function*(){const{provider:u,signer:m}=this.connection,{header:w}=yield u.block({finality:"final"}),{accessKey:x,publicKey:F}=yield this.findAccessKey(null,null),G=(0,a.buildDelegateAction)({actions:Q,maxBlockHeight:new y.default(w.height).add(new y.default(D)),nonce:new y.default(x.nonce).add(new y.default(1)),publicKey:F,receiverId:o,senderId:this.accountId}),{signedDelegateAction:k}=yield(0,a.signDelegateAction)({delegateAction:G,signer:{sign:p=>l(this,void 0,void 0,function*(){const{signature:B}=yield m.signMessage(p,G.senderId,this.connection.networkId);return B})}});return k})}validateArgs(Q){if((void 0===Q.byteLength||Q.byteLength!==Q.length)&&(Array.isArray(Q)||"object"!=typeof Q))throw new h.PositionalArgsError}viewFunction({contractId:Q,methodName:D,args:o={},parse:u=J,stringify:m=Y,jsContract:w=!1,blockQuery:x={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let F;this.validateArgs(o),F=w?this.encodeJSContractArgs(Q,D,Object.keys(o).length>0?JSON.stringify(o):""):m(o);const G=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},x),{account_id:w?this.connection.jsvmAccountId:Q,method_name:w?"view_js_contract":D,args_base64:F.toString("base64")}));return G.logs&&(0,g.printTxOutcomeLogs)({contractId:Q,logs:G.logs}),G.result&&G.result.length>0&&u(Buffer.from(G.result))})}viewState(Q,D={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:o}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},D),{account_id:this.accountId,prefix_base64:Buffer.from(Q).toString("base64")}));return o.map(({key:u,value:m})=>({key:Buffer.from(u,"base64"),value:Buffer.from(m,"base64")}))})}getAccessKeys(){var Q;return l(this,void 0,void 0,function*(){const D=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(Q=D?.keys)||void 0===Q?void 0:Q.map(o=>Object.assign(Object.assign({},o),{access_key:Object.assign(Object.assign({},o.access_key),{nonce:new y.default(o.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(o=>"FullAccess"!==o.access_key.permission).map(o=>{const u=o.access_key.permission;return{contractId:u.FunctionCall.receiver_id,amount:u.FunctionCall.allowance,publicKey:o.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const Q=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),D=yield this.state(),o=new y.default(Q.runtime_config.storage_amount_per_byte),u=new y.default(D.storage_usage).mul(o),m=new y.default(D.locked),w=new y.default(D.amount).add(m),x=w.sub(y.default.max(m,u));return{total:w.toString(),stateStaked:u.toString(),staked:m.toString(),available:x.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const Q=yield this.connection.provider.block({finality:"final"}),D=Q.header.hash,o=Q.header.epoch_id,{current_validators:u,next_validators:m,current_proposals:w}=yield this.connection.provider.validators(o),x=new Set;[...u,...m,...w].forEach(ie=>x.add(ie.account_id));const F=[...x],G=F.map(ie=>this.viewFunction({contractId:ie,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:D}})),k=yield Promise.allSettled(G);if(k.some(ie=>"rejected"===ie.status&&"TimeoutError"===ie.reason.type))throw new Error("Failed to get delegated stake balance");const B=k.reduce((ie,te,ee)=>{const ue=F[ee];if("fulfilled"===te.status){const we=new y.default(te.value);if(!we.isZero())return Object.assign(Object.assign({},ie),{stakedValidators:[...ie.stakedValidators,{validatorId:ue,amount:we.toString()}],total:ie.total.add(we)})}return"rejected"===te.status?Object.assign(Object.assign({},ie),{failedValidators:[...ie.failedValidators,{validatorId:ue,error:te.reason}]}):ie},{stakedValidators:[],failedValidators:[],total:new y.default(0)});return Object.assign(Object.assign({},B),{total:B.total.toString()})})}}r.Account=Z},96629:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(H,V,J,Y){return new(J||(J=Promise))(function(W,Q){function D(m){try{u(Y.next(m))}catch(w){Q(w)}}function o(m){try{u(Y.throw(m))}catch(w){Q(w)}}function u(m){m.done?W(m.value):function Z(W){return W instanceof J?W:new J(function(Q){Q(W)})}(m.value).then(D,o)}u((Y=Y.apply(H,V||[])).next())})},_=this&&this.__importDefault||function(H){return H&&H.__esModule?H:{default:H}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account2FA=void 0;const E=d(79189),S=d(17527),a=d(1656),h=d(60898),g=d(13162),y=_(d(98538)),v=d(34763),b=d(96280),A=d(10757),{addKey:O,deleteKey:C,deployContract:T,fullAccessKey:N,functionCall:M,functionCallAccessKey:P}=h.actionCreators;class R extends v.AccountMultisig{constructor(V,J,Y){super(V,J,Y),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=Y.helperUrl||this.helperUrl,this.storage=Y.storage,this.sendCode=Y.sendCode||this.sendCodeDefault,this.getCode=Y.getCode||this.getCodeDefault,this.verifyCode=Y.verifyCode||this.verifyCodeDefault,this.onConfirmResult=Y.onConfirmResult}signAndSendTransaction({receiverId:V,actions:J}){const Y=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield Y.signAndSendTransaction.call(this,{receiverId:V,actions:J}),yield this.sendCode();const Z=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(Z)),Z})}deployMultisig(V){const J=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:Y}=this,Z=(yield this.getRecoveryMethods()).data.filter(({kind:w,publicKey:x})=>("phrase"===w||"ledger"===w)&&null!==x).map(w=>w.publicKey),W=(yield this.getAccessKeys()).filter(({public_key:w,access_key:{permission:x}})=>"FullAccess"===x&&!Z.includes(w)).map(w=>w.public_key).map(L),Q=L((yield this.postSignedJson("/2fa/getAccessKey",{accountId:Y})).publicKey),D=Buffer.from(JSON.stringify({num_confirmations:2})),o=[...W.map(w=>C(w)),...W.map(w=>O(w,P(Y,b.MULTISIG_CHANGE_METHODS,null))),O(Q,P(Y,b.MULTISIG_CONFIRM_METHODS,null)),T(V)],u=o.concat(M("new",D,b.MULTISIG_GAS,b.MULTISIG_DEPOSIT));g.Logger.log("deploying multisig contract for",Y);const{stateStatus:m}=yield this.checkMultisigCodeAndStateStatus(V);switch(m){case A.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield J.signAndSendTransactionWithAccount.call(this,Y,u);case A.MultisigStateStatus.VALID_STATE:return yield J.signAndSendTransactionWithAccount.call(this,Y,o);case A.MultisigStateStatus.INVALID_STATE:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:V,cleanupContractBytes:J}){return l(this,void 0,void 0,function*(){let Y=[];J&&(yield this.deleteAllRequests().catch(D=>D),Y=yield this.get2faDisableCleanupActions(J));const Z=yield this.get2faDisableKeyConversionActions(),W=[...Y,...Z,T(V)],Q=yield this.findAccessKey(this.accountId,W);if(Q&&Q.accessKey&&"FullAccess"!==Q.accessKey.permission)throw new S.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,W)})}get2faDisableCleanupActions(V){return l(this,void 0,void 0,function*(){const J=yield this.viewState("").catch(Z=>{const W=Z.cause&&Z.cause.name;if("NO_CONTRACT_CODE"==W)return[];throw"TOO_LARGE_CONTRACT_STATE"==W?new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):Z}),Y=J.map(({key:Z})=>Z.toString("base64"));return J.length?[T(V),M("clean",{keys:Y},b.MULTISIG_GAS,new y.default("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:V}=this,Y=(yield this.getAccessKeys()).filter(({access_key:W})=>"FullAccess"!==W.permission).filter(({access_key:W})=>{const Q=W.permission.FunctionCall;return Q.receiver_id===V&&4===Q.method_names.length&&Q.method_names.includes("add_request_and_confirm")}),Z=E.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:V})).publicKey);return[C(Z),...Y.map(({public_key:W})=>C(E.PublicKey.from(W))),...Y.map(({public_key:W})=>O(E.PublicKey.from(W),N()))]})}disable(V,J){return l(this,void 0,void 0,function*(){const{stateStatus:Y}=yield this.checkMultisigCodeAndStateStatus();if(Y!==A.MultisigStateStatus.VALID_STATE&&Y!==A.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let Z;yield this.deleteAllRequests().catch(D=>Z=D);const Q=[...yield this.get2faDisableCleanupActions(J).catch(D=>{throw"ContractHasExistingState"===D.type&&Z||D}),...yield this.get2faDisableKeyConversionActions(),T(V)];return g.Logger.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:Q})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:V}=this,{requestId:J}=this.getRequest(),Y=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:V,method:Y,requestId:J}),J})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const V=yield this.get2faMethod(),J=yield this.getCode(V);try{return yield this.verifyCode(J)}catch(Y){if(g.Logger.warn("Error validating security code:",Y),Y.toString().includes("invalid 2fa code provided")||Y.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw Y}})}verifyCodeDefault(V){return l(this,void 0,void 0,function*(){const{accountId:J}=this,Y=this.getRequest();if(!Y)throw new Error("no request pending");const{requestId:Z}=Y;return yield this.postSignedJson("/2fa/verify",{accountId:J,securityCode:V,requestId:Z})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:V}=this;return{accountId:V,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:V})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:V}=yield this.getRecoveryMethods();if(V&&V.length&&(V=V.find(Z=>0===Z.kind.indexOf("2fa-"))),!V)return null;const{kind:J,detail:Y}=V;return{kind:J,detail:Y}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:V}=this,Y=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),Z=yield this.connection.signer.signMessage(Buffer.from(Y),V,this.connection.networkId);return{blockNumber:Y,blockNumberSignature:Buffer.from(Z.signature).toString("base64")}})}postSignedJson(V,J){return l(this,void 0,void 0,function*(){return yield(0,a.fetchJson)(this.helperUrl+V,JSON.stringify(Object.assign(Object.assign({},J),yield this.signatureFor())))})}}r.Account2FA=R;const L=H=>E.PublicKey.from(H)},96891:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;const _=d(1656);class E{}r.AccountCreator=E;r.LocalAccountCreator=class S extends E{constructor(g,y){super(),this.masterAccount=g,this.initialBalance=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(g,y,this.initialBalance)})}};r.UrlAccountCreator=class a extends E{constructor(g,y){super(),this.connection=g,this.helperUrl=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield(0,_.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:g,newAccountPublicKey:y.toString()}))})}}},34763:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(T,N,M,P){return new(M||(M=Promise))(function(L,H){function V(Z){try{Y(P.next(Z))}catch(W){H(W)}}function J(Z){try{Y(P.throw(Z))}catch(W){H(W)}}function Y(Z){Z.done?L(Z.value):function R(L){return L instanceof M?L:new M(function(H){H(L)})}(Z.value).then(V,J)}Y((P=P.apply(T,N||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountMultisig=void 0;const _=d(60898),E=d(13162),S=d(56618),a=d(96280),h=d(10757),{deployContract:g,functionCall:y}=_.actionCreators;var v,T;(T=v||(v={}))[T.INVALID_CODE=0]="INVALID_CODE",T[T.VALID_CODE=1]="VALID_CODE",T[T.UNKNOWN_CODE=2]="UNKNOWN_CODE";const b={[a.MULTISIG_STORAGE_KEY]:null};class A extends S.Account{constructor(N,M,P){super(N,M),this.storage=P.storage,this.onAddRequestResult=P.onAddRequestResult}signAndSendTransactionWithAccount(N,M){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return P.signAndSendTransaction.call(this,{receiverId:N,actions:M})})}signAndSendTransaction({receiverId:N,actions:M}){const P=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:R}=this,L=Buffer.from(JSON.stringify({request:{receiver_id:N,actions:C(M,R,N)}}));let H;try{H=yield P.signAndSendTransaction.call(this,{receiverId:R,actions:[y("add_request_and_confirm",L,a.MULTISIG_GAS,a.MULTISIG_DEPOSIT)]})}catch(J){if(J.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:N,actions:M});throw J}if(!H.status)throw new Error("Request failed");const V=Object.assign({},H.status);if(!V.SuccessValue||"string"!=typeof V.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:R,actions:M,requestId:parseInt(Buffer.from(V.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(H)),this.deleteUnconfirmedRequests(),H})}checkMultisigCodeAndStateStatus(N){const M=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const R=N?v.UNKNOWN_CODE:v.VALID_CODE;try{return N?yield M.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g(N),y("delete_request",{request_id:4294967295},a.MULTISIG_GAS,a.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:v.VALID_CODE,stateStatus:h.MultisigStateStatus.VALID_STATE}}catch(L){if(new RegExp(h.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(L&&L.kind&&L.kind.ExecutionError))return{codeStatus:R,stateStatus:h.MultisigStateStatus.INVALID_STATE};if(new RegExp(h.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(L&&L.kind&&L.kind.ExecutionError))return{codeStatus:R,stateStatus:h.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(h.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(L&&L.kind&&L.kind.ExecutionError))return{codeStatus:R,stateStatus:h.MultisigStateStatus.VALID_STATE};if(new RegExp(h.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(L&&L.message))return{codeStatus:v.INVALID_CODE,stateStatus:h.MultisigStateStatus.UNKNOWN_STATE};throw L}})}deleteRequest(N){return super.signAndSendTransaction({receiverId:this.accountId,actions:[y("delete_request",{request_id:N},a.MULTISIG_GAS,a.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const N=yield this.getRequestIds();N.length&&(yield Promise.all(N.map(M=>this.deleteRequest(M))))})}deleteUnconfirmedRequests(){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const M=yield this.getRequestIds(),{requestId:P}=this.getRequest();for(const R of M)if(R!=P)try{yield N.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[y("delete_request",{request_id:R},a.MULTISIG_GAS,a.MULTISIG_DEPOSIT)]})}catch{E.Logger.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(a.MULTISIG_STORAGE_KEY)||"{}"):b[a.MULTISIG_STORAGE_KEY]}setRequest(N){if(this.storage)return this.storage.setItem(a.MULTISIG_STORAGE_KEY,JSON.stringify(N));b[a.MULTISIG_STORAGE_KEY]=N}}r.AccountMultisig=A;const O=T=>T.toString().replace("ed25519:",""),C=(T,N,M)=>T.map(P=>{const R=P.enum,{gas:L,publicKey:H,methodName:V,args:J,deposit:Y,accessKey:Z,code:W}=P[R],Q={type:R[0].toUpperCase()+R.substr(1),gas:L&&L.toString()||void 0,public_key:H&&O(H)||void 0,method_name:V,args:J&&Buffer.from(J).toString("base64")||void 0,code:W&&Buffer.from(W).toString("base64")||void 0,amount:Y&&Y.toString()||void 0,deposit:Y&&Y.toString()||"0",permission:void 0};if(Z&&(M===N&&"fullAccess"!==Z.permission.enum&&(Q.permission={receiver_id:N,allowance:a.MULTISIG_ALLOWANCE.toString(),method_names:a.MULTISIG_CHANGE_METHODS}),"functionCall"===Z.permission.enum)){const{receiverId:D,methodNames:o,allowance:u}=Z.permission.functionCall;Q.permission={receiver_id:D,allowance:u&&u.toString()||void 0,method_names:o}}return Q})},14533:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;const l=d(76999),_=d(1656);class a{constructor(g,y,v,b){this.networkId=g,this.provider=y,this.signer=v,this.jsvmAccountId=b}static fromConfig(g){const y=function E(h){switch(h.type){case void 0:return h;case"JsonRpcProvider":return new _.JsonRpcProvider(Object.assign({},h.args));default:throw new Error(`Unknown provider type ${h.type}`)}}(g.provider),v=function S(h){switch(h.type){case void 0:return h;case"InMemorySigner":return new l.InMemorySigner(h.keyStore);default:throw new Error(`Unknown signer type ${h.type}`)}}(g.signer);return new a(g.networkId,y,v,g.jsvmAccountId)}}r.Connection=a},96280:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(r,"__esModule",{value:!0}),r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=void 0;const _=d(13162),E=l(d(98538));r.MULTISIG_STORAGE_KEY="__multisigRequest",r.MULTISIG_ALLOWANCE=new E.default((0,_.parseNearAmount)("1")),r.MULTISIG_GAS=new E.default("100000000000000"),r.MULTISIG_DEPOSIT=new E.default("0"),r.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],r.MULTISIG_CONFIRM_METHODS=["confirm"]},21257:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(L,H,V,J){return new(V||(V=Promise))(function(Z,W){function Q(u){try{o(J.next(u))}catch(m){W(m)}}function D(u){try{o(J.throw(u))}catch(m){W(m)}}function o(u){u.done?Z(u.value):function Y(Z){return Z instanceof V?Z:new V(function(W){W(Z)})}(u.value).then(Q,D)}o((J=J.apply(L,H||[])).next())})},_=this&&this.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;const E=d(13162),S=d(17527),a=d(95089),h=_(d(87258)),g=_(d(26474)),y=_(d(98538)),v=_(d(89176)),b=d(84778),A=d(89706);function O(L,H){return{[L]:(...V)=>H(...V)}[L]}function C(L,H,V,J){var Y;if(!M(L))return;if(H.params&&H.params.serialization_type!==b.AbiSerializationType.Json)throw new A.UnsupportedSerializationError(H.name,H.params.serialization_type);if(H.result&&H.result.serialization_type!==b.AbiSerializationType.Json)throw new A.UnsupportedSerializationError(H.name,H.result.serialization_type);const Z=(null===(Y=H.params)||void 0===Y?void 0:Y.args)||[];for(const W of Z){const Q=L[W.name],D=W.type_schema;D.definitions=J.body.root_schema.definitions;const o=V.compile(D);if(!o(Q))throw new A.ArgumentSchemaError(W.name,o.errors)}for(const W of Object.keys(L))if(!Z.find(D=>D.name===W))throw new A.UnknownArgumentError(W,Z.map(D=>D.name))}const N=L=>L&&void 0!==L.byteLength&&L.byteLength===L.length,M=L=>"[object Object]"===Object.prototype.toString.call(L);r.Contract=class P{constructor(H,V,J){this.account=H,this.contractId=V,this.lve=new a.LocalViewExecution(H);const{viewMethods:Y=[],changeMethods:Z=[],abi:W,useLocalViewExecution:Q}=J;let D=Y.map(m=>({name:m,abi:null})),o=Z.map(m=>({name:m,abi:null}));if(W){if(D.length>0||o.length>0)throw new A.ConflictingOptions;D=W.body.functions.filter(m=>m.kind===b.AbiFunctionKind.View).map(m=>({name:m.name,abi:m})),o=W.body.functions.filter(m=>m.kind===b.AbiFunctionKind.Call).map(m=>({name:m.name,abi:m}))}const u=function T(){const L=new h.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,g.default)(L),L}();D.forEach(({name:m,abi:w})=>{Object.defineProperty(this,m,{writable:!1,enumerable:!0,value:O(m,(x={},F={},...G)=>l(this,void 0,void 0,function*(){if(G.length||!M(x)&&!N(x)||!M(F))throw new S.PositionalArgsError;if(w&&C(x,w,u,W),Q)try{return yield this.lve.viewFunction(Object.assign({contractId:this.contractId,methodName:m,args:x},F))}catch(k){E.Logger.warn(`Local view execution failed with: "${k.message}"`),E.Logger.warn("Fallback to normal RPC call")}return this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:m,args:x},F))}))})}),o.forEach(({name:m,abi:w})=>{Object.defineProperty(this,m,{writable:!1,enumerable:!0,value:O(m,(...x)=>l(this,void 0,void 0,function*(){if(x.length&&(x.length>3||!M(x[0])&&!N(x[0])))throw new S.PositionalArgsError;return(x.length>1||!(x[0]&&x[0].args))&&((0,v.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),x[0]={args:x[0],gas:x[1],amount:x[2]}),w&&C(x[0].args,w,u,W),this._changeMethod(Object.assign({methodName:m},x[0]))}))})})}_changeMethod({args:H,methodName:V,gas:J,amount:Y,meta:Z,callbackUrl:W}){return l(this,void 0,void 0,function*(){!function R(L){const H="number, decimal string or BN";for(const V of Object.keys(L)){const J=L[V];if(J&&!y.default.isBN(J)&&isNaN(J))throw new S.ArgumentTypeError(V,H,J)}}({gas:J,amount:Y});const Q=yield this.account.functionCall({contractId:this.contractId,methodName:V,args:H,gas:J,attachedDeposit:Y,walletMeta:Z,walletCallbackUrl:W});return(0,E.getTransactionLastResult)(Q)})}}},89706:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConflictingOptions=r.ArgumentSchemaError=r.UnknownArgumentError=r.UnsupportedSerializationError=void 0;class d extends Error{constructor(a,h){super(`Contract method '${a}' is using an unsupported serialization type ${h}`)}}r.UnsupportedSerializationError=d;class l extends Error{constructor(a,h){super(`Unrecognized argument '${a}', expected '${JSON.stringify(h)}'`)}}r.UnknownArgumentError=l;class _ extends Error{constructor(a,h){super(`Argument '${a}' does not conform to the specified ABI schema: '${JSON.stringify(h)}'`)}}r.ArgumentSchemaError=_;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}r.ConflictingOptions=E},33052:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=r.Contract=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.Connection=r.AccountMultisig=r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=r.Account2FA=r.Account=void 0;var l=d(56618);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}});var _=d(96629);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return _.Account2FA}});var E=d(96891);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var S=d(34763);Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return S.AccountMultisig}});var a=d(14533);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return a.Connection}});var h=d(96280);Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}});var g=d(21257);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return g.Contract}});var y=d(89706);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return y.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return y.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return y.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return y.UnsupportedSerializationError}});var v=d(10757);Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return v.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return v.MultisigStateStatus}})},95089:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(g,y,v,b){return new(v||(v=Promise))(function(O,C){function T(P){try{M(b.next(P))}catch(R){C(R)}}function N(P){try{M(b.throw(P))}catch(R){C(R)}}function M(P){P.done?O(P.value):function A(O){return O instanceof v?O:new v(function(C){C(O)})}(P.value).then(T,N)}M((b=b.apply(g,y||[])).next())})},_=this&&this.__rest||function(g,y){var v={};for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&y.indexOf(b)<0&&(v[b]=g[b]);if(null!=g&&"function"==typeof Object.getOwnPropertySymbols){var A=0;for(b=Object.getOwnPropertySymbols(g);A()=>{throw new Error("method not implemented: "+g)},a=g=>()=>{throw new Error("method not available for view calls: "+g)};r.Runtime=class h{constructor(y){var{contractCode:v}=y,b=_(y,["contractCode"]);this.context=b,this.wasm=this.prepareWASM(Buffer.from(v,"base64")),this.memory=new WebAssembly.Memory({initial:1024,maximum:2048}),this.registers={},this.logs=[],this.result=Buffer.from([])}readUTF16CStr(y){const v=[],b=new Uint16Array(this.memory.buffer);let A=Number(y)/2;for(;0!=b[A];)v.push(b[A]),A++;return Buffer.from(Uint16Array.from(v).buffer).toString("ucs2")}readUTF8CStr(y,v){const b=[],A=new Uint8Array(this.memory.buffer);let O=Number(v);for(let C=0;C0===Buffer.compare(O.key,b)).map(O=>O.value);return 0===A.length?null:A.length>1?A:A[0]}prepareWASM(y){const v=[];if("\0asm"!==y.subarray(0,4).toString("utf8"))throw new Error("Invalid magic number");const A=y.readUInt32LE(4);if(1!=A)throw new Error("Invalid version: "+A);let O=8;function C(){let H,R=0,L=0;do{H=y[O++],R|=(127&H)<>=7)&&(H|=128),L.push(H)}while(0!==R);return Buffer.from(L)}function P(R){const L=Buffer.from(R,"utf8");return Buffer.concat([M(L.length),L])}v.push(y.subarray(0,O));do{const R=O,L=y.readUInt8(O);O++;const H=C(),V=O+H;if(5==L)v.push(Buffer.from([5,1,0]));else if(2==L){const J=[],Y=C();for(let Q=0;Qthis.panic("explicit guest panic"),panic_utf8:(y,v)=>this.panic(this.readUTF8CStr(y,v)),epoch_height:S("epoch_height"),storage_usage:S("storage_usage"),account_balance:S("account_balance"),account_locked_balance:S("account_locked_balance"),random_seed:S("random_seed"),ripemd160:S("ripemd160"),keccak256:S("keccak256"),keccak512:S("keccak512"),ecrecover:S("ecrecover"),validator_stake:S("validator_stake"),validator_total_stake:S("validator_total_stake"),write_register:a("write_register"),signer_account_id:a("signer_account_id"),signer_account_pk:a("signer_account_pk"),predecessor_account_id:a("predecessor_account_id"),attached_deposit:a("attached_deposit"),prepaid_gas:a("prepaid_gas"),used_gas:a("used_gas"),promise_create:a("promise_create"),promise_then:a("promise_then"),promise_and:a("promise_and"),promise_batch_create:a("promise_batch_create"),promise_batch_then:a("promise_batch_then"),promise_batch_action_create_account:a("promise_batch_action_create_account"),promise_batch_action_deploy_contract:a("promise_batch_action_deploy_contract"),promise_batch_action_function_call:a("promise_batch_action_function_call"),promise_batch_action_function_call_weight:a("promise_batch_action_function_call_weight"),promise_batch_action_transfer:a("promise_batch_action_transfer"),promise_batch_action_stake:a("promise_batch_action_stake"),promise_batch_action_add_key_with_full_access:a("promise_batch_action_add_key_with_full_access"),promise_batch_action_add_key_with_function_call:a("promise_batch_action_add_key_with_function_call"),promise_batch_action_delete_key:a("promise_batch_action_delete_key"),promise_batch_action_delete_account:a("promise_batch_action_delete_account"),promise_results_count:a("promise_results_count"),promise_result:a("promise_result"),promise_return:a("promise_return"),storage_write:a("storage_write"),storage_remove:a("storage_remove")}}execute(y){return l(this,void 0,void 0,function*(){const v=yield WebAssembly.compile(this.wasm),A=(yield WebAssembly.instantiate(v,{env:Object.assign(Object.assign({},this.getHostImports()),{memory:this.memory})})).exports[y];if(null==A)throw new Error(`Contract method '${y}' does not exists in contract ${this.context.contractId} for block id ${this.context.blockHeight}`);return A(),{result:this.result,logs:this.logs}})}}},21345:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Storage=void 0;const l=d(54689);class _{constructor(S={max:_.MAX_ELEMENTS}){this.cache=new l.LRUMap(S.max),this.blockHeights=new Map}load(S){if(!("blockId"in S))return;let h=S.blockId;return 44==h.toString().length&&(h=this.blockHeights.get(h.toString())),this.cache.get(h)}save(S,{blockHeight:a,blockTimestamp:h,contractCode:g,contractState:y}){this.blockHeights.set(S,a),this.cache.set(a,{blockHeight:a,blockTimestamp:h,contractCode:g,contractState:y})}}r.Storage=_,_.MAX_ELEMENTS=100},10757:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=void 0,(_=r.MultisigDeleteRequestRejectionError||(r.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",_.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",_.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",_.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",_.METHOD_NOT_FOUND="Contract method is not found",function(_){_[_.INVALID_STATE=0]="INVALID_STATE",_[_.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",_[_.VALID_STATE=2]="VALID_STATE",_[_.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(r.MultisigStateStatus||(r.MultisigStateStatus={}))},29167:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.KeySize=r.KeyType=void 0,(_=r.KeyType||(r.KeyType={}))[_.ED25519=0]="ED25519",function(_){_[_.SECRET_KEY=32]="SECRET_KEY"}(r.KeySize||(r.KeySize={}))},79189:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyPairEd25519=r.KeyPair=r.KeyType=void 0;var l=d(29167);Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var _=d(94785);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}});var E=d(21866);Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var S=d(39941);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return S.PublicKey}})},94785:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPair=void 0;const l=d(31116),_=d(21866);class E extends l.KeyPairBase{static fromRandom(a){if("ED25519"===a.toUpperCase())return _.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${a}`)}static fromString(a){const h=a.split(":");if(1===h.length)return new _.KeyPairEd25519(h[0]);if(2===h.length){if("ED25519"===h[0].toUpperCase())return new _.KeyPairEd25519(h[1]);throw new Error(`Unknown curve: ${h[0]}`)}throw new Error("Invalid encoded key format, must be :")}}r.KeyPair=E},31116:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairBase=void 0;r.KeyPairBase=class d{}},21866:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairEd25519=void 0;const _=d(13162),E=d(35434),S=l(d(53753)),a=d(29167),h=d(31116),g=d(39941);class y extends h.KeyPairBase{constructor(b){super();const A=(0,_.baseDecode)(b),O=new Uint8Array(A.slice(0,a.KeySize.SECRET_KEY)),C=E.ed25519.getPublicKey(O);this.publicKey=new g.PublicKey({keyType:a.KeyType.ED25519,data:C}),this.secretKey=(0,_.baseEncode)(O),this.extendedSecretKey=b}static fromRandom(){const b=(0,S.default)(a.KeySize.SECRET_KEY),A=E.ed25519.getPublicKey(b),O=new Uint8Array([...b,...A]);return new y((0,_.baseEncode)(O))}sign(b){return{signature:E.ed25519.sign(b,(0,_.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(b,A){return this.publicKey.verify(b,A)}toString(){return`ed25519:${this.extendedSecretKey}`}getPublicKey(){return this.publicKey}}r.KeyPairEd25519=y},39941:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=void 0;const l=d(17527),_=d(13162),E=d(35434),S=d(29167);class g extends l.Assignable{static from(v){return"string"==typeof v?g.fromString(v):v}static fromString(v){const b=v.split(":");let A,O=S.KeyType.ED25519;if(1===b.length)A=b[0];else{if(2!==b.length)throw new Error("Invalid encoded key format, must be :");A=b[1],O=function h(y){if("ed25519"===y.toLowerCase())return S.KeyType.ED25519;throw new Error(`Unknown key type ${y}`)}(b[0])}const C=(0,_.baseDecode)(A);if(C.length!==S.KeySize.SECRET_KEY)throw new Error(`Invalid public key size (${C.length}), must be ${S.KeySize.SECRET_KEY}`);return new g({keyType:O,data:C})}toString(){return`${function a(y){if(y===S.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${y}`)}(this.keyType)}:${(0,_.baseEncode)(this.data)}`}verify(v,b){if(this.keyType===S.KeyType.ED25519)return E.ed25519.verify(b,v,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}r.PublicKey=g},30114:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;const _=d(79189),E=d(82081);class a extends E.KeyStore{constructor(g=window.localStorage,y="near-api-js:keystore:"){super(),this.localStorage=g,this.prefix=y}setKey(g,y,v){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(g,y),v.toString())})}getKey(g,y){return l(this,void 0,void 0,function*(){const v=this.localStorage.getItem(this.storageKeyForSecretKey(g,y));return v?_.KeyPair.fromString(v):null})}removeKey(g,y){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(g,y))})}clear(){return l(this,void 0,void 0,function*(){for(const g of this.storageKeys())g.startsWith(this.prefix)&&this.localStorage.removeItem(g)})}getNetworks(){return l(this,void 0,void 0,function*(){const g=new Set;for(const y of this.storageKeys())if(y.startsWith(this.prefix)){const v=y.substring(this.prefix.length).split(":");g.add(v[1])}return Array.from(g.values())})}getAccounts(g){return l(this,void 0,void 0,function*(){const y=new Array;for(const v of this.storageKeys())if(v.startsWith(this.prefix)){const b=v.substring(this.prefix.length).split(":");b[1]===g&&y.push(b[0])}return y})}storageKeyForSecretKey(g,y){return`${this.prefix}${y}:${g}`}*storageKeys(){for(let g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(30114);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},785:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(a,h,g,y){return new(g||(g=Promise))(function(b,A){function O(N){try{T(y.next(N))}catch(M){A(M)}}function C(N){try{T(y.throw(N))}catch(M){A(M)}}function T(N){N.done?b(N.value):function v(b){return b instanceof g?b:new g(function(A){A(b)})}(N.value).then(O,C)}T((y=y.apply(a,h||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;const _=d(79189),E=d(2655);class S extends E.KeyStore{constructor(){super(),this.keys={}}setKey(h,g,y){return l(this,void 0,void 0,function*(){this.keys[`${g}:${h}`]=y.toString()})}getKey(h,g){return l(this,void 0,void 0,function*(){const y=this.keys[`${g}:${h}`];return y?_.KeyPair.fromString(y):null})}removeKey(h,g){return l(this,void 0,void 0,function*(){delete this.keys[`${g}:${h}`]})}clear(){return l(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return l(this,void 0,void 0,function*(){const h=new Set;return Object.keys(this.keys).forEach(g=>{const y=g.split(":");h.add(y[1])}),Array.from(h.values())})}getAccounts(h){return l(this,void 0,void 0,function*(){const g=new Array;return Object.keys(this.keys).forEach(y=>{const v=y.split(":");v[v.length-1]===h&&g.push(v.slice(0,v.length-1).join(":"))}),g})}toString(){return"InMemoryKeyStore"}}r.InMemoryKeyStore=S},82081:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.KeyStore=r.InMemoryKeyStore=void 0;var l=d(785);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}});var _=d(2655);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return _.KeyStore}});var E=d(43829);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},2655:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;r.KeyStore=class d{}},43829:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;const _=d(2655);class E extends _.KeyStore{constructor(a,h={writeKeyStoreIndex:0}){super(),this.options=h,this.keyStores=a}setKey(a,h,g){return l(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(a,h,g)})}getKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores){const y=yield g.getKey(a,h);if(y)return y}return null})}removeKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores)yield g.removeKey(a,h)})}clear(){return l(this,void 0,void 0,function*(){for(const a of this.keyStores)yield a.clear()})}getNetworks(){return l(this,void 0,void 0,function*(){const a=new Set;for(const h of this.keyStores)for(const g of yield h.getNetworks())a.add(g);return Array.from(a)})}getAccounts(a){return l(this,void 0,void 0,function*(){const h=new Set;for(const g of this.keyStores)for(const y of yield g.getAccounts(a))h.add(y);return Array.from(h)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}r.MergeKeyStore=E},20012:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(g,y,v,b){return new(v||(v=Promise))(function(O,C){function T(P){try{M(b.next(P))}catch(R){C(R)}}function N(P){try{M(b.throw(P))}catch(R){C(R)}}function M(P){P.done?O(P.value):function A(O){return O instanceof v?O:new v(function(C){C(O)})}(P.value).then(T,N)}M((b=b.apply(g,y||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemorySigner=void 0;const _=d(79189),E=d(82081),S=d(78527),a=d(83738);class h extends a.Signer{constructor(y){super(),this.keyStore=y}static fromKeyPair(y,v,b){return l(this,void 0,void 0,function*(){const A=new E.InMemoryKeyStore;return yield A.setKey(y,v,b),new h(A)})}createKey(y,v){return l(this,void 0,void 0,function*(){const b=_.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(v,y,b),b.getPublicKey()})}getPublicKey(y,v){return l(this,void 0,void 0,function*(){const b=yield this.keyStore.getKey(v,y);return null===b?null:b.getPublicKey()})}signMessage(y,v,b){return l(this,void 0,void 0,function*(){const A=new Uint8Array((0,S.sha256)(y));if(!v)throw new Error("InMemorySigner requires provided account id");const O=yield this.keyStore.getKey(b,v);if(null===O)throw new Error(`Key for ${v} not found in ${b}`);return O.sign(A)})}toString(){return`InMemorySigner(${this.keyStore})`}}r.InMemorySigner=h},76999:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(20012);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var _=d(83738);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return _.Signer}})},83738:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=void 0;r.Signer=class d{}},27371:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(r,"__esModule",{value:!0}),r.actionCreators=r.stringifyJsonOrBytes=void 0;const _=l(d(98538)),E=d(30681);function y(M){return void 0!==M.byteLength&&M.byteLength===M.length?M:Buffer.from(JSON.stringify(M))}r.stringifyJsonOrBytes=y,r.actionCreators={addKey:function O(M,P){return new E.Action({addKey:new E.AddKey({publicKey:M,accessKey:P})})},createAccount:function h(){return new E.Action({createAccount:new E.CreateAccount({})})},deleteAccount:function T(M){return new E.Action({deleteAccount:new E.DeleteAccount({beneficiaryId:M})})},deleteKey:function C(M){return new E.Action({deleteKey:new E.DeleteKey({publicKey:M})})},deployContract:function g(M){return new E.Action({deployContract:new E.DeployContract({code:M})})},fullAccessKey:function S(){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({fullAccess:new E.FullAccessPermission({})})})},functionCall:function v(M,P,R=new _.default(0),L=new _.default(0),H=y,V=!1){return V?new E.Action({functionCall:new E.FunctionCall({methodName:M,args:P,gas:R,deposit:L})}):new E.Action({functionCall:new E.FunctionCall({methodName:M,args:H(P),gas:R,deposit:L})})},functionCallAccessKey:function a(M,P,R){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({functionCall:new E.FunctionCallPermission({receiverId:M,allowance:R,methodNames:P})})})},signedDelegate:function N({delegateAction:M,signature:P}){return new E.Action({signedDelegate:new E.SignedDelegate({delegateAction:M,signature:P})})},stake:function A(M=new _.default(0),P){return new E.Action({stake:new E.Stake({stake:M,publicKey:P})})},transfer:function b(M=new _.default(0)){return new E.Action({transfer:new E.Transfer({deposit:M})})}}},30681:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Action=r.SignedDelegate=r.DeleteAccount=r.DeleteKey=r.AddKey=r.Stake=r.Transfer=r.FunctionCall=r.DeployContract=r.CreateAccount=r.IAction=r.AccessKey=r.AccessKeyPermission=r.FullAccessPermission=r.FunctionCallPermission=void 0;const l=d(17527);class _{constructor(L){if(1!==Object.keys(L).length)throw new Error("Enum can only take single value");Object.keys(L).map(H=>{this[H]=L[H],this.enum=H})}}class E extends l.Assignable{}r.FunctionCallPermission=E;class S extends l.Assignable{}r.FullAccessPermission=S;r.AccessKeyPermission=class a extends _{};class h extends l.Assignable{}r.AccessKey=h;class g extends l.Assignable{}r.IAction=g;r.CreateAccount=class y extends g{};r.DeployContract=class v extends g{};r.FunctionCall=class b extends g{};r.Transfer=class A extends g{};r.Stake=class O extends g{};r.AddKey=class C extends g{};r.DeleteKey=class T extends g{};r.DeleteAccount=class N extends g{};r.SignedDelegate=class M extends g{};r.Action=class P extends _{}},51753:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0}),r.createTransaction=void 0;const _=l(d(98538)),E=d(538);r.createTransaction=function S(a,h,g,y,v,b){return new E.Transaction({signerId:a,publicKey:h,nonce:new _.default(y),receiverId:g,actions:v,blockHash:b})}},36574:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.buildDelegateAction=r.DelegateAction=void 0;const l=d(17527),_=d(27371),{addKey:E,createAccount:S,deleteAccount:a,deleteKey:h,deployContract:g,functionCall:y,stake:v,transfer:b}=_.actionCreators;class A extends l.Assignable{}r.DelegateAction=A,r.buildDelegateAction=function O({actions:C,maxBlockHeight:T,nonce:N,publicKey:M,receiverId:P,senderId:R}){return new A({senderId:R,receiverId:P,actions:C.map(L=>{if(!L.type&&!L.params)return L;switch(L.type){case"AddKey":{const{publicKey:H,accessKey:V}=L.params;return E(H,V)}case"CreateAccount":return S(L.params.createAccount);case"DeleteAccount":return a(L.params.deleteAccount);case"DeleteKey":return h(L.params.publicKey);case"DeployContract":return g(L.params.code);case"FunctionCall":{const{methodName:H,args:V,gas:J,deposit:Y}=L.params;return y(H,V,J,Y)}case"Stake":return v(L.params.stake,L.params.publicKey);case"Transfer":{const{deposit:H}=L.params;return b(H)}}throw new Error("Unrecognized action")}),nonce:N,maxBlockHeight:T,publicKey:M})}},60898:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(27371),r),_(d(30681),r),_(d(51753),r),_(d(36574),r),_(d(538),r),_(d(46411),r),_(d(11700),r)},10437:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DelegateActionPrefix=void 0;const l=d(17527),_=Math.pow(2,30),E_MetaTransactions=366;class S extends l.Assignable{}class a extends S{constructor(y){super({prefix:_+y})}}r.DelegateActionPrefix=class h extends a{constructor(){super(E_MetaTransactions)}}},538:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SCHEMA=r.SignedTransaction=r.Transaction=r.decodeSignedTransaction=r.decodeTransaction=r.encodeTransaction=r.encodeSignedDelegate=r.encodeDelegateAction=void 0;const l=d(17527),_=d(3576),E=d(10437);function h(A){const O=A instanceof b?r.SCHEMA.SignedTransaction:r.SCHEMA.Transaction;return(0,_.serialize)(O,A)}function g(A){return new v((0,_.deserialize)(r.SCHEMA.Transaction,A))}function y(A){return new b((0,_.deserialize)(r.SCHEMA.SignedTransaction,A))}r.encodeDelegateAction=function S(A){return new Uint8Array([...(0,_.serialize)(r.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,_.serialize)(r.SCHEMA.DelegateAction,A)])},r.encodeSignedDelegate=function a(A){return(0,_.serialize)(r.SCHEMA.SignedDelegate,A)},r.encodeTransaction=h,r.decodeTransaction=g,r.decodeSignedTransaction=y;class v extends l.Assignable{encode(){return h(this)}static decode(O){return g(O)}}r.Transaction=v;class b extends l.Assignable{encode(){return h(this)}static decode(O){return y(O)}}r.SignedTransaction=b,r.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",nonce:"u64",actions:{array:{type:this.ClassicActions}},maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},46411:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(b,A,O,C){return new(O||(O=Promise))(function(N,M){function P(H){try{L(C.next(H))}catch(V){M(V)}}function R(H){try{L(C.throw(H))}catch(V){M(V)}}function L(H){H.done?N(H.value):function T(N){return N instanceof O?N:new O(function(M){M(N)})}(H.value).then(P,R)}L((C=C.apply(b,A||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.signDelegateAction=r.signTransaction=void 0;const _=d(78527),E=d(30681),S=d(51753),a=d(538),h=d(11700);function g(b,A,O,C){return l(this,void 0,void 0,function*(){const T=(0,a.encodeTransaction)(b),N=new Uint8Array((0,_.sha256)(T)),M=yield A.signMessage(T,O,C);return[N,new a.SignedTransaction({transaction:b,signature:new h.Signature({keyType:b.publicKey.keyType,data:M.signature})})]})}r.signTransaction=function y(...b){return l(this,void 0,void 0,function*(){if(b[0].constructor===a.Transaction){const[A,O,C,T]=b;return g(A,O,C,T)}{const[A,O,C,T,N,M,P]=b,R=yield N.getPublicKey(M,P);return g((0,S.createTransaction)(M,R,A,O,C,T),N,M,P)}})},r.signDelegateAction=function v({delegateAction:b,signer:A}){return l(this,void 0,void 0,function*(){const O=(0,a.encodeDelegateAction)(b),C=yield A.sign(O),T=new E.SignedDelegate({delegateAction:b,signature:new h.Signature({keyType:b.publicKey.keyType,data:C})});return{hash:new Uint8Array((0,_.sha256)(O)),signedDelegateAction:T}})}},11700:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signature=void 0;const l=d(17527);class _ extends l.Assignable{}r.Signature=_},85014:(ne,r)=>{"use strict";r.__esModule=!0,r.DecodeBuffer=r.EncodeBuffer=void 0;var d=function(){function _(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return _.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},_.prototype.consume_value=function(E){var S=E.substring(1),a=parseInt(S)/8;this.assert_enough_buffer(a);var h="f"===E[0]?"getFloat".concat(S):"i"===E[0]?"getInt".concat(S):"getUint".concat(S),g=this.view[h](this.offset,!0);return this.offset+=a,g},_.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var S=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,S},_}();r.DecodeBuffer=l},91824:(ne,r,d)=>{"use strict";r.__esModule=!0,r.BorshDeserializer=void 0;var l=d(65727),_=d(85014),E=function(){function S(a){this.buffer=new _.DecodeBuffer(a)}return S.prototype.decode=function(a){return this.decode_value(a)},S.prototype.decode_value=function(a){if("string"==typeof a){if(l.integers.includes(a))return this.decode_integer(a);if("string"===a)return this.decode_string();if("bool"===a)return this.decode_boolean()}if("object"==typeof a){if("option"in a)return this.decode_option(a);if("enum"in a)return this.decode_enum(a);if("array"in a)return this.decode_array(a);if("set"in a)return this.decode_set(a);if("map"in a)return this.decode_map(a);if("struct"in a)return this.decode_struct(a)}throw new Error("Unsupported type: ".concat(a))},S.prototype.decode_integer=function(a){var h=parseInt(a.substring(1));return h<=32||"f64"==a?this.buffer.consume_value(a):this.decode_bigint(h,a.startsWith("i"))},S.prototype.decode_bigint=function(a,h){void 0===h&&(h=!1);var g=a/8,y=new Uint8Array(this.buffer.consume_bytes(g)),v=y.reduceRight(function(b,A){return b+A.toString(16).padStart(2,"0")},"");return h&&y[g-1]?BigInt.asIntN(a,BigInt("0x".concat(v))):BigInt("0x".concat(v))},S.prototype.decode_string=function(){var a=this.decode_integer("u32"),h=new Uint8Array(this.buffer.consume_bytes(a));return String.fromCharCode.apply(null,h)},S.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},S.prototype.decode_option=function(a){var h=this.buffer.consume_value("u8");if(1===h)return this.decode_value(a.option);if(0!==h)throw new Error("Invalid option ".concat(h));return null},S.prototype.decode_enum=function(a){var h,g=this.buffer.consume_value("u8");if(g>a.enum.length)throw new Error("Enum option ".concat(g," is not available"));var y=a.enum[g].struct,v=Object.keys(y)[0];return(h={})[v]=this.decode_value(y[v]),h},S.prototype.decode_array=function(a){for(var h=[],g=a.array.len?a.array.len:this.decode_integer("u32"),y=0;y>=BigInt(8);this.encoded.store_bytes(new Uint8Array(O))},y.prototype.encode_string=function(v){this.checkTypes&&h.expect_type(v,"string",this.fieldPath);var b=v;this.encoded.store_value(b.length,"u32");for(var A=0;A{"use strict";r.__esModule=!0,r.integers=void 0,r.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},17473:function(ne,r,d){"use strict";var M,l=this&&this.__extends||(M=function(P,R){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,H){L.__proto__=H}||function(L,H){for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(L[V]=H[V])})(P,R)},function(P,R){if("function"!=typeof R&&null!==R)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function L(){this.constructor=P}M(P,R),P.prototype=null===R?Object.create(R):(L.prototype=R.prototype,new L)});r.__esModule=!0,r.validate_schema=r.ErrorSchema=r.expect_enum=r.expect_same_size=r.expect_bigint=r.expect_type=r.isArrayLike=void 0;var _=d(65727);r.isArrayLike=function E(M){return Array.isArray(M)||!!M&&"object"==typeof M&&"length"in M&&"number"==typeof M.length&&(0===M.length||M.length>0&&M.length-1 in M)},r.expect_type=function S(M,P,R){if(typeof M!==P)throw new Error("Expected ".concat(P," not ").concat(typeof M,"(").concat(M,") at ").concat(R.join(".")))},r.expect_bigint=function a(M,P){if(!["number","string","bigint","boolean"].includes(typeof M)&&!("object"==typeof M&&null!==M&&"toString"in M))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))},r.expect_same_size=function h(M,P,R){if(M!==P)throw new Error("Array length ".concat(M," does not match schema length ").concat(P," at ").concat(R.join(".")))},r.expect_enum=function g(M,P){if("object"!=typeof M||null===M)throw new Error("Expected object not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))};var y=_.integers.concat(["bool","string"]),v=["option","enum","array","set","map","struct"],b=function(M){function P(R,L){var H="Invalid schema: ".concat(JSON.stringify(R)," expected ").concat(L);return M.call(this,H)||this}return l(P,M),P}(Error);function A(M){if("string"!=typeof M||!y.includes(M)){if(M&&"object"==typeof M){var P=Object.keys(M);if(1===P.length&&v.includes(P[0])){var R=P[0];if("option"===R)return A(M[R]);if("enum"===R)return function O(M){if(!Array.isArray(M))throw new b(M,"Array");for(var P=0,R=M;P{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=void 0;const l=d(97830);r.logWarning=function _(...E){const[S,...a]=E;l.Logger.warn(S,...a)}},62337:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseRpcError=r.parseResultError=r.getErrorTypeFromErrorMessage=r.formatError=r.ServerError=r.logWarning=void 0;var l=d(10525);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var _=d(66816);Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return _.ServerError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return _.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return _.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return _.parseResultError}}),Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return _.parseRpcError}})},66816:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(r,"__esModule",{value:!0}),r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=r.ServerError=void 0;const _=d(17527),E=l(d(7714)),S=d(56242),a=l(d(1242)),h=l(d(97219)),g={formatNear:()=>(P,R)=>(0,S.formatNearAmount)(R(P))};class y extends _.TypedError{}r.ServerError=y;class v extends y{}function b(P){const R={},L=C(P,h.default.schema,R,""),H=new y(O(L,R),L);return Object.assign(H,R),H}function O(P,R){return"string"==typeof a.default[P]?E.default.render(a.default[P],Object.assign(Object.assign({},R),g)):JSON.stringify(R)}function C(P,R,L,H){let V,J,Y;for(const Z in R){if(M(P[Z]))return P[Z];if(N(P[Z]))V=P[Z],J=R[Z],Y=Z;else{if(!N(P.kind)||!N(P.kind[Z]))continue;V=P.kind[Z],J=R[Z],Y=Z}}if(V&&J){for(const Z of Object.keys(J.props))L[Z]=V[Z];return C(V,R,L,Y)}return L.kind=P,H}function N(P){return"[object Object]"===Object.prototype.toString.call(P)}function M(P){return"[object String]"===Object.prototype.toString.call(P)}r.parseRpcError=b,r.parseResultError=function A(P){const R=b(P.status.Failure),L=new v;return Object.assign(L,R),L.type=R.type,L.message=R.message,L.transaction_outcome=P.transaction_outcome,L},r.formatError=O,r.getErrorTypeFromErrorMessage=function T(P,R){switch(!0){case/^account .*? does not exist while viewing$/.test(P):case/^Account .*? doesn't exist$/.test(P):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(P):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(P):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(P):return"InvalidNonce";default:return R}}},56242:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.baseDecode=r.baseEncode=r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION=r.NEAR_NOMINATION_EXP=void 0;const _=l(d(98538)),E=l(d(11545));r.NEAR_NOMINATION_EXP=24,r.NEAR_NOMINATION=new _.default("10",10).pow(new _.default(r.NEAR_NOMINATION_EXP,10));const S=[],a=new _.default(10);for(let T=0,N=new _.default(5);T0&&M.iadd(S[L])}const P=(T=M.toString()).substring(0,T.length-r.NEAR_NOMINATION_EXP)||"0",R=T.substring(T.length-r.NEAR_NOMINATION_EXP).padStart(r.NEAR_NOMINATION_EXP,"0").substring(0,N);return function v(T){return T.replace(/\.?0*$/,"")}(`${function A(T){const N=/(-?\d+)(\d{3})/;for(;N.test(T);)T=T.replace(N,"$1,$2");return T}(P)}.${R}`)},r.parseNearAmount=function g(T){if(!T)return null;const N=(T=function y(T){return T.replace(/,/g,"").trim()}(T)).split("."),M=N[0],P=N[1]||"";if(N.length>2||P.length>r.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${T}' as NEAR amount`);return function b(T){return T=T.replace(/^0+/,""),""===T?"0":T}(M+P.padEnd(r.NEAR_NOMINATION_EXP,"0"))},r.baseEncode=function O(T){if("string"==typeof T){const N=[];for(let M=0;M{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConsoleLogger=void 0;r.ConsoleLogger=class d{constructor(_){this.logLevels=_,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(_,E,...S){switch(_){case"error":case"fatal":return console.error(E,...S);case"warn":return console.warn(E,...S);case"log":return console.log(E,...S);case"debug":case"verbose":return console.debug(E,...S)}}verbose(_,...E){this.isLevelEnabled("verbose")&&this.print("verbose",_,...E)}debug(_,...E){this.isLevelEnabled("debug")&&this.print("debug",_,...E)}log(_,...E){this.isLevelEnabled("log")&&this.print("log",_,...E)}warn(_,...E){this.isLevelEnabled("warn")&&this.print("warn",_,...E)}error(_,...E){this.isLevelEnabled("error")&&this.print("error",_,...E)}fatal(_,...E){this.isLevelEnabled("fatal")&&this.print("fatal",_,...E)}}},97830:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;var l=d(41590);Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return l.Logger}})},41590:(ne,r,d)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;const _=d(61881),S="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new _.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class a{static error(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.error(g,...y)}static log(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.log(g,...y)}static warn(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.warn(g,...y)}static debug(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.debug)||void 0===b||b.call(v,g,...y)}static verbose(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.verbose)||void 0===b||b.call(v,g,...y)}static fatal(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.fatal)||void 0===b||b.call(v,g,...y)}}r.Logger=a,l=a,a.instanceRef=S,a.overrideLogger=h=>{l.instanceRef=h}},4398:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.printTxOutcomeLogs=r.printTxOutcomeLogsAndFailures=void 0;const l=d(62337),_=d(97830);function S({contractId:a,logs:h,prefix:g=""}){for(const y of h)_.Logger.log(`${g}Log [${a}]: ${y}`)}r.printTxOutcomeLogsAndFailures=function E({contractId:a,outcome:h}){const g=[h.transaction_outcome,...h.receipts_outcome].reduce((y,v)=>{const b="object"==typeof v.outcome.status&&"object"==typeof v.outcome.status.Failure;return v.outcome.logs.length||b?y.concat({receiptIds:v.outcome.receipt_ids,logs:v.outcome.logs,failure:"object"==typeof v.outcome.status&&void 0!==v.outcome.status.Failure?(0,l.parseRpcError)(v.outcome.status.Failure):null}):y},[]);for(const y of g)_.Logger.log(`Receipt${y.receiptIds.length>1?"s":""}: ${y.receiptIds.join(", ")}`),S({contractId:a,logs:y.logs,prefix:"\t"}),y.failure&&_.Logger.warn(`\tFailure [${a}]: ${y.failure}`)},r.printTxOutcomeLogs=S},4212:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getTransactionLastResult=void 0,r.getTransactionLastResult=function d(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const _=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(_)}catch{return _}}return null}},70989:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.diffEpochValidators=r.findSeatPrice=void 0;const _=l(d(98538)),E=l(d(89176));r.findSeatPrice=function S(y,v,b,A){return A&&A<49?function a(y,v){const b=y.map(N=>new _.default(N.stake,10)).sort((N,M)=>N.cmp(M)),A=new _.default(v),O=b.reduce((N,M)=>N.add(M));if(O.lt(A))throw new Error("Stakes are below seats");let C=new _.default(1),T=O.add(new _.default(1));for(;!C.eq(T.sub(new _.default(1)));){const N=C.add(T).div(new _.default(2));let M=!1,P=new _.default(0);for(let R=0;Rnew _.default(C.stake,10)).sort((C,T)=>C.cmp(T)),O=A.reduce((C,T)=>C.add(T));return y.lengthb.set(O.account_id,O));const A=new Set(v.map(O=>O.account_id));return{newValidators:v.filter(O=>!b.has(O.account_id)),removedValidators:y.filter(O=>!A.has(O.account_id)),changedValidators:v.filter(O=>b.has(O.account_id)&&b.get(O.account_id).stake!=O.stake).map(O=>({current:b.get(O.account_id),next:O}))}}},44802:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=void 0;var l=d(6516);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}});var _=d(34472);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return _.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return _.WalletConnection}})},6516:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})},_=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;const E=d(33052),S=_(d(98538));r.Near=class a{constructor(g){var y;if(this.config=g,this.connection=E.Connection.fromConfig({networkId:g.networkId,provider:{type:"JsonRpcProvider",args:{url:g.nodeUrl,headers:g.headers}},signer:g.signer||{type:"InMemorySigner",keyStore:g.keyStore||(null===(y=g.deps)||void 0===y?void 0:y.keyStore)},jsvmAccountId:g.jsvmAccountId||`jsvm.${g.networkId}`}),g.masterAccount){const v=g.initialBalance?new S.default(g.initialBalance):new S.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,g.masterAccount),v)}else g.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,g.helperUrl):this.accountCreator=null}account(g){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,g)})}createAccount(g,y){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(g,y),new E.Account(this.connection,g)})}}},34472:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(N,M,P,R){return new(P||(P=Promise))(function(H,V){function J(W){try{Z(R.next(W))}catch(Q){V(Q)}}function Y(W){try{Z(R.throw(W))}catch(Q){V(Q)}}function Z(W){W.done?H(W.value):function L(H){return H instanceof P?H:new P(function(V){V(H)})}(W.value).then(J,Y)}Z((R=R.apply(N,M||[])).next())})},_=this&&this.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectedWalletAccount=r.WalletConnection=void 0;const E=d(33052),S=d(79189),a=d(13162),h=d(60898),g=_(d(98538)),y=d(80067),O="pending_key";r.WalletConnection=class C{constructor(M,P){if("string"!=typeof P)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(H,V)=>"isSignedIn"===V?()=>!1:"getAccountId"===V?()=>"":H[V]&&"function"==typeof H[V]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:H[V]});this._near=M;const R=P+"_wallet_auth_key",L=JSON.parse(window.localStorage.getItem(R));this._networkId=M.config.networkId,this._walletBaseUrl=M.config.walletUrl,P=P||M.config.contractName||"default",this._keyStore=M.connection.signer.keyStore,this._authData=L||{allKeys:[]},this._authDataKey=R,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:M,methodNames:P,successUrl:R,failureUrl:L}){return l(this,void 0,void 0,function*(){const H=new URL(window.location.href),V=new URL(this._walletBaseUrl+"/login/");if(V.searchParams.set("success_url",R||H.href),V.searchParams.set("failure_url",L||H.href),M){yield(yield this._near.account(M)).state(),V.searchParams.set("contract_id",M);const Y=S.KeyPair.fromRandom("ed25519");V.searchParams.set("public_key",Y.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,O+Y.getPublicKey(),Y)}P&&P.forEach(J=>{V.searchParams.append("methodNames",J)}),window.location.assign(V.toString())})}requestSignTransactions({transactions:M,meta:P,callbackUrl:R}){return l(this,void 0,void 0,function*(){const L=new URL(window.location.href),H=new URL("sign",this._walletBaseUrl);H.searchParams.set("transactions",M.map(V=>(0,y.serialize)(h.SCHEMA.Transaction,V)).map(V=>Buffer.from(V).toString("base64")).join(",")),H.searchParams.set("callbackUrl",R||L.href),P&&H.searchParams.set("meta",P),window.location.assign(H.toString())})}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const M=new URL(window.location.href),P=M.searchParams.get("public_key")||"",R=(M.searchParams.get("all_keys")||"").split(","),L=M.searchParams.get("account_id")||"";if(L){const H={accountId:L,allKeys:R};window.localStorage.setItem(this._authDataKey,JSON.stringify(H)),P&&(yield this._moveKeyFromTempToPermanent(L,P)),this._authData=H}M.searchParams.delete("public_key"),M.searchParams.delete("all_keys"),M.searchParams.delete("account_id"),M.searchParams.delete("meta"),M.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,M.toString())})}_moveKeyFromTempToPermanent(M,P){return l(this,void 0,void 0,function*(){const R=yield this._keyStore.getKey(this._networkId,O+P);yield this._keyStore.setKey(this._networkId,M,R),yield this._keyStore.removeKey(this._networkId,O+P)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new T(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class T extends E.Account{constructor(M,P,R){super(P,R),this.walletConnection=M}signAndSendTransaction({receiverId:M,actions:P,walletMeta:R,walletCallbackUrl:L=window.location.href}){const H=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const V=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let J=yield this.accessKeyForTransaction(M,P,V);if(!J)throw new Error(`Cannot find matching key for transaction sent to ${M}`);if(V&&V.toString()===J.public_key)try{return yield H.signAndSendTransaction.call(this,{receiverId:M,actions:P})}catch(o){if("NotEnoughAllowance"!==o.type)throw o;J=yield this.accessKeyForTransaction(M,P)}const Y=yield this.connection.provider.block({finality:"final"}),Z=(0,a.baseDecode)(Y.header.hash),W=S.PublicKey.from(J.public_key),Q=J.access_key.nonce.add(new g.default(1)),D=(0,h.createTransaction)(this.accountId,W,M,Q,P,Z);return yield this.walletConnection.requestSignTransactions({transactions:[D],meta:R,callbackUrl:L}),new Promise((o,u)=>{setTimeout(()=>{u(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(M,P,R){return l(this,void 0,void 0,function*(){const{access_key:{permission:L}}=M;if("FullAccess"===L)return!0;if(L.FunctionCall){const{receiver_id:H,method_names:V}=L.FunctionCall;if(H===this.accountId&&V.includes("add_request_and_confirm"))return!0;if(H===P){if(1!==R.length)return!1;const[{functionCall:J}]=R;return J&&(!J.deposit||"0"===J.deposit.toString())&&(0===V.length||V.includes(J.methodName))}}return!1})}accessKeyForTransaction(M,P,R){return l(this,void 0,void 0,function*(){const L=yield this.getAccessKeys();if(R){const V=L.find(J=>J.public_key.toString()===R.toString());if(V&&(yield this.accessKeyMatchesTransaction(V,M,P)))return V}const H=this.walletConnection._authData.allKeys;for(const V of L)if(-1!==H.indexOf(V.public_key)&&(yield this.accessKeyMatchesTransaction(V,M,P)))return V;return null})}}r.ConnectedWalletAccount=T},95669:(ne,r)=>{"use strict";r.__esModule=!0,r.DecodeBuffer=r.EncodeBuffer=void 0;var d=function(){function _(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return _.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},_.prototype.consume_value=function(E){var S=E.substring(1),a=parseInt(S)/8;this.assert_enough_buffer(a);var h="f"===E[0]?"getFloat".concat(S):"i"===E[0]?"getInt".concat(S):"getUint".concat(S),g=this.view[h](this.offset,!0);return this.offset+=a,g},_.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var S=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,S},_}();r.DecodeBuffer=l},33873:(ne,r,d)=>{"use strict";r.__esModule=!0,r.BorshDeserializer=void 0;var l=d(74234),_=d(95669),E=function(){function S(a){this.buffer=new _.DecodeBuffer(a)}return S.prototype.decode=function(a){return this.decode_value(a)},S.prototype.decode_value=function(a){if("string"==typeof a){if(l.integers.includes(a))return this.decode_integer(a);if("string"===a)return this.decode_string();if("bool"===a)return this.decode_boolean()}if("object"==typeof a){if("option"in a)return this.decode_option(a);if("enum"in a)return this.decode_enum(a);if("array"in a)return this.decode_array(a);if("set"in a)return this.decode_set(a);if("map"in a)return this.decode_map(a);if("struct"in a)return this.decode_struct(a)}throw new Error("Unsupported type: ".concat(a))},S.prototype.decode_integer=function(a){var h=parseInt(a.substring(1));return h<=32||"f64"==a?this.buffer.consume_value(a):this.decode_bigint(h,a.startsWith("i"))},S.prototype.decode_bigint=function(a,h){void 0===h&&(h=!1);var g=a/8,y=new Uint8Array(this.buffer.consume_bytes(g)),v=y.reduceRight(function(b,A){return b+A.toString(16).padStart(2,"0")},"");return h&&y[g-1]?BigInt.asIntN(a,BigInt("0x".concat(v))):BigInt("0x".concat(v))},S.prototype.decode_string=function(){var a=this.decode_integer("u32"),h=new Uint8Array(this.buffer.consume_bytes(a));return String.fromCharCode.apply(null,h)},S.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},S.prototype.decode_option=function(a){var h=this.buffer.consume_value("u8");if(1===h)return this.decode_value(a.option);if(0!==h)throw new Error("Invalid option ".concat(h));return null},S.prototype.decode_enum=function(a){var h,g=this.buffer.consume_value("u8");if(g>a.enum.length)throw new Error("Enum option ".concat(g," is not available"));var y=a.enum[g].struct,v=Object.keys(y)[0];return(h={})[v]=this.decode_value(y[v]),h},S.prototype.decode_array=function(a){for(var h=[],g=a.array.len?a.array.len:this.decode_integer("u32"),y=0;y>=BigInt(8);this.encoded.store_bytes(new Uint8Array(O))},y.prototype.encode_string=function(v){this.checkTypes&&h.expect_type(v,"string",this.fieldPath);var b=v;this.encoded.store_value(b.length,"u32");for(var A=0;A{"use strict";r.__esModule=!0,r.integers=void 0,r.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},75343:function(ne,r,d){"use strict";var M,l=this&&this.__extends||(M=function(P,R){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,H){L.__proto__=H}||function(L,H){for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(L[V]=H[V])})(P,R)},function(P,R){if("function"!=typeof R&&null!==R)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function L(){this.constructor=P}M(P,R),P.prototype=null===R?Object.create(R):(L.prototype=R.prototype,new L)});r.__esModule=!0,r.validate_schema=r.ErrorSchema=r.expect_enum=r.expect_same_size=r.expect_bigint=r.expect_type=r.isArrayLike=void 0;var _=d(74234);r.isArrayLike=function E(M){return Array.isArray(M)||!!M&&"object"==typeof M&&"length"in M&&"number"==typeof M.length&&(0===M.length||M.length>0&&M.length-1 in M)},r.expect_type=function S(M,P,R){if(typeof M!==P)throw new Error("Expected ".concat(P," not ").concat(typeof M,"(").concat(M,") at ").concat(R.join(".")))},r.expect_bigint=function a(M,P){if(!["number","string","bigint","boolean"].includes(typeof M)&&!("object"==typeof M&&null!==M&&"toString"in M))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))},r.expect_same_size=function h(M,P,R){if(M!==P)throw new Error("Array length ".concat(M," does not match schema length ").concat(P," at ").concat(R.join(".")))},r.expect_enum=function g(M,P){if("object"!=typeof M||null===M)throw new Error("Expected object not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))};var y=_.integers.concat(["bool","string"]),v=["option","enum","array","set","map","struct"],b=function(M){function P(R,L){var H="Invalid schema: ".concat(JSON.stringify(R)," expected ").concat(L);return M.call(this,H)||this}return l(P,M),P}(Error);function A(M){if("string"!=typeof M||!y.includes(M)){if(M&&"object"==typeof M){var P=Object.keys(M);if(1===P.length&&v.includes(P[0])){var R=P[0];if("option"===R)return A(M[R]);if("enum"===R)return function O(M){if(!Array.isArray(M))throw new b(M,"Array");for(var P=0,R=M;P{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;const l=d(10616),_=d(45502),E=d(37703),S=d(87088),a=["/properties"],h="http://json-schema.org/draft-07/schema";class g extends l.default{_addVocabularies(){super._addVocabularies(),_.default.forEach(C=>this.addVocabulary(C)),this.opts.discriminator&&this.addKeyword(E.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const C=this.opts.$data?this.$dataMetaSchema(S,a):S;this.addMetaSchema(C,h,!1),this.refs["http://json-schema.org/schema"]=h}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:void 0)}}ne.exports=r=g,Object.defineProperty(r,"__esModule",{value:!0}),r.default=g;var y=d(41161);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var v=d(33987);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return v._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return v.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return v.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return v.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return v.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return v.CodeGen}});var b=d(64861);Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return b.default}});var A=d(74827);Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},8010:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class d{}r._CodeOrName=d,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends d{constructor(P){if(super(),!r.IDENTIFIER.test(P))throw new Error("CodeGen: name must be a valid identifier");this.str=P}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=l;class _ extends d{constructor(P){super(),this._items="string"==typeof P?[P]:P}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const P=this._items[0];return""===P||'""'===P}get str(){var P;return null!==(P=this._str)&&void 0!==P?P:this._str=this._items.reduce((R,L)=>`${R}${L}`,"")}get names(){var P;return null!==(P=this._names)&&void 0!==P?P:this._names=this._items.reduce((R,L)=>(L instanceof l&&(R[L.str]=(R[L.str]||0)+1),R),{})}}function E(M,...P){const R=[M[0]];let L=0;for(;L{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const l=d(8010),_=d(87505);var E=d(8010);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return E.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return E.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return E.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return E.Name}});var S=d(87505);Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return S.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return S.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return S.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return S.varKinds}}),r.operators={GT:new l._Code(">"),GTE:new l._Code(">="),LT:new l._Code("<"),LTE:new l._Code("<="),EQ:new l._Code("==="),NEQ:new l._Code("!=="),NOT:new l._Code("!"),OR:new l._Code("||"),AND:new l._Code("&&"),ADD:new l._Code("+")};class a{optimizeNodes(){return this}optimizeNames(ee,ue){return this}}class h extends a{constructor(ee,ue,we){super(),this.varKind=ee,this.name=ue,this.rhs=we}render({es5:ee,_n:ue}){const we=ee?_.varKinds.var:this.varKind,me=void 0===this.rhs?"":` = ${this.rhs}`;return`${we} ${this.name}${me};`+ue}optimizeNames(ee,ue){if(ee[this.name.str])return this.rhs&&(this.rhs=m(this.rhs,ee,ue)),this}get names(){return this.rhs instanceof l._CodeOrName?this.rhs.names:{}}}class g extends a{constructor(ee,ue,we){super(),this.lhs=ee,this.rhs=ue,this.sideEffects=we}render({_n:ee}){return`${this.lhs} = ${this.rhs};`+ee}optimizeNames(ee,ue){if(!(this.lhs instanceof l.Name)||ee[this.lhs.str]||this.sideEffects)return this.rhs=m(this.rhs,ee,ue),this}get names(){return u(this.lhs instanceof l.Name?{}:{...this.lhs.names},this.rhs)}}class y extends g{constructor(ee,ue,we,me){super(ee,we,me),this.op=ue}render({_n:ee}){return`${this.lhs} ${this.op}= ${this.rhs};`+ee}}class v extends a{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`${this.label}:`+ee}}class b extends a{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`break${this.label?` ${this.label}`:""};`+ee}}class A extends a{constructor(ee){super(),this.error=ee}render({_n:ee}){return`throw ${this.error};`+ee}get names(){return this.error.names}}class O extends a{constructor(ee){super(),this.code=ee}render({_n:ee}){return`${this.code};`+ee}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(ee,ue){return this.code=m(this.code,ee,ue),this}get names(){return this.code instanceof l._CodeOrName?this.code.names:{}}}class C extends a{constructor(ee=[]){super(),this.nodes=ee}render(ee){return this.nodes.reduce((ue,we)=>ue+we.render(ee),"")}optimizeNodes(){const{nodes:ee}=this;let ue=ee.length;for(;ue--;){const we=ee[ue].optimizeNodes();Array.isArray(we)?ee.splice(ue,1,...we):we?ee[ue]=we:ee.splice(ue,1)}return ee.length>0?this:void 0}optimizeNames(ee,ue){const{nodes:we}=this;let me=we.length;for(;me--;){const ve=we[me];ve.optimizeNames(ee,ue)||(w(ee,ve.names),we.splice(me,1))}return we.length>0?this:void 0}get names(){return this.nodes.reduce((ee,ue)=>o(ee,ue.names),{})}}class T extends C{render(ee){return"{"+ee._n+super.render(ee)+"}"+ee._n}}class N extends C{}class M extends T{}M.kind="else";class P extends T{constructor(ee,ue){super(ue),this.condition=ee}render(ee){let ue=`if(${this.condition})`+super.render(ee);return this.else&&(ue+="else "+this.else.render(ee)),ue}optimizeNodes(){super.optimizeNodes();const ee=this.condition;if(!0===ee)return this.nodes;let ue=this.else;if(ue){const we=ue.optimizeNodes();ue=this.else=Array.isArray(we)?new M(we):we}return ue?!1===ee?ue instanceof P?ue:ue.nodes:this.nodes.length?this:new P(x(ee),ue instanceof P?[ue]:ue.nodes):!1!==ee&&this.nodes.length?this:void 0}optimizeNames(ee,ue){var we;if(this.else=null===(we=this.else)||void 0===we?void 0:we.optimizeNames(ee,ue),super.optimizeNames(ee,ue)||this.else)return this.condition=m(this.condition,ee,ue),this}get names(){const ee=super.names;return u(ee,this.condition),this.else&&o(ee,this.else.names),ee}}P.kind="if";class R extends T{}R.kind="for";class L extends R{constructor(ee){super(),this.iteration=ee}render(ee){return`for(${this.iteration})`+super.render(ee)}optimizeNames(ee,ue){if(super.optimizeNames(ee,ue))return this.iteration=m(this.iteration,ee,ue),this}get names(){return o(super.names,this.iteration.names)}}class H extends R{constructor(ee,ue,we,me){super(),this.varKind=ee,this.name=ue,this.from=we,this.to=me}render(ee){const ue=ee.es5?_.varKinds.var:this.varKind,{name:we,from:me,to:ve}=this;return`for(${ue} ${we}=${me}; ${we}<${ve}; ${we}++)`+super.render(ee)}get names(){const ee=u(super.names,this.from);return u(ee,this.to)}}class V extends R{constructor(ee,ue,we,me){super(),this.loop=ee,this.varKind=ue,this.name=we,this.iterable=me}render(ee){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(ee)}optimizeNames(ee,ue){if(super.optimizeNames(ee,ue))return this.iterable=m(this.iterable,ee,ue),this}get names(){return o(super.names,this.iterable.names)}}class J extends T{constructor(ee,ue,we){super(),this.name=ee,this.args=ue,this.async=we}render(ee){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(ee)}}J.kind="func";class Y extends C{render(ee){return"return "+super.render(ee)}}Y.kind="return";class Z extends T{render(ee){let ue="try"+super.render(ee);return this.catch&&(ue+=this.catch.render(ee)),this.finally&&(ue+=this.finally.render(ee)),ue}optimizeNodes(){var ee,ue;return super.optimizeNodes(),null===(ee=this.catch)||void 0===ee||ee.optimizeNodes(),null===(ue=this.finally)||void 0===ue||ue.optimizeNodes(),this}optimizeNames(ee,ue){var we,me;return super.optimizeNames(ee,ue),null===(we=this.catch)||void 0===we||we.optimizeNames(ee,ue),null===(me=this.finally)||void 0===me||me.optimizeNames(ee,ue),this}get names(){const ee=super.names;return this.catch&&o(ee,this.catch.names),this.finally&&o(ee,this.finally.names),ee}}class W extends T{constructor(ee){super(),this.error=ee}render(ee){return`catch(${this.error})`+super.render(ee)}}W.kind="catch";class Q extends T{render(ee){return"finally"+super.render(ee)}}Q.kind="finally";function o(te,ee){for(const ue in ee)te[ue]=(te[ue]||0)+(ee[ue]||0);return te}function u(te,ee){return ee instanceof l._CodeOrName?o(te,ee.names):te}function m(te,ee,ue){return te instanceof l.Name?we(te):function me(ve){return ve instanceof l._Code&&ve._items.some(ce=>ce instanceof l.Name&&1===ee[ce.str]&&void 0!==ue[ce.str])}(te)?new l._Code(te._items.reduce((ve,ce)=>(ce instanceof l.Name&&(ce=we(ce)),ce instanceof l._Code?ve.push(...ce._items):ve.push(ce),ve),[])):te;function we(ve){const ce=ue[ve.str];return void 0===ce||1!==ee[ve.str]?ve:(delete ee[ve.str],ce)}}function w(te,ee){for(const ue in ee)te[ue]=(te[ue]||0)-(ee[ue]||0)}function x(te){return"boolean"==typeof te||"number"==typeof te||null===te?!te:l._`!${ie(te)}`}r.CodeGen=class D{constructor(ee,ue={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ue,_n:ue.lines?"\n":""},this._extScope=ee,this._scope=new _.Scope({parent:ee}),this._nodes=[new N]}toString(){return this._root.render(this.opts)}name(ee){return this._scope.name(ee)}scopeName(ee){return this._extScope.name(ee)}scopeValue(ee,ue){const we=this._extScope.value(ee,ue);return(this._values[we.prefix]||(this._values[we.prefix]=new Set)).add(we),we}getScopeValue(ee,ue){return this._extScope.getValue(ee,ue)}scopeRefs(ee){return this._extScope.scopeRefs(ee,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(ee,ue,we,me){const ve=this._scope.toName(ue);return void 0!==we&&me&&(this._constants[ve.str]=we),this._leafNode(new h(ee,ve,we)),ve}const(ee,ue,we){return this._def(_.varKinds.const,ee,ue,we)}let(ee,ue,we){return this._def(_.varKinds.let,ee,ue,we)}var(ee,ue,we){return this._def(_.varKinds.var,ee,ue,we)}assign(ee,ue,we){return this._leafNode(new g(ee,ue,we))}add(ee,ue){return this._leafNode(new y(ee,r.operators.ADD,ue))}code(ee){return"function"==typeof ee?ee():ee!==l.nil&&this._leafNode(new O(ee)),this}object(...ee){const ue=["{"];for(const[we,me]of ee)ue.length>1&&ue.push(","),ue.push(we),(we!==me||this.opts.es5)&&(ue.push(":"),(0,l.addCodeArg)(ue,me));return ue.push("}"),new l._Code(ue)}if(ee,ue,we){if(this._blockNode(new P(ee)),ue&&we)this.code(ue).else().code(we).endIf();else if(ue)this.code(ue).endIf();else if(we)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(ee){return this._elseNode(new P(ee))}else(){return this._elseNode(new M)}endIf(){return this._endBlockNode(P,M)}_for(ee,ue){return this._blockNode(ee),ue&&this.code(ue).endFor(),this}for(ee,ue){return this._for(new L(ee),ue)}forRange(ee,ue,we,me,ve=(this.opts.es5?_.varKinds.var:_.varKinds.let)){const ce=this._scope.toName(ee);return this._for(new H(ve,ce,ue,we),()=>me(ce))}forOf(ee,ue,we,me=_.varKinds.const){const ve=this._scope.toName(ee);if(this.opts.es5){const ce=ue instanceof l.Name?ue:this.var("_arr",ue);return this.forRange("_i",0,l._`${ce}.length`,he=>{this.var(ve,l._`${ce}[${he}]`),we(ve)})}return this._for(new V("of",me,ve,ue),()=>we(ve))}forIn(ee,ue,we,me=(this.opts.es5?_.varKinds.var:_.varKinds.const)){if(this.opts.ownProperties)return this.forOf(ee,l._`Object.keys(${ue})`,we);const ve=this._scope.toName(ee);return this._for(new V("in",me,ve,ue),()=>we(ve))}endFor(){return this._endBlockNode(R)}label(ee){return this._leafNode(new v(ee))}break(ee){return this._leafNode(new b(ee))}return(ee){const ue=new Y;if(this._blockNode(ue),this.code(ee),1!==ue.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Y)}try(ee,ue,we){if(!ue&&!we)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new Z;if(this._blockNode(me),this.code(ee),ue){const ve=this.name("e");this._currNode=me.catch=new W(ve),ue(ve)}return we&&(this._currNode=me.finally=new Q,this.code(we)),this._endBlockNode(W,Q)}throw(ee){return this._leafNode(new A(ee))}block(ee,ue){return this._blockStarts.push(this._nodes.length),ee&&this.code(ee).endBlock(ue),this}endBlock(ee){const ue=this._blockStarts.pop();if(void 0===ue)throw new Error("CodeGen: not in self-balancing block");const we=this._nodes.length-ue;if(we<0||void 0!==ee&&we!==ee)throw new Error(`CodeGen: wrong number of nodes: ${we} vs ${ee} expected`);return this._nodes.length=ue,this}func(ee,ue=l.nil,we,me){return this._blockNode(new J(ee,ue,we)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(J)}optimize(ee=1){for(;ee-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(ee){return this._currNode.nodes.push(ee),this}_blockNode(ee){this._currNode.nodes.push(ee),this._nodes.push(ee)}_endBlockNode(ee,ue){const we=this._currNode;if(we instanceof ee||ue&&we instanceof ue)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ue?`${ee.kind}/${ue.kind}`:ee.kind}"`)}_elseNode(ee){const ue=this._currNode;if(!(ue instanceof P))throw new Error('CodeGen: "else" without "if"');return this._currNode=ue.else=ee,this}get _root(){return this._nodes[0]}get _currNode(){const ee=this._nodes;return ee[ee.length-1]}set _currNode(ee){const ue=this._nodes;ue[ue.length-1]=ee}},r.not=x;const F=B(r.operators.AND);r.and=function G(...te){return te.reduce(F)};const k=B(r.operators.OR);function B(te){return(ee,ue)=>ee===l.nil?ue:ue===l.nil?ee:l._`${ie(ee)} ${te} ${ie(ue)}`}function ie(te){return te instanceof l.Name?te:l._`(${te})`}r.or=function p(...te){return te.reduce(k)}},87505:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const l=d(8010);class _ extends Error{constructor(v){super(`CodeGen: "code" for ${v} not defined`),this.value=v.value}}var E,y;(y=E=r.UsedValueState||(r.UsedValueState={}))[y.Started=0]="Started",y[y.Completed=1]="Completed",r.varKinds={const:new l.Name("const"),let:new l.Name("let"),var:new l.Name("var")};class S{constructor({prefixes:v,parent:b}={}){this._names={},this._prefixes=v,this._parent=b}toName(v){return v instanceof l.Name?v:this.name(v)}name(v){return new l.Name(this._newName(v))}_newName(v){return`${v}${(this._names[v]||this._nameGroup(v)).index++}`}_nameGroup(v){var b,A;if(null!==(A=null===(b=this._parent)||void 0===b?void 0:b._prefixes)&&void 0!==A&&A.has(v)||this._prefixes&&!this._prefixes.has(v))throw new Error(`CodeGen: prefix "${v}" is not allowed in this scope`);return this._names[v]={prefix:v,index:0}}}r.Scope=S;class a extends l.Name{constructor(v,b){super(b),this.prefix=v}setValue(v,{property:b,itemIndex:A}){this.value=v,this.scopePath=l._`.${new l.Name(b)}[${A}]`}}r.ValueScopeName=a;const h=l._`\n`;r.ValueScope=class g extends S{constructor(v){super(v),this._values={},this._scope=v.scope,this.opts={...v,_n:v.lines?h:l.nil}}get(){return this._scope}name(v){return new a(v,this._newName(v))}value(v,b){var A;if(void 0===b.ref)throw new Error("CodeGen: ref must be passed in value");const O=this.toName(v),{prefix:C}=O,T=null!==(A=b.key)&&void 0!==A?A:b.ref;let N=this._values[C];if(N){const R=N.get(T);if(R)return R}else N=this._values[C]=new Map;N.set(T,O);const M=this._scope[C]||(this._scope[C]=[]),P=M.length;return M[P]=b.ref,O.setValue(b,{property:C,itemIndex:P}),O}getValue(v,b){const A=this._values[v];if(A)return A.get(b)}scopeRefs(v,b=this._values){return this._reduceValues(b,A=>{if(void 0===A.scopePath)throw new Error(`CodeGen: name "${A}" has no value`);return l._`${v}${A.scopePath}`})}scopeCode(v=this._values,b,A){return this._reduceValues(v,O=>{if(void 0===O.value)throw new Error(`CodeGen: name "${O}" has no value`);return O.value.code},b,A)}_reduceValues(v,b,A={},O){let C=l.nil;for(const T in v){const N=v[T];if(!N)continue;const M=A[T]=A[T]||new Map;N.forEach(P=>{if(M.has(P))return;M.set(P,E.Started);let R=b(P);if(R){const L=this.opts.es5?r.varKinds.var:r.varKinds.const;C=l._`${C}${L} ${P} = ${R};${this.opts._n}`}else{if(!(R=O?.(P)))throw new _(P);C=l._`${C}${R}${this.opts._n}`}M.set(P,E.Completed)})}return C}}},58935:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const l=d(33987),_=d(37012),E=d(32861);function y(M,P){const R=M.const("err",P);M.if(l._`${E.default.vErrors} === null`,()=>M.assign(E.default.vErrors,l._`[${R}]`),l._`${E.default.vErrors}.push(${R})`),M.code(l._`${E.default.errors}++`)}function v(M,P){const{gen:R,validateName:L,schemaEnv:H}=M;H.$async?R.throw(l._`new ${M.ValidationError}(${P})`):(R.assign(l._`${L}.errors`,P),R.return(!1))}r.keywordError={message:({keyword:M})=>l.str`must pass "${M}" keyword validation`},r.keyword$DataError={message:({keyword:M,schemaType:P})=>P?l.str`"${M}" keyword must be ${P} ($data)`:l.str`"${M}" keyword is invalid ($data)`},r.reportError=function S(M,P=r.keywordError,R,L){const{it:H}=M,{gen:V,compositeRule:J,allErrors:Y}=H,Z=A(M,P,R);L??(J||Y)?y(V,Z):v(H,l._`[${Z}]`)},r.reportExtraError=function a(M,P=r.keywordError,R){const{it:L}=M,{gen:H,compositeRule:V,allErrors:J}=L;y(H,A(M,P,R)),V||J||v(L,E.default.vErrors)},r.resetErrorsCount=function h(M,P){M.assign(E.default.errors,P),M.if(l._`${E.default.vErrors} !== null`,()=>M.if(P,()=>M.assign(l._`${E.default.vErrors}.length`,P),()=>M.assign(E.default.vErrors,null)))},r.extendErrors=function g({gen:M,keyword:P,schemaValue:R,data:L,errsCount:H,it:V}){if(void 0===H)throw new Error("ajv implementation error");const J=M.name("err");M.forRange("i",H,E.default.errors,Y=>{M.const(J,l._`${E.default.vErrors}[${Y}]`),M.if(l._`${J}.instancePath === undefined`,()=>M.assign(l._`${J}.instancePath`,(0,l.strConcat)(E.default.instancePath,V.errorPath))),M.assign(l._`${J}.schemaPath`,l.str`${V.errSchemaPath}/${P}`),V.opts.verbose&&(M.assign(l._`${J}.schema`,R),M.assign(l._`${J}.data`,L))})};const b={keyword:new l.Name("keyword"),schemaPath:new l.Name("schemaPath"),params:new l.Name("params"),propertyName:new l.Name("propertyName"),message:new l.Name("message"),schema:new l.Name("schema"),parentSchema:new l.Name("parentSchema")};function A(M,P,R){const{createErrors:L}=M.it;return!1===L?l._`{}`:function O(M,P,R={}){const{gen:L,it:H}=M,V=[C(H,R),T(M,R)];return function N(M,{params:P,message:R},L){const{keyword:H,data:V,schemaValue:J,it:Y}=M,{opts:Z,propertyName:W,topSchemaRef:Q,schemaPath:D}=Y;L.push([b.keyword,H],[b.params,"function"==typeof P?P(M):P||l._`{}`]),Z.messages&&L.push([b.message,"function"==typeof R?R(M):R]),Z.verbose&&L.push([b.schema,J],[b.parentSchema,l._`${Q}${D}`],[E.default.data,V]),W&&L.push([b.propertyName,W])}(M,P,V),L.object(...V)}(M,P,R)}function C({errorPath:M},{instancePath:P}){const R=P?l.str`${M}${(0,_.getErrorPath)(P,_.Type.Str)}`:M;return[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,R)]}function T({keyword:M,it:{errSchemaPath:P}},{schemaPath:R,parentSchema:L}){let H=L?P:l.str`${P}/${M}`;return R&&(H=l.str`${H}${(0,_.getErrorPath)(R,_.Type.Str)}`),[b.schemaPath,H]}},13427:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.resolveSchema=r.getCompilingSchema=r.resolveRef=r.compileSchema=r.SchemaEnv=void 0;const l=d(33987),_=d(64861),E=d(32861),S=d(95508),a=d(37012),h=d(41161);class g{constructor(R){var L;let H;this.refs={},this.dynamicAnchors={},"object"==typeof R.schema&&(H=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=null!==(L=R.baseId)&&void 0!==L?L:(0,S.normalizeId)(H?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=H?.$async,this.refs={}}}function y(P){const R=A.call(this,P);if(R)return R;const L=(0,S.getFullPath)(this.opts.uriResolver,P.root.baseId),{es5:H,lines:V}=this.opts.code,{ownProperties:J}=this.opts,Y=new l.CodeGen(this.scope,{es5:H,lines:V,ownProperties:J});let Z;P.$async&&(Z=Y.scopeValue("Error",{ref:_.default,code:l._`require("ajv/dist/runtime/validation_error").default`}));const W=Y.scopeName("validate");P.validateName=W;const Q={gen:Y,allErrors:this.opts.allErrors,data:E.default.data,parentData:E.default.parentData,parentDataProperty:E.default.parentDataProperty,dataNames:[E.default.data],dataPathArr:[l.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:Y.scopeValue("schema",!0===this.opts.code.source?{ref:P.schema,code:(0,l.stringify)(P.schema)}:{ref:P.schema}),validateName:W,ValidationError:Z,schema:P.schema,schemaEnv:P,rootId:L,baseId:P.baseId||L,schemaPath:l.nil,errSchemaPath:P.schemaPath||(this.opts.jtd?"":"#"),errorPath:l._`""`,opts:this.opts,self:this};let D;try{this._compilations.add(P),(0,h.validateFunctionCode)(Q),Y.optimize(this.opts.code.optimize);const o=Y.toString();D=`${Y.scopeRefs(E.default.scope)}return ${o}`,this.opts.code.process&&(D=this.opts.code.process(D,P));const m=new Function(`${E.default.self}`,`${E.default.scope}`,D)(this,this.scope.get());if(this.scope.value(W,{ref:m}),m.errors=null,m.schema=P.schema,m.schemaEnv=P,P.$async&&(m.$async=!0),!0===this.opts.code.source&&(m.source={validateName:W,validateCode:o,scopeValues:Y._values}),this.opts.unevaluated){const{props:w,items:x}=Q;m.evaluated={props:w instanceof l.Name?void 0:w,items:x instanceof l.Name?void 0:x,dynamicProps:w instanceof l.Name,dynamicItems:x instanceof l.Name},m.source&&(m.source.evaluated=(0,l.stringify)(m.evaluated))}return P.validate=m,P}catch(o){throw delete P.validate,delete P.validateName,D&&this.logger.error("Error compiling schema, function code:",D),o}finally{this._compilations.delete(P)}}function b(P){return(0,S.inlineRef)(P.schema,this.opts.inlineRefs)?P.schema:P.validate?P:y.call(this,P)}function A(P){for(const R of this._compilations)if(O(R,P))return R}function O(P,R){return P.schema===R.schema&&P.root===R.root&&P.baseId===R.baseId}function C(P,R){let L;for(;"string"==typeof(L=this.refs[R]);)R=L;return L||this.schemas[R]||T.call(this,P,R)}function T(P,R){const L=this.opts.uriResolver.parse(R),H=(0,S._getFullPath)(this.opts.uriResolver,L);let V=(0,S.getFullPath)(this.opts.uriResolver,P.baseId,void 0);if(Object.keys(P.schema).length>0&&H===V)return M.call(this,L,P);const J=(0,S.normalizeId)(H),Y=this.refs[J]||this.schemas[J];if("string"==typeof Y){const Z=T.call(this,P,Y);return"object"!=typeof Z?.schema?void 0:M.call(this,L,Z)}if("object"==typeof Y?.schema){if(Y.validate||y.call(this,Y),J===(0,S.normalizeId)(R)){const{schema:Z}=Y,{schemaId:W}=this.opts,Q=Z[W];return Q&&(V=(0,S.resolveUrl)(this.opts.uriResolver,V,Q)),new g({schema:Z,schemaId:W,root:P,baseId:V})}return M.call(this,L,Y)}}r.SchemaEnv=g,r.compileSchema=y,r.resolveRef=function v(P,R,L){var H;L=(0,S.resolveUrl)(this.opts.uriResolver,R,L);const V=P.refs[L];if(V)return V;let J=C.call(this,P,L);if(void 0===J){const Y=null===(H=P.localRefs)||void 0===H?void 0:H[L],{schemaId:Z}=this.opts;Y&&(J=new g({schema:Y,schemaId:Z,root:P,baseId:R}))}return void 0!==J?P.refs[L]=b.call(this,J):void 0},r.getCompilingSchema=A,r.resolveSchema=T;const N=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function M(P,{baseId:R,schema:L,root:H}){var V;if("/"!==(null===(V=P.fragment)||void 0===V?void 0:V[0]))return;for(const Z of P.fragment.slice(1).split("/")){if("boolean"==typeof L)return;const W=L[(0,a.unescapeFragment)(Z)];if(void 0===W)return;const Q="object"==typeof(L=W)&&L[this.opts.schemaId];!N.has(Z)&&Q&&(R=(0,S.resolveUrl)(this.opts.uriResolver,R,Q))}let J;if("boolean"!=typeof L&&L.$ref&&!(0,a.schemaHasRulesButRef)(L,this.RULES)){const Z=(0,S.resolveUrl)(this.opts.uriResolver,R,L.$ref);J=T.call(this,H,Z)}const{schemaId:Y}=this.opts;return J=J||new g({schema:L,schemaId:Y,root:H,baseId:R}),J.schema!==J.root.schema?J:void 0}},32861:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_={data:new l.Name("data"),valCxt:new l.Name("valCxt"),instancePath:new l.Name("instancePath"),parentData:new l.Name("parentData"),parentDataProperty:new l.Name("parentDataProperty"),rootData:new l.Name("rootData"),dynamicAnchors:new l.Name("dynamicAnchors"),vErrors:new l.Name("vErrors"),errors:new l.Name("errors"),this:new l.Name("this"),self:new l.Name("self"),scope:new l.Name("scope"),json:new l.Name("json"),jsonPos:new l.Name("jsonPos"),jsonLen:new l.Name("jsonLen"),jsonPart:new l.Name("jsonPart")};r.default=_},74827:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(95508);class _ extends Error{constructor(S,a,h,g){super(g||`can't resolve reference ${h} from id ${a}`),this.missingRef=(0,l.resolveUrl)(S,a,h),this.missingSchema=(0,l.normalizeId)((0,l.getFullPath)(S,this.missingRef))}}r.default=_},95508:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getSchemaRefs=r.resolveUrl=r.normalizeId=r._getFullPath=r.getFullPath=r.inlineRef=void 0;const l=d(37012),_=d(12559),E=d(23366),S=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);r.inlineRef=function a(M,P=!0){return"boolean"==typeof M||(!0===P?!g(M):!!P&&y(M)<=P)};const h=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function g(M){for(const P in M){if(h.has(P))return!0;const R=M[P];if(Array.isArray(R)&&R.some(g)||"object"==typeof R&&g(R))return!0}return!1}function y(M){let P=0;for(const R in M){if("$ref"===R)return 1/0;if(P++,!S.has(R)&&("object"==typeof M[R]&&(0,l.eachItem)(M[R],L=>P+=y(L)),P===1/0))return 1/0}return P}function v(M,P="",R){!1!==R&&(P=O(P));const L=M.parse(P);return b(M,L)}function b(M,P){return M.serialize(P).split("#")[0]+"#"}r.getFullPath=v,r._getFullPath=b;const A=/#\/?$/;function O(M){return M?M.replace(A,""):""}r.normalizeId=O,r.resolveUrl=function C(M,P,R){return R=O(R),M.resolve(P,R)};const T=/^[a-z_][-a-z0-9._]*$/i;r.getSchemaRefs=function N(M,P){if("boolean"==typeof M)return{};const{schemaId:R,uriResolver:L}=this.opts,H=O(M[R]||P),V={"":H},J=v(L,H,!1),Y={},Z=new Set;return E(M,{allKeys:!0},(D,o,u,m)=>{if(void 0===m)return;const w=J+o;let x=V[m];function F(k){const p=this.opts.uriResolver.resolve;if(k=O(x?p(x,k):k),Z.has(k))throw Q(k);Z.add(k);let B=this.refs[k];return"string"==typeof B&&(B=this.refs[B]),"object"==typeof B?W(D,B.schema,k):k!==O(w)&&("#"===k[0]?(W(D,Y[k],k),Y[k]=D):this.refs[k]=w),k}function G(k){if("string"==typeof k){if(!T.test(k))throw new Error(`invalid anchor "${k}"`);F.call(this,`#${k}`)}}"string"==typeof D[R]&&(x=F.call(this,D[R])),G.call(this,D.$anchor),G.call(this,D.$dynamicAnchor),V[o]=x}),Y;function W(D,o,u){if(void 0!==o&&!_(D,o))throw Q(u)}function Q(D){return new Error(`reference "${D}" resolves to more than one schema`)}}},85175:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getRules=r.isJSONType=void 0;const l=new Set(["string","number","integer","boolean","null","object","array"]);r.isJSONType=function _(S){return"string"==typeof S&&l.has(S)},r.getRules=function E(){const S={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...S,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},S.number,S.string,S.array,S.object],post:{rules:[]},all:{},keywords:{}}}},37012:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const l=d(33987),_=d(8010);function a(J,Y=J.schema){const{opts:Z,self:W}=J;if(!Z.strictSchema||"boolean"==typeof Y)return;const Q=W.RULES.keywords;for(const D in Y)Q[D]||V(J,`unknown keyword: "${D}"`)}function h(J,Y){if("boolean"==typeof J)return!J;for(const Z in J)if(Y[Z])return!0;return!1}function A(J){return"number"==typeof J?`${J}`:J.replace(/~/g,"~0").replace(/\//g,"~1")}function O(J){return J.replace(/~1/g,"/").replace(/~0/g,"~")}function T({mergeNames:J,mergeToName:Y,mergeValues:Z,resultToName:W}){return(Q,D,o,u)=>{const m=void 0===o?D:o instanceof l.Name?(D instanceof l.Name?J(Q,D,o):Y(Q,D,o),o):D instanceof l.Name?(Y(Q,o,D),D):Z(D,o);return u!==l.Name||m instanceof l.Name?m:W(Q,m)}}function N(J,Y){if(!0===Y)return J.var("props",!0);const Z=J.var("props",l._`{}`);return void 0!==Y&&M(J,Z,Y),Z}function M(J,Y,Z){Object.keys(Z).forEach(W=>J.assign(l._`${Y}${(0,l.getProperty)(W)}`,!0))}r.toHash=function E(J){const Y={};for(const Z of J)Y[Z]=!0;return Y},r.alwaysValidSchema=function S(J,Y){return"boolean"==typeof Y?Y:0===Object.keys(Y).length||(a(J,Y),!h(Y,J.self.RULES.all))},r.checkUnknownRules=a,r.schemaHasRules=h,r.schemaHasRulesButRef=function g(J,Y){if("boolean"==typeof J)return!J;for(const Z in J)if("$ref"!==Z&&Y.all[Z])return!0;return!1},r.schemaRefOrVal=function y({topSchemaRef:J,schemaPath:Y},Z,W,Q){if(!Q){if("number"==typeof Z||"boolean"==typeof Z)return Z;if("string"==typeof Z)return l._`${Z}`}return l._`${J}${Y}${(0,l.getProperty)(W)}`},r.unescapeFragment=function v(J){return O(decodeURIComponent(J))},r.escapeFragment=function b(J){return encodeURIComponent(A(J))},r.escapeJsonPointer=A,r.unescapeJsonPointer=O,r.eachItem=function C(J,Y){if(Array.isArray(J))for(const Z of J)Y(Z);else Y(J)},r.mergeEvaluated={props:T({mergeNames:(J,Y,Z)=>J.if(l._`${Z} !== true && ${Y} !== undefined`,()=>{J.if(l._`${Y} === true`,()=>J.assign(Z,!0),()=>J.assign(Z,l._`${Z} || {}`).code(l._`Object.assign(${Z}, ${Y})`))}),mergeToName:(J,Y,Z)=>J.if(l._`${Z} !== true`,()=>{!0===Y?J.assign(Z,!0):(J.assign(Z,l._`${Z} || {}`),M(J,Z,Y))}),mergeValues:(J,Y)=>!0===J||{...J,...Y},resultToName:N}),items:T({mergeNames:(J,Y,Z)=>J.if(l._`${Z} !== true && ${Y} !== undefined`,()=>J.assign(Z,l._`${Y} === true ? true : ${Z} > ${Y} ? ${Z} : ${Y}`)),mergeToName:(J,Y,Z)=>J.if(l._`${Z} !== true`,()=>J.assign(Z,!0===Y||l._`${Z} > ${Y} ? ${Z} : ${Y}`)),mergeValues:(J,Y)=>!0===J||Math.max(J,Y),resultToName:(J,Y)=>J.var("items",Y)})},r.evaluatedPropsToName=N,r.setEvaluated=M;const P={};var L,J;function V(J,Y,Z=J.opts.strictSchema){if(Z){if(Y=`strict mode: ${Y}`,!0===Z)throw new Error(Y);J.self.logger.warn(Y)}}r.useFunc=function R(J,Y){return J.scopeValue("func",{ref:Y,code:P[Y.code]||(P[Y.code]=new _._Code(Y.code))})},(J=L=r.Type||(r.Type={}))[J.Num=0]="Num",J[J.Str=1]="Str",r.getErrorPath=function H(J,Y,Z){if(J instanceof l.Name){const W=Y===L.Num;return Z?W?l._`"[" + ${J} + "]"`:l._`"['" + ${J} + "']"`:W?l._`"/" + ${J}`:l._`"/" + ${J}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return Z?(0,l.getProperty)(J).toString():"/"+A(J)},r.checkStrictMode=V},3283:(ne,r)=>{"use strict";function l(E,S){return S.rules.some(a=>_(E,a))}function _(E,S){var a;return void 0!==E[S.keyword]||(null===(a=S.definition.implements)||void 0===a?void 0:a.some(h=>void 0!==E[h]))}Object.defineProperty(r,"__esModule",{value:!0}),r.shouldUseRule=r.shouldUseGroup=r.schemaHasRulesForType=void 0,r.schemaHasRulesForType=function d({schema:E,self:S},a){const h=S.RULES.types[a];return h&&!0!==h&&l(E,h)},r.shouldUseGroup=l,r.shouldUseRule=_},92137:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.boolOrEmptySchema=r.topBoolOrEmptySchema=void 0;const l=d(58935),_=d(33987),E=d(32861),S={message:"boolean schema is false"};function g(y,v){const{gen:b,data:A}=y,O={gen:b,keyword:"false schema",data:A,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:y};(0,l.reportError)(O,S,void 0,v)}r.topBoolOrEmptySchema=function a(y){const{gen:v,schema:b,validateName:A}=y;!1===b?g(y,!1):"object"==typeof b&&!0===b.$async?v.return(E.default.data):(v.assign(_._`${A}.errors`,null),v.return(!0))},r.boolOrEmptySchema=function h(y,v){const{gen:b,schema:A}=y;!1===A?(b.var(v,!1),g(y)):b.var(v,!0)}},86258:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const l=d(85175),_=d(3283),E=d(58935),S=d(33987),a=d(37012);var h,L;function y(L){const H=Array.isArray(L)?L:L?[L]:[];if(H.every(l.isJSONType))return H;throw new Error("type must be JSONType or JSONType[]: "+H.join(","))}(L=h=r.DataType||(r.DataType={}))[L.Correct=0]="Correct",L[L.Wrong=1]="Wrong",r.getSchemaTypes=function g(L){const H=y(L.type);if(H.includes("null")){if(!1===L.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!H.length&&void 0!==L.nullable)throw new Error('"nullable" cannot be used without "type"');!0===L.nullable&&H.push("null")}return H},r.getJSONTypes=y,r.coerceAndCheckDataType=function v(L,H){const{gen:V,data:J,opts:Y}=L,Z=function A(L,H){return H?L.filter(V=>b.has(V)||"array"===H&&"array"===V):[]}(H,Y.coerceTypes),W=H.length>0&&!(0===Z.length&&1===H.length&&(0,_.schemaHasRulesForType)(L,H[0]));if(W){const Q=N(H,J,Y.strictNumbers,h.Wrong);V.if(Q,()=>{Z.length?function O(L,H,V){const{gen:J,data:Y,opts:Z}=L,W=J.let("dataType",S._`typeof ${Y}`),Q=J.let("coerced",S._`undefined`);"array"===Z.coerceTypes&&J.if(S._`${W} == 'object' && Array.isArray(${Y}) && ${Y}.length == 1`,()=>J.assign(Y,S._`${Y}[0]`).assign(W,S._`typeof ${Y}`).if(N(H,Y,Z.strictNumbers),()=>J.assign(Q,Y))),J.if(S._`${Q} !== undefined`);for(const o of V)(b.has(o)||"array"===o&&"array"===Z.coerceTypes)&&D(o);function D(o){switch(o){case"string":return void J.elseIf(S._`${W} == "number" || ${W} == "boolean"`).assign(Q,S._`"" + ${Y}`).elseIf(S._`${Y} === null`).assign(Q,S._`""`);case"number":return void J.elseIf(S._`${W} == "boolean" || ${Y} === null - || (${W} == "string" && ${Y} && ${Y} == +${Y})`).assign(Q,S._`+${Y}`);case"integer":return void J.elseIf(S._`${W} === "boolean" || ${Y} === null - || (${W} === "string" && ${Y} && ${Y} == +${Y} && !(${Y} % 1))`).assign(Q,S._`+${Y}`);case"boolean":return void J.elseIf(S._`${Y} === "false" || ${Y} === 0 || ${Y} === null`).assign(Q,!1).elseIf(S._`${Y} === "true" || ${Y} === 1`).assign(Q,!0);case"null":return J.elseIf(S._`${Y} === "" || ${Y} === 0 || ${Y} === false`),void J.assign(Q,null);case"array":J.elseIf(S._`${W} === "string" || ${W} === "number" - || ${W} === "boolean" || ${Y} === null`).assign(Q,S._`[${Y}]`)}}J.else(),P(L),J.endIf(),J.if(S._`${Q} !== undefined`,()=>{J.assign(Y,Q),function C({gen:L,parentData:H,parentDataProperty:V},J){L.if(S._`${H} !== undefined`,()=>L.assign(S._`${H}[${V}]`,J))}(L,Q)})}(L,H,Z):P(L)})}return W};const b=new Set(["string","number","integer","boolean","null"]);function T(L,H,V,J=h.Correct){const Y=J===h.Correct?S.operators.EQ:S.operators.NEQ;let Z;switch(L){case"null":return S._`${H} ${Y} null`;case"array":Z=S._`Array.isArray(${H})`;break;case"object":Z=S._`${H} && typeof ${H} == "object" && !Array.isArray(${H})`;break;case"integer":Z=W(S._`!(${H} % 1) && !isNaN(${H})`);break;case"number":Z=W();break;default:return S._`typeof ${H} ${Y} ${L}`}return J===h.Correct?Z:(0,S.not)(Z);function W(Q=S.nil){return(0,S.and)(S._`typeof ${H} == "number"`,Q,V?S._`isFinite(${H})`:S.nil)}}function N(L,H,V,J){if(1===L.length)return T(L[0],H,V,J);let Y;const Z=(0,a.toHash)(L);if(Z.array&&Z.object){const W=S._`typeof ${H} != "object"`;Y=Z.null?W:S._`!${H} || ${W}`,delete Z.null,delete Z.array,delete Z.object}else Y=S.nil;Z.number&&delete Z.integer;for(const W in Z)Y=(0,S.and)(Y,T(W,H,V,J));return Y}r.checkDataType=T,r.checkDataTypes=N;const M={message:({schema:L})=>`must be ${L}`,params:({schema:L,schemaValue:H})=>"string"==typeof L?S._`{type: ${L}}`:S._`{type: ${H}}`};function P(L){const H=function R(L){const{gen:H,data:V,schema:J}=L,Y=(0,a.schemaRefOrVal)(L,J,"type");return{gen:H,keyword:"type",data:V,schema:J.type,schemaCode:Y,schemaValue:Y,parentSchema:J,params:{},it:L}}(L);(0,E.reportError)(H,M)}r.reportTypeError=P},81009:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.assignDefaults=void 0;const l=d(33987),_=d(37012);function S(a,h,g){const{gen:y,compositeRule:v,data:b,opts:A}=a;if(void 0===g)return;const O=l._`${b}${(0,l.getProperty)(h)}`;if(v)return void(0,_.checkStrictMode)(a,`default is ignored for: ${O}`);let C=l._`${O} === undefined`;"empty"===A.useDefaults&&(C=l._`${C} || ${O} === null || ${O} === ""`),y.if(C,l._`${O} = ${(0,l.stringify)(g)}`)}r.assignDefaults=function E(a,h){const{properties:g,items:y}=a.schema;if("object"===h&&g)for(const v in g)S(a,v,g[v].default);else"array"===h&&Array.isArray(y)&&y.forEach((v,b)=>S(a,b,v.default))}},41161:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getData=r.KeywordCxt=r.validateFunctionCode=void 0;const l=d(92137),_=d(86258),E=d(3283),S=d(86258),a=d(81009),h=d(28423),g=d(31651),y=d(33987),v=d(32861),b=d(95508),A=d(37012),O=d(58935);function T({gen:le,validateName:de,schema:ae,schemaEnv:ye,opts:Ce},Pe){Ce.code.es5?le.func(de,y._`${v.default.data}, ${v.default.valCxt}`,ye.$async,()=>{le.code(y._`"use strict"; ${L(ae,Ce)}`),function M(le,de){le.if(v.default.valCxt,()=>{le.var(v.default.instancePath,y._`${v.default.valCxt}.${v.default.instancePath}`),le.var(v.default.parentData,y._`${v.default.valCxt}.${v.default.parentData}`),le.var(v.default.parentDataProperty,y._`${v.default.valCxt}.${v.default.parentDataProperty}`),le.var(v.default.rootData,y._`${v.default.valCxt}.${v.default.rootData}`),de.dynamicRef&&le.var(v.default.dynamicAnchors,y._`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{le.var(v.default.instancePath,y._`""`),le.var(v.default.parentData,y._`undefined`),le.var(v.default.parentDataProperty,y._`undefined`),le.var(v.default.rootData,v.default.data),de.dynamicRef&&le.var(v.default.dynamicAnchors,y._`{}`)})}(le,Ce),le.code(Pe)}):le.func(de,y._`${v.default.data}, ${function N(le){return y._`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${le.dynamicRef?y._`, ${v.default.dynamicAnchors}={}`:y.nil}}={}`}(Ce)}`,ye.$async,()=>le.code(L(ae,Ce)).code(Pe))}function L(le,de){const ae="object"==typeof le&&le[de.schemaId];return ae&&(de.code.source||de.code.process)?y._`/*# sourceURL=${ae} */`:y.nil}function H(le,de){J(le)&&(Z(le),V(le))?function Y(le,de){const{schema:ae,gen:ye,opts:Ce}=le;Ce.$comment&&ae.$comment&&m(le),function o(le){const de=le.schema[le.opts.schemaId];de&&(le.baseId=(0,b.resolveUrl)(le.opts.uriResolver,le.baseId,de))}(le),function u(le){if(le.schema.$async&&!le.schemaEnv.$async)throw new Error("async schema in sync schema")}(le);const Pe=ye.const("_errs",v.default.errors);W(le,Pe),ye.var(de,y._`${Pe} === ${v.default.errors}`)}(le,de):(0,l.boolOrEmptySchema)(le,de)}function V({schema:le,self:de}){if("boolean"==typeof le)return!le;for(const ae in le)if(de.RULES.all[ae])return!0;return!1}function J(le){return"boolean"!=typeof le.schema}function Z(le){(0,A.checkUnknownRules)(le),function Q(le){const{schema:de,errSchemaPath:ae,opts:ye,self:Ce}=le;de.$ref&&ye.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(de,Ce.RULES)&&Ce.logger.warn(`$ref: keywords ignored in schema at path "${ae}"`)}(le)}function W(le,de){if(le.opts.jtd)return F(le,[],!1,de);const ae=(0,_.getSchemaTypes)(le.schema);F(le,ae,!(0,_.coerceAndCheckDataType)(le,ae),de)}function m({gen:le,schemaEnv:de,schema:ae,errSchemaPath:ye,opts:Ce}){const Pe=ae.$comment;if(!0===Ce.$comment)le.code(y._`${v.default.self}.logger.log(${Pe})`);else if("function"==typeof Ce.$comment){const Ge=y.str`${ye}/$comment`,Ve=le.scopeValue("root",{ref:de.root});le.code(y._`${v.default.self}.opts.$comment(${Pe}, ${Ge}, ${Ve}.schema)`)}}function F(le,de,ae,ye){const{gen:Ce,schema:Pe,data:Ge,allErrors:Ve,opts:Ue,self:_t}=le,{RULES:Ze}=_t;function $e(Pt){(0,E.shouldUseGroup)(Pe,Pt)&&(Pt.type?(Ce.if((0,S.checkDataType)(Pt.type,Ge,Ue.strictNumbers)),G(le,Pt),1===de.length&&de[0]===Pt.type&&ae&&(Ce.else(),(0,S.reportTypeError)(le)),Ce.endIf()):G(le,Pt),Ve||Ce.if(y._`${v.default.errors} === ${ye||0}`))}!Pe.$ref||!Ue.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(Pe,Ze)?(Ue.jtd||function k(le,de){le.schemaEnv.meta||!le.opts.strictTypes||(function p(le,de){if(de.length){if(!le.dataTypes.length)return void(le.dataTypes=de);de.forEach(ae=>{ee(le.dataTypes,ae)||ue(le,`type "${ae}" not allowed by context "${le.dataTypes.join(",")}"`)}),le.dataTypes=le.dataTypes.filter(ae=>ee(de,ae))}}(le,de),le.opts.allowUnionTypes||function B(le,de){de.length>1&&(2!==de.length||!de.includes("null"))&&ue(le,"use allowUnionTypes to allow union type keyword")}(le,de),function ie(le,de){const ae=le.self.RULES.all;for(const ye in ae){const Ce=ae[ye];if("object"==typeof Ce&&(0,E.shouldUseRule)(le.schema,Ce)){const{type:Pe}=Ce.definition;Pe.length&&!Pe.some(Ge=>te(de,Ge))&&ue(le,`missing type "${Pe.join(",")}" for keyword "${ye}"`)}}}(le,le.dataTypes))}(le,de),Ce.block(()=>{for(const Pt of Ze.rules)$e(Pt);$e(Ze.post)})):Ce.block(()=>me(le,"$ref",Ze.all.$ref.definition))}function G(le,de){const{gen:ae,schema:ye,opts:{useDefaults:Ce}}=le;Ce&&(0,a.assignDefaults)(le,de.type),ae.block(()=>{for(const Pe of de.rules)(0,E.shouldUseRule)(ye,Pe)&&me(le,Pe.keyword,Pe.definition,de.type)})}function te(le,de){return le.includes(de)||"number"===de&&le.includes("integer")}function ee(le,de){return le.includes(de)||"integer"===de&&le.includes("number")}function ue(le,de){de+=` at "${le.schemaEnv.baseId+le.errSchemaPath}" (strictTypes)`,(0,A.checkStrictMode)(le,de,le.opts.strictTypes)}r.validateFunctionCode=function C(le){J(le)&&(Z(le),V(le))?function P(le){const{schema:de,opts:ae,gen:ye}=le;T(le,()=>{ae.$comment&&de.$comment&&m(le),function D(le){const{schema:de,opts:ae}=le;void 0!==de.default&&ae.useDefaults&&ae.strictSchema&&(0,A.checkStrictMode)(le,"default is ignored in the schema root")}(le),ye.let(v.default.vErrors,null),ye.let(v.default.errors,0),ae.unevaluated&&function R(le){const{gen:de,validateName:ae}=le;le.evaluated=de.const("evaluated",y._`${ae}.evaluated`),de.if(y._`${le.evaluated}.dynamicProps`,()=>de.assign(y._`${le.evaluated}.props`,y._`undefined`)),de.if(y._`${le.evaluated}.dynamicItems`,()=>de.assign(y._`${le.evaluated}.items`,y._`undefined`))}(le),W(le),function w(le){const{gen:de,schemaEnv:ae,validateName:ye,ValidationError:Ce,opts:Pe}=le;ae.$async?de.if(y._`${v.default.errors} === 0`,()=>de.return(v.default.data),()=>de.throw(y._`new ${Ce}(${v.default.vErrors})`)):(de.assign(y._`${ye}.errors`,v.default.vErrors),Pe.unevaluated&&function x({gen:le,evaluated:de,props:ae,items:ye}){ae instanceof y.Name&&le.assign(y._`${de}.props`,ae),ye instanceof y.Name&&le.assign(y._`${de}.items`,ye)}(le),de.return(y._`${v.default.errors} === 0`))}(le)})}(le):T(le,()=>(0,l.topBoolOrEmptySchema)(le))};class we{constructor(de,ae,ye){if((0,h.validateKeywordUsage)(de,ae,ye),this.gen=de.gen,this.allErrors=de.allErrors,this.keyword=ye,this.data=de.data,this.schema=de.schema[ye],this.$data=ae.$data&&de.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(de,this.schema,ye,this.$data),this.schemaType=ae.schemaType,this.parentSchema=de.schema,this.params={},this.it=de,this.def=ae,this.$data)this.schemaCode=de.gen.const("vSchema",he(this.$data,de));else if(this.schemaCode=this.schemaValue,!(0,h.validSchemaType)(this.schema,ae.schemaType,ae.allowUndefined))throw new Error(`${ye} value must be ${JSON.stringify(ae.schemaType)}`);("code"in ae?ae.trackErrors:!1!==ae.errors)&&(this.errsCount=de.gen.const("_errs",v.default.errors))}result(de,ae,ye){this.failResult((0,y.not)(de),ae,ye)}failResult(de,ae,ye){this.gen.if(de),ye?ye():this.error(),ae?(this.gen.else(),ae(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(de,ae){this.failResult((0,y.not)(de),void 0,ae)}fail(de){if(void 0===de)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(de),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(de){if(!this.$data)return this.fail(de);const{schemaCode:ae}=this;this.fail(y._`${ae} !== undefined && (${(0,y.or)(this.invalid$data(),de)})`)}error(de,ae,ye){if(ae)return this.setParams(ae),this._error(de,ye),void this.setParams({});this._error(de,ye)}_error(de,ae){(de?O.reportExtraError:O.reportError)(this,this.def.error,ae)}$dataError(){(0,O.reportError)(this,this.def.$dataError||O.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,O.resetErrorsCount)(this.gen,this.errsCount)}ok(de){this.allErrors||this.gen.if(de)}setParams(de,ae){ae?Object.assign(this.params,de):this.params=de}block$data(de,ae,ye=y.nil){this.gen.block(()=>{this.check$data(de,ye),ae()})}check$data(de=y.nil,ae=y.nil){if(!this.$data)return;const{gen:ye,schemaCode:Ce,schemaType:Pe,def:Ge}=this;ye.if((0,y.or)(y._`${Ce} === undefined`,ae)),de!==y.nil&&ye.assign(de,!0),(Pe.length||Ge.validateSchema)&&(ye.elseIf(this.invalid$data()),this.$dataError(),de!==y.nil&&ye.assign(de,!1)),ye.else()}invalid$data(){const{gen:de,schemaCode:ae,schemaType:ye,def:Ce,it:Pe}=this;return(0,y.or)(function Ge(){if(ye.length){if(!(ae instanceof y.Name))throw new Error("ajv implementation error");const Ue=Array.isArray(ye)?ye:[ye];return y._`${(0,S.checkDataTypes)(Ue,ae,Pe.opts.strictNumbers,S.DataType.Wrong)}`}return y.nil}(),function Ve(){if(Ce.validateSchema){const Ue=de.scopeValue("validate$data",{ref:Ce.validateSchema});return y._`!${Ue}(${ae})`}return y.nil}())}subschema(de,ae){const ye=(0,g.getSubschema)(this.it,de);(0,g.extendSubschemaData)(ye,this.it,de),(0,g.extendSubschemaMode)(ye,de);const Ce={...this.it,...ye,items:void 0,props:void 0};return H(Ce,ae),Ce}mergeEvaluated(de,ae){const{it:ye,gen:Ce}=this;ye.opts.unevaluated&&(!0!==ye.props&&void 0!==de.props&&(ye.props=A.mergeEvaluated.props(Ce,de.props,ye.props,ae)),!0!==ye.items&&void 0!==de.items&&(ye.items=A.mergeEvaluated.items(Ce,de.items,ye.items,ae)))}mergeValidEvaluated(de,ae){const{it:ye,gen:Ce}=this;if(ye.opts.unevaluated&&(!0!==ye.props||!0!==ye.items))return Ce.if(ae,()=>this.mergeEvaluated(de,y.Name)),!0}}function me(le,de,ae,ye){const Ce=new we(le,ae,de);"code"in ae?ae.code(Ce,ye):Ce.$data&&ae.validate?(0,h.funcKeywordCode)(Ce,ae):"macro"in ae?(0,h.macroKeywordCode)(Ce,ae):(ae.compile||ae.validate)&&(0,h.funcKeywordCode)(Ce,ae)}r.KeywordCxt=we;const ve=/^\/(?:[^~]|~0|~1)*$/,ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function he(le,{dataLevel:de,dataNames:ae,dataPathArr:ye}){let Ce,Pe;if(""===le)return v.default.rootData;if("/"===le[0]){if(!ve.test(le))throw new Error(`Invalid JSON-pointer: ${le}`);Ce=le,Pe=v.default.rootData}else{const _t=ce.exec(le);if(!_t)throw new Error(`Invalid JSON-pointer: ${le}`);const Ze=+_t[1];if(Ce=_t[2],"#"===Ce){if(Ze>=de)throw new Error(Ue("property/index",Ze));return ye[de-Ze]}if(Ze>de)throw new Error(Ue("data",Ze));if(Pe=ae[de-Ze],!Ce)return Pe}let Ge=Pe;const Ve=Ce.split("/");for(const _t of Ve)_t&&(Pe=y._`${Pe}${(0,y.getProperty)((0,A.unescapeJsonPointer)(_t))}`,Ge=y._`${Ge} && ${Pe}`);return Ge;function Ue(_t,Ze){return`Cannot access ${_t} ${Ze} levels up, current level is ${de}`}}r.getData=he},28423:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateKeywordUsage=r.validSchemaType=r.funcKeywordCode=r.macroKeywordCode=void 0;const l=d(33987),_=d(32861),E=d(99306),S=d(58935);function g(C){const{gen:T,data:N,it:M}=C;T.if(M.parentData,()=>T.assign(N,l._`${M.parentData}[${M.parentDataProperty}]`))}function b(C,T,N){if(void 0===N)throw new Error(`keyword "${T}" failed to compile`);return C.scopeValue("keyword","function"==typeof N?{ref:N}:{ref:N,code:(0,l.stringify)(N)})}r.macroKeywordCode=function a(C,T){const{gen:N,keyword:M,schema:P,parentSchema:R,it:L}=C,H=T.macro.call(L.self,P,R,L),V=b(N,M,H);!1!==L.opts.validateSchema&&L.self.validateSchema(H,!0);const J=N.name("valid");C.subschema({schema:H,schemaPath:l.nil,errSchemaPath:`${L.errSchemaPath}/${M}`,topSchemaRef:V,compositeRule:!0},J),C.pass(J,()=>C.error(!0))},r.funcKeywordCode=function h(C,T){var N;const{gen:M,keyword:P,schema:R,parentSchema:L,$data:H,it:V}=C;!function v({schemaEnv:C},T){if(T.async&&!C.$async)throw new Error("async keyword in sync schema")}(V,T);const J=!H&&T.compile?T.compile.call(V.self,R,L,V):T.validate,Y=b(M,P,J),Z=M.let("valid");function o(m=(T.async?l._`await `:l.nil)){const w=V.opts.passContext?_.default.this:_.default.self,x=!("compile"in T&&!H||!1===T.schema);M.assign(Z,l._`${m}${(0,E.callValidateCode)(C,Y,w,x)}`,T.modifying)}function u(m){var w;M.if((0,l.not)(null!==(w=T.valid)&&void 0!==w?w:Z),m)}C.block$data(Z,function W(){if(!1===T.errors)o(),T.modifying&&g(C),u(()=>C.error());else{const m=T.async?function Q(){const m=M.let("ruleErrs",null);return M.try(()=>o(l._`await `),w=>M.assign(Z,!1).if(l._`${w} instanceof ${V.ValidationError}`,()=>M.assign(m,l._`${w}.errors`),()=>M.throw(w))),m}():function D(){const m=l._`${Y}.errors`;return M.assign(m,null),o(l.nil),m}();T.modifying&&g(C),u(()=>function y(C,T){const{gen:N}=C;N.if(l._`Array.isArray(${T})`,()=>{N.assign(_.default.vErrors,l._`${_.default.vErrors} === null ? ${T} : ${_.default.vErrors}.concat(${T})`).assign(_.default.errors,l._`${_.default.vErrors}.length`),(0,S.extendErrors)(C)},()=>C.error())}(C,m))}}),C.ok(null!==(N=T.valid)&&void 0!==N?N:Z)},r.validSchemaType=function A(C,T,N=!1){return!T.length||T.some(M=>"array"===M?Array.isArray(C):"object"===M?C&&"object"==typeof C&&!Array.isArray(C):typeof C==M||N&&typeof C>"u")},r.validateKeywordUsage=function O({schema:C,opts:T,self:N,errSchemaPath:M},P,R){if(Array.isArray(P.keyword)?!P.keyword.includes(R):P.keyword!==R)throw new Error("ajv implementation error");const L=P.dependencies;if(L?.some(H=>!Object.prototype.hasOwnProperty.call(C,H)))throw new Error(`parent schema must have dependencies of ${R}: ${L.join(",")}`);if(P.validateSchema&&!P.validateSchema(C[R])){const V=`keyword "${R}" value is invalid at path "${M}": `+N.errorsText(P.validateSchema.errors);if("log"!==T.validateSchema)throw new Error(V);N.logger.error(V)}}},31651:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendSubschemaMode=r.extendSubschemaData=r.getSubschema=void 0;const l=d(33987),_=d(37012);r.getSubschema=function E(h,{keyword:g,schemaProp:y,schema:v,schemaPath:b,errSchemaPath:A,topSchemaRef:O}){if(void 0!==g&&void 0!==v)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==g){const C=h.schema[g];return void 0===y?{schema:C,schemaPath:l._`${h.schemaPath}${(0,l.getProperty)(g)}`,errSchemaPath:`${h.errSchemaPath}/${g}`}:{schema:C[y],schemaPath:l._`${h.schemaPath}${(0,l.getProperty)(g)}${(0,l.getProperty)(y)}`,errSchemaPath:`${h.errSchemaPath}/${g}/${(0,_.escapeFragment)(y)}`}}if(void 0!==v){if(void 0===b||void 0===A||void 0===O)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:v,schemaPath:b,topSchemaRef:O,errSchemaPath:A}}throw new Error('either "keyword" or "schema" must be passed')},r.extendSubschemaData=function S(h,g,{dataProp:y,dataPropType:v,data:b,dataTypes:A,propertyName:O}){if(void 0!==b&&void 0!==y)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:C}=g;if(void 0!==y){const{errorPath:N,dataPathArr:M,opts:P}=g;T(C.let("data",l._`${g.data}${(0,l.getProperty)(y)}`,!0)),h.errorPath=l.str`${N}${(0,_.getErrorPath)(y,v,P.jsPropertySyntax)}`,h.parentDataProperty=l._`${y}`,h.dataPathArr=[...M,h.parentDataProperty]}if(void 0!==b){T(b instanceof l.Name?b:C.let("data",b,!0)),void 0!==O&&(h.propertyName=O)}function T(N){h.data=N,h.dataLevel=g.dataLevel+1,h.dataTypes=[],g.definedProperties=new Set,h.parentData=g.data,h.dataNames=[...g.dataNames,N]}A&&(h.dataTypes=A)},r.extendSubschemaMode=function a(h,{jtdDiscriminator:g,jtdMetadata:y,compositeRule:v,createErrors:b,allErrors:A}){void 0!==v&&(h.compositeRule=v),void 0!==b&&(h.createErrors=b),void 0!==A&&(h.allErrors=A),h.jtdDiscriminator=g,h.jtdMetadata=y}},10616:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var _=d(41161);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var E=d(33987);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});const S=d(64861),a=d(74827),h=d(85175),g=d(13427),y=d(33987),v=d(95508),b=d(86258),A=d(37012),O=d(54615),C=d(4382),T=(B,ie)=>new RegExp(B,ie);T.code="new RegExp";const N=["removeAdditional","useDefaults","coerceTypes"],M=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),P={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},L=200;function H(B){var ie,te,ee,ue,we,me,ve,ce,he,le,de,ae,ye,Ce,Pe,Ge,Ve,Ue,_t,Ze,$e,Pt,nt,rt,Lt;const Re=B.strict,Ae=null===(ie=B.code)||void 0===ie?void 0:ie.optimize,xe=!0===Ae||void 0===Ae?1:Ae||0,je=null!==(ee=null===(te=B.code)||void 0===te?void 0:te.regExp)&&void 0!==ee?ee:T,He=null!==(ue=B.uriResolver)&&void 0!==ue?ue:C.default;return{strictSchema:null===(me=null!==(we=B.strictSchema)&&void 0!==we?we:Re)||void 0===me||me,strictNumbers:null===(ce=null!==(ve=B.strictNumbers)&&void 0!==ve?ve:Re)||void 0===ce||ce,strictTypes:null!==(le=null!==(he=B.strictTypes)&&void 0!==he?he:Re)&&void 0!==le?le:"log",strictTuples:null!==(ae=null!==(de=B.strictTuples)&&void 0!==de?de:Re)&&void 0!==ae?ae:"log",strictRequired:null!==(Ce=null!==(ye=B.strictRequired)&&void 0!==ye?ye:Re)&&void 0!==Ce&&Ce,code:B.code?{...B.code,optimize:xe,regExp:je}:{optimize:xe,regExp:je},loopRequired:null!==(Pe=B.loopRequired)&&void 0!==Pe?Pe:L,loopEnum:null!==(Ge=B.loopEnum)&&void 0!==Ge?Ge:L,meta:null===(Ve=B.meta)||void 0===Ve||Ve,messages:null===(Ue=B.messages)||void 0===Ue||Ue,inlineRefs:null===(_t=B.inlineRefs)||void 0===_t||_t,schemaId:null!==(Ze=B.schemaId)&&void 0!==Ze?Ze:"$id",addUsedSchema:null===($e=B.addUsedSchema)||void 0===$e||$e,validateSchema:null===(Pt=B.validateSchema)||void 0===Pt||Pt,validateFormats:null===(nt=B.validateFormats)||void 0===nt||nt,unicodeRegExp:null===(rt=B.unicodeRegExp)||void 0===rt||rt,int32range:null===(Lt=B.int32range)||void 0===Lt||Lt,uriResolver:He}}class V{constructor(ie={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,ie=this.opts={...ie,...H(ie)};const{es5:te,lines:ee}=this.opts.code;this.scope=new y.ValueScope({scope:{},prefixes:M,es5:te,lines:ee}),this.logger=function u(B){if(!1===B)return o;if(void 0===B)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}(ie.logger);const ue=ie.validateFormats;ie.validateFormats=!1,this.RULES=(0,h.getRules)(),J.call(this,P,ie,"NOT SUPPORTED"),J.call(this,R,ie,"DEPRECATED","warn"),this._metaOpts=D.call(this),ie.formats&&W.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),ie.keywords&&Q.call(this,ie.keywords),"object"==typeof ie.meta&&this.addMetaSchema(ie.meta),Z.call(this),ie.validateFormats=ue}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:ie,meta:te,schemaId:ee}=this.opts;let ue=O;"id"===ee&&(ue={...O},ue.id=ue.$id,delete ue.$id),te&&ie&&this.addMetaSchema(ue,ue[ee],!1)}defaultMeta(){const{meta:ie,schemaId:te}=this.opts;return this.opts.defaultMeta="object"==typeof ie?ie[te]||ie:void 0}validate(ie,te){let ee;if("string"==typeof ie){if(ee=this.getSchema(ie),!ee)throw new Error(`no schema with key or ref "${ie}"`)}else ee=this.compile(ie);const ue=ee(te);return"$async"in ee||(this.errors=ee.errors),ue}compile(ie,te){const ee=this._addSchema(ie,te);return ee.validate||this._compileSchemaEnv(ee)}compileAsync(ie,te){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:ee}=this.opts;return ue.call(this,ie,te);function ue(Pe,Ge){return we.apply(this,arguments)}function we(){return(we=l(function*(Pe,Ge){yield me.call(this,Pe.$schema);const Ve=this._addSchema(Pe,Ge);return Ve.validate||ce.call(this,Ve)})).apply(this,arguments)}function me(Pe){return ve.apply(this,arguments)}function ve(){return(ve=l(function*(Pe){Pe&&!this.getSchema(Pe)&&(yield ue.call(this,{$ref:Pe},!0))})).apply(this,arguments)}function ce(Pe){return he.apply(this,arguments)}function he(){return(he=l(function*(Pe){try{return this._compileSchemaEnv(Pe)}catch(Ge){if(!(Ge instanceof a.default))throw Ge;return le.call(this,Ge),yield de.call(this,Ge.missingSchema),ce.call(this,Pe)}})).apply(this,arguments)}function le({missingSchema:Pe,missingRef:Ge}){if(this.refs[Pe])throw new Error(`AnySchema ${Pe} is loaded but ${Ge} cannot be resolved`)}function de(Pe){return ae.apply(this,arguments)}function ae(){return(ae=l(function*(Pe){const Ge=yield ye.call(this,Pe);this.refs[Pe]||(yield me.call(this,Ge.$schema)),this.refs[Pe]||this.addSchema(Ge,Pe,te)})).apply(this,arguments)}function ye(Pe){return Ce.apply(this,arguments)}function Ce(){return(Ce=l(function*(Pe){const Ge=this._loading[Pe];if(Ge)return Ge;try{return yield this._loading[Pe]=ee(Pe)}finally{delete this._loading[Pe]}})).apply(this,arguments)}}addSchema(ie,te,ee,ue=this.opts.validateSchema){if(Array.isArray(ie)){for(const me of ie)this.addSchema(me,void 0,ee,ue);return this}let we;if("object"==typeof ie){const{schemaId:me}=this.opts;if(we=ie[me],void 0!==we&&"string"!=typeof we)throw new Error(`schema ${me} must be string`)}return te=(0,v.normalizeId)(te||we),this._checkUnique(te),this.schemas[te]=this._addSchema(ie,ee,te,ue,!0),this}addMetaSchema(ie,te,ee=this.opts.validateSchema){return this.addSchema(ie,te,!0,ee),this}validateSchema(ie,te){if("boolean"==typeof ie)return!0;let ee;if(ee=ie.$schema,void 0!==ee&&"string"!=typeof ee)throw new Error("$schema must be a string");if(ee=ee||this.opts.defaultMeta||this.defaultMeta(),!ee)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const ue=this.validate(ee,ie);if(!ue&&te){const we="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(we);this.logger.error(we)}return ue}getSchema(ie){let te;for(;"string"==typeof(te=Y.call(this,ie));)ie=te;if(void 0===te){const{schemaId:ee}=this.opts,ue=new g.SchemaEnv({schema:{},schemaId:ee});if(te=g.resolveSchema.call(this,ue,ie),!te)return;this.refs[ie]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(ie){if(ie instanceof RegExp)return this._removeAllSchemas(this.schemas,ie),this._removeAllSchemas(this.refs,ie),this;switch(typeof ie){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=Y.call(this,ie);return"object"==typeof te&&this._cache.delete(te.schema),delete this.schemas[ie],delete this.refs[ie],this}case"object":{const te=ie;this._cache.delete(te);let ee=ie[this.opts.schemaId];return ee&&(ee=(0,v.normalizeId)(ee),delete this.schemas[ee],delete this.refs[ee]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(ie){for(const te of ie)this.addKeyword(te);return this}addKeyword(ie,te){let ee;if("string"==typeof ie)ee=ie,"object"==typeof te&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=ee);else{if("object"!=typeof ie||void 0!==te)throw new Error("invalid addKeywords parameters");if(ee=(te=ie).keyword,Array.isArray(ee)&&!ee.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(w.call(this,ee,te),!te)return(0,A.eachItem)(ee,we=>x.call(this,we)),this;G.call(this,te);const ue={...te,type:(0,b.getJSONTypes)(te.type),schemaType:(0,b.getJSONTypes)(te.schemaType)};return(0,A.eachItem)(ee,0===ue.type.length?we=>x.call(this,we,ue):we=>ue.type.forEach(me=>x.call(this,we,ue,me))),this}getKeyword(ie){const te=this.RULES.all[ie];return"object"==typeof te?te.definition:!!te}removeKeyword(ie){const{RULES:te}=this;delete te.keywords[ie],delete te.all[ie];for(const ee of te.rules){const ue=ee.rules.findIndex(we=>we.keyword===ie);ue>=0&&ee.rules.splice(ue,1)}return this}addFormat(ie,te){return"string"==typeof te&&(te=new RegExp(te)),this.formats[ie]=te,this}errorsText(ie=this.errors,{separator:te=", ",dataVar:ee="data"}={}){return ie&&0!==ie.length?ie.map(ue=>`${ee}${ue.instancePath} ${ue.message}`).reduce((ue,we)=>ue+te+we):"No errors"}$dataMetaSchema(ie,te){const ee=this.RULES.all;ie=JSON.parse(JSON.stringify(ie));for(const ue of te){const we=ue.split("/").slice(1);let me=ie;for(const ve of we)me=me[ve];for(const ve in ee){const ce=ee[ve];if("object"!=typeof ce)continue;const{$data:he}=ce.definition,le=me[ve];he&&le&&(me[ve]=p(le))}}return ie}_removeAllSchemas(ie,te){for(const ee in ie){const ue=ie[ee];(!te||te.test(ee))&&("string"==typeof ue?delete ie[ee]:ue&&!ue.meta&&(this._cache.delete(ue.schema),delete ie[ee]))}}_addSchema(ie,te,ee,ue=this.opts.validateSchema,we=this.opts.addUsedSchema){let me;const{schemaId:ve}=this.opts;if("object"==typeof ie)me=ie[ve];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof ie)throw new Error("schema must be object or boolean")}let ce=this._cache.get(ie);if(void 0!==ce)return ce;ee=(0,v.normalizeId)(me||ee);const he=v.getSchemaRefs.call(this,ie,ee);return ce=new g.SchemaEnv({schema:ie,schemaId:ve,meta:te,baseId:ee,localRefs:he}),this._cache.set(ce.schema,ce),we&&!ee.startsWith("#")&&(ee&&this._checkUnique(ee),this.refs[ee]=ce),ue&&this.validateSchema(ie,!0),ce}_checkUnique(ie){if(this.schemas[ie]||this.refs[ie])throw new Error(`schema with key or id "${ie}" already exists`)}_compileSchemaEnv(ie){if(ie.meta?this._compileMetaSchema(ie):g.compileSchema.call(this,ie),!ie.validate)throw new Error("ajv implementation error");return ie.validate}_compileMetaSchema(ie){const te=this.opts;this.opts=this._metaOpts;try{g.compileSchema.call(this,ie)}finally{this.opts=te}}}function J(B,ie,te,ee="error"){for(const ue in B){const we=ue;we in ie&&this.logger[ee](`${te}: option ${ue}. ${B[we]}`)}}function Y(B){return B=(0,v.normalizeId)(B),this.schemas[B]||this.refs[B]}function Z(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const ie in B)this.addSchema(B[ie],ie)}function W(){for(const B in this.opts.formats){const ie=this.opts.formats[B];ie&&this.addFormat(B,ie)}}function Q(B){if(Array.isArray(B))this.addVocabulary(B);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const ie in B){const te=B[ie];te.keyword||(te.keyword=ie),this.addKeyword(te)}}}function D(){const B={...this.opts};for(const ie of N)delete B[ie];return B}r.default=V,V.ValidationError=S.default,V.MissingRefError=a.default;const o={log(){},warn(){},error(){}};const m=/^[a-z_$][a-z0-9_$:-]*$/i;function w(B,ie){const{RULES:te}=this;if((0,A.eachItem)(B,ee=>{if(te.keywords[ee])throw new Error(`Keyword ${ee} is already defined`);if(!m.test(ee))throw new Error(`Keyword ${ee} has invalid name`)}),ie&&ie.$data&&!("code"in ie)&&!("validate"in ie))throw new Error('$data keyword must have "code" or "validate" function')}function x(B,ie,te){var ee;const ue=ie?.post;if(te&&ue)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:we}=this;let me=ue?we.post:we.rules.find(({type:ce})=>ce===te);if(me||(me={type:te,rules:[]},we.rules.push(me)),we.keywords[B]=!0,!ie)return;const ve={keyword:B,definition:{...ie,type:(0,b.getJSONTypes)(ie.type),schemaType:(0,b.getJSONTypes)(ie.schemaType)}};ie.before?F.call(this,me,ve,ie.before):me.rules.push(ve),we.all[B]=ve,null===(ee=ie.implements)||void 0===ee||ee.forEach(ce=>this.addKeyword(ce))}function F(B,ie,te){const ee=B.rules.findIndex(ue=>ue.keyword===te);ee>=0?B.rules.splice(ee,0,ie):(B.rules.push(ie),this.logger.warn(`rule ${te} is not defined`))}function G(B){let{metaSchema:ie}=B;void 0!==ie&&(B.$data&&this.opts.$data&&(ie=p(ie)),B.validateSchema=this.compile(ie,!0))}const k={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function p(B){return{anyOf:[B,k]}}},86947:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(12559);l.code='require("ajv/dist/runtime/equal").default',r.default=l},75603:(ne,r)=>{"use strict";function d(l){const _=l.length;let a,E=0,S=0;for(;S<_;)E++,a=l.charCodeAt(S++),a>=55296&&a<=56319&&S<_&&(a=l.charCodeAt(S),56320==(64512&a)&&S++);return E}Object.defineProperty(r,"__esModule",{value:!0}),r.default=d,d.code='require("ajv/dist/runtime/ucs2length").default'},4382:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(96482);l.code='require("ajv/dist/runtime/uri").default',r.default=l},64861:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class d extends Error{constructor(_){super("validation failed"),this.errors=_,this.ajv=this.validation=!0}}r.default=d},96185:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateAdditionalItems=void 0;const l=d(33987),_=d(37012),S={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:h}})=>l.str`must NOT have more than ${h} items`,params:({params:{len:h}})=>l._`{limit: ${h}}`},code(h){const{parentSchema:g,it:y}=h,{items:v}=g;Array.isArray(v)?a(h,v):(0,_.checkStrictMode)(y,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(h,g){const{gen:y,schema:v,data:b,keyword:A,it:O}=h;O.items=!0;const C=y.const("len",l._`${b}.length`);if(!1===v)h.setParams({len:g.length}),h.pass(l._`${C} <= ${g.length}`);else if("object"==typeof v&&!(0,_.alwaysValidSchema)(O,v)){const N=y.var("valid",l._`${C} <= ${g.length}`);y.if((0,l.not)(N),()=>function T(N){y.forRange("i",g.length,C,M=>{h.subschema({keyword:A,dataProp:M,dataPropType:_.Type.Num},N),O.allErrors||y.if((0,l.not)(N),()=>y.break())})}(N)),h.ok(N)}}r.validateAdditionalItems=a,r.default=S},73086:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(99306),_=d(33987),E=d(32861),S=d(37012),h={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:g})=>_._`{additionalProperty: ${g.additionalProperty}}`},code(g){const{gen:y,schema:v,parentSchema:b,data:A,errsCount:O,it:C}=g;if(!O)throw new Error("ajv implementation error");const{allErrors:T,opts:N}=C;if(C.props=!0,"all"!==N.removeAdditional&&(0,S.alwaysValidSchema)(C,v))return;const M=(0,l.allSchemaProperties)(b.properties),P=(0,l.allSchemaProperties)(b.patternProperties);function H(Y){y.code(_._`delete ${A}[${Y}]`)}function V(Y){if("all"===N.removeAdditional||N.removeAdditional&&!1===v)H(Y);else{if(!1===v)return g.setParams({additionalProperty:Y}),g.error(),void(T||y.break());if("object"==typeof v&&!(0,S.alwaysValidSchema)(C,v)){const Z=y.name("valid");"failing"===N.removeAdditional?(J(Y,Z,!1),y.if((0,_.not)(Z),()=>{g.reset(),H(Y)})):(J(Y,Z),T||y.if((0,_.not)(Z),()=>y.break()))}}}function J(Y,Z,W){const Q={keyword:"additionalProperties",dataProp:Y,dataPropType:S.Type.Str};!1===W&&Object.assign(Q,{compositeRule:!0,createErrors:!1,allErrors:!1}),g.subschema(Q,Z)}(function R(){y.forIn("key",A,Y=>{M.length||P.length?y.if(function L(Y){let Z;if(M.length>8){const W=(0,S.schemaRefOrVal)(C,b.properties,"properties");Z=(0,l.isOwnProperty)(y,W,Y)}else Z=M.length?(0,_.or)(...M.map(W=>_._`${Y} === ${W}`)):_.nil;return P.length&&(Z=(0,_.or)(Z,...P.map(W=>_._`${(0,l.usePattern)(g,W)}.test(${Y})`))),(0,_.not)(Z)}(Y),()=>V(Y)):V(Y)})})(),g.ok(_._`${O} === ${E.default.errors}`)}};r.default=h},84397:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(37012),_={keyword:"allOf",schemaType:"array",code(E){const{gen:S,schema:a,it:h}=E;if(!Array.isArray(a))throw new Error("ajv implementation error");const g=S.name("valid");a.forEach((y,v)=>{if((0,l.alwaysValidSchema)(h,y))return;const b=E.subschema({keyword:"allOf",schemaProp:v},g);E.ok(g),E.mergeEvaluated(b)})}};r.default=_},79839:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const _={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:d(99306).validateUnion,error:{message:"must match a schema in anyOf"}};r.default=_},64247:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),S={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:h}})=>void 0===h?l.str`must contain at least ${a} valid item(s)`:l.str`must contain at least ${a} and no more than ${h} valid item(s)`,params:({params:{min:a,max:h}})=>void 0===h?l._`{minContains: ${a}}`:l._`{minContains: ${a}, maxContains: ${h}}`},code(a){const{gen:h,schema:g,parentSchema:y,data:v,it:b}=a;let A,O;const{minContains:C,maxContains:T}=y;b.opts.next?(A=void 0===C?1:C,O=T):A=1;const N=h.const("len",l._`${v}.length`);if(a.setParams({min:A,max:O}),void 0===O&&0===A)return void(0,_.checkStrictMode)(b,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==O&&A>O)return(0,_.checkStrictMode)(b,'"minContains" > "maxContains" is always invalid'),void a.fail();if((0,_.alwaysValidSchema)(b,g)){let H=l._`${N} >= ${A}`;return void 0!==O&&(H=l._`${H} && ${N} <= ${O}`),void a.pass(H)}b.items=!0;const M=h.name("valid");function P(){const H=h.name("_valid"),V=h.let("count",0);R(H,()=>h.if(H,()=>function L(H){h.code(l._`${H}++`),void 0===O?h.if(l._`${H} >= ${A}`,()=>h.assign(M,!0).break()):(h.if(l._`${H} > ${O}`,()=>h.assign(M,!1).break()),1===A?h.assign(M,!0):h.if(l._`${H} >= ${A}`,()=>h.assign(M,!0)))}(V)))}function R(H,V){h.forRange("i",0,N,J=>{a.subschema({keyword:"contains",dataProp:J,dataPropType:_.Type.Num,compositeRule:!0},H),V()})}void 0===O&&1===A?R(M,()=>h.if(M,()=>h.break())):0===A?(h.let(M,!0),void 0!==O&&h.if(l._`${v}.length > 0`,P)):(h.let(M,!1),P()),a.result(M,()=>a.reset())}};r.default=S},67959:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const l=d(33987),_=d(37012),E=d(99306);r.error={message:({params:{property:y,depsCount:v,deps:b}})=>{const A=1===v?"property":"properties";return l.str`must have ${A} ${b} when property ${y} is present`},params:({params:{property:y,depsCount:v,deps:b,missingProperty:A}})=>l._`{property: ${y}, - missingProperty: ${A}, - depsCount: ${v}, - deps: ${b}}`};const S={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(y){const[v,b]=function a({schema:y}){const v={},b={};for(const A in y){if("__proto__"===A)continue;(Array.isArray(y[A])?v:b)[A]=y[A]}return[v,b]}(y);h(y,v),g(y,b)}};function h(y,v=y.schema){const{gen:b,data:A,it:O}=y;if(0===Object.keys(v).length)return;const C=b.let("missing");for(const T in v){const N=v[T];if(0===N.length)continue;const M=(0,E.propertyInData)(b,A,T,O.opts.ownProperties);y.setParams({property:T,depsCount:N.length,deps:N.join(", ")}),O.allErrors?b.if(M,()=>{for(const P of N)(0,E.checkReportMissingProp)(y,P)}):(b.if(l._`${M} && (${(0,E.checkMissingProp)(y,N,C)})`),(0,E.reportMissingProp)(y,C),b.else())}}function g(y,v=y.schema){const{gen:b,data:A,keyword:O,it:C}=y,T=b.name("valid");for(const N in v)(0,_.alwaysValidSchema)(C,v[N])||(b.if((0,E.propertyInData)(b,A,N,C.opts.ownProperties),()=>{const M=y.subschema({keyword:O,schemaProp:N},T);y.mergeValidEvaluated(M,T)},()=>b.var(T,!0)),y.ok(T))}r.validatePropertyDeps=h,r.validateSchemaDeps=g,r.default=S},45100:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),S={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:h})=>l.str`must match "${h.ifClause}" schema`,params:({params:h})=>l._`{failingKeyword: ${h.ifClause}}`},code(h){const{gen:g,parentSchema:y,it:v}=h;void 0===y.then&&void 0===y.else&&(0,_.checkStrictMode)(v,'"if" without "then" and "else" is ignored');const b=a(v,"then"),A=a(v,"else");if(!b&&!A)return;const O=g.let("valid",!0),C=g.name("_valid");if(function T(){const M=h.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},C);h.mergeEvaluated(M)}(),h.reset(),b&&A){const M=g.let("ifClause");h.setParams({ifClause:M}),g.if(C,N("then",M),N("else",M))}else b?g.if(C,N("then")):g.if((0,l.not)(C),N("else"));function N(M,P){return()=>{const R=h.subschema({keyword:M},C);g.assign(O,C),h.mergeValidEvaluated(R,O),P?g.assign(P,l._`${M}`):h.setParams({ifClause:M})}}h.pass(O,()=>h.error(!0))}};function a(h,g){const y=h.schema[g];return void 0!==y&&!(0,_.alwaysValidSchema)(h,y)}r.default=S},35860:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(96185),_=d(99469),E=d(45608),S=d(87819),a=d(64247),h=d(67959),g=d(95417),y=d(73086),v=d(16141),b=d(4947),A=d(39858),O=d(79839),C=d(29533),T=d(84397),N=d(45100),M=d(35510);r.default=function P(R=!1){const L=[A.default,O.default,C.default,T.default,N.default,M.default,g.default,y.default,h.default,v.default,b.default];return R?L.push(_.default,S.default):L.push(l.default,E.default),L.push(a.default),L}},45608:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateTuple=void 0;const l=d(33987),_=d(37012),E=d(99306),S={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(h){const{schema:g,it:y}=h;if(Array.isArray(g))return a(h,"additionalItems",g);y.items=!0,!(0,_.alwaysValidSchema)(y,g)&&h.ok((0,E.validateArray)(h))}};function a(h,g,y=h.schema){const{gen:v,parentSchema:b,data:A,keyword:O,it:C}=h;(function M(P){const{opts:R,errSchemaPath:L}=C,H=y.length,V=H===P.minItems&&(H===P.maxItems||!1===P[g]);if(R.strictTuples&&!V){const J=`"${O}" is ${H}-tuple, but minItems or maxItems/${g} are not specified or different at path "${L}"`;(0,_.checkStrictMode)(C,J,R.strictTuples)}})(b),C.opts.unevaluated&&y.length&&!0!==C.items&&(C.items=_.mergeEvaluated.items(v,y.length,C.items));const T=v.name("valid"),N=v.const("len",l._`${A}.length`);y.forEach((P,R)=>{(0,_.alwaysValidSchema)(C,P)||(v.if(l._`${N} > ${R}`,()=>h.subschema({keyword:O,schemaProp:R,dataProp:R},T)),h.ok(T))})}r.validateTuple=a,r.default=S},87819:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),E=d(99306),S=d(96185),h={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:g}})=>l.str`must NOT have more than ${g} items`,params:({params:{len:g}})=>l._`{limit: ${g}}`},code(g){const{schema:y,parentSchema:v,it:b}=g,{prefixItems:A}=v;b.items=!0,!(0,_.alwaysValidSchema)(b,y)&&(A?(0,S.validateAdditionalItems)(g,A):g.ok((0,E.validateArray)(g)))}};r.default=h},39858:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(37012),_={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(E){const{gen:S,schema:a,it:h}=E;if((0,l.alwaysValidSchema)(h,a))return void E.fail();const g=S.name("valid");E.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},g),E.failResult(g,()=>E.reset(),()=>E.error())},error:{message:"must NOT be valid"}};r.default=_},29533:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),S={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>l._`{passingSchemas: ${a.passing}}`},code(a){const{gen:h,schema:g,parentSchema:y,it:v}=a;if(!Array.isArray(g))throw new Error("ajv implementation error");if(v.opts.discriminator&&y.discriminator)return;const b=g,A=h.let("valid",!1),O=h.let("passing",null),C=h.name("_valid");a.setParams({passing:O}),h.block(function T(){b.forEach((N,M)=>{let P;(0,_.alwaysValidSchema)(v,N)?h.var(C,!0):P=a.subschema({keyword:"oneOf",schemaProp:M,compositeRule:!0},C),M>0&&h.if(l._`${C} && ${A}`).assign(A,!1).assign(O,l._`[${O}, ${M}]`).else(),h.if(C,()=>{h.assign(A,!0),h.assign(O,M),P&&a.mergeEvaluated(P,l.Name)})})}),a.result(A,()=>a.reset(),()=>a.error(!0))}};r.default=S},4947:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(99306),_=d(33987),E=d(37012),S=d(37012),a={keyword:"patternProperties",type:"object",schemaType:"object",code(h){const{gen:g,schema:y,data:v,parentSchema:b,it:A}=h,{opts:O}=A,C=(0,l.allSchemaProperties)(y),T=C.filter(V=>(0,E.alwaysValidSchema)(A,y[V]));if(0===C.length||T.length===C.length&&(!A.opts.unevaluated||!0===A.props))return;const N=O.strictSchema&&!O.allowMatchingProperties&&b.properties,M=g.name("valid");!0!==A.props&&!(A.props instanceof _.Name)&&(A.props=(0,S.evaluatedPropsToName)(g,A.props));const{props:P}=A;function L(V){for(const J in N)new RegExp(V).test(J)&&(0,E.checkStrictMode)(A,`property ${J} matches pattern ${V} (use allowMatchingProperties)`)}function H(V){g.forIn("key",v,J=>{g.if(_._`${(0,l.usePattern)(h,V)}.test(${J})`,()=>{const Y=T.includes(V);Y||h.subschema({keyword:"patternProperties",schemaProp:V,dataProp:J,dataPropType:S.Type.Str},M),A.opts.unevaluated&&!0!==P?g.assign(_._`${P}[${J}]`,!0):!Y&&!A.allErrors&&g.if((0,_.not)(M),()=>g.break())})})}!function R(){for(const V of C)N&&L(V),A.allErrors?H(V):(g.var(M,!0),H(V),g.if(M))}()}};r.default=a},99469:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(45608),_={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:E=>(0,l.validateTuple)(E,"items")};r.default=_},16141:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(41161),_=d(99306),E=d(37012),S=d(73086),a={keyword:"properties",type:"object",schemaType:"object",code(h){const{gen:g,schema:y,parentSchema:v,data:b,it:A}=h;"all"===A.opts.removeAdditional&&void 0===v.additionalProperties&&S.default.code(new l.KeywordCxt(A,S.default,"additionalProperties"));const O=(0,_.allSchemaProperties)(y);for(const P of O)A.definedProperties.add(P);A.opts.unevaluated&&O.length&&!0!==A.props&&(A.props=E.mergeEvaluated.props(g,(0,E.toHash)(O),A.props));const C=O.filter(P=>!(0,E.alwaysValidSchema)(A,y[P]));if(0===C.length)return;const T=g.name("valid");for(const P of C)N(P)?M(P):(g.if((0,_.propertyInData)(g,b,P,A.opts.ownProperties)),M(P),A.allErrors||g.else().var(T,!0),g.endIf()),h.it.definedProperties.add(P),h.ok(T);function N(P){return A.opts.useDefaults&&!A.compositeRule&&void 0!==y[P].default}function M(P){h.subschema({keyword:"properties",schemaProp:P,dataProp:P},T)}}};r.default=a},95417:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),S={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>l._`{propertyName: ${a.propertyName}}`},code(a){const{gen:h,schema:g,data:y,it:v}=a;if((0,_.alwaysValidSchema)(v,g))return;const b=h.name("valid");h.forIn("key",y,A=>{a.setParams({propertyName:A}),a.subschema({keyword:"propertyNames",data:A,dataTypes:["string"],propertyName:A,compositeRule:!0},b),h.if((0,l.not)(b),()=>{a.error(!0),v.allErrors||h.break()})}),a.ok(b)}};r.default=S},35510:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(37012),_={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:E,parentSchema:S,it:a}){void 0===S.if&&(0,l.checkStrictMode)(a,`"${E}" without "if" is ignored`)}};r.default=_},99306:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateUnion=r.validateArray=r.usePattern=r.callValidateCode=r.schemaProperties=r.allSchemaProperties=r.noPropertyInData=r.propertyInData=r.isOwnProperty=r.hasPropFunc=r.reportMissingProp=r.checkMissingProp=r.checkReportMissingProp=void 0;const l=d(33987),_=d(37012),E=d(32861),S=d(37012);function y(L){return L.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:l._`Object.prototype.hasOwnProperty`})}function v(L,H,V){return l._`${y(L)}.call(${H}, ${V})`}function A(L,H,V,J){const Y=l._`${H}${(0,l.getProperty)(V)} === undefined`;return J?(0,l.or)(Y,(0,l.not)(v(L,H,V))):Y}function O(L){return L?Object.keys(L).filter(H=>"__proto__"!==H):[]}r.checkReportMissingProp=function a(L,H){const{gen:V,data:J,it:Y}=L;V.if(A(V,J,H,Y.opts.ownProperties),()=>{L.setParams({missingProperty:l._`${H}`},!0),L.error()})},r.checkMissingProp=function h({gen:L,data:H,it:{opts:V}},J,Y){return(0,l.or)(...J.map(Z=>(0,l.and)(A(L,H,Z,V.ownProperties),l._`${Y} = ${Z}`)))},r.reportMissingProp=function g(L,H){L.setParams({missingProperty:H},!0),L.error()},r.hasPropFunc=y,r.isOwnProperty=v,r.propertyInData=function b(L,H,V,J){const Y=l._`${H}${(0,l.getProperty)(V)} !== undefined`;return J?l._`${Y} && ${v(L,H,V)}`:Y},r.noPropertyInData=A,r.allSchemaProperties=O,r.schemaProperties=function C(L,H){return O(H).filter(V=>!(0,_.alwaysValidSchema)(L,H[V]))},r.callValidateCode=function T({schemaCode:L,data:H,it:{gen:V,topSchemaRef:J,schemaPath:Y,errorPath:Z},it:W},Q,D,o){const u=o?l._`${L}, ${H}, ${J}${Y}`:H,m=[[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,Z)],[E.default.parentData,W.parentData],[E.default.parentDataProperty,W.parentDataProperty],[E.default.rootData,E.default.rootData]];W.opts.dynamicRef&&m.push([E.default.dynamicAnchors,E.default.dynamicAnchors]);const w=l._`${u}, ${V.object(...m)}`;return D!==l.nil?l._`${Q}.call(${D}, ${w})`:l._`${Q}(${w})`};const N=l._`new RegExp`;r.usePattern=function M({gen:L,it:{opts:H}},V){const J=H.unicodeRegExp?"u":"",{regExp:Y}=H.code,Z=Y(V,J);return L.scopeValue("pattern",{key:Z.toString(),ref:Z,code:l._`${"new RegExp"===Y.code?N:(0,S.useFunc)(L,Y)}(${V}, ${J})`})},r.validateArray=function P(L){const{gen:H,data:V,keyword:J,it:Y}=L,Z=H.name("valid");if(Y.allErrors){const Q=H.let("valid",!0);return W(()=>H.assign(Q,!1)),Q}return H.var(Z,!0),W(()=>H.break()),Z;function W(Q){const D=H.const("len",l._`${V}.length`);H.forRange("i",0,D,o=>{L.subschema({keyword:J,dataProp:o,dataPropType:_.Type.Num},Z),H.if((0,l.not)(Z),Q)})}},r.validateUnion=function R(L){const{gen:H,schema:V,keyword:J,it:Y}=L;if(!Array.isArray(V))throw new Error("ajv implementation error");if(V.some(D=>(0,_.alwaysValidSchema)(Y,D))&&!Y.opts.unevaluated)return;const W=H.let("valid",!1),Q=H.name("_valid");H.block(()=>V.forEach((D,o)=>{const u=L.subschema({keyword:J,schemaProp:o,compositeRule:!0},Q);H.assign(W,l._`${W} || ${Q}`),L.mergeValidEvaluated(u,Q)||H.if((0,l.not)(W))})),L.result(W,()=>L.reset(),()=>L.error(!0))}},2079:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const d={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};r.default=d},34943:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(2079),_=d(46848),E=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",l.default,_.default];r.default=E},46848:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.callRef=r.getValidate=void 0;const l=d(74827),_=d(99306),E=d(33987),S=d(32861),a=d(13427),h=d(37012),g={keyword:"$ref",schemaType:"string",code(b){const{gen:A,schema:O,it:C}=b,{baseId:T,schemaEnv:N,validateName:M,opts:P,self:R}=C,{root:L}=N;if(("#"===O||"#/"===O)&&T===L.baseId)return function V(){if(N===L)return v(b,M,N,N.$async);const Z=A.scopeValue("root",{ref:L});return v(b,E._`${Z}.validate`,L,L.$async)}();const H=a.resolveRef.call(R,L,T,O);if(void 0===H)throw new l.default(C.opts.uriResolver,T,O);return H instanceof a.SchemaEnv?function J(Z){const W=y(b,Z);v(b,W,Z,Z.$async)}(H):function Y(Z){const W=A.scopeValue("schema",!0===P.code.source?{ref:Z,code:(0,E.stringify)(Z)}:{ref:Z}),Q=A.name("valid"),D=b.subschema({schema:Z,dataTypes:[],schemaPath:E.nil,topSchemaRef:W,errSchemaPath:O},Q);b.mergeEvaluated(D),b.ok(Q)}(H)}};function y(b,A){const{gen:O}=b;return A.validate?O.scopeValue("validate",{ref:A.validate}):E._`${O.scopeValue("wrapper",{ref:A})}.validate`}function v(b,A,O,C){const{gen:T,it:N}=b,{allErrors:M,schemaEnv:P,opts:R}=N,L=R.passContext?S.default.this:E.nil;function J(Z){const W=E._`${Z}.errors`;T.assign(S.default.vErrors,E._`${S.default.vErrors} === null ? ${W} : ${S.default.vErrors}.concat(${W})`),T.assign(S.default.errors,E._`${S.default.vErrors}.length`)}function Y(Z){var W;if(!N.opts.unevaluated)return;const Q=null===(W=O?.validate)||void 0===W?void 0:W.evaluated;if(!0!==N.props)if(Q&&!Q.dynamicProps)void 0!==Q.props&&(N.props=h.mergeEvaluated.props(T,Q.props,N.props));else{const D=T.var("props",E._`${Z}.evaluated.props`);N.props=h.mergeEvaluated.props(T,D,N.props,E.Name)}if(!0!==N.items)if(Q&&!Q.dynamicItems)void 0!==Q.items&&(N.items=h.mergeEvaluated.items(T,Q.items,N.items));else{const D=T.var("items",E._`${Z}.evaluated.items`);N.items=h.mergeEvaluated.items(T,D,N.items,E.Name)}}C?function H(){if(!P.$async)throw new Error("async schema referenced by sync schema");const Z=T.let("valid");T.try(()=>{T.code(E._`await ${(0,_.callValidateCode)(b,A,L)}`),Y(A),M||T.assign(Z,!0)},W=>{T.if(E._`!(${W} instanceof ${N.ValidationError})`,()=>T.throw(W)),J(W),M||T.assign(Z,!1)}),b.ok(Z)}():function V(){b.result((0,_.callValidateCode)(b,A,L),()=>Y(A),()=>J(A))}()}r.getValidate=y,r.callRef=v,r.default=g},37703:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(56814),E=d(13427),S=d(37012),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:g,tagName:y}})=>g===_.DiscrError.Tag?`tag "${y}" must be string`:`value of tag "${y}" must be in oneOf`,params:({params:{discrError:g,tag:y,tagName:v}})=>l._`{error: ${g}, tag: ${v}, tagValue: ${y}}`},code(g){const{gen:y,data:v,schema:b,parentSchema:A,it:O}=g,{oneOf:C}=A;if(!O.opts.discriminator)throw new Error("discriminator: requires discriminator option");const T=b.propertyName;if("string"!=typeof T)throw new Error("discriminator: requires propertyName");if(b.mapping)throw new Error("discriminator: mapping is not supported");if(!C)throw new Error("discriminator: requires oneOf keyword");const N=y.let("valid",!1),M=y.const("tag",l._`${v}${(0,l.getProperty)(T)}`);function R(H){const V=y.name("valid"),J=g.subschema({keyword:"oneOf",schemaProp:H},V);return g.mergeEvaluated(J,l.Name),V}y.if(l._`typeof ${M} == "string"`,()=>function P(){const H=function L(){var H;const V={},J=Z(A);let Y=!0;for(let D=0;Dg.error(!1,{discrError:_.DiscrError.Tag,tag:M,tagName:T})),g.ok(N)}};r.default=h},56814:(ne,r)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.DiscrError=void 0,(l=r.DiscrError||(r.DiscrError={})).Tag="tag",l.Mapping="mapping"},45502:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(34943),_=d(94672),E=d(35860),S=d(11562),a=d(19355),h=[l.default,_.default,(0,E.default)(),S.default,a.metadataVocabulary,a.contentVocabulary];r.default=h},95615:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:S})=>l.str`must match format "${S}"`,params:({schemaCode:S})=>l._`{format: ${S}}`},code(S,a){const{gen:h,data:g,$data:y,schema:v,schemaCode:b,it:A}=S,{opts:O,errSchemaPath:C,schemaEnv:T,self:N}=A;O.validateFormats&&(y?function M(){const R=h.scopeValue("formats",{ref:N.formats,code:O.code.formats}),L=h.const("fDef",l._`${R}[${b}]`),H=h.let("fType"),V=h.let("format");h.if(l._`typeof ${L} == "object" && !(${L} instanceof RegExp)`,()=>h.assign(H,l._`${L}.type || "string"`).assign(V,l._`${L}.validate`),()=>h.assign(H,l._`"string"`).assign(V,L)),S.fail$data((0,l.or)(function J(){return!1===O.strictSchema?l.nil:l._`${b} && !${V}`}(),function Y(){const Z=T.$async?l._`(${L}.async ? await ${V}(${g}) : ${V}(${g}))`:l._`${V}(${g})`,W=l._`(typeof ${V} == "function" ? ${Z} : ${V}.test(${g}))`;return l._`${V} && ${V} !== true && ${H} === ${a} && !${W}`}()))}():function P(){const R=N.formats[v];if(!R)return void function J(){if(!1===O.strictSchema)return void N.logger.warn(W());throw new Error(W());function W(){return`unknown format "${v}" ignored in schema at path "${C}"`}}();if(!0===R)return;const[L,H,V]=function Y(W){const Q=W instanceof RegExp?(0,l.regexpCode)(W):O.code.formats?l._`${O.code.formats}${(0,l.getProperty)(v)}`:void 0,D=h.scopeValue("formats",{key:v,ref:W,code:Q});return"object"!=typeof W||W instanceof RegExp?["string",W,D]:[W.type||"string",W.validate,l._`${D}.validate`]}(R);L===a&&S.pass(function Z(){if("object"==typeof R&&!(R instanceof RegExp)&&R.async){if(!T.$async)throw new Error("async format in sync schema");return l._`await ${V}(${g})`}return"function"==typeof H?l._`${V}(${g})`:l._`${V}.test(${g})`}())}())}};r.default=E},11562:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const _=[d(95615).default];r.default=_},19355:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.contentVocabulary=r.metadataVocabulary=void 0,r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},94118:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),E=d(86947),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:h})=>l._`{allowedValue: ${h}}`},code(h){const{gen:g,data:y,$data:v,schemaCode:b,schema:A}=h;v||A&&"object"==typeof A?h.fail$data(l._`!${(0,_.useFunc)(g,E.default)}(${y}, ${b})`):h.fail(l._`${A} !== ${y}`)}};r.default=a},61905:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),E=d(86947),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:h})=>l._`{allowedValues: ${h}}`},code(h){const{gen:g,data:y,$data:v,schema:b,schemaCode:A,it:O}=h;if(!v&&0===b.length)throw new Error("enum must have non-empty array");const C=b.length>=O.opts.loopEnum;let T;const N=()=>T??(T=(0,_.useFunc)(g,E.default));let M;if(C||v)M=g.let("valid"),h.block$data(M,function P(){g.assign(M,!1),g.forOf("v",A,L=>g.if(l._`${N()}(${y}, ${L})`,()=>g.assign(M,!0).break()))});else{if(!Array.isArray(b))throw new Error("ajv implementation error");const L=g.const("vSchema",A);M=(0,l.or)(...b.map((H,V)=>function R(L,H){const V=b[H];return"object"==typeof V&&null!==V?l._`${N()}(${y}, ${L}[${H}])`:l._`${y} === ${V}`}(L,V)))}h.pass(M)}};r.default=a},94672:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(98588),_=d(35389),E=d(82383),S=d(99082),a=d(13981),h=d(93590),g=d(78062),y=d(9754),v=d(94118),b=d(61905),A=[l.default,_.default,E.default,S.default,a.default,h.default,g.default,y.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},v.default,b.default];r.default=A},78062:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),E={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:S,schemaCode:a}){const h="maxItems"===S?"more":"fewer";return l.str`must NOT have ${h} than ${a} items`},params:({schemaCode:S})=>l._`{limit: ${S}}`},code(S){const{keyword:a,data:h,schemaCode:g}=S,y="maxItems"===a?l.operators.GT:l.operators.LT;S.fail$data(l._`${h}.length ${y} ${g}`)}};r.default=E},82383:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=d(37012),E=d(75603),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:h,schemaCode:g}){const y="maxLength"===h?"more":"fewer";return l.str`must NOT have ${y} than ${g} characters`},params:({schemaCode:h})=>l._`{limit: ${h}}`},code(h){const{keyword:g,data:y,schemaCode:v,it:b}=h,A="maxLength"===g?l.operators.GT:l.operators.LT,O=!1===b.opts.unicode?l._`${y}.length`:l._`${(0,_.useFunc)(h.gen,E.default)}(${y})`;h.fail$data(l._`${O} ${A} ${v}`)}};r.default=a},98588:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),_=l.operators,E={maximum:{okStr:"<=",ok:_.LTE,fail:_.GT},minimum:{okStr:">=",ok:_.GTE,fail:_.LT},exclusiveMaximum:{okStr:"<",ok:_.LT,fail:_.GTE},exclusiveMinimum:{okStr:">",ok:_.GT,fail:_.LTE}},S={message:({keyword:h,schemaCode:g})=>l.str`must be ${E[h].okStr} ${g}`,params:({keyword:h,schemaCode:g})=>l._`{comparison: ${E[h].okStr}, limit: ${g}}`},a={keyword:Object.keys(E),type:"number",schemaType:"number",$data:!0,error:S,code(h){const{keyword:g,data:y,schemaCode:v}=h;h.fail$data(l._`${y} ${E[g].fail} ${v} || isNaN(${y})`)}};r.default=a},13981:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),E={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:S,schemaCode:a}){const h="maxProperties"===S?"more":"fewer";return l.str`must NOT have ${h} than ${a} properties`},params:({schemaCode:S})=>l._`{limit: ${S}}`},code(S){const{keyword:a,data:h,schemaCode:g}=S,y="maxProperties"===a?l.operators.GT:l.operators.LT;S.fail$data(l._`Object.keys(${h}).length ${y} ${g}`)}};r.default=E},35389:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(33987),E={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:S})=>l.str`must be multiple of ${S}`,params:({schemaCode:S})=>l._`{multipleOf: ${S}}`},code(S){const{gen:a,data:h,schemaCode:g,it:y}=S,v=y.opts.multipleOfPrecision,b=a.let("res"),A=v?l._`Math.abs(Math.round(${b}) - ${b}) > 1e-${v}`:l._`${b} !== parseInt(${b})`;S.fail$data(l._`(${g} === 0 || (${b} = ${h}/${g}, ${A}))`)}};r.default=E},99082:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(99306),_=d(33987),S={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>_.str`must match pattern "${a}"`,params:({schemaCode:a})=>_._`{pattern: ${a}}`},code(a){const{data:h,$data:g,schema:y,schemaCode:v,it:b}=a,A=b.opts.unicodeRegExp?"u":"",O=g?_._`(new RegExp(${v}, ${A}))`:(0,l.usePattern)(a,y);a.fail$data(_._`!${O}.test(${h})`)}};r.default=S},93590:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(99306),_=d(33987),E=d(37012),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:h}})=>_.str`must have required property '${h}'`,params:({params:{missingProperty:h}})=>_._`{missingProperty: ${h}}`},code(h){const{gen:g,schema:y,schemaCode:v,data:b,$data:A,it:O}=h,{opts:C}=O;if(!A&&0===y.length)return;const T=y.length>=C.loopRequired;if(O.allErrors?function N(){if(T||A)h.block$data(_.nil,P);else for(const L of y)(0,l.checkReportMissingProp)(h,L)}():function M(){const L=g.let("missing");if(T||A){const H=g.let("valid",!0);h.block$data(H,()=>function R(L,H){h.setParams({missingProperty:L}),g.forOf(L,v,()=>{g.assign(H,(0,l.propertyInData)(g,b,L,C.ownProperties)),g.if((0,_.not)(H),()=>{h.error(),g.break()})},_.nil)}(L,H)),h.ok(H)}else g.if((0,l.checkMissingProp)(h,y,L)),(0,l.reportMissingProp)(h,L),g.else()}(),C.strictRequired){const L=h.parentSchema.properties,{definedProperties:H}=h.it;for(const V of y)if(void 0===L?.[V]&&!H.has(V)){const Y=`required property "${V}" is not defined at "${O.schemaEnv.baseId+O.errSchemaPath}" (strictRequired)`;(0,E.checkStrictMode)(O,Y,O.opts.strictRequired)}}function P(){g.forOf("prop",v,L=>{h.setParams({missingProperty:L}),g.if((0,l.noPropertyInData)(g,b,L,C.ownProperties),()=>h.error())})}}};r.default=a},9754:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(86258),_=d(33987),E=d(37012),S=d(86947),h={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:g,j:y}})=>_.str`must NOT have duplicate items (items ## ${y} and ${g} are identical)`,params:({params:{i:g,j:y}})=>_._`{i: ${g}, j: ${y}}`},code(g){const{gen:y,data:v,$data:b,schema:A,parentSchema:O,schemaCode:C,it:T}=g;if(!b&&!A)return;const N=y.let("valid"),M=O.items?(0,l.getSchemaTypes)(O.items):[];function L(V,J){const Y=y.name("item"),Z=(0,l.checkDataTypes)(M,Y,T.opts.strictNumbers,l.DataType.Wrong),W=y.const("indices",_._`{}`);y.for(_._`;${V}--;`,()=>{y.let(Y,_._`${v}[${V}]`),y.if(Z,_._`continue`),M.length>1&&y.if(_._`typeof ${Y} == "string"`,_._`${Y} += "_"`),y.if(_._`typeof ${W}[${Y}] == "number"`,()=>{y.assign(J,_._`${W}[${Y}]`),g.error(),y.assign(N,!1).break()}).code(_._`${W}[${Y}] = ${V}`)})}function H(V,J){const Y=(0,E.useFunc)(y,S.default),Z=y.name("outer");y.label(Z).for(_._`;${V}--;`,()=>y.for(_._`${J} = ${V}; ${J}--;`,()=>y.if(_._`${Y}(${v}[${V}], ${v}[${J}])`,()=>{g.error(),y.assign(N,!1).break(Z)})))}g.block$data(N,function P(){const V=y.let("i",_._`${v}.length`),J=y.let("j");g.setParams({i:V,j:J}),y.assign(N,!0),y.if(_._`${V} > 1`,()=>(function R(){return M.length>0&&!M.some(V=>"object"===V||"array"===V)}()?L:H)(V,J))},_._`${C} === false`),g.ok(N)}};r.default=h},85958:(ne,r,d)=>{var l=d(73502).Buffer;ne.exports=function(E){for(var S={},a=E.length,h=E.charAt(0),g=0;g>=8;for(;P>0;)C.push(255&P),P>>=8}for(var R=0;O[R]===h&&R0;)C.push(M%a),M=M/a|0}for(var P="",R=0;0===O[R]&&R=0;--L)P+=E[C[L]];return P},decodeUnsafe:b,decode:function A(O){var C=b(O);if(C)return C;throw new Error("Non-base"+a+" character")}}}},11545:(ne,r,d)=>{var l=d(85958);ne.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},7714:function(ne){ne.exports=function(){"use strict";var r=Object.prototype.toString,d=Array.isArray||function(Q){return"[object Array]"===r.call(Q)};function l(W){return"function"==typeof W}function _(W){return d(W)?"array":typeof W}function E(W){return W.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function S(W,Q){return null!=W&&"object"==typeof W&&Q in W}function a(W,Q){return null!=W&&"object"!=typeof W&&W.hasOwnProperty&&W.hasOwnProperty(Q)}var h=RegExp.prototype.test;function g(W,Q){return h.call(W,Q)}var y=/\S/;function v(W){return!g(y,W)}var b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(W){return String(W).replace(/[&<>"'`=\/]/g,function(D){return b[D]})}var O=/\s*/,C=/\s+/,T=/\s*=/,N=/\s*\}/,M=/#|\^|\/|>|\{|&|=|!/;function P(W,Q){if(!W)return[];var p,B,ie,D=!1,o=[],u=[],m=[],w=!1,x=!1,F="",G=0;function k(){if(w&&!x)for(;m.length;)delete u[m.pop()];else m=[];w=!1,x=!1}function te(ae){if("string"==typeof ae&&(ae=ae.split(C,2)),!d(ae)||2!==ae.length)throw new Error("Invalid tags: "+ae);p=new RegExp(E(ae[0])+"\\s*"),B=new RegExp("\\s*"+E(ae[1])),ie=new RegExp("\\s*"+E("}"+ae[1]))}te(Q||Y.tags);for(var ue,we,me,ve,ce,he,ee=new H(W);!ee.eos();){if(ue=ee.pos,me=ee.scanUntil(p))for(var le=0,de=me.length;le0?o[o.length-1][4]:Q;break;default:D.push(u)}return Q}function H(W){this.string=W,this.tail=W,this.pos=0}function V(W,Q){this.view=W,this.cache={".":this.view},this.parent=Q}function J(){this.templateCache={_cache:{},set:function(Q,D){this._cache[Q]=D},get:function(Q){return this._cache[Q]},clear:function(){this._cache={}}}}H.prototype.eos=function(){return""===this.tail},H.prototype.scan=function(Q){var D=this.tail.match(Q);if(!D||0!==D.index)return"";var o=D[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},H.prototype.scanUntil=function(Q){var o,D=this.tail.search(Q);switch(D){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,D),this.tail=this.tail.substring(D)}return this.pos+=o.length,o},V.prototype.push=function(Q){return new V(Q,this)},V.prototype.lookup=function(Q){var o,D=this.cache;if(D.hasOwnProperty(Q))o=D[Q];else{for(var m,w,x,u=this,F=!1;u;){if(Q.indexOf(".")>0)for(m=u.view,w=Q.split("."),x=0;null!=m&&x"===F?G=this.renderPartial(x,D,o,m):"&"===F?G=this.unescapedValue(x,D):"name"===F?G=this.escapedValue(x,D):"text"===F&&(G=this.rawValue(x)),void 0!==G&&(w+=G);return w},J.prototype.renderSection=function(Q,D,o,u){var m=this,w="",x=D.lookup(Q[1]);function F(p){return m.render(p,D,o)}if(x){if(d(x))for(var G=0,k=x.length;G0||!o)&&(m[w]=u+m[w]);return m.join("\n")},J.prototype.renderPartial=function(Q,D,o,u){if(o){var m=l(o)?o(Q[1]):o[Q[1]];if(null!=m){var w=Q[6],x=Q[5],F=Q[4],G=m;return 0==x&&F&&(G=this.indentPartial(m,F,w)),this.renderTokens(this.parse(G,u),D,o,G)}}},J.prototype.unescapedValue=function(Q,D){var o=D.lookup(Q[1]);if(null!=o)return o},J.prototype.escapedValue=function(Q,D){var o=D.lookup(Q[1]);if(null!=o)return Y.escape(o)},J.prototype.rawValue=function(Q){return Q[1]};var Y={name:"mustache.js",version:"4.0.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(W){Z.templateCache=W},get templateCache(){return Z.templateCache}},Z=new J;return Y.clearCache=function(){return Z.clearCache()},Y.parse=function(Q,D){return Z.parse(Q,D)},Y.render=function(Q,D,o,u){if("string"!=typeof Q)throw new TypeError('Invalid template! Template should be a "string" but "'+_(Q)+'" was given as the first argument for mustache#render(template, view, partials)');return Z.render(Q,D,o,u)},Y.escape=A,Y.Scanner=H,Y.Context=V,Y.Writer=J,Y}()},96846:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;var l=d(33052);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}})},42694:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;var l=d(33052);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},444:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.AccountMultisig=r.Account2FA=void 0;var l=d(33052);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},46507:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.connect=void 0;const _=d(54576);r.connect=function E(S){return l(this,void 0,void 0,function*(){return new _.Near(S)})}},82692:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(a,h,g,y){void 0===y&&(y=g);var v=Object.getOwnPropertyDescriptor(h,g);(!v||("get"in v?!h.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return h[g]}}),Object.defineProperty(a,y,v)}:function(a,h,g,y){void 0===y&&(y=g),a[y]=h[g]}),_=this&&this.__setModuleDefault||(Object.create?function(a,h){Object.defineProperty(a,"default",{enumerable:!0,value:h})}:function(a,h){a.default=h}),E=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var h={};if(null!=a)for(var g in a)"default"!==g&&Object.prototype.hasOwnProperty.call(a,g)&&l(h,a,g);return _(h,a),h},S=this&&this.__exportStar||function(a,h){for(var g in a)"default"!==g&&!Object.prototype.hasOwnProperty.call(h,g)&&l(h,a,g)};Object.defineProperty(r,"__esModule",{value:!0}),r.keyStores=void 0,r.keyStores=E(d(28753)),S(d(14293),r),S(d(46507),r)},14293:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(P,R,L,H){void 0===H&&(H=L);var V=Object.getOwnPropertyDescriptor(R,L);(!V||("get"in V?!R.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return R[L]}}),Object.defineProperty(P,H,V)}:function(P,R,L,H){void 0===H&&(H=L),P[H]=R[L]}),_=this&&this.__setModuleDefault||(Object.create?function(P,R){Object.defineProperty(P,"default",{enumerable:!0,value:R})}:function(P,R){P.default=R}),E=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var R={};if(null!=P)for(var L in P)"default"!==L&&Object.prototype.hasOwnProperty.call(P,L)&&l(R,P,L);return _(R,P),R};Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=r.KeyPair=r.Signer=r.InMemorySigner=r.Contract=r.Connection=r.Account=r.multisig=r.validators=r.transactions=r.utils=r.providers=r.accountCreator=void 0;const S=E(d(91398));r.providers=S;const a=E(d(55183));r.utils=a;const h=E(d(63094));r.transactions=h;const g=E(d(81840));r.validators=g;const y=d(96846);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return y.Account}});const v=E(d(444));r.multisig=v;const b=E(d(42694));r.accountCreator=b;const A=d(78025);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return A.Connection}});const O=d(85647);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return O.Signer}}),Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return O.InMemorySigner}});const C=d(77396);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return C.Contract}});const T=d(35802);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const N=d(54576);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return N.Near}});const M=d(49899);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},78025:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;var l=d(33052);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return l.Connection}})},77396:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;var l=d(33052);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return l.Contract}})},28753:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.BrowserLocalStorageKeyStore=r.InMemoryKeyStore=r.KeyStore=void 0;const l=d(123);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const _=d(27257);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return _.InMemoryKeyStore}});const E=d(89065);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const S=d(50999);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return S.MergeKeyStore}})},89065:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(99322);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},27257:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;var l=d(82081);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},123:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;var l=d(82081);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},50999:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;var l=d(82081);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},54576:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;var l=d(44802);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}})},91398:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorContext=r.TypedError=r.getTransactionLastResult=r.FinalExecutionStatusBasic=r.JsonRpcProvider=r.Provider=void 0;const l=d(57821);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const _=d(90520);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}})},90520:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcProvider=r.TypedError=r.ErrorContext=void 0;var l=d(17527);Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var _=d(1656);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}})},57821:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FinalExecutionStatusBasic=r.ExecutionStatusBasic=r.IdType=r.Provider=r.getTransactionLastResult=void 0;var l=d(13162);Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var _=d(1656);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return _.Provider}});var E=d(17527);Object.defineProperty(r,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(r,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},85647:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(76999);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return l.Signer}})},63094:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.transfer=r.stake=r.functionCallAccessKey=r.functionCall=r.fullAccessKey=r.deployContract=r.deleteKey=r.deleteAccount=r.createAccount=r.addKey=r.encodeDelegateAction=r.encodeSignedDelegate=r.Transaction=r.SignedTransaction=r.Signature=r.signTransaction=r.createTransaction=r.SCHEMA=r.Transfer=r.Stake=r.FunctionCallPermission=r.FunctionCall=r.FullAccessPermission=r.DeployContract=r.DeleteKey=r.DeleteAccount=r.CreateAccount=r.AddKey=r.AccessKeyPermission=r.AccessKey=r.Action=r.stringifyJsonOrBytes=void 0;var l=d(60898);Object.defineProperty(r,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(r,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(r,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(r,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(r,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(r,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(r,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(r,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(r,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(r,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(r,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(r,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(r,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(r,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(r,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(r,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(r,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(r,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(r,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(r,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(r,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(r,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const _=d(60898);r.addKey=(C,T)=>_.actionCreators.addKey(C,T);r.createAccount=()=>_.actionCreators.createAccount();r.deleteAccount=C=>_.actionCreators.deleteAccount(C);r.deleteKey=C=>_.actionCreators.deleteKey(C);r.deployContract=C=>_.actionCreators.deployContract(C);r.fullAccessKey=()=>_.actionCreators.fullAccessKey();r.functionCall=(C,T,N,M,P,R)=>_.actionCreators.functionCall(C,T,N,M,P,R);r.functionCallAccessKey=(C,T,N)=>_.actionCreators.functionCallAccessKey(C,T,N);r.stake=(C,T)=>_.actionCreators.stake(C,T);r.transfer=C=>_.actionCreators.transfer(C)},12524:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Enum=r.Assignable=void 0;var l=d(17527);Object.defineProperty(r,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});r.Enum=class _{constructor(S){if(1!==Object.keys(S).length)throw new Error("Enum can only take single value");Object.keys(S).map(a=>{this[a]=S[a],this.enum=a})}}},72064:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=r.TypedError=r.PositionalArgsError=r.ErrorContext=r.ArgumentTypeError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=void 0;var l=d(33052);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var _=d(17527);Object.defineProperty(r,"ArgumentTypeError",{enumerable:!0,get:function(){return _.ArgumentTypeError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}}),Object.defineProperty(r,"PositionalArgsError",{enumerable:!0,get:function(){return _.PositionalArgsError}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}});var E=d(13162);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},53174:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION_EXP=r.NEAR_NOMINATION=void 0;var l=d(13162);Object.defineProperty(r,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(r,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(r,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(r,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},55183:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(C,T,N,M){void 0===M&&(M=N);var P=Object.getOwnPropertyDescriptor(T,N);(!P||("get"in P?!T.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return T[N]}}),Object.defineProperty(C,M,P)}:function(C,T,N,M){void 0===M&&(M=N),C[M]=T[N]}),_=this&&this.__setModuleDefault||(Object.create?function(C,T){Object.defineProperty(C,"default",{enumerable:!0,value:T})}:function(C,T){C.default=T}),E=this&&this.__importStar||function(C){if(C&&C.__esModule)return C;var T={};if(null!=C)for(var N in C)"default"!==N&&Object.prototype.hasOwnProperty.call(C,N)&&l(T,C,N);return _(T,C),T};Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=r.logWarning=r.rpc_errors=r.KeyPairEd25519=r.KeyPair=r.PublicKey=r.format=r.enums=r.web=r.serialize=r.key_pair=void 0;const S=E(d(35802));r.key_pair=S;const a=E(d(41327));r.serialize=a;const h=E(d(86332));r.web=h;const g=E(d(12524));r.enums=g;const y=E(d(53174));r.format=y;const v=E(d(25678));r.rpc_errors=v;const b=d(35802);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return b.PublicKey}}),Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return b.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return b.KeyPairEd25519}});const A=d(72064);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return A.logWarning}});const O=d(74920);Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return O.Logger}})},35802:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyType=r.KeyPairEd25519=r.KeyPair=void 0;var l=d(79189);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},74920:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;var l=d(13162);Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return l.Logger}})},25678:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ServerError=r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=void 0;var l=d(13162);Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},41327:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.base_decode=r.base_encode=r.deserialize=r.serialize=void 0;var l=d(51814);Object.defineProperty(r,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(r,"deserialize",{enumerable:!0,get:function(){return l.deserialize}});var _=d(13162);Object.defineProperty(r,"base_encode",{enumerable:!0,get:function(){return _.baseEncode}}),Object.defineProperty(r,"base_decode",{enumerable:!0,get:function(){return _.baseDecode}})},86332:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=void 0;var l=d(1656);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},81840:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findSeatPrice=r.diffEpochValidators=void 0;var l=d(13162);Object.defineProperty(r,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(r,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},49899:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=void 0;var l=d(44802);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},77131:(ne,r)=>{"use strict";r.__esModule=!0,r.DecodeBuffer=r.EncodeBuffer=void 0;var d=function(){function _(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return _.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},_.prototype.consume_value=function(E){var S=E.substring(1),a=parseInt(S)/8;this.assert_enough_buffer(a);var h="f"===E[0]?"getFloat".concat(S):"i"===E[0]?"getInt".concat(S):"getUint".concat(S),g=this.view[h](this.offset,!0);return this.offset+=a,g},_.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var S=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,S},_}();r.DecodeBuffer=l},77227:(ne,r,d)=>{"use strict";r.__esModule=!0,r.BorshDeserializer=void 0;var l=d(65399),_=d(77131),E=function(){function S(a){this.buffer=new _.DecodeBuffer(a)}return S.prototype.decode=function(a){return this.decode_value(a)},S.prototype.decode_value=function(a){if("string"==typeof a){if(l.integers.includes(a))return this.decode_integer(a);if("string"===a)return this.decode_string();if("bool"===a)return this.decode_boolean()}if("object"==typeof a){if("option"in a)return this.decode_option(a);if("enum"in a)return this.decode_enum(a);if("array"in a)return this.decode_array(a);if("set"in a)return this.decode_set(a);if("map"in a)return this.decode_map(a);if("struct"in a)return this.decode_struct(a)}throw new Error("Unsupported type: ".concat(a))},S.prototype.decode_integer=function(a){var h=parseInt(a.substring(1));return h<=32||"f64"==a?this.buffer.consume_value(a):this.decode_bigint(h,a.startsWith("i"))},S.prototype.decode_bigint=function(a,h){void 0===h&&(h=!1);var g=a/8,y=new Uint8Array(this.buffer.consume_bytes(g)),v=y.reduceRight(function(b,A){return b+A.toString(16).padStart(2,"0")},"");return h&&y[g-1]?BigInt.asIntN(a,BigInt("0x".concat(v))):BigInt("0x".concat(v))},S.prototype.decode_string=function(){var a=this.decode_integer("u32"),h=new Uint8Array(this.buffer.consume_bytes(a));return String.fromCharCode.apply(null,h)},S.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},S.prototype.decode_option=function(a){var h=this.buffer.consume_value("u8");if(1===h)return this.decode_value(a.option);if(0!==h)throw new Error("Invalid option ".concat(h));return null},S.prototype.decode_enum=function(a){var h,g=this.buffer.consume_value("u8");if(g>a.enum.length)throw new Error("Enum option ".concat(g," is not available"));var y=a.enum[g].struct,v=Object.keys(y)[0];return(h={})[v]=this.decode_value(y[v]),h},S.prototype.decode_array=function(a){for(var h=[],g=a.array.len?a.array.len:this.decode_integer("u32"),y=0;y>=BigInt(8);this.encoded.store_bytes(new Uint8Array(O))},y.prototype.encode_string=function(v){this.checkTypes&&h.expect_type(v,"string",this.fieldPath);var b=v;this.encoded.store_value(b.length,"u32");for(var A=0;A{"use strict";r.__esModule=!0,r.integers=void 0,r.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},29624:function(ne,r,d){"use strict";var M,l=this&&this.__extends||(M=function(P,R){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,H){L.__proto__=H}||function(L,H){for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(L[V]=H[V])})(P,R)},function(P,R){if("function"!=typeof R&&null!==R)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function L(){this.constructor=P}M(P,R),P.prototype=null===R?Object.create(R):(L.prototype=R.prototype,new L)});r.__esModule=!0,r.validate_schema=r.ErrorSchema=r.expect_enum=r.expect_same_size=r.expect_bigint=r.expect_type=r.isArrayLike=void 0;var _=d(65399);r.isArrayLike=function E(M){return Array.isArray(M)||!!M&&"object"==typeof M&&"length"in M&&"number"==typeof M.length&&(0===M.length||M.length>0&&M.length-1 in M)},r.expect_type=function S(M,P,R){if(typeof M!==P)throw new Error("Expected ".concat(P," not ").concat(typeof M,"(").concat(M,") at ").concat(R.join(".")))},r.expect_bigint=function a(M,P){if(!["number","string","bigint","boolean"].includes(typeof M)&&!("object"==typeof M&&null!==M&&"toString"in M))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))},r.expect_same_size=function h(M,P,R){if(M!==P)throw new Error("Array length ".concat(M," does not match schema length ").concat(P," at ").concat(R.join(".")))},r.expect_enum=function g(M,P){if("object"!=typeof M||null===M)throw new Error("Expected object not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))};var y=_.integers.concat(["bool","string"]),v=["option","enum","array","set","map","struct"],b=function(M){function P(R,L){var H="Invalid schema: ".concat(JSON.stringify(R)," expected ").concat(L);return M.call(this,H)||this}return l(P,M),P}(Error);function A(M){if("string"!=typeof M||!y.includes(M)){if(M&&"object"==typeof M){var P=Object.keys(M);if(1===P.length&&v.includes(P[0])){var R=P[0];if("option"===R)return A(M[R]);if("enum"===R)return function O(M){if(!Array.isArray(M))throw new b(M,"Array");for(var P=0,R=M;P{"use strict";ne.exports=function r({mustBeMetaMask:d=!1,silent:l=!1,timeout:_=3e3}={}){!function S(){if("boolean"!=typeof d)throw new Error("@metamask/detect-provider: Expected option 'mustBeMetaMask' to be a boolean.");if("boolean"!=typeof l)throw new Error("@metamask/detect-provider: Expected option 'silent' to be a boolean.");if("number"!=typeof _)throw new Error("@metamask/detect-provider: Expected option 'timeout' to be a number.")}();let E=!1;return new Promise(a=>{function h(){if(E)return;E=!0,window.removeEventListener("ethereum#initialized",h);const{ethereum:g}=window;!g||d&&!g.isMetaMask?(!l&&console.error("@metamask/detect-provider:",d&&g?"Non-MetaMask window.ethereum detected.":"Unable to detect window.ethereum."),a(null)):a(g)}window.ethereum?h():(window.addEventListener("ethereum#initialized",h,{once:!0}),setTimeout(()=>{h()},_))})}},73597:(ne,r,d)=>{"use strict";r.h=void 0;var _=d(1310);Object.defineProperty(r,"h",{enumerable:!0,get:function(){return _.setupMintbaseWallet}})},25697:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(b,A,O,C){void 0===C&&(C=O);var T=Object.getOwnPropertyDescriptor(A,O);(!T||("get"in T?!A.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return A[O]}}),Object.defineProperty(b,C,T)}:function(b,A,O,C){void 0===C&&(C=O),b[C]=A[O]}),_=this&&this.__setModuleDefault||(Object.create?function(b,A){Object.defineProperty(b,"default",{enumerable:!0,value:A})}:function(b,A){b.default=A}),E=this&&this.__importStar||function(b){if(b&&b.__esModule)return b;var A={};if(null!=b)for(var O in b)"default"!==O&&Object.prototype.hasOwnProperty.call(b,O)&&l(A,b,O);return _(A,b),A},S=this&&this.__awaiter||function(b,A,O,C){return new(O||(O=Promise))(function(N,M){function P(H){try{L(C.next(H))}catch(V){M(V)}}function R(H){try{L(C.throw(H))}catch(V){M(V)}}function L(H){H.done?N(H.value):function T(N){return N instanceof O?N:new O(function(M){M(N)})}(H.value).then(P,R)}L((C=C.apply(b,A||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.MintbaseWallet=r.TransactionSuccessEnum=void 0;const a=E(d(71836)),h=d(52107),g=d(32184);var b;(b=r.TransactionSuccessEnum||(r.TransactionSuccessEnum={})).MINT="mint",b.TRANSFER="transfer",b.BURN="burn",b.DEPLOY_STORE="deploy-store",b.MAKE_OFFER="make-offer",b.REVOKE_MINTER="revoke-minter",b.ADD_MINTER="add-minter",b.TRANSFER_STORE_OWNERSHIP="transfer-store-ownership",b.AUCTION_LIST="list",b.SIMPLE_SALE_LIST="simple-sale-list",b.UNLIST="unlist",b.TAKE_OFFER="take-offer",b.WITHDRAW_OFFER="withdraw-offer";r.MintbaseWallet=({metadata:b,options:A,successUrl:O,failureUrl:C,contractId:T,callback:N,networkId:M})=>S(void 0,void 0,void 0,function*(){const R=yield S(void 0,void 0,void 0,function*(){if(void 0!==typeof window){const{connect:F,WalletConnection:G,keyStores:k}=a,p={networkId:M,keyStore:new k.BrowserLocalStorageKeyStore,nodeUrl:A.network.nodeUrl,walletUrl:b.walletUrl,headers:{}},ie=new URL(window.location.href).searchParams.get("account_id");ie&&!T&&localStorage.setItem("mintbase-wallet_wallet_auth_key",JSON.stringify({accountId:ie,allKeys:[]}));const ee=new G(yield F(p),"mintbase-wallet");return localStorage.setItem("mintbase-wallet:callback_url",N),{wallet:ee}}return null});let L;const Z=F=>{if(F&&F!==R.wallet.getAccountId())throw new Error(`Cannot sign transactions for ${F} while signed in as ${L}`)},m=()=>S(void 0,void 0,void 0,function*(){var F;const G=R.wallet.getAccountId(),k=R.wallet.account();if(!G||!k)return[];const p=window.localStorage.getItem("mintbase-wallet:account-creation-data");return[{accountId:G,publicKey:null===(F=JSON.parse(p))||void 0===F?void 0:F.devicePublicKey}]}),x=F=>(L=F,window.localStorage.setItem("mintbase-wallet:activeAccountId",F),null);return{getAccountId:()=>L,isSignedIn:()=>S(void 0,void 0,void 0,function*(){return!!L}),signIn:()=>S(void 0,void 0,void 0,function*(){var F;const G=yield m(),k=encodeURI(null===(F=window?.location)||void 0===F?void 0:F.href);return G.length?G:(yield R.wallet.requestSignIn({methodNames:[],successUrl:O||k,failureUrl:C||k,contractId:T}),m())}),signOut:()=>S(void 0,void 0,void 0,function*(){window.localStorage.removeItem("mintbase-wallet:account-data"),R.wallet.isSignedIn()&&R.wallet.signOut()}),signAndSendTransaction:({receiverId:F,actions:G,signerId:k,callbackUrl:p})=>S(void 0,void 0,void 0,function*(){if(Z(k),!F&&!T)throw new Error("No receiver found to send the transaction to");const{cbUrl:B}=(0,h.getCallbackUrl)(p??""),ie=B||O;if(!T){const ee=new URL(`${b.walletUrl}/sign-transaction`),ue=JSON.stringify([{receiverId:F,signerId:k,actions:G}]),we=encodeURIComponent(ue);ee.searchParams.set("transactions_data",we),ee.searchParams.set("callback_url",ie),window.location.assign(ee.toString())}return R.wallet.account().signAndSendTransaction({receiverId:F||T,actions:G.map(ee=>(0,g.createAction)(ee)),walletCallbackUrl:ie})}),verifyOwner:()=>S(void 0,void 0,void 0,function*(){throw new Error(`The verifyOwner method is not supported by ${b.name}`)}),signMessage:()=>S(void 0,void 0,void 0,function*(){throw new Error(`The signMessage method is not supported by ${b.name}`)}),getAvailableBalance:()=>S(void 0,void 0,void 0,function*(){throw`The getAvailableBalance method is not supported by ${b.name}`}),getAccounts:m,switchAccount:F=>S(void 0,void 0,void 0,function*(){return x(F),null}),signAndSendTransactions:({transactions:F,callbackUrl:G})=>S(void 0,void 0,void 0,function*(){if(!R.wallet.isSignedIn())throw new Error("Wallet not signed in");const{cbUrl:k}=(0,h.getCallbackUrl)(G??"");for(const{signerId:te}of F)Z(te);const p=JSON.stringify(F),B=encodeURIComponent(p),ie=new URL(`${b.walletUrl}/sign-transaction`);ie.searchParams.set("transactions_data",B),ie.searchParams.set("callback_url",k),window.location.assign(ie.toString())})}})},1310:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.setupMintbaseWallet=void 0;const _=d(25697),E=d(52107),S="data:image/png;base64,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";r.setupMintbaseWallet=function a({walletUrl:h="",deprecated:g=!1,successUrl:y="",failureUrl:v="",callbackUrl:b="",contractId:A=""}={}){return O=>l(this,void 0,void 0,function*(){return{id:"mintbase-wallet",type:"browser",metadata:{name:"Mintbase Wallet",description:"NEAR wallet to store, buy, send and stake assets for DeFi.",iconUrl:S,deprecated:g,available:!0,successUrl:y,failureUrl:v,walletUrl:(0,E.resolveWalletUrl)(O.options.network.networkId,h)},init:T=>(0,_.MintbaseWallet)(Object.assign({callback:b,networkId:O.options.network.networkId,successUrl:y,failureUrl:v,contractId:A},T))}})}},52107:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.resolveWalletUrl=r.getCallbackUrl=r.checkCallbackUrl=void 0;const d=E=>{function S(a){return/^(https?|ftp|http?):\/\/[^\s/$.?#].[^\s]*$/.test(a)}if(!(null!==E&&E.length>0)){const a=localStorage.getItem("mintbase-wallet:callback_url");return S(a)?a:(console.warn("We recommend you to set the callbackUrl property on setupMintbaseWallet \n read more here: \n https://docs.mintbase.xyz/dev/mintbase-sdk-ref/wallet#setupmintbasewallet \n \n further help available on our telegram channel: \n https://t.me/mintdev"),new URL(window.location.href).toString())}return S(E)?E.startsWith("https://")||E.startsWith("http://")?E.endsWith("/")?E.slice(0,-1):E:new URL(window.location.href).toString():(console.error("callbackUrl set with wrong format. please use an URL with http:// or https:// instead.Further help available on our telegram channel: https://t.me/mintdev"),new URL(window.location.href).toString())};r.checkCallbackUrl=d;r.getCallbackUrl=E=>{var S,a,h,g,y,v;if(void 0!==typeof window){let b="";null!==(a=null===(S=window?.mbjs)||void 0===S?void 0:S.keys)&&void 0!==a&&a.callbackUrl&&(null===(g=null===(h=window?.mbjs)||void 0===h?void 0:h.keys)||void 0===g?void 0:g.callbackUrl.length)>0&&(b=null===(v=null===(y=window?.mbjs)||void 0===y?void 0:y.keys)||void 0===v?void 0:v.callbackUrl);const A=(null==localStorage?void 0:localStorage.getItem("mintbase-wallet:callback_url"))||b;return{cbUrl:d(E??A)}}return null};r.resolveWalletUrl=(E,S)=>{if(S)return S;switch(E){case"mainnet":return"https://wallet.mintbase.xyz";case"testnet":return"https://testnet.wallet.mintbase.xyz/";default:throw new Error("Invalid wallet url")}}},15139:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(Q,D,o,u){return new(o||(o=Promise))(function(w,x){function F(p){try{k(u.next(p))}catch(B){x(B)}}function G(p){try{k(u.throw(p))}catch(B){x(B)}}function k(p){p.done?w(p.value):function m(w){return w instanceof o?w:new o(function(x){x(w)})}(p.value).then(F,G)}k((u=u.apply(Q,D||[])).next())})},_=this&&this.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;const E=d(29761),S=d(89870),a=d(38445),h=d(17527),g=d(41166),y=_(d(98538)),v=d(21531),{addKey:b,createAccount:A,deleteAccount:O,deleteKey:C,deployContract:T,fullAccessKey:N,functionCall:M,functionCallAccessKey:P,stake:R,transfer:L}=a.actionCreators;function Y(Q){return JSON.parse(Buffer.from(Q).toString())}function Z(Q){return Buffer.from(JSON.stringify(Q))}class W{constructor(D,o){this.accessKeyByPublicKeyCache={},this.connection=D,this.accountId=o}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(D,o){return l(this,void 0,void 0,function*(){const u=yield this.findAccessKey(D,o);if(!u)throw new h.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:m}=u,x=(yield this.connection.provider.block({finality:"final"})).header.hash,F=m.nonce.add(new y.default(1));return yield(0,a.signTransaction)(D,F,o,(0,v.baseDecode)(x),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:D,actions:o,returnError:u}){return l(this,void 0,void 0,function*(){let m,w;const x=yield(0,S.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[m,w]=yield this.signTransaction(D,o);const F=w.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(w)}catch(G){if("InvalidNonce"===G.type)return(0,g.logWarning)(`Retrying transaction ${D}:${(0,v.baseEncode)(m)} with new nonce.`),delete this.accessKeyByPublicKeyCache[F.toString()],null;if("Expired"===G.type)return(0,g.logWarning)(`Retrying transaction ${D}:${(0,v.baseEncode)(m)} due to expired block hash`),null;throw G.context=new h.ErrorContext((0,v.baseEncode)(m)),G}}));if(!x)throw new h.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:w.transaction.receiverId,outcome:x}),!u&&"object"==typeof x.status&&"object"==typeof x.status.Failure&&null!==x.status.Failure)throw x.status.Failure.error_message&&x.status.Failure.error_type?new h.TypedError(`Transaction ${x.transaction_outcome.id} failed. ${x.status.Failure.error_message}`,x.status.Failure.error_type):(0,g.parseResultError)(x);return x})}findAccessKey(D,o){return l(this,void 0,void 0,function*(){const u=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!u)throw new h.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const m=this.accessKeyByPublicKeyCache[u.toString()];if(void 0!==m)return{publicKey:u,accessKey:m};try{const w=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:u.toString(),finality:"optimistic"}),x=Object.assign(Object.assign({},w),{nonce:new y.default(w.nonce)});return this.accessKeyByPublicKeyCache[u.toString()]?{publicKey:u,accessKey:this.accessKeyByPublicKeyCache[u.toString()]}:(this.accessKeyByPublicKeyCache[u.toString()]=x,{publicKey:u,accessKey:x})}catch(w){if("AccessKeyDoesNotExist"==w.type)return null;throw w}})}createAndDeployContract(D,o,u,m){return l(this,void 0,void 0,function*(){const w=N();return yield this.signAndSendTransaction({receiverId:D,actions:[A(),L(m),b(E.PublicKey.from(o),w),T(u)]}),new W(this.connection,D)})}sendMoney(D,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:D,actions:[L(o)]})})}createAccount(D,o,u){return l(this,void 0,void 0,function*(){const m=N();return this.signAndSendTransaction({receiverId:D,actions:[A(),L(u),b(E.PublicKey.from(o),m)]})})}deleteAccount(D){return l(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[O(D)]})})}deployContract(D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(D)]})})}encodeJSContractArgs(D,o,u){return Buffer.concat([Buffer.from(D),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(u)])}functionCall({contractId:D,methodName:o,args:u={},gas:m=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:w,walletMeta:x,walletCallbackUrl:F,stringify:G,jsContract:k}){return l(this,void 0,void 0,function*(){let p;if(this.validateArgs(u),k)p=["call_js_contract",this.encodeJSContractArgs(D,o,JSON.stringify(u)),m,w,null,!0];else{const B=void 0===G?a.stringifyJsonOrBytes:G;p=[o,u,m,w,B,!1]}return this.signAndSendTransaction({receiverId:k?this.connection.jsvmAccountId:D,actions:[M.apply(void 0,p)],walletMeta:x,walletCallbackUrl:F})})}addKey(D,o,u,m){return l(this,void 0,void 0,function*(){let w;return u||(u=[]),Array.isArray(u)||(u=[u]),w=o?P(o,u,m):N(),this.signAndSendTransaction({receiverId:this.accountId,actions:[b(E.PublicKey.from(D),w)]})})}deleteKey(D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[C(E.PublicKey.from(D))]})})}stake(D,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[R(o,E.PublicKey.from(D))]})})}signedDelegate({actions:D,blockHeightTtl:o,receiverId:u}){return l(this,void 0,void 0,function*(){const{provider:m,signer:w}=this.connection,{header:x}=yield m.block({finality:"final"}),{accessKey:F,publicKey:G}=yield this.findAccessKey(null,null),k=(0,a.buildDelegateAction)({actions:D,maxBlockHeight:new y.default(x.height).add(new y.default(o)),nonce:new y.default(F.nonce).add(new y.default(1)),publicKey:G,receiverId:u,senderId:this.accountId}),{signedDelegateAction:p}=yield(0,a.signDelegateAction)({delegateAction:k,signer:{sign:B=>l(this,void 0,void 0,function*(){const{signature:ie}=yield w.signMessage(B,k.senderId,this.connection.networkId);return ie})}});return p})}validateArgs(D){if((void 0===D.byteLength||D.byteLength!==D.length)&&(Array.isArray(D)||"object"!=typeof D))throw new h.PositionalArgsError}viewFunction({contractId:D,methodName:o,args:u={},parse:m=Y,stringify:w=Z,jsContract:x=!1,blockQuery:F={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let G;this.validateArgs(u),G=x?this.encodeJSContractArgs(D,o,Object.keys(u).length>0?JSON.stringify(u):""):w(u);const k=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},F),{account_id:x?this.connection.jsvmAccountId:D,method_name:x?"view_js_contract":o,args_base64:G.toString("base64")}));return k.logs&&(0,g.printTxOutcomeLogs)({contractId:D,logs:k.logs}),k.result&&k.result.length>0&&m(Buffer.from(k.result))})}viewState(D,o={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:u}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(D).toString("base64")}));return u.map(({key:m,value:w})=>({key:Buffer.from(m,"base64"),value:Buffer.from(w,"base64")}))})}getAccessKeys(){var D;return l(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(D=o?.keys)||void 0===D?void 0:D.map(u=>Object.assign(Object.assign({},u),{access_key:Object.assign(Object.assign({},u.access_key),{nonce:new y.default(u.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(u=>"FullAccess"!==u.access_key.permission).map(u=>{const m=u.access_key.permission;return{contractId:m.FunctionCall.receiver_id,amount:m.FunctionCall.allowance,publicKey:u.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const D=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),u=new y.default(D.runtime_config.storage_amount_per_byte),m=new y.default(o.storage_usage).mul(u),w=new y.default(o.locked),x=new y.default(o.amount).add(w),F=x.sub(y.default.max(w,m));return{total:x.toString(),stateStaked:m.toString(),staked:w.toString(),available:F.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const D=yield this.connection.provider.block({finality:"final"}),o=D.header.hash,u=D.header.epoch_id,{current_validators:m,next_validators:w,current_proposals:x}=yield this.connection.provider.validators(u),F=new Set;[...m,...w,...x].forEach(te=>F.add(te.account_id));const G=[...F],k=G.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),p=yield Promise.allSettled(k);if(p.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const ie=p.reduce((te,ee,ue)=>{const we=G[ue];if("fulfilled"===ee.status){const me=new y.default(ee.value);if(!me.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:we,amount:me.toString()}],total:te.total.add(me)})}return"rejected"===ee.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:we,error:ee.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new y.default(0)});return Object.assign(Object.assign({},ie),{total:ie.total.toString()})})}}r.Account=W},46398:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(L,H,V,J){return new(V||(V=Promise))(function(Z,W){function Q(u){try{o(J.next(u))}catch(m){W(m)}}function D(u){try{o(J.throw(u))}catch(m){W(m)}}function o(u){u.done?Z(u.value):function Y(Z){return Z instanceof V?Z:new V(function(W){W(Z)})}(u.value).then(Q,D)}o((J=J.apply(L,H||[])).next())})},_=this&&this.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account2FA=void 0;const E=d(29761),S=d(17527),a=d(89870),h=d(38445),g=_(d(98538)),y=d(64706),v=d(69865),b=d(3725),{addKey:A,deleteKey:O,deployContract:C,fullAccessKey:T,functionCall:N,functionCallAccessKey:M}=h.actionCreators;class P extends y.AccountMultisig{constructor(H,V,J){super(H,V,J),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=J.helperUrl||this.helperUrl,this.storage=J.storage,this.sendCode=J.sendCode||this.sendCodeDefault,this.getCode=J.getCode||this.getCodeDefault,this.verifyCode=J.verifyCode||this.verifyCodeDefault,this.onConfirmResult=J.onConfirmResult}signAndSendTransaction({receiverId:H,actions:V}){const J=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield J.signAndSendTransaction.call(this,{receiverId:H,actions:V}),yield this.sendCode();const Y=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(Y)),Y})}deployMultisig(H){const V=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:J}=this,Y=(yield this.getRecoveryMethods()).data.filter(({kind:m,publicKey:w})=>("phrase"===m||"ledger"===m)&&null!==w).map(m=>m.publicKey),Z=(yield this.getAccessKeys()).filter(({public_key:m,access_key:{permission:w}})=>"FullAccess"===w&&!Y.includes(m)).map(m=>m.public_key).map(R),W=R((yield this.postSignedJson("/2fa/getAccessKey",{accountId:J})).publicKey),Q=Buffer.from(JSON.stringify({num_confirmations:2})),D=[...Z.map(m=>O(m)),...Z.map(m=>A(m,M(J,v.MULTISIG_CHANGE_METHODS,null))),A(W,M(J,v.MULTISIG_CONFIRM_METHODS,null)),C(H)],o=D.concat(N("new",Q,v.MULTISIG_GAS,v.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",J);const{stateStatus:u}=yield this.checkMultisigCodeAndStateStatus(H);switch(u){case b.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield V.signAndSendTransactionWithAccount.call(this,J,o);case b.MultisigStateStatus.VALID_STATE:return yield V.signAndSendTransactionWithAccount.call(this,J,D);case b.MultisigStateStatus.INVALID_STATE:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:H,cleanupContractBytes:V}){return l(this,void 0,void 0,function*(){let J=[];V&&(yield this.deleteAllRequests().catch(Q=>Q),J=yield this.get2faDisableCleanupActions(V));const Y=yield this.get2faDisableKeyConversionActions(),Z=[...J,...Y,C(H)],W=yield this.findAccessKey(this.accountId,Z);if(W&&W.accessKey&&"FullAccess"!==W.accessKey.permission)throw new S.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,Z)})}get2faDisableCleanupActions(H){return l(this,void 0,void 0,function*(){const V=yield this.viewState("").catch(Y=>{const Z=Y.cause&&Y.cause.name;if("NO_CONTRACT_CODE"==Z)return[];throw"TOO_LARGE_CONTRACT_STATE"==Z?new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):Y}),J=V.map(({key:Y})=>Y.toString("base64"));return V.length?[C(H),N("clean",{keys:J},v.MULTISIG_GAS,new g.default("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,J=(yield this.getAccessKeys()).filter(({access_key:Z})=>"FullAccess"!==Z.permission).filter(({access_key:Z})=>{const W=Z.permission.FunctionCall;return W.receiver_id===H&&4===W.method_names.length&&W.method_names.includes("add_request_and_confirm")}),Y=E.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:H})).publicKey);return[O(Y),...J.map(({public_key:Z})=>O(E.PublicKey.from(Z))),...J.map(({public_key:Z})=>A(E.PublicKey.from(Z),T()))]})}disable(H,V){return l(this,void 0,void 0,function*(){const{stateStatus:J}=yield this.checkMultisigCodeAndStateStatus();if(J!==b.MultisigStateStatus.VALID_STATE&&J!==b.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let Y;yield this.deleteAllRequests().catch(Q=>Y=Q);const W=[...yield this.get2faDisableCleanupActions(V).catch(Q=>{throw"ContractHasExistingState"===Q.type&&Y||Q}),...yield this.get2faDisableKeyConversionActions(),C(H)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:W})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,{requestId:V}=this.getRequest(),J=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:H,method:J,requestId:V}),V})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const H=yield this.get2faMethod(),V=yield this.getCode(H);try{return yield this.verifyCode(V)}catch(J){if(console.warn("Error validating security code:",J),J.toString().includes("invalid 2fa code provided")||J.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw J}})}verifyCodeDefault(H){return l(this,void 0,void 0,function*(){const{accountId:V}=this,J=this.getRequest();if(!J)throw new Error("no request pending");const{requestId:Y}=J;return yield this.postSignedJson("/2fa/verify",{accountId:V,securityCode:H,requestId:Y})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:H}=this;return{accountId:H,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:H})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:H}=yield this.getRecoveryMethods();if(H&&H.length&&(H=H.find(Y=>0===Y.kind.indexOf("2fa-"))),!H)return null;const{kind:V,detail:J}=H;return{kind:V,detail:J}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,J=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),Y=yield this.connection.signer.signMessage(Buffer.from(J),H,this.connection.networkId);return{blockNumber:J,blockNumberSignature:Buffer.from(Y.signature).toString("base64")}})}postSignedJson(H,V){return l(this,void 0,void 0,function*(){return yield(0,a.fetchJson)(this.helperUrl+H,JSON.stringify(Object.assign(Object.assign({},V),yield this.signatureFor())))})}}r.Account2FA=P;const R=L=>E.PublicKey.from(L)},53683:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;const _=d(89870);class E{}r.AccountCreator=E;r.LocalAccountCreator=class S extends E{constructor(g,y){super(),this.masterAccount=g,this.initialBalance=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(g,y,this.initialBalance)})}};r.UrlAccountCreator=class a extends E{constructor(g,y){super(),this.connection=g,this.helperUrl=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield(0,_.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:g,newAccountPublicKey:y.toString()}))})}}},64706:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(C,T,N,M){return new(N||(N=Promise))(function(R,L){function H(Y){try{J(M.next(Y))}catch(Z){L(Z)}}function V(Y){try{J(M.throw(Y))}catch(Z){L(Z)}}function J(Y){Y.done?R(Y.value):function P(R){return R instanceof N?R:new N(function(L){L(R)})}(Y.value).then(H,V)}J((M=M.apply(C,T||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountMultisig=void 0;const _=d(38445),E=d(15139),S=d(69865),a=d(3725),{deployContract:h,functionCall:g}=_.actionCreators;var y,C;(C=y||(y={}))[C.INVALID_CODE=0]="INVALID_CODE",C[C.VALID_CODE=1]="VALID_CODE",C[C.UNKNOWN_CODE=2]="UNKNOWN_CODE";const v={[S.MULTISIG_STORAGE_KEY]:null};class b extends E.Account{constructor(T,N,M){super(T,N),this.storage=M.storage,this.onAddRequestResult=M.onAddRequestResult}signAndSendTransactionWithAccount(T,N){const M=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return M.signAndSendTransaction.call(this,{receiverId:T,actions:N})})}signAndSendTransaction({receiverId:T,actions:N}){const M=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:P}=this,R=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:O(N,P,T)}}));let L;try{L=yield M.signAndSendTransaction.call(this,{receiverId:P,actions:[g("add_request_and_confirm",R,S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}catch(V){if(V.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:N});throw V}if(!L.status)throw new Error("Request failed");const H=Object.assign({},L.status);if(!H.SuccessValue||"string"!=typeof H.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:P,actions:N,requestId:parseInt(Buffer.from(H.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(L)),this.deleteUnconfirmedRequests(),L})}checkMultisigCodeAndStateStatus(T){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const P=T?y.UNKNOWN_CODE:y.VALID_CODE;try{return T?yield N.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[h(T),g("delete_request",{request_id:4294967295},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:y.VALID_CODE,stateStatus:a.MultisigStateStatus.VALID_STATE}}catch(R){if(new RegExp(a.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.INVALID_STATE};if(new RegExp(a.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(a.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.VALID_STATE};if(new RegExp(a.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(R&&R.message))return{codeStatus:y.INVALID_CODE,stateStatus:a.MultisigStateStatus.UNKNOWN_STATE};throw R}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[g("delete_request",{request_id:T},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(N=>this.deleteRequest(N))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const N=yield this.getRequestIds(),{requestId:M}=this.getRequest();for(const P of N)if(P!=M)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g("delete_request",{request_id:P},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(S.MULTISIG_STORAGE_KEY)||"{}"):v[S.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(S.MULTISIG_STORAGE_KEY,JSON.stringify(T));v[S.MULTISIG_STORAGE_KEY]=T}}r.AccountMultisig=b;const A=C=>C.toString().replace("ed25519:",""),O=(C,T,N)=>C.map(M=>{const P=M.enum,{gas:R,publicKey:L,methodName:H,args:V,deposit:J,accessKey:Y,code:Z}=M[P],W={type:P[0].toUpperCase()+P.substr(1),gas:R&&R.toString()||void 0,public_key:L&&A(L)||void 0,method_name:H,args:V&&Buffer.from(V).toString("base64")||void 0,code:Z&&Buffer.from(Z).toString("base64")||void 0,amount:J&&J.toString()||void 0,deposit:J&&J.toString()||"0",permission:void 0};if(Y&&(N===T&&"fullAccess"!==Y.permission.enum&&(W.permission={receiver_id:T,allowance:S.MULTISIG_ALLOWANCE.toString(),method_names:S.MULTISIG_CHANGE_METHODS}),"functionCall"===Y.permission.enum)){const{receiverId:Q,methodNames:D,allowance:o}=Y.permission.functionCall;W.permission={receiver_id:Q,allowance:o&&o.toString()||void 0,method_names:D}}return W})},52357:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;const l=d(82613),_=d(89870);class a{constructor(g,y,v,b){this.networkId=g,this.provider=y,this.signer=v,this.jsvmAccountId=b}static fromConfig(g){const y=function E(h){switch(h.type){case void 0:return h;case"JsonRpcProvider":return new _.JsonRpcProvider(Object.assign({},h.args));default:throw new Error(`Unknown provider type ${h.type}`)}}(g.provider),v=function S(h){switch(h.type){case void 0:return h;case"InMemorySigner":return new l.InMemorySigner(h.keyStore);default:throw new Error(`Unknown signer type ${h.type}`)}}(g.signer);return new a(g.networkId,y,v,g.jsvmAccountId)}}r.Connection=a},69865:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(r,"__esModule",{value:!0}),r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=void 0;const _=d(41166),E=l(d(98538));r.MULTISIG_STORAGE_KEY="__multisigRequest",r.MULTISIG_ALLOWANCE=new E.default((0,_.parseNearAmount)("1")),r.MULTISIG_GAS=new E.default("100000000000000"),r.MULTISIG_DEPOSIT=new E.default("0"),r.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],r.MULTISIG_CONFIRM_METHODS=["confirm"]},44575:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(R,L,H,V){return new(H||(H=Promise))(function(Y,Z){function W(o){try{D(V.next(o))}catch(u){Z(u)}}function Q(o){try{D(V.throw(o))}catch(u){Z(u)}}function D(o){o.done?Y(o.value):function J(Y){return Y instanceof H?Y:new H(function(Z){Z(Y)})}(o.value).then(W,Q)}D((V=V.apply(R,L||[])).next())})},_=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;const E=d(41166),S=d(17527),a=_(d(74411)),h=_(d(26474)),g=_(d(98538)),y=_(d(89176)),v=d(84778),b=d(43506);function A(R,L){return{[R]:(...H)=>L(...H)}[R]}function O(R,L,H,V){var J;if(!N(R))return;if(L.params&&L.params.serialization_type!==v.AbiSerializationType.Json)throw new b.UnsupportedSerializationError(L.name,L.params.serialization_type);if(L.result&&L.result.serialization_type!==v.AbiSerializationType.Json)throw new b.UnsupportedSerializationError(L.name,L.result.serialization_type);const Y=(null===(J=L.params)||void 0===J?void 0:J.args)||[];for(const Z of Y){const W=R[Z.name],Q=Z.type_schema;Q.definitions=V.body.root_schema.definitions;const D=H.compile(Q);if(!D(W))throw new b.ArgumentSchemaError(Z.name,D.errors)}for(const Z of Object.keys(R))if(!Y.find(Q=>Q.name===Z))throw new b.UnknownArgumentError(Z,Y.map(Q=>Q.name))}const T=R=>R&&void 0!==R.byteLength&&R.byteLength===R.length,N=R=>"[object Object]"===Object.prototype.toString.call(R);r.Contract=class M{constructor(L,H,V){this.account=L,this.contractId=H;const{viewMethods:J=[],changeMethods:Y=[],abi:Z}=V;let W=J.map(o=>({name:o,abi:null})),Q=Y.map(o=>({name:o,abi:null}));if(Z){if(W.length>0||Q.length>0)throw new b.ConflictingOptions;W=Z.body.functions.filter(o=>o.kind===v.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),Q=Z.body.functions.filter(o=>o.kind===v.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const D=function C(){const R=new a.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,h.default)(R),R}();W.forEach(({name:o,abi:u})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(m={},w={},...x)=>l(this,void 0,void 0,function*(){if(x.length||!N(m)&&!T(m)||!N(w))throw new S.PositionalArgsError;return u&&O(m,u,D,Z),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:m},w))}))})}),Q.forEach(({name:o,abi:u})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...m)=>l(this,void 0,void 0,function*(){if(m.length&&(m.length>3||!N(m[0])&&!T(m[0])))throw new S.PositionalArgsError;return(m.length>1||!(m[0]&&m[0].args))&&((0,y.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),m[0]={args:m[0],gas:m[1],amount:m[2]}),u&&O(m[0].args,u,D,Z),this._changeMethod(Object.assign({methodName:o},m[0]))}))})})}_changeMethod({args:L,methodName:H,gas:V,amount:J,meta:Y,callbackUrl:Z}){return l(this,void 0,void 0,function*(){!function P(R){const L="number, decimal string or BN";for(const H of Object.keys(R)){const V=R[H];if(V&&!g.default.isBN(V)&&isNaN(V))throw new S.ArgumentTypeError(H,L,V)}}({gas:V,amount:J});const W=yield this.account.functionCall({contractId:this.contractId,methodName:H,args:L,gas:V,attachedDeposit:J,walletMeta:Y,walletCallbackUrl:Z});return(0,E.getTransactionLastResult)(W)})}}},43506:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConflictingOptions=r.ArgumentSchemaError=r.UnknownArgumentError=r.UnsupportedSerializationError=void 0;class d extends Error{constructor(a,h){super(`Contract method '${a}' is using an unsupported serialization type ${h}`)}}r.UnsupportedSerializationError=d;class l extends Error{constructor(a,h){super(`Unrecognized argument '${a}', expected '${JSON.stringify(h)}'`)}}r.UnknownArgumentError=l;class _ extends Error{constructor(a,h){super(`Argument '${a}' does not conform to the specified ABI schema: '${JSON.stringify(h)}'`)}}r.ArgumentSchemaError=_;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}r.ConflictingOptions=E},74931:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=r.Contract=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.Connection=r.AccountMultisig=r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=r.Account2FA=r.Account=void 0;var l=d(15139);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}});var _=d(46398);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return _.Account2FA}});var E=d(53683);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var S=d(64706);Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return S.AccountMultisig}});var a=d(52357);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return a.Connection}});var h=d(69865);Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}});var g=d(44575);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return g.Contract}});var y=d(43506);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return y.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return y.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return y.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return y.UnsupportedSerializationError}});var v=d(3725);Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return v.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return v.MultisigStateStatus}})},3725:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=void 0,(_=r.MultisigDeleteRequestRejectionError||(r.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",_.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",_.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",_.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",_.METHOD_NOT_FOUND="Contract method is not found",function(_){_[_.INVALID_STATE=0]="INVALID_STATE",_[_.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",_[_.VALID_STATE=2]="VALID_STATE",_[_.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(r.MultisigStateStatus||(r.MultisigStateStatus={}))},57250:function(ne,r){"use strict";var d=this&&this.__awaiter||function(E,S,a,h){return new(a||(a=Promise))(function(y,v){function b(C){try{O(h.next(C))}catch(T){v(T)}}function A(C){try{O(h.throw(C))}catch(T){v(T)}}function O(C){C.done?y(C.value):function g(y){return y instanceof a?y:new a(function(v){v(y)})}(C.value).then(b,A)}O((h=h.apply(E,S||[])).next())})};function _(E){return new Promise(S=>setTimeout(S,E))}Object.defineProperty(r,"__esModule",{value:!0}),r.exponentialBackoff=void 0,r.exponentialBackoff=function l(E,S,a,h){return d(this,void 0,void 0,function*(){let g=E;for(let y=0;y!process.env.NEAR_NO_LOGS&&console.warn(...T);r.fetchJson=function C(T,N){return S(this,void 0,void 0,function*(){let M={url:null};"string"==typeof T?M.url=T:M=T;const P=yield(0,y.exponentialBackoff)(v,A,b,()=>S(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(d(2174)))).default);const R=yield global.fetch(M.url,{method:N?"POST":"GET",body:N||void 0,headers:Object.assign(Object.assign({},M.headers),{"Content-Type":"application/json"})});if(!R.ok){if(503===R.status)return O(`Retrying HTTP request for ${M.url} as it's not available now`),null;throw(0,g.default)(R.status,yield R.text())}return R}catch(R){if(R.toString().includes("FetchError")||R.toString().includes("Failed to fetch"))return O(`Retrying HTTP request for ${M.url} because of error: ${R}`),null;throw R}}));if(!P)throw new h.TypedError(`Exceeded ${A} attempts for ${M.url}.`,"RetriesExceeded");return yield P.json()})}},89870:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=r.Provider=r.JsonRpcProvider=r.exponentialBackoff=void 0;var l=d(57250);Object.defineProperty(r,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var _=d(90352);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}});var E=d(95384);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return E.Provider}});var S=d(48836);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}})},90352:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(N,M,P,R){return new(P||(P=Promise))(function(H,V){function J(W){try{Z(R.next(W))}catch(Q){V(Q)}}function Y(W){try{Z(R.throw(W))}catch(Q){V(Q)}}function Z(W){W.done?H(W.value):function L(H){return H instanceof P?H:new P(function(V){V(H)})}(W.value).then(J,Y)}Z((R=R.apply(N,M||[])).next())})},_=this&&this.__rest||function(N,M){var P={};for(var R in N)Object.prototype.hasOwnProperty.call(N,R)&&M.indexOf(R)<0&&(P[R]=N[R]);if(null!=N&&"function"==typeof Object.getOwnPropertySymbols){var L=0;for(R=Object.getOwnPropertySymbols(N);Ll(this,void 0,void 0,function*(){try{const H={method:M,params:P,id:C++,jsonrpc:"2.0"},V=yield(0,v.fetchJson)(this.connection,JSON.stringify(H));if(V.error){if("object"==typeof V.error.data)throw"string"==typeof V.error.data.error_message&&"string"==typeof V.error.data.error_type?new S.TypedError(V.error.data.error_message,V.error.data.error_type):(0,E.parseRpcError)(V.error.data);{const J=`[${V.error.code}] ${V.error.message}: ${V.error.data}`;throw"Timeout"===V.error.data||J.includes("Timeout error")||J.includes("query has timed out")?new S.TypedError(J,"TimeoutError"):new S.TypedError(J,(0,E.getErrorTypeFromErrorMessage)(V.error.data,V.error.name))}}return V}catch(H){if("TimeoutError"===H.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${M} as it has timed out`,P),null;throw H}})),{result:L}=R;if(typeof L>"u")throw new S.TypedError(`Exceeded 12 attempts for request to ${M}.`,"RetriesExceeded");return L})}}r.JsonRpcProvider=T},95384:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Provider=void 0;r.Provider=class d{}},82097:(ne,r,d)=>{"use strict";var l=d(20163)("http-errors"),_=d(1106),E=d(27449),S=d(83894),a=d(77721);function h(N){return Number(String(N).charAt(0)+"00")}function O(N,M){var P=Object.getOwnPropertyDescriptor(N,"name");P&&P.configurable&&(P.value=M,Object.defineProperty(N,"name",P))}function T(N){return"Error"!==N.substr(-5)?N+"Error":N}ne.exports=function g(){for(var N,M,P=500,R={},L=0;L=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof P||!E[P]&&(P<400||P>=600))&&(P=500);var V=g[P]||g[h(P)];for(var J in N||(N=V?new V(M):new Error(M||E[P]),Error.captureStackTrace(N,g)),(!V||!(N instanceof V)||N.status!==P)&&(N.expose=P<500,N.status=N.statusCode=P),R)"status"!==J&&"statusCode"!==J&&(N[J]=R[J]);return N},ne.exports.HttpError=function y(){function N(){throw new TypeError("cannot construct abstract class")}return S(N,Error),N}(),ne.exports.isHttpError=function b(N){return function(P){return!(!P||"object"!=typeof P)&&(P instanceof N||P instanceof Error&&"boolean"==typeof P.expose&&"number"==typeof P.statusCode&&P.status===P.statusCode)}}(ne.exports.HttpError),function C(N,M,P){M.forEach(function(L){var H,V=a(E[L]);switch(h(L)){case 400:H=function v(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!0,L}(P,V,L);break;case 500:H=function A(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!1,L}(P,V,L)}H&&(N[L]=H,N[V]=H)}),N["I'mateapot"]=l.function(N.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,E.codes,ne.exports.HttpError)},20163:ne=>{"use strict";function d(_,E){if("function"!=typeof _)throw new TypeError("argument fn must be a function");return _}function l(_,E,S){if(!_||"object"!=typeof _&&"function"!=typeof _)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(_,E);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}ne.exports=function r(_){if(!_)throw new TypeError("argument namespace is required");function E(S){}return E._file=void 0,E._ignored=!0,E._namespace=_,E._traced=!1,E._warned=Object.create(null),E.function=d,E.property=l,E}},27449:(ne,r,d)=>{"use strict";var l=d(38512);function E(S){if("number"==typeof S){if(!E[S])throw new Error("invalid status code: "+S);return S}if("string"!=typeof S)throw new TypeError("code must be a number or string");var a=parseInt(S,10);if(!isNaN(a)){if(!E[a])throw new Error("invalid status code: "+a);return a}if(!(a=E[S.toLowerCase()]))throw new Error('invalid status message: "'+S+'"');return a}ne.exports=E,E.STATUS_CODES=l,E.codes=function _(S,a){var h=[];return Object.keys(a).forEach(function(y){var v=a[y],b=Number(y);S[b]=v,S[v]=b,S[v.toLowerCase()]=b,h.push(b)}),h}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},15932:(ne,r)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.KeyType=void 0,(l=r.KeyType||(r.KeyType={}))[l.ED25519=0]="ED25519"},29761:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyPairEd25519=r.KeyPair=r.KeyType=void 0;var l=d(15932);Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var _=d(82568);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}});var E=d(56510);Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var S=d(987);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return S.PublicKey}})},82568:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPair=void 0;const l=d(98475),_=d(56510);class E extends l.KeyPairBase{static fromRandom(a){if("ED25519"===a.toUpperCase())return _.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${a}`)}static fromString(a){const h=a.split(":");if(1===h.length)return new _.KeyPairEd25519(h[0]);if(2===h.length){if("ED25519"===h[0].toUpperCase())return new _.KeyPairEd25519(h[1]);throw new Error(`Unknown curve: ${h[0]}`)}throw new Error("Invalid encoded key format, must be :")}}r.KeyPair=E},98475:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairBase=void 0;r.KeyPairBase=class d{}},56510:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairEd25519=void 0;const _=d(21531),E=l(d(40489)),S=d(15932),a=d(98475),h=d(987);class g extends a.KeyPairBase{constructor(v){super();const b=E.default.sign.keyPair.fromSecretKey((0,_.baseDecode)(v));this.publicKey=new h.PublicKey({keyType:S.KeyType.ED25519,data:b.publicKey}),this.secretKey=v}static fromRandom(){const v=E.default.sign.keyPair();return new g((0,_.baseEncode)(v.secretKey))}sign(v){return{signature:E.default.sign.detached(v,(0,_.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(v,b){return this.publicKey.verify(v,b)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}r.KeyPairEd25519=g},987:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=void 0;const _=d(17527),E=d(21531),S=l(d(40489)),a=d(15932);function g(v){if("ed25519"===v.toLowerCase())return a.KeyType.ED25519;throw new Error(`Unknown key type ${v}`)}class y extends _.Assignable{static from(b){return"string"==typeof b?y.fromString(b):b}static fromString(b){const A=b.split(":");if(1===A.length)return new y({keyType:a.KeyType.ED25519,data:(0,E.baseDecode)(A[0])});if(2===A.length)return new y({keyType:g(A[0]),data:(0,E.baseDecode)(A[1])});throw new Error("Invalid encoded key format, must be :")}toString(){return`${function h(v){if(v===a.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${v}`)}(this.keyType)}:${(0,E.baseEncode)(this.data)}`}verify(b,A){if(this.keyType===a.KeyType.ED25519)return S.default.sign.detached.verify(b,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}r.PublicKey=y},9454:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;const _=d(29761),E=d(69170);class a extends E.KeyStore{constructor(g=window.localStorage,y="near-api-js:keystore:"){super(),this.localStorage=g,this.prefix=y}setKey(g,y,v){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(g,y),v.toString())})}getKey(g,y){return l(this,void 0,void 0,function*(){const v=this.localStorage.getItem(this.storageKeyForSecretKey(g,y));return v?_.KeyPair.fromString(v):null})}removeKey(g,y){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(g,y))})}clear(){return l(this,void 0,void 0,function*(){for(const g of this.storageKeys())g.startsWith(this.prefix)&&this.localStorage.removeItem(g)})}getNetworks(){return l(this,void 0,void 0,function*(){const g=new Set;for(const y of this.storageKeys())if(y.startsWith(this.prefix)){const v=y.substring(this.prefix.length).split(":");g.add(v[1])}return Array.from(g.values())})}getAccounts(g){return l(this,void 0,void 0,function*(){const y=new Array;for(const v of this.storageKeys())if(v.startsWith(this.prefix)){const b=v.substring(this.prefix.length).split(":");b[1]===g&&y.push(b[0])}return y})}storageKeyForSecretKey(g,y){return`${this.prefix}${y}:${g}`}*storageKeys(){for(let g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(9454);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},55738:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UnencryptedFileSystemKeyStore=r.readKeyFile=void 0;var l=d(2252);Object.defineProperty(r,"readKeyFile",{enumerable:!0,get:function(){return l.readKeyFile}}),Object.defineProperty(r,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return l.UnencryptedFileSystemKeyStore}})},2252:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(L,H,V,J){return new(V||(V=Promise))(function(Z,W){function Q(u){try{o(J.next(u))}catch(m){W(m)}}function D(u){try{o(J.throw(u))}catch(m){W(m)}}function o(u){u.done?Z(u.value):function Y(Z){return Z instanceof V?Z:new V(function(W){W(Z)})}(u.value).then(Q,D)}o((J=J.apply(L,H||[])).next())})},_=this&&this.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(r,"__esModule",{value:!0}),r.UnencryptedFileSystemKeyStore=r.readKeyFile=void 0;const E=d(29761),S=d(69170),a=_(d(6581)),h=_(d(63928)),g=d(26788),y=L=>L?(0,g.promisify)(L):()=>{throw new Error("Trying to use unimplemented function. `fs` module not available in web build?")},v=y(a.default.exists),b=y(a.default.readFile),A=y(a.default.writeFile),O=y(a.default.unlink),C=y(a.default.readdir),T=y(a.default.mkdir);function P(L){return l(this,void 0,void 0,function*(){const H=yield function N(L){return l(this,void 0,void 0,function*(){const H=yield b(L);return JSON.parse(H.toString())})}(L);let V=H.private_key;return!V&&H.secret_key&&(V=H.secret_key),[H.account_id,E.KeyPair.fromString(V)]})}r.readKeyFile=P;class R extends S.KeyStore{constructor(H){super(),this.keyDir=h.default.resolve(H)}setKey(H,V,J){return l(this,void 0,void 0,function*(){yield function M(L){return l(this,void 0,void 0,function*(){try{yield T(L,{recursive:!0})}catch(H){if("EEXIST"!==H.code)throw H}})}(`${this.keyDir}/${H}`);const Y={account_id:V,public_key:J.getPublicKey().toString(),private_key:J.toString()};yield A(this.getKeyFilePath(H,V),JSON.stringify(Y),{mode:384})})}getKey(H,V){return l(this,void 0,void 0,function*(){return(yield v(this.getKeyFilePath(H,V)))?(yield P(this.getKeyFilePath(H,V)))[1]:null})}removeKey(H,V){return l(this,void 0,void 0,function*(){(yield v(this.getKeyFilePath(H,V)))&&(yield O(this.getKeyFilePath(H,V)))})}clear(){return l(this,void 0,void 0,function*(){for(const H of yield this.getNetworks())for(const V of yield this.getAccounts(H))yield this.removeKey(H,V)})}getKeyFilePath(H,V){return`${this.keyDir}/${H}/${V}.json`}getNetworks(){return l(this,void 0,void 0,function*(){const H=yield C(this.keyDir),V=new Array;return H.forEach(J=>{V.push(J)}),V})}getAccounts(H){return l(this,void 0,void 0,function*(){return(yield v(`${this.keyDir}/${H}`))?(yield C(`${this.keyDir}/${H}`)).filter(J=>J.endsWith(".json")).map(J=>J.replace(/.json$/,"")):[]})}toString(){return`UnencryptedFileSystemKeyStore(${this.keyDir})`}}r.UnencryptedFileSystemKeyStore=R},14484:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(a,h,g,y){return new(g||(g=Promise))(function(b,A){function O(N){try{T(y.next(N))}catch(M){A(M)}}function C(N){try{T(y.throw(N))}catch(M){A(M)}}function T(N){N.done?b(N.value):function v(b){return b instanceof g?b:new g(function(A){A(b)})}(N.value).then(O,C)}T((y=y.apply(a,h||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;const _=d(29761),E=d(99749);class S extends E.KeyStore{constructor(){super(),this.keys={}}setKey(h,g,y){return l(this,void 0,void 0,function*(){this.keys[`${g}:${h}`]=y.toString()})}getKey(h,g){return l(this,void 0,void 0,function*(){const y=this.keys[`${g}:${h}`];return y?_.KeyPair.fromString(y):null})}removeKey(h,g){return l(this,void 0,void 0,function*(){delete this.keys[`${g}:${h}`]})}clear(){return l(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return l(this,void 0,void 0,function*(){const h=new Set;return Object.keys(this.keys).forEach(g=>{const y=g.split(":");h.add(y[1])}),Array.from(h.values())})}getAccounts(h){return l(this,void 0,void 0,function*(){const g=new Array;return Object.keys(this.keys).forEach(y=>{const v=y.split(":");v[v.length-1]===h&&g.push(v.slice(0,v.length-1).join(":"))}),g})}toString(){return"InMemoryKeyStore"}}r.InMemoryKeyStore=S},69170:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.KeyStore=r.InMemoryKeyStore=void 0;var l=d(14484);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}});var _=d(99749);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return _.KeyStore}});var E=d(93669);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},99749:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;r.KeyStore=class d{}},93669:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;const _=d(99749);class E extends _.KeyStore{constructor(a,h={writeKeyStoreIndex:0}){super(),this.options=h,this.keyStores=a}setKey(a,h,g){return l(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(a,h,g)})}getKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores){const y=yield g.getKey(a,h);if(y)return y}return null})}removeKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores)yield g.removeKey(a,h)})}clear(){return l(this,void 0,void 0,function*(){for(const a of this.keyStores)yield a.clear()})}getNetworks(){return l(this,void 0,void 0,function*(){const a=new Set;for(const h of this.keyStores)for(const g of yield h.getNetworks())a.add(g);return Array.from(a)})}getAccounts(a){return l(this,void 0,void 0,function*(){const h=new Set;for(const g of this.keyStores)for(const y of yield g.getAccounts(a))h.add(y);return Array.from(h)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}r.MergeKeyStore=E},82420:function(ne,r){"use strict";var d=this&&this.__awaiter||function(E,S,a,h){return new(a||(a=Promise))(function(y,v){function b(C){try{O(h.next(C))}catch(T){v(T)}}function A(C){try{O(h.throw(C))}catch(T){v(T)}}function O(C){C.done?y(C.value):function g(y){return y instanceof a?y:new a(function(v){v(y)})}(C.value).then(b,A)}O((h=h.apply(E,S||[])).next())})};function _(E){return new Promise(S=>setTimeout(S,E))}Object.defineProperty(r,"__esModule",{value:!0}),r.exponentialBackoff=void 0,r.exponentialBackoff=function l(E,S,a,h){return d(this,void 0,void 0,function*(){let g=E;for(let y=0;yS(this,void 0,void 0,function*(){var R;try{const L=yield(null!==(R=global.fetch)&&void 0!==R?R:(yield Promise.resolve().then(()=>E(d(60778)))).default)(M.url,{method:N?"POST":"GET",body:N||void 0,headers:Object.assign(Object.assign({},M.headers),{"Content-Type":"application/json"})});if(!L.ok){if(503===L.status)return g.Logger.warn(`Retrying HTTP request for ${M.url} as it's not available now`),null;if(408===L.status)return g.Logger.warn(`Retrying HTTP request for ${M.url} as the previous connection was unused for some time`),null;throw(0,y.default)(L.status,yield L.text())}return L}catch(L){if(L.toString().includes("FetchError")||L.toString().includes("Failed to fetch"))return g.Logger.warn(`Retrying HTTP request for ${M.url} because of error: ${L}`),null;throw L}}));if(!P)throw new h.TypedError(`Exceeded ${O} attempts for ${M.url}.`,"RetriesExceeded");return yield P.json()})}},1656:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=r.Provider=r.JsonRpcProvider=r.exponentialBackoff=void 0;var l=d(82420);Object.defineProperty(r,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var _=d(71935);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}});var E=d(10488);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return E.Provider}});var S=d(22292);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}})},71935:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(T,N,M,P){return new(M||(M=Promise))(function(L,H){function V(Z){try{Y(P.next(Z))}catch(W){H(W)}}function J(Z){try{Y(P.throw(Z))}catch(W){H(W)}}function Y(Z){Z.done?L(Z.value):function R(L){return L instanceof M?L:new M(function(H){H(L)})}(Z.value).then(V,J)}Y((P=P.apply(T,N||[])).next())})},_=this&&this.__rest||function(T,N){var M={};for(var P in T)Object.prototype.hasOwnProperty.call(T,P)&&N.indexOf(P)<0&&(M[P]=T[P]);if(null!=T&&"function"==typeof Object.getOwnPropertySymbols){var R=0;for(P=Object.getOwnPropertySymbols(T);Rl(this,void 0,void 0,function*(){try{const L={method:N,params:M,id:O++,jsonrpc:"2.0"},H=yield(0,y.fetchJson)(this.connection,JSON.stringify(L));if(H.error){if("object"==typeof H.error.data)throw"string"==typeof H.error.data.error_message&&"string"==typeof H.error.data.error_type?new S.TypedError(H.error.data.error_message,H.error.data.error_type):(0,E.parseRpcError)(H.error.data);{const V=`[${H.error.code}] ${H.error.message}: ${H.error.data}`;throw"Timeout"===H.error.data||V.includes("Timeout error")||V.includes("query has timed out")?new S.TypedError(V,"TimeoutError"):new S.TypedError(V,(0,E.getErrorTypeFromErrorMessage)(H.error.data,H.error.name))}}return H}catch(L){if("TimeoutError"===L.type)return E.Logger.warn(`Retrying request to ${N} as it has timed out`,M),null;throw L}})),{result:R}=P;if(typeof R>"u")throw new S.TypedError(`Exceeded 12 attempts for request to ${N}.`,"RetriesExceeded");return R})}}r.JsonRpcProvider=C},10488:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Provider=void 0;r.Provider=class d{}},82786:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(M){return M&&M.__esModule?M:{default:M}};Object.defineProperty(r,"__esModule",{value:!0}),r.actionCreators=r.stringifyJsonOrBytes=void 0;const _=l(d(98538)),E=d(80304);function y(M){return void 0!==M.byteLength&&M.byteLength===M.length?M:Buffer.from(JSON.stringify(M))}r.stringifyJsonOrBytes=y,r.actionCreators={addKey:function O(M,P){return new E.Action({addKey:new E.AddKey({publicKey:M,accessKey:P})})},createAccount:function h(){return new E.Action({createAccount:new E.CreateAccount({})})},deleteAccount:function T(M){return new E.Action({deleteAccount:new E.DeleteAccount({beneficiaryId:M})})},deleteKey:function C(M){return new E.Action({deleteKey:new E.DeleteKey({publicKey:M})})},deployContract:function g(M){return new E.Action({deployContract:new E.DeployContract({code:M})})},fullAccessKey:function S(){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({fullAccess:new E.FullAccessPermission({})})})},functionCall:function v(M,P,R=new _.default(0),L=new _.default(0),H=y,V=!1){return V?new E.Action({functionCall:new E.FunctionCall({methodName:M,args:P,gas:R,deposit:L})}):new E.Action({functionCall:new E.FunctionCall({methodName:M,args:H(P),gas:R,deposit:L})})},functionCallAccessKey:function a(M,P,R){return new E.AccessKey({nonce:0,permission:new E.AccessKeyPermission({functionCall:new E.FunctionCallPermission({receiverId:M,allowance:R,methodNames:P})})})},signedDelegate:function N({delegateAction:M,signature:P}){return new E.Action({signedDelegate:new E.SignedDelegate({delegateAction:M,signature:P})})},stake:function A(M=new _.default(0),P){return new E.Action({stake:new E.Stake({stake:M,publicKey:P})})},transfer:function b(M=new _.default(0)){return new E.Action({transfer:new E.Transfer({deposit:M})})}}},80304:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Action=r.SignedDelegate=r.DeleteAccount=r.DeleteKey=r.AddKey=r.Stake=r.Transfer=r.FunctionCall=r.DeployContract=r.CreateAccount=r.IAction=r.AccessKey=r.AccessKeyPermission=r.FullAccessPermission=r.FunctionCallPermission=void 0;const l=d(17527);class _{constructor(L){if(1!==Object.keys(L).length)throw new Error("Enum can only take single value");Object.keys(L).map(H=>{this[H]=L[H],this.enum=H})}}class E extends l.Assignable{}r.FunctionCallPermission=E;class S extends l.Assignable{}r.FullAccessPermission=S;r.AccessKeyPermission=class a extends _{};class h extends l.Assignable{}r.AccessKey=h;class g extends l.Assignable{}r.IAction=g;r.CreateAccount=class y extends g{};r.DeployContract=class v extends g{};r.FunctionCall=class b extends g{};r.Transfer=class A extends g{};r.Stake=class O extends g{};r.AddKey=class C extends g{};r.DeleteKey=class T extends g{};r.DeleteAccount=class N extends g{};r.SignedDelegate=class M extends g{};r.Action=class P extends _{}},21380:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0}),r.createTransaction=void 0;const _=l(d(98538)),E=d(56363);r.createTransaction=function S(a,h,g,y,v,b){return new E.Transaction({signerId:a,publicKey:h,nonce:new _.default(y),receiverId:g,actions:v,blockHash:b})}},17984:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.buildDelegateAction=r.DelegateAction=void 0;const l=d(17527),_=d(82786),{addKey:E,createAccount:S,deleteAccount:a,deleteKey:h,deployContract:g,functionCall:y,stake:v,transfer:b}=_.actionCreators;class A extends l.Assignable{}r.DelegateAction=A,r.buildDelegateAction=function O({actions:C,maxBlockHeight:T,nonce:N,publicKey:M,receiverId:P,senderId:R}){return new A({senderId:R,receiverId:P,actions:C.map(L=>{if(!L.type&&!L.params)return L;switch(L.type){case"AddKey":{const{publicKey:H,accessKey:V}=L.params;return E(H,V)}case"CreateAccount":return S(L.params.createAccount);case"DeleteAccount":return a(L.params.deleteAccount);case"DeleteKey":return h(L.params.publicKey);case"DeployContract":return g(L.params.code);case"FunctionCall":{const{methodName:H,args:V,gas:J,deposit:Y}=L.params;return y(H,V,J,Y)}case"Stake":return v(L.params.stake,L.params.publicKey);case"Transfer":{const{deposit:H}=L.params;return b(H)}}throw new Error("Unrecognized action")}),nonce:N,maxBlockHeight:T,publicKey:M})}},47362:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(82786),r),_(d(80304),r),_(d(21380),r),_(d(17984),r),_(d(56363),r),_(d(8674),r),_(d(23922),r)},1139:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DelegateActionPrefix=void 0;const l=d(17527),_=Math.pow(2,30),E_MetaTransactions=366;class S extends l.Assignable{}class a extends S{constructor(y){super({prefix:_+y})}}r.DelegateActionPrefix=class h extends a{constructor(){super(E_MetaTransactions)}}},56363:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SCHEMA=r.SignedTransaction=r.Transaction=r.decodeSignedTransaction=r.decodeTransaction=r.encodeTransaction=r.encodeSignedDelegate=r.encodeDelegateAction=void 0;const l=d(17527),_=d(36685),E=d(1139);function h(A){const O=A instanceof b?r.SCHEMA.SignedTransaction:r.SCHEMA.Transaction;return(0,_.serialize)(O,A)}function g(A){return new v((0,_.deserialize)(r.SCHEMA.Transaction,A))}function y(A){return new b((0,_.deserialize)(r.SCHEMA.SignedTransaction,A))}r.encodeDelegateAction=function S(A){return new Uint8Array([...(0,_.serialize)(r.SCHEMA.DelegateActionPrefix,new E.DelegateActionPrefix),...(0,_.serialize)(r.SCHEMA.DelegateAction,A)])},r.encodeSignedDelegate=function a(A){return(0,_.serialize)(r.SCHEMA.SignedDelegate,A)},r.encodeTransaction=h,r.decodeTransaction=g,r.decodeSignedTransaction=y;class v extends l.Assignable{encode(){return h(this)}static decode(O){return g(O)}}r.Transaction=v;class b extends l.Assignable{encode(){return h(this)}static decode(O){return y(O)}}r.SignedTransaction=b,r.SCHEMA=new class{constructor(){this.Signature={struct:{keyType:"u8",data:{array:{type:"u8",len:64}}}},this.PublicKey={struct:{keyType:"u8",data:{array:{type:"u8",len:32}}}},this.FunctionCallPermission={struct:{allowance:{option:"u128"},receiverId:"string",methodNames:{array:{type:"string"}}}},this.FullAccessPermission={struct:{}},this.AccessKeyPermission={enum:[{struct:{functionCall:this.FunctionCallPermission}},{struct:{fullAccess:this.FullAccessPermission}}]},this.AccessKey={struct:{nonce:"u64",permission:this.AccessKeyPermission}},this.CreateAccount={struct:{}},this.DeployContract={struct:{code:{array:{type:"u8"}}}},this.FunctionCall={struct:{methodName:"string",args:{array:{type:"u8"}},gas:"u64",deposit:"u128"}},this.Transfer={struct:{deposit:"u128"}},this.Stake={struct:{stake:"u128",publicKey:this.PublicKey}},this.AddKey={struct:{publicKey:this.PublicKey,accessKey:this.AccessKey}},this.DeleteKey={struct:{publicKey:this.PublicKey}},this.DeleteAccount={struct:{beneficiaryId:"string"}},this.DelegateActionPrefix={struct:{prefix:"u32"}},this.ClassicActions={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}}]},this.DelegateAction={struct:{senderId:"string",receiverId:"string",nonce:"u64",actions:{array:{type:this.ClassicActions}},maxBlockHeight:"u64",publicKey:this.PublicKey}},this.SignedDelegate={struct:{delegateAction:this.DelegateAction,signature:this.Signature}},this.Action={enum:[{struct:{createAccount:this.CreateAccount}},{struct:{deployContract:this.DeployContract}},{struct:{functionCall:this.FunctionCall}},{struct:{transfer:this.Transfer}},{struct:{stake:this.Stake}},{struct:{addKey:this.AddKey}},{struct:{deleteKey:this.DeleteKey}},{struct:{deleteAccount:this.DeleteAccount}},{struct:{signedDelegate:this.SignedDelegate}}]},this.Transaction={struct:{signerId:"string",publicKey:this.PublicKey,nonce:"u64",receiverId:"string",blockHash:{array:{type:"u8",len:32}},actions:{array:{type:this.Action}}}},this.SignedTransaction={struct:{transaction:this.Transaction,signature:this.Signature}}}}},8674:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(b,A,O,C){return new(O||(O=Promise))(function(N,M){function P(H){try{L(C.next(H))}catch(V){M(V)}}function R(H){try{L(C.throw(H))}catch(V){M(V)}}function L(H){H.done?N(H.value):function T(N){return N instanceof O?N:new O(function(M){M(N)})}(H.value).then(P,R)}L((C=C.apply(b,A||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.signDelegateAction=r.signTransaction=void 0;const _=d(78527),E=d(80304),S=d(21380),a=d(56363),h=d(23922);function g(b,A,O,C){return l(this,void 0,void 0,function*(){const T=(0,a.encodeTransaction)(b),N=new Uint8Array((0,_.sha256)(T)),M=yield A.signMessage(T,O,C);return[N,new a.SignedTransaction({transaction:b,signature:new h.Signature({keyType:b.publicKey.keyType,data:M.signature})})]})}r.signTransaction=function y(...b){return l(this,void 0,void 0,function*(){if(b[0].constructor===a.Transaction){const[A,O,C,T]=b;return g(A,O,C,T)}{const[A,O,C,T,N,M,P]=b,R=yield N.getPublicKey(M,P);return g((0,S.createTransaction)(M,R,A,O,C,T),N,M,P)}})},r.signDelegateAction=function v({delegateAction:b,signer:A}){return l(this,void 0,void 0,function*(){const O=(0,a.encodeDelegateAction)(b),C=yield A.sign(O),T=new E.SignedDelegate({delegateAction:b,signature:new h.Signature({keyType:b.publicKey.keyType,data:C})});return{hash:new Uint8Array((0,_.sha256)(O)),signedDelegateAction:T}})}},23922:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signature=void 0;const l=d(17527);class _ extends l.Assignable{}r.Signature=_},61671:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FUNCTION_CALL_GAS=void 0;const _=l(d(98538));r.DEFAULT_FUNCTION_CALL_GAS=new _.default("30000000000000")},11229:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=void 0;const l=d(83132);r.logWarning=function _(...E){const[S,...a]=E;l.Logger.warn(S,...a)}},63375:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseRpcError=r.parseResultError=r.getErrorTypeFromErrorMessage=r.formatError=r.ServerError=r.logWarning=void 0;var l=d(11229);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var _=d(58298);Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return _.ServerError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return _.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return _.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return _.parseResultError}}),Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return _.parseRpcError}})},58298:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(r,"__esModule",{value:!0}),r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=r.ServerError=void 0;const _=d(17527),E=l(d(82701)),S=d(27044),a=l(d(86164)),h=l(d(3427)),g={formatNear:()=>(P,R)=>(0,S.formatNearAmount)(R(P))};class y extends _.TypedError{}r.ServerError=y;class v extends y{}function b(P){const R={},L=C(P,h.default.schema,R,""),H=new y(O(L,R),L);return Object.assign(H,R),H}function O(P,R){return"string"==typeof a.default[P]?E.default.render(a.default[P],Object.assign(Object.assign({},R),g)):JSON.stringify(R)}function C(P,R,L,H){let V,J,Y;for(const Z in R){if(M(P[Z]))return P[Z];if(N(P[Z]))V=P[Z],J=R[Z],Y=Z;else{if(!N(P.kind)||!N(P.kind[Z]))continue;V=P.kind[Z],J=R[Z],Y=Z}}if(V&&J){for(const Z of Object.keys(J.props))L[Z]=V[Z];return C(V,R,L,Y)}return L.kind=P,H}function N(P){return"[object Object]"===Object.prototype.toString.call(P)}function M(P){return"[object String]"===Object.prototype.toString.call(P)}r.parseRpcError=b,r.parseResultError=function A(P){const R=b(P.status.Failure),L=new v;return Object.assign(L,R),L.type=R.type,L.message=R.message,L.transaction_outcome=P.transaction_outcome,L},r.formatError=O,r.getErrorTypeFromErrorMessage=function T(P,R){switch(!0){case/^account .*? does not exist while viewing$/.test(P):case/^Account .*? doesn't exist$/.test(P):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(P):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(P):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(P):return"InvalidNonce";default:return R}}},27044:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.baseDecode=r.baseEncode=r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION=r.NEAR_NOMINATION_EXP=void 0;const _=l(d(98538)),E=l(d(65863));r.NEAR_NOMINATION_EXP=24,r.NEAR_NOMINATION=new _.default("10",10).pow(new _.default(r.NEAR_NOMINATION_EXP,10));const S=[],a=new _.default(10);for(let T=0,N=new _.default(5);T0&&M.iadd(S[L])}const P=(T=M.toString()).substring(0,T.length-r.NEAR_NOMINATION_EXP)||"0",R=T.substring(T.length-r.NEAR_NOMINATION_EXP).padStart(r.NEAR_NOMINATION_EXP,"0").substring(0,N);return function v(T){return T.replace(/\.?0*$/,"")}(`${function A(T){const N=/(-?\d+)(\d{3})/;for(;N.test(T);)T=T.replace(N,"$1,$2");return T}(P)}.${R}`)},r.parseNearAmount=function g(T){if(!T)return null;const N=(T=function y(T){return T.replace(/,/g,"").trim()}(T)).split("."),M=N[0],P=N[1]||"";if(N.length>2||P.length>r.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${T}' as NEAR amount`);return function b(T){return T=T.replace(/^0+/,""),""===T?"0":T}(M+P.padEnd(r.NEAR_NOMINATION_EXP,"0"))},r.baseEncode=function O(T){if("string"==typeof T){const N=[];for(let M=0;M{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConsoleLogger=void 0;r.ConsoleLogger=class d{constructor(_){this.logLevels=_,this.isLevelEnabled=E=>this.logLevels.includes(E)}print(_,E,...S){switch(_){case"error":case"fatal":return console.error(E,...S);case"warn":return console.warn(E,...S);case"log":return console.log(E,...S);case"debug":case"verbose":return console.debug(E,...S)}}verbose(_,...E){this.isLevelEnabled("verbose")&&this.print("verbose",_,...E)}debug(_,...E){this.isLevelEnabled("debug")&&this.print("debug",_,...E)}log(_,...E){this.isLevelEnabled("log")&&this.print("log",_,...E)}warn(_,...E){this.isLevelEnabled("warn")&&this.print("warn",_,...E)}error(_,...E){this.isLevelEnabled("error")&&this.print("error",_,...E)}fatal(_,...E){this.isLevelEnabled("fatal")&&this.print("fatal",_,...E)}}},83132:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;var l=d(55304);Object.defineProperty(r,"Logger",{enumerable:!0,get:function(){return l.Logger}})},55304:(ne,r,d)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.Logger=void 0;const _=d(56820),S="object"==typeof process&&process.env.NEAR_NO_LOGS?void 0:new _.ConsoleLogger(["verbose","debug","log","warn","error","fatal"]);class a{static error(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.error(g,...y)}static log(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.log(g,...y)}static warn(g,...y){var v;null===(v=this.instanceRef)||void 0===v||v.warn(g,...y)}static debug(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.debug)||void 0===b||b.call(v,g,...y)}static verbose(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.verbose)||void 0===b||b.call(v,g,...y)}static fatal(g,...y){var v,b;null===(b=null===(v=this.instanceRef)||void 0===v?void 0:v.fatal)||void 0===b||b.call(v,g,...y)}}r.Logger=a,l=a,a.instanceRef=S,a.overrideLogger=h=>{l.instanceRef=h}},14907:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.printTxOutcomeLogs=r.printTxOutcomeLogsAndFailures=void 0;const l=d(63375),_=d(83132);function S({contractId:a,logs:h,prefix:g=""}){for(const y of h)_.Logger.log(`${g}Log [${a}]: ${y}`)}r.printTxOutcomeLogsAndFailures=function E({contractId:a,outcome:h}){const g=[h.transaction_outcome,...h.receipts_outcome].reduce((y,v)=>{const b="object"==typeof v.outcome.status&&"object"==typeof v.outcome.status.Failure;return v.outcome.logs.length||b?y.concat({receiptIds:v.outcome.receipt_ids,logs:v.outcome.logs,failure:"object"==typeof v.outcome.status&&void 0!==v.outcome.status.Failure?(0,l.parseRpcError)(v.outcome.status.Failure):null}):y},[]);for(const y of g)_.Logger.log(`Receipt${y.receiptIds.length>1?"s":""}: ${y.receiptIds.join(", ")}`),S({contractId:a,logs:y.logs,prefix:"\t"}),y.failure&&_.Logger.warn(`\tFailure [${a}]: ${y.failure}`)},r.printTxOutcomeLogs=S},79835:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getTransactionLastResult=void 0,r.getTransactionLastResult=function d(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const _=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(_)}catch{return _}}return null}},42563:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.diffEpochValidators=r.findSeatPrice=void 0;const _=l(d(98538)),E=l(d(89176));r.findSeatPrice=function S(y,v,b,A){return A&&A<49?function a(y,v){const b=y.map(N=>new _.default(N.stake,10)).sort((N,M)=>N.cmp(M)),A=new _.default(v),O=b.reduce((N,M)=>N.add(M));if(O.lt(A))throw new Error("Stakes are below seats");let C=new _.default(1),T=O.add(new _.default(1));for(;!C.eq(T.sub(new _.default(1)));){const N=C.add(T).div(new _.default(2));let M=!1,P=new _.default(0);for(let R=0;Rnew _.default(C.stake,10)).sort((C,T)=>C.cmp(T)),O=A.reduce((C,T)=>C.add(T));return y.lengthb.set(O.account_id,O));const A=new Set(v.map(O=>O.account_id));return{newValidators:v.filter(O=>!b.has(O.account_id)),removedValidators:y.filter(O=>!A.has(O.account_id)),changedValidators:v.filter(O=>b.has(O.account_id)&&b.get(O.account_id).stake!=O.stake).map(O=>({current:b.get(O.account_id),next:O}))}}},44310:(ne,r,d)=>{var l=d(73502).Buffer;ne.exports=function(E){for(var S={},a=E.length,h=E.charAt(0),g=0;g>=8;for(;P>0;)C.push(255&P),P>>=8}for(var R=0;O[R]===h&&R0;)C.push(M%a),M=M/a|0}for(var P="",R=0;0===O[R]&&R=0;--L)P+=E[C[L]];return P},decodeUnsafe:b,decode:function A(O){var C=b(O);if(C)return C;throw new Error("Non-base"+a+" character")}}}},14685:(ne,r)=>{"use strict";r.__esModule=!0,r.DecodeBuffer=r.EncodeBuffer=void 0;var d=function(){function _(){this.offset=0,this.buffer_size=256,this.buffer=new ArrayBuffer(this.buffer_size),this.view=new DataView(this.buffer)}return _.prototype.resize_if_necessary=function(E){if(this.buffer_size-this.offsetthis.buffer.byteLength)throw new Error("Error in schema, the buffer is smaller than expected")},_.prototype.consume_value=function(E){var S=E.substring(1),a=parseInt(S)/8;this.assert_enough_buffer(a);var h="f"===E[0]?"getFloat".concat(S):"i"===E[0]?"getInt".concat(S):"getUint".concat(S),g=this.view[h](this.offset,!0);return this.offset+=a,g},_.prototype.consume_bytes=function(E){this.assert_enough_buffer(E);var S=this.buffer.slice(this.offset,this.offset+E);return this.offset+=E,S},_}();r.DecodeBuffer=l},80873:(ne,r,d)=>{"use strict";r.__esModule=!0,r.BorshDeserializer=void 0;var l=d(7763),_=d(14685),E=function(){function S(a){this.buffer=new _.DecodeBuffer(a)}return S.prototype.decode=function(a){return this.decode_value(a)},S.prototype.decode_value=function(a){if("string"==typeof a){if(l.integers.includes(a))return this.decode_integer(a);if("string"===a)return this.decode_string();if("bool"===a)return this.decode_boolean()}if("object"==typeof a){if("option"in a)return this.decode_option(a);if("enum"in a)return this.decode_enum(a);if("array"in a)return this.decode_array(a);if("set"in a)return this.decode_set(a);if("map"in a)return this.decode_map(a);if("struct"in a)return this.decode_struct(a)}throw new Error("Unsupported type: ".concat(a))},S.prototype.decode_integer=function(a){var h=parseInt(a.substring(1));return h<=32||"f64"==a?this.buffer.consume_value(a):this.decode_bigint(h,a.startsWith("i"))},S.prototype.decode_bigint=function(a,h){void 0===h&&(h=!1);var g=a/8,y=new Uint8Array(this.buffer.consume_bytes(g)),v=y.reduceRight(function(b,A){return b+A.toString(16).padStart(2,"0")},"");return h&&y[g-1]?BigInt.asIntN(a,BigInt("0x".concat(v))):BigInt("0x".concat(v))},S.prototype.decode_string=function(){var a=this.decode_integer("u32"),h=new Uint8Array(this.buffer.consume_bytes(a));return String.fromCharCode.apply(null,h)},S.prototype.decode_boolean=function(){return this.buffer.consume_value("u8")>0},S.prototype.decode_option=function(a){var h=this.buffer.consume_value("u8");if(1===h)return this.decode_value(a.option);if(0!==h)throw new Error("Invalid option ".concat(h));return null},S.prototype.decode_enum=function(a){var h,g=this.buffer.consume_value("u8");if(g>a.enum.length)throw new Error("Enum option ".concat(g," is not available"));var y=a.enum[g].struct,v=Object.keys(y)[0];return(h={})[v]=this.decode_value(y[v]),h},S.prototype.decode_array=function(a){for(var h=[],g=a.array.len?a.array.len:this.decode_integer("u32"),y=0;y>=BigInt(8);this.encoded.store_bytes(new Uint8Array(O))},y.prototype.encode_string=function(v){this.checkTypes&&h.expect_type(v,"string",this.fieldPath);var b=v;this.encoded.store_value(b.length,"u32");for(var A=0;A{"use strict";r.__esModule=!0,r.integers=void 0,r.integers=["u8","u16","u32","u64","u128","i8","i16","i32","i64","i128","f32","f64"]},33404:function(ne,r,d){"use strict";var M,l=this&&this.__extends||(M=function(P,R){return(M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,H){L.__proto__=H}||function(L,H){for(var V in H)Object.prototype.hasOwnProperty.call(H,V)&&(L[V]=H[V])})(P,R)},function(P,R){if("function"!=typeof R&&null!==R)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function L(){this.constructor=P}M(P,R),P.prototype=null===R?Object.create(R):(L.prototype=R.prototype,new L)});r.__esModule=!0,r.validate_schema=r.ErrorSchema=r.expect_enum=r.expect_same_size=r.expect_bigint=r.expect_type=r.isArrayLike=void 0;var _=d(7763);r.isArrayLike=function E(M){return Array.isArray(M)||!!M&&"object"==typeof M&&"length"in M&&"number"==typeof M.length&&(0===M.length||M.length>0&&M.length-1 in M)},r.expect_type=function S(M,P,R){if(typeof M!==P)throw new Error("Expected ".concat(P," not ").concat(typeof M,"(").concat(M,") at ").concat(R.join(".")))},r.expect_bigint=function a(M,P){if(!["number","string","bigint","boolean"].includes(typeof M)&&!("object"==typeof M&&null!==M&&"toString"in M))throw new Error("Expected bigint, number, boolean or string not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))},r.expect_same_size=function h(M,P,R){if(M!==P)throw new Error("Array length ".concat(M," does not match schema length ").concat(P," at ").concat(R.join(".")))},r.expect_enum=function g(M,P){if("object"!=typeof M||null===M)throw new Error("Expected object not ".concat(typeof M,"(").concat(M,") at ").concat(P.join(".")))};var y=_.integers.concat(["bool","string"]),v=["option","enum","array","set","map","struct"],b=function(M){function P(R,L){var H="Invalid schema: ".concat(JSON.stringify(R)," expected ").concat(L);return M.call(this,H)||this}return l(P,M),P}(Error);function A(M){if("string"!=typeof M||!y.includes(M)){if(M&&"object"==typeof M){var P=Object.keys(M);if(1===P.length&&v.includes(P[0])){var R=P[0];if("option"===R)return A(M[R]);if("enum"===R)return function O(M){if(!Array.isArray(M))throw new b(M,"Array");for(var P=0,R=M;P{var l=d(44310);ne.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},31400:(ne,r,d)=>{"use strict";var l=d(13633)("http-errors"),_=d(83952),E=d(99881),S=d(31505),a=d(59648);function h(C){return Number(String(C).charAt(0)+"00")}function A(C,T){var N=Object.getOwnPropertyDescriptor(C,"name");N&&N.configurable&&(N.value=T,Object.defineProperty(C,"name",N))}ne.exports=function g(){for(var C,T,N=500,M={},P=0;P=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof N||!E[N]&&(N<400||N>=600))&&(N=500);var L=g[N]||g[h(N)];for(var H in C||(C=L?new L(T):new Error(T||E[N]),Error.captureStackTrace(C,g)),(!L||!(C instanceof L)||C.status!==N)&&(C.expose=N<500,C.status=C.statusCode=N),M)"status"!==H&&"statusCode"!==H&&(C[H]=M[H]);return C},ne.exports.HttpError=function y(){function C(){throw new TypeError("cannot construct abstract class")}return S(C,Error),C}(),function O(C,T,N){T.forEach(function(P){var R,L=a(E[P]);switch(h(P)){case 400:R=function v(C,T,N){var M=T.match(/Error$/)?T:T+"Error";function P(R){var L=R??E[N],H=new Error(L);return Error.captureStackTrace(H,P),_(H,P.prototype),Object.defineProperty(H,"message",{enumerable:!0,configurable:!0,value:L,writable:!0}),Object.defineProperty(H,"name",{enumerable:!1,configurable:!0,value:M,writable:!0}),H}return S(P,C),A(P,M),P.prototype.status=N,P.prototype.statusCode=N,P.prototype.expose=!0,P}(N,L,P);break;case 500:R=function b(C,T,N){var M=T.match(/Error$/)?T:T+"Error";function P(R){var L=R??E[N],H=new Error(L);return Error.captureStackTrace(H,P),_(H,P.prototype),Object.defineProperty(H,"message",{enumerable:!0,configurable:!0,value:L,writable:!0}),Object.defineProperty(H,"name",{enumerable:!1,configurable:!0,value:M,writable:!0}),H}return S(P,C),A(P,M),P.prototype.status=N,P.prototype.statusCode=N,P.prototype.expose=!1,P}(N,L,P)}R&&(C[P]=R,C[L]=R)}),C["I'mateapot"]=l.function(C.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,E.codes,ne.exports.HttpError)},13633:ne=>{"use strict";function d(_,E){if("function"!=typeof _)throw new TypeError("argument fn must be a function");return _}function l(_,E,S){if(!_||"object"!=typeof _&&"function"!=typeof _)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(_,E);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}ne.exports=function r(_){if(!_)throw new TypeError("argument namespace is required");function E(S){}return E._file=void 0,E._ignored=!0,E._namespace=_,E._traced=!1,E._warned=Object.create(null),E.function=d,E.property=l,E}},31505:ne=>{"function"==typeof Object.create?ne.exports=function(d,l){d.super_=l,d.prototype=Object.create(l.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:ne.exports=function(d,l){d.super_=l;var _=function(){};_.prototype=l.prototype,d.prototype=new _,d.prototype.constructor=d}},82701:function(ne){ne.exports=function(){"use strict";var r=Object.prototype.toString,d=Array.isArray||function(Q){return"[object Array]"===r.call(Q)};function l(W){return"function"==typeof W}function _(W){return d(W)?"array":typeof W}function E(W){return W.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function S(W,Q){return null!=W&&"object"==typeof W&&Q in W}function a(W,Q){return null!=W&&"object"!=typeof W&&W.hasOwnProperty&&W.hasOwnProperty(Q)}var h=RegExp.prototype.test;function g(W,Q){return h.call(W,Q)}var y=/\S/;function v(W){return!g(y,W)}var b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(W){return String(W).replace(/[&<>"'`=\/]/g,function(D){return b[D]})}var O=/\s*/,C=/\s+/,T=/\s*=/,N=/\s*\}/,M=/#|\^|\/|>|\{|&|=|!/;function P(W,Q){if(!W)return[];var p,B,ie,D=!1,o=[],u=[],m=[],w=!1,x=!1,F="",G=0;function k(){if(w&&!x)for(;m.length;)delete u[m.pop()];else m=[];w=!1,x=!1}function te(ae){if("string"==typeof ae&&(ae=ae.split(C,2)),!d(ae)||2!==ae.length)throw new Error("Invalid tags: "+ae);p=new RegExp(E(ae[0])+"\\s*"),B=new RegExp("\\s*"+E(ae[1])),ie=new RegExp("\\s*"+E("}"+ae[1]))}te(Q||Y.tags);for(var ue,we,me,ve,ce,he,ee=new H(W);!ee.eos();){if(ue=ee.pos,me=ee.scanUntil(p))for(var le=0,de=me.length;le0?o[o.length-1][4]:Q;break;default:D.push(u)}return Q}function H(W){this.string=W,this.tail=W,this.pos=0}function V(W,Q){this.view=W,this.cache={".":this.view},this.parent=Q}function J(){this.templateCache={_cache:{},set:function(Q,D){this._cache[Q]=D},get:function(Q){return this._cache[Q]},clear:function(){this._cache={}}}}H.prototype.eos=function(){return""===this.tail},H.prototype.scan=function(Q){var D=this.tail.match(Q);if(!D||0!==D.index)return"";var o=D[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},H.prototype.scanUntil=function(Q){var o,D=this.tail.search(Q);switch(D){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,D),this.tail=this.tail.substring(D)}return this.pos+=o.length,o},V.prototype.push=function(Q){return new V(Q,this)},V.prototype.lookup=function(Q){var o,D=this.cache;if(D.hasOwnProperty(Q))o=D[Q];else{for(var m,w,x,u=this,F=!1;u;){if(Q.indexOf(".")>0)for(m=u.view,w=Q.split("."),x=0;null!=m&&x"===F?G=this.renderPartial(x,D,o,m):"&"===F?G=this.unescapedValue(x,D):"name"===F?G=this.escapedValue(x,D):"text"===F&&(G=this.rawValue(x)),void 0!==G&&(w+=G);return w},J.prototype.renderSection=function(Q,D,o,u){var m=this,w="",x=D.lookup(Q[1]);function F(p){return m.render(p,D,o)}if(x){if(d(x))for(var G=0,k=x.length;G0||!o)&&(m[w]=u+m[w]);return m.join("\n")},J.prototype.renderPartial=function(Q,D,o,u){if(o){var m=l(o)?o(Q[1]):o[Q[1]];if(null!=m){var w=Q[6],x=Q[5],F=Q[4],G=m;return 0==x&&F&&(G=this.indentPartial(m,F,w)),this.renderTokens(this.parse(G,u),D,o,G)}}},J.prototype.unescapedValue=function(Q,D){var o=D.lookup(Q[1]);if(null!=o)return o},J.prototype.escapedValue=function(Q,D){var o=D.lookup(Q[1]);if(null!=o)return Y.escape(o)},J.prototype.rawValue=function(Q){return Q[1]};var Y={name:"mustache.js",version:"4.0.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(W){Z.templateCache=W},get templateCache(){return Z.templateCache}},Z=new J;return Y.clearCache=function(){return Z.clearCache()},Y.parse=function(Q,D){return Z.parse(Q,D)},Y.render=function(Q,D,o,u){if("string"!=typeof Q)throw new TypeError('Invalid template! Template should be a "string" but "'+_(Q)+'" was given as the first argument for mustache#render(template, view, partials)');return Z.render(Q,D,o,u)},Y.escape=A,Y.Scanner=H,Y.Context=V,Y.Writer=J,Y}()},43913:(ne,r)=>{"use strict";var l=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof l<"u")return l;throw new Error("unable to locate global object")}();ne.exports=r=l.fetch,l.fetch&&(r.default=l.fetch.bind(l)),r.Headers=l.Headers,r.Request=l.Request,r.Response=l.Response},83952:ne=>{"use strict";ne.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function r(l,_){return l.__proto__=_,l}:function d(l,_){for(var E in _)l.hasOwnProperty(E)||(l[E]=_[E]);return l})},99881:(ne,r,d)=>{"use strict";var l=d(20863);function E(S){if("number"==typeof S){if(!E[S])throw new Error("invalid status code: "+S);return S}if("string"!=typeof S)throw new TypeError("code must be a number or string");var a=parseInt(S,10);if(!isNaN(a)){if(!E[a])throw new Error("invalid status code: "+a);return a}if(!(a=E[S.toLowerCase()]))throw new Error('invalid status message: "'+S+'"');return a}ne.exports=E,E.STATUS_CODES=l,E.codes=function _(S,a){var h=[];return Object.keys(a).forEach(function(y){var v=a[y],b=Number(y);S[b]=v,S[v]=b,S[v.toLowerCase()]=b,h.push(b)}),h}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},59648:ne=>{ne.exports=function r(d){return d.split(" ").map(function(l){return l.slice(0,1).toUpperCase()+l.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},68492:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(y,v,b,A){return new(b||(b=Promise))(function(C,T){function N(R){try{P(A.next(R))}catch(L){T(L)}}function M(R){try{P(A.throw(R))}catch(L){T(L)}}function P(R){R.done?C(R.value):function O(C){return C instanceof b?C:new b(function(T){T(C)})}(R.value).then(N,M)}P((A=A.apply(y,v||[])).next())})},_=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemorySigner=void 0;const E=d(29761),S=d(69170),a=_(d(1520)),h=d(2345);class g extends h.Signer{constructor(v){super(),this.keyStore=v}static fromKeyPair(v,b,A){return l(this,void 0,void 0,function*(){const O=new S.InMemoryKeyStore;return yield O.setKey(v,b,A),new g(O)})}createKey(v,b){return l(this,void 0,void 0,function*(){const A=E.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(b,v,A),A.getPublicKey()})}getPublicKey(v,b){return l(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(b,v);return null===A?null:A.getPublicKey()})}signMessage(v,b,A){return l(this,void 0,void 0,function*(){const O=new Uint8Array(a.default.sha256.array(v));if(!b)throw new Error("InMemorySigner requires provided account id");const C=yield this.keyStore.getKey(A,b);if(null===C)throw new Error(`Key for ${b} not found in ${A}`);return C.sign(O)})}toString(){return`InMemorySigner(${this.keyStore})`}}r.InMemorySigner=g},82613:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(68492);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var _=d(2345);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return _.Signer}})},2345:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=void 0;r.Signer=class d{}},39779:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.actionCreators=r.stringifyJsonOrBytes=void 0;const l=d(83407);function h(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}r.stringifyJsonOrBytes=h,r.actionCreators={addKey:function b(T,N){return new l.Action({addKey:new l.AddKey({publicKey:T,accessKey:N})})},createAccount:function S(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function O(T){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new l.Action({deleteKey:new l.DeleteKey({publicKey:T})})},deployContract:function a(T){return new l.Action({deployContract:new l.DeployContract({code:T})})},fullAccessKey:function _(){return new l.AccessKey({permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function g(T,N,M,P,R=h,L=!1){return L?new l.Action({functionCall:new l.FunctionCall({methodName:T,args:N,gas:M,deposit:P})}):new l.Action({functionCall:new l.FunctionCall({methodName:T,args:R(N),gas:M,deposit:P})})},functionCallAccessKey:function E(T,N,M){return new l.AccessKey({permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:T,allowance:M,methodNames:N})})})},signedDelegate:function C({delegateAction:T,signature:N}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:T,signature:N})})},stake:function v(T,N){return new l.Action({stake:new l.Stake({stake:T,publicKey:N})})},transfer:function y(T){return new l.Action({transfer:new l.Transfer({deposit:T})})}}},83407:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Action=r.SignedDelegate=r.DeleteAccount=r.DeleteKey=r.AddKey=r.Stake=r.Transfer=r.FunctionCall=r.DeployContract=r.CreateAccount=r.IAction=r.AccessKey=r.AccessKeyPermission=r.FullAccessPermission=r.FunctionCallPermission=void 0;const l=d(17527);class _{constructor(L){if(1!==Object.keys(L).length)throw new Error("Enum can only take single value");Object.keys(L).map(H=>{this[H]=L[H],this.enum=H})}}class E extends l.Assignable{}r.FunctionCallPermission=E;class S extends l.Assignable{}r.FullAccessPermission=S;r.AccessKeyPermission=class a extends _{};class h extends l.Assignable{}r.AccessKey=h;class g extends l.Assignable{}r.IAction=g;r.CreateAccount=class y extends g{};r.DeployContract=class v extends g{};r.FunctionCall=class b extends g{};r.Transfer=class A extends g{};r.Stake=class O extends g{};r.AddKey=class C extends g{};r.DeleteKey=class T extends g{};r.DeleteAccount=class N extends g{};r.SignedDelegate=class M extends g{};r.Action=class P extends _{}},71354:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createTransaction=void 0;const l=d(73315);r.createTransaction=function _(E,S,a,h,g,y){return new l.Transaction({signerId:E,publicKey:S,nonce:h,receiverId:a,actions:g,blockHash:y})}},91396:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.buildDelegateAction=r.DelegateAction=void 0;const l=d(17527),_=d(39779),{addKey:E,createAccount:S,deleteAccount:a,deleteKey:h,deployContract:g,functionCall:y,stake:v,transfer:b}=_.actionCreators;class A extends l.Assignable{}r.DelegateAction=A,r.buildDelegateAction=function O({actions:C,maxBlockHeight:T,nonce:N,publicKey:M,receiverId:P,senderId:R}){return new A({senderId:R,receiverId:P,actions:C.map(L=>{if(!L.type&&!L.params)return L;switch(L.type){case"AddKey":{const{publicKey:H,accessKey:V}=L.params;return E(H,V)}case"CreateAccount":return S(L.params.createAccount);case"DeleteAccount":return a(L.params.deleteAccount);case"DeleteKey":return h(L.params.publicKey);case"DeployContract":return g(L.params.code);case"FunctionCall":{const{methodName:H,args:V,gas:J,deposit:Y}=L.params;return y(H,V,J,Y)}case"Stake":return v(L.params.stake,L.params.publicKey);case"Transfer":{const{deposit:H}=L.params;return b(H)}}throw new Error("Unrecognized action")}),nonce:N,maxBlockHeight:T,publicKey:M})}},38445:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(39779),r),_(d(83407),r),_(d(71354),r),_(d(91396),r),_(d(73315),r),_(d(20373),r),_(d(95758),r)},11739:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DelegateActionPrefix=void 0;const l=d(17527),_=Math.pow(2,30),E_MetaTransactions=366;class S extends l.Assignable{}class a extends S{constructor(y){super({prefix:_+y})}}r.DelegateActionPrefix=class h extends a{constructor(){super(E_MetaTransactions)}}},73315:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SCHEMA=r.SignedTransaction=r.Transaction=r.decodeSignedTransaction=r.decodeTransaction=r.encodeTransaction=r.encodeSignedDelegate=r.encodeDelegateAction=void 0;const l=d(29761),_=d(17527),E=d(21531),S=d(83407),a=d(91396),h=d(11739),g=d(95758);function b(N){return(0,E.serialize)(r.SCHEMA,N)}function A(N){return(0,E.deserialize)(r.SCHEMA,C,N)}function O(N){return(0,E.deserialize)(r.SCHEMA,T,N)}r.encodeDelegateAction=function y(N){return new Uint8Array([...(0,E.serialize)(r.SCHEMA,new h.DelegateActionPrefix),...(0,E.serialize)(r.SCHEMA,N)])},r.encodeSignedDelegate=function v(N){return(0,E.serialize)(r.SCHEMA,N)},r.encodeTransaction=b,r.decodeTransaction=A,r.decodeSignedTransaction=O;class C extends _.Assignable{encode(){return b(this)}static decode(M){return A(M)}}r.Transaction=C;class T extends _.Assignable{encode(){return b(this)}static decode(M){return O(M)}}r.SignedTransaction=T,r.SCHEMA=new Map([[g.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",C],["signature",g.Signature]]}],[C,{kind:"struct",fields:[["signerId","string"],["publicKey",l.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[S.Action]]]}],[l.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[S.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",S.AccessKeyPermission]]}],[S.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",S.FunctionCallPermission],["fullAccess",S.FullAccessPermission]]}],[S.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[S.FullAccessPermission,{kind:"struct",fields:[]}],[S.Action,{kind:"enum",field:"enum",values:[["createAccount",S.CreateAccount],["deployContract",S.DeployContract],["functionCall",S.FunctionCall],["transfer",S.Transfer],["stake",S.Stake],["addKey",S.AddKey],["deleteKey",S.DeleteKey],["deleteAccount",S.DeleteAccount],["signedDelegate",S.SignedDelegate]]}],[S.CreateAccount,{kind:"struct",fields:[]}],[S.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[S.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[S.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[S.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",l.PublicKey]]}],[S.AddKey,{kind:"struct",fields:[["publicKey",l.PublicKey],["accessKey",S.AccessKey]]}],[S.DeleteKey,{kind:"struct",fields:[["publicKey",l.PublicKey]]}],[S.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[a.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[S.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",l.PublicKey]]}],[h.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[S.SignedDelegate,{kind:"struct",fields:[["delegateAction",a.DelegateAction],["signature",g.Signature]]}]])},20373:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(A,O,C,T){return new(C||(C=Promise))(function(M,P){function R(V){try{H(T.next(V))}catch(J){P(J)}}function L(V){try{H(T.throw(V))}catch(J){P(J)}}function H(V){V.done?M(V.value):function N(M){return M instanceof C?M:new C(function(P){P(M)})}(V.value).then(R,L)}H((T=T.apply(A,O||[])).next())})},_=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0}),r.signDelegateAction=r.signTransaction=void 0;const E=_(d(1520)),S=d(83407),a=d(71354),h=d(73315),g=d(95758);function y(A,O,C,T){return l(this,void 0,void 0,function*(){const N=(0,h.encodeTransaction)(A),M=new Uint8Array(E.default.sha256.array(N)),P=yield O.signMessage(N,C,T);return[M,new h.SignedTransaction({transaction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:P.signature})})]})}r.signTransaction=function v(...A){return l(this,void 0,void 0,function*(){if(A[0].constructor===h.Transaction){const[O,C,T,N]=A;return y(O,C,T,N)}{const[O,C,T,N,M,P,R]=A,L=yield M.getPublicKey(P,R);return y((0,a.createTransaction)(P,L,O,C,T,N),M,P,R)}})},r.signDelegateAction=function b({delegateAction:A,signer:O}){return l(this,void 0,void 0,function*(){const C=(0,h.encodeDelegateAction)(A),T=yield O.sign(C),N=new S.SignedDelegate({delegateAction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(E.default.sha256.array(C)),signedDelegateAction:N}})}},95758:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signature=void 0;const l=d(17527);class _ extends l.Assignable{}r.Signature=_},32272:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Assignable=void 0;r.Assignable=class d{constructor(_){Object.keys(_).map(E=>{this[E]=_[E]})}}},27876:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorContext=r.TypedError=r.ArgumentTypeError=r.PositionalArgsError=void 0;class d extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}r.PositionalArgsError=d;class l extends Error{constructor(a,h,g){super(`Expected ${h} for '${a}' argument, but got '${JSON.stringify(g)}'`)}}r.ArgumentTypeError=l;class _ extends Error{constructor(a,h,g){super(a),this.type=h||"UntypedError",this.context=g}}r.TypedError=_;r.ErrorContext=class E{constructor(a){this.transactionHash=a}}},17527:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(32272),r),_(d(27876),r),_(d(39077),r)},39077:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FinalExecutionStatusBasic=r.ExecutionStatusBasic=r.IdType=void 0;var l=d(16365);Object.defineProperty(r,"IdType",{enumerable:!0,get:function(){return l.IdType}});var _=d(83706);Object.defineProperty(r,"ExecutionStatusBasic",{enumerable:!0,get:function(){return _.ExecutionStatusBasic}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return _.FinalExecutionStatusBasic}})},16365:(ne,r)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.IdType=void 0,(l=r.IdType||(r.IdType={})).Transaction="transaction",l.Receipt="receipt"},83706:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.FinalExecutionStatusBasic=r.ExecutionStatusBasic=void 0,(_=r.ExecutionStatusBasic||(r.ExecutionStatusBasic={})).Unknown="Unknown",_.Pending="Pending",_.Failure="Failure",function(_){_.NotStarted="NotStarted",_.Started="Started",_.Failure="Failure"}(r.FinalExecutionStatusBasic||(r.FinalExecutionStatusBasic={}))},73215:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(r,"__esModule",{value:!0}),r.DEFAULT_FUNCTION_CALL_GAS=void 0;const _=l(d(98538));r.DEFAULT_FUNCTION_CALL_GAS=new _.default("30000000000000")},38668:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=void 0,r.logWarning=function d(...l){process.env.NEAR_NO_LOGS||console.warn(...l)}},359:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseRpcError=r.parseResultError=r.getErrorTypeFromErrorMessage=r.formatError=r.ServerError=r.logWarning=void 0;var l=d(38668);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return l.logWarning}});var _=d(97217);Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return _.ServerError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return _.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return _.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return _.parseResultError}}),Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return _.parseRpcError}})},97217:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(P){return P&&P.__esModule?P:{default:P}};Object.defineProperty(r,"__esModule",{value:!0}),r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=r.ServerError=void 0;const _=d(17527),E=l(d(11346)),S=d(67112),a=l(d(56584)),h=l(d(96747)),g={formatNear:()=>(P,R)=>(0,S.formatNearAmount)(R(P))};class y extends _.TypedError{}r.ServerError=y;class v extends y{}function b(P){const R={},L=C(P,h.default.schema,R,""),H=new y(O(L,R),L);return Object.assign(H,R),H}function O(P,R){return"string"==typeof a.default[P]?E.default.render(a.default[P],Object.assign(Object.assign({},R),g)):JSON.stringify(R)}function C(P,R,L,H){let V,J,Y;for(const Z in R){if(M(P[Z]))return P[Z];if(N(P[Z]))V=P[Z],J=R[Z],Y=Z;else{if(!N(P.kind)||!N(P.kind[Z]))continue;V=P.kind[Z],J=R[Z],Y=Z}}if(V&&J){for(const Z of Object.keys(J.props))L[Z]=V[Z];return C(V,R,L,Y)}return L.kind=P,H}function N(P){return"[object Object]"===Object.prototype.toString.call(P)}function M(P){return"[object String]"===Object.prototype.toString.call(P)}r.parseRpcError=b,r.parseResultError=function A(P){const R=b(P.status.Failure),L=new v;return Object.assign(L,R),L.type=R.type,L.message=R.message,L.transaction_outcome=P.transaction_outcome,L},r.formatError=O,r.getErrorTypeFromErrorMessage=function T(P,R){switch(!0){case/^account .*? does not exist while viewing$/.test(P):case/^Account .*? doesn't exist$/.test(P):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(P):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(P):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(P):return"InvalidNonce";default:return R}}},67112:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0}),r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION=r.NEAR_NOMINATION_EXP=void 0;const _=l(d(98538));r.NEAR_NOMINATION_EXP=24,r.NEAR_NOMINATION=new _.default("10",10).pow(new _.default(r.NEAR_NOMINATION_EXP,10));const E=[],S=new _.default(10);for(let A=0,O=new _.default(5);A0&&C.iadd(E[M])}const T=(A=C.toString()).substring(0,A.length-r.NEAR_NOMINATION_EXP)||"0",N=A.substring(A.length-r.NEAR_NOMINATION_EXP).padStart(r.NEAR_NOMINATION_EXP,"0").substring(0,O);return function y(A){return A.replace(/\.?0*$/,"")}(`${function b(A){const O=/(-?\d+)(\d{3})/;for(;O.test(A);)A=A.replace(O,"$1,$2");return A}(T)}.${N}`)},r.parseNearAmount=function h(A){if(!A)return null;const O=(A=function g(A){return A.replace(/,/g,"").trim()}(A)).split("."),C=O[0],T=O[1]||"";if(O.length>2||T.length>r.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${A}' as NEAR amount`);return function v(A){return A=A.replace(/^0+/,""),""===A?"0":A}(C+T.padEnd(r.NEAR_NOMINATION_EXP,"0"))}},41166:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(73215),r),_(d(359),r),_(d(67112),r),_(d(30279),r),_(d(11305),r),_(d(85406),r)},30279:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.printTxOutcomeLogs=r.printTxOutcomeLogsAndFailures=void 0;const l=d(359),_=!!process.env.NEAR_NO_LOGS;function S({contractId:a,logs:h,prefix:g=""}){if(!_)for(const y of h)console.log(`${g}Log [${a}]: ${y}`)}r.printTxOutcomeLogsAndFailures=function E({contractId:a,outcome:h}){if(_)return;const g=[h.transaction_outcome,...h.receipts_outcome].reduce((y,v)=>{const b="object"==typeof v.outcome.status&&"object"==typeof v.outcome.status.Failure;return v.outcome.logs.length||b?y.concat({receiptIds:v.outcome.receipt_ids,logs:v.outcome.logs,failure:"object"==typeof v.outcome.status&&void 0!==v.outcome.status.Failure?(0,l.parseRpcError)(v.outcome.status.Failure):null}):y},[]);for(const y of g)console.log(`Receipt${y.receiptIds.length>1?"s":""}: ${y.receiptIds.join(", ")}`),S({contractId:a,logs:y.logs,prefix:"\t"}),y.failure&&console.warn(`\tFailure [${a}]: ${y.failure}`)},r.printTxOutcomeLogs=S},11305:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getTransactionLastResult=void 0,r.getTransactionLastResult=function d(l){if("object"==typeof l.status&&"string"==typeof l.status.SuccessValue){const _=Buffer.from(l.status.SuccessValue,"base64").toString();try{return JSON.parse(_)}catch{return _}}return null}},85406:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.diffEpochValidators=r.findSeatPrice=void 0;const _=l(d(98538)),E=l(d(89176));r.findSeatPrice=function S(y,v,b,A){return A&&A<49?function a(y,v){const b=y.map(N=>new _.default(N.stake,10)).sort((N,M)=>N.cmp(M)),A=new _.default(v),O=b.reduce((N,M)=>N.add(M));if(O.lt(A))throw new Error("Stakes are below seats");let C=new _.default(1),T=O.add(new _.default(1));for(;!C.eq(T.sub(new _.default(1)));){const N=C.add(T).div(new _.default(2));let M=!1,P=new _.default(0);for(let R=0;Rnew _.default(C.stake,10)).sort((C,T)=>C.cmp(T)),O=A.reduce((C,T)=>C.add(T));return y.lengthb.set(O.account_id,O));const A=new Set(v.map(O=>O.account_id));return{newValidators:v.filter(O=>!b.has(O.account_id)),removedValidators:y.filter(O=>!A.has(O.account_id)),changedValidators:v.filter(O=>b.has(O.account_id)&&b.get(O.account_id).stake!=O.stake).map(O=>({current:b.get(O.account_id),next:O}))}}},9855:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=void 0;var l=d(75754);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}});var _=d(55859);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return _.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return _.WalletConnection}})},75754:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})},_=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;const E=d(74931),S=_(d(98538));r.Near=class a{constructor(g){var y;if(this.config=g,this.connection=E.Connection.fromConfig({networkId:g.networkId,provider:{type:"JsonRpcProvider",args:{url:g.nodeUrl,headers:g.headers}},signer:g.signer||{type:"InMemorySigner",keyStore:g.keyStore||(null===(y=g.deps)||void 0===y?void 0:y.keyStore)},jsvmAccountId:g.jsvmAccountId||`jsvm.${g.networkId}`}),g.masterAccount){const v=g.initialBalance?new S.default(g.initialBalance):new S.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,g.masterAccount),v)}else g.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,g.helperUrl):this.accountCreator=null}account(g){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,g)})}createAccount(g,y){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(g,y),new E.Account(this.connection,g)})}}},55859:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(T,N,M,P){return new(M||(M=Promise))(function(L,H){function V(Z){try{Y(P.next(Z))}catch(W){H(W)}}function J(Z){try{Y(P.throw(Z))}catch(W){H(W)}}function Y(Z){Z.done?L(Z.value):function R(L){return L instanceof M?L:new M(function(H){H(L)})}(Z.value).then(V,J)}Y((P=P.apply(T,N||[])).next())})},_=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectedWalletAccount=r.WalletConnection=void 0;const E=d(74931),S=d(29761),a=d(38445),h=_(d(98538)),g=d(21531),A="pending_key";r.WalletConnection=class O{constructor(N,M){if("string"!=typeof M)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(L,H)=>"isSignedIn"===H?()=>!1:"getAccountId"===H?()=>"":L[H]&&"function"==typeof L[H]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:L[H]});this._near=N;const P=M+"_wallet_auth_key",R=JSON.parse(window.localStorage.getItem(P));this._networkId=N.config.networkId,this._walletBaseUrl=N.config.walletUrl,M=M||N.config.contractName||"default",this._keyStore=N.connection.signer.keyStore,this._authData=R||{allKeys:[]},this._authDataKey=P,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:N,methodNames:M,successUrl:P,failureUrl:R}){return l(this,void 0,void 0,function*(){const L=new URL(window.location.href),H=new URL(this._walletBaseUrl+"/login/");if(H.searchParams.set("success_url",P||L.href),H.searchParams.set("failure_url",R||L.href),N){yield(yield this._near.account(N)).state(),H.searchParams.set("contract_id",N);const J=S.KeyPair.fromRandom("ed25519");H.searchParams.set("public_key",J.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+J.getPublicKey(),J)}M&&M.forEach(V=>{H.searchParams.append("methodNames",V)}),window.location.assign(H.toString())})}requestSignTransactions({transactions:N,meta:M,callbackUrl:P}){return l(this,void 0,void 0,function*(){const R=new URL(window.location.href),L=new URL("sign",this._walletBaseUrl);L.searchParams.set("transactions",N.map(H=>(0,g.serialize)(a.SCHEMA,H)).map(H=>Buffer.from(H).toString("base64")).join(",")),L.searchParams.set("callbackUrl",P||R.href),M&&L.searchParams.set("meta",M),window.location.assign(L.toString())})}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const N=new URL(window.location.href),M=N.searchParams.get("public_key")||"",P=(N.searchParams.get("all_keys")||"").split(","),R=N.searchParams.get("account_id")||"";if(R){const L={accountId:R,allKeys:P};window.localStorage.setItem(this._authDataKey,JSON.stringify(L)),M&&(yield this._moveKeyFromTempToPermanent(R,M)),this._authData=L}N.searchParams.delete("public_key"),N.searchParams.delete("all_keys"),N.searchParams.delete("account_id"),N.searchParams.delete("meta"),N.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,N.toString())})}_moveKeyFromTempToPermanent(N,M){return l(this,void 0,void 0,function*(){const P=yield this._keyStore.getKey(this._networkId,A+M);yield this._keyStore.setKey(this._networkId,N,P),yield this._keyStore.removeKey(this._networkId,A+M)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new C(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class C extends E.Account{constructor(N,M,P){super(M,P),this.walletConnection=N}signAndSendTransaction({receiverId:N,actions:M,walletMeta:P,walletCallbackUrl:R=window.location.href}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const H=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let V=yield this.accessKeyForTransaction(N,M,H);if(!V)throw new Error(`Cannot find matching key for transaction sent to ${N}`);if(H&&H.toString()===V.public_key)try{return yield L.signAndSendTransaction.call(this,{receiverId:N,actions:M})}catch(D){if("NotEnoughAllowance"!==D.type)throw D;V=yield this.accessKeyForTransaction(N,M)}const J=yield this.connection.provider.block({finality:"final"}),Y=(0,g.baseDecode)(J.header.hash),Z=S.PublicKey.from(V.public_key),W=V.access_key.nonce.add(new h.default(1)),Q=(0,a.createTransaction)(this.accountId,Z,N,W,M,Y);return yield this.walletConnection.requestSignTransactions({transactions:[Q],meta:P,callbackUrl:R}),new Promise((D,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(N,M,P){return l(this,void 0,void 0,function*(){const{access_key:{permission:R}}=N;if("FullAccess"===R)return!0;if(R.FunctionCall){const{receiver_id:L,method_names:H}=R.FunctionCall;if(L===this.accountId&&H.includes("add_request_and_confirm"))return!0;if(L===M){if(1!==P.length)return!1;const[{functionCall:V}]=P;return V&&(!V.deposit||"0"===V.deposit.toString())&&(0===H.length||H.includes(V.methodName))}}return!1})}accessKeyForTransaction(N,M,P){return l(this,void 0,void 0,function*(){const R=yield this.getAccessKeys();if(P){const H=R.find(V=>V.public_key.toString()===P.toString());if(H&&(yield this.accessKeyMatchesTransaction(H,N,M)))return H}const L=this.walletConnection._authData.allKeys;for(const H of R)if(-1!==L.indexOf(H.public_key)&&(yield this.accessKeyMatchesTransaction(H,N,M)))return H;return null})}}r.ConnectedWalletAccount=C},67497:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(Q,D,o,u){void 0===u&&(u=o);var m=Object.getOwnPropertyDescriptor(D,o);(!m||("get"in m?!D.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return D[o]}}),Object.defineProperty(Q,u,m)}:function(Q,D,o,u){void 0===u&&(u=o),Q[u]=D[o]}),_=this&&this.__setModuleDefault||(Object.create?function(Q,D){Object.defineProperty(Q,"default",{enumerable:!0,value:D})}:function(Q,D){Q.default=D}),E=this&&this.__importStar||function(Q){if(Q&&Q.__esModule)return Q;var D={};if(null!=Q)for(var o in Q)"default"!==o&&Object.prototype.hasOwnProperty.call(Q,o)&&l(D,Q,o);return _(D,Q),D},S=this&&this.__awaiter||function(Q,D,o,u){return new(o||(o=Promise))(function(w,x){function F(p){try{k(u.next(p))}catch(B){x(B)}}function G(p){try{k(u.throw(p))}catch(B){x(B)}}function k(p){p.done?w(p.value):function m(w){return w instanceof o?w:new o(function(x){x(w)})}(p.value).then(F,G)}k((u=u.apply(Q,D||[])).next())})},a=this&&this.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(r,"__esModule",{value:!0});const h=a(d(41348)),g=d(38445),y=d(71836),v=d(91001),b=d(91311),A=d(7123),O=d(45733),C=d(46358),T=d(8127),N=d(98538),M=d(46260),P=d(67388),R=d(89764),L=E(d(65645)),H=d(35737),V=d(30684),J=a(d(59881)),Y=d(70560),Z={mainnet:"https://rpc.mainnet.near.org",testnet:"https://rpc.testnet.near.org"};class W extends y.Account{constructor(D){var o,u;super({networkId:D.network,jsvmAccountId:`jsvm.${D.network}`,signer:new y.InMemorySigner(new v.InMemoryKeyStore),provider:new b.JsonRpcProvider({url:Z[D.network]})},D.accountId),this.publicKey=D.publicKey,this.snap=null!==(o=D.snap)&&void 0!==o?o:new J.default,this.delegateProvider=null!==(u=D.delegateProvider)&&void 0!==u?u:new Y.HEREDelegateProvider}get network(){return this.connection.networkId}connect(D,o=[]){return S(this,void 0,void 0,function*(){return yield this.snap.connect({network:this.network,contractId:D,methods:o})})}disconnect(){return S(this,void 0,void 0,function*(){return yield this.snap.disconnect({network:this.network})})}authenticate(D,o){return S(this,void 0,void 0,function*(){yield this.activateIfNeeded();const u=h.default.randomBytes(32),m={message:o,recipient:D,nonce:u,network:this.network},w=yield this.signMessage(m);if(!L.verifySignature(m,w))throw Error("Signature is incorrect");if(!(yield this.getAccessKeys()).some(k=>k.public_key===w.publicKey&&"FullAccess"===k.access_key.permission))throw Error("Signer public key is not full access");return w})}signMessage(D){return S(this,void 0,void 0,function*(){const o=yield this.snap.signMessage({message:D.message,nonce:Array.from(D.nonce),recipient:D.recipient,network:this.network});if(!o)throw Error("Signed result is undefined");const{accountId:u,publicKey:m,signature:w}=o;if(!u||!m||!w)throw Error("Signed result is undefined");return{accountId:u,publicKey:m,signature:w}})}signTransaction(D,o){return S(this,void 0,void 0,function*(){const u=yield this.getLastNonce(),{total:m}=yield this.getAccountBalance(),w=yield this.snap.signTransactions({network:this.connection.networkId,hintBalance:m,transactions:[{recentBlockHash:u.block_hash,nonce:new N.BN(u.nonce).iaddn(1).toNumber(),actions:o.map(P.convertAction),receiverId:D}]});if(!w?.[0])throw Error("Access denided");return[(0,A.base_decode)(w[0][0]),O.SignedTransaction.decode((0,A.base_decode)(w[0][1]))]})}activateIfNeeded(D=2){return S(this,void 0,void 0,function*(){if(D<=0)return null;try{return yield this.getLastNonce()}catch{try{if(!this.delegateProvider)throw Error();return yield this.delegateProvider.activateAccount(this.accountId,this.publicKey.toString(),this.network),yield(0,M.wait)(1e3),yield this.activateIfNeeded(D-1)}catch{return yield this.snap.needActivate(this.network),yield(0,M.wait)(1e3),yield this.activateIfNeeded(D-1)}}})}getLastNonce(){return S(this,void 0,void 0,function*(){return yield this.connection.provider.query({request_type:"view_access_key",public_key:this.publicKey.toString(),account_id:this.accountId,finality:"final"})})}signedDelegate({actions:D,blockHeightTtl:o,receiverId:u,payer:m}){return S(this,void 0,void 0,function*(){const w=yield this.getLastNonce(),x=(0,g.buildDelegateAction)({maxBlockHeight:new N.BN(w.block_height).add(new N.BN(o)),nonce:new N.BN(w.nonce).add(new N.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:u,actions:D}),{total:F}=yield this.getAccountBalance(),G=yield this.snap.signDelegatedTransactions({payer:m,hintBalance:F,network:this.connection.networkId,delegateAction:{maxBlockHeight:x.maxBlockHeight.toString(),actions:x.actions.map(P.convertAction),publicKey:x.publicKey.toString(),nonce:x.nonce.toString(),receiverId:x.receiverId,senderId:x.senderId}});if(!G?.signature||!G?.transaction)throw Error("Access denied");return{delegateAction:x,signature:{keyType:C.KeyType.ED25519,data:(0,A.base_decode)(G.signature)}}})}signAndSendTransaction({receiverId:D,actions:o}){return S(this,void 0,void 0,function*(){return(yield this.executeTransactions([{actions:o.map(P.convertAction),receiverId:D}]))[0]})}buildDelegateAction(D){return S(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new Y.DelegateNotAllowed;if(D instanceof g.DelegateAction){const x=this.connection.networkId,F=yield this.delegateProvider.isCanDelegate(D,x);return{action:D,allowed:F}}const o=yield this.getLastNonce(),u=(0,g.buildDelegateAction)({actions:D.actions.map(R.createAction),maxBlockHeight:new N.BN(o.block_height).add(new N.BN(100)),nonce:new N.BN(o.nonce).add(new N.BN(1)),publicKey:this.publicKey,senderId:this.accountId,receiverId:D.receiverId}),m=this.connection.networkId;return{action:u,allowed:yield this.delegateProvider.isCanDelegate(u,m)}})}executeDelegate(D){return S(this,void 0,void 0,function*(){if(!this.delegateProvider)throw new Y.DelegateNotAllowed;yield this.activateIfNeeded();const{action:o,allowed:u}=yield this.buildDelegateAction(D);if(!u){const G=`Delegated transaction is now allowed by ${this.delegateProvider.payer}. Try other DelegateProvider`;throw new Y.DelegateNotAllowed(G)}const m=yield this.signedDelegate({payer:this.delegateProvider.payer,actions:o.actions,receiverId:D.receiverId,blockHeightTtl:100}),{provider:w,networkId:x}=this.connection,F=yield this.delegateProvider.sendDelegate(m,x);return yield(0,M.waitTransactionResult)(F,this.accountId,w)})}executeTransaction(D){return S(this,void 0,void 0,function*(){try{if(D.disableDelegate)throw new Y.DelegateNotAllowed;return yield this.executeDelegate(D)}catch(o){if(o instanceof Y.DelegateNotAllowed||o instanceof Y.DelegateRequestError)return(yield this.executeTransactions([D]))[0];throw o}})}executeTransactions(D){return S(this,void 0,void 0,function*(){yield this.activateIfNeeded();const o=yield this.getLastNonce(),{total:u}=yield this.getAccountBalance(),m=yield this.snap.signTransactions({hintBalance:u,network:this.connection.networkId,transactions:D.map((x,F)=>Object.assign({nonce:new N.BN(o.nonce).iaddn(F+1).toNumber(),recentBlockHash:o.block_hash},x))});if(null==m)throw new H.TransactionSignRejected;const w=[];m?.forEach((x,F)=>{if(null==x)throw new H.TransactionSignRejected(D[F])});try{for(const x of m){const F=x,G=O.SignedTransaction.decode(Buffer.from(F[1],"hex"));w.push(yield this.connection.provider.sendTransaction(G))}}catch(x){throw new H.TransactionInListError(w,x)}return w})}static restore({network:D,delegateProvider:o,snap:u=new J.default}){return S(this,void 0,void 0,function*(){const m=yield u.getAccount(D).catch(()=>null);if(!m?.accountId||!m?.publicKey)return null;const w=new W({publicKey:T.PublicKey.fromString(m.publicKey),accountId:m.accountId,delegateProvider:o,network:D,snap:u});return yield w.activateIfNeeded(),w})}static connect({snap:D=new J.default,delegateProvider:o,contractId:u,methods:m,network:w}){return S(this,void 0,void 0,function*(){const x=yield D.getStatus();if(x===V.NearSnapStatus.NOT_SUPPORTED)throw Error("You need install Metamask no lower than version 11");x===V.NearSnapStatus.NOT_INSTALLED&&(yield D.install());const F=yield D.connect({contractId:u,methods:m,network:w});if(!F?.accountId)throw Error("Metamask Near Snap did not return account id");if(!F?.publicKey)throw Error("Metamask Near Snap did not return public key");const G=new W({delegateProvider:o,publicKey:T.PublicKey.fromString(F.publicKey),accountId:F.accountId,network:w,snap:D});return yield G.activateIfNeeded(),G})}}r.default=W},70560:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(g,y,v,b){return new(v||(v=Promise))(function(O,C){function T(P){try{M(b.next(P))}catch(R){C(R)}}function N(P){try{M(b.throw(P))}catch(R){C(R)}}function M(P){P.done?O(P.value):function A(O){return O instanceof v?O:new v(function(C){C(O)})}(P.value).then(T,N)}M((b=b.apply(g,y||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.HEREDelegateProvider=r.DelegateRequestError=r.DelegateNotAllowed=void 0;const _=d(7123),E=d(71836);class S extends Error{}r.DelegateNotAllowed=S;class a extends Error{}r.DelegateRequestError=a;r.HEREDelegateProvider=class h{constructor(){this.endpoint="https://api.herewallet.app/api/v1",this.payer="here"}activateAccount(y,v,b){return l(this,void 0,void 0,function*(){const A=yield fetch(`${this.endpoint}/user/create_near_username`,{method:"POST",body:JSON.stringify({near_account_id:y,device_id:"metamask",public_key:v,sign:""}),headers:{Network:b}});if(!A.ok)throw new a(yield A.text())})}isCanDelegate(y,v="mainnet"){return l(this,void 0,void 0,function*(){if("mainnet"!==v)return!1;const b=Buffer.from(E.transactions.encodeDelegateAction(y)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/is_delegate`,{body:JSON.stringify({transaction:b}),method:"POST"});if(!A.ok)throw new a(yield A.text());const{allowed:O}=yield A.json();return O})}sendDelegate(y,v="mainnet"){return l(this,void 0,void 0,function*(){if("mainnet"!==v)throw new S;const b=Buffer.from(E.transactions.encodeDelegateAction(y.delegateAction)).toString("base64"),A=yield fetch(`${this.endpoint}/transactions/call_delegate`,{method:"POST",body:JSON.stringify({signature:(0,_.base_encode)(y.signature.data),transaction:b})});if(!A.ok)throw new a(yield A.text());const{hash:O}=yield A.json();return O})}}},35737:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TransactionInListError=r.TransactionSignRejected=void 0;class d extends Error{constructor(E){super("Transaction was rejected by Metamask user"),this.name="TransactionSignRejected",this.trx=E}}r.TransactionSignRejected=d;class l extends Error{constructor(E,S){super(S instanceof Error?S.message:String(S)),this.name="ListOfTransactionsError",this.completed=E,this.reason=S}}r.TransactionInListError=l},72487:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(y,v,b,A){void 0===A&&(A=b);var O=Object.getOwnPropertyDescriptor(v,b);(!O||("get"in O?!v.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return v[b]}}),Object.defineProperty(y,A,O)}:function(y,v,b,A){void 0===A&&(A=b),y[A]=v[b]}),_=this&&this.__exportStar||function(y,v){for(var b in y)"default"!==b&&!Object.prototype.hasOwnProperty.call(v,b)&&l(v,y,b)},E=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.NearSnapAccount=r.TransactionSignRejected=r.TransactionInListError=r.NearSnapProvider=r.NearSnap=void 0,_(d(30684),r);var S=d(59881);Object.defineProperty(r,"NearSnap",{enumerable:!0,get:function(){return E(S).default}});var a=d(10243);Object.defineProperty(r,"NearSnapProvider",{enumerable:!0,get:function(){return E(a).default}});var h=d(35737);Object.defineProperty(r,"TransactionInListError",{enumerable:!0,get:function(){return h.TransactionInListError}}),Object.defineProperty(r,"TransactionSignRejected",{enumerable:!0,get:function(){return h.TransactionSignRejected}});var g=d(67497);Object.defineProperty(r,"NearSnapAccount",{enumerable:!0,get:function(){return E(g).default}})},10243:function(ne,r){"use strict";var d=this&&this.__awaiter||function(_,E,S,a){return new(S||(S=Promise))(function(g,y){function v(O){try{A(a.next(O))}catch(C){y(C)}}function b(O){try{A(a.throw(O))}catch(C){y(C)}}function A(O){O.done?g(O.value):function h(g){return g instanceof S?g:new S(function(y){y(g)})}(O.value).then(v,b)}A((a=a.apply(_,E||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0});r.default=class l{isSnapsAvailable(E=11){return d(this,void 0,void 0,function*(){const S=window.ethereum,a=yield S?.request({method:"web3_clientVersion"}).catch(()=>null);if("string"!=typeof a)return!1;const h=a.replace("MetaMask/v","").split(".")[0];return Number(h)>=E})}getSnaps(){return d(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_getSnaps"})})}connectSnap(E,S={}){return d(this,void 0,void 0,function*(){yield window.ethereum.request({method:"wallet_requestSnaps",params:{[E]:S}})})}getSnap(E,S){return d(this,void 0,void 0,function*(){try{const a=yield this.getSnaps();return Object.values(a).find(h=>h.id===E&&(!S||h.version===S))}catch(a){return void console.log("Failed to obtain installed snap",a)}})}invokeSnap(E,S,a){return d(this,void 0,void 0,function*(){return yield window.ethereum.request({method:"wallet_invokeSnap",params:{snapId:E,request:{method:S,params:a}}})})}}},59881:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})},_=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0});const E=_(d(10243)),S=d(30684);r.default=class a{constructor(g){var y,v;this.provider=null!==(y=g?.provider)&&void 0!==y?y:new E.default,this.id=null!==(v=g?.id)&&void 0!==v?v:"npm:@near-snap/plugin"}get isLocal(){return this.id.startsWith("local:")}getStatus(){return l(this,void 0,void 0,function*(){return(yield this.provider.isSnapsAvailable())?(yield this.provider.getSnap(this.id))?S.NearSnapStatus.INSTALLED:S.NearSnapStatus.NOT_INSTALLED:S.NearSnapStatus.NOT_SUPPORTED})}install(){return l(this,void 0,void 0,function*(){yield this.provider.connectSnap(this.id)})}getAccount(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getAccount",{network:g})})}connect(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_connect",g)})}disconnect(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_disconnect",g)})}getPermissions(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_getPermissions",{network:g})})}needActivate(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_needActivate",{network:g})})}signMessage(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signMessage",g)})}signDelegatedTransactions(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signDelegate",g)})}signTransactions(g){return l(this,void 0,void 0,function*(){return yield this.provider.invokeSnap(this.id,"near_signTransactions",g)})}}},30684:(ne,r)=>{"use strict";var d,l;Object.defineProperty(r,"__esModule",{value:!0}),r.NearSnapStatus=void 0,(l=d||(r.NearSnapStatus=d={}))[l.NOT_SUPPORTED=0]="NOT_SUPPORTED",l[l.NOT_INSTALLED=1]="NOT_INSTALLED",l[l.INSTALLED=2]="INSTALLED"},67388:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.convertAction=r.TGAS=void 0,r.TGAS=Math.pow(10,12);const d=_=>{try{return JSON.parse(Buffer.from(_).toString("utf8"))}catch{return Array.from(_)}};r.convertAction=_=>{var E,S,a,h,g,y;if(_.addKey){const{accessKey:v,publicKey:b}=_.addKey;if(v.permission.fullAccess)return{type:"AddKey",params:{accessKey:{permission:"FullAccess"},publicKey:b.toString()}};if(v.permission.functionCall){const A=v.permission.functionCall;return{type:"AddKey",params:{publicKey:b.toString(),accessKey:{permission:{receiverId:A.receiverId,methodNames:A.methodNames,allowance:null===(E=A.allowance)||void 0===E?void 0:E.toString(10)}}}}}}if(_.createAccount)return{type:"CreateAccount"};if(_.deleteAccount)return{type:"DeleteAccount",params:{beneficiaryId:_.deleteAccount.beneficiaryId}};if(_.deleteKey)return{type:"DeleteKey",params:{publicKey:_.deleteKey.publicKey.toString()}};if(_.deployContract)return{type:"DeployContract",params:{code:_.deployContract.code}};if(_.functionCall)return{type:"FunctionCall",params:{args:d(_.functionCall.args),deposit:null!==(a=null===(S=_.functionCall.deposit)||void 0===S?void 0:S.toString())&&void 0!==a?a:"0",gas:null!==(g=null===(h=_.functionCall.gas)||void 0===h?void 0:h.toString())&&void 0!==g?g:String(300*r.TGAS),methodName:null!==(y=_.functionCall.methodName)&&void 0!==y?y:""}};if(_.transfer)return{type:"Transfer",params:{deposit:_.transfer.deposit.toString()}};if(_.stake)return{type:"Stake",params:{publicKey:_.stake.publicKey.toString(),stake:_.stake.stake.toString()}};throw Error(`Action ${_.enum} is not supported`)}},89764:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(v,b,A,O){void 0===O&&(O=A);var C=Object.getOwnPropertyDescriptor(b,A);(!C||("get"in C?!b.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return b[A]}}),Object.defineProperty(v,O,C)}:function(v,b,A,O){void 0===O&&(O=A),v[O]=b[A]}),_=this&&this.__setModuleDefault||(Object.create?function(v,b){Object.defineProperty(v,"default",{enumerable:!0,value:b})}:function(v,b){v.default=b}),E=this&&this.__importStar||function(v){if(v&&v.__esModule)return v;var b={};if(null!=v)for(var A in v)"default"!==A&&Object.prototype.hasOwnProperty.call(v,A)&&l(b,v,A);return _(b,v),b};Object.defineProperty(r,"__esModule",{value:!0}),r.createAction=void 0;const S=d(98538),a=E(d(45733)),h=d(8127);r.createAction=v=>{switch(v.type){case"CreateAccount":return a.createAccount();case"DeployContract":{const{code:b}=v.params;return a.deployContract(b)}case"FunctionCall":{const{methodName:b,args:A,gas:O,deposit:C}=v.params;return a.functionCall(b,A,new S.BN(O),new S.BN(C))}case"Transfer":{const{deposit:b}=v.params;return a.transfer(new S.BN(b))}case"Stake":{const{stake:b,publicKey:A}=v.params;return a.stake(new S.BN(b),h.PublicKey.from(A))}case"AddKey":{const{publicKey:b,accessKey:A}=v.params;return a.addKey(h.PublicKey.from(b),(v=>{if("FullAccess"===v)return a.fullAccessKey();const{receiverId:b,methodNames:A=[]}=v,O=v.allowance?new S.BN(v.allowance):void 0;return a.functionCallAccessKey(b,A,O)})(A.permission))}case"DeleteKey":{const{publicKey:b}=v.params;return a.deleteKey(h.PublicKey.from(b))}case"DeleteAccount":{const{beneficiaryId:b}=v.params;return a.deleteAccount(b)}default:throw new Error("Invalid action type")}}},65645:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(r,"__esModule",{value:!0}),r.verifySignature=r.authPayloadSchema=r.AuthPayload=void 0;const _=l(d(41348)),E=d(8127),S=d(7123);class a{constructor({message:y,nonce:v,recipient:b,callbackUrl:A}){this.tag=2147484061,this.message=y,this.nonce=v,this.recipient=b,A&&(this.callbackUrl=A)}}r.AuthPayload=a,r.authPayloadSchema=new Map([[a,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]),r.verifySignature=function h(g,y){const v=new a(g),b=(0,S.serialize)(r.authPayloadSchema,v),A=_.default.createHash("sha256"),O=Uint8Array.from(A.update(b).digest()),C=new Uint8Array(Buffer.from(y.signature,"base64"));return E.PublicKey.from(y.publicKey).verify(O,C)}},46260:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(a,h,g,y){return new(g||(g=Promise))(function(b,A){function O(N){try{T(y.next(N))}catch(M){A(M)}}function C(N){try{T(y.throw(N))}catch(M){A(M)}}function T(N){N.done?b(N.value):function v(b){return b instanceof g?b:new g(function(A){A(b)})}(N.value).then(O,C)}T((y=y.apply(a,h||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.waitTransactionResult=r.wait=void 0;const _=d(5754);r.wait=a=>new Promise(h=>setTimeout(h,a));r.waitTransactionResult=(a,h,g)=>l(void 0,void 0,void 0,function*(){let y;yield(0,r.wait)(2e3);try{y=yield g.txStatus(a,h)}catch{return yield(0,r.waitTransactionResult)(a,h,g)}const v=[],b=y.transaction_outcome.outcome,A=y.receipts_outcome.reduce((T,N)=>(T[N.id]=N.outcome,T),{}),O=T=>T.some(N=>{if(!A[N])return!1;const{status:M}=A[N];return"string"==typeof M?(M===_.ExecutionStatusBasic.Failure&&v.push(M),!1):M.Failure?(v.push(M.Failure),!1):"string"==typeof M.SuccessValue&&0===A[N].receipt_ids.length||O(A[N].receipt_ids)}),C=O(b.receipt_ids);if(v.length>0)throw Error(JSON.stringify(v,null,2));return C?y:yield(0,r.waitTransactionResult)(a,h,g)})},26933:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateBasic=r.wNAF=void 0;const l=d(61072),_=d(97488),E=BigInt(0),S=BigInt(1);r.wNAF=function a(g,y){const v=(A,O)=>{const C=O.negate();return A?C:O},b=A=>({windows:Math.ceil(y/A)+1,windowSize:2**(A-1)});return{constTimeNegate:v,unsafeLadder(A,O){let C=g.ZERO,T=A;for(;O>E;)O&S&&(C=C.add(T)),T=T.double(),O>>=S;return C},precomputeWindow(A,O){const{windows:C,windowSize:T}=b(O),N=[];let M=A,P=M;for(let R=0;R>=H,Y>N&&(Y-=L,C+=S);const Z=J,W=J+Math.abs(Y)-1,Q=V%2!=0,D=Y<0;0===Y?P=P.add(v(Q,O[Z])):M=M.add(v(D,O[W]))}return{p:M,f:P}},wNAFCached(A,O,C,T){const N=A._WINDOW_SIZE||1;let M=O.get(A);return M||(M=this.precomputeWindow(A,N),1!==N&&O.set(A,T(M))),this.wNAF(N,M,C)}}},r.validateBasic=function h(g){return(0,l.validateField)(g.Fp),(0,_.validateObject)(g,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,l.nLength)(g.n,g.nBitLength),...g,p:g.Fp.ORDER})}},88162:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.twistedEdwards=void 0;const l=d(61072),_=d(97488),E=d(97488),S=d(26933),a=BigInt(0),h=BigInt(1),g=BigInt(2),y=BigInt(8),v={zip215:!0};r.twistedEdwards=function A(O){const C=function b(O){const C=(0,S.validateBasic)(O);return _.validateObject(O,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...C})}(O),{Fp:T,n:N,prehash:M,hash:P,randomBytes:R,nByteLength:L,h:H}=C,V=g<{try{return{isValid:!0,value:T.sqrt(he*T.inv(le))}}catch{return{isValid:!1,value:a}}}),Z=C.adjustScalarBytes||(he=>he),W=C.domain||((he,le,de)=>{if(le.length||de)throw new Error("Contexts/pre-hash are not supported");return he}),Q=he=>"bigint"==typeof he&&aQ(he)&&Q(le)&&hehe===a||D(he,V);function u(he,le){if(D(he,le))return he;throw new Error(`Expected valid scalar < ${le}, got ${typeof he} ${he}`)}function m(he){return he===a?he:u(he,N)}const w=new Map;function x(he){if(!(he instanceof F))throw new Error("ExtendedPoint expected")}class F{constructor(le,de,ae,ye){if(this.ex=le,this.ey=de,this.ez=ae,this.et=ye,!o(le))throw new Error("x required");if(!o(de))throw new Error("y required");if(!o(ae))throw new Error("z required");if(!o(ye))throw new Error("t required")}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(le){if(le instanceof F)throw new Error("extended point not allowed");const{x:de,y:ae}=le||{};if(!o(de)||!o(ae))throw new Error("invalid affine point");return new F(de,ae,h,J(de*ae))}static normalizeZ(le){const de=T.invertBatch(le.map(ae=>ae.ez));return le.map((ae,ye)=>ae.toAffine(de[ye])).map(F.fromAffine)}_setWindowSize(le){this._WINDOW_SIZE=le,w.delete(this)}assertValidity(){const{a:le,d:de}=C;if(this.is0())throw new Error("bad point: ZERO");const{ex:ae,ey:ye,ez:Ce,et:Pe}=this,Ge=J(ae*ae),Ve=J(ye*ye),Ue=J(Ce*Ce),_t=J(Ue*Ue),Ze=J(Ge*le);if(J(Ue*J(Ze+Ve))!==J(_t+J(de*J(Ge*Ve))))throw new Error("bad point: equation left != right (1)");if(J(ae*ye)!==J(Ce*Pe))throw new Error("bad point: equation left != right (2)")}equals(le){x(le);const{ex:de,ey:ae,ez:ye}=this,{ex:Ce,ey:Pe,ez:Ge}=le,Ve=J(de*Ge),Ue=J(Ce*ye),_t=J(ae*Ge),Ze=J(Pe*ye);return Ve===Ue&&_t===Ze}is0(){return this.equals(F.ZERO)}negate(){return new F(J(-this.ex),this.ey,this.ez,J(-this.et))}double(){const{a:le}=C,{ex:de,ey:ae,ez:ye}=this,Ce=J(de*de),Pe=J(ae*ae),Ge=J(g*J(ye*ye)),Ve=J(le*Ce),Ue=de+ae,_t=J(J(Ue*Ue)-Ce-Pe),Ze=Ve+Pe,$e=Ze-Ge,Pt=Ve-Pe,nt=J(_t*$e),rt=J(Ze*Pt),Lt=J(_t*Pt),Re=J($e*Ze);return new F(nt,rt,Re,Lt)}add(le){x(le);const{a:de,d:ae}=C,{ex:ye,ey:Ce,ez:Pe,et:Ge}=this,{ex:Ve,ey:Ue,ez:_t,et:Ze}=le;if(de===BigInt(-1)){const at=J((Ce-ye)*(Ue+Ve)),fn=J((Ce+ye)*(Ue-Ve)),ct=J(fn-at);if(ct===a)return this.double();const dt=J(Pe*g*Ze),yn=J(Ge*g*_t),ht=yn+dt,It=fn+at,or=yn-dt,Dt=J(ht*ct),Mt=J(It*or),In=J(ht*or),yt=J(ct*It);return new F(Dt,Mt,yt,In)}const $e=J(ye*Ve),Pt=J(Ce*Ue),nt=J(Ge*ae*Ze),rt=J(Pe*_t),Lt=J((ye+Ce)*(Ve+Ue)-$e-Pt),Re=rt-nt,Ae=rt+nt,xe=J(Pt-de*$e),je=J(Lt*Re),He=J(Ae*xe),lt=J(Lt*xe),Je=J(Re*Ae);return new F(je,He,Je,lt)}subtract(le){return this.add(le.negate())}wNAF(le){return p.wNAFCached(this,w,le,F.normalizeZ)}multiply(le){const{p:de,f:ae}=this.wNAF(u(le,N));return F.normalizeZ([de,ae])[0]}multiplyUnsafe(le){let de=m(le);return de===a?k:this.equals(k)||de===h?this:this.equals(G)?this.wNAF(de).p:p.unsafeLadder(this,de)}isSmallOrder(){return this.multiplyUnsafe(H).is0()}isTorsionFree(){return p.unsafeLadder(this,N).is0()}toAffine(le){const{ex:de,ey:ae,ez:ye}=this,Ce=this.is0();null==le&&(le=Ce?y:T.inv(ye));const Pe=J(de*le),Ge=J(ae*le),Ve=J(ye*le);if(Ce)return{x:a,y:h};if(Ve!==h)throw new Error("invZ was invalid");return{x:Pe,y:Ge}}clearCofactor(){const{h:le}=C;return le===h?this:this.multiplyUnsafe(le)}static fromHex(le,de=!1){const{d:ae,a:ye}=C,Ce=T.BYTES,Pe=(le=(0,E.ensureBytes)("pointHex",le,Ce)).slice(),Ge=le[Ce-1];Pe[Ce-1]=-129&Ge;const Ve=_.bytesToNumberLE(Pe);Ve===a||u(Ve,de?V:T.ORDER);const Ue=J(Ve*Ve),_t=J(Ue-h),Ze=J(ae*Ue-ye);let{isValid:$e,value:Pt}=Y(_t,Ze);if(!$e)throw new Error("Point.fromHex: invalid y coordinate");const nt=(Pt&h)===h,rt=0!=(128&Ge);if(!de&&Pt===a&&rt)throw new Error("Point.fromHex: x=0 and x_0=1");return rt!==nt&&(Pt=J(-Pt)),F.fromAffine({x:Pt,y:Ve})}static fromPrivateKey(le){return te(le).point}toRawBytes(){const{x:le,y:de}=this.toAffine(),ae=_.numberToBytesLE(de,T.BYTES);return ae[ae.length-1]|=le&h?128:0,ae}toHex(){return _.bytesToHex(this.toRawBytes())}}F.BASE=new F(C.Gx,C.Gy,h,J(C.Gx*C.Gy)),F.ZERO=new F(a,h,h,a);const{BASE:G,ZERO:k}=F,p=(0,S.wNAF)(F,8*L);function B(he){return(0,l.mod)(he,N)}function ie(he){return B(_.bytesToNumberLE(he))}function te(he){const le=L;he=(0,E.ensureBytes)("private key",he,le);const de=(0,E.ensureBytes)("hashed private key",P(he),2*le),ae=Z(de.slice(0,le)),ye=de.slice(le,2*le),Ce=ie(ae),Pe=G.multiply(Ce),Ge=Pe.toRawBytes();return{head:ae,prefix:ye,scalar:Ce,point:Pe,pointBytes:Ge}}function ue(he=new Uint8Array,...le){const de=_.concatBytes(...le);return ie(P(W(de,(0,E.ensureBytes)("context",he),!!M)))}const me=v;return G._setWindowSize(8),{CURVE:C,getPublicKey:function ee(he){return te(he).pointBytes},sign:function we(he,le,de={}){he=(0,E.ensureBytes)("message",he),M&&(he=M(he));const{prefix:ae,scalar:ye,pointBytes:Ce}=te(le),Pe=ue(de.context,ae,he),Ge=G.multiply(Pe).toRawBytes(),Ue=B(Pe+ue(de.context,Ge,Ce,he)*ye);m(Ue);const _t=_.concatBytes(Ge,_.numberToBytesLE(Ue,T.BYTES));return(0,E.ensureBytes)("result",_t,2*L)},verify:function ve(he,le,de,ae=me){const{context:ye,zip215:Ce}=ae,Pe=T.BYTES;he=(0,E.ensureBytes)("signature",he,2*Pe),le=(0,E.ensureBytes)("message",le),M&&(le=M(le));const Ge=_.bytesToNumberLE(he.slice(Pe,2*Pe));let Ve,Ue,_t;try{Ve=F.fromHex(de,Ce),Ue=F.fromHex(he.slice(0,Pe),Ce),_t=G.multiplyUnsafe(Ge)}catch{return!1}if(!Ce&&Ve.isSmallOrder())return!1;const Ze=ue(ye,Ue.toRawBytes(),Ve.toRawBytes(),le);return Ue.add(Ve.multiplyUnsafe(Ze)).subtract(_t).clearCofactor().equals(F.ZERO)},ExtendedPoint:F,utils:{getExtendedPublicKey:te,randomPrivateKey:()=>R(T.BYTES),precompute:(he=8,le=F.BASE)=>(le._setWindowSize(he),le.multiply(BigInt(3)),le)}}}},31518:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createHasher=r.isogenyMap=r.hash_to_field=r.expand_message_xof=r.expand_message_xmd=void 0;const l=d(61072),_=d(97488);const S=_.bytesToNumberBE;function a(T,N){if(T<0||T>=1<<8*N)throw new Error(`bad I2OSP call: value=${T} length=${N}`);const M=Array.from({length:N}).fill(0);for(let P=N-1;P>=0;P--)M[P]=255&T,T>>>=8;return new Uint8Array(M)}function h(T,N){const M=new Uint8Array(T.length);for(let P=0;P255&&(N=P((0,_.concatBytes)((0,_.utf8ToBytes)("H2C-OVERSIZE-DST-"),N)));const{outputLen:R,blockLen:L}=P,H=Math.ceil(M/R);if(H>255)throw new Error("Invalid xmd length");const V=(0,_.concatBytes)(N,a(N.length,1)),J=a(0,L),Y=a(M,2),Z=new Array(H),W=P((0,_.concatBytes)(J,T,Y,a(0,1),V));Z[0]=P((0,_.concatBytes)(W,a(1,1),V));for(let D=1;D<=H;D++){const o=[h(W,Z[D-1]),a(D+1,1),V];Z[D]=P((0,_.concatBytes)(...o))}return(0,_.concatBytes)(...Z).slice(0,M)}function b(T,N,M,P,R){if(g(T),g(N),y(M),N.length>255){const L=Math.ceil(2*P/8);N=R.create({dkLen:L}).update((0,_.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(N).digest()}if(M>65535||N.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return R.create({dkLen:M}).update(T).update(a(M,2)).update(N).update(a(N.length,1)).digest()}function A(T,N,M){(0,_.validateObject)(M,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:P,k:R,m:L,hash:H,expand:V,DST:J}=M;g(T),y(N);const Y=function E(T){if(T instanceof Uint8Array)return T;if("string"==typeof T)return(0,_.utf8ToBytes)(T);throw new Error("DST must be Uint8Array or string")}(J),Z=P.toString(2).length,W=Math.ceil((Z+R)/8),Q=N*L*W;let D;if("xmd"===V)D=v(T,Y,Q,H);else if("xof"===V)D=b(T,Y,Q,R,H);else{if("_internal_pass"!==V)throw new Error('expand must be "xmd" or "xof"');D=T}const o=new Array(N);for(let u=0;uArray.from(P).reverse());return(P,R)=>{const[L,H,V,J]=M.map(Y=>Y.reduce((Z,W)=>T.add(T.mul(Z,P),W)));return P=T.div(L,H),R=T.mul(R,T.div(V,J)),{x:P,y:R}}},r.createHasher=function C(T,N,M){if("function"!=typeof N)throw new Error("mapToCurve() must be defined");return{hashToCurve(P,R){const L=A(P,2,{...M,DST:M.DST,...R}),H=T.fromAffine(N(L[0])),V=T.fromAffine(N(L[1])),J=H.add(V).clearCofactor();return J.assertValidity(),J},encodeToCurve(P,R){const L=A(P,1,{...M,DST:M.encodeDST,...R}),H=T.fromAffine(N(L[0])).clearCofactor();return H.assertValidity(),H}}}},61072:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.mapHashToField=r.getMinHashLength=r.getFieldBytesLength=r.hashToPrivateScalar=r.FpSqrtEven=r.FpSqrtOdd=r.Field=r.nLength=r.FpIsSquare=r.FpDiv=r.FpInvertBatch=r.FpPow=r.validateField=r.isNegativeLE=r.FpSqrt=r.tonelliShanks=r.invert=r.pow2=r.pow=r.mod=void 0;const l=d(97488),_=BigInt(0),E=BigInt(1),S=BigInt(2),a=BigInt(3),h=BigInt(4),g=BigInt(5),y=BigInt(8);BigInt(9),BigInt(16);function A(x,F){const G=x%F;return G>=_?G:F+G}function O(x,F,G){if(G<=_||F<_)throw new Error("Expected power/modulo > 0");if(G===E)return _;let k=E;for(;F>_;)F&E&&(k=k*x%G),x=x*x%G,F>>=E;return k}function T(x,F){if(x===_||F<=_)throw new Error(`invert: expected positive integers, got n=${x} mod=${F}`);let G=A(x,F),k=F,p=_,B=E,ie=E,te=_;for(;G!==_;){const ue=k/G,we=k%G,me=p-ie*ue,ve=B-te*ue;k=G,G=we,p=ie,B=te,ie=me,te=ve}if(k!==E)throw new Error("invert: does not exist");return A(p,F)}function N(x){const F=(x-E)/S;let G,k,p;for(G=x-E,k=0;G%S===_;G/=S,k++);for(p=S;p_;)k*=k,k%=G;return k},r.invert=T,r.tonelliShanks=N,r.FpSqrt=M;r.isNegativeLE=(x,F)=>(A(x,F)&E)===E;const R=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function H(x,F,G){if(G<_)throw new Error("Expected power > 0");if(G===_)return x.ONE;if(G===E)return F;let k=x.ONE,p=F;for(;G>_;)G&E&&(k=x.mul(k,p)),p=x.sqr(p),G>>=E;return k}function V(x,F){const G=new Array(F.length),k=F.reduce((B,ie,te)=>x.is0(ie)?B:(G[te]=B,x.mul(B,ie)),x.ONE),p=x.inv(k);return F.reduceRight((B,ie,te)=>x.is0(ie)?B:(G[te]=x.mul(B,G[te]),x.mul(B,ie)),p),G}function Z(x,F){const G=void 0!==F?F:x.toString(2).length;return{nBitLength:G,nByteLength:Math.ceil(G/8)}}function u(x){if("bigint"!=typeof x)throw new Error("field order must be bigint");const F=x.toString(2).length;return Math.ceil(F/8)}function m(x){const F=u(x);return F+Math.ceil(F/2)}r.validateField=function L(x){const G=R.reduce((k,p)=>(k[p]="function",k),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,l.validateObject)(x,G)},r.FpPow=H,r.FpInvertBatch=V,r.FpDiv=function J(x,F,G){return x.mul(F,"bigint"==typeof G?T(G,x.ORDER):x.inv(G))},r.FpIsSquare=function Y(x){const F=(x.ORDER-E)/S;return G=>{const k=x.pow(G,F);return x.eql(k,x.ZERO)||x.eql(k,x.ONE)}},r.nLength=Z,r.Field=function W(x,F,G=!1,k={}){if(x<=_)throw new Error(`Expected Field ORDER > 0, got ${x}`);const{nBitLength:p,nByteLength:B}=Z(x,F);if(B>2048)throw new Error("Field lengths over 2048 bytes are not supported");const ie=M(x),te=Object.freeze({ORDER:x,BITS:p,BYTES:B,MASK:(0,l.bitMask)(p),ZERO:_,ONE:E,create:ee=>A(ee,x),isValid:ee=>{if("bigint"!=typeof ee)throw new Error("Invalid field element: expected bigint, got "+typeof ee);return _<=ee&&eeee===_,isOdd:ee=>(ee&E)===E,neg:ee=>A(-ee,x),eql:(ee,ue)=>ee===ue,sqr:ee=>A(ee*ee,x),add:(ee,ue)=>A(ee+ue,x),sub:(ee,ue)=>A(ee-ue,x),mul:(ee,ue)=>A(ee*ue,x),pow:(ee,ue)=>H(te,ee,ue),div:(ee,ue)=>A(ee*T(ue,x),x),sqrN:ee=>ee*ee,addN:(ee,ue)=>ee+ue,subN:(ee,ue)=>ee-ue,mulN:(ee,ue)=>ee*ue,inv:ee=>T(ee,x),sqrt:k.sqrt||(ee=>ie(te,ee)),invertBatch:ee=>V(te,ee),cmov:(ee,ue,we)=>we?ue:ee,toBytes:ee=>G?(0,l.numberToBytesLE)(ee,B):(0,l.numberToBytesBE)(ee,B),fromBytes:ee=>{if(ee.length!==B)throw new Error(`Fp.fromBytes: expected ${B}, got ${ee.length}`);return G?(0,l.bytesToNumberLE)(ee):(0,l.bytesToNumberBE)(ee)}});return Object.freeze(te)},r.FpSqrtOdd=function Q(x,F){if(!x.isOdd)throw new Error("Field doesn't have isOdd");const G=x.sqrt(F);return x.isOdd(G)?G:x.neg(G)},r.FpSqrtEven=function D(x,F){if(!x.isOdd)throw new Error("Field doesn't have isOdd");const G=x.sqrt(F);return x.isOdd(G)?x.neg(G):G},r.hashToPrivateScalar=function o(x,F,G=!1){const k=(x=(0,l.ensureBytes)("privateHash",x)).length,p=Z(F).nByteLength+8;if(p<24||k1024)throw new Error(`hashToPrivateScalar: expected ${p}-1024 bytes of input, got ${k}`);return A(G?(0,l.bytesToNumberLE)(x):(0,l.bytesToNumberBE)(x),F-E)+E},r.getFieldBytesLength=u,r.getMinHashLength=m,r.mapHashToField=function w(x,F,G=!1){const k=x.length,p=u(F),B=m(F);if(k<16||k1024)throw new Error(`expected ${B}-1024 bytes of input, got ${k}`);const te=A(G?(0,l.bytesToNumberBE)(x):(0,l.bytesToNumberLE)(x),F-E)+E;return G?(0,l.numberToBytesLE)(te,p):(0,l.numberToBytesBE)(te,p)}},57042:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.montgomery=void 0;const l=d(61072),_=d(97488),E=BigInt(0),S=BigInt(1);r.montgomery=function h(g){const y=function a(g){return(0,_.validateObject)(g,{a:"bigint"},{montgomeryBits:"isSafeInteger",nByteLength:"isSafeInteger",adjustScalarBytes:"function",domain:"function",powPminus2:"function",Gu:"bigint"}),Object.freeze({...g})}(g),{P:v}=y,b=Q=>(0,l.mod)(Q,v),A=y.montgomeryBits,O=Math.ceil(A/8),C=y.nByteLength,T=y.adjustScalarBytes||(Q=>Q),N=y.powPminus2||(Q=>(0,l.pow)(Q,v-BigInt(2),v));function M(Q,D,o){const u=b(Q*(D-o));return[D=b(D-u),o=b(o+u)]}function P(Q){if("bigint"==typeof Q&&E<=Q&&Q=E;ie--){const te=u>>ie&S;k^=te,p=M(k,w,F),w=p[0],F=p[1],p=M(k,x,G),x=p[0],G=p[1],k=te;const ee=w+x,ue=b(ee*ee),we=w-x,me=b(we*we),ve=ue-me,ce=F+G,le=b((F-G)*ee),de=b(ce*we),ae=le+de,ye=le-de;F=b(ae*ae),G=b(m*b(ye*ye)),w=b(ue*me),x=b(ve*(ue+b(R*ve)))}p=M(k,w,F),w=p[0],F=p[1],p=M(k,x,G),x=p[0],G=p[1];const B=N(x);return b(w*B)}(o,u);if(m===E)throw new Error("Invalid private or public key received");return H(m)}const Z=H(y.Gu);function W(Q){return Y(Q,Z)}return{scalarMult:Y,scalarMultBase:W,getSharedSecret:(Q,D)=>Y(Q,D),getPublicKey:Q=>W(Q),utils:{randomPrivateKey:()=>y.randomBytes(y.nByteLength)},GuBytes:Z}}},97488:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateObject=r.createHmacDrbg=r.bitMask=r.bitSet=r.bitGet=r.bitLen=r.utf8ToBytes=r.equalBytes=r.concatBytes=r.ensureBytes=r.numberToVarBytesBE=r.numberToBytesLE=r.numberToBytesBE=r.bytesToNumberLE=r.bytesToNumberBE=r.hexToBytes=r.hexToNumber=r.numberToHexUnpadded=r.bytesToHex=void 0;const d=BigInt(0),l=BigInt(1),_=BigInt(2),E=D=>D instanceof Uint8Array,S=Array.from({length:256},(D,o)=>o.toString(16).padStart(2,"0"));function a(D){if(!E(D))throw new Error("Uint8Array expected");let o="";for(let u=0;um+w.length,0));let u=0;return D.forEach(m=>{if(!E(m))throw new Error("Uint8Array expected");o.set(m,u),u+=m.length}),o}r.bytesToHex=a,r.numberToHexUnpadded=h,r.hexToNumber=g,r.hexToBytes=y,r.bytesToNumberBE=function v(D){return g(a(D))},r.bytesToNumberLE=function b(D){if(!E(D))throw new Error("Uint8Array expected");return g(a(Uint8Array.from(D).reverse()))},r.numberToBytesBE=A,r.numberToBytesLE=function O(D,o){return A(D,o).reverse()},r.numberToVarBytesBE=function C(D){return y(h(D))},r.ensureBytes=function T(D,o,u){let m;if("string"==typeof o)try{m=y(o)}catch(x){throw new Error(`${D} must be valid hex string, got "${o}". Cause: ${x}`)}else{if(!E(o))throw new Error(`${D} must be hex string or Uint8Array`);m=Uint8Array.from(o)}const w=m.length;if("number"==typeof u&&w!==u)throw new Error(`${D} expected ${u} bytes, got ${w}`);return m},r.concatBytes=N,r.equalBytes=function M(D,o){if(D.length!==o.length)return!1;for(let u=0;ud;D>>=l,o+=1);return o},r.bitGet=function L(D,o){return D>>BigInt(o)&l};r.bitSet=(D,o,u)=>D|(u?l:d)<(_<new Uint8Array(D),Y=D=>Uint8Array.from(D);r.createHmacDrbg=function Z(D,o,u){if("number"!=typeof D||D<2)throw new Error("hashLen must be a number");if("number"!=typeof o||o<2)throw new Error("qByteLen must be a number");if("function"!=typeof u)throw new Error("hmacFn must be a function");let m=J(D),w=J(D),x=0;const F=()=>{m.fill(1),w.fill(0),x=0},G=(...ie)=>u(w,m,...ie),k=(ie=J())=>{w=G(Y([0]),ie),m=G(),0!==ie.length&&(w=G(Y([1]),ie),m=G())},p=()=>{if(x++>=1e3)throw new Error("drbg: tried 1000 values");let ie=0;const te=[];for(;ie{let ee;for(F(),k(ie);!(ee=te(p()));)k();return F(),ee}};const W={bigint:D=>"bigint"==typeof D,function:D=>"function"==typeof D,boolean:D=>"boolean"==typeof D,string:D=>"string"==typeof D,stringOrUint8Array:D=>"string"==typeof D||D instanceof Uint8Array,isSafeInteger:D=>Number.isSafeInteger(D),array:D=>Array.isArray(D),field:(D,o)=>o.Fp.isValid(D),hash:D=>"function"==typeof D&&Number.isSafeInteger(D.outputLen)};r.validateObject=function Q(D,o,u={}){const m=(w,x,F)=>{const G=W[x];if("function"!=typeof G)throw new Error(`Invalid validator "${x}", expected function`);const k=D[w];if(!(F&&void 0===k||G(k,D)))throw new Error(`Invalid param ${String(w)}=${k} (${typeof k}), expected ${x}`)};for(const[w,x]of Object.entries(o))m(w,x,!1);for(const[w,x]of Object.entries(u))m(w,x,!0);return D}},35434:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hash_to_ristretto255=r.hashToRistretto255=r.RistrettoPoint=r.encodeToCurve=r.hashToCurve=r.edwardsToMontgomeryPriv=r.edwardsToMontgomery=r.edwardsToMontgomeryPub=r.x25519=r.ed25519ph=r.ed25519ctx=r.ed25519=r.ED25519_TORSION_SUBGROUP=void 0;const l=d(27510),_=d(62503),E=d(88162),S=d(57042),a=d(61072),h=d(97488),g=d(31518),y=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),v=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),b=BigInt(0),A=BigInt(1),O=BigInt(2),C=BigInt(5),T=BigInt(10),N=BigInt(20),M=BigInt(40),P=BigInt(80);function R(le){const de=y,ye=le*le%de*le%de,Ce=(0,a.pow2)(ye,O,de)*ye%de,Pe=(0,a.pow2)(Ce,A,de)*le%de,Ge=(0,a.pow2)(Pe,C,de)*Pe%de,Ve=(0,a.pow2)(Ge,T,de)*Ge%de,Ue=(0,a.pow2)(Ve,N,de)*Ve%de,_t=(0,a.pow2)(Ue,M,de)*Ue%de,Ze=(0,a.pow2)(_t,P,de)*_t%de,$e=(0,a.pow2)(Ze,P,de)*_t%de,Pt=(0,a.pow2)($e,T,de)*Ge%de;return{pow_p_5_8:(0,a.pow2)(Pt,O,de)*le%de,b2:ye}}function L(le){return le[0]&=248,le[31]&=127,le[31]|=64,le}function H(le,de){const ae=y,ye=(0,a.mod)(de*de*de,ae),Pe=R(le*(0,a.mod)(ye*ye*de,ae)).pow_p_5_8;let Ge=(0,a.mod)(le*ye*Pe,ae);const Ve=(0,a.mod)(de*Ge*Ge,ae),Ue=Ge,_t=(0,a.mod)(Ge*v,ae),Ze=Ve===le,$e=Ve===(0,a.mod)(-le,ae),Pt=Ve===(0,a.mod)(-le*v,ae);return Ze&&(Ge=Ue),($e||Pt)&&(Ge=_t),(0,a.isNegativeLE)(Ge,ae)&&(Ge=(0,a.mod)(-Ge,ae)),{isValid:Ze||$e,value:Ge}}r.ED25519_TORSION_SUBGROUP=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];const V=(0,a.Field)(y,void 0,!0),J={a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:V,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:l.sha512,randomBytes:_.randomBytes,adjustScalarBytes:L,uvRatio:H};function Y(le,de,ae){if(de.length>255)throw new Error("Context is too big");return(0,_.concatBytes)((0,_.utf8ToBytes)("SigEd25519 no Ed25519 collisions"),new Uint8Array([ae?1:0,de.length]),de,le)}function Z(le){const{y:de}=r.ed25519.ExtendedPoint.fromHex(le),ae=BigInt(1);return V.toBytes(V.create((ae+de)*V.inv(ae-de)))}r.ed25519=(0,E.twistedEdwards)(J),r.ed25519ctx=(0,E.twistedEdwards)({...J,domain:Y}),r.ed25519ph=(0,E.twistedEdwards)({...J,domain:Y,prehash:l.sha512}),r.x25519=(0,S.montgomery)({P:y,a:BigInt(486662),montgomeryBits:255,nByteLength:32,Gu:BigInt(9),powPminus2:le=>{const de=y,{pow_p_5_8:ae,b2:ye}=R(le);return(0,a.mod)((0,a.pow2)(ae,BigInt(3),de)*ye,de)},adjustScalarBytes:L,randomBytes:_.randomBytes}),r.edwardsToMontgomeryPub=Z,r.edwardsToMontgomery=Z,r.edwardsToMontgomeryPriv=function W(le){const de=J.hash(le.subarray(0,32));return J.adjustScalarBytes(de).subarray(0,32)};const Q=(V.ORDER+BigInt(3))/BigInt(8),D=V.pow(O,Q),o=V.sqrt(V.neg(V.ONE)),u=(V.ORDER-BigInt(5))/BigInt(8),m=BigInt(486662);const x=(0,a.FpSqrtEven)(V,V.neg(BigInt(486664)));function F(le){const{xMn:de,xMd:ae,yMn:ye,yMd:Ce}=function w(le){let de=V.sqr(le);de=V.mul(de,O);let ae=V.add(de,V.ONE),ye=V.neg(m),Ce=V.sqr(ae),Pe=V.mul(Ce,ae),Ge=V.mul(de,m);Ge=V.mul(Ge,ye),Ge=V.add(Ge,Ce),Ge=V.mul(Ge,ye);let Ve=V.sqr(Pe);Ce=V.sqr(Ve),Ve=V.mul(Ve,Pe),Ve=V.mul(Ve,Ge),Ce=V.mul(Ce,Ve);let Ue=V.pow(Ce,u);Ue=V.mul(Ue,Ve);let _t=V.mul(Ue,o);Ce=V.sqr(Ue),Ce=V.mul(Ce,Pe);let Ze=V.eql(Ce,Ge),$e=V.cmov(_t,Ue,Ze),Pt=V.mul(ye,de),nt=V.mul(Ue,le);nt=V.mul(nt,D);let rt=V.mul(nt,o),Lt=V.mul(Ge,de);Ce=V.sqr(nt),Ce=V.mul(Ce,Pe);let Re=V.eql(Ce,Lt),Ae=V.cmov(rt,nt,Re);Ce=V.sqr($e),Ce=V.mul(Ce,Pe);let xe=V.eql(Ce,Ge),je=V.cmov(Pt,ye,xe),He=V.cmov(Ae,$e,xe),lt=V.isOdd(He);return He=V.cmov(He,V.neg(He),xe!==lt),{xMn:je,xMd:ae,yMn:He,yMd:A}}(le);let Pe=V.mul(de,Ce);Pe=V.mul(Pe,x);let Ge=V.mul(ae,ye),Ve=V.sub(de,ae),Ue=V.add(de,ae),_t=V.mul(Ge,Ue),Ze=V.eql(_t,V.ZERO);Pe=V.cmov(Pe,V.ZERO,Ze),Ge=V.cmov(Ge,V.ONE,Ze),Ve=V.cmov(Ve,V.ONE,Ze),Ue=V.cmov(Ue,V.ONE,Ze);const $e=V.invertBatch([Ge,Ue]);return{x:V.mul(Pe,$e[0]),y:V.mul(Ve,$e[1])}}const G=(()=>(0,g.createHasher)(r.ed25519.ExtendedPoint,le=>F(le[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:V.ORDER,m:1,k:128,expand:"xmd",hash:l.sha512}))();function k(le){if(!(le instanceof ce))throw new Error("RistrettoPoint expected")}r.hashToCurve=G.hashToCurve,r.encodeToCurve=G.encodeToCurve;const p=v,B=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),ie=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),te=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),ee=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),ue=le=>H(A,le),we=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),me=le=>r.ed25519.CURVE.Fp.create((0,h.bytesToNumberLE)(le)&we);function ve(le){const{d:de}=r.ed25519.CURVE,ae=r.ed25519.CURVE.Fp.ORDER,ye=r.ed25519.CURVE.Fp.create,Ce=ye(p*le*le),Pe=ye((Ce+A)*te);let Ge=BigInt(-1);const Ve=ye((Ge-de*Ce)*ye(Ce+de));let{isValid:Ue,value:_t}=H(Pe,Ve),Ze=ye(_t*le);(0,a.isNegativeLE)(Ze,ae)||(Ze=ye(-Ze)),Ue||(_t=Ze),Ue||(Ge=Ce);const $e=ye(Ge*(Ce-A)*ee-Ve),Pt=_t*_t,nt=ye((_t+_t)*Ve),rt=ye($e*B),Lt=ye(A-Pt),Re=ye(A+Pt);return new r.ed25519.ExtendedPoint(ye(nt*Re),ye(Lt*rt),ye(rt*Re),ye(nt*Lt))}class ce{constructor(de){this.ep=de}static fromAffine(de){return new ce(r.ed25519.ExtendedPoint.fromAffine(de))}static hashToCurve(de){de=(0,h.ensureBytes)("ristrettoHash",de,64);const ye=ve(me(de.slice(0,32))),Pe=ve(me(de.slice(32,64)));return new ce(ye.add(Pe))}static fromHex(de){de=(0,h.ensureBytes)("ristrettoHex",de,32);const{a:ae,d:ye}=r.ed25519.CURVE,Ce=r.ed25519.CURVE.Fp.ORDER,Pe=r.ed25519.CURVE.Fp.create,Ge="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",Ve=me(de);if(!(0,h.equalBytes)((0,h.numberToBytesLE)(Ve,32),de)||(0,a.isNegativeLE)(Ve,Ce))throw new Error(Ge);const Ue=Pe(Ve*Ve),_t=Pe(A+ae*Ue),Ze=Pe(A-ae*Ue),$e=Pe(_t*_t),Pt=Pe(Ze*Ze),nt=Pe(ae*ye*$e-Pt),{isValid:rt,value:Lt}=ue(Pe(nt*Pt)),Re=Pe(Lt*Ze),Ae=Pe(Lt*Re*nt);let xe=Pe((Ve+Ve)*Re);(0,a.isNegativeLE)(xe,Ce)&&(xe=Pe(-xe));const je=Pe(_t*Ae),He=Pe(xe*je);if(!rt||(0,a.isNegativeLE)(He,Ce)||je===b)throw new Error(Ge);return new ce(new r.ed25519.ExtendedPoint(xe,je,A,He))}toRawBytes(){let{ex:de,ey:ae,ez:ye,et:Ce}=this.ep;const Pe=r.ed25519.CURVE.Fp.ORDER,Ge=r.ed25519.CURVE.Fp.create,Ve=Ge(Ge(ye+ae)*Ge(ye-ae)),Ue=Ge(de*ae),_t=Ge(Ue*Ue),{value:Ze}=ue(Ge(Ve*_t)),$e=Ge(Ze*Ve),Pt=Ge(Ze*Ue),nt=Ge($e*Pt*Ce);let rt;if((0,a.isNegativeLE)(Ce*nt,Pe)){let Re=Ge(ae*p),Ae=Ge(de*p);de=Re,ae=Ae,rt=Ge($e*ie)}else rt=Pt;(0,a.isNegativeLE)(de*nt,Pe)&&(ae=Ge(-ae));let Lt=Ge((ye-ae)*rt);return(0,a.isNegativeLE)(Lt,Pe)&&(Lt=Ge(-Lt)),(0,h.numberToBytesLE)(Lt,32)}toHex(){return(0,h.bytesToHex)(this.toRawBytes())}toString(){return this.toHex()}equals(de){k(de);const{ex:ae,ey:ye}=this.ep,{ex:Ce,ey:Pe}=de.ep,Ge=r.ed25519.CURVE.Fp.create,Ve=Ge(ae*Pe)===Ge(ye*Ce),Ue=Ge(ye*Pe)===Ge(ae*Ce);return Ve||Ue}add(de){return k(de),new ce(this.ep.add(de.ep))}subtract(de){return k(de),new ce(this.ep.subtract(de.ep))}multiply(de){return new ce(this.ep.multiply(de))}multiplyUnsafe(de){return new ce(this.ep.multiplyUnsafe(de))}}r.RistrettoPoint=(ce.BASE||(ce.BASE=new ce(r.ed25519.ExtendedPoint.BASE)),ce.ZERO||(ce.ZERO=new ce(r.ed25519.ExtendedPoint.ZERO)),ce);r.hashToRistretto255=(le,de)=>{const ae=de.DST,ye="string"==typeof ae?(0,_.utf8ToBytes)(ae):ae,Ce=(0,g.expand_message_xmd)(le,ye,64,l.sha512);return ce.hashToCurve(Ce)},r.hash_to_ristretto255=r.hashToRistretto255},53219:(ne,r)=>{"use strict";function d(g){if(!Number.isSafeInteger(g)||g<0)throw new Error(`Wrong positive integer: ${g}`)}function l(g){if("boolean"!=typeof g)throw new Error(`Expected boolean, not ${g}`)}function _(g,...y){if(!(g instanceof Uint8Array))throw new Error("Expected Uint8Array");if(y.length>0&&!y.includes(g.length))throw new Error(`Expected Uint8Array of length ${y}, not of length=${g.length}`)}function E(g){if("function"!=typeof g||"function"!=typeof g.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");d(g.outputLen),d(g.blockLen)}function S(g,y=!0){if(g.destroyed)throw new Error("Hash instance has been destroyed");if(y&&g.finished)throw new Error("Hash#digest() has already been called")}function a(g,y){_(g);const v=y.outputLen;if(g.length{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SHA2=void 0;const l=d(53219),_=d(62503);class S extends _.Hash{constructor(h,g,y,v){super(),this.blockLen=h,this.outputLen=g,this.padOffset=y,this.isLE=v,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(h),this.view=(0,_.createView)(this.buffer)}update(h){(0,l.exists)(this);const{view:g,buffer:y,blockLen:v}=this,b=(h=(0,_.toBytes)(h)).length;for(let A=0;Av-A&&(this.process(y,0),A=0);for(let M=A;M>v&b),O=Number(g&b),C=y?4:0,T=y?0:4;a.setUint32(h+C,A,y),a.setUint32(h+T,O,y)})(y,v-8,BigInt(8*this.length),b),this.process(y,0);const O=(0,_.createView)(h),C=this.outputLen;if(C%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=C/4,N=this.get();if(T>N.length)throw new Error("_sha2: outputLen bigger than state");for(let M=0;M{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.add5L=r.add5H=r.add4H=r.add4L=r.add3H=r.add3L=r.add=r.rotlBL=r.rotlBH=r.rotlSL=r.rotlSH=r.rotr32L=r.rotr32H=r.rotrBL=r.rotrBH=r.rotrSL=r.rotrSH=r.shrSL=r.shrSH=r.toBig=r.split=r.fromBig=void 0;const d=BigInt(2**32-1),l=BigInt(32);function _(W,Q=!1){return Q?{h:Number(W&d),l:Number(W>>l&d)}:{h:0|Number(W>>l&d),l:0|Number(W&d)}}function E(W,Q=!1){let D=new Uint32Array(W.length),o=new Uint32Array(W.length);for(let u=0;uBigInt(W>>>0)<>>0);r.toBig=S;const a=(W,Q,D)=>W>>>D;r.shrSH=a;const h=(W,Q,D)=>W<<32-D|Q>>>D;r.shrSL=h;const g=(W,Q,D)=>W>>>D|Q<<32-D;r.rotrSH=g;const y=(W,Q,D)=>W<<32-D|Q>>>D;r.rotrSL=y;const v=(W,Q,D)=>W<<64-D|Q>>>D-32;r.rotrBH=v;const b=(W,Q,D)=>W>>>D-32|Q<<64-D;r.rotrBL=b;const A=(W,Q)=>Q;r.rotr32H=A;const O=(W,Q)=>W;r.rotr32L=O;const C=(W,Q,D)=>W<>>32-D;r.rotlSH=C;const T=(W,Q,D)=>Q<>>32-D;r.rotlSL=T;const N=(W,Q,D)=>Q<>>64-D;r.rotlBH=N;const M=(W,Q,D)=>W<>>64-D;function P(W,Q,D,o){const u=(Q>>>0)+(o>>>0);return{h:W+D+(u/2**32|0)|0,l:0|u}}r.rotlBL=M,r.add=P;const R=(W,Q,D)=>(W>>>0)+(Q>>>0)+(D>>>0);r.add3L=R;const L=(W,Q,D,o)=>Q+D+o+(W/2**32|0)|0;r.add3H=L;const H=(W,Q,D,o)=>(W>>>0)+(Q>>>0)+(D>>>0)+(o>>>0);r.add4L=H;const V=(W,Q,D,o,u)=>Q+D+o+u+(W/2**32|0)|0;r.add4H=V;const J=(W,Q,D,o,u)=>(W>>>0)+(Q>>>0)+(D>>>0)+(o>>>0)+(u>>>0);r.add5L=J;const Y=(W,Q,D,o,u,m)=>Q+D+o+u+m+(W/2**32|0)|0;r.add5H=Y;const Z={fromBig:_,split:E,toBig:S,shrSH:a,shrSL:h,rotrSH:g,rotrSL:y,rotrBH:v,rotrBL:b,rotr32H:A,rotr32L:O,rotlSH:C,rotlSL:T,rotlBH:N,rotlBL:M,add:P,add3L:R,add3H:L,add4L:H,add4H:V,add5H:Y,add5L:J};r.default=Z},47099:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},27510:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.sha384=r.sha512_256=r.sha512_224=r.sha512=r.SHA512=void 0;const l=d(53090),_=d(51424),E=d(62503),[S,a]=(()=>_.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(O=>BigInt(O))))(),h=new Uint32Array(80),g=new Uint32Array(80);class y extends l.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:C,Al:T,Bh:N,Bl:M,Ch:P,Cl:R,Dh:L,Dl:H,Eh:V,El:J,Fh:Y,Fl:Z,Gh:W,Gl:Q,Hh:D,Hl:o}=this;return[C,T,N,M,P,R,L,H,V,J,Y,Z,W,Q,D,o]}set(C,T,N,M,P,R,L,H,V,J,Y,Z,W,Q,D,o){this.Ah=0|C,this.Al=0|T,this.Bh=0|N,this.Bl=0|M,this.Ch=0|P,this.Cl=0|R,this.Dh=0|L,this.Dl=0|H,this.Eh=0|V,this.El=0|J,this.Fh=0|Y,this.Fl=0|Z,this.Gh=0|W,this.Gl=0|Q,this.Hh=0|D,this.Hl=0|o}process(C,T){for(let w=0;w<16;w++,T+=4)h[w]=C.getUint32(T),g[w]=C.getUint32(T+=4);for(let w=16;w<80;w++){const x=0|h[w-15],F=0|g[w-15],G=_.default.rotrSH(x,F,1)^_.default.rotrSH(x,F,8)^_.default.shrSH(x,F,7),k=_.default.rotrSL(x,F,1)^_.default.rotrSL(x,F,8)^_.default.shrSL(x,F,7),p=0|h[w-2],B=0|g[w-2],ie=_.default.rotrSH(p,B,19)^_.default.rotrBH(p,B,61)^_.default.shrSH(p,B,6),te=_.default.rotrSL(p,B,19)^_.default.rotrBL(p,B,61)^_.default.shrSL(p,B,6),ee=_.default.add4L(k,te,g[w-7],g[w-16]),ue=_.default.add4H(ee,G,ie,h[w-7],h[w-16]);h[w]=0|ue,g[w]=0|ee}let{Ah:N,Al:M,Bh:P,Bl:R,Ch:L,Cl:H,Dh:V,Dl:J,Eh:Y,El:Z,Fh:W,Fl:Q,Gh:D,Gl:o,Hh:u,Hl:m}=this;for(let w=0;w<80;w++){const x=_.default.rotrSH(Y,Z,14)^_.default.rotrSH(Y,Z,18)^_.default.rotrBH(Y,Z,41),F=_.default.rotrSL(Y,Z,14)^_.default.rotrSL(Y,Z,18)^_.default.rotrBL(Y,Z,41),G=Y&W^~Y&D,k=Z&Q^~Z&o,p=_.default.add5L(m,F,k,a[w],g[w]),B=_.default.add5H(p,u,x,G,S[w],h[w]),ie=0|p,te=_.default.rotrSH(N,M,28)^_.default.rotrBH(N,M,34)^_.default.rotrBH(N,M,39),ee=_.default.rotrSL(N,M,28)^_.default.rotrBL(N,M,34)^_.default.rotrBL(N,M,39),ue=N&P^N&L^P&L,we=M&R^M&H^R&H;u=0|D,m=0|o,D=0|W,o=0|Q,W=0|Y,Q=0|Z,({h:Y,l:Z}=_.default.add(0|V,0|J,0|B,0|ie)),V=0|L,J=0|H,L=0|P,H=0|R,P=0|N,R=0|M;const me=_.default.add3L(ie,ee,we);N=_.default.add3H(me,B,te,ue),M=0|me}({h:N,l:M}=_.default.add(0|this.Ah,0|this.Al,0|N,0|M)),({h:P,l:R}=_.default.add(0|this.Bh,0|this.Bl,0|P,0|R)),({h:L,l:H}=_.default.add(0|this.Ch,0|this.Cl,0|L,0|H)),({h:V,l:J}=_.default.add(0|this.Dh,0|this.Dl,0|V,0|J)),({h:Y,l:Z}=_.default.add(0|this.Eh,0|this.El,0|Y,0|Z)),({h:W,l:Q}=_.default.add(0|this.Fh,0|this.Fl,0|W,0|Q)),({h:D,l:o}=_.default.add(0|this.Gh,0|this.Gl,0|D,0|o)),({h:u,l:m}=_.default.add(0|this.Hh,0|this.Hl,0|u,0|m)),this.set(N,M,P,R,L,H,V,J,Y,Z,W,Q,D,o,u,m)}roundClean(){h.fill(0),g.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}r.SHA512=y;class v extends y{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class b extends y{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class A extends y{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}r.sha512=(0,E.wrapConstructor)(()=>new y),r.sha512_224=(0,E.wrapConstructor)(()=>new v),r.sha512_256=(0,E.wrapConstructor)(()=>new b),r.sha384=(0,E.wrapConstructor)(()=>new A)},62503:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const _=d(47099),E=Z=>Z instanceof Uint8Array;r.u8=Z=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);r.u32=Z=>new Uint32Array(Z.buffer,Z.byteOffset,Math.floor(Z.byteLength/4));r.createView=Z=>new DataView(Z.buffer,Z.byteOffset,Z.byteLength);if(r.rotr=(Z,W)=>Z<<32-W|Z>>>W,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const y=Array.from({length:256},(Z,W)=>W.toString(16).padStart(2,"0"));r.bytesToHex=function v(Z){if(!E(Z))throw new Error("Uint8Array expected");let W="";for(let Q=0;Q=0&&uD+o.length,0));let Q=0;return Z.forEach(D=>{if(!E(D))throw new Error("Uint8Array expected");W.set(D,Q),Q+=D.length}),W};r.Hash=class P{clone(){return this._cloneInto()}};const R={}.toString;r.checkOpts=function L(Z,W){if(void 0!==W&&"[object Object]"!==R.call(W))throw new Error("Options should be object or undefined");return Object.assign(Z,W)},r.wrapConstructor=function H(Z){const W=D=>Z().update(N(D)).digest(),Q=Z();return W.outputLen=Q.outputLen,W.blockLen=Q.blockLen,W.create=()=>Z(),W},r.wrapConstructorWithOpts=function V(Z){const W=(D,o)=>Z(o).update(N(D)).digest(),Q=Z({});return W.outputLen=Q.outputLen,W.blockLen=Q.blockLen,W.create=D=>Z(D),W},r.wrapXOFConstructorWithOpts=function J(Z){const W=(D,o)=>Z(o).update(N(D)).digest(),Q=Z({});return W.outputLen=Q.outputLen,W.blockLen=Q.blockLen,W.create=D=>Z(D),W},r.randomBytes=function Y(Z=32){if(_.crypto&&"function"==typeof _.crypto.getRandomValues)return _.crypto.getRandomValues(new Uint8Array(Z));throw new Error("crypto.getRandomValues must be defined")}},75182:(ne,r)=>{"use strict";function d(y){if(!Number.isSafeInteger(y)||y<0)throw new Error(`Wrong positive integer: ${y}`)}function l(y){if("boolean"!=typeof y)throw new Error(`Expected boolean, not ${y}`)}function E(y,...v){if(!function _(y){return y instanceof Uint8Array||null!=y&&"object"==typeof y&&"Uint8Array"===y.constructor.name}(y))throw new Error("Expected Uint8Array");if(v.length>0&&!v.includes(y.length))throw new Error(`Expected Uint8Array of length ${v}, not of length=${y.length}`)}function S(y){if("function"!=typeof y||"function"!=typeof y.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");d(y.outputLen),d(y.blockLen)}function a(y,v=!0){if(y.destroyed)throw new Error("Hash instance has been destroyed");if(v&&y.finished)throw new Error("Hash#digest() has already been called")}function h(y,v){E(y);const b=v.outputLen;if(y.length{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SHA2=void 0;const l=d(75182),_=d(49303);class S extends _.Hash{constructor(h,g,y,v){super(),this.blockLen=h,this.outputLen=g,this.padOffset=y,this.isLE=v,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(h),this.view=(0,_.createView)(this.buffer)}update(h){(0,l.exists)(this);const{view:g,buffer:y,blockLen:v}=this,b=(h=(0,_.toBytes)(h)).length;for(let A=0;Av-A&&(this.process(y,0),A=0);for(let M=A;M>v&b),O=Number(g&b),C=y?4:0,T=y?0:4;a.setUint32(h+C,A,y),a.setUint32(h+T,O,y)})(y,v-8,BigInt(8*this.length),b),this.process(y,0);const O=(0,_.createView)(h),C=this.outputLen;if(C%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const T=C/4,N=this.get();if(T>N.length)throw new Error("_sha2: outputLen bigger than state");for(let M=0;M{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.crypto=void 0,r.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},78527:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.sha224=r.sha256=void 0;const l=d(19463),_=d(49303),E=(b,A,O)=>b&A^~b&O,S=(b,A,O)=>b&A^b&O^A&O,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),h=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),g=new Uint32Array(64);class y extends l.SHA2{constructor(){super(64,32,8,!1),this.A=0|h[0],this.B=0|h[1],this.C=0|h[2],this.D=0|h[3],this.E=0|h[4],this.F=0|h[5],this.G=0|h[6],this.H=0|h[7]}get(){const{A,B:O,C,D:T,E:N,F:M,G:P,H:R}=this;return[A,O,C,T,N,M,P,R]}set(A,O,C,T,N,M,P,R){this.A=0|A,this.B=0|O,this.C=0|C,this.D=0|T,this.E=0|N,this.F=0|M,this.G=0|P,this.H=0|R}process(A,O){for(let V=0;V<16;V++,O+=4)g[V]=A.getUint32(O,!1);for(let V=16;V<64;V++){const J=g[V-15],Y=g[V-2],Z=(0,_.rotr)(J,7)^(0,_.rotr)(J,18)^J>>>3,W=(0,_.rotr)(Y,17)^(0,_.rotr)(Y,19)^Y>>>10;g[V]=W+g[V-7]+Z+g[V-16]|0}let{A:C,B:T,C:N,D:M,E:P,F:R,G:L,H}=this;for(let V=0;V<64;V++){const Y=H+((0,_.rotr)(P,6)^(0,_.rotr)(P,11)^(0,_.rotr)(P,25))+E(P,R,L)+a[V]+g[V]|0,W=((0,_.rotr)(C,2)^(0,_.rotr)(C,13)^(0,_.rotr)(C,22))+S(C,T,N)|0;H=L,L=R,R=P,P=M+Y|0,M=N,N=T,T=C,C=Y+W|0}C=C+this.A|0,T=T+this.B|0,N=N+this.C|0,M=M+this.D|0,P=P+this.E|0,R=R+this.F|0,L=L+this.G|0,H=H+this.H|0,this.set(C,T,N,M,P,R,L,H)}roundClean(){g.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class v extends y{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}r.sha256=(0,_.wrapConstructor)(()=>new y),r.sha224=(0,_.wrapConstructor)(()=>new v)},49303:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.randomBytes=r.wrapXOFConstructorWithOpts=r.wrapConstructorWithOpts=r.wrapConstructor=r.checkOpts=r.Hash=r.concatBytes=r.toBytes=r.utf8ToBytes=r.asyncLoop=r.nextTick=r.hexToBytes=r.bytesToHex=r.isLE=r.rotr=r.createView=r.u32=r.u8=void 0;const _=d(52289);r.u8=Q=>new Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength);function a(Q){return Q instanceof Uint8Array||null!=Q&&"object"==typeof Q&&"Uint8Array"===Q.constructor.name}r.u32=Q=>new Uint32Array(Q.buffer,Q.byteOffset,Math.floor(Q.byteLength/4));r.createView=Q=>new DataView(Q.buffer,Q.byteOffset,Q.byteLength);if(r.rotr=(Q,D)=>Q<<32-D|Q>>>D,r.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!r.isLE)throw new Error("Non little-endian hardware is not supported");const y=Array.from({length:256},(Q,D)=>D.toString(16).padStart(2,"0"));r.bytesToHex=function v(Q){if(!a(Q))throw new Error("Uint8Array expected");let D="";for(let o=0;o=b._0&&Q<=b._9?Q-b._0:Q>=b._A&&Q<=b._F?Q-(b._A-10):Q>=b._a&&Q<=b._f?Q-(b._a-10):void 0}r.hexToBytes=function O(Q){if("string"!=typeof Q)throw new Error("hex string expected, got "+typeof Q);const D=Q.length,o=D/2;if(D%2)throw new Error("padded hex string expected, got unpadded hex of length "+D);const u=new Uint8Array(o);for(let m=0,w=0;m=0&&wQ().update(P(u)).digest(),o=Q();return D.outputLen=o.outputLen,D.blockLen=o.blockLen,D.create=()=>Q(),D},r.wrapConstructorWithOpts=function Y(Q){const D=(u,m)=>Q(m).update(P(u)).digest(),o=Q({});return D.outputLen=o.outputLen,D.blockLen=o.blockLen,D.create=u=>Q(u),D},r.wrapXOFConstructorWithOpts=function Z(Q){const D=(u,m)=>Q(m).update(P(u)).digest(),o=Q({});return D.outputLen=o.outputLen,D.blockLen=o.blockLen,D.create=u=>Q(u),D},r.randomBytes=function W(Q=32){if(_.crypto&&"function"==typeof _.crypto.getRandomValues)return _.crypto.getRandomValues(new Uint8Array(Q));throw new Error("crypto.getRandomValues must be defined")}},76913:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(r,"__esModule",{value:!0});const _=l(d(87908)),E=l(d(98593)),S=l(d(50539)),a=l(d(13917)),h=l(d(15247)),g={development:Object.assign(Object.assign({},S.default),_.default),test:Object.assign({},E.default),staging:Object.assign(Object.assign({},S.default),h.default),production:Object.assign(Object.assign({},S.default),a.default)},y=process.env.CONFIG_ENV||"production";if(!(y in g))throw new Error(`${y} is not a valid env config`);const v=g[y];r.default=v},863:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(r,"__esModule",{value:!0}),r.createAction=r.parseArgs=void 0;const _=d(8597),E=l(d(98538));r.parseArgs=g=>"string"==typeof g?Buffer.from(g,"base64"):g;r.createAction=g=>{switch(g.type){case"CreateAccount":return _.transactions.createAccount();case"DeployContract":{const{code:y}=g.params;return _.transactions.deployContract(y)}case"FunctionCall":{const{methodName:y,args:v,gas:b,deposit:A}=g.params;return _.transactions.functionCall(y,(0,r.parseArgs)(v),new E.default(b),new E.default(A))}case"Transfer":{const{deposit:y}=g.params;return _.transactions.transfer(new E.default(y))}case"Stake":{const{stake:y,publicKey:v}=g.params;return _.transactions.stake(new E.default(y),_.utils.PublicKey.from(v))}case"AddKey":{const{publicKey:y,accessKey:v}=g.params;return _.transactions.addKey(_.utils.PublicKey.from(y),(g=>{if("FullAccess"===g)return _.transactions.fullAccessKey();const{receiverId:y,methodNames:v=[]}=g,b=g.allowance?new E.default(g.allowance):void 0;return _.transactions.functionCallAccessKey(y,v,b)})(v.permission))}case"DeleteKey":{const{publicKey:y}=g.params;return _.transactions.deleteKey(_.utils.PublicKey.from(y))}case"DeleteAccount":{const{beneficiaryId:y}=g.params;return _.transactions.deleteAccount(y)}default:throw new Error("Invalid action type")}}},23183:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isValidAccessKey=void 0;r.isValidAccessKey=(l,_,E,S)=>{if(_.public_key===E)return!0;const{permission:a}=_.access_key;if("FullAccess"===a)return!0;if(S&&a.FunctionCall){const{receiver_id:h,method_names:g}=a.FunctionCall;if(h===l&&g.includes("add_request_and_confirm"))return!0;if(h===S.receiverId)return 1===S.actions.length&&S.actions.every(y=>"FunctionCall"===y.type&&((!y.params.deposit||"0"===y.params.deposit.toString())&&(0===g.length||g.includes(y.params.methodName))))}return!1}},33492:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(g,y,v,b){void 0===b&&(b=v);var A=Object.getOwnPropertyDescriptor(y,v);(!A||("get"in A?!y.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return y[v]}}),Object.defineProperty(g,b,A)}:function(g,y,v,b){void 0===b&&(b=v),g[b]=y[v]}),_=this&&this.__setModuleDefault||(Object.create?function(g,y){Object.defineProperty(g,"default",{enumerable:!0,value:y})}:function(g,y){g.default=y}),E=this&&this.__importStar||function(g){if(g&&g.__esModule)return g;var y={};if(null!=g)for(var v in g)"default"!==v&&Object.prototype.hasOwnProperty.call(g,v)&&l(y,g,v);return _(y,g),y},S=this&&this.__awaiter||function(g,y,v,b){return new(v||(v=Promise))(function(O,C){function T(P){try{M(b.next(P))}catch(R){C(R)}}function N(P){try{M(b.throw(P))}catch(R){C(R)}}function M(P){P.done?O(P.value):function A(O){return O instanceof v?O:new v(function(C){C(O)})}(P.value).then(T,N)}M((b=b.apply(g,y||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0});const a=E(d(27682));r.default=function h(g,y,v={}){let b,A=!1;const C=(()=>S(this,void 0,void 0,function*(){const{delay:T=1e3,maxIterations:N,timeout:M}=v;let L,P=0,R=!1;function H(){return S(this,void 0,void 0,function*(){R=!1;try{return yield void 0!==M?(0,a.default)(g(),M):g()}catch(V){if(!(V instanceof a.TimeoutPromiseError))throw V;R=!0}})}for(L=yield H();!A&&(R||y(L));){if(P===N)throw new Error("Polling executed the maximum number iterations");yield new Promise(V=>{b=setTimeout(()=>S(this,void 0,void 0,function*(){P++,L=yield H(),V()}),T)})}return L}))();return C.abort=()=>{A=!0,clearTimeout(b)},C}},27682:function(ne,r){"use strict";var d=this&&this.__awaiter||function(E,S,a,h){return new(a||(a=Promise))(function(y,v){function b(C){try{O(h.next(C))}catch(T){v(T)}}function A(C){try{O(h.throw(C))}catch(T){v(T)}}function O(C){C.done?y(C.value):function g(y){return y instanceof a?y:new a(function(v){v(y)})}(C.value).then(b,A)}O((h=h.apply(E,S||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.TimeoutPromiseError=void 0;class l extends Error{constructor(){super("Promise timeout")}}r.TimeoutPromiseError=l,r.default=function _(E,S){return d(this,void 0,void 0,function*(){let a;const h=new Promise((y,v)=>{a=setTimeout(()=>{v(new l)},S)}),g=yield Promise.race([E,h]);return clearTimeout(a),g})}},39825:(ne,r)=>{"use strict";var d,l;Object.defineProperty(r,"__esModule",{value:!0}),r.SignerRequestStatus=void 0,(l=d||(r.SignerRequestStatus=d={})).PENDING="pending",l.APPROVED="approved",l.REJECTED="rejected"},96299:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ApiError=void 0;class d extends Error{constructor(_,E,S){super(S),this.name="ApiError",this.url=E.url,this.status=E.status,this.statusText=E.statusText,this.body=E.body,this.request=_}}r.ApiError=d},43868:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.CancelablePromise=r.CancelError=void 0;class d extends Error{constructor(E){super(E),this.name="CancelError"}get isCancelled(){return!0}}r.CancelError=d;r.CancelablePromise=class l{constructor(E){this._isResolved=!1,this._isRejected=!1,this._isCancelled=!1,this._cancelHandlers=[],this._promise=new Promise((S,a)=>{this._resolve=S,this._reject=a;const y=v=>{this._isResolved||this._isRejected||this._isCancelled||this._cancelHandlers.push(v)};return Object.defineProperty(y,"isResolved",{get:()=>this._isResolved}),Object.defineProperty(y,"isRejected",{get:()=>this._isRejected}),Object.defineProperty(y,"isCancelled",{get:()=>this._isCancelled}),E(v=>{var b;this._isResolved||this._isRejected||this._isCancelled||(this._isResolved=!0,null===(b=this._resolve)||void 0===b||b.call(this,v))},v=>{var b;this._isResolved||this._isRejected||this._isCancelled||(this._isRejected=!0,null===(b=this._reject)||void 0===b||b.call(this,v))},y)})}then(E,S){return this._promise.then(E,S)}catch(E){return this._promise.catch(E)}finally(E){return this._promise.finally(E)}cancel(){var E;if(!(this._isResolved||this._isRejected||this._isCancelled)){if(this._isCancelled=!0,this._cancelHandlers.length)try{for(const S of this._cancelHandlers)S()}catch(S){return void console.warn("Cancellation threw an error",S)}this._cancelHandlers.length=0,null===(E=this._reject)||void 0===E||E.call(this,new d("Request aborted"))}}get isCancelled(){return this._isCancelled}}},75023:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(r,"__esModule",{value:!0}),r.OpenAPI=void 0;const _=l(d(76913));r.OpenAPI={BASE:_.default.proxyUrl,VERSION:"0.0.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},51022:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(V,J,Y,Z){return new(Y||(Y=Promise))(function(Q,D){function o(w){try{m(Z.next(w))}catch(x){D(x)}}function u(w){try{m(Z.throw(w))}catch(x){D(x)}}function m(w){w.done?Q(w.value):function W(Q){return Q instanceof Y?Q:new Y(function(D){D(Q)})}(w.value).then(o,u)}m((Z=Z.apply(V,J||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.request=r.sendRequest=void 0;const _=d(96299),E=d(43868),S=V=>null!=V,a=V=>"string"==typeof V,h=V=>a(V)&&""!==V,g=V=>"object"==typeof V&&"string"==typeof V.type&&"function"==typeof V.stream&&"function"==typeof V.arrayBuffer&&"function"==typeof V.constructor&&"string"==typeof V.constructor.name&&/^(Blob|File)$/.test(V.constructor.name)&&/^(Blob|File)$/.test(V[Symbol.toStringTag]),y=V=>V instanceof FormData,b=V=>{const J=[],Z=(W,Q)=>{S(Q)&&(Array.isArray(Q)?Q.forEach(D=>{Z(W,D)}):"object"==typeof Q?Object.entries(Q).forEach(([D,o])=>{Z(`${W}[${D}]`,o)}):((W,Q)=>{J.push(`${encodeURIComponent(W)}=${encodeURIComponent(String(Q))}`)})(W,Q))};return Object.entries(V).forEach(([W,Q])=>{Z(W,Q)}),J.length>0?`?${J.join("&")}`:""},C=(V,J)=>l(void 0,void 0,void 0,function*(){return"function"==typeof J?J(V):J}),T=(V,J)=>l(void 0,void 0,void 0,function*(){const Y=yield C(J,V.TOKEN),Z=yield C(J,V.USERNAME),W=yield C(J,V.PASSWORD),Q=yield C(J,V.HEADERS),D=Object.entries(Object.assign(Object.assign({Accept:"application/json"},Q),J.headers)).filter(([o,u])=>S(u)).reduce((o,[u,m])=>Object.assign(Object.assign({},o),{[u]:String(m)}),{});if(h(Y)&&(D.Authorization=`Bearer ${Y}`),h(Z)&&h(W)){const o=(V=>{try{return btoa(V)}catch{return Buffer.from(V).toString("base64")}})(`${Z}:${W}`);D.Authorization=`Basic ${o}`}return J.body&&(J.mediaType?D["Content-Type"]=J.mediaType:g(J.body)?D["Content-Type"]=J.body.type||"application/octet-stream":a(J.body)?D["Content-Type"]="text/plain":y(J.body)||(D["Content-Type"]="application/json")),new Headers(D)});r.sendRequest=(V,J,Y,Z,W,Q,D)=>l(void 0,void 0,void 0,function*(){const o=new AbortController,u={headers:Q,body:Z??W,method:J.method,signal:o.signal};return V.WITH_CREDENTIALS&&(u.credentials=V.CREDENTIALS),D(()=>o.abort()),yield fetch(Y,u)});r.request=(V,J)=>new E.CancelablePromise((Y,Z,W)=>l(void 0,void 0,void 0,function*(){try{const Q=((V,J)=>{const Y=V.ENCODE_PATH||encodeURI,Z=J.url.replace("{api-version}",V.VERSION).replace(/{(.*?)}/g,(Q,D)=>{var o;return null!==(o=J.path)&&void 0!==o&&o.hasOwnProperty(D)?Y(String(J.path[D])):Q}),W=`${V.BASE}${Z}`;return J.query?`${W}${b(J.query)}`:W})(V,J),D=(V=>{if(V.formData){const J=new FormData,Y=(Z,W)=>{a(W)||g(W)?J.append(Z,W):J.append(Z,JSON.stringify(W))};return Object.entries(V.formData).filter(([Z,W])=>S(W)).forEach(([Z,W])=>{Array.isArray(W)?W.forEach(Q=>Y(Z,Q)):Y(Z,W)}),J}})(J),o=(V=>{var J;if(V.body)return null!==(J=V.mediaType)&&void 0!==J&&J.includes("/json")?JSON.stringify(V.body):a(V.body)||g(V.body)||y(V.body)?V.body:JSON.stringify(V.body)})(J),u=yield T(V,J);if(!W.isCancelled){const m=yield(0,r.sendRequest)(V,J,Q,o,D,u,W),w=yield(V=>l(void 0,void 0,void 0,function*(){if(204!==V.status)try{const J=V.headers.get("Content-Type");if(J)return J.toLowerCase().startsWith("application/json")?yield V.json():yield V.text()}catch(J){console.error(J)}}))(m),x=((V,J)=>{if(J){const Y=V.headers.get(J);if(a(Y))return Y}})(m,J.responseHeader),F={url:Q,ok:m.ok,status:m.status,statusText:m.statusText,body:x??w};((V,J)=>{const Z=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},V.errors)[J.status];if(Z)throw new _.ApiError(V,J,Z);if(!J.ok)throw new _.ApiError(V,J,"Generic Error")})(J,F),Y(F.body)}}catch(Q){Z(Q)}}))},9273:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SignerRequestApi=r.$SignRequest=r.$SignMessageRequestPayload=r.$SignMessageRequestDto=r.$SignerTransactionDto=r.$SignerRequestStatusDto=r.$SignerRequestDto=r.$DAppMetadatRequest=r.$DAppMetadataDto=r.$CreateSignMessageRequest=r.$CreateSignerRequest=r.OpenAPI=r.CancelError=r.CancelablePromise=r.ApiError=void 0;var l=d(96299);Object.defineProperty(r,"ApiError",{enumerable:!0,get:function(){return l.ApiError}});var _=d(43868);Object.defineProperty(r,"CancelablePromise",{enumerable:!0,get:function(){return _.CancelablePromise}}),Object.defineProperty(r,"CancelError",{enumerable:!0,get:function(){return _.CancelError}});var E=d(75023);Object.defineProperty(r,"OpenAPI",{enumerable:!0,get:function(){return E.OpenAPI}});var S=d(16588);Object.defineProperty(r,"$CreateSignerRequest",{enumerable:!0,get:function(){return S.$CreateSignerRequest}});var a=d(82988);Object.defineProperty(r,"$CreateSignMessageRequest",{enumerable:!0,get:function(){return a.$CreateSignMessageRequest}});var h=d(57470);Object.defineProperty(r,"$DAppMetadataDto",{enumerable:!0,get:function(){return h.$DAppMetadataDto}});var g=d(71482);Object.defineProperty(r,"$DAppMetadatRequest",{enumerable:!0,get:function(){return g.$DAppMetadatRequest}});var y=d(48322);Object.defineProperty(r,"$SignerRequestDto",{enumerable:!0,get:function(){return y.$SignerRequestDto}});var v=d(47282);Object.defineProperty(r,"$SignerRequestStatusDto",{enumerable:!0,get:function(){return v.$SignerRequestStatusDto}});var b=d(34652);Object.defineProperty(r,"$SignerTransactionDto",{enumerable:!0,get:function(){return b.$SignerTransactionDto}});var A=d(25654);Object.defineProperty(r,"$SignMessageRequestDto",{enumerable:!0,get:function(){return A.$SignMessageRequestDto}});var O=d(93089);Object.defineProperty(r,"$SignMessageRequestPayload",{enumerable:!0,get:function(){return O.$SignMessageRequestPayload}});var C=d(53951);Object.defineProperty(r,"$SignRequest",{enumerable:!0,get:function(){return C.$SignRequest}});var T=d(61123);Object.defineProperty(r,"SignerRequestApi",{enumerable:!0,get:function(){return T.SignerRequestApi}})},82988:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$CreateSignMessageRequest=void 0,r.$CreateSignMessageRequest={properties:{network:{type:"Enum",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},receiverMetadata:{type:"DAppMetadatRequest"}}}},16588:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$CreateSignerRequest=void 0,r.$CreateSignerRequest={properties:{network:{type:"Enum",isRequired:!0},transactions:{type:"array",contains:{type:"one-of",contains:[{type:"SignerTransactionDto"}]},isRequired:!0},dAppMetadata:{type:"DAppMetadatRequest"}}}},71482:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$DAppMetadatRequest=void 0,r.$DAppMetadatRequest={properties:{}}},57470:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$DAppMetadataDto=void 0,r.$DAppMetadataDto={properties:{name:{type:"string",isRequired:!0},logoUrl:{type:"string",isRequired:!0},url:{type:"string"}}}},25654:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignMessageRequestDto=void 0,r.$SignMessageRequestDto={properties:{id:{type:"string",isRequired:!0},message:{type:"string",isRequired:!0},receiver:{type:"string",isRequired:!0},nonce:{type:"array",contains:{type:"number"},isRequired:!0},callbackUrl:{type:"string"},network:{type:"Enum",isRequired:!0},response:{properties:{},isRequired:!0},receiverMetadata:{type:"DAppMetadataDto"},status:{type:"Enum",isRequired:!0}}}},93089:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignMessageRequestPayload=void 0,r.$SignMessageRequestPayload={properties:{accountId:{type:"string",isRequired:!0},signature:{type:"string",isRequired:!0},publicKey:{type:"string",isRequired:!0}}}},53951:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignRequest=void 0,r.$SignRequest={properties:{signerAccountId:{type:"string",isRequired:!0},txHash:{type:"array",contains:{type:"string"},isRequired:!0}}}},48322:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignerRequestDto=void 0,r.$SignerRequestDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0},network:{type:"Enum",isRequired:!0},signerAccountId:{type:"string",isRequired:!0},requests:{type:"array",contains:{properties:{}},isRequired:!0},dAppMetadata:{type:"DAppMetadataDto"},txHash:{type:"array",contains:{type:"string"}},createdAt:{type:"string",isRequired:!0,format:"date-time"},updatedAt:{type:"string",isRequired:!0,format:"date-time"}}}},47282:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignerRequestStatusDto=void 0,r.$SignerRequestStatusDto={properties:{id:{type:"string",isRequired:!0},status:{type:"Enum",isRequired:!0}}}},34652:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.$SignerTransactionDto=void 0,r.$SignerTransactionDto={properties:{signerId:{type:"string"},receiverId:{type:"string"},actions:{type:"array",contains:{properties:{}},isRequired:!0}}}},61123:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SignerRequestApi=void 0;const l=d(75023),_=d(51022);r.SignerRequestApi=class E{static createSignerRequest(a){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request",body:a,mediaType:"application/json"})}static getSignerRequestStatus(a){return(0,_.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/{id}/status",path:{id:a}})}static approveSignerRequest(a,h){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/approve",path:{id:a},body:h,mediaType:"application/json"})}static rejectSignerRequest(a){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/{id}/reject",path:{id:a}})}static getSignerRequest(a){return(0,_.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/{id}",path:{id:a}})}static createSignMessageRequest(a){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message",body:a,mediaType:"application/json"})}static getSignMessageRequest(a){return(0,_.request)(l.OpenAPI,{method:"GET",url:"/api/signer-request/message/{id}",path:{id:a}})}static signMessageRequest(a,h){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/sign",path:{id:a},body:h,mediaType:"application/json"})}static rejectMessageRequest(a){return(0,_.request)(l.OpenAPI,{method:"POST",url:"/api/signer-request/message/{id}/reject",path:{id:a}})}}},2199:(ne,r)=>{"use strict";var d,l;Object.defineProperty(r,"__esModule",{value:!0}),r.RepositoryErrorCodes=r.SessionRepositoryErrorCodes=void 0,(l=d||(r.SessionRepositoryErrorCodes=d={})).INVALID_ACCOUNT_ID="INVALID_ACCOUNT_ID",l.ACCOUNT_KEY_NOT_FOUND="ACCOUNT_KEY_NOT_FOUND",r.RepositoryErrorCodes=d},21251:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(69560),r)},45358:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.SessionRepository=void 0;const _=d(82687),E=d(2199),S=d(8597);class a extends _.WindowLocalStorageRepository{constructor(){super("session"),this.loadSessionState()}loadSessionState(){return l(this,void 0,void 0,function*(){(yield this.get())||(yield this.set({mainnet:{activeAccount:null,accounts:{}},testnet:{activeAccount:null,accounts:{}}}))})}getKey(g,y){var v;return l(this,void 0,void 0,function*(){const A=null===(v=(yield this.get())[g])||void 0===v?void 0:v.accounts[y];if(!A)throw new Error(E.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return S.KeyPair.fromString(A)})}setKey(g,y,v){return l(this,void 0,void 0,function*(){const b=yield this.get();b[g].accounts[y]=v.toString(),yield this.set(b)})}removeKey(g,y){return l(this,void 0,void 0,function*(){const v=yield this.get();v[g].activeAccount===y&&(v[g].activeAccount=null),delete v[g].accounts[y],yield this.set(v)})}getActiveAccount(g){return l(this,void 0,void 0,function*(){return(yield this.get())[g].activeAccount})}setActiveAccount(g,y){return l(this,void 0,void 0,function*(){const v=yield this.get();if(!Object.keys(v[g].accounts).includes(y))throw new Error(E.RepositoryErrorCodes.INVALID_ACCOUNT_ID);v[g].activeAccount=y,yield this.set(v)})}getAccounts(g){return l(this,void 0,void 0,function*(){const v=(yield this.get())[g].accounts;return Object.keys(v)})}getNetworks(){return l(this,void 0,void 0,function*(){const g=yield this.get();return Object.keys(g)})}clear(){return l(this,void 0,void 0,function*(){yield this.clear()})}}r.SessionRepository=a},98494:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(45358),r)},61439:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Repository=void 0;r.Repository=class d{constructor(_){this.projectName="near-mobile-signer",this.key=`${this.projectName}:${_}`}}},82687:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WindowLocalStorageRepository=void 0;const l=d(61439);class _ extends l.Repository{set(S){return Promise.resolve(window.localStorage.setItem(this.key,JSON.stringify(S)))}get(){const S=window.localStorage.getItem(this.key);return Promise.resolve(S?JSON.parse(S):void 0)}clear(){return Promise.resolve(window.localStorage.removeItem(this.key))}}r.WindowLocalStorageRepository=_},75729:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WindowLocalStorageRepository=r.Repository=void 0;var l=d(61439);Object.defineProperty(r,"Repository",{enumerable:!0,get:function(){return l.Repository}});var _=d(82687);Object.defineProperty(r,"WindowLocalStorageRepository",{enumerable:!0,get:function(){return _.WindowLocalStorageRepository}})},69560:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(98494),r),_(d(75729),r)},96105:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(T,N,M,P){return new(M||(M=Promise))(function(L,H){function V(Z){try{Y(P.next(Z))}catch(W){H(W)}}function J(Z){try{Y(P.throw(Z))}catch(W){H(W)}}function Y(Z){Z.done?L(Z.value):function R(L){return L instanceof M?L:new M(function(H){H(L)})}(Z.value).then(V,J)}Y((P=P.apply(T,N||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.NearMobileWallet=void 0;const _=d(8597),E=d(87974),S=d(97186),a=d(12139),h=d(39825),g=d(23183),y=d(863),v=d(93730),b=d(21251),A=d(94196),O=d(2199);r.NearMobileWallet=class C{handleRequestStatus(N){var M,P,R,L;N===h.SignerRequestStatus.APPROVED?null===(P=(M=this.defaultStrategy).onApproved)||void 0===P||P.call(M):N===h.SignerRequestStatus.REJECTED&&(null===(L=(R=this.defaultStrategy).onError)||void 0===L||L.call(R))}loadConnection(N,M){const P=new _.InMemorySigner(this.sessionRepository),R=new E.JsonRpcProvider({url:N??`https://rpc.${M}.near.org`});this.connection=_.Connection.fromConfig({jsvmAccountId:`jsvm.${M}`,provider:R,network:M,signer:P})}retryTransaction({requests:N}){var M,P,R,L;return l(this,void 0,void 0,function*(){try{const{id:H,network:V,requests:J}=yield this.defaultProvider.createRequest(this.network,N,this.dAppMetadata);null===(P=(M=this.defaultStrategy).onRequested)||void 0===P||P.call(M,H,{network:V,request:J});const{status:Y}=yield this.defaultProvider.awaitActionSignatureResolution(H);this.handleRequestStatus(Y);const{signerAccountId:Z,txHash:W}=yield this.defaultProvider.getRequest(H);if(!Z||!W)throw new Error(v.WalletErrors.REQUEST_NOT_SIGNED);if(1===W.length)return yield this.rpc.txStatus(W[0],Z);throw new Error(v.WalletErrors.OPERATION_FAILED)}catch(H){throw null===(L=(R=this.defaultStrategy).onError)||void 0===L||L.call(R),new Error(H)}})}constructor({nodeUrl:N,network:M="testnet",sessionRepository:P=new b.SessionRepository,metadata:R}={}){this.network=M,this.sessionRepository=P,this.defaultStrategy=new S.WidgetStrategy,this.defaultProvider=new a.NearMobileSignerProxy,this.dAppMetadata=R,this.loadConnection(N,M)}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}getAccounts(){return l(this,void 0,void 0,function*(){return this.sessionRepository.getAccounts(this.network)})}isSignedIn(N){return l(this,void 0,void 0,function*(){try{const M=yield this.sessionRepository.getActiveAccount(this.network);if(N&&M!==N||null===M)return!1;const P=yield this.sessionRepository.getKey(this.network,M);if(null===P)throw new Error(O.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND);return void 0!==(yield(yield this.account(M)).getAccessKeys()).find(V=>V.public_key===P.getPublicKey().toString())}catch(M){if(M.message===O.RepositoryErrorCodes.ACCOUNT_KEY_NOT_FOUND)return!1;throw new Error(M)}})}signOut(){return l(this,void 0,void 0,function*(){const N=yield this.isSignedIn(),M=yield this.sessionRepository.getActiveAccount(this.network);if(!N)return void(yield this.sessionRepository.removeKey(this.network,M));const P=yield this.sessionRepository.getKey(this.network,M);if(null===P)throw new Error(v.WalletErrors.NO_ACCOUNT_LOCAL_KEY);const R=P.getPublicKey().toString();try{yield this.silentSignAndSendTransaction({signerId:M,receiverId:M,actions:[{type:"DeleteKey",params:{publicKey:R}}]}),yield this.sessionRepository.removeKey(this.network,M)}catch{yield this.retryTransaction({requests:[{actions:[{type:"DeleteKey",params:{publicKey:R}}],signerId:M,receiverId:M}]}),yield this.sessionRepository.removeKey(this.network,M)}})}signIn({contractId:N,allowance:M,methodNames:P=[]}){var R,L;return l(this,void 0,void 0,function*(){try{const H=_.KeyPair.fromRandom("ed25519"),V={receiverId:N,methodNames:P,allowance:M},J=[{actions:[{type:"AddKey",params:{publicKey:H.getPublicKey().toString(),accessKey:{permission:V}}}]}],{id:Y,network:Z,requests:W}=yield this.defaultProvider.createRequest(this.network,J,this.dAppMetadata),Q=()=>l(this,void 0,void 0,function*(){return yield this.defaultProvider.rejectSignerRequest(Y)});null===(L=(R=this.defaultStrategy).onRequested)||void 0===L||L.call(R,Y,{network:Z,request:W},Q);const{status:D}=yield this.defaultProvider.awaitActionSignatureResolution(Y);this.handleRequestStatus(D);const{signerAccountId:o}=yield this.defaultProvider.getRequest(Y);if(!o)throw new Error(v.WalletErrors.REQUEST_NOT_SIGNED);return yield this.sessionRepository.setKey(this.network,o,H),yield this.sessionRepository.setActiveAccount(this.network,o),o}catch(H){throw new Error(H)}})}account(N){return l(this,void 0,void 0,function*(){const M=N??(yield this.sessionRepository.getActiveAccount(this.network));if(null===M)throw new Error(v.WalletErrors.NO_ACTIVE_ACCOUNT);return new _.Account(this.connection,M)})}silentSignAndSendTransaction({signerId:N,receiverId:M,actions:P}){return l(this,void 0,void 0,function*(){const R=yield this.account(N),L=yield this.sessionRepository.getKey(this.network,R.accountId);if(null===L)throw new Error(v.WalletErrors.NO_ACTIVE_ACCOUNT);if(!(yield this.isSignedIn(R.accountId)))throw new Error(v.WalletErrors.NO_ACTIVE_ACCOUNT);const V=L.getPublicKey().toString(),J=yield R.getAccessKeys(),Y={receiverId:M,actions:P};if(!J.some(W=>(0,g.isValidAccessKey)(R.accountId,W,V,Y)))throw new Error(v.WalletErrors.INVALID_ACCESS_KEY);return yield R.signAndSendTransaction({actions:P.map(W=>(0,y.createAction)(W)),receiverId:M??R.accountId})})}signAndSendTransaction({signerId:N,receiverId:M,actions:P}){var R,L;return l(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(N)))throw yield this.sessionRepository.removeKey(this.network,N),new Error(v.WalletErrors.NO_ACTIVE_ACCOUNT);const V=yield this.silentSignAndSendTransaction({signerId:N,receiverId:M,actions:P});return null===(L=(R=this.defaultStrategy).onSuccess)||void 0===L||L.call(R),V}catch(H){if(H.message===v.WalletErrors.NO_ACTIVE_ACCOUNT)throw new Error(H);return yield this.retryTransaction({requests:[{actions:P,receiverId:M,signerId:N}]})}})}signAndSendTransactions({transactions:N}){var M,P,R,L;return l(this,void 0,void 0,function*(){try{if(!(yield this.isSignedIn(N[0].signerId)))throw yield this.sessionRepository.removeKey(this.network,N[0].signerId),new Error(v.WalletErrors.NO_ACTIVE_ACCOUNT);const{id:V,network:J,requests:Y}=yield this.defaultProvider.createRequest(this.network,N,this.dAppMetadata);null===(P=(M=this.defaultStrategy).onRequested)||void 0===P||P.call(M,V,{network:J,request:Y});const{status:Z}=yield this.defaultProvider.awaitActionSignatureResolution(V);this.handleRequestStatus(Z);const{signerAccountId:W,txHash:Q}=yield this.defaultProvider.getRequest(V);if(!W||!Q)throw new Error(v.WalletErrors.REQUEST_NOT_SIGNED);const D=[];for(const o of Q){const u=yield this.rpc.txStatus(o,W);D.push(u)}return D}catch(H){throw null===(L=(R=this.defaultStrategy).onError)||void 0===L||L.call(R),new Error(H)}})}signMessage({message:N,receiver:M,nonce:P,callbackUrl:R}){var L,H,V,J,Y,Z;return l(this,void 0,void 0,function*(){const{id:W}=yield this.defaultProvider.createSignMessage(this.network,N,M,P,R,this.dAppMetadata);null===(H=(L=this.defaultStrategy).onRequested)||void 0===H||H.call(L,W,{network:this.network,message:N,receiver:M,nonce:P,callbackUrl:R});const{response:Q,status:D}=yield this.defaultProvider.awaitMessageSignatureResolution(W);if(this.handleRequestStatus(D),!Q&&D!==h.SignerRequestStatus.APPROVED)throw new Error(v.WalletErrors.NO_SIGNATURE);try{const{publicKey:o,signature:u,accountId:m}=Q;if(!(0,A.verifySignature)({publicKey:o,signature:u,message:N,nonce:Buffer.from(P),recipient:M}))throw new Error(v.WalletErrors.INVALID_SIGNATURE);if(!(yield(yield this.account(m)).getAccessKeys()).some(k=>!(k.public_key!==o||"FullAccess"!==k.access_key.permission)))throw Error(v.WalletErrors.INVALID_ACCESS_KEY);return null===(J=(V=this.defaultStrategy).onSuccess)||void 0===J||J.call(V),{signature:u,publicKey:o,message:N,accountId:m,receiver:M,nonce:P,callbackUrl:R}}catch(o){throw null===(Z=(Y=this.defaultStrategy).onError)||void 0===Z||Z.call(Y),new Error(o)}})}}},93730:(ne,r)=>{"use strict";var d,l;Object.defineProperty(r,"__esModule",{value:!0}),r.WalletErrors=void 0,(l=d||(r.WalletErrors=d={})).NO_ACTIVE_ACCOUNT="NO_ACTIVE_ACCOUNT",l.NO_ACCOUNT_LOCAL_KEY="NO_ACCOUNT_LOCAL_KEY",l.INVALID_ACCESS_KEY="INVALID_ACCESS_KEY",l.NO_SIGNER_ACCOUNT_ID="NO_SIGNER_ACCOUNT_ID",l.REQUEST_NOT_SIGNED="REQUEST_NOT_SIGNED",l.NO_SIGNATURE="NO_SIGNATURE",l.INVALID_SIGNATURE="INVALID_SIGNATURE",l.OPERATION_FAILED="OPERATION_FAILED"},12139:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(y,v,b,A){return new(b||(b=Promise))(function(C,T){function N(R){try{P(A.next(R))}catch(L){T(L)}}function M(R){try{P(A.throw(R))}catch(L){T(L)}}function P(R){R.done?C(R.value):function O(C){return C instanceof b?C:new b(function(T){T(C)})}(R.value).then(N,M)}P((A=A.apply(y,v||[])).next())})},_=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.NearMobileSignerProxy=void 0;const E=_(d(76913)),S=_(d(33492)),a=d(39825),h=d(9273);r.NearMobileSignerProxy=class g{createRequest(v,b,A){return l(this,void 0,void 0,function*(){return yield h.SignerRequestApi.createSignerRequest({network:v,transactions:b,dAppMetadata:A})})}awaitActionSignatureResolution(v){return l(this,void 0,void 0,function*(){return yield(0,S.default)(()=>h.SignerRequestApi.getSignerRequestStatus(v),({status:b})=>b===a.SignerRequestStatus.PENDING,{maxIterations:E.default.polling.maxIterations})})}getRequest(v){return l(this,void 0,void 0,function*(){return yield h.SignerRequestApi.getSignerRequest(v)})}createSignMessage(v,b,A,O,C,T){return l(this,void 0,void 0,function*(){return yield h.SignerRequestApi.createSignMessageRequest({network:v,message:b,receiver:A,nonce:O,callbackUrl:C,receiverMetadata:T})})}awaitMessageSignatureResolution(v){return l(this,void 0,void 0,function*(){return yield(0,S.default)(()=>h.SignerRequestApi.getSignMessageRequest(v),({response:b,status:A})=>!b&&A===a.SignerRequestStatus.PENDING,{maxIterations:E.default.polling.maxIterations})})}rejectSignerRequest(v){return l(this,void 0,void 0,function*(){yield h.SignerRequestApi.rejectSignerRequest(v)})}}},97186:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(r,"__esModule",{value:!0}),r.WidgetStrategy=void 0;const _=l(d(76913));class S{constructor(){this.widgetUrl=_.default.widgetUrl,null==S.connector&&(S.connector=(a=>{const h=document.createElement("iframe");return h.src=a,h.style.border="none",h.style.zIndex="10000",h.style.position="fixed",h.style.display="none",h.style.top="0",h.style.left="0",h.style.width="100%",h.style.height="100%",document.body.appendChild(h),h})(this.widgetUrl),S.connector.addEventListener("load",()=>{S.isLoaded=!0}))}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),null!=S.connector&&(S.connector.style.display="none")}onRequested(h,g,y){if(null==S.connector)return;S.connector.style.display="block";const v=()=>{var b,A;S.connector.removeEventListener("load",v);const O="message"in g?"message":"request",C=`${_.default.nearMobileWalletUrl}/${O}/${h}`;null===(A=null===(b=S.connector)||void 0===b?void 0:b.contentWindow)||void 0===A||A.postMessage({requestUrl:C},new URL(this.widgetUrl).origin)};S.isLoaded?v():S.connector.addEventListener("load",v),this.messageHandler=b=>{b.origin===new URL(this.widgetUrl).origin&&"close"===b.data&&(y?.(),this.onError())},window.addEventListener("message",this.messageHandler)}onApproved(){this.close()}onSuccess(){this.close()}onError(){this.close()}}r.WidgetStrategy=S,S.isLoaded=!1},99868:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.payloadSchema=r.Payload=void 0;class d{constructor(_){this.tag=2147484061,this.message=_.message,this.nonce=_.nonce,this.recipient=_.recipient,_.callbackUrl&&(this.callbackUrl=_.callbackUrl)}}r.Payload=d,r.payloadSchema=new Map([[d,{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]])},94196:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.verifySignature=void 0;const l=d(8597),_=d(21531),E=d(1520),S=d(99868);r.verifySignature=({publicKey:h,signature:g,message:y,nonce:v,recipient:b,callbackUrl:A})=>{const O=new S.Payload({message:y,nonce:v,recipient:b,callbackUrl:A}),C=(0,_.serialize)(S.payloadSchema,O),T=Uint8Array.from(E.sha256.array(C)),N=Buffer.from(g,"base64");return l.utils.PublicKey.from(h).verify(T,N)}},77118:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(Q,D,o,u){return new(o||(o=Promise))(function(w,x){function F(p){try{k(u.next(p))}catch(B){x(B)}}function G(p){try{k(u.throw(p))}catch(B){x(B)}}function k(p){p.done?w(p.value):function m(w){return w instanceof o?w:new o(function(x){x(w)})}(p.value).then(F,G)}k((u=u.apply(Q,D||[])).next())})},_=this&&this.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;const E=d(55911),S=d(1739),a=d(30448),h=d(17527),g=d(41166),y=_(d(98538)),v=d(21531),{addKey:b,createAccount:A,deleteAccount:O,deleteKey:C,deployContract:T,fullAccessKey:N,functionCall:M,functionCallAccessKey:P,stake:R,transfer:L}=a.actionCreators;function Y(Q){return JSON.parse(Buffer.from(Q).toString())}function Z(Q){return Buffer.from(JSON.stringify(Q))}class W{constructor(D,o){this.accessKeyByPublicKeyCache={},this.connection=D,this.accountId=o}state(){return l(this,void 0,void 0,function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})})}signTransaction(D,o){return l(this,void 0,void 0,function*(){const u=yield this.findAccessKey(D,o);if(!u)throw new h.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:m}=u,x=(yield this.connection.provider.block({finality:"final"})).header.hash,F=m.nonce.add(new y.default(1));return yield(0,a.signTransaction)(D,F,o,(0,v.baseDecode)(x),this.connection.signer,this.accountId,this.connection.networkId)})}signAndSendTransaction({receiverId:D,actions:o,returnError:u}){return l(this,void 0,void 0,function*(){let m,w;const x=yield(0,S.exponentialBackoff)(500,12,1.5,()=>l(this,void 0,void 0,function*(){[m,w]=yield this.signTransaction(D,o);const F=w.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(w)}catch(G){if("InvalidNonce"===G.type)return(0,g.logWarning)(`Retrying transaction ${D}:${(0,v.baseEncode)(m)} with new nonce.`),delete this.accessKeyByPublicKeyCache[F.toString()],null;if("Expired"===G.type)return(0,g.logWarning)(`Retrying transaction ${D}:${(0,v.baseEncode)(m)} due to expired block hash`),null;throw G.context=new h.ErrorContext((0,v.baseEncode)(m)),G}}));if(!x)throw new h.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,g.printTxOutcomeLogsAndFailures)({contractId:w.transaction.receiverId,outcome:x}),!u&&"object"==typeof x.status&&"object"==typeof x.status.Failure&&null!==x.status.Failure)throw x.status.Failure.error_message&&x.status.Failure.error_type?new h.TypedError(`Transaction ${x.transaction_outcome.id} failed. ${x.status.Failure.error_message}`,x.status.Failure.error_type):(0,g.parseResultError)(x);return x})}findAccessKey(D,o){return l(this,void 0,void 0,function*(){const u=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!u)throw new h.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const m=this.accessKeyByPublicKeyCache[u.toString()];if(void 0!==m)return{publicKey:u,accessKey:m};try{const w=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:u.toString(),finality:"optimistic"}),x=Object.assign(Object.assign({},w),{nonce:new y.default(w.nonce)});return this.accessKeyByPublicKeyCache[u.toString()]?{publicKey:u,accessKey:this.accessKeyByPublicKeyCache[u.toString()]}:(this.accessKeyByPublicKeyCache[u.toString()]=x,{publicKey:u,accessKey:x})}catch(w){if("AccessKeyDoesNotExist"==w.type)return null;throw w}})}createAndDeployContract(D,o,u,m){return l(this,void 0,void 0,function*(){const w=N();return yield this.signAndSendTransaction({receiverId:D,actions:[A(),L(m),b(E.PublicKey.from(o),w),T(u)]}),new W(this.connection,D)})}sendMoney(D,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:D,actions:[L(o)]})})}createAccount(D,o,u){return l(this,void 0,void 0,function*(){const m=N();return this.signAndSendTransaction({receiverId:D,actions:[A(),L(u),b(E.PublicKey.from(o),m)]})})}deleteAccount(D){return l(this,void 0,void 0,function*(){return process.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[O(D)]})})}deployContract(D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[T(D)]})})}encodeJSContractArgs(D,o,u){return Buffer.concat([Buffer.from(D),Buffer.from([0]),Buffer.from(o),Buffer.from([0]),Buffer.from(u)])}functionCall({contractId:D,methodName:o,args:u={},gas:m=g.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:w,walletMeta:x,walletCallbackUrl:F,stringify:G,jsContract:k}){return l(this,void 0,void 0,function*(){let p;if(this.validateArgs(u),k)p=["call_js_contract",this.encodeJSContractArgs(D,o,JSON.stringify(u)),m,w,null,!0];else{const B=void 0===G?a.stringifyJsonOrBytes:G;p=[o,u,m,w,B,!1]}return this.signAndSendTransaction({receiverId:k?this.connection.jsvmAccountId:D,actions:[M.apply(void 0,p)],walletMeta:x,walletCallbackUrl:F})})}addKey(D,o,u,m){return l(this,void 0,void 0,function*(){let w;return u||(u=[]),Array.isArray(u)||(u=[u]),w=o?P(o,u,m):N(),this.signAndSendTransaction({receiverId:this.accountId,actions:[b(E.PublicKey.from(D),w)]})})}deleteKey(D){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[C(E.PublicKey.from(D))]})})}stake(D,o){return l(this,void 0,void 0,function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[R(o,E.PublicKey.from(D))]})})}signedDelegate({actions:D,blockHeightTtl:o,receiverId:u}){return l(this,void 0,void 0,function*(){const{provider:m,signer:w}=this.connection,{header:x}=yield m.block({finality:"final"}),{accessKey:F,publicKey:G}=yield this.findAccessKey(null,null),k=(0,a.buildDelegateAction)({actions:D,maxBlockHeight:new y.default(x.height).add(new y.default(o)),nonce:new y.default(F.nonce).add(new y.default(1)),publicKey:G,receiverId:u,senderId:this.accountId}),{signedDelegateAction:p}=yield(0,a.signDelegateAction)({delegateAction:k,signer:{sign:B=>l(this,void 0,void 0,function*(){const{signature:ie}=yield w.signMessage(B,k.senderId,this.connection.networkId);return ie})}});return p})}validateArgs(D){if((void 0===D.byteLength||D.byteLength!==D.length)&&(Array.isArray(D)||"object"!=typeof D))throw new h.PositionalArgsError}viewFunction({contractId:D,methodName:o,args:u={},parse:m=Y,stringify:w=Z,jsContract:x=!1,blockQuery:F={finality:"optimistic"}}){return l(this,void 0,void 0,function*(){let G;this.validateArgs(u),G=x?this.encodeJSContractArgs(D,o,Object.keys(u).length>0?JSON.stringify(u):""):w(u);const k=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},F),{account_id:x?this.connection.jsvmAccountId:D,method_name:x?"view_js_contract":o,args_base64:G.toString("base64")}));return k.logs&&(0,g.printTxOutcomeLogs)({contractId:D,logs:k.logs}),k.result&&k.result.length>0&&m(Buffer.from(k.result))})}viewState(D,o={finality:"optimistic"}){return l(this,void 0,void 0,function*(){const{values:u}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},o),{account_id:this.accountId,prefix_base64:Buffer.from(D).toString("base64")}));return u.map(({key:m,value:w})=>({key:Buffer.from(m,"base64"),value:Buffer.from(w,"base64")}))})}getAccessKeys(){var D;return l(this,void 0,void 0,function*(){const o=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(D=o?.keys)||void 0===D?void 0:D.map(u=>Object.assign(Object.assign({},u),{access_key:Object.assign(Object.assign({},u.access_key),{nonce:new y.default(u.access_key.nonce)})}))})}getAccountDetails(){return l(this,void 0,void 0,function*(){return{authorizedApps:(yield this.getAccessKeys()).filter(u=>"FullAccess"!==u.access_key.permission).map(u=>{const m=u.access_key.permission;return{contractId:m.FunctionCall.receiver_id,amount:m.FunctionCall.allowance,publicKey:u.public_key}})}})}getAccountBalance(){return l(this,void 0,void 0,function*(){const D=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),o=yield this.state(),u=new y.default(D.runtime_config.storage_amount_per_byte),m=new y.default(o.storage_usage).mul(u),w=new y.default(o.locked),x=new y.default(o.amount).add(w),F=x.sub(y.default.max(w,m));return{total:x.toString(),stateStaked:m.toString(),staked:w.toString(),available:F.toString()}})}getActiveDelegatedStakeBalance(){return l(this,void 0,void 0,function*(){const D=yield this.connection.provider.block({finality:"final"}),o=D.header.hash,u=D.header.epoch_id,{current_validators:m,next_validators:w,current_proposals:x}=yield this.connection.provider.validators(u),F=new Set;[...m,...w,...x].forEach(te=>F.add(te.account_id));const G=[...F],k=G.map(te=>this.viewFunction({contractId:te,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:o}})),p=yield Promise.allSettled(k);if(p.some(te=>"rejected"===te.status&&"TimeoutError"===te.reason.type))throw new Error("Failed to get delegated stake balance");const ie=p.reduce((te,ee,ue)=>{const we=G[ue];if("fulfilled"===ee.status){const me=new y.default(ee.value);if(!me.isZero())return Object.assign(Object.assign({},te),{stakedValidators:[...te.stakedValidators,{validatorId:we,amount:me.toString()}],total:te.total.add(me)})}return"rejected"===ee.status?Object.assign(Object.assign({},te),{failedValidators:[...te.failedValidators,{validatorId:we,error:ee.reason}]}):te},{stakedValidators:[],failedValidators:[],total:new y.default(0)});return Object.assign(Object.assign({},ie),{total:ie.total.toString()})})}}r.Account=W},71339:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(L,H,V,J){return new(V||(V=Promise))(function(Z,W){function Q(u){try{o(J.next(u))}catch(m){W(m)}}function D(u){try{o(J.throw(u))}catch(m){W(m)}}function o(u){u.done?Z(u.value):function Y(Z){return Z instanceof V?Z:new V(function(W){W(Z)})}(u.value).then(Q,D)}o((J=J.apply(L,H||[])).next())})},_=this&&this.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(r,"__esModule",{value:!0}),r.Account2FA=void 0;const E=d(55911),S=d(17527),a=d(1739),h=d(30448),g=_(d(98538)),y=d(30776),v=d(94914),b=d(87932),{addKey:A,deleteKey:O,deployContract:C,fullAccessKey:T,functionCall:N,functionCallAccessKey:M}=h.actionCreators;class P extends y.AccountMultisig{constructor(H,V,J){super(H,V,J),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=J.helperUrl||this.helperUrl,this.storage=J.storage,this.sendCode=J.sendCode||this.sendCodeDefault,this.getCode=J.getCode||this.getCodeDefault,this.verifyCode=J.verifyCode||this.verifyCodeDefault,this.onConfirmResult=J.onConfirmResult}signAndSendTransaction({receiverId:H,actions:V}){const J=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){yield J.signAndSendTransaction.call(this,{receiverId:H,actions:V}),yield this.sendCode();const Y=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(Y)),Y})}deployMultisig(H){const V=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return l(this,void 0,void 0,function*(){const{accountId:J}=this,Y=(yield this.getRecoveryMethods()).data.filter(({kind:m,publicKey:w})=>("phrase"===m||"ledger"===m)&&null!==w).map(m=>m.publicKey),Z=(yield this.getAccessKeys()).filter(({public_key:m,access_key:{permission:w}})=>"FullAccess"===w&&!Y.includes(m)).map(m=>m.public_key).map(R),W=R((yield this.postSignedJson("/2fa/getAccessKey",{accountId:J})).publicKey),Q=Buffer.from(JSON.stringify({num_confirmations:2})),D=[...Z.map(m=>O(m)),...Z.map(m=>A(m,M(J,v.MULTISIG_CHANGE_METHODS,null))),A(W,M(J,v.MULTISIG_CONFIRM_METHODS,null)),C(H)],o=D.concat(N("new",Q,v.MULTISIG_GAS,v.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",J);const{stateStatus:u}=yield this.checkMultisigCodeAndStateStatus(H);switch(u){case b.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield V.signAndSendTransactionWithAccount.call(this,J,o);case b.MultisigStateStatus.VALID_STATE:return yield V.signAndSendTransactionWithAccount.call(this,J,D);case b.MultisigStateStatus.INVALID_STATE:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}})}disableWithFAK({contractBytes:H,cleanupContractBytes:V}){return l(this,void 0,void 0,function*(){let J=[];V&&(yield this.deleteAllRequests().catch(Q=>Q),J=yield this.get2faDisableCleanupActions(V));const Y=yield this.get2faDisableKeyConversionActions(),Z=[...J,...Y,C(H)],W=yield this.findAccessKey(this.accountId,Z);if(W&&W.accessKey&&"FullAccess"!==W.accessKey.permission)throw new S.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,Z)})}get2faDisableCleanupActions(H){return l(this,void 0,void 0,function*(){const V=yield this.viewState("").catch(Y=>{const Z=Y.cause&&Y.cause.name;if("NO_CONTRACT_CODE"==Z)return[];throw"TOO_LARGE_CONTRACT_STATE"==Z?new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):Y}),J=V.map(({key:Y})=>Y.toString("base64"));return V.length?[C(H),N("clean",{keys:J},v.MULTISIG_GAS,new g.default("0"))]:[]})}get2faDisableKeyConversionActions(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,J=(yield this.getAccessKeys()).filter(({access_key:Z})=>"FullAccess"!==Z.permission).filter(({access_key:Z})=>{const W=Z.permission.FunctionCall;return W.receiver_id===H&&4===W.method_names.length&&W.method_names.includes("add_request_and_confirm")}),Y=E.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:H})).publicKey);return[O(Y),...J.map(({public_key:Z})=>O(E.PublicKey.from(Z))),...J.map(({public_key:Z})=>A(E.PublicKey.from(Z),T()))]})}disable(H,V){return l(this,void 0,void 0,function*(){const{stateStatus:J}=yield this.checkMultisigCodeAndStateStatus();if(J!==b.MultisigStateStatus.VALID_STATE&&J!==b.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new S.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let Y;yield this.deleteAllRequests().catch(Q=>Y=Q);const W=[...yield this.get2faDisableCleanupActions(V).catch(Q=>{throw"ContractHasExistingState"===Q.type&&Y||Q}),...yield this.get2faDisableKeyConversionActions(),C(H)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:W})})}sendCodeDefault(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,{requestId:V}=this.getRequest(),J=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:H,method:J,requestId:V}),V})}getCodeDefault(){return l(this,void 0,void 0,function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')})}promptAndVerify(){return l(this,void 0,void 0,function*(){const H=yield this.get2faMethod(),V=yield this.getCode(H);try{return yield this.verifyCode(V)}catch(J){if(console.warn("Error validating security code:",J),J.toString().includes("invalid 2fa code provided")||J.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw J}})}verifyCodeDefault(H){return l(this,void 0,void 0,function*(){const{accountId:V}=this,J=this.getRequest();if(!J)throw new Error("no request pending");const{requestId:Y}=J;return yield this.postSignedJson("/2fa/verify",{accountId:V,securityCode:H,requestId:Y})})}getRecoveryMethods(){return l(this,void 0,void 0,function*(){const{accountId:H}=this;return{accountId:H,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:H})}})}get2faMethod(){return l(this,void 0,void 0,function*(){let{data:H}=yield this.getRecoveryMethods();if(H&&H.length&&(H=H.find(Y=>0===Y.kind.indexOf("2fa-"))),!H)return null;const{kind:V,detail:J}=H;return{kind:V,detail:J}})}signatureFor(){return l(this,void 0,void 0,function*(){const{accountId:H}=this,J=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),Y=yield this.connection.signer.signMessage(Buffer.from(J),H,this.connection.networkId);return{blockNumber:J,blockNumberSignature:Buffer.from(Y.signature).toString("base64")}})}postSignedJson(H,V){return l(this,void 0,void 0,function*(){return yield(0,a.fetchJson)(this.helperUrl+H,JSON.stringify(Object.assign(Object.assign({},V),yield this.signatureFor())))})}}r.Account2FA=P;const R=L=>E.PublicKey.from(L)},57107:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;const _=d(1739);class E{}r.AccountCreator=E;r.LocalAccountCreator=class S extends E{constructor(g,y){super(),this.masterAccount=g,this.initialBalance=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield this.masterAccount.createAccount(g,y,this.initialBalance)})}};r.UrlAccountCreator=class a extends E{constructor(g,y){super(),this.connection=g,this.helperUrl=y}createAccount(g,y){return l(this,void 0,void 0,function*(){yield(0,_.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:g,newAccountPublicKey:y.toString()}))})}}},30776:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(C,T,N,M){return new(N||(N=Promise))(function(R,L){function H(Y){try{J(M.next(Y))}catch(Z){L(Z)}}function V(Y){try{J(M.throw(Y))}catch(Z){L(Z)}}function J(Y){Y.done?R(Y.value):function P(R){return R instanceof N?R:new N(function(L){L(R)})}(Y.value).then(H,V)}J((M=M.apply(C,T||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.AccountMultisig=void 0;const _=d(30448),E=d(77118),S=d(94914),a=d(87932),{deployContract:h,functionCall:g}=_.actionCreators;var y,C;(C=y||(y={}))[C.INVALID_CODE=0]="INVALID_CODE",C[C.VALID_CODE=1]="VALID_CODE",C[C.UNKNOWN_CODE=2]="UNKNOWN_CODE";const v={[S.MULTISIG_STORAGE_KEY]:null};class b extends E.Account{constructor(T,N,M){super(T,N),this.storage=M.storage,this.onAddRequestResult=M.onAddRequestResult}signAndSendTransactionWithAccount(T,N){const M=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){return M.signAndSendTransaction.call(this,{receiverId:T,actions:N})})}signAndSendTransaction({receiverId:T,actions:N}){const M=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const{accountId:P}=this,R=Buffer.from(JSON.stringify({request:{receiver_id:T,actions:O(N,P,T)}}));let L;try{L=yield M.signAndSendTransaction.call(this,{receiverId:P,actions:[g("add_request_and_confirm",R,S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}catch(V){if(V.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:T,actions:N});throw V}if(!L.status)throw new Error("Request failed");const H=Object.assign({},L.status);if(!H.SuccessValue||"string"!=typeof H.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:P,actions:N,requestId:parseInt(Buffer.from(H.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(L)),this.deleteUnconfirmedRequests(),L})}checkMultisigCodeAndStateStatus(T){const N=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const P=T?y.UNKNOWN_CODE:y.VALID_CODE;try{return T?yield N.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[h(T),g("delete_request",{request_id:4294967295},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(4294967295),{codeStatus:y.VALID_CODE,stateStatus:a.MultisigStateStatus.VALID_STATE}}catch(R){if(new RegExp(a.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.INVALID_STATE};if(new RegExp(a.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(a.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(R&&R.kind&&R.kind.ExecutionError))return{codeStatus:P,stateStatus:a.MultisigStateStatus.VALID_STATE};if(new RegExp(a.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(R&&R.message))return{codeStatus:y.INVALID_CODE,stateStatus:a.MultisigStateStatus.UNKNOWN_STATE};throw R}})}deleteRequest(T){return super.signAndSendTransaction({receiverId:this.accountId,actions:[g("delete_request",{request_id:T},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return l(this,void 0,void 0,function*(){const T=yield this.getRequestIds();T.length&&(yield Promise.all(T.map(N=>this.deleteRequest(N))))})}deleteUnconfirmedRequests(){const T=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const N=yield this.getRequestIds(),{requestId:M}=this.getRequest();for(const P of N)if(P!=M)try{yield T.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[g("delete_request",{request_id:P},S.MULTISIG_GAS,S.MULTISIG_DEPOSIT)]})}catch{console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}})}getRequestIds(){return l(this,void 0,void 0,function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})})}getRequest(){return this.storage?JSON.parse(this.storage.getItem(S.MULTISIG_STORAGE_KEY)||"{}"):v[S.MULTISIG_STORAGE_KEY]}setRequest(T){if(this.storage)return this.storage.setItem(S.MULTISIG_STORAGE_KEY,JSON.stringify(T));v[S.MULTISIG_STORAGE_KEY]=T}}r.AccountMultisig=b;const A=C=>C.toString().replace("ed25519:",""),O=(C,T,N)=>C.map(M=>{const P=M.enum,{gas:R,publicKey:L,methodName:H,args:V,deposit:J,accessKey:Y,code:Z}=M[P],W={type:P[0].toUpperCase()+P.substr(1),gas:R&&R.toString()||void 0,public_key:L&&A(L)||void 0,method_name:H,args:V&&Buffer.from(V).toString("base64")||void 0,code:Z&&Buffer.from(Z).toString("base64")||void 0,amount:J&&J.toString()||void 0,deposit:J&&J.toString()||"0",permission:void 0};if(Y&&(N===T&&"fullAccess"!==Y.permission.enum&&(W.permission={receiver_id:T,allowance:S.MULTISIG_ALLOWANCE.toString(),method_names:S.MULTISIG_CHANGE_METHODS}),"functionCall"===Y.permission.enum)){const{receiverId:Q,methodNames:D,allowance:o}=Y.permission.functionCall;W.permission={receiver_id:Q,allowance:o&&o.toString()||void 0,method_names:D}}return W})},35999:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;const l=d(25035),_=d(1739);class a{constructor(g,y,v,b){this.networkId=g,this.provider=y,this.signer=v,this.jsvmAccountId=b}static fromConfig(g){const y=function E(h){switch(h.type){case void 0:return h;case"JsonRpcProvider":return new _.JsonRpcProvider(Object.assign({},h.args));default:throw new Error(`Unknown provider type ${h.type}`)}}(g.provider),v=function S(h){switch(h.type){case void 0:return h;case"InMemorySigner":return new l.InMemorySigner(h.keyStore);default:throw new Error(`Unknown signer type ${h.type}`)}}(g.signer);return new a(g.networkId,y,v,g.jsvmAccountId)}}r.Connection=a},94914:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(r,"__esModule",{value:!0}),r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=void 0;const _=d(41166),E=l(d(98538));r.MULTISIG_STORAGE_KEY="__multisigRequest",r.MULTISIG_ALLOWANCE=new E.default((0,_.parseNearAmount)("1")),r.MULTISIG_GAS=new E.default("100000000000000"),r.MULTISIG_DEPOSIT=new E.default("0"),r.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],r.MULTISIG_CONFIRM_METHODS=["confirm"]},43017:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(R,L,H,V){return new(H||(H=Promise))(function(Y,Z){function W(o){try{D(V.next(o))}catch(u){Z(u)}}function Q(o){try{D(V.throw(o))}catch(u){Z(u)}}function D(o){o.done?Y(o.value):function J(Y){return Y instanceof H?Y:new H(function(Z){Z(Y)})}(o.value).then(W,Q)}D((V=V.apply(R,L||[])).next())})},_=this&&this.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;const E=d(41166),S=d(17527),a=_(d(74411)),h=_(d(26474)),g=_(d(98538)),y=_(d(89176)),v=d(84778),b=d(49467);function A(R,L){return{[R]:(...H)=>L(...H)}[R]}function O(R,L,H,V){var J;if(!N(R))return;if(L.params&&L.params.serialization_type!==v.AbiSerializationType.Json)throw new b.UnsupportedSerializationError(L.name,L.params.serialization_type);if(L.result&&L.result.serialization_type!==v.AbiSerializationType.Json)throw new b.UnsupportedSerializationError(L.name,L.result.serialization_type);const Y=(null===(J=L.params)||void 0===J?void 0:J.args)||[];for(const Z of Y){const W=R[Z.name],Q=Z.type_schema;Q.definitions=V.body.root_schema.definitions;const D=H.compile(Q);if(!D(W))throw new b.ArgumentSchemaError(Z.name,D.errors)}for(const Z of Object.keys(R))if(!Y.find(Q=>Q.name===Z))throw new b.UnknownArgumentError(Z,Y.map(Q=>Q.name))}const T=R=>R&&void 0!==R.byteLength&&R.byteLength===R.length,N=R=>"[object Object]"===Object.prototype.toString.call(R);r.Contract=class M{constructor(L,H,V){this.account=L,this.contractId=H;const{viewMethods:J=[],changeMethods:Y=[],abi:Z}=V;let W=J.map(o=>({name:o,abi:null})),Q=Y.map(o=>({name:o,abi:null}));if(Z){if(W.length>0||Q.length>0)throw new b.ConflictingOptions;W=Z.body.functions.filter(o=>o.kind===v.AbiFunctionKind.View).map(o=>({name:o.name,abi:o})),Q=Z.body.functions.filter(o=>o.kind===v.AbiFunctionKind.Call).map(o=>({name:o.name,abi:o}))}const D=function C(){const R=new a.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,h.default)(R),R}();W.forEach(({name:o,abi:u})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(m={},w={},...x)=>l(this,void 0,void 0,function*(){if(x.length||!N(m)&&!T(m)||!N(w))throw new S.PositionalArgsError;return u&&O(m,u,D,Z),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:o,args:m},w))}))})}),Q.forEach(({name:o,abi:u})=>{Object.defineProperty(this,o,{writable:!1,enumerable:!0,value:A(o,(...m)=>l(this,void 0,void 0,function*(){if(m.length&&(m.length>3||!N(m[0])&&!T(m[0])))throw new S.PositionalArgsError;return(m.length>1||!(m[0]&&m[0].args))&&((0,y.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),m[0]={args:m[0],gas:m[1],amount:m[2]}),u&&O(m[0].args,u,D,Z),this._changeMethod(Object.assign({methodName:o},m[0]))}))})})}_changeMethod({args:L,methodName:H,gas:V,amount:J,meta:Y,callbackUrl:Z}){return l(this,void 0,void 0,function*(){!function P(R){const L="number, decimal string or BN";for(const H of Object.keys(R)){const V=R[H];if(V&&!g.default.isBN(V)&&isNaN(V))throw new S.ArgumentTypeError(H,L,V)}}({gas:V,amount:J});const W=yield this.account.functionCall({contractId:this.contractId,methodName:H,args:L,gas:V,attachedDeposit:J,walletMeta:Y,walletCallbackUrl:Z});return(0,E.getTransactionLastResult)(W)})}}},49467:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ConflictingOptions=r.ArgumentSchemaError=r.UnknownArgumentError=r.UnsupportedSerializationError=void 0;class d extends Error{constructor(a,h){super(`Contract method '${a}' is using an unsupported serialization type ${h}`)}}r.UnsupportedSerializationError=d;class l extends Error{constructor(a,h){super(`Unrecognized argument '${a}', expected '${JSON.stringify(h)}'`)}}r.UnknownArgumentError=l;class _ extends Error{constructor(a,h){super(`Argument '${a}' does not conform to the specified ABI schema: '${JSON.stringify(h)}'`)}}r.ArgumentSchemaError=_;class E extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}r.ConflictingOptions=E},11538:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=r.Contract=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.Connection=r.AccountMultisig=r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=r.Account2FA=r.Account=void 0;var l=d(77118);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}});var _=d(71339);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return _.Account2FA}});var E=d(57107);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return E.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return E.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return E.UrlAccountCreator}});var S=d(30776);Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return S.AccountMultisig}});var a=d(35999);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return a.Connection}});var h=d(94914);Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return h.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return h.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return h.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return h.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return h.MULTISIG_CONFIRM_METHODS}});var g=d(43017);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return g.Contract}});var y=d(49467);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return y.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return y.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return y.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return y.UnsupportedSerializationError}});var v=d(87932);Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return v.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return v.MultisigStateStatus}})},87932:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=void 0,(_=r.MultisigDeleteRequestRejectionError||(r.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",_.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",_.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",_.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",_.METHOD_NOT_FOUND="Contract method is not found",function(_){_[_.INVALID_STATE=0]="INVALID_STATE",_[_.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",_[_.VALID_STATE=2]="VALID_STATE",_[_.UNKNOWN_STATE=3]="UNKNOWN_STATE"}(r.MultisigStateStatus||(r.MultisigStateStatus={}))},36999:(ne,r)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.KeyType=void 0,(l=r.KeyType||(r.KeyType={}))[l.ED25519=0]="ED25519"},55911:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyPairEd25519=r.KeyPair=r.KeyType=void 0;var l=d(36999);Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}});var _=d(53087);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return _.KeyPair}});var E=d(46735);Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return E.KeyPairEd25519}});var S=d(73833);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return S.PublicKey}})},53087:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPair=void 0;const l=d(25387),_=d(46735);class E extends l.KeyPairBase{static fromRandom(a){if("ED25519"===a.toUpperCase())return _.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${a}`)}static fromString(a){const h=a.split(":");if(1===h.length)return new _.KeyPairEd25519(h[0]);if(2===h.length){if("ED25519"===h[0].toUpperCase())return new _.KeyPairEd25519(h[1]);throw new Error(`Unknown curve: ${h[0]}`)}throw new Error("Invalid encoded key format, must be :")}}r.KeyPair=E},25387:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairBase=void 0;r.KeyPairBase=class d{}},46735:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.KeyPairEd25519=void 0;const _=d(21531),E=l(d(40489)),S=d(36999),a=d(25387),h=d(73833);class g extends a.KeyPairBase{constructor(v){super();const b=E.default.sign.keyPair.fromSecretKey((0,_.baseDecode)(v));this.publicKey=new h.PublicKey({keyType:S.KeyType.ED25519,data:b.publicKey}),this.secretKey=v}static fromRandom(){const v=E.default.sign.keyPair();return new g((0,_.baseEncode)(v.secretKey))}sign(v){return{signature:E.default.sign.detached(v,(0,_.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(v,b){return this.publicKey.verify(v,b)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}r.KeyPairEd25519=g},73833:function(ne,r,d){"use strict";var l=this&&this.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=void 0;const _=d(17527),E=d(21531),S=l(d(40489)),a=d(36999);class y extends _.Assignable{static from(b){return"string"==typeof b?y.fromString(b):b}static fromString(b){const A=b.split(":");let O,C=a.KeyType.ED25519;if(1===A.length)O=A[0];else{if(2!==A.length)throw new Error("Invalid encoded key format, must be :");O=A[1],C=function g(v){if("ed25519"===v.toLowerCase())return a.KeyType.ED25519;throw new Error(`Unknown key type ${v}`)}(A[0])}const T=(0,E.baseDecode)(O);if(T.length!==S.default.box.publicKeyLength)throw new Error(`Invalid public key size (${T.length}), must be ${S.default.box.publicKeyLength}`);return new y({keyType:C,data:T})}toString(){return`${function h(v){if(v===a.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${v}`)}(this.keyType)}:${(0,E.baseEncode)(this.data)}`}verify(b,A){if(this.keyType===a.KeyType.ED25519)return S.default.sign.detached.verify(b,A,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}r.PublicKey=y},85051:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;const _=d(55911),E=d(90793);class a extends E.KeyStore{constructor(g=window.localStorage,y="near-api-js:keystore:"){super(),this.localStorage=g,this.prefix=y}setKey(g,y,v){return l(this,void 0,void 0,function*(){this.localStorage.setItem(this.storageKeyForSecretKey(g,y),v.toString())})}getKey(g,y){return l(this,void 0,void 0,function*(){const v=this.localStorage.getItem(this.storageKeyForSecretKey(g,y));return v?_.KeyPair.fromString(v):null})}removeKey(g,y){return l(this,void 0,void 0,function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(g,y))})}clear(){return l(this,void 0,void 0,function*(){for(const g of this.storageKeys())g.startsWith(this.prefix)&&this.localStorage.removeItem(g)})}getNetworks(){return l(this,void 0,void 0,function*(){const g=new Set;for(const y of this.storageKeys())if(y.startsWith(this.prefix)){const v=y.substring(this.prefix.length).split(":");g.add(v[1])}return Array.from(g.values())})}getAccounts(g){return l(this,void 0,void 0,function*(){const y=new Array;for(const v of this.storageKeys())if(v.startsWith(this.prefix)){const b=v.substring(this.prefix.length).split(":");b[1]===g&&y.push(b[0])}return y})}storageKeyForSecretKey(g,y){return`${this.prefix}${y}:${g}`}*storageKeys(){for(let g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(85051);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},93414:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(a,h,g,y){return new(g||(g=Promise))(function(b,A){function O(N){try{T(y.next(N))}catch(M){A(M)}}function C(N){try{T(y.throw(N))}catch(M){A(M)}}function T(N){N.done?b(N.value):function v(b){return b instanceof g?b:new g(function(A){A(b)})}(N.value).then(O,C)}T((y=y.apply(a,h||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;const _=d(55911),E=d(86614);class S extends E.KeyStore{constructor(){super(),this.keys={}}setKey(h,g,y){return l(this,void 0,void 0,function*(){this.keys[`${g}:${h}`]=y.toString()})}getKey(h,g){return l(this,void 0,void 0,function*(){const y=this.keys[`${g}:${h}`];return y?_.KeyPair.fromString(y):null})}removeKey(h,g){return l(this,void 0,void 0,function*(){delete this.keys[`${g}:${h}`]})}clear(){return l(this,void 0,void 0,function*(){this.keys={}})}getNetworks(){return l(this,void 0,void 0,function*(){const h=new Set;return Object.keys(this.keys).forEach(g=>{const y=g.split(":");h.add(y[1])}),Array.from(h.values())})}getAccounts(h){return l(this,void 0,void 0,function*(){const g=new Array;return Object.keys(this.keys).forEach(y=>{const v=y.split(":");v[v.length-1]===h&&g.push(v.slice(0,v.length-1).join(":"))}),g})}toString(){return"InMemoryKeyStore"}}r.InMemoryKeyStore=S},90793:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.KeyStore=r.InMemoryKeyStore=void 0;var l=d(93414);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}});var _=d(86614);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return _.KeyStore}});var E=d(51731);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return E.MergeKeyStore}})},86614:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;r.KeyStore=class d{}},51731:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;const _=d(86614);class E extends _.KeyStore{constructor(a,h={writeKeyStoreIndex:0}){super(),this.options=h,this.keyStores=a}setKey(a,h,g){return l(this,void 0,void 0,function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(a,h,g)})}getKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores){const y=yield g.getKey(a,h);if(y)return y}return null})}removeKey(a,h){return l(this,void 0,void 0,function*(){for(const g of this.keyStores)yield g.removeKey(a,h)})}clear(){return l(this,void 0,void 0,function*(){for(const a of this.keyStores)yield a.clear()})}getNetworks(){return l(this,void 0,void 0,function*(){const a=new Set;for(const h of this.keyStores)for(const g of yield h.getNetworks())a.add(g);return Array.from(a)})}getAccounts(a){return l(this,void 0,void 0,function*(){const h=new Set;for(const g of this.keyStores)for(const y of yield g.getAccounts(a))h.add(y);return Array.from(h)})}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}r.MergeKeyStore=E},35103:function(ne,r){"use strict";var d=this&&this.__awaiter||function(E,S,a,h){return new(a||(a=Promise))(function(y,v){function b(C){try{O(h.next(C))}catch(T){v(T)}}function A(C){try{O(h.throw(C))}catch(T){v(T)}}function O(C){C.done?y(C.value):function g(y){return y instanceof a?y:new a(function(v){v(y)})}(C.value).then(b,A)}O((h=h.apply(E,S||[])).next())})};function _(E){return new Promise(S=>setTimeout(S,E))}Object.defineProperty(r,"__esModule",{value:!0}),r.exponentialBackoff=void 0,r.exponentialBackoff=function l(E,S,a,h){return d(this,void 0,void 0,function*(){let g=E;for(let y=0;y!process.env.NEAR_NO_LOGS&&console.warn(...T);r.fetchJson=function C(T,N){return S(this,void 0,void 0,function*(){let M={url:null};"string"==typeof T?M.url=T:M=T;const P=yield(0,y.exponentialBackoff)(v,A,b,()=>S(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(d(75645)))).default);const R=yield global.fetch(M.url,{method:N?"POST":"GET",body:N||void 0,headers:Object.assign(Object.assign({},M.headers),{"Content-Type":"application/json"})});if(!R.ok){if(503===R.status)return O(`Retrying HTTP request for ${M.url} as it's not available now`),null;throw(0,g.default)(R.status,yield R.text())}return R}catch(R){if(R.toString().includes("FetchError")||R.toString().includes("Failed to fetch"))return O(`Retrying HTTP request for ${M.url} because of error: ${R}`),null;throw R}}));if(!P)throw new h.TypedError(`Exceeded ${A} attempts for ${M.url}.`,"RetriesExceeded");return yield P.json()})}},1739:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=r.Provider=r.JsonRpcProvider=r.exponentialBackoff=void 0;var l=d(35103);Object.defineProperty(r,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var _=d(44459);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}});var E=d(95326);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return E.Provider}});var S=d(243);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}})},44459:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(N,M,P,R){return new(P||(P=Promise))(function(H,V){function J(W){try{Z(R.next(W))}catch(Q){V(Q)}}function Y(W){try{Z(R.throw(W))}catch(Q){V(Q)}}function Z(W){W.done?H(W.value):function L(H){return H instanceof P?H:new P(function(V){V(H)})}(W.value).then(J,Y)}Z((R=R.apply(N,M||[])).next())})},_=this&&this.__rest||function(N,M){var P={};for(var R in N)Object.prototype.hasOwnProperty.call(N,R)&&M.indexOf(R)<0&&(P[R]=N[R]);if(null!=N&&"function"==typeof Object.getOwnPropertySymbols){var L=0;for(R=Object.getOwnPropertySymbols(N);Ll(this,void 0,void 0,function*(){try{const H={method:M,params:P,id:C++,jsonrpc:"2.0"},V=yield(0,v.fetchJson)(this.connection,JSON.stringify(H));if(V.error){if("object"==typeof V.error.data)throw"string"==typeof V.error.data.error_message&&"string"==typeof V.error.data.error_type?new S.TypedError(V.error.data.error_message,V.error.data.error_type):(0,E.parseRpcError)(V.error.data);{const J=`[${V.error.code}] ${V.error.message}: ${V.error.data}`;throw"Timeout"===V.error.data||J.includes("Timeout error")||J.includes("query has timed out")?new S.TypedError(J,"TimeoutError"):new S.TypedError(J,(0,E.getErrorTypeFromErrorMessage)(V.error.data,V.error.name))}}return V}catch(H){if("TimeoutError"===H.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${M} as it has timed out`,P),null;throw H}})),{result:L}=R;if(typeof L>"u")throw new S.TypedError(`Exceeded 12 attempts for request to ${M}.`,"RetriesExceeded");return L})}}r.JsonRpcProvider=T},95326:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Provider=void 0;r.Provider=class d{}},22972:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(y,v,b,A){return new(b||(b=Promise))(function(C,T){function N(R){try{P(A.next(R))}catch(L){T(L)}}function M(R){try{P(A.throw(R))}catch(L){T(L)}}function P(R){R.done?C(R.value):function O(C){return C instanceof b?C:new b(function(T){T(C)})}(R.value).then(N,M)}P((A=A.apply(y,v||[])).next())})},_=this&&this.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(r,"__esModule",{value:!0}),r.InMemorySigner=void 0;const E=d(55911),S=d(90793),a=_(d(1520)),h=d(83159);class g extends h.Signer{constructor(v){super(),this.keyStore=v}static fromKeyPair(v,b,A){return l(this,void 0,void 0,function*(){const O=new S.InMemoryKeyStore;return yield O.setKey(v,b,A),new g(O)})}createKey(v,b){return l(this,void 0,void 0,function*(){const A=E.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(b,v,A),A.getPublicKey()})}getPublicKey(v,b){return l(this,void 0,void 0,function*(){const A=yield this.keyStore.getKey(b,v);return null===A?null:A.getPublicKey()})}signMessage(v,b,A){return l(this,void 0,void 0,function*(){const O=new Uint8Array(a.default.sha256.array(v));if(!b)throw new Error("InMemorySigner requires provided account id");const C=yield this.keyStore.getKey(A,b);if(null===C)throw new Error(`Key for ${b} not found in ${A}`);return C.sign(O)})}toString(){return`InMemorySigner(${this.keyStore})`}}r.InMemorySigner=g},25035:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(22972);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}});var _=d(83159);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return _.Signer}})},83159:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=void 0;r.Signer=class d{}},79344:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.actionCreators=r.stringifyJsonOrBytes=void 0;const l=d(86041);function h(T){return void 0!==T.byteLength&&T.byteLength===T.length?T:Buffer.from(JSON.stringify(T))}r.stringifyJsonOrBytes=h,r.actionCreators={addKey:function b(T,N){return new l.Action({addKey:new l.AddKey({publicKey:T,accessKey:N})})},createAccount:function S(){return new l.Action({createAccount:new l.CreateAccount({})})},deleteAccount:function O(T){return new l.Action({deleteAccount:new l.DeleteAccount({beneficiaryId:T})})},deleteKey:function A(T){return new l.Action({deleteKey:new l.DeleteKey({publicKey:T})})},deployContract:function a(T){return new l.Action({deployContract:new l.DeployContract({code:T})})},fullAccessKey:function _(){return new l.AccessKey({permission:new l.AccessKeyPermission({fullAccess:new l.FullAccessPermission({})})})},functionCall:function g(T,N,M,P,R=h,L=!1){return L?new l.Action({functionCall:new l.FunctionCall({methodName:T,args:N,gas:M,deposit:P})}):new l.Action({functionCall:new l.FunctionCall({methodName:T,args:R(N),gas:M,deposit:P})})},functionCallAccessKey:function E(T,N,M){return new l.AccessKey({permission:new l.AccessKeyPermission({functionCall:new l.FunctionCallPermission({receiverId:T,allowance:M,methodNames:N})})})},signedDelegate:function C({delegateAction:T,signature:N}){return new l.Action({signedDelegate:new l.SignedDelegate({delegateAction:T,signature:N})})},stake:function v(T,N){return new l.Action({stake:new l.Stake({stake:T,publicKey:N})})},transfer:function y(T){return new l.Action({transfer:new l.Transfer({deposit:T})})}}},86041:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Action=r.SignedDelegate=r.DeleteAccount=r.DeleteKey=r.AddKey=r.Stake=r.Transfer=r.FunctionCall=r.DeployContract=r.CreateAccount=r.IAction=r.AccessKey=r.AccessKeyPermission=r.FullAccessPermission=r.FunctionCallPermission=void 0;const l=d(17527);class _{constructor(L){if(1!==Object.keys(L).length)throw new Error("Enum can only take single value");Object.keys(L).map(H=>{this[H]=L[H],this.enum=H})}}class E extends l.Assignable{}r.FunctionCallPermission=E;class S extends l.Assignable{}r.FullAccessPermission=S;r.AccessKeyPermission=class a extends _{};class h extends l.Assignable{}r.AccessKey=h;class g extends l.Assignable{}r.IAction=g;r.CreateAccount=class y extends g{};r.DeployContract=class v extends g{};r.FunctionCall=class b extends g{};r.Transfer=class A extends g{};r.Stake=class O extends g{};r.AddKey=class C extends g{};r.DeleteKey=class T extends g{};r.DeleteAccount=class N extends g{};r.SignedDelegate=class M extends g{};r.Action=class P extends _{}},11889:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createTransaction=void 0;const l=d(53699);r.createTransaction=function _(E,S,a,h,g,y){return new l.Transaction({signerId:E,publicKey:S,nonce:h,receiverId:a,actions:g,blockHash:y})}},34169:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.buildDelegateAction=r.DelegateAction=void 0;const l=d(17527),_=d(79344),{addKey:E,createAccount:S,deleteAccount:a,deleteKey:h,deployContract:g,functionCall:y,stake:v,transfer:b}=_.actionCreators;class A extends l.Assignable{}r.DelegateAction=A,r.buildDelegateAction=function O({actions:C,maxBlockHeight:T,nonce:N,publicKey:M,receiverId:P,senderId:R}){return new A({senderId:R,receiverId:P,actions:C.map(L=>{if(!L.type&&!L.params)return L;switch(L.type){case"AddKey":{const{publicKey:H,accessKey:V}=L.params;return E(H,V)}case"CreateAccount":return S(L.params.createAccount);case"DeleteAccount":return a(L.params.deleteAccount);case"DeleteKey":return h(L.params.publicKey);case"DeployContract":return g(L.params.code);case"FunctionCall":{const{methodName:H,args:V,gas:J,deposit:Y}=L.params;return y(H,V,J,Y)}case"Stake":return v(L.params.stake,L.params.publicKey);case"Transfer":{const{deposit:H}=L.params;return b(H)}}throw new Error("Unrecognized action")}),nonce:N,maxBlockHeight:T,publicKey:M})}},30448:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(E,S,a,h){void 0===h&&(h=a);var g=Object.getOwnPropertyDescriptor(S,a);(!g||("get"in g?!S.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return S[a]}}),Object.defineProperty(E,h,g)}:function(E,S,a,h){void 0===h&&(h=a),E[h]=S[a]}),_=this&&this.__exportStar||function(E,S){for(var a in E)"default"!==a&&!Object.prototype.hasOwnProperty.call(S,a)&&l(S,E,a)};Object.defineProperty(r,"__esModule",{value:!0}),_(d(79344),r),_(d(86041),r),_(d(11889),r),_(d(34169),r),_(d(53699),r),_(d(33033),r),_(d(13904),r)},37665:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DelegateActionPrefix=void 0;const l=d(17527),_=Math.pow(2,30),E_MetaTransactions=366;class S extends l.Assignable{}class a extends S{constructor(y){super({prefix:_+y})}}r.DelegateActionPrefix=class h extends a{constructor(){super(E_MetaTransactions)}}},53699:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SCHEMA=r.SignedTransaction=r.Transaction=r.decodeSignedTransaction=r.decodeTransaction=r.encodeTransaction=r.encodeSignedDelegate=r.encodeDelegateAction=void 0;const l=d(55911),_=d(17527),E=d(21531),S=d(86041),a=d(34169),h=d(37665),g=d(13904);function b(N){return(0,E.serialize)(r.SCHEMA,N)}function A(N){return(0,E.deserialize)(r.SCHEMA,C,N)}function O(N){return(0,E.deserialize)(r.SCHEMA,T,N)}r.encodeDelegateAction=function y(N){return new Uint8Array([...(0,E.serialize)(r.SCHEMA,new h.DelegateActionPrefix),...(0,E.serialize)(r.SCHEMA,N)])},r.encodeSignedDelegate=function v(N){return(0,E.serialize)(r.SCHEMA,N)},r.encodeTransaction=b,r.decodeTransaction=A,r.decodeSignedTransaction=O;class C extends _.Assignable{encode(){return b(this)}static decode(M){return A(M)}}r.Transaction=C;class T extends _.Assignable{encode(){return b(this)}static decode(M){return O(M)}}r.SignedTransaction=T,r.SCHEMA=new Map([[g.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[T,{kind:"struct",fields:[["transaction",C],["signature",g.Signature]]}],[C,{kind:"struct",fields:[["signerId","string"],["publicKey",l.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[S.Action]]]}],[l.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[S.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",S.AccessKeyPermission]]}],[S.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",S.FunctionCallPermission],["fullAccess",S.FullAccessPermission]]}],[S.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[S.FullAccessPermission,{kind:"struct",fields:[]}],[S.Action,{kind:"enum",field:"enum",values:[["createAccount",S.CreateAccount],["deployContract",S.DeployContract],["functionCall",S.FunctionCall],["transfer",S.Transfer],["stake",S.Stake],["addKey",S.AddKey],["deleteKey",S.DeleteKey],["deleteAccount",S.DeleteAccount],["signedDelegate",S.SignedDelegate]]}],[S.CreateAccount,{kind:"struct",fields:[]}],[S.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[S.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[S.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[S.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",l.PublicKey]]}],[S.AddKey,{kind:"struct",fields:[["publicKey",l.PublicKey],["accessKey",S.AccessKey]]}],[S.DeleteKey,{kind:"struct",fields:[["publicKey",l.PublicKey]]}],[S.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[a.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[S.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",l.PublicKey]]}],[h.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[S.SignedDelegate,{kind:"struct",fields:[["delegateAction",a.DelegateAction],["signature",g.Signature]]}]])},33033:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(A,O,C,T){return new(C||(C=Promise))(function(M,P){function R(V){try{H(T.next(V))}catch(J){P(J)}}function L(V){try{H(T.throw(V))}catch(J){P(J)}}function H(V){V.done?M(V.value):function N(M){return M instanceof C?M:new C(function(P){P(M)})}(V.value).then(R,L)}H((T=T.apply(A,O||[])).next())})},_=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0}),r.signDelegateAction=r.signTransaction=void 0;const E=_(d(1520)),S=d(86041),a=d(11889),h=d(53699),g=d(13904);function y(A,O,C,T){return l(this,void 0,void 0,function*(){const N=(0,h.encodeTransaction)(A),M=new Uint8Array(E.default.sha256.array(N)),P=yield O.signMessage(N,C,T);return[M,new h.SignedTransaction({transaction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:P.signature})})]})}r.signTransaction=function v(...A){return l(this,void 0,void 0,function*(){if(A[0].constructor===h.Transaction){const[O,C,T,N]=A;return y(O,C,T,N)}{const[O,C,T,N,M,P,R]=A,L=yield M.getPublicKey(P,R);return y((0,a.createTransaction)(P,L,O,C,T,N),M,P,R)}})},r.signDelegateAction=function b({delegateAction:A,signer:O}){return l(this,void 0,void 0,function*(){const C=(0,h.encodeDelegateAction)(A),T=yield O.sign(C),N=new S.SignedDelegate({delegateAction:A,signature:new g.Signature({keyType:A.publicKey.keyType,data:T})});return{hash:new Uint8Array(E.default.sha256.array(C)),signedDelegateAction:N}})}},13904:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signature=void 0;const l=d(17527);class _ extends l.Assignable{}r.Signature=_},52596:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=void 0;var l=d(56557);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}});var _=d(55193);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return _.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return _.WalletConnection}})},56557:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(h,g,y,v){return new(y||(y=Promise))(function(A,O){function C(M){try{N(v.next(M))}catch(P){O(P)}}function T(M){try{N(v.throw(M))}catch(P){O(P)}}function N(M){M.done?A(M.value):function b(A){return A instanceof y?A:new y(function(O){O(A)})}(M.value).then(C,T)}N((v=v.apply(h,g||[])).next())})},_=this&&this.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;const E=d(11538),S=_(d(98538));r.Near=class a{constructor(g){var y;if(this.config=g,this.connection=E.Connection.fromConfig({networkId:g.networkId,provider:{type:"JsonRpcProvider",args:{url:g.nodeUrl,headers:g.headers}},signer:g.signer||{type:"InMemorySigner",keyStore:g.keyStore||(null===(y=g.deps)||void 0===y?void 0:y.keyStore)},jsvmAccountId:g.jsvmAccountId||`jsvm.${g.networkId}`}),g.masterAccount){const v=g.initialBalance?new S.default(g.initialBalance):new S.default("500000000000000000000000000");this.accountCreator=new E.LocalAccountCreator(new E.Account(this.connection,g.masterAccount),v)}else g.helperUrl?this.accountCreator=new E.UrlAccountCreator(this.connection,g.helperUrl):this.accountCreator=null}account(g){return l(this,void 0,void 0,function*(){return new E.Account(this.connection,g)})}createAccount(g,y){return l(this,void 0,void 0,function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(g,y),new E.Account(this.connection,g)})}}},55193:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(T,N,M,P){return new(M||(M=Promise))(function(L,H){function V(Z){try{Y(P.next(Z))}catch(W){H(W)}}function J(Z){try{Y(P.throw(Z))}catch(W){H(W)}}function Y(Z){Z.done?L(Z.value):function R(L){return L instanceof M?L:new M(function(H){H(L)})}(Z.value).then(V,J)}Y((P=P.apply(T,N||[])).next())})},_=this&&this.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectedWalletAccount=r.WalletConnection=void 0;const E=d(11538),S=d(55911),a=d(30448),h=_(d(98538)),g=d(21531),A="pending_key";r.WalletConnection=class O{constructor(N,M){if("string"!=typeof M)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if(typeof window>"u")return new Proxy(this,{get:(L,H)=>"isSignedIn"===H?()=>!1:"getAccountId"===H?()=>"":L[H]&&"function"==typeof L[H]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:L[H]});this._near=N;const P=M+"_wallet_auth_key",R=JSON.parse(window.localStorage.getItem(P));this._networkId=N.config.networkId,this._walletBaseUrl=N.config.walletUrl,M=M||N.config.contractName||"default",this._keyStore=N.connection.signer.keyStore,this._authData=R||{allKeys:[]},this._authDataKey=P,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return l(this,void 0,void 0,function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()})}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:N,methodNames:M,successUrl:P,failureUrl:R}){return l(this,void 0,void 0,function*(){const L=new URL(window.location.href),H=new URL(this._walletBaseUrl+"/login/");if(H.searchParams.set("success_url",P||L.href),H.searchParams.set("failure_url",R||L.href),N){yield(yield this._near.account(N)).state(),H.searchParams.set("contract_id",N);const J=S.KeyPair.fromRandom("ed25519");H.searchParams.set("public_key",J.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,A+J.getPublicKey(),J)}M&&M.forEach(V=>{H.searchParams.append("methodNames",V)}),window.location.assign(H.toString())})}requestSignTransactions({transactions:N,meta:M,callbackUrl:P}){return l(this,void 0,void 0,function*(){const R=new URL(window.location.href),L=new URL("sign",this._walletBaseUrl);L.searchParams.set("transactions",N.map(H=>(0,g.serialize)(a.SCHEMA,H)).map(H=>Buffer.from(H).toString("base64")).join(",")),L.searchParams.set("callbackUrl",P||R.href),M&&L.searchParams.set("meta",M),window.location.assign(L.toString())})}_completeSignInWithAccessKey(){return l(this,void 0,void 0,function*(){const N=new URL(window.location.href),M=N.searchParams.get("public_key")||"",P=(N.searchParams.get("all_keys")||"").split(","),R=N.searchParams.get("account_id")||"";if(R){const L={accountId:R,allKeys:P};window.localStorage.setItem(this._authDataKey,JSON.stringify(L)),M&&(yield this._moveKeyFromTempToPermanent(R,M)),this._authData=L}N.searchParams.delete("public_key"),N.searchParams.delete("all_keys"),N.searchParams.delete("account_id"),N.searchParams.delete("meta"),N.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,N.toString())})}_moveKeyFromTempToPermanent(N,M){return l(this,void 0,void 0,function*(){const P=yield this._keyStore.getKey(this._networkId,A+M);yield this._keyStore.setKey(this._networkId,N,P),yield this._keyStore.removeKey(this._networkId,A+M)})}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new C(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class C extends E.Account{constructor(N,M,P){super(M,P),this.walletConnection=N}signAndSendTransaction({receiverId:N,actions:M,walletMeta:P,walletCallbackUrl:R=window.location.href}){const L=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return l(this,void 0,void 0,function*(){const H=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let V=yield this.accessKeyForTransaction(N,M,H);if(!V)throw new Error(`Cannot find matching key for transaction sent to ${N}`);if(H&&H.toString()===V.public_key)try{return yield L.signAndSendTransaction.call(this,{receiverId:N,actions:M})}catch(D){if("NotEnoughAllowance"!==D.type)throw D;V=yield this.accessKeyForTransaction(N,M)}const J=yield this.connection.provider.block({finality:"final"}),Y=(0,g.baseDecode)(J.header.hash),Z=S.PublicKey.from(V.public_key),W=V.access_key.nonce.add(new h.default(1)),Q=(0,a.createTransaction)(this.accountId,Z,N,W,M,Y);return yield this.walletConnection.requestSignTransactions({transactions:[Q],meta:P,callbackUrl:R}),new Promise((D,o)=>{setTimeout(()=>{o(new Error("Failed to redirect to sign transaction"))},1e3)})})}accessKeyMatchesTransaction(N,M,P){return l(this,void 0,void 0,function*(){const{access_key:{permission:R}}=N;if("FullAccess"===R)return!0;if(R.FunctionCall){const{receiver_id:L,method_names:H}=R.FunctionCall;if(L===this.accountId&&H.includes("add_request_and_confirm"))return!0;if(L===M){if(1!==P.length)return!1;const[{functionCall:V}]=P;return V&&(!V.deposit||"0"===V.deposit.toString())&&(0===H.length||H.includes(V.methodName))}}return!1})}accessKeyForTransaction(N,M,P){return l(this,void 0,void 0,function*(){const R=yield this.getAccessKeys();if(P){const H=R.find(V=>V.public_key.toString()===P.toString());if(H&&(yield this.accessKeyMatchesTransaction(H,N,M)))return H}const L=this.walletConnection._authData.allKeys;for(const H of R)if(-1!==L.indexOf(H.public_key)&&(yield this.accessKeyMatchesTransaction(H,N,M)))return H;return null})}}r.ConnectedWalletAccount=C},52602:(ne,r,d)=>{"use strict";var l=d(9028)("http-errors"),_=d(1106),E=d(31831),S=d(83894),a=d(77721);function h(N){return Number(String(N).charAt(0)+"00")}function O(N,M){var P=Object.getOwnPropertyDescriptor(N,"name");P&&P.configurable&&(P.value=M,Object.defineProperty(N,"name",P))}function T(N){return"Error"!==N.substr(-5)?N+"Error":N}ne.exports=function g(){for(var N,M,P=500,R={},L=0;L=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof P||!E[P]&&(P<400||P>=600))&&(P=500);var V=g[P]||g[h(P)];for(var J in N||(N=V?new V(M):new Error(M||E[P]),Error.captureStackTrace(N,g)),(!V||!(N instanceof V)||N.status!==P)&&(N.expose=P<500,N.status=N.statusCode=P),R)"status"!==J&&"statusCode"!==J&&(N[J]=R[J]);return N},ne.exports.HttpError=function y(){function N(){throw new TypeError("cannot construct abstract class")}return S(N,Error),N}(),ne.exports.isHttpError=function b(N){return function(P){return!(!P||"object"!=typeof P)&&(P instanceof N||P instanceof Error&&"boolean"==typeof P.expose&&"number"==typeof P.statusCode&&P.status===P.statusCode)}}(ne.exports.HttpError),function C(N,M,P){M.forEach(function(L){var H,V=a(E[L]);switch(h(L)){case 400:H=function v(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!0,L}(P,V,L);break;case 500:H=function A(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!1,L}(P,V,L)}H&&(N[L]=H,N[V]=H)}),N["I'mateapot"]=l.function(N.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,E.codes,ne.exports.HttpError)},9028:ne=>{"use strict";function d(_,E){if("function"!=typeof _)throw new TypeError("argument fn must be a function");return _}function l(_,E,S){if(!_||"object"!=typeof _&&"function"!=typeof _)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(_,E);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}ne.exports=function r(_){if(!_)throw new TypeError("argument namespace is required");function E(S){}return E._file=void 0,E._ignored=!0,E._namespace=_,E._traced=!1,E._warned=Object.create(null),E.function=d,E.property=l,E}},60144:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;var l=d(11538);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}})},30115:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;var l=d(11538);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},32164:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.AccountMultisig=r.Account2FA=void 0;var l=d(11538);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},76207:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.connect=void 0;const _=d(33906);r.connect=function E(S){return l(this,void 0,void 0,function*(){return new _.Near(S)})}},8597:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(a,h,g,y){void 0===y&&(y=g);var v=Object.getOwnPropertyDescriptor(h,g);(!v||("get"in v?!h.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return h[g]}}),Object.defineProperty(a,y,v)}:function(a,h,g,y){void 0===y&&(y=g),a[y]=h[g]}),_=this&&this.__setModuleDefault||(Object.create?function(a,h){Object.defineProperty(a,"default",{enumerable:!0,value:h})}:function(a,h){a.default=h}),E=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var h={};if(null!=a)for(var g in a)"default"!==g&&Object.prototype.hasOwnProperty.call(a,g)&&l(h,a,g);return _(h,a),h},S=this&&this.__exportStar||function(a,h){for(var g in a)"default"!==g&&!Object.prototype.hasOwnProperty.call(h,g)&&l(h,a,g)};Object.defineProperty(r,"__esModule",{value:!0}),r.keyStores=void 0,r.keyStores=E(d(46015)),S(d(29424),r),S(d(76207),r),d(4073)},29424:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(P,R,L,H){void 0===H&&(H=L);var V=Object.getOwnPropertyDescriptor(R,L);(!V||("get"in V?!R.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return R[L]}}),Object.defineProperty(P,H,V)}:function(P,R,L,H){void 0===H&&(H=L),P[H]=R[L]}),_=this&&this.__setModuleDefault||(Object.create?function(P,R){Object.defineProperty(P,"default",{enumerable:!0,value:R})}:function(P,R){P.default=R}),E=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var R={};if(null!=P)for(var L in P)"default"!==L&&Object.prototype.hasOwnProperty.call(P,L)&&l(R,P,L);return _(R,P),R};Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=r.KeyPair=r.Signer=r.InMemorySigner=r.Contract=r.Connection=r.Account=r.multisig=r.validators=r.transactions=r.utils=r.providers=r.accountCreator=void 0;const S=E(d(87974));r.providers=S;const a=E(d(75141));r.utils=a;const h=E(d(41468));r.transactions=h;const g=E(d(90744));r.validators=g;const y=d(60144);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return y.Account}});const v=E(d(32164));r.multisig=v;const b=E(d(30115));r.accountCreator=b;const A=d(60177);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return A.Connection}});const O=d(96519);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return O.Signer}}),Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return O.InMemorySigner}});const C=d(20866);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return C.Contract}});const T=d(93633);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const N=d(33906);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return N.Near}});const M=d(85091);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},60177:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;var l=d(11538);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return l.Connection}})},20866:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;var l=d(11538);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return l.Contract}})},46015:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.BrowserLocalStorageKeyStore=r.InMemoryKeyStore=r.KeyStore=void 0;const l=d(60987);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const _=d(21473);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return _.InMemoryKeyStore}});const E=d(94974);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const S=d(26523);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return S.MergeKeyStore}})},94974:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(82540);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},21473:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;var l=d(90793);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},60987:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;var l=d(90793);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},26523:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;var l=d(90793);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},33906:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;var l=d(52596);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}})},87974:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorContext=r.TypedError=r.getTransactionLastResult=r.FinalExecutionStatusBasic=r.JsonRpcProvider=r.Provider=void 0;const l=d(71308);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const _=d(21355);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}})},21355:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcProvider=r.TypedError=r.ErrorContext=void 0;var l=d(17527);Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var _=d(1739);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}})},71308:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FinalExecutionStatusBasic=r.ExecutionStatusBasic=r.IdType=r.Provider=r.getTransactionLastResult=void 0;var l=d(41166);Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var _=d(1739);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return _.Provider}});var E=d(17527);Object.defineProperty(r,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(r,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},96519:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(25035);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return l.Signer}})},41468:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.transfer=r.stake=r.functionCallAccessKey=r.functionCall=r.fullAccessKey=r.deployContract=r.deleteKey=r.deleteAccount=r.createAccount=r.addKey=r.encodeDelegateAction=r.encodeSignedDelegate=r.Transaction=r.SignedTransaction=r.Signature=r.signTransaction=r.createTransaction=r.SCHEMA=r.Transfer=r.Stake=r.FunctionCallPermission=r.FunctionCall=r.FullAccessPermission=r.DeployContract=r.DeleteKey=r.DeleteAccount=r.CreateAccount=r.AddKey=r.AccessKeyPermission=r.AccessKey=r.Action=r.stringifyJsonOrBytes=void 0;var l=d(30448);Object.defineProperty(r,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(r,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(r,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(r,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(r,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(r,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(r,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(r,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(r,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(r,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(r,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(r,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(r,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(r,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(r,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(r,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(r,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(r,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(r,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(r,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(r,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(r,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const _=d(30448);r.addKey=(C,T)=>_.actionCreators.addKey(C,T);r.createAccount=()=>_.actionCreators.createAccount();r.deleteAccount=C=>_.actionCreators.deleteAccount(C);r.deleteKey=C=>_.actionCreators.deleteKey(C);r.deployContract=C=>_.actionCreators.deployContract(C);r.fullAccessKey=()=>_.actionCreators.fullAccessKey();r.functionCall=(C,T,N,M,P,R)=>_.actionCreators.functionCall(C,T,N,M,P,R);r.functionCallAccessKey=(C,T,N)=>_.actionCreators.functionCallAccessKey(C,T,N);r.stake=(C,T)=>_.actionCreators.stake(C,T);r.transfer=C=>_.actionCreators.transfer(C)},64179:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Enum=r.Assignable=void 0;var l=d(17527);Object.defineProperty(r,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});r.Enum=class _{constructor(S){if(1!==Object.keys(S).length)throw new Error("Enum can only take single value");Object.keys(S).map(a=>{this[a]=S[a],this.enum=a})}}},342:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=r.TypedError=r.PositionalArgsError=r.ErrorContext=r.ArgumentTypeError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=void 0;var l=d(11538);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var _=d(17527);Object.defineProperty(r,"ArgumentTypeError",{enumerable:!0,get:function(){return _.ArgumentTypeError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}}),Object.defineProperty(r,"PositionalArgsError",{enumerable:!0,get:function(){return _.PositionalArgsError}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}});var E=d(41166);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},76185:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION_EXP=r.NEAR_NOMINATION=void 0;var l=d(41166);Object.defineProperty(r,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(r,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(r,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(r,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},75141:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(O,C,T,N){void 0===N&&(N=T);var M=Object.getOwnPropertyDescriptor(C,T);(!M||("get"in M?!C.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return C[T]}}),Object.defineProperty(O,N,M)}:function(O,C,T,N){void 0===N&&(N=T),O[N]=C[T]}),_=this&&this.__setModuleDefault||(Object.create?function(O,C){Object.defineProperty(O,"default",{enumerable:!0,value:C})}:function(O,C){O.default=C}),E=this&&this.__importStar||function(O){if(O&&O.__esModule)return O;var C={};if(null!=O)for(var T in O)"default"!==T&&Object.prototype.hasOwnProperty.call(O,T)&&l(C,O,T);return _(C,O),C};Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=r.rpc_errors=r.KeyPairEd25519=r.KeyPair=r.PublicKey=r.format=r.enums=r.web=r.serialize=r.key_pair=void 0;const S=E(d(93633));r.key_pair=S;const a=E(d(55822));r.serialize=a;const h=E(d(63770));r.web=h;const g=E(d(64179));r.enums=g;const y=E(d(76185));r.format=y;const v=E(d(1158));r.rpc_errors=v;const b=d(93633);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return b.PublicKey}}),Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return b.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return b.KeyPairEd25519}});const A=d(342);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},93633:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyType=r.KeyPairEd25519=r.KeyPair=void 0;var l=d(55911);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},1158:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ServerError=r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=void 0;var l=d(41166);Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},55822:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BinaryReader=r.BinaryWriter=r.BorshError=r.deserialize=r.serialize=r.base_decode=r.base_encode=void 0;var l=d(21531);Object.defineProperty(r,"base_encode",{enumerable:!0,get:function(){return l.baseEncode}}),Object.defineProperty(r,"base_decode",{enumerable:!0,get:function(){return l.baseDecode}}),Object.defineProperty(r,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(r,"deserialize",{enumerable:!0,get:function(){return l.deserialize}}),Object.defineProperty(r,"BorshError",{enumerable:!0,get:function(){return l.BorshError}}),Object.defineProperty(r,"BinaryWriter",{enumerable:!0,get:function(){return l.BinaryWriter}}),Object.defineProperty(r,"BinaryReader",{enumerable:!0,get:function(){return l.BinaryReader}})},63770:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=void 0;var l=d(1739);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},90744:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findSeatPrice=r.diffEpochValidators=void 0;var l=d(41166);Object.defineProperty(r,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(r,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},85091:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=void 0;var l=d(52596);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},31831:(ne,r,d)=>{"use strict";var l=d(31008);function E(S){if("number"==typeof S){if(!E[S])throw new Error("invalid status code: "+S);return S}if("string"!=typeof S)throw new TypeError("code must be a number or string");var a=parseInt(S,10);if(!isNaN(a)){if(!E[a])throw new Error("invalid status code: "+a);return a}if(!(a=E[S.toLowerCase()]))throw new Error('invalid status message: "'+S+'"');return a}ne.exports=E,E.STATUS_CODES=l,E.codes=function _(S,a){var h=[];return Object.keys(a).forEach(function(y){var v=a[y],b=Number(y);S[b]=v,S[v]=b,S[v.toLowerCase()]=b,h.push(b)}),h}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},54502:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(8046);function h(x,F,G){return void 0===F&&(F=new Uint8Array(2)),void 0===G&&(G=0),F[G+0]=x>>>8,F[G+1]=x>>>0,F}function g(x,F,G){return void 0===F&&(F=new Uint8Array(2)),void 0===G&&(G=0),F[G+0]=x>>>0,F[G+1]=x>>>8,F}function y(x,F){return void 0===F&&(F=0),x[F]<<24|x[F+1]<<16|x[F+2]<<8|x[F+3]}function v(x,F){return void 0===F&&(F=0),(x[F]<<24|x[F+1]<<16|x[F+2]<<8|x[F+3])>>>0}function b(x,F){return void 0===F&&(F=0),x[F+3]<<24|x[F+2]<<16|x[F+1]<<8|x[F]}function A(x,F){return void 0===F&&(F=0),(x[F+3]<<24|x[F+2]<<16|x[F+1]<<8|x[F])>>>0}function O(x,F,G){return void 0===F&&(F=new Uint8Array(4)),void 0===G&&(G=0),F[G+0]=x>>>24,F[G+1]=x>>>16,F[G+2]=x>>>8,F[G+3]=x>>>0,F}function C(x,F,G){return void 0===F&&(F=new Uint8Array(4)),void 0===G&&(G=0),F[G+0]=x>>>0,F[G+1]=x>>>8,F[G+2]=x>>>16,F[G+3]=x>>>24,F}function R(x,F,G){return void 0===F&&(F=new Uint8Array(8)),void 0===G&&(G=0),O(x/4294967296>>>0,F,G),O(x>>>0,F,G+4),F}function L(x,F,G){return void 0===F&&(F=new Uint8Array(8)),void 0===G&&(G=0),C(x>>>0,F,G),C(x/4294967296>>>0,F,G+4),F}r.readInt16BE=function _(x,F){return void 0===F&&(F=0),(x[F+0]<<8|x[F+1])<<16>>16},r.readUint16BE=function E(x,F){return void 0===F&&(F=0),(x[F+0]<<8|x[F+1])>>>0},r.readInt16LE=function S(x,F){return void 0===F&&(F=0),(x[F+1]<<8|x[F])<<16>>16},r.readUint16LE=function a(x,F){return void 0===F&&(F=0),(x[F+1]<<8|x[F])>>>0},r.writeUint16BE=h,r.writeInt16BE=h,r.writeUint16LE=g,r.writeInt16LE=g,r.readInt32BE=y,r.readUint32BE=v,r.readInt32LE=b,r.readUint32LE=A,r.writeUint32BE=O,r.writeInt32BE=O,r.writeUint32LE=C,r.writeInt32LE=C,r.readInt64BE=function T(x,F){void 0===F&&(F=0);var G=y(x,F),k=y(x,F+4);return 4294967296*G+k-4294967296*(k>>31)},r.readUint64BE=function N(x,F){return void 0===F&&(F=0),4294967296*v(x,F)+v(x,F+4)},r.readInt64LE=function M(x,F){void 0===F&&(F=0);var G=b(x,F);return 4294967296*b(x,F+4)+G-4294967296*(G>>31)},r.readUint64LE=function P(x,F){void 0===F&&(F=0);var G=A(x,F);return 4294967296*A(x,F+4)+G},r.writeUint64BE=R,r.writeInt64BE=R,r.writeUint64LE=L,r.writeInt64LE=L,r.readUintBE=function H(x,F,G){if(void 0===G&&(G=0),x%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(x/8>F.length-G)throw new Error("readUintBE: array is too short for the given bitLength");for(var k=0,p=1,B=x/8+G-1;B>=G;B--)k+=F[B]*p,p*=256;return k},r.readUintLE=function V(x,F,G){if(void 0===G&&(G=0),x%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(x/8>F.length-G)throw new Error("readUintLE: array is too short for the given bitLength");for(var k=0,p=1,B=G;B=k;B--)G[B]=F/p&255,p*=256;return G},r.writeUintLE=function Y(x,F,G,k){if(void 0===G&&(G=new Uint8Array(x/8)),void 0===k&&(k=0),x%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!l.isSafeInteger(F))throw new Error("writeUintLE value must be an integer");for(var p=1,B=k;B{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(54502),_=d(69815),E=20;function S(y,v,b){for(var A=1634760805,O=857760878,C=2036477234,T=1797285236,N=b[3]<<24|b[2]<<16|b[1]<<8|b[0],M=b[7]<<24|b[6]<<16|b[5]<<8|b[4],P=b[11]<<24|b[10]<<16|b[9]<<8|b[8],R=b[15]<<24|b[14]<<16|b[13]<<8|b[12],L=b[19]<<24|b[18]<<16|b[17]<<8|b[16],H=b[23]<<24|b[22]<<16|b[21]<<8|b[20],V=b[27]<<24|b[26]<<16|b[25]<<8|b[24],J=b[31]<<24|b[30]<<16|b[29]<<8|b[28],Y=v[3]<<24|v[2]<<16|v[1]<<8|v[0],Z=v[7]<<24|v[6]<<16|v[5]<<8|v[4],W=v[11]<<24|v[10]<<16|v[9]<<8|v[8],Q=v[15]<<24|v[14]<<16|v[13]<<8|v[12],D=A,o=O,u=C,m=T,w=N,x=M,F=P,G=R,k=L,p=H,B=V,ie=J,te=Y,ee=Z,ue=W,we=Q,me=0;me>>16|te<<16)|0)>>>20|w<<12,x=(x^=p=p+(ee=(ee^=o=o+x|0)>>>16|ee<<16)|0)>>>20|x<<12,F=(F^=B=B+(ue=(ue^=u=u+F|0)>>>16|ue<<16)|0)>>>20|F<<12,G=(G^=ie=ie+(we=(we^=m=m+G|0)>>>16|we<<16)|0)>>>20|G<<12,F=(F^=B=B+(ue=(ue^=u=u+F|0)>>>24|ue<<8)|0)>>>25|F<<7,G=(G^=ie=ie+(we=(we^=m=m+G|0)>>>24|we<<8)|0)>>>25|G<<7,x=(x^=p=p+(ee=(ee^=o=o+x|0)>>>24|ee<<8)|0)>>>25|x<<7,w=(w^=k=k+(te=(te^=D=D+w|0)>>>24|te<<8)|0)>>>25|w<<7,x=(x^=B=B+(we=(we^=D=D+x|0)>>>16|we<<16)|0)>>>20|x<<12,F=(F^=ie=ie+(te=(te^=o=o+F|0)>>>16|te<<16)|0)>>>20|F<<12,G=(G^=k=k+(ee=(ee^=u=u+G|0)>>>16|ee<<16)|0)>>>20|G<<12,w=(w^=p=p+(ue=(ue^=m=m+w|0)>>>16|ue<<16)|0)>>>20|w<<12,G=(G^=k=k+(ee=(ee^=u=u+G|0)>>>24|ee<<8)|0)>>>25|G<<7,w=(w^=p=p+(ue=(ue^=m=m+w|0)>>>24|ue<<8)|0)>>>25|w<<7,F=(F^=ie=ie+(te=(te^=o=o+F|0)>>>24|te<<8)|0)>>>25|F<<7,x=(x^=B=B+(we=(we^=D=D+x|0)>>>24|we<<8)|0)>>>25|x<<7;l.writeUint32LE(D+A|0,y,0),l.writeUint32LE(o+O|0,y,4),l.writeUint32LE(u+C|0,y,8),l.writeUint32LE(m+T|0,y,12),l.writeUint32LE(w+N|0,y,16),l.writeUint32LE(x+M|0,y,20),l.writeUint32LE(F+P|0,y,24),l.writeUint32LE(G+R|0,y,28),l.writeUint32LE(k+L|0,y,32),l.writeUint32LE(p+H|0,y,36),l.writeUint32LE(B+V|0,y,40),l.writeUint32LE(ie+J|0,y,44),l.writeUint32LE(te+Y|0,y,48),l.writeUint32LE(ee+Z|0,y,52),l.writeUint32LE(ue+W|0,y,56),l.writeUint32LE(we+Q|0,y,60)}function a(y,v,b,A,O){if(void 0===O&&(O=0),32!==y.length)throw new Error("ChaCha: key size must be 32 bytes");if(A.length>>=8,v++;if(A>0)throw new Error("ChaCha: counter overflow")}r.streamXOR=a,r.stream=function h(y,v,b,A){return void 0===A&&(A=0),_.wipe(b),a(y,v,b,b,A)}},95876:(ne,r,d)=>{"use strict";var _=d(4484),E=d(60314),S=d(69815),a=d(54502),h=d(19976);r.Cv=32,r.WH=12,r.pg=16;var g=new Uint8Array(16),y=function(){function v(b){if(this.nonceLength=r.WH,this.tagLength=r.pg,b.length!==r.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(b)}return v.prototype.seal=function(b,A,O,C){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var T=new Uint8Array(16);T.set(b,T.length-b.length);var N=new Uint8Array(32);_.stream(this._key,T,N,4);var P,M=A.length+this.tagLength;if(C){if(C.length!==M)throw new Error("ChaCha20Poly1305: incorrect destination length");P=C}else P=new Uint8Array(M);return _.streamXOR(this._key,T,A,P,4),this._authenticate(P.subarray(P.length-this.tagLength,P.length),N,P.subarray(0,P.length-this.tagLength),O),S.wipe(T),P},v.prototype.open=function(b,A,O,C){if(b.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(A.length0&&T.update(g.subarray(C.length%16))),T.update(O),O.length%16>0&&T.update(g.subarray(O.length%16));var N=new Uint8Array(8);C&&a.writeUint64LE(C.length,N),T.update(N),a.writeUint64LE(O.length,N),T.update(N);for(var M=T.digest(),P=0;P{"use strict";function _(S,a){if(S.length!==a.length)return 0;for(var h=0,g=0;g>>8}Object.defineProperty(r,"__esModule",{value:!0}),r.select=function d(S,a,h){return~(S-1)&a|S-1&h},r.lessOrEqual=function l(S,a){return(0|S)-(0|a)-1>>>31&1},r.compare=_,r.equal=function E(S,a){return 0!==S.length&&0!==a.length&&0!==_(S,a)}},65553:(ne,r,d)=>{"use strict";var _=d(5784),E=d(86375),S=d(69815);function a(ve){var ce=new Float64Array(16);if(ve)for(var he=0;he>16&1),he[de-1]&=65535;he[15]=le[15]-32767-(he[14]>>16&1);var ye=he[15]>>16&1;he[14]&=65535,M(le,he,1-ye)}for(de=0;de<16;de++)ve[2*de]=255&le[de],ve[2*de+1]=le[de]>>8}function R(ve,ce){for(var he=0,le=0;le<32;le++)he|=ve[le]^ce[le];return(1&he-1>>>8)-1}function L(ve,ce){var he=new Uint8Array(32),le=new Uint8Array(32);return P(he,ve),P(le,ce),R(he,le)}function H(ve){var ce=new Uint8Array(32);return P(ce,ve),1&ce[0]}function J(ve,ce,he){for(var le=0;le<16;le++)ve[le]=ce[le]+he[le]}function Y(ve,ce,he){for(var le=0;le<16;le++)ve[le]=ce[le]-he[le]}function Z(ve,ce,he){var le,de,ae=0,ye=0,Ce=0,Pe=0,Ge=0,Ve=0,Ue=0,_t=0,Ze=0,$e=0,Pt=0,nt=0,rt=0,Lt=0,Re=0,Ae=0,xe=0,je=0,He=0,lt=0,Je=0,at=0,fn=0,ct=0,dt=0,yn=0,ht=0,It=0,or=0,Dt=0,Mt=0,In=he[0],yt=he[1],wt=he[2],Pn=he[3],vt=he[4],St=he[5],Fn=he[6],pt=he[7],At=he[8],Ie=he[9],Se=he[10],De=he[11],Ee=he[12],Ne=he[13],ze=he[14],ot=he[15];ae+=(le=ce[0])*In,ye+=le*yt,Ce+=le*wt,Pe+=le*Pn,Ge+=le*vt,Ve+=le*St,Ue+=le*Fn,_t+=le*pt,Ze+=le*At,$e+=le*Ie,Pt+=le*Se,nt+=le*De,rt+=le*Ee,Lt+=le*Ne,Re+=le*ze,Ae+=le*ot,ye+=(le=ce[1])*In,Ce+=le*yt,Pe+=le*wt,Ge+=le*Pn,Ve+=le*vt,Ue+=le*St,_t+=le*Fn,Ze+=le*pt,$e+=le*At,Pt+=le*Ie,nt+=le*Se,rt+=le*De,Lt+=le*Ee,Re+=le*Ne,Ae+=le*ze,xe+=le*ot,Ce+=(le=ce[2])*In,Pe+=le*yt,Ge+=le*wt,Ve+=le*Pn,Ue+=le*vt,_t+=le*St,Ze+=le*Fn,$e+=le*pt,Pt+=le*At,nt+=le*Ie,rt+=le*Se,Lt+=le*De,Re+=le*Ee,Ae+=le*Ne,xe+=le*ze,je+=le*ot,Pe+=(le=ce[3])*In,Ge+=le*yt,Ve+=le*wt,Ue+=le*Pn,_t+=le*vt,Ze+=le*St,$e+=le*Fn,Pt+=le*pt,nt+=le*At,rt+=le*Ie,Lt+=le*Se,Re+=le*De,Ae+=le*Ee,xe+=le*Ne,je+=le*ze,He+=le*ot,Ge+=(le=ce[4])*In,Ve+=le*yt,Ue+=le*wt,_t+=le*Pn,Ze+=le*vt,$e+=le*St,Pt+=le*Fn,nt+=le*pt,rt+=le*At,Lt+=le*Ie,Re+=le*Se,Ae+=le*De,xe+=le*Ee,je+=le*Ne,He+=le*ze,lt+=le*ot,Ve+=(le=ce[5])*In,Ue+=le*yt,_t+=le*wt,Ze+=le*Pn,$e+=le*vt,Pt+=le*St,nt+=le*Fn,rt+=le*pt,Lt+=le*At,Re+=le*Ie,Ae+=le*Se,xe+=le*De,je+=le*Ee,He+=le*Ne,lt+=le*ze,Je+=le*ot,Ue+=(le=ce[6])*In,_t+=le*yt,Ze+=le*wt,$e+=le*Pn,Pt+=le*vt,nt+=le*St,rt+=le*Fn,Lt+=le*pt,Re+=le*At,Ae+=le*Ie,xe+=le*Se,je+=le*De,He+=le*Ee,lt+=le*Ne,Je+=le*ze,at+=le*ot,_t+=(le=ce[7])*In,Ze+=le*yt,$e+=le*wt,Pt+=le*Pn,nt+=le*vt,rt+=le*St,Lt+=le*Fn,Re+=le*pt,Ae+=le*At,xe+=le*Ie,je+=le*Se,He+=le*De,lt+=le*Ee,Je+=le*Ne,at+=le*ze,fn+=le*ot,Ze+=(le=ce[8])*In,$e+=le*yt,Pt+=le*wt,nt+=le*Pn,rt+=le*vt,Lt+=le*St,Re+=le*Fn,Ae+=le*pt,xe+=le*At,je+=le*Ie,He+=le*Se,lt+=le*De,Je+=le*Ee,at+=le*Ne,fn+=le*ze,ct+=le*ot,$e+=(le=ce[9])*In,Pt+=le*yt,nt+=le*wt,rt+=le*Pn,Lt+=le*vt,Re+=le*St,Ae+=le*Fn,xe+=le*pt,je+=le*At,He+=le*Ie,lt+=le*Se,Je+=le*De,at+=le*Ee,fn+=le*Ne,ct+=le*ze,dt+=le*ot,Pt+=(le=ce[10])*In,nt+=le*yt,rt+=le*wt,Lt+=le*Pn,Re+=le*vt,Ae+=le*St,xe+=le*Fn,je+=le*pt,He+=le*At,lt+=le*Ie,Je+=le*Se,at+=le*De,fn+=le*Ee,ct+=le*Ne,dt+=le*ze,yn+=le*ot,nt+=(le=ce[11])*In,rt+=le*yt,Lt+=le*wt,Re+=le*Pn,Ae+=le*vt,xe+=le*St,je+=le*Fn,He+=le*pt,lt+=le*At,Je+=le*Ie,at+=le*Se,fn+=le*De,ct+=le*Ee,dt+=le*Ne,yn+=le*ze,ht+=le*ot,rt+=(le=ce[12])*In,Lt+=le*yt,Re+=le*wt,Ae+=le*Pn,xe+=le*vt,je+=le*St,He+=le*Fn,lt+=le*pt,Je+=le*At,at+=le*Ie,fn+=le*Se,ct+=le*De,dt+=le*Ee,yn+=le*Ne,ht+=le*ze,It+=le*ot,Lt+=(le=ce[13])*In,Re+=le*yt,Ae+=le*wt,xe+=le*Pn,je+=le*vt,He+=le*St,lt+=le*Fn,Je+=le*pt,at+=le*At,fn+=le*Ie,ct+=le*Se,dt+=le*De,yn+=le*Ee,ht+=le*Ne,It+=le*ze,or+=le*ot,Re+=(le=ce[14])*In,Ae+=le*yt,xe+=le*wt,je+=le*Pn,He+=le*vt,lt+=le*St,Je+=le*Fn,at+=le*pt,fn+=le*At,ct+=le*Ie,dt+=le*Se,yn+=le*De,ht+=le*Ee,It+=le*Ne,or+=le*ze,Dt+=le*ot,Ae+=(le=ce[15])*In,ye+=38*(je+=le*wt),Ce+=38*(He+=le*Pn),Pe+=38*(lt+=le*vt),Ge+=38*(Je+=le*St),Ve+=38*(at+=le*Fn),Ue+=38*(fn+=le*pt),_t+=38*(ct+=le*At),Ze+=38*(dt+=le*Ie),$e+=38*(yn+=le*Se),Pt+=38*(ht+=le*De),nt+=38*(It+=le*Ee),rt+=38*(or+=le*Ne),Lt+=38*(Dt+=le*ze),Re+=38*(Mt+=le*ot),ae=(le=(ae+=38*(xe+=le*yt))+(de=1)+65535)-65536*(de=Math.floor(le/65536)),ye=(le=ye+de+65535)-65536*(de=Math.floor(le/65536)),Ce=(le=Ce+de+65535)-65536*(de=Math.floor(le/65536)),Pe=(le=Pe+de+65535)-65536*(de=Math.floor(le/65536)),Ge=(le=Ge+de+65535)-65536*(de=Math.floor(le/65536)),Ve=(le=Ve+de+65535)-65536*(de=Math.floor(le/65536)),Ue=(le=Ue+de+65535)-65536*(de=Math.floor(le/65536)),_t=(le=_t+de+65535)-65536*(de=Math.floor(le/65536)),Ze=(le=Ze+de+65535)-65536*(de=Math.floor(le/65536)),$e=(le=$e+de+65535)-65536*(de=Math.floor(le/65536)),Pt=(le=Pt+de+65535)-65536*(de=Math.floor(le/65536)),nt=(le=nt+de+65535)-65536*(de=Math.floor(le/65536)),rt=(le=rt+de+65535)-65536*(de=Math.floor(le/65536)),Lt=(le=Lt+de+65535)-65536*(de=Math.floor(le/65536)),Re=(le=Re+de+65535)-65536*(de=Math.floor(le/65536)),Ae=(le=Ae+de+65535)-65536*(de=Math.floor(le/65536)),ae=(le=(ae+=de-1+37*(de-1))+(de=1)+65535)-65536*(de=Math.floor(le/65536)),ye=(le=ye+de+65535)-65536*(de=Math.floor(le/65536)),Ce=(le=Ce+de+65535)-65536*(de=Math.floor(le/65536)),Pe=(le=Pe+de+65535)-65536*(de=Math.floor(le/65536)),Ge=(le=Ge+de+65535)-65536*(de=Math.floor(le/65536)),Ve=(le=Ve+de+65535)-65536*(de=Math.floor(le/65536)),Ue=(le=Ue+de+65535)-65536*(de=Math.floor(le/65536)),_t=(le=_t+de+65535)-65536*(de=Math.floor(le/65536)),Ze=(le=Ze+de+65535)-65536*(de=Math.floor(le/65536)),$e=(le=$e+de+65535)-65536*(de=Math.floor(le/65536)),Pt=(le=Pt+de+65535)-65536*(de=Math.floor(le/65536)),nt=(le=nt+de+65535)-65536*(de=Math.floor(le/65536)),rt=(le=rt+de+65535)-65536*(de=Math.floor(le/65536)),Lt=(le=Lt+de+65535)-65536*(de=Math.floor(le/65536)),Re=(le=Re+de+65535)-65536*(de=Math.floor(le/65536)),Ae=(le=Ae+de+65535)-65536*(de=Math.floor(le/65536)),ae+=de-1+37*(de-1),ve[0]=ae,ve[1]=ye,ve[2]=Ce,ve[3]=Pe,ve[4]=Ge,ve[5]=Ve,ve[6]=Ue,ve[7]=_t,ve[8]=Ze,ve[9]=$e,ve[10]=Pt,ve[11]=nt,ve[12]=rt,ve[13]=Lt,ve[14]=Re,ve[15]=Ae}function W(ve,ce){Z(ve,ce,ce)}function Q(ve,ce){var le,he=a();for(le=0;le<16;le++)he[le]=ce[le];for(le=253;le>=0;le--)W(he,he),2!==le&&4!==le&&Z(he,he,ce);for(le=0;le<16;le++)ve[le]=he[le]}function o(ve,ce){var he=a(),le=a(),de=a(),ae=a(),ye=a(),Ce=a(),Pe=a(),Ge=a(),Ve=a();Y(he,ve[1],ve[0]),Y(Ve,ce[1],ce[0]),Z(he,he,Ve),J(le,ve[0],ve[1]),J(Ve,ce[0],ce[1]),Z(le,le,Ve),Z(de,ve[3],ce[3]),Z(de,de,b),Z(ae,ve[2],ce[2]),J(ae,ae,ae),Y(ye,le,he),Y(Ce,ae,de),J(Pe,ae,de),J(Ge,le,he),Z(ve[0],ye,Ce),Z(ve[1],Ge,Pe),Z(ve[2],Pe,Ce),Z(ve[3],ye,Ge)}function u(ve,ce,he){for(var le=0;le<4;le++)M(ve[le],ce[le],he)}function m(ve,ce){var he=a(),le=a(),de=a();Q(de,ce[2]),Z(he,ce[0],de),Z(le,ce[1],de),P(ve,le),ve[31]^=H(he)<<7}function w(ve,ce,he){T(ve[0],g),T(ve[1],y),T(ve[2],y),T(ve[3],g);for(var le=255;le>=0;--le){var de=he[le/8|0]>>(7&le)&1;u(ve,ce,de),o(ce,ve),o(ve,ve),u(ve,ce,de)}}function x(ve,ce){var he=[a(),a(),a(),a()];T(he[0],A),T(he[1],O),T(he[2],y),Z(he[3],A,O),w(ve,he,ce)}function F(ve){if(ve.length!==r.aP)throw new Error("ed25519: seed must be "+r.aP+" bytes");var ce=E.hash(ve);ce[0]&=248,ce[31]&=127,ce[31]|=64;var he=new Uint8Array(32),le=[a(),a(),a(),a()];x(le,ce),m(he,le);var de=new Uint8Array(64);return de.set(ve),de.set(he,32),{publicKey:he,secretKey:de}}r._w=F;var p=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function B(ve,ce){var he,le,de,ae;for(le=63;le>=32;--le){for(he=0,de=le-32,ae=le-12;de>4)*p[de],he=ce[de]>>8,ce[de]&=255;for(de=0;de<32;de++)ce[de]-=he*p[de];for(le=0;le<32;le++)ce[le+1]+=ce[le]>>8,ve[le]=255&ce[le]}function ie(ve){for(var ce=new Float64Array(64),he=0;he<64;he++)ce[he]=ve[he];for(he=0;he<64;he++)ve[he]=0;B(ve,ce)}function ee(ve,ce){var he=a(),le=a(),de=a(),ae=a(),ye=a(),Ce=a(),Pe=a();return T(ve[2],y),function V(ve,ce){for(var he=0;he<16;he++)ve[he]=ce[2*he]+(ce[2*he+1]<<8);ve[15]&=32767}(ve[1],ce),W(de,ve[1]),Z(ae,de,v),Y(de,de,ve[2]),J(ae,ve[2],ae),W(ye,ae),W(Ce,ye),Z(Pe,Ce,ye),Z(he,Pe,de),Z(he,he,ae),function D(ve,ce){var le,he=a();for(le=0;le<16;le++)he[le]=ce[le];for(le=250;le>=0;le--)W(he,he),1!==le&&Z(he,he,ce);for(le=0;le<16;le++)ve[le]=he[le]}(he,he),Z(he,he,de),Z(he,he,ae),Z(he,he,ae),Z(ve[0],he,ae),W(le,ve[0]),Z(le,le,ae),L(le,de)&&Z(ve[0],ve[0],C),W(le,ve[0]),Z(le,le,ae),L(le,de)?-1:(H(ve[0])===ce[31]>>7&&Y(ve[0],g,ve[0]),Z(ve[3],ve[0],ve[1]),0)}r.Xx=function te(ve,ce){var he=new Float64Array(64),le=[a(),a(),a(),a()],de=E.hash(ve.subarray(0,32));de[0]&=248,de[31]&=127,de[31]|=64;var ae=new Uint8Array(64);ae.set(de.subarray(32),32);var ye=new E.SHA512;ye.update(ae.subarray(32)),ye.update(ce);var Ce=ye.digest();ye.clean(),ie(Ce),x(le,Ce),m(ae,le),ye.reset(),ye.update(ae.subarray(0,32)),ye.update(ve.subarray(32)),ye.update(ce);var Pe=ye.digest();ie(Pe);for(var Ge=0;Ge<32;Ge++)he[Ge]=Ce[Ge];for(Ge=0;Ge<32;Ge++)for(var Ve=0;Ve<32;Ve++)he[Ge+Ve]+=Pe[Ge]*de[Ve];return B(ae.subarray(32),he),ae}},35571:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isSerializableHash=function d(l){return typeof l.saveState<"u"&&typeof l.restoreState<"u"&&typeof l.cleanSavedState<"u"}},85705:(ne,r,d)=>{"use strict";var _=d(54193),E=d(69815),S=function(){function a(h,g,y,v){void 0===y&&(y=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=h,this._info=v;var b=_.hmac(this._hash,y,g);this._hmac=new _.HMAC(h,b),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return a.prototype._fillBuffer=function(){this._counter[0]++;var h=this._counter[0];if(0===h)throw new Error("hkdf: cannot expand more");this._hmac.reset(),h>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},a.prototype.expand=function(h){for(var g=new Uint8Array(h),y=0;y{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(35571),_=d(19976),E=d(69815),S=function(){function h(g,y){this._finished=!1,this._inner=new g,this._outer=new g,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var v=new Uint8Array(this.blockSize);y.length>this.blockSize?this._inner.update(y).finish(v).clean():v.set(y);for(var b=0;b{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.mul=Math.imul||function d(h,g){var v=65535&h,A=65535&g;return v*A+((h>>>16&65535)*A+v*(g>>>16&65535)<<16>>>0)|0},r.add=function l(h,g){return h+g|0},r.sub=function _(h,g){return h-g|0},r.rotl=function E(h,g){return h<>>32-g},r.rotr=function S(h,g){return h<<32-g|h>>>g},r.isInteger=Number.isInteger||function a(h){return"number"==typeof h&&isFinite(h)&&Math.floor(h)===h},r.MAX_SAFE_INTEGER=9007199254740991,r.isSafeInteger=function(h){return r.isInteger(h)&&h>=-r.MAX_SAFE_INTEGER&&h<=r.MAX_SAFE_INTEGER}},60314:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(19976),_=d(69815);r.DIGEST_LENGTH=16;var E=function(){function h(g){this.digestLength=r.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var y=g[0]|g[1]<<8;this._r[0]=8191&y;var v=g[2]|g[3]<<8;this._r[1]=8191&(y>>>13|v<<3);var b=g[4]|g[5]<<8;this._r[2]=7939&(v>>>10|b<<6);var A=g[6]|g[7]<<8;this._r[3]=8191&(b>>>7|A<<9);var O=g[8]|g[9]<<8;this._r[4]=255&(A>>>4|O<<12),this._r[5]=O>>>1&8190;var C=g[10]|g[11]<<8;this._r[6]=8191&(O>>>14|C<<2);var T=g[12]|g[13]<<8;this._r[7]=8065&(C>>>11|T<<5);var N=g[14]|g[15]<<8;this._r[8]=8191&(T>>>8|N<<8),this._r[9]=N>>>5&127,this._pad[0]=g[16]|g[17]<<8,this._pad[1]=g[18]|g[19]<<8,this._pad[2]=g[20]|g[21]<<8,this._pad[3]=g[22]|g[23]<<8,this._pad[4]=g[24]|g[25]<<8,this._pad[5]=g[26]|g[27]<<8,this._pad[6]=g[28]|g[29]<<8,this._pad[7]=g[30]|g[31]<<8}return h.prototype._blocks=function(g,y,v){for(var b=this._fin?0:2048,A=this._h[0],O=this._h[1],C=this._h[2],T=this._h[3],N=this._h[4],M=this._h[5],P=this._h[6],R=this._h[7],L=this._h[8],H=this._h[9],V=this._r[0],J=this._r[1],Y=this._r[2],Z=this._r[3],W=this._r[4],Q=this._r[5],D=this._r[6],o=this._r[7],u=this._r[8],m=this._r[9];v>=16;){var w=g[y+0]|g[y+1]<<8;A+=8191&w;var x=g[y+2]|g[y+3]<<8;O+=8191&(w>>>13|x<<3);var F=g[y+4]|g[y+5]<<8;C+=8191&(x>>>10|F<<6);var G=g[y+6]|g[y+7]<<8;T+=8191&(F>>>7|G<<9);var k=g[y+8]|g[y+9]<<8;N+=8191&(G>>>4|k<<12),M+=k>>>1&8191;var p=g[y+10]|g[y+11]<<8;P+=8191&(k>>>14|p<<2);var B=g[y+12]|g[y+13]<<8;R+=8191&(p>>>11|B<<5);var ie=g[y+14]|g[y+15]<<8,te=0,ee=te;ee+=A*V,ee+=O*(5*m),ee+=C*(5*u),ee+=T*(5*o),te=(ee+=N*(5*D))>>>13,ee&=8191,ee+=M*(5*Q),ee+=P*(5*W),ee+=R*(5*Z),ee+=(L+=8191&(B>>>8|ie<<8))*(5*Y);var ue=te+=(ee+=(H+=ie>>>5|b)*(5*J))>>>13;ue+=A*J,ue+=O*V,ue+=C*(5*m),ue+=T*(5*u),te=(ue+=N*(5*o))>>>13,ue&=8191,ue+=M*(5*D),ue+=P*(5*Q),ue+=R*(5*W),ue+=L*(5*Z),te+=(ue+=H*(5*Y))>>>13,ue&=8191;var we=te;we+=A*Y,we+=O*J,we+=C*V,we+=T*(5*m),te=(we+=N*(5*u))>>>13,we&=8191,we+=M*(5*o),we+=P*(5*D),we+=R*(5*Q),we+=L*(5*W);var me=te+=(we+=H*(5*Z))>>>13;me+=A*Z,me+=O*Y,me+=C*J,me+=T*V,te=(me+=N*(5*m))>>>13,me&=8191,me+=M*(5*u),me+=P*(5*o),me+=R*(5*D),me+=L*(5*Q);var ve=te+=(me+=H*(5*W))>>>13;ve+=A*W,ve+=O*Z,ve+=C*Y,ve+=T*J,te=(ve+=N*V)>>>13,ve&=8191,ve+=M*(5*m),ve+=P*(5*u),ve+=R*(5*o),ve+=L*(5*D);var ce=te+=(ve+=H*(5*Q))>>>13;ce+=A*Q,ce+=O*W,ce+=C*Z,ce+=T*Y,te=(ce+=N*J)>>>13,ce&=8191,ce+=M*V,ce+=P*(5*m),ce+=R*(5*u),ce+=L*(5*o);var he=te+=(ce+=H*(5*D))>>>13;he+=A*D,he+=O*Q,he+=C*W,he+=T*Z,te=(he+=N*Y)>>>13,he&=8191,he+=M*J,he+=P*V,he+=R*(5*m),he+=L*(5*u);var le=te+=(he+=H*(5*o))>>>13;le+=A*o,le+=O*D,le+=C*Q,le+=T*W,te=(le+=N*Z)>>>13,le&=8191,le+=M*Y,le+=P*J,le+=R*V,le+=L*(5*m);var de=te+=(le+=H*(5*u))>>>13;de+=A*u,de+=O*o,de+=C*D,de+=T*Q,te=(de+=N*W)>>>13,de&=8191,de+=M*Z,de+=P*Y,de+=R*J,de+=L*V;var ae=te+=(de+=H*(5*m))>>>13;ae+=A*m,ae+=O*u,ae+=C*o,ae+=T*D,te=(ae+=N*Q)>>>13,ae&=8191,ae+=M*W,ae+=P*Z,ae+=R*Y,ae+=L*J,A=ee=8191&(te=(te=((te+=(ae+=H*V)>>>13)<<2)+te|0)+(ee&=8191)|0),O=ue+=te>>>=13,C=we&=8191,T=me&=8191,N=ve&=8191,M=ce&=8191,P=he&=8191,R=le&=8191,L=de&=8191,H=ae&=8191,y+=16,v-=16}this._h[0]=A,this._h[1]=O,this._h[2]=C,this._h[3]=T,this._h[4]=N,this._h[5]=M,this._h[6]=P,this._h[7]=R,this._h[8]=L,this._h[9]=H},h.prototype.finish=function(g,y){void 0===y&&(y=0);var b,A,O,C,v=new Uint16Array(10);if(this._leftover){for(C=this._leftover,this._buffer[C++]=1;C<16;C++)this._buffer[C]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(b=this._h[1]>>>13,this._h[1]&=8191,C=2;C<10;C++)this._h[C]+=b,b=this._h[C]>>>13,this._h[C]&=8191;for(this._h[0]+=5*b,b=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=b,b=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=b,v[0]=this._h[0]+5,b=v[0]>>>13,v[0]&=8191,C=1;C<10;C++)v[C]=this._h[C]+b,b=v[C]>>>13,v[C]&=8191;for(v[9]-=8192,A=(1^b)-1,C=0;C<10;C++)v[C]&=A;for(A=~A,C=0;C<10;C++)this._h[C]=this._h[C]&A|v[C];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),O=this._h[0]+this._pad[0],this._h[0]=65535&O,C=1;C<8;C++)O=(this._h[C]+this._pad[C]|0)+(O>>>16)|0,this._h[C]=65535&O;return g[y+0]=this._h[0]>>>0,g[y+1]=this._h[0]>>>8,g[y+2]=this._h[1]>>>0,g[y+3]=this._h[1]>>>8,g[y+4]=this._h[2]>>>0,g[y+5]=this._h[2]>>>8,g[y+6]=this._h[3]>>>0,g[y+7]=this._h[3]>>>8,g[y+8]=this._h[4]>>>0,g[y+9]=this._h[4]>>>8,g[y+10]=this._h[5]>>>0,g[y+11]=this._h[5]>>>8,g[y+12]=this._h[6]>>>0,g[y+13]=this._h[6]>>>8,g[y+14]=this._h[7]>>>0,g[y+15]=this._h[7]>>>8,this._finished=!0,this},h.prototype.update=function(g){var b,y=0,v=g.length;if(this._leftover){(b=16-this._leftover)>v&&(b=v);for(var A=0;A=16&&(b=v-v%16,this._blocks(g,y,b),y+=b,v-=b),v){for(A=0;A{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(59753),_=d(54502),E=d(69815);function S(v,b){return void 0===b&&(b=r.defaultRandomSource),b.randomBytes(v)}r.defaultRandomSource=new l.SystemRandomSource,r.randomBytes=S,r.randomUint32=function a(v){void 0===v&&(v=r.defaultRandomSource);var b=S(4,v),A=_.readUint32LE(b);return E.wipe(b),A};var h="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function g(v,b,A){if(void 0===b&&(b=h),void 0===A&&(A=r.defaultRandomSource),b.length<2)throw new Error("randomString charset is too short");if(b.length>256)throw new Error("randomString charset is too long");for(var O="",C=b.length,T=256-256%C;v>0;){for(var N=S(Math.ceil(256*v/T),A),M=0;M0;M++){var P=N[M];P{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function _(){this.isAvailable=!1,this.isInstantiated=!1;var E=typeof self<"u"?self.crypto||self.msCrypto:null;E&&E.getRandomValues&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}return _.prototype.randomBytes=function(E){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var S=new Uint8Array(E),a=0;a{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(69815),_=function(){function E(){this.isAvailable=!1,this.isInstantiated=!1;var S=d(41348);S&&S.randomBytes&&(this._crypto=S,this.isAvailable=!0,this.isInstantiated=!0)}return E.prototype.randomBytes=function(S){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var a=this._crypto.randomBytes(S);if(a.length!==S)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var h=new Uint8Array(S),g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(77170),_=d(1382),E=function(){function S(){return this.isAvailable=!1,this.name="",this._source=new l.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new _.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}return S.prototype.randomBytes=function(a){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(a)},S}();r.SystemRandomSource=E},10893:(ne,r,d)=>{"use strict";var _=d(54502),E=d(69815);r.k=32,r.cn=64;var S=function(){function y(){this.digestLength=r.k,this.blockSize=r.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){E.wipe(this._buffer),E.wipe(this._temp),this.reset()},y.prototype.update=function(v,b){if(void 0===b&&(b=v.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var A=0;if(this._bytesHashed+=b,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=v[A++],b--;this._bufferLength===this.blockSize&&(h(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(b>=this.blockSize&&(A=h(this._temp,this._state,v,A,b),b%=this.blockSize);b>0;)this._buffer[this._bufferLength++]=v[A++],b--;return this},y.prototype.finish=function(v){if(!this._finished){var b=this._bytesHashed,A=this._bufferLength,O=b/536870912|0,C=b<<3,T=b%64<56?64:128;this._buffer[A]=128;for(var N=A+1;N0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(v){return this._state.set(v.state),this._bufferLength=v.bufferLength,v.buffer&&this._buffer.set(v.buffer),this._bytesHashed=v.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(v){E.wipe(v.state),v.buffer&&E.wipe(v.buffer),v.bufferLength=0,v.bytesHashed=0},y}();r.mE=S;var a=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function h(y,v,b,A,O){for(;O>=64;){for(var C=v[0],T=v[1],N=v[2],M=v[3],P=v[4],R=v[5],L=v[6],H=v[7],V=0;V<16;V++){var J=A+4*V;y[V]=_.readUint32BE(b,J)}for(V=16;V<64;V++){var Y=y[V-2],Z=(Y>>>17|Y<<15)^(Y>>>19|Y<<13)^Y>>>10,W=((Y=y[V-15])>>>7|Y<<25)^(Y>>>18|Y<<14)^Y>>>3;y[V]=(Z+y[V-7]|0)+(W+y[V-16]|0)}for(V=0;V<64;V++){Z=(((P>>>6|P<<26)^(P>>>11|P<<21)^(P>>>25|P<<7))+(P&R^~P&L)|0)+(H+(a[V]+y[V]|0)|0)|0,W=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&T^C&N^T&N)|0;H=L,L=R,R=P,P=M+Z|0,M=N,N=T,T=C,C=Z+W|0}v[0]+=C,v[1]+=T,v[2]+=N,v[3]+=M,v[4]+=P,v[5]+=R,v[6]+=L,v[7]+=H,A+=64,O-=64}return A}r.vp=function g(y){var v=new S;v.update(y);var b=v.digest();return v.clean(),b}},86375:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var l=d(54502),_=d(69815);r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128;var E=function(){function g(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return g.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},g.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},g.prototype.clean=function(){_.wipe(this._buffer),_.wipe(this._tempHi),_.wipe(this._tempLo),this.reset()},g.prototype.update=function(y,v){if(void 0===v&&(v=y.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var b=0;if(this._bytesHashed+=v,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=y[b++],v--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(v>=this.blockSize&&(b=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,y,b,v),v%=this.blockSize);v>0;)this._buffer[this._bufferLength++]=y[b++],v--;return this},g.prototype.finish=function(y){if(!this._finished){var v=this._bytesHashed,b=this._bufferLength,A=v/536870912|0,O=v<<3,C=v%128<112?128:256;this._buffer[b]=128;for(var T=b+1;T0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},g.prototype.restoreState=function(y){return this._stateHi.set(y.stateHi),this._stateLo.set(y.stateLo),this._bufferLength=y.bufferLength,y.buffer&&this._buffer.set(y.buffer),this._bytesHashed=y.bytesHashed,this._finished=!1,this},g.prototype.cleanSavedState=function(y){_.wipe(y.stateHi),_.wipe(y.stateLo),y.buffer&&_.wipe(y.buffer),y.bufferLength=0,y.bytesHashed=0},g}();r.SHA512=E;var S=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(g,y,v,b,A,O,C){for(var m,w,x,F,G,k,p,B,T=v[0],N=v[1],M=v[2],P=v[3],R=v[4],L=v[5],H=v[6],V=v[7],J=b[0],Y=b[1],Z=b[2],W=b[3],Q=b[4],D=b[5],o=b[6],u=b[7];C>=128;){for(var ie=0;ie<16;ie++){var te=8*ie+O;g[ie]=l.readUint32BE(A,te),y[ie]=l.readUint32BE(A,te+4)}for(ie=0;ie<80;ie++){var le,Ue,ee=T,ue=N,we=M,me=P,ve=R,ce=L,he=H,de=J,ae=Y,ye=Z,Ce=W,Pe=Q,Ge=D,Ve=o;if(G=65535&(w=u),k=w>>>16,p=65535&(m=V),B=m>>>16,G+=65535&(w=(Q>>>14|R<<18)^(Q>>>18|R<<14)^(R>>>9|Q<<23)),k+=w>>>16,p+=65535&(m=(R>>>14|Q<<18)^(R>>>18|Q<<14)^(Q>>>9|R<<23)),B+=m>>>16,G+=65535&(w=Q&D^~Q&o),k+=w>>>16,p+=65535&(m=R&L^~R&H),B+=m>>>16,m=S[2*ie],G+=65535&(w=S[2*ie+1]),k+=w>>>16,p+=65535&m,B+=m>>>16,m=g[ie%16],k+=(w=y[ie%16])>>>16,p+=65535&m,B+=m>>>16,p+=(k+=(G+=65535&w)>>>16)>>>16,G=65535&(w=F=65535&G|k<<16),k=w>>>16,p=65535&(m=x=65535&p|(B+=p>>>16)<<16),B=m>>>16,G+=65535&(w=(J>>>28|T<<4)^(T>>>2|J<<30)^(T>>>7|J<<25)),k+=w>>>16,p+=65535&(m=(T>>>28|J<<4)^(J>>>2|T<<30)^(J>>>7|T<<25)),B+=m>>>16,k+=(w=J&Y^J&Z^Y&Z)>>>16,p+=65535&(m=T&N^T&M^N&M),B+=m>>>16,le=65535&(p+=(k+=(G+=65535&w)>>>16)>>>16)|(B+=p>>>16)<<16,Ue=65535&G|k<<16,G=65535&(w=Ce),k=w>>>16,p=65535&(m=me),B=m>>>16,k+=(w=F)>>>16,p+=65535&(m=x),B+=m>>>16,N=ee,M=ue,P=we,R=me=65535&(p+=(k+=(G+=65535&w)>>>16)>>>16)|(B+=p>>>16)<<16,L=ve,H=ce,V=he,T=le,Y=de,Z=ae,W=ye,Q=Ce=65535&G|k<<16,D=Pe,o=Ge,u=Ve,J=Ue,ie%16==15)for(te=0;te<16;te++)m=g[te],G=65535&(w=y[te]),k=w>>>16,p=65535&m,B=m>>>16,m=g[(te+9)%16],G+=65535&(w=y[(te+9)%16]),k+=w>>>16,p+=65535&m,B+=m>>>16,x=g[(te+1)%16],G+=65535&(w=((F=y[(te+1)%16])>>>1|x<<31)^(F>>>8|x<<24)^(F>>>7|x<<25)),k+=w>>>16,p+=65535&(m=(x>>>1|F<<31)^(x>>>8|F<<24)^x>>>7),B+=m>>>16,x=g[(te+14)%16],k+=(w=((F=y[(te+14)%16])>>>19|x<<13)^(x>>>29|F<<3)^(F>>>6|x<<26))>>>16,p+=65535&(m=(x>>>19|F<<13)^(F>>>29|x<<3)^x>>>6),B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,g[te]=65535&p|B<<16,y[te]=65535&G|k<<16}G=65535&(w=J),k=w>>>16,p=65535&(m=T),B=m>>>16,m=v[0],k+=(w=b[0])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[0]=T=65535&p|B<<16,b[0]=J=65535&G|k<<16,G=65535&(w=Y),k=w>>>16,p=65535&(m=N),B=m>>>16,m=v[1],k+=(w=b[1])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[1]=N=65535&p|B<<16,b[1]=Y=65535&G|k<<16,G=65535&(w=Z),k=w>>>16,p=65535&(m=M),B=m>>>16,m=v[2],k+=(w=b[2])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[2]=M=65535&p|B<<16,b[2]=Z=65535&G|k<<16,G=65535&(w=W),k=w>>>16,p=65535&(m=P),B=m>>>16,m=v[3],k+=(w=b[3])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[3]=P=65535&p|B<<16,b[3]=W=65535&G|k<<16,G=65535&(w=Q),k=w>>>16,p=65535&(m=R),B=m>>>16,m=v[4],k+=(w=b[4])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[4]=R=65535&p|B<<16,b[4]=Q=65535&G|k<<16,G=65535&(w=D),k=w>>>16,p=65535&(m=L),B=m>>>16,m=v[5],k+=(w=b[5])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[5]=L=65535&p|B<<16,b[5]=D=65535&G|k<<16,G=65535&(w=o),k=w>>>16,p=65535&(m=H),B=m>>>16,m=v[6],k+=(w=b[6])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[6]=H=65535&p|B<<16,b[6]=o=65535&G|k<<16,G=65535&(w=u),k=w>>>16,p=65535&(m=V),B=m>>>16,m=v[7],k+=(w=b[7])>>>16,p+=65535&m,B+=m>>>16,B+=(p+=(k+=(G+=65535&w)>>>16)>>>16)>>>16,v[7]=V=65535&p|B<<16,b[7]=u=65535&G|k<<16,O+=128,C-=128}return O}r.hash=function h(g){var y=new E;y.update(g);var v=y.digest();return y.clean(),v}},69815:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.wipe=function d(l){for(var _=0;_{"use strict";r.gi=r.Au=r.KS=r.kz=void 0;const _=d(52579),E=d(69815);function S(V){const J=new Float64Array(16);if(V)for(let Y=0;Y=0;--G){const k=Y[G>>>3]>>>(7&G)&1;y(W,Q,k),y(D,o,k),A(u,W,D),O(W,W,D),A(D,Q,o),O(Q,Q,o),T(o,u),T(m,W),C(W,D,W),C(D,Q,u),A(u,W,D),O(W,W,D),T(Q,W),O(D,o,m),C(W,D,h),A(W,W,o),C(D,D,W),C(W,o,m),C(o,Q,Z),T(Q,u),y(W,Q,k),y(D,o,k)}for(let G=0;G<16;G++)Z[G+16]=W[G],Z[G+32]=D[G],Z[G+48]=Q[G],Z[G+64]=o[G];const w=Z.subarray(32),x=Z.subarray(16);(function N(V,J){const Y=S();for(let Z=0;Z<16;Z++)Y[Z]=J[Z];for(let Z=253;Z>=0;Z--)T(Y,Y),2!==Z&&4!==Z&&C(Y,Y,J);for(let Z=0;Z<16;Z++)V[Z]=Y[Z]})(w,w),C(x,x,w);const F=new Uint8Array(32);return function v(V,J){const Y=S(),Z=S();for(let W=0;W<16;W++)Z[W]=J[W];g(Z),g(Z),g(Z);for(let W=0;W<2;W++){Y[0]=Z[0]-65517;for(let D=1;D<15;D++)Y[D]=Z[D]-65535-(Y[D-1]>>16&1),Y[D-1]&=65535;Y[15]=Z[15]-32767-(Y[14]>>16&1);const Q=Y[15]>>16&1;Y[14]&=65535,y(Z,Y,1-Q)}for(let W=0;W<16;W++)V[2*W]=255&Z[W],V[2*W+1]=Z[W]>>8}(F,x),F}function P(V){return M(V,a)}function R(V){if(V.length!==r.KS)throw new Error(`x25519: seed must be ${r.KS} bytes`);const J=new Uint8Array(V);return{publicKey:P(J),secretKey:J}}r.Au=function L(V){const J=(0,_.randomBytes)(32,V),Y=R(J);return(0,E.wipe)(J),Y},r.gi=function H(V,J,Y=!1){if(V.length!==r.kz)throw new Error("X25519: incorrect secret key length");if(J.length!==r.kz)throw new Error("X25519: incorrect public key length");const Z=M(V,J);if(Y){let W=0;for(let Q=0;Q{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.randomStringForEntropy=r.randomString=r.randomUint32=r.randomBytes=r.defaultRandomSource=void 0;const l=d(65615),_=d(54502),E=d(69815);function S(v,b=r.defaultRandomSource){return b.randomBytes(v)}r.defaultRandomSource=new l.SystemRandomSource,r.randomBytes=S,r.randomUint32=function a(v=r.defaultRandomSource){const b=S(4,v),A=(0,_.readUint32LE)(b);return(0,E.wipe)(b),A};const h="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function g(v,b=h,A=r.defaultRandomSource){if(b.length<2)throw new Error("randomString charset is too short");if(b.length>256)throw new Error("randomString charset is too long");let O="";const C=b.length,T=256-256%C;for(;v>0;){const N=S(Math.ceil(256*v/T),A);for(let M=0;M0;M++){const P=N[M];P{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRandomSource=void 0;r.BrowserRandomSource=class l{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const E=typeof self<"u"?self.crypto||self.msCrypto:null;E&&void 0!==E.getRandomValues&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const S=new Uint8Array(E);for(let a=0;a{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NodeRandomSource=void 0;const l=d(69815);r.NodeRandomSource=class _{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const S=d(41348);S&&S.randomBytes&&(this._crypto=S,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(S){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let a=this._crypto.randomBytes(S);if(a.length!==S)throw new Error("NodeRandomSource: got fewer bytes than requested");const h=new Uint8Array(S);for(let g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SystemRandomSource=void 0;const l=d(72773),_=d(5447);r.SystemRandomSource=class E{constructor(){return this.isAvailable=!1,this.name="",this._source=new l.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new _.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(a){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(a)}}},31688:(ne,r)=>{"use strict";function d(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function l(){const E=d();return E.subtle||E.webkitSubtle}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowserCryptoAvailable=r.getSubtleCrypto=r.getBrowerCrypto=void 0,r.getBrowerCrypto=d,r.getSubtleCrypto=l,r.isBrowserCryptoAvailable=function _(){return!!d()&&!!l()}},32220:(ne,r)=>{"use strict";function d(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function l(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowser=r.isNode=r.isReactNative=void 0,r.isReactNative=d,r.isNode=l,r.isBrowser=function _(){return!d()&&!l()}},71948:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(34308);l.__exportStar(d(31688),r),l.__exportStar(d(32220),r)},42092:(ne,r,d)=>{"use strict";d.d(r,{q:()=>l});class l{}},1252:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{IEvents:()=>l.q});var l=d(42092)},63510:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HEARTBEAT_EVENTS=r.HEARTBEAT_INTERVAL=void 0;const l=d(43961);r.HEARTBEAT_INTERVAL=l.FIVE_SECONDS,r.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},46844:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),d(39653).__exportStar(d(63510),r)},72271:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.HeartBeat=void 0;const l=d(39653),_=d(59069),E=d(43961),S=d(76925),a=d(46844);class h extends S.IHeartBeat{constructor(y){super(y),this.events=new _.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=y?.interval||a.HEARTBEAT_INTERVAL}static init(y){return l.__awaiter(this,void 0,void 0,function*(){const v=new h(y);return yield v.init(),v})}init(){return l.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(y,v){this.events.on(y,v)}once(y,v){this.events.once(y,v)}off(y,v){this.events.off(y,v)}removeListener(y,v){this.events.removeListener(y,v)}initialize(){return l.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),E.toMiliseconds(this.interval))})}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}r.HeartBeat=h},72062:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(39653);l.__exportStar(d(72271),r),l.__exportStar(d(76925),r),l.__exportStar(d(46844),r)},88891:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.IHeartBeat=void 0;const l=d(1252);class _ extends l.IEvents{constructor(S){super()}}r.IHeartBeat=_},76925:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),d(39653).__exportStar(d(88891),r)},25504:ne=>{"use strict";ne.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},46499:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PINO_CUSTOM_CONTEXT_KEY=r.PINO_LOGGER_DEFAULTS=void 0,r.PINO_LOGGER_DEFAULTS={level:"info"},r.PINO_CUSTOM_CONTEXT_KEY="custom_context"},83767:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.pino=void 0;const l=d(57121),_=l.__importDefault(d(28544));Object.defineProperty(r,"pino",{enumerable:!0,get:function(){return _.default}}),l.__exportStar(d(46499),r),l.__exportStar(d(96873),r)},96873:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.generateChildLogger=r.formatChildLoggerContext=r.getLoggerContext=r.setBrowserLoggerContext=r.getBrowserLoggerContext=r.getDefaultLoggerOptions=void 0;const l=d(46499);function E(y,v=l.PINO_CUSTOM_CONTEXT_KEY){return y[v]||""}function S(y,v,b=l.PINO_CUSTOM_CONTEXT_KEY){return y[b]=v,y}function a(y,v=l.PINO_CUSTOM_CONTEXT_KEY){let b="";return b=typeof y.bindings>"u"?E(y,v):y.bindings().context||"",b}function h(y,v,b=l.PINO_CUSTOM_CONTEXT_KEY){const A=a(y,b);return A.trim()?`${A}/${v}`:v}r.getDefaultLoggerOptions=function _(y){return Object.assign(Object.assign({},y),{level:y?.level||l.PINO_LOGGER_DEFAULTS.level})},r.getBrowserLoggerContext=E,r.setBrowserLoggerContext=S,r.getLoggerContext=a,r.formatChildLoggerContext=h,r.generateChildLogger=function g(y,v,b=l.PINO_CUSTOM_CONTEXT_KEY){const A=h(y,v,b);return S(y.child({context:A}),A,b)}},62079:()=>{},6375:()=>{},86205:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(30004);l.__exportStar(d(20725),r),l.__exportStar(d(48562),r)},20725:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_THOUSAND=r.ONE_HUNDRED=void 0,r.ONE_HUNDRED=100,r.ONE_THOUSAND=1e3},48562:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=5*r.ONE_MINUTE,r.TEN_MINUTES=10*r.ONE_MINUTE,r.THIRTY_MINUTES=30*r.ONE_MINUTE,r.SIXTY_MINUTES=60*r.ONE_MINUTE,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=3*r.ONE_HOUR,r.SIX_HOURS=6*r.ONE_HOUR,r.TWELVE_HOURS=12*r.ONE_HOUR,r.TWENTY_FOUR_HOURS=24*r.ONE_HOUR,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=3*r.ONE_DAY,r.FIVE_DAYS=5*r.ONE_DAY,r.SEVEN_DAYS=7*r.ONE_DAY,r.THIRTY_DAYS=30*r.ONE_DAY,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=2*r.ONE_WEEK,r.THREE_WEEKS=3*r.ONE_WEEK,r.FOUR_WEEKS=4*r.ONE_WEEK,r.ONE_YEAR=365*r.ONE_DAY},43961:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(30004);l.__exportStar(d(64497),r),l.__exportStar(d(63509),r),l.__exportStar(d(43622),r),l.__exportStar(d(86205),r)},43622:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),d(30004).__exportStar(d(99761),r)},99761:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.IWatch=void 0;r.IWatch=class d{}},88784:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fromMiliseconds=r.toMiliseconds=void 0;const l=d(86205);r.toMiliseconds=function _(S){return S*l.ONE_THOUSAND},r.fromMiliseconds=function E(S){return Math.floor(S/l.ONE_THOUSAND)}},77657:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.delay=void 0,r.delay=function d(l){return new Promise(_=>{setTimeout(()=>{_(!0)},l)})}},64497:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(30004);l.__exportStar(d(77657),r),l.__exportStar(d(88784),r)},63509:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Watch=void 0;class d{constructor(){this.timestamps=new Map}start(_){if(this.timestamps.has(_))throw new Error(`Watch already started for label: ${_}`);this.timestamps.set(_,{started:Date.now()})}stop(_){const E=this.get(_);if(typeof E.elapsed<"u")throw new Error(`Watch already stopped for label: ${_}`);const S=Date.now()-E.started;this.timestamps.set(_,{started:E.started,elapsed:S})}get(_){const E=this.timestamps.get(_);if(typeof E>"u")throw new Error(`No timestamp found for label: ${_}`);return E}elapsed(_){const E=this.get(_);return E.elapsed||Date.now()-E.started}}r.Watch=d,r.default=d},10976:(ne,r,d)=>{"use strict";r.O6=r.hf=void 0;const _=d(85639),E=d(54502),S=d(69815);function a(b,A=r.hf){return A.randomBytes(b)}r.hf=new _.SystemRandomSource,r.O6=a;const g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function y(b,A=g,O=r.hf){if(A.length<2)throw new Error("randomString charset is too short");if(A.length>256)throw new Error("randomString charset is too long");let C="";const T=A.length,N=256-256%T;for(;b>0;){const M=a(Math.ceil(256*b/N),O);for(let P=0;P0;P++){const R=M[P];R{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserRandomSource=void 0;r.BrowserRandomSource=class l{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const E=typeof self<"u"?self.crypto||self.msCrypto:null;E&&void 0!==E.getRandomValues&&(this._crypto=E,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(E){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const S=new Uint8Array(E);for(let a=0;a{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.NodeRandomSource=void 0;const l=d(69815);r.NodeRandomSource=class _{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const S=d(41348);S&&S.randomBytes&&(this._crypto=S,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(S){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let a=this._crypto.randomBytes(S);if(a.length!==S)throw new Error("NodeRandomSource: got fewer bytes than requested");const h=new Uint8Array(S);for(let g=0;g{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SystemRandomSource=void 0;const l=d(38459),_=d(41981);r.SystemRandomSource=class E{constructor(){return this.isAvailable=!1,this.name="",this._source=new l.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new _.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(a){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(a)}}},6499:(ne,r)=>{"use strict";function d(O){let C;return typeof window<"u"&&typeof window[O]<"u"&&(C=window[O]),C}function l(O){const C=d(O);if(!C)throw new Error(`${O} is not defined in Window`);return C}Object.defineProperty(r,"__esModule",{value:!0}),r.getLocalStorage=r.getLocalStorageOrThrow=r.getCrypto=r.getCryptoOrThrow=r.getLocation=r.getLocationOrThrow=r.getNavigator=r.getNavigatorOrThrow=r.getDocument=r.getDocumentOrThrow=r.getFromWindowOrThrow=r.getFromWindow=void 0,r.getFromWindow=d,r.getFromWindowOrThrow=l,r.getDocumentOrThrow=function _(){return l("document")},r.getDocument=function E(){return d("document")},r.getNavigatorOrThrow=function S(){return l("navigator")},r.getNavigator=function a(){return d("navigator")},r.getLocationOrThrow=function h(){return l("location")},r.getLocation=function g(){return d("location")},r.getCryptoOrThrow=function y(){return l("crypto")},r.getCrypto=function v(){return d("crypto")},r.getLocalStorageOrThrow=function b(){return l("localStorage")},r.getLocalStorage=function A(){return d("localStorage")}},30543:(ne,r,d)=>{"use strict";r.D=void 0;const _=d(6499);r.D=function E(){let S,a;try{S=_.getDocumentOrThrow(),a=_.getLocationOrThrow()}catch{return null}function g(...N){const M=S.getElementsByTagName("meta");for(let P=0;PR.getAttribute(H)).filter(H=>!!H&&N.includes(H));if(L.length&&L){const H=R.getAttribute("content");if(H)return H}}return""}const b=function y(){let N=g("name","og:site_name","og:title","twitter:title");return N||(N=S.title),N}();return{description:function v(){return g("description","og:description","twitter:description","keywords")}(),url:a.origin,icons:function h(){const N=S.getElementsByTagName("link"),M=[];for(let P=0;P-1){const H=R.getAttribute("href");if(H)if(-1===H.toLowerCase().indexOf("https:")&&-1===H.toLowerCase().indexOf("http:")&&0!==H.indexOf("//")){let V=a.protocol+"//"+a.host;if(0===H.indexOf("/"))V+=H;else{const J=a.pathname.split("/");J.pop();V+=J.join("/")+"/"+H}M.push(V)}else if(0===H.indexOf("//")){const V=a.protocol+H;M.push(V)}else M.push(H)}}return M}(),name:b}}},88599:ne=>{function r(d){this._db=d,this._operations=[],this._written=!1}r.prototype._checkWritten=function(){if(this._written)throw new Error("write() already called on this batch")},r.prototype.put=function(d,l){this._checkWritten();var _=this._db._checkKeyValue(d,"key",this._db._isBuffer);if(_||(_=this._db._checkKeyValue(l,"value",this._db._isBuffer)))throw _;return this._db._isBuffer(d)||(d=String(d)),this._db._isBuffer(l)||(l=String(l)),"function"==typeof this._put?this._put(d,l):this._operations.push({type:"put",key:d,value:l}),this},r.prototype.del=function(d){this._checkWritten();var l=this._db._checkKeyValue(d,"key",this._db._isBuffer);if(l)throw l;return this._db._isBuffer(d)||(d=String(d)),"function"==typeof this._del?this._del(d):this._operations.push({type:"del",key:d}),this},r.prototype.clear=function(){return this._checkWritten(),this._operations=[],"function"==typeof this._clear&&this._clear(),this},r.prototype.write=function(d,l){if(this._checkWritten(),"function"==typeof d&&(l=d),"function"!=typeof l)throw new Error("write() requires a callback argument");return"object"!=typeof d&&(d={}),this._written=!0,"function"==typeof this._write?this._write(l):"function"==typeof this._db._batch?this._db._batch(this._operations,d,l):void process.nextTick(l)},ne.exports=r},14968:ne=>{function r(d){this.db=d,this._ended=!1,this._nexting=!1}r.prototype.next=function(d){var l=this;if("function"!=typeof d)throw new Error("next() requires a callback argument");return l._ended?d(new Error("cannot call next() after end()")):l._nexting?d(new Error("cannot call next() before previous next() has completed")):(l._nexting=!0,"function"==typeof l._next?l._next(function(){l._nexting=!1,d.apply(null,arguments)}):void process.nextTick(function(){l._nexting=!1,d()}))},r.prototype.end=function(d){if("function"!=typeof d)throw new Error("end() requires a callback argument");return this._ended?d(new Error("end() already called on iterator")):(this._ended=!0,"function"==typeof this._end?this._end(d):void process.nextTick(d))},ne.exports=r},30826:(ne,r,d)=>{var _=d(78677),E=d(14968),S=d(88599);function a(h){if(!arguments.length||void 0===h)throw new Error("constructor requires at least a location argument");if("string"!=typeof h)throw new Error("constructor requires a location string argument");this.location=h}a.prototype.open=function(h,g){if("function"==typeof h&&(g=h),"function"!=typeof g)throw new Error("open() requires a callback argument");if("object"!=typeof h&&(h={}),"function"==typeof this._open)return this._open(h,g);process.nextTick(g)},a.prototype.close=function(h){if("function"!=typeof h)throw new Error("close() requires a callback argument");if("function"==typeof this._close)return this._close(h);process.nextTick(h)},a.prototype.get=function(h,g,y){var v;if("function"==typeof g&&(y=g),"function"!=typeof y)throw new Error("get() requires a callback argument");return(v=this._checkKeyValue(h,"key",this._isBuffer))?y(v):(this._isBuffer(h)||(h=String(h)),"object"!=typeof g&&(g={}),"function"==typeof this._get?this._get(h,g,y):void process.nextTick(function(){y(new Error("NotFound"))}))},a.prototype.put=function(h,g,y,v){var b;if("function"==typeof y&&(v=y),"function"!=typeof v)throw new Error("put() requires a callback argument");return(b=this._checkKeyValue(h,"key",this._isBuffer))||(b=this._checkKeyValue(g,"value",this._isBuffer))?v(b):(this._isBuffer(h)||(h=String(h)),!this._isBuffer(g)&&!process.browser&&(g=String(g)),"object"!=typeof y&&(y={}),"function"==typeof this._put?this._put(h,g,y,v):void process.nextTick(v))},a.prototype.del=function(h,g,y){var v;if("function"==typeof g&&(y=g),"function"!=typeof y)throw new Error("del() requires a callback argument");return(v=this._checkKeyValue(h,"key",this._isBuffer))?y(v):(this._isBuffer(h)||(h=String(h)),"object"!=typeof g&&(g={}),"function"==typeof this._del?this._del(h,g,y):void process.nextTick(y))},a.prototype.batch=function(h,g,y){if(!arguments.length)return this._chainedBatch();if("function"==typeof g&&(y=g),"function"!=typeof y)throw new Error("batch(array) requires a callback argument");if(!Array.isArray(h))return y(new Error("batch(array) requires an array argument"));"object"!=typeof g&&(g={});for(var A,O,v=0,b=h.length;v{"use strict";function d(Z,W){return{validate:Z,compare:W}}Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0,r.fullFormats={date:d(S,a),time:d(g,y),"date-time":d(function b(Z){const W=Z.split(v);return 2===W.length&&S(W[0])&&g(W[1],!0)},A),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function T(Z){return O.test(Z)&&C.test(Z)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function Y(Z){if(J.test(Z))return!1;try{return new RegExp(Z),!0}catch{return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function M(Z){return N.lastIndex=0,N.test(Z)},int32:{type:"number",validate:function L(Z){return Number.isInteger(Z)&&Z<=R&&Z>=P}},int64:{type:"number",validate:function H(Z){return Number.isInteger(Z)}},float:{type:"number",validate:V},double:{type:"number",validate:V},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:d(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:d(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y),"date-time":d(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,A),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);const _=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,E=[0,31,28,31,30,31,30,31,31,30,31,30,31];function S(Z){const W=_.exec(Z);if(!W)return!1;const Q=+W[1],D=+W[2],o=+W[3];return D>=1&&D<=12&&o>=1&&o<=(2===D&&function l(Z){return Z%4==0&&(Z%100!=0||Z%400==0)}(Q)?29:E[D])}function a(Z,W){if(Z&&W)return Z>W?1:Z(W=D[1]+D[2]+D[3]+(D[4]||""))?1:Z{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(35180),_=d(65413),E=d(56382),S=new E.Name("fullFormats"),a=new E.Name("fastFormats"),h=(y,v={keywords:!0})=>{if(Array.isArray(v))return g(y,v,l.fullFormats,S),y;const[b,A]="fast"===v.mode?[l.fastFormats,a]:[l.fullFormats,S];return g(y,v.formats||l.formatNames,b,A),v.keywords&&_.default(y),y};function g(y,v,b,A){var O,C;null!==(O=(C=y.opts.code).formats)&&void 0!==O||(C.formats=E._`require("ajv-formats/dist/formats").${A}`);for(const T of v)y.addFormat(T,b[T])}h.get=(y,v="full")=>{const A=("fast"===v?l.fastFormats:l.fullFormats)[y];if(!A)throw new Error(`Unknown format "${y}"`);return A},ne.exports=r=h,Object.defineProperty(r,"__esModule",{value:!0}),r.default=h},65413:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const l=d(74411),_=d(56382),E=_.operators,S={formatMaximum:{okStr:"<=",ok:E.LTE,fail:E.GT},formatMinimum:{okStr:">=",ok:E.GTE,fail:E.LT},formatExclusiveMaximum:{okStr:"<",ok:E.LT,fail:E.GTE},formatExclusiveMinimum:{okStr:">",ok:E.GT,fail:E.LTE}},a={message:({keyword:g,schemaCode:y})=>_.str`should be ${S[g].okStr} ${y}`,params:({keyword:g,schemaCode:y})=>_._`{comparison: ${S[g].okStr}, limit: ${y}}`};r.formatLimitDefinition={keyword:Object.keys(S),type:"string",schemaType:"string",$data:!0,error:a,code(g){const{gen:y,data:v,schemaCode:b,keyword:A,it:O}=g,{opts:C,self:T}=O;if(!C.validateFormats)return;const N=new l.KeywordCxt(O,T.RULES.all.format.definition,"format");function R(L){return _._`${L}.compare(${v}, ${b}) ${S[A].fail} 0`}N.$data?function M(){const L=y.scopeValue("formats",{ref:T.formats,code:C.code.formats}),H=y.const("fmt",_._`${L}[${N.schemaCode}]`);g.fail$data(_.or(_._`typeof ${H} != "object"`,_._`${H} instanceof RegExp`,_._`typeof ${H}.compare != "function"`,R(H)))}():function P(){const L=N.schema,H=T.formats[L];if(!H||!0===H)return;if("object"!=typeof H||H instanceof RegExp||"function"!=typeof H.compare)throw new Error(`"${A}": format "${L}" does not define "compare" function`);const V=y.scopeValue("formats",{key:L,ref:H,code:C.code.formats?_._`${C.code.formats}${_.getProperty(L)}`:void 0});g.fail$data(R(V))}()},dependencies:["format"]};r.default=g=>(g.addKeyword(r.formatLimitDefinition),g)},74411:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MissingRefError=r.ValidationError=r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;const l=d(25910),_=d(77032),E=d(81849),S=d(98),a=["/properties"],h="http://json-schema.org/draft-07/schema";class g extends l.default{_addVocabularies(){super._addVocabularies(),_.default.forEach(C=>this.addVocabulary(C)),this.opts.discriminator&&this.addKeyword(E.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const C=this.opts.$data?this.$dataMetaSchema(S,a):S;this.addMetaSchema(C,h,!1),this.refs["http://json-schema.org/schema"]=h}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(h)?h:void 0)}}ne.exports=r=g,Object.defineProperty(r,"__esModule",{value:!0}),r.default=g;var y=d(66764);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return y.KeywordCxt}});var v=d(56382);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return v._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return v.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return v.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return v.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return v.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return v.CodeGen}});var b=d(20496);Object.defineProperty(r,"ValidationError",{enumerable:!0,get:function(){return b.default}});var A=d(80140);Object.defineProperty(r,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},26295:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class d{}r._CodeOrName=d,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class l extends d{constructor(P){if(super(),!r.IDENTIFIER.test(P))throw new Error("CodeGen: name must be a valid identifier");this.str=P}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=l;class _ extends d{constructor(P){super(),this._items="string"==typeof P?[P]:P}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const P=this._items[0];return""===P||'""'===P}get str(){var P;return null!==(P=this._str)&&void 0!==P?P:this._str=this._items.reduce((R,L)=>`${R}${L}`,"")}get names(){var P;return null!==(P=this._names)&&void 0!==P?P:this._names=this._items.reduce((R,L)=>(L instanceof l&&(R[L.str]=(R[L.str]||0)+1),R),{})}}function E(M,...P){const R=[M[0]];let L=0;for(;L{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const l=d(26295),_=d(1917);var E=d(26295);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return E.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return E.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return E.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return E.Name}});var S=d(1917);Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return S.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return S.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return S.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return S.varKinds}}),r.operators={GT:new l._Code(">"),GTE:new l._Code(">="),LT:new l._Code("<"),LTE:new l._Code("<="),EQ:new l._Code("==="),NEQ:new l._Code("!=="),NOT:new l._Code("!"),OR:new l._Code("||"),AND:new l._Code("&&"),ADD:new l._Code("+")};class a{optimizeNodes(){return this}optimizeNames(ee,ue){return this}}class h extends a{constructor(ee,ue,we){super(),this.varKind=ee,this.name=ue,this.rhs=we}render({es5:ee,_n:ue}){const we=ee?_.varKinds.var:this.varKind,me=void 0===this.rhs?"":` = ${this.rhs}`;return`${we} ${this.name}${me};`+ue}optimizeNames(ee,ue){if(ee[this.name.str])return this.rhs&&(this.rhs=m(this.rhs,ee,ue)),this}get names(){return this.rhs instanceof l._CodeOrName?this.rhs.names:{}}}class g extends a{constructor(ee,ue,we){super(),this.lhs=ee,this.rhs=ue,this.sideEffects=we}render({_n:ee}){return`${this.lhs} = ${this.rhs};`+ee}optimizeNames(ee,ue){if(!(this.lhs instanceof l.Name)||ee[this.lhs.str]||this.sideEffects)return this.rhs=m(this.rhs,ee,ue),this}get names(){return u(this.lhs instanceof l.Name?{}:{...this.lhs.names},this.rhs)}}class y extends g{constructor(ee,ue,we,me){super(ee,we,me),this.op=ue}render({_n:ee}){return`${this.lhs} ${this.op}= ${this.rhs};`+ee}}class v extends a{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`${this.label}:`+ee}}class b extends a{constructor(ee){super(),this.label=ee,this.names={}}render({_n:ee}){return`break${this.label?` ${this.label}`:""};`+ee}}class A extends a{constructor(ee){super(),this.error=ee}render({_n:ee}){return`throw ${this.error};`+ee}get names(){return this.error.names}}class O extends a{constructor(ee){super(),this.code=ee}render({_n:ee}){return`${this.code};`+ee}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(ee,ue){return this.code=m(this.code,ee,ue),this}get names(){return this.code instanceof l._CodeOrName?this.code.names:{}}}class C extends a{constructor(ee=[]){super(),this.nodes=ee}render(ee){return this.nodes.reduce((ue,we)=>ue+we.render(ee),"")}optimizeNodes(){const{nodes:ee}=this;let ue=ee.length;for(;ue--;){const we=ee[ue].optimizeNodes();Array.isArray(we)?ee.splice(ue,1,...we):we?ee[ue]=we:ee.splice(ue,1)}return ee.length>0?this:void 0}optimizeNames(ee,ue){const{nodes:we}=this;let me=we.length;for(;me--;){const ve=we[me];ve.optimizeNames(ee,ue)||(w(ee,ve.names),we.splice(me,1))}return we.length>0?this:void 0}get names(){return this.nodes.reduce((ee,ue)=>o(ee,ue.names),{})}}class T extends C{render(ee){return"{"+ee._n+super.render(ee)+"}"+ee._n}}class N extends C{}class M extends T{}M.kind="else";class P extends T{constructor(ee,ue){super(ue),this.condition=ee}render(ee){let ue=`if(${this.condition})`+super.render(ee);return this.else&&(ue+="else "+this.else.render(ee)),ue}optimizeNodes(){super.optimizeNodes();const ee=this.condition;if(!0===ee)return this.nodes;let ue=this.else;if(ue){const we=ue.optimizeNodes();ue=this.else=Array.isArray(we)?new M(we):we}return ue?!1===ee?ue instanceof P?ue:ue.nodes:this.nodes.length?this:new P(x(ee),ue instanceof P?[ue]:ue.nodes):!1!==ee&&this.nodes.length?this:void 0}optimizeNames(ee,ue){var we;if(this.else=null===(we=this.else)||void 0===we?void 0:we.optimizeNames(ee,ue),super.optimizeNames(ee,ue)||this.else)return this.condition=m(this.condition,ee,ue),this}get names(){const ee=super.names;return u(ee,this.condition),this.else&&o(ee,this.else.names),ee}}P.kind="if";class R extends T{}R.kind="for";class L extends R{constructor(ee){super(),this.iteration=ee}render(ee){return`for(${this.iteration})`+super.render(ee)}optimizeNames(ee,ue){if(super.optimizeNames(ee,ue))return this.iteration=m(this.iteration,ee,ue),this}get names(){return o(super.names,this.iteration.names)}}class H extends R{constructor(ee,ue,we,me){super(),this.varKind=ee,this.name=ue,this.from=we,this.to=me}render(ee){const ue=ee.es5?_.varKinds.var:this.varKind,{name:we,from:me,to:ve}=this;return`for(${ue} ${we}=${me}; ${we}<${ve}; ${we}++)`+super.render(ee)}get names(){const ee=u(super.names,this.from);return u(ee,this.to)}}class V extends R{constructor(ee,ue,we,me){super(),this.loop=ee,this.varKind=ue,this.name=we,this.iterable=me}render(ee){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(ee)}optimizeNames(ee,ue){if(super.optimizeNames(ee,ue))return this.iterable=m(this.iterable,ee,ue),this}get names(){return o(super.names,this.iterable.names)}}class J extends T{constructor(ee,ue,we){super(),this.name=ee,this.args=ue,this.async=we}render(ee){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(ee)}}J.kind="func";class Y extends C{render(ee){return"return "+super.render(ee)}}Y.kind="return";class Z extends T{render(ee){let ue="try"+super.render(ee);return this.catch&&(ue+=this.catch.render(ee)),this.finally&&(ue+=this.finally.render(ee)),ue}optimizeNodes(){var ee,ue;return super.optimizeNodes(),null===(ee=this.catch)||void 0===ee||ee.optimizeNodes(),null===(ue=this.finally)||void 0===ue||ue.optimizeNodes(),this}optimizeNames(ee,ue){var we,me;return super.optimizeNames(ee,ue),null===(we=this.catch)||void 0===we||we.optimizeNames(ee,ue),null===(me=this.finally)||void 0===me||me.optimizeNames(ee,ue),this}get names(){const ee=super.names;return this.catch&&o(ee,this.catch.names),this.finally&&o(ee,this.finally.names),ee}}class W extends T{constructor(ee){super(),this.error=ee}render(ee){return`catch(${this.error})`+super.render(ee)}}W.kind="catch";class Q extends T{render(ee){return"finally"+super.render(ee)}}Q.kind="finally";function o(te,ee){for(const ue in ee)te[ue]=(te[ue]||0)+(ee[ue]||0);return te}function u(te,ee){return ee instanceof l._CodeOrName?o(te,ee.names):te}function m(te,ee,ue){return te instanceof l.Name?we(te):function me(ve){return ve instanceof l._Code&&ve._items.some(ce=>ce instanceof l.Name&&1===ee[ce.str]&&void 0!==ue[ce.str])}(te)?new l._Code(te._items.reduce((ve,ce)=>(ce instanceof l.Name&&(ce=we(ce)),ce instanceof l._Code?ve.push(...ce._items):ve.push(ce),ve),[])):te;function we(ve){const ce=ue[ve.str];return void 0===ce||1!==ee[ve.str]?ve:(delete ee[ve.str],ce)}}function w(te,ee){for(const ue in ee)te[ue]=(te[ue]||0)-(ee[ue]||0)}function x(te){return"boolean"==typeof te||"number"==typeof te||null===te?!te:l._`!${ie(te)}`}r.CodeGen=class D{constructor(ee,ue={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ue,_n:ue.lines?"\n":""},this._extScope=ee,this._scope=new _.Scope({parent:ee}),this._nodes=[new N]}toString(){return this._root.render(this.opts)}name(ee){return this._scope.name(ee)}scopeName(ee){return this._extScope.name(ee)}scopeValue(ee,ue){const we=this._extScope.value(ee,ue);return(this._values[we.prefix]||(this._values[we.prefix]=new Set)).add(we),we}getScopeValue(ee,ue){return this._extScope.getValue(ee,ue)}scopeRefs(ee){return this._extScope.scopeRefs(ee,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(ee,ue,we,me){const ve=this._scope.toName(ue);return void 0!==we&&me&&(this._constants[ve.str]=we),this._leafNode(new h(ee,ve,we)),ve}const(ee,ue,we){return this._def(_.varKinds.const,ee,ue,we)}let(ee,ue,we){return this._def(_.varKinds.let,ee,ue,we)}var(ee,ue,we){return this._def(_.varKinds.var,ee,ue,we)}assign(ee,ue,we){return this._leafNode(new g(ee,ue,we))}add(ee,ue){return this._leafNode(new y(ee,r.operators.ADD,ue))}code(ee){return"function"==typeof ee?ee():ee!==l.nil&&this._leafNode(new O(ee)),this}object(...ee){const ue=["{"];for(const[we,me]of ee)ue.length>1&&ue.push(","),ue.push(we),(we!==me||this.opts.es5)&&(ue.push(":"),(0,l.addCodeArg)(ue,me));return ue.push("}"),new l._Code(ue)}if(ee,ue,we){if(this._blockNode(new P(ee)),ue&&we)this.code(ue).else().code(we).endIf();else if(ue)this.code(ue).endIf();else if(we)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(ee){return this._elseNode(new P(ee))}else(){return this._elseNode(new M)}endIf(){return this._endBlockNode(P,M)}_for(ee,ue){return this._blockNode(ee),ue&&this.code(ue).endFor(),this}for(ee,ue){return this._for(new L(ee),ue)}forRange(ee,ue,we,me,ve=(this.opts.es5?_.varKinds.var:_.varKinds.let)){const ce=this._scope.toName(ee);return this._for(new H(ve,ce,ue,we),()=>me(ce))}forOf(ee,ue,we,me=_.varKinds.const){const ve=this._scope.toName(ee);if(this.opts.es5){const ce=ue instanceof l.Name?ue:this.var("_arr",ue);return this.forRange("_i",0,l._`${ce}.length`,he=>{this.var(ve,l._`${ce}[${he}]`),we(ve)})}return this._for(new V("of",me,ve,ue),()=>we(ve))}forIn(ee,ue,we,me=(this.opts.es5?_.varKinds.var:_.varKinds.const)){if(this.opts.ownProperties)return this.forOf(ee,l._`Object.keys(${ue})`,we);const ve=this._scope.toName(ee);return this._for(new V("in",me,ve,ue),()=>we(ve))}endFor(){return this._endBlockNode(R)}label(ee){return this._leafNode(new v(ee))}break(ee){return this._leafNode(new b(ee))}return(ee){const ue=new Y;if(this._blockNode(ue),this.code(ee),1!==ue.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Y)}try(ee,ue,we){if(!ue&&!we)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new Z;if(this._blockNode(me),this.code(ee),ue){const ve=this.name("e");this._currNode=me.catch=new W(ve),ue(ve)}return we&&(this._currNode=me.finally=new Q,this.code(we)),this._endBlockNode(W,Q)}throw(ee){return this._leafNode(new A(ee))}block(ee,ue){return this._blockStarts.push(this._nodes.length),ee&&this.code(ee).endBlock(ue),this}endBlock(ee){const ue=this._blockStarts.pop();if(void 0===ue)throw new Error("CodeGen: not in self-balancing block");const we=this._nodes.length-ue;if(we<0||void 0!==ee&&we!==ee)throw new Error(`CodeGen: wrong number of nodes: ${we} vs ${ee} expected`);return this._nodes.length=ue,this}func(ee,ue=l.nil,we,me){return this._blockNode(new J(ee,ue,we)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(J)}optimize(ee=1){for(;ee-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(ee){return this._currNode.nodes.push(ee),this}_blockNode(ee){this._currNode.nodes.push(ee),this._nodes.push(ee)}_endBlockNode(ee,ue){const we=this._currNode;if(we instanceof ee||ue&&we instanceof ue)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ue?`${ee.kind}/${ue.kind}`:ee.kind}"`)}_elseNode(ee){const ue=this._currNode;if(!(ue instanceof P))throw new Error('CodeGen: "else" without "if"');return this._currNode=ue.else=ee,this}get _root(){return this._nodes[0]}get _currNode(){const ee=this._nodes;return ee[ee.length-1]}set _currNode(ee){const ue=this._nodes;ue[ue.length-1]=ee}},r.not=x;const F=B(r.operators.AND);r.and=function G(...te){return te.reduce(F)};const k=B(r.operators.OR);function B(te){return(ee,ue)=>ee===l.nil?ue:ue===l.nil?ee:l._`${ie(ee)} ${te} ${ie(ue)}`}function ie(te){return te instanceof l.Name?te:l._`(${te})`}r.or=function p(...te){return te.reduce(k)}},1917:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const l=d(26295);class _ extends Error{constructor(v){super(`CodeGen: "code" for ${v} not defined`),this.value=v.value}}var E,y;(y=E=r.UsedValueState||(r.UsedValueState={}))[y.Started=0]="Started",y[y.Completed=1]="Completed",r.varKinds={const:new l.Name("const"),let:new l.Name("let"),var:new l.Name("var")};class S{constructor({prefixes:v,parent:b}={}){this._names={},this._prefixes=v,this._parent=b}toName(v){return v instanceof l.Name?v:this.name(v)}name(v){return new l.Name(this._newName(v))}_newName(v){return`${v}${(this._names[v]||this._nameGroup(v)).index++}`}_nameGroup(v){var b,A;if(null!==(A=null===(b=this._parent)||void 0===b?void 0:b._prefixes)&&void 0!==A&&A.has(v)||this._prefixes&&!this._prefixes.has(v))throw new Error(`CodeGen: prefix "${v}" is not allowed in this scope`);return this._names[v]={prefix:v,index:0}}}r.Scope=S;class a extends l.Name{constructor(v,b){super(b),this.prefix=v}setValue(v,{property:b,itemIndex:A}){this.value=v,this.scopePath=l._`.${new l.Name(b)}[${A}]`}}r.ValueScopeName=a;const h=l._`\n`;r.ValueScope=class g extends S{constructor(v){super(v),this._values={},this._scope=v.scope,this.opts={...v,_n:v.lines?h:l.nil}}get(){return this._scope}name(v){return new a(v,this._newName(v))}value(v,b){var A;if(void 0===b.ref)throw new Error("CodeGen: ref must be passed in value");const O=this.toName(v),{prefix:C}=O,T=null!==(A=b.key)&&void 0!==A?A:b.ref;let N=this._values[C];if(N){const R=N.get(T);if(R)return R}else N=this._values[C]=new Map;N.set(T,O);const M=this._scope[C]||(this._scope[C]=[]),P=M.length;return M[P]=b.ref,O.setValue(b,{property:C,itemIndex:P}),O}getValue(v,b){const A=this._values[v];if(A)return A.get(b)}scopeRefs(v,b=this._values){return this._reduceValues(b,A=>{if(void 0===A.scopePath)throw new Error(`CodeGen: name "${A}" has no value`);return l._`${v}${A.scopePath}`})}scopeCode(v=this._values,b,A){return this._reduceValues(v,O=>{if(void 0===O.value)throw new Error(`CodeGen: name "${O}" has no value`);return O.value.code},b,A)}_reduceValues(v,b,A={},O){let C=l.nil;for(const T in v){const N=v[T];if(!N)continue;const M=A[T]=A[T]||new Map;N.forEach(P=>{if(M.has(P))return;M.set(P,E.Started);let R=b(P);if(R){const L=this.opts.es5?r.varKinds.var:r.varKinds.const;C=l._`${C}${L} ${P} = ${R};${this.opts._n}`}else{if(!(R=O?.(P)))throw new _(P);C=l._`${C}${R}${this.opts._n}`}M.set(P,E.Completed)})}return C}}},75091:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const l=d(56382),_=d(97990),E=d(5976);function y(M,P){const R=M.const("err",P);M.if(l._`${E.default.vErrors} === null`,()=>M.assign(E.default.vErrors,l._`[${R}]`),l._`${E.default.vErrors}.push(${R})`),M.code(l._`${E.default.errors}++`)}function v(M,P){const{gen:R,validateName:L,schemaEnv:H}=M;H.$async?R.throw(l._`new ${M.ValidationError}(${P})`):(R.assign(l._`${L}.errors`,P),R.return(!1))}r.keywordError={message:({keyword:M})=>l.str`must pass "${M}" keyword validation`},r.keyword$DataError={message:({keyword:M,schemaType:P})=>P?l.str`"${M}" keyword must be ${P} ($data)`:l.str`"${M}" keyword is invalid ($data)`},r.reportError=function S(M,P=r.keywordError,R,L){const{it:H}=M,{gen:V,compositeRule:J,allErrors:Y}=H,Z=A(M,P,R);L??(J||Y)?y(V,Z):v(H,l._`[${Z}]`)},r.reportExtraError=function a(M,P=r.keywordError,R){const{it:L}=M,{gen:H,compositeRule:V,allErrors:J}=L;y(H,A(M,P,R)),V||J||v(L,E.default.vErrors)},r.resetErrorsCount=function h(M,P){M.assign(E.default.errors,P),M.if(l._`${E.default.vErrors} !== null`,()=>M.if(P,()=>M.assign(l._`${E.default.vErrors}.length`,P),()=>M.assign(E.default.vErrors,null)))},r.extendErrors=function g({gen:M,keyword:P,schemaValue:R,data:L,errsCount:H,it:V}){if(void 0===H)throw new Error("ajv implementation error");const J=M.name("err");M.forRange("i",H,E.default.errors,Y=>{M.const(J,l._`${E.default.vErrors}[${Y}]`),M.if(l._`${J}.instancePath === undefined`,()=>M.assign(l._`${J}.instancePath`,(0,l.strConcat)(E.default.instancePath,V.errorPath))),M.assign(l._`${J}.schemaPath`,l.str`${V.errSchemaPath}/${P}`),V.opts.verbose&&(M.assign(l._`${J}.schema`,R),M.assign(l._`${J}.data`,L))})};const b={keyword:new l.Name("keyword"),schemaPath:new l.Name("schemaPath"),params:new l.Name("params"),propertyName:new l.Name("propertyName"),message:new l.Name("message"),schema:new l.Name("schema"),parentSchema:new l.Name("parentSchema")};function A(M,P,R){const{createErrors:L}=M.it;return!1===L?l._`{}`:function O(M,P,R={}){const{gen:L,it:H}=M,V=[C(H,R),T(M,R)];return function N(M,{params:P,message:R},L){const{keyword:H,data:V,schemaValue:J,it:Y}=M,{opts:Z,propertyName:W,topSchemaRef:Q,schemaPath:D}=Y;L.push([b.keyword,H],[b.params,"function"==typeof P?P(M):P||l._`{}`]),Z.messages&&L.push([b.message,"function"==typeof R?R(M):R]),Z.verbose&&L.push([b.schema,J],[b.parentSchema,l._`${Q}${D}`],[E.default.data,V]),W&&L.push([b.propertyName,W])}(M,P,V),L.object(...V)}(M,P,R)}function C({errorPath:M},{instancePath:P}){const R=P?l.str`${M}${(0,_.getErrorPath)(P,_.Type.Str)}`:M;return[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,R)]}function T({keyword:M,it:{errSchemaPath:P}},{schemaPath:R,parentSchema:L}){let H=L?P:l.str`${P}/${M}`;return R&&(H=l.str`${H}${(0,_.getErrorPath)(R,_.Type.Str)}`),[b.schemaPath,H]}},17140:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.resolveSchema=r.getCompilingSchema=r.resolveRef=r.compileSchema=r.SchemaEnv=void 0;const l=d(56382),_=d(20496),E=d(5976),S=d(31880),a=d(97990),h=d(66764);class g{constructor(R){var L;let H;this.refs={},this.dynamicAnchors={},"object"==typeof R.schema&&(H=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=null!==(L=R.baseId)&&void 0!==L?L:(0,S.normalizeId)(H?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=H?.$async,this.refs={}}}function y(P){const R=A.call(this,P);if(R)return R;const L=(0,S.getFullPath)(this.opts.uriResolver,P.root.baseId),{es5:H,lines:V}=this.opts.code,{ownProperties:J}=this.opts,Y=new l.CodeGen(this.scope,{es5:H,lines:V,ownProperties:J});let Z;P.$async&&(Z=Y.scopeValue("Error",{ref:_.default,code:l._`require("ajv/dist/runtime/validation_error").default`}));const W=Y.scopeName("validate");P.validateName=W;const Q={gen:Y,allErrors:this.opts.allErrors,data:E.default.data,parentData:E.default.parentData,parentDataProperty:E.default.parentDataProperty,dataNames:[E.default.data],dataPathArr:[l.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:Y.scopeValue("schema",!0===this.opts.code.source?{ref:P.schema,code:(0,l.stringify)(P.schema)}:{ref:P.schema}),validateName:W,ValidationError:Z,schema:P.schema,schemaEnv:P,rootId:L,baseId:P.baseId||L,schemaPath:l.nil,errSchemaPath:P.schemaPath||(this.opts.jtd?"":"#"),errorPath:l._`""`,opts:this.opts,self:this};let D;try{this._compilations.add(P),(0,h.validateFunctionCode)(Q),Y.optimize(this.opts.code.optimize);const o=Y.toString();D=`${Y.scopeRefs(E.default.scope)}return ${o}`,this.opts.code.process&&(D=this.opts.code.process(D,P));const m=new Function(`${E.default.self}`,`${E.default.scope}`,D)(this,this.scope.get());if(this.scope.value(W,{ref:m}),m.errors=null,m.schema=P.schema,m.schemaEnv=P,P.$async&&(m.$async=!0),!0===this.opts.code.source&&(m.source={validateName:W,validateCode:o,scopeValues:Y._values}),this.opts.unevaluated){const{props:w,items:x}=Q;m.evaluated={props:w instanceof l.Name?void 0:w,items:x instanceof l.Name?void 0:x,dynamicProps:w instanceof l.Name,dynamicItems:x instanceof l.Name},m.source&&(m.source.evaluated=(0,l.stringify)(m.evaluated))}return P.validate=m,P}catch(o){throw delete P.validate,delete P.validateName,D&&this.logger.error("Error compiling schema, function code:",D),o}finally{this._compilations.delete(P)}}function b(P){return(0,S.inlineRef)(P.schema,this.opts.inlineRefs)?P.schema:P.validate?P:y.call(this,P)}function A(P){for(const R of this._compilations)if(O(R,P))return R}function O(P,R){return P.schema===R.schema&&P.root===R.root&&P.baseId===R.baseId}function C(P,R){let L;for(;"string"==typeof(L=this.refs[R]);)R=L;return L||this.schemas[R]||T.call(this,P,R)}function T(P,R){const L=this.opts.uriResolver.parse(R),H=(0,S._getFullPath)(this.opts.uriResolver,L);let V=(0,S.getFullPath)(this.opts.uriResolver,P.baseId,void 0);if(Object.keys(P.schema).length>0&&H===V)return M.call(this,L,P);const J=(0,S.normalizeId)(H),Y=this.refs[J]||this.schemas[J];if("string"==typeof Y){const Z=T.call(this,P,Y);return"object"!=typeof Z?.schema?void 0:M.call(this,L,Z)}if("object"==typeof Y?.schema){if(Y.validate||y.call(this,Y),J===(0,S.normalizeId)(R)){const{schema:Z}=Y,{schemaId:W}=this.opts,Q=Z[W];return Q&&(V=(0,S.resolveUrl)(this.opts.uriResolver,V,Q)),new g({schema:Z,schemaId:W,root:P,baseId:V})}return M.call(this,L,Y)}}r.SchemaEnv=g,r.compileSchema=y,r.resolveRef=function v(P,R,L){var H;L=(0,S.resolveUrl)(this.opts.uriResolver,R,L);const V=P.refs[L];if(V)return V;let J=C.call(this,P,L);if(void 0===J){const Y=null===(H=P.localRefs)||void 0===H?void 0:H[L],{schemaId:Z}=this.opts;Y&&(J=new g({schema:Y,schemaId:Z,root:P,baseId:R}))}return void 0!==J?P.refs[L]=b.call(this,J):void 0},r.getCompilingSchema=A,r.resolveSchema=T;const N=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function M(P,{baseId:R,schema:L,root:H}){var V;if("/"!==(null===(V=P.fragment)||void 0===V?void 0:V[0]))return;for(const Z of P.fragment.slice(1).split("/")){if("boolean"==typeof L)return;const W=L[(0,a.unescapeFragment)(Z)];if(void 0===W)return;const Q="object"==typeof(L=W)&&L[this.opts.schemaId];!N.has(Z)&&Q&&(R=(0,S.resolveUrl)(this.opts.uriResolver,R,Q))}let J;if("boolean"!=typeof L&&L.$ref&&!(0,a.schemaHasRulesButRef)(L,this.RULES)){const Z=(0,S.resolveUrl)(this.opts.uriResolver,R,L.$ref);J=T.call(this,H,Z)}const{schemaId:Y}=this.opts;return J=J||new g({schema:L,schemaId:Y,root:H,baseId:R}),J.schema!==J.root.schema?J:void 0}},5976:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_={data:new l.Name("data"),valCxt:new l.Name("valCxt"),instancePath:new l.Name("instancePath"),parentData:new l.Name("parentData"),parentDataProperty:new l.Name("parentDataProperty"),rootData:new l.Name("rootData"),dynamicAnchors:new l.Name("dynamicAnchors"),vErrors:new l.Name("vErrors"),errors:new l.Name("errors"),this:new l.Name("this"),self:new l.Name("self"),scope:new l.Name("scope"),json:new l.Name("json"),jsonPos:new l.Name("jsonPos"),jsonLen:new l.Name("jsonLen"),jsonPart:new l.Name("jsonPart")};r.default=_},80140:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(31880);class _ extends Error{constructor(S,a,h,g){super(g||`can't resolve reference ${h} from id ${a}`),this.missingRef=(0,l.resolveUrl)(S,a,h),this.missingSchema=(0,l.normalizeId)((0,l.getFullPath)(S,this.missingRef))}}r.default=_},31880:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getSchemaRefs=r.resolveUrl=r.normalizeId=r._getFullPath=r.getFullPath=r.inlineRef=void 0;const l=d(97990),_=d(12559),E=d(23366),S=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);r.inlineRef=function a(M,P=!0){return"boolean"==typeof M||(!0===P?!g(M):!!P&&y(M)<=P)};const h=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function g(M){for(const P in M){if(h.has(P))return!0;const R=M[P];if(Array.isArray(R)&&R.some(g)||"object"==typeof R&&g(R))return!0}return!1}function y(M){let P=0;for(const R in M){if("$ref"===R)return 1/0;if(P++,!S.has(R)&&("object"==typeof M[R]&&(0,l.eachItem)(M[R],L=>P+=y(L)),P===1/0))return 1/0}return P}function v(M,P="",R){!1!==R&&(P=O(P));const L=M.parse(P);return b(M,L)}function b(M,P){return M.serialize(P).split("#")[0]+"#"}r.getFullPath=v,r._getFullPath=b;const A=/#\/?$/;function O(M){return M?M.replace(A,""):""}r.normalizeId=O,r.resolveUrl=function C(M,P,R){return R=O(R),M.resolve(P,R)};const T=/^[a-z_][-a-z0-9._]*$/i;r.getSchemaRefs=function N(M,P){if("boolean"==typeof M)return{};const{schemaId:R,uriResolver:L}=this.opts,H=O(M[R]||P),V={"":H},J=v(L,H,!1),Y={},Z=new Set;return E(M,{allKeys:!0},(D,o,u,m)=>{if(void 0===m)return;const w=J+o;let x=V[m];function F(k){const p=this.opts.uriResolver.resolve;if(k=O(x?p(x,k):k),Z.has(k))throw Q(k);Z.add(k);let B=this.refs[k];return"string"==typeof B&&(B=this.refs[B]),"object"==typeof B?W(D,B.schema,k):k!==O(w)&&("#"===k[0]?(W(D,Y[k],k),Y[k]=D):this.refs[k]=w),k}function G(k){if("string"==typeof k){if(!T.test(k))throw new Error(`invalid anchor "${k}"`);F.call(this,`#${k}`)}}"string"==typeof D[R]&&(x=F.call(this,D[R])),G.call(this,D.$anchor),G.call(this,D.$dynamicAnchor),V[o]=x}),Y;function W(D,o,u){if(void 0!==o&&!_(D,o))throw Q(u)}function Q(D){return new Error(`reference "${D}" resolves to more than one schema`)}}},62848:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getRules=r.isJSONType=void 0;const l=new Set(["string","number","integer","boolean","null","object","array"]);r.isJSONType=function _(S){return"string"==typeof S&&l.has(S)},r.getRules=function E(){const S={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...S,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},S.number,S.string,S.array,S.object],post:{rules:[]},all:{},keywords:{}}}},97990:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.checkStrictMode=r.getErrorPath=r.Type=r.useFunc=r.setEvaluated=r.evaluatedPropsToName=r.mergeEvaluated=r.eachItem=r.unescapeJsonPointer=r.escapeJsonPointer=r.escapeFragment=r.unescapeFragment=r.schemaRefOrVal=r.schemaHasRulesButRef=r.schemaHasRules=r.checkUnknownRules=r.alwaysValidSchema=r.toHash=void 0;const l=d(56382),_=d(26295);function a(J,Y=J.schema){const{opts:Z,self:W}=J;if(!Z.strictSchema||"boolean"==typeof Y)return;const Q=W.RULES.keywords;for(const D in Y)Q[D]||V(J,`unknown keyword: "${D}"`)}function h(J,Y){if("boolean"==typeof J)return!J;for(const Z in J)if(Y[Z])return!0;return!1}function A(J){return"number"==typeof J?`${J}`:J.replace(/~/g,"~0").replace(/\//g,"~1")}function O(J){return J.replace(/~1/g,"/").replace(/~0/g,"~")}function T({mergeNames:J,mergeToName:Y,mergeValues:Z,resultToName:W}){return(Q,D,o,u)=>{const m=void 0===o?D:o instanceof l.Name?(D instanceof l.Name?J(Q,D,o):Y(Q,D,o),o):D instanceof l.Name?(Y(Q,o,D),D):Z(D,o);return u!==l.Name||m instanceof l.Name?m:W(Q,m)}}function N(J,Y){if(!0===Y)return J.var("props",!0);const Z=J.var("props",l._`{}`);return void 0!==Y&&M(J,Z,Y),Z}function M(J,Y,Z){Object.keys(Z).forEach(W=>J.assign(l._`${Y}${(0,l.getProperty)(W)}`,!0))}r.toHash=function E(J){const Y={};for(const Z of J)Y[Z]=!0;return Y},r.alwaysValidSchema=function S(J,Y){return"boolean"==typeof Y?Y:0===Object.keys(Y).length||(a(J,Y),!h(Y,J.self.RULES.all))},r.checkUnknownRules=a,r.schemaHasRules=h,r.schemaHasRulesButRef=function g(J,Y){if("boolean"==typeof J)return!J;for(const Z in J)if("$ref"!==Z&&Y.all[Z])return!0;return!1},r.schemaRefOrVal=function y({topSchemaRef:J,schemaPath:Y},Z,W,Q){if(!Q){if("number"==typeof Z||"boolean"==typeof Z)return Z;if("string"==typeof Z)return l._`${Z}`}return l._`${J}${Y}${(0,l.getProperty)(W)}`},r.unescapeFragment=function v(J){return O(decodeURIComponent(J))},r.escapeFragment=function b(J){return encodeURIComponent(A(J))},r.escapeJsonPointer=A,r.unescapeJsonPointer=O,r.eachItem=function C(J,Y){if(Array.isArray(J))for(const Z of J)Y(Z);else Y(J)},r.mergeEvaluated={props:T({mergeNames:(J,Y,Z)=>J.if(l._`${Z} !== true && ${Y} !== undefined`,()=>{J.if(l._`${Y} === true`,()=>J.assign(Z,!0),()=>J.assign(Z,l._`${Z} || {}`).code(l._`Object.assign(${Z}, ${Y})`))}),mergeToName:(J,Y,Z)=>J.if(l._`${Z} !== true`,()=>{!0===Y?J.assign(Z,!0):(J.assign(Z,l._`${Z} || {}`),M(J,Z,Y))}),mergeValues:(J,Y)=>!0===J||{...J,...Y},resultToName:N}),items:T({mergeNames:(J,Y,Z)=>J.if(l._`${Z} !== true && ${Y} !== undefined`,()=>J.assign(Z,l._`${Y} === true ? true : ${Z} > ${Y} ? ${Z} : ${Y}`)),mergeToName:(J,Y,Z)=>J.if(l._`${Z} !== true`,()=>J.assign(Z,!0===Y||l._`${Z} > ${Y} ? ${Z} : ${Y}`)),mergeValues:(J,Y)=>!0===J||Math.max(J,Y),resultToName:(J,Y)=>J.var("items",Y)})},r.evaluatedPropsToName=N,r.setEvaluated=M;const P={};var L,J;function V(J,Y,Z=J.opts.strictSchema){if(Z){if(Y=`strict mode: ${Y}`,!0===Z)throw new Error(Y);J.self.logger.warn(Y)}}r.useFunc=function R(J,Y){return J.scopeValue("func",{ref:Y,code:P[Y.code]||(P[Y.code]=new _._Code(Y.code))})},(J=L=r.Type||(r.Type={}))[J.Num=0]="Num",J[J.Str=1]="Str",r.getErrorPath=function H(J,Y,Z){if(J instanceof l.Name){const W=Y===L.Num;return Z?W?l._`"[" + ${J} + "]"`:l._`"['" + ${J} + "']"`:W?l._`"/" + ${J}`:l._`"/" + ${J}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return Z?(0,l.getProperty)(J).toString():"/"+A(J)},r.checkStrictMode=V},20368:(ne,r)=>{"use strict";function l(E,S){return S.rules.some(a=>_(E,a))}function _(E,S){var a;return void 0!==E[S.keyword]||(null===(a=S.definition.implements)||void 0===a?void 0:a.some(h=>void 0!==E[h]))}Object.defineProperty(r,"__esModule",{value:!0}),r.shouldUseRule=r.shouldUseGroup=r.schemaHasRulesForType=void 0,r.schemaHasRulesForType=function d({schema:E,self:S},a){const h=S.RULES.types[a];return h&&!0!==h&&l(E,h)},r.shouldUseGroup=l,r.shouldUseRule=_},8007:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.boolOrEmptySchema=r.topBoolOrEmptySchema=void 0;const l=d(75091),_=d(56382),E=d(5976),S={message:"boolean schema is false"};function g(y,v){const{gen:b,data:A}=y,O={gen:b,keyword:"false schema",data:A,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:y};(0,l.reportError)(O,S,void 0,v)}r.topBoolOrEmptySchema=function a(y){const{gen:v,schema:b,validateName:A}=y;!1===b?g(y,!1):"object"==typeof b&&!0===b.$async?v.return(E.default.data):(v.assign(_._`${A}.errors`,null),v.return(!0))},r.boolOrEmptySchema=function h(y,v){const{gen:b,schema:A}=y;!1===A?(b.var(v,!1),g(y)):b.var(v,!0)}},59078:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.reportTypeError=r.checkDataTypes=r.checkDataType=r.coerceAndCheckDataType=r.getJSONTypes=r.getSchemaTypes=r.DataType=void 0;const l=d(62848),_=d(20368),E=d(75091),S=d(56382),a=d(97990);var h,L;function y(L){const H=Array.isArray(L)?L:L?[L]:[];if(H.every(l.isJSONType))return H;throw new Error("type must be JSONType or JSONType[]: "+H.join(","))}(L=h=r.DataType||(r.DataType={}))[L.Correct=0]="Correct",L[L.Wrong=1]="Wrong",r.getSchemaTypes=function g(L){const H=y(L.type);if(H.includes("null")){if(!1===L.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!H.length&&void 0!==L.nullable)throw new Error('"nullable" cannot be used without "type"');!0===L.nullable&&H.push("null")}return H},r.getJSONTypes=y,r.coerceAndCheckDataType=function v(L,H){const{gen:V,data:J,opts:Y}=L,Z=function A(L,H){return H?L.filter(V=>b.has(V)||"array"===H&&"array"===V):[]}(H,Y.coerceTypes),W=H.length>0&&!(0===Z.length&&1===H.length&&(0,_.schemaHasRulesForType)(L,H[0]));if(W){const Q=N(H,J,Y.strictNumbers,h.Wrong);V.if(Q,()=>{Z.length?function O(L,H,V){const{gen:J,data:Y,opts:Z}=L,W=J.let("dataType",S._`typeof ${Y}`),Q=J.let("coerced",S._`undefined`);"array"===Z.coerceTypes&&J.if(S._`${W} == 'object' && Array.isArray(${Y}) && ${Y}.length == 1`,()=>J.assign(Y,S._`${Y}[0]`).assign(W,S._`typeof ${Y}`).if(N(H,Y,Z.strictNumbers),()=>J.assign(Q,Y))),J.if(S._`${Q} !== undefined`);for(const o of V)(b.has(o)||"array"===o&&"array"===Z.coerceTypes)&&D(o);function D(o){switch(o){case"string":return void J.elseIf(S._`${W} == "number" || ${W} == "boolean"`).assign(Q,S._`"" + ${Y}`).elseIf(S._`${Y} === null`).assign(Q,S._`""`);case"number":return void J.elseIf(S._`${W} == "boolean" || ${Y} === null - || (${W} == "string" && ${Y} && ${Y} == +${Y})`).assign(Q,S._`+${Y}`);case"integer":return void J.elseIf(S._`${W} === "boolean" || ${Y} === null - || (${W} === "string" && ${Y} && ${Y} == +${Y} && !(${Y} % 1))`).assign(Q,S._`+${Y}`);case"boolean":return void J.elseIf(S._`${Y} === "false" || ${Y} === 0 || ${Y} === null`).assign(Q,!1).elseIf(S._`${Y} === "true" || ${Y} === 1`).assign(Q,!0);case"null":return J.elseIf(S._`${Y} === "" || ${Y} === 0 || ${Y} === false`),void J.assign(Q,null);case"array":J.elseIf(S._`${W} === "string" || ${W} === "number" - || ${W} === "boolean" || ${Y} === null`).assign(Q,S._`[${Y}]`)}}J.else(),P(L),J.endIf(),J.if(S._`${Q} !== undefined`,()=>{J.assign(Y,Q),function C({gen:L,parentData:H,parentDataProperty:V},J){L.if(S._`${H} !== undefined`,()=>L.assign(S._`${H}[${V}]`,J))}(L,Q)})}(L,H,Z):P(L)})}return W};const b=new Set(["string","number","integer","boolean","null"]);function T(L,H,V,J=h.Correct){const Y=J===h.Correct?S.operators.EQ:S.operators.NEQ;let Z;switch(L){case"null":return S._`${H} ${Y} null`;case"array":Z=S._`Array.isArray(${H})`;break;case"object":Z=S._`${H} && typeof ${H} == "object" && !Array.isArray(${H})`;break;case"integer":Z=W(S._`!(${H} % 1) && !isNaN(${H})`);break;case"number":Z=W();break;default:return S._`typeof ${H} ${Y} ${L}`}return J===h.Correct?Z:(0,S.not)(Z);function W(Q=S.nil){return(0,S.and)(S._`typeof ${H} == "number"`,Q,V?S._`isFinite(${H})`:S.nil)}}function N(L,H,V,J){if(1===L.length)return T(L[0],H,V,J);let Y;const Z=(0,a.toHash)(L);if(Z.array&&Z.object){const W=S._`typeof ${H} != "object"`;Y=Z.null?W:S._`!${H} || ${W}`,delete Z.null,delete Z.array,delete Z.object}else Y=S.nil;Z.number&&delete Z.integer;for(const W in Z)Y=(0,S.and)(Y,T(W,H,V,J));return Y}r.checkDataType=T,r.checkDataTypes=N;const M={message:({schema:L})=>`must be ${L}`,params:({schema:L,schemaValue:H})=>"string"==typeof L?S._`{type: ${L}}`:S._`{type: ${H}}`};function P(L){const H=function R(L){const{gen:H,data:V,schema:J}=L,Y=(0,a.schemaRefOrVal)(L,J,"type");return{gen:H,keyword:"type",data:V,schema:J.type,schemaCode:Y,schemaValue:Y,parentSchema:J,params:{},it:L}}(L);(0,E.reportError)(H,M)}r.reportTypeError=P},57866:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.assignDefaults=void 0;const l=d(56382),_=d(97990);function S(a,h,g){const{gen:y,compositeRule:v,data:b,opts:A}=a;if(void 0===g)return;const O=l._`${b}${(0,l.getProperty)(h)}`;if(v)return void(0,_.checkStrictMode)(a,`default is ignored for: ${O}`);let C=l._`${O} === undefined`;"empty"===A.useDefaults&&(C=l._`${C} || ${O} === null || ${O} === ""`),y.if(C,l._`${O} = ${(0,l.stringify)(g)}`)}r.assignDefaults=function E(a,h){const{properties:g,items:y}=a.schema;if("object"===h&&g)for(const v in g)S(a,v,g[v].default);else"array"===h&&Array.isArray(y)&&y.forEach((v,b)=>S(a,b,v.default))}},66764:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getData=r.KeywordCxt=r.validateFunctionCode=void 0;const l=d(8007),_=d(59078),E=d(20368),S=d(59078),a=d(57866),h=d(22707),g=d(62639),y=d(56382),v=d(5976),b=d(31880),A=d(97990),O=d(75091);function T({gen:de,validateName:ae,schema:ye,schemaEnv:Ce,opts:Pe},Ge){Pe.code.es5?de.func(ae,y._`${v.default.data}, ${v.default.valCxt}`,Ce.$async,()=>{de.code(y._`"use strict"; ${L(ye,Pe)}`),function M(de,ae){de.if(v.default.valCxt,()=>{de.var(v.default.instancePath,y._`${v.default.valCxt}.${v.default.instancePath}`),de.var(v.default.parentData,y._`${v.default.valCxt}.${v.default.parentData}`),de.var(v.default.parentDataProperty,y._`${v.default.valCxt}.${v.default.parentDataProperty}`),de.var(v.default.rootData,y._`${v.default.valCxt}.${v.default.rootData}`),ae.dynamicRef&&de.var(v.default.dynamicAnchors,y._`${v.default.valCxt}.${v.default.dynamicAnchors}`)},()=>{de.var(v.default.instancePath,y._`""`),de.var(v.default.parentData,y._`undefined`),de.var(v.default.parentDataProperty,y._`undefined`),de.var(v.default.rootData,v.default.data),ae.dynamicRef&&de.var(v.default.dynamicAnchors,y._`{}`)})}(de,Pe),de.code(Ge)}):de.func(ae,y._`${v.default.data}, ${function N(de){return y._`{${v.default.instancePath}="", ${v.default.parentData}, ${v.default.parentDataProperty}, ${v.default.rootData}=${v.default.data}${de.dynamicRef?y._`, ${v.default.dynamicAnchors}={}`:y.nil}}={}`}(Pe)}`,Ce.$async,()=>de.code(L(ye,Pe)).code(Ge))}function L(de,ae){const ye="object"==typeof de&&de[ae.schemaId];return ye&&(ae.code.source||ae.code.process)?y._`/*# sourceURL=${ye} */`:y.nil}function H(de,ae){J(de)&&(Z(de),V(de))?function Y(de,ae){const{schema:ye,gen:Ce,opts:Pe}=de;Pe.$comment&&ye.$comment&&m(de),function o(de){const ae=de.schema[de.opts.schemaId];ae&&(de.baseId=(0,b.resolveUrl)(de.opts.uriResolver,de.baseId,ae))}(de),function u(de){if(de.schema.$async&&!de.schemaEnv.$async)throw new Error("async schema in sync schema")}(de);const Ge=Ce.const("_errs",v.default.errors);W(de,Ge),Ce.var(ae,y._`${Ge} === ${v.default.errors}`)}(de,ae):(0,l.boolOrEmptySchema)(de,ae)}function V({schema:de,self:ae}){if("boolean"==typeof de)return!de;for(const ye in de)if(ae.RULES.all[ye])return!0;return!1}function J(de){return"boolean"!=typeof de.schema}function Z(de){(0,A.checkUnknownRules)(de),function Q(de){const{schema:ae,errSchemaPath:ye,opts:Ce,self:Pe}=de;ae.$ref&&Ce.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(ae,Pe.RULES)&&Pe.logger.warn(`$ref: keywords ignored in schema at path "${ye}"`)}(de)}function W(de,ae){if(de.opts.jtd)return F(de,[],!1,ae);const ye=(0,_.getSchemaTypes)(de.schema);F(de,ye,!(0,_.coerceAndCheckDataType)(de,ye),ae)}function m({gen:de,schemaEnv:ae,schema:ye,errSchemaPath:Ce,opts:Pe}){const Ge=ye.$comment;if(!0===Pe.$comment)de.code(y._`${v.default.self}.logger.log(${Ge})`);else if("function"==typeof Pe.$comment){const Ve=y.str`${Ce}/$comment`,Ue=de.scopeValue("root",{ref:ae.root});de.code(y._`${v.default.self}.opts.$comment(${Ge}, ${Ve}, ${Ue}.schema)`)}}function F(de,ae,ye,Ce){const{gen:Pe,schema:Ge,data:Ve,allErrors:Ue,opts:_t,self:Ze}=de,{RULES:$e}=Ze;function Pt(nt){(0,E.shouldUseGroup)(Ge,nt)&&(nt.type?(Pe.if((0,S.checkDataType)(nt.type,Ve,_t.strictNumbers)),G(de,nt),1===ae.length&&ae[0]===nt.type&&ye&&(Pe.else(),(0,S.reportTypeError)(de)),Pe.endIf()):G(de,nt),Ue||Pe.if(y._`${v.default.errors} === ${Ce||0}`))}!Ge.$ref||!_t.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(Ge,$e)?(_t.jtd||function k(de,ae){de.schemaEnv.meta||!de.opts.strictTypes||(function p(de,ae){if(ae.length){if(!de.dataTypes.length)return void(de.dataTypes=ae);ae.forEach(ye=>{ee(de.dataTypes,ye)||we(de,`type "${ye}" not allowed by context "${de.dataTypes.join(",")}"`)}),function ue(de,ae){const ye=[];for(const Ce of de.dataTypes)ee(ae,Ce)?ye.push(Ce):ae.includes("integer")&&"number"===Ce&&ye.push("integer");de.dataTypes=ye}(de,ae)}}(de,ae),de.opts.allowUnionTypes||function B(de,ae){ae.length>1&&(2!==ae.length||!ae.includes("null"))&&we(de,"use allowUnionTypes to allow union type keyword")}(de,ae),function ie(de,ae){const ye=de.self.RULES.all;for(const Ce in ye){const Pe=ye[Ce];if("object"==typeof Pe&&(0,E.shouldUseRule)(de.schema,Pe)){const{type:Ge}=Pe.definition;Ge.length&&!Ge.some(Ve=>te(ae,Ve))&&we(de,`missing type "${Ge.join(",")}" for keyword "${Ce}"`)}}}(de,de.dataTypes))}(de,ae),Pe.block(()=>{for(const nt of $e.rules)Pt(nt);Pt($e.post)})):Pe.block(()=>ve(de,"$ref",$e.all.$ref.definition))}function G(de,ae){const{gen:ye,schema:Ce,opts:{useDefaults:Pe}}=de;Pe&&(0,a.assignDefaults)(de,ae.type),ye.block(()=>{for(const Ge of ae.rules)(0,E.shouldUseRule)(Ce,Ge)&&ve(de,Ge.keyword,Ge.definition,ae.type)})}function te(de,ae){return de.includes(ae)||"number"===ae&&de.includes("integer")}function ee(de,ae){return de.includes(ae)||"integer"===ae&&de.includes("number")}function we(de,ae){ae+=` at "${de.schemaEnv.baseId+de.errSchemaPath}" (strictTypes)`,(0,A.checkStrictMode)(de,ae,de.opts.strictTypes)}r.validateFunctionCode=function C(de){J(de)&&(Z(de),V(de))?function P(de){const{schema:ae,opts:ye,gen:Ce}=de;T(de,()=>{ye.$comment&&ae.$comment&&m(de),function D(de){const{schema:ae,opts:ye}=de;void 0!==ae.default&&ye.useDefaults&&ye.strictSchema&&(0,A.checkStrictMode)(de,"default is ignored in the schema root")}(de),Ce.let(v.default.vErrors,null),Ce.let(v.default.errors,0),ye.unevaluated&&function R(de){const{gen:ae,validateName:ye}=de;de.evaluated=ae.const("evaluated",y._`${ye}.evaluated`),ae.if(y._`${de.evaluated}.dynamicProps`,()=>ae.assign(y._`${de.evaluated}.props`,y._`undefined`)),ae.if(y._`${de.evaluated}.dynamicItems`,()=>ae.assign(y._`${de.evaluated}.items`,y._`undefined`))}(de),W(de),function w(de){const{gen:ae,schemaEnv:ye,validateName:Ce,ValidationError:Pe,opts:Ge}=de;ye.$async?ae.if(y._`${v.default.errors} === 0`,()=>ae.return(v.default.data),()=>ae.throw(y._`new ${Pe}(${v.default.vErrors})`)):(ae.assign(y._`${Ce}.errors`,v.default.vErrors),Ge.unevaluated&&function x({gen:de,evaluated:ae,props:ye,items:Ce}){ye instanceof y.Name&&de.assign(y._`${ae}.props`,ye),Ce instanceof y.Name&&de.assign(y._`${ae}.items`,Ce)}(de),ae.return(y._`${v.default.errors} === 0`))}(de)})}(de):T(de,()=>(0,l.topBoolOrEmptySchema)(de))};class me{constructor(ae,ye,Ce){if((0,h.validateKeywordUsage)(ae,ye,Ce),this.gen=ae.gen,this.allErrors=ae.allErrors,this.keyword=Ce,this.data=ae.data,this.schema=ae.schema[Ce],this.$data=ye.$data&&ae.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(ae,this.schema,Ce,this.$data),this.schemaType=ye.schemaType,this.parentSchema=ae.schema,this.params={},this.it=ae,this.def=ye,this.$data)this.schemaCode=ae.gen.const("vSchema",le(this.$data,ae));else if(this.schemaCode=this.schemaValue,!(0,h.validSchemaType)(this.schema,ye.schemaType,ye.allowUndefined))throw new Error(`${Ce} value must be ${JSON.stringify(ye.schemaType)}`);("code"in ye?ye.trackErrors:!1!==ye.errors)&&(this.errsCount=ae.gen.const("_errs",v.default.errors))}result(ae,ye,Ce){this.failResult((0,y.not)(ae),ye,Ce)}failResult(ae,ye,Ce){this.gen.if(ae),Ce?Ce():this.error(),ye?(this.gen.else(),ye(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ae,ye){this.failResult((0,y.not)(ae),void 0,ye)}fail(ae){if(void 0===ae)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(ae),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ae){if(!this.$data)return this.fail(ae);const{schemaCode:ye}=this;this.fail(y._`${ye} !== undefined && (${(0,y.or)(this.invalid$data(),ae)})`)}error(ae,ye,Ce){if(ye)return this.setParams(ye),this._error(ae,Ce),void this.setParams({});this._error(ae,Ce)}_error(ae,ye){(ae?O.reportExtraError:O.reportError)(this,this.def.error,ye)}$dataError(){(0,O.reportError)(this,this.def.$dataError||O.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,O.resetErrorsCount)(this.gen,this.errsCount)}ok(ae){this.allErrors||this.gen.if(ae)}setParams(ae,ye){ye?Object.assign(this.params,ae):this.params=ae}block$data(ae,ye,Ce=y.nil){this.gen.block(()=>{this.check$data(ae,Ce),ye()})}check$data(ae=y.nil,ye=y.nil){if(!this.$data)return;const{gen:Ce,schemaCode:Pe,schemaType:Ge,def:Ve}=this;Ce.if((0,y.or)(y._`${Pe} === undefined`,ye)),ae!==y.nil&&Ce.assign(ae,!0),(Ge.length||Ve.validateSchema)&&(Ce.elseIf(this.invalid$data()),this.$dataError(),ae!==y.nil&&Ce.assign(ae,!1)),Ce.else()}invalid$data(){const{gen:ae,schemaCode:ye,schemaType:Ce,def:Pe,it:Ge}=this;return(0,y.or)(function Ve(){if(Ce.length){if(!(ye instanceof y.Name))throw new Error("ajv implementation error");const _t=Array.isArray(Ce)?Ce:[Ce];return y._`${(0,S.checkDataTypes)(_t,ye,Ge.opts.strictNumbers,S.DataType.Wrong)}`}return y.nil}(),function Ue(){if(Pe.validateSchema){const _t=ae.scopeValue("validate$data",{ref:Pe.validateSchema});return y._`!${_t}(${ye})`}return y.nil}())}subschema(ae,ye){const Ce=(0,g.getSubschema)(this.it,ae);(0,g.extendSubschemaData)(Ce,this.it,ae),(0,g.extendSubschemaMode)(Ce,ae);const Pe={...this.it,...Ce,items:void 0,props:void 0};return H(Pe,ye),Pe}mergeEvaluated(ae,ye){const{it:Ce,gen:Pe}=this;Ce.opts.unevaluated&&(!0!==Ce.props&&void 0!==ae.props&&(Ce.props=A.mergeEvaluated.props(Pe,ae.props,Ce.props,ye)),!0!==Ce.items&&void 0!==ae.items&&(Ce.items=A.mergeEvaluated.items(Pe,ae.items,Ce.items,ye)))}mergeValidEvaluated(ae,ye){const{it:Ce,gen:Pe}=this;if(Ce.opts.unevaluated&&(!0!==Ce.props||!0!==Ce.items))return Pe.if(ye,()=>this.mergeEvaluated(ae,y.Name)),!0}}function ve(de,ae,ye,Ce){const Pe=new me(de,ye,ae);"code"in ye?ye.code(Pe,Ce):Pe.$data&&ye.validate?(0,h.funcKeywordCode)(Pe,ye):"macro"in ye?(0,h.macroKeywordCode)(Pe,ye):(ye.compile||ye.validate)&&(0,h.funcKeywordCode)(Pe,ye)}r.KeywordCxt=me;const ce=/^\/(?:[^~]|~0|~1)*$/,he=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(de,{dataLevel:ae,dataNames:ye,dataPathArr:Ce}){let Pe,Ge;if(""===de)return v.default.rootData;if("/"===de[0]){if(!ce.test(de))throw new Error(`Invalid JSON-pointer: ${de}`);Pe=de,Ge=v.default.rootData}else{const Ze=he.exec(de);if(!Ze)throw new Error(`Invalid JSON-pointer: ${de}`);const $e=+Ze[1];if(Pe=Ze[2],"#"===Pe){if($e>=ae)throw new Error(_t("property/index",$e));return Ce[ae-$e]}if($e>ae)throw new Error(_t("data",$e));if(Ge=ye[ae-$e],!Pe)return Ge}let Ve=Ge;const Ue=Pe.split("/");for(const Ze of Ue)Ze&&(Ge=y._`${Ge}${(0,y.getProperty)((0,A.unescapeJsonPointer)(Ze))}`,Ve=y._`${Ve} && ${Ge}`);return Ve;function _t(Ze,$e){return`Cannot access ${Ze} ${$e} levels up, current level is ${ae}`}}r.getData=le},22707:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateKeywordUsage=r.validSchemaType=r.funcKeywordCode=r.macroKeywordCode=void 0;const l=d(56382),_=d(5976),E=d(92812),S=d(75091);function g(C){const{gen:T,data:N,it:M}=C;T.if(M.parentData,()=>T.assign(N,l._`${M.parentData}[${M.parentDataProperty}]`))}function b(C,T,N){if(void 0===N)throw new Error(`keyword "${T}" failed to compile`);return C.scopeValue("keyword","function"==typeof N?{ref:N}:{ref:N,code:(0,l.stringify)(N)})}r.macroKeywordCode=function a(C,T){const{gen:N,keyword:M,schema:P,parentSchema:R,it:L}=C,H=T.macro.call(L.self,P,R,L),V=b(N,M,H);!1!==L.opts.validateSchema&&L.self.validateSchema(H,!0);const J=N.name("valid");C.subschema({schema:H,schemaPath:l.nil,errSchemaPath:`${L.errSchemaPath}/${M}`,topSchemaRef:V,compositeRule:!0},J),C.pass(J,()=>C.error(!0))},r.funcKeywordCode=function h(C,T){var N;const{gen:M,keyword:P,schema:R,parentSchema:L,$data:H,it:V}=C;!function v({schemaEnv:C},T){if(T.async&&!C.$async)throw new Error("async keyword in sync schema")}(V,T);const J=!H&&T.compile?T.compile.call(V.self,R,L,V):T.validate,Y=b(M,P,J),Z=M.let("valid");function o(m=(T.async?l._`await `:l.nil)){const w=V.opts.passContext?_.default.this:_.default.self,x=!("compile"in T&&!H||!1===T.schema);M.assign(Z,l._`${m}${(0,E.callValidateCode)(C,Y,w,x)}`,T.modifying)}function u(m){var w;M.if((0,l.not)(null!==(w=T.valid)&&void 0!==w?w:Z),m)}C.block$data(Z,function W(){if(!1===T.errors)o(),T.modifying&&g(C),u(()=>C.error());else{const m=T.async?function Q(){const m=M.let("ruleErrs",null);return M.try(()=>o(l._`await `),w=>M.assign(Z,!1).if(l._`${w} instanceof ${V.ValidationError}`,()=>M.assign(m,l._`${w}.errors`),()=>M.throw(w))),m}():function D(){const m=l._`${Y}.errors`;return M.assign(m,null),o(l.nil),m}();T.modifying&&g(C),u(()=>function y(C,T){const{gen:N}=C;N.if(l._`Array.isArray(${T})`,()=>{N.assign(_.default.vErrors,l._`${_.default.vErrors} === null ? ${T} : ${_.default.vErrors}.concat(${T})`).assign(_.default.errors,l._`${_.default.vErrors}.length`),(0,S.extendErrors)(C)},()=>C.error())}(C,m))}}),C.ok(null!==(N=T.valid)&&void 0!==N?N:Z)},r.validSchemaType=function A(C,T,N=!1){return!T.length||T.some(M=>"array"===M?Array.isArray(C):"object"===M?C&&"object"==typeof C&&!Array.isArray(C):typeof C==M||N&&typeof C>"u")},r.validateKeywordUsage=function O({schema:C,opts:T,self:N,errSchemaPath:M},P,R){if(Array.isArray(P.keyword)?!P.keyword.includes(R):P.keyword!==R)throw new Error("ajv implementation error");const L=P.dependencies;if(L?.some(H=>!Object.prototype.hasOwnProperty.call(C,H)))throw new Error(`parent schema must have dependencies of ${R}: ${L.join(",")}`);if(P.validateSchema&&!P.validateSchema(C[R])){const V=`keyword "${R}" value is invalid at path "${M}": `+N.errorsText(P.validateSchema.errors);if("log"!==T.validateSchema)throw new Error(V);N.logger.error(V)}}},62639:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.extendSubschemaMode=r.extendSubschemaData=r.getSubschema=void 0;const l=d(56382),_=d(97990);r.getSubschema=function E(h,{keyword:g,schemaProp:y,schema:v,schemaPath:b,errSchemaPath:A,topSchemaRef:O}){if(void 0!==g&&void 0!==v)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==g){const C=h.schema[g];return void 0===y?{schema:C,schemaPath:l._`${h.schemaPath}${(0,l.getProperty)(g)}`,errSchemaPath:`${h.errSchemaPath}/${g}`}:{schema:C[y],schemaPath:l._`${h.schemaPath}${(0,l.getProperty)(g)}${(0,l.getProperty)(y)}`,errSchemaPath:`${h.errSchemaPath}/${g}/${(0,_.escapeFragment)(y)}`}}if(void 0!==v){if(void 0===b||void 0===A||void 0===O)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:v,schemaPath:b,topSchemaRef:O,errSchemaPath:A}}throw new Error('either "keyword" or "schema" must be passed')},r.extendSubschemaData=function S(h,g,{dataProp:y,dataPropType:v,data:b,dataTypes:A,propertyName:O}){if(void 0!==b&&void 0!==y)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:C}=g;if(void 0!==y){const{errorPath:N,dataPathArr:M,opts:P}=g;T(C.let("data",l._`${g.data}${(0,l.getProperty)(y)}`,!0)),h.errorPath=l.str`${N}${(0,_.getErrorPath)(y,v,P.jsPropertySyntax)}`,h.parentDataProperty=l._`${y}`,h.dataPathArr=[...M,h.parentDataProperty]}if(void 0!==b){T(b instanceof l.Name?b:C.let("data",b,!0)),void 0!==O&&(h.propertyName=O)}function T(N){h.data=N,h.dataLevel=g.dataLevel+1,h.dataTypes=[],g.definedProperties=new Set,h.parentData=g.data,h.dataNames=[...g.dataNames,N]}A&&(h.dataTypes=A)},r.extendSubschemaMode=function a(h,{jtdDiscriminator:g,jtdMetadata:y,compositeRule:v,createErrors:b,allErrors:A}){void 0!==v&&(h.compositeRule=v),void 0!==b&&(h.createErrors=b),void 0!==A&&(h.allErrors=A),h.jtdDiscriminator=g,h.jtdMetadata=y}},25910:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var _=d(66764);Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return _.KeywordCxt}});var E=d(56382);Object.defineProperty(r,"_",{enumerable:!0,get:function(){return E._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return E.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return E.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return E.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return E.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return E.CodeGen}});const S=d(20496),a=d(80140),h=d(62848),g=d(17140),y=d(56382),v=d(31880),b=d(59078),A=d(97990),O=d(64775),C=d(51364),T=(B,ie)=>new RegExp(B,ie);T.code="new RegExp";const N=["removeAdditional","useDefaults","coerceTypes"],M=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),P={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},L=200;function H(B){var ie,te,ee,ue,we,me,ve,ce,he,le,de,ae,ye,Ce,Pe,Ge,Ve,Ue,_t,Ze,$e,Pt,nt,rt,Lt;const Re=B.strict,Ae=null===(ie=B.code)||void 0===ie?void 0:ie.optimize,xe=!0===Ae||void 0===Ae?1:Ae||0,je=null!==(ee=null===(te=B.code)||void 0===te?void 0:te.regExp)&&void 0!==ee?ee:T,He=null!==(ue=B.uriResolver)&&void 0!==ue?ue:C.default;return{strictSchema:null===(me=null!==(we=B.strictSchema)&&void 0!==we?we:Re)||void 0===me||me,strictNumbers:null===(ce=null!==(ve=B.strictNumbers)&&void 0!==ve?ve:Re)||void 0===ce||ce,strictTypes:null!==(le=null!==(he=B.strictTypes)&&void 0!==he?he:Re)&&void 0!==le?le:"log",strictTuples:null!==(ae=null!==(de=B.strictTuples)&&void 0!==de?de:Re)&&void 0!==ae?ae:"log",strictRequired:null!==(Ce=null!==(ye=B.strictRequired)&&void 0!==ye?ye:Re)&&void 0!==Ce&&Ce,code:B.code?{...B.code,optimize:xe,regExp:je}:{optimize:xe,regExp:je},loopRequired:null!==(Pe=B.loopRequired)&&void 0!==Pe?Pe:L,loopEnum:null!==(Ge=B.loopEnum)&&void 0!==Ge?Ge:L,meta:null===(Ve=B.meta)||void 0===Ve||Ve,messages:null===(Ue=B.messages)||void 0===Ue||Ue,inlineRefs:null===(_t=B.inlineRefs)||void 0===_t||_t,schemaId:null!==(Ze=B.schemaId)&&void 0!==Ze?Ze:"$id",addUsedSchema:null===($e=B.addUsedSchema)||void 0===$e||$e,validateSchema:null===(Pt=B.validateSchema)||void 0===Pt||Pt,validateFormats:null===(nt=B.validateFormats)||void 0===nt||nt,unicodeRegExp:null===(rt=B.unicodeRegExp)||void 0===rt||rt,int32range:null===(Lt=B.int32range)||void 0===Lt||Lt,uriResolver:He}}class V{constructor(ie={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,ie=this.opts={...ie,...H(ie)};const{es5:te,lines:ee}=this.opts.code;this.scope=new y.ValueScope({scope:{},prefixes:M,es5:te,lines:ee}),this.logger=function u(B){if(!1===B)return o;if(void 0===B)return console;if(B.log&&B.warn&&B.error)return B;throw new Error("logger must implement log, warn and error methods")}(ie.logger);const ue=ie.validateFormats;ie.validateFormats=!1,this.RULES=(0,h.getRules)(),J.call(this,P,ie,"NOT SUPPORTED"),J.call(this,R,ie,"DEPRECATED","warn"),this._metaOpts=D.call(this),ie.formats&&W.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),ie.keywords&&Q.call(this,ie.keywords),"object"==typeof ie.meta&&this.addMetaSchema(ie.meta),Z.call(this),ie.validateFormats=ue}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:ie,meta:te,schemaId:ee}=this.opts;let ue=O;"id"===ee&&(ue={...O},ue.id=ue.$id,delete ue.$id),te&&ie&&this.addMetaSchema(ue,ue[ee],!1)}defaultMeta(){const{meta:ie,schemaId:te}=this.opts;return this.opts.defaultMeta="object"==typeof ie?ie[te]||ie:void 0}validate(ie,te){let ee;if("string"==typeof ie){if(ee=this.getSchema(ie),!ee)throw new Error(`no schema with key or ref "${ie}"`)}else ee=this.compile(ie);const ue=ee(te);return"$async"in ee||(this.errors=ee.errors),ue}compile(ie,te){const ee=this._addSchema(ie,te);return ee.validate||this._compileSchemaEnv(ee)}compileAsync(ie,te){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:ee}=this.opts;return ue.call(this,ie,te);function ue(Pe,Ge){return we.apply(this,arguments)}function we(){return(we=l(function*(Pe,Ge){yield me.call(this,Pe.$schema);const Ve=this._addSchema(Pe,Ge);return Ve.validate||ce.call(this,Ve)})).apply(this,arguments)}function me(Pe){return ve.apply(this,arguments)}function ve(){return(ve=l(function*(Pe){Pe&&!this.getSchema(Pe)&&(yield ue.call(this,{$ref:Pe},!0))})).apply(this,arguments)}function ce(Pe){return he.apply(this,arguments)}function he(){return(he=l(function*(Pe){try{return this._compileSchemaEnv(Pe)}catch(Ge){if(!(Ge instanceof a.default))throw Ge;return le.call(this,Ge),yield de.call(this,Ge.missingSchema),ce.call(this,Pe)}})).apply(this,arguments)}function le({missingSchema:Pe,missingRef:Ge}){if(this.refs[Pe])throw new Error(`AnySchema ${Pe} is loaded but ${Ge} cannot be resolved`)}function de(Pe){return ae.apply(this,arguments)}function ae(){return(ae=l(function*(Pe){const Ge=yield ye.call(this,Pe);this.refs[Pe]||(yield me.call(this,Ge.$schema)),this.refs[Pe]||this.addSchema(Ge,Pe,te)})).apply(this,arguments)}function ye(Pe){return Ce.apply(this,arguments)}function Ce(){return(Ce=l(function*(Pe){const Ge=this._loading[Pe];if(Ge)return Ge;try{return yield this._loading[Pe]=ee(Pe)}finally{delete this._loading[Pe]}})).apply(this,arguments)}}addSchema(ie,te,ee,ue=this.opts.validateSchema){if(Array.isArray(ie)){for(const me of ie)this.addSchema(me,void 0,ee,ue);return this}let we;if("object"==typeof ie){const{schemaId:me}=this.opts;if(we=ie[me],void 0!==we&&"string"!=typeof we)throw new Error(`schema ${me} must be string`)}return te=(0,v.normalizeId)(te||we),this._checkUnique(te),this.schemas[te]=this._addSchema(ie,ee,te,ue,!0),this}addMetaSchema(ie,te,ee=this.opts.validateSchema){return this.addSchema(ie,te,!0,ee),this}validateSchema(ie,te){if("boolean"==typeof ie)return!0;let ee;if(ee=ie.$schema,void 0!==ee&&"string"!=typeof ee)throw new Error("$schema must be a string");if(ee=ee||this.opts.defaultMeta||this.defaultMeta(),!ee)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const ue=this.validate(ee,ie);if(!ue&&te){const we="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(we);this.logger.error(we)}return ue}getSchema(ie){let te;for(;"string"==typeof(te=Y.call(this,ie));)ie=te;if(void 0===te){const{schemaId:ee}=this.opts,ue=new g.SchemaEnv({schema:{},schemaId:ee});if(te=g.resolveSchema.call(this,ue,ie),!te)return;this.refs[ie]=te}return te.validate||this._compileSchemaEnv(te)}removeSchema(ie){if(ie instanceof RegExp)return this._removeAllSchemas(this.schemas,ie),this._removeAllSchemas(this.refs,ie),this;switch(typeof ie){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const te=Y.call(this,ie);return"object"==typeof te&&this._cache.delete(te.schema),delete this.schemas[ie],delete this.refs[ie],this}case"object":{const te=ie;this._cache.delete(te);let ee=ie[this.opts.schemaId];return ee&&(ee=(0,v.normalizeId)(ee),delete this.schemas[ee],delete this.refs[ee]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(ie){for(const te of ie)this.addKeyword(te);return this}addKeyword(ie,te){let ee;if("string"==typeof ie)ee=ie,"object"==typeof te&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),te.keyword=ee);else{if("object"!=typeof ie||void 0!==te)throw new Error("invalid addKeywords parameters");if(ee=(te=ie).keyword,Array.isArray(ee)&&!ee.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(w.call(this,ee,te),!te)return(0,A.eachItem)(ee,we=>x.call(this,we)),this;G.call(this,te);const ue={...te,type:(0,b.getJSONTypes)(te.type),schemaType:(0,b.getJSONTypes)(te.schemaType)};return(0,A.eachItem)(ee,0===ue.type.length?we=>x.call(this,we,ue):we=>ue.type.forEach(me=>x.call(this,we,ue,me))),this}getKeyword(ie){const te=this.RULES.all[ie];return"object"==typeof te?te.definition:!!te}removeKeyword(ie){const{RULES:te}=this;delete te.keywords[ie],delete te.all[ie];for(const ee of te.rules){const ue=ee.rules.findIndex(we=>we.keyword===ie);ue>=0&&ee.rules.splice(ue,1)}return this}addFormat(ie,te){return"string"==typeof te&&(te=new RegExp(te)),this.formats[ie]=te,this}errorsText(ie=this.errors,{separator:te=", ",dataVar:ee="data"}={}){return ie&&0!==ie.length?ie.map(ue=>`${ee}${ue.instancePath} ${ue.message}`).reduce((ue,we)=>ue+te+we):"No errors"}$dataMetaSchema(ie,te){const ee=this.RULES.all;ie=JSON.parse(JSON.stringify(ie));for(const ue of te){const we=ue.split("/").slice(1);let me=ie;for(const ve of we)me=me[ve];for(const ve in ee){const ce=ee[ve];if("object"!=typeof ce)continue;const{$data:he}=ce.definition,le=me[ve];he&&le&&(me[ve]=p(le))}}return ie}_removeAllSchemas(ie,te){for(const ee in ie){const ue=ie[ee];(!te||te.test(ee))&&("string"==typeof ue?delete ie[ee]:ue&&!ue.meta&&(this._cache.delete(ue.schema),delete ie[ee]))}}_addSchema(ie,te,ee,ue=this.opts.validateSchema,we=this.opts.addUsedSchema){let me;const{schemaId:ve}=this.opts;if("object"==typeof ie)me=ie[ve];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof ie)throw new Error("schema must be object or boolean")}let ce=this._cache.get(ie);if(void 0!==ce)return ce;ee=(0,v.normalizeId)(me||ee);const he=v.getSchemaRefs.call(this,ie,ee);return ce=new g.SchemaEnv({schema:ie,schemaId:ve,meta:te,baseId:ee,localRefs:he}),this._cache.set(ce.schema,ce),we&&!ee.startsWith("#")&&(ee&&this._checkUnique(ee),this.refs[ee]=ce),ue&&this.validateSchema(ie,!0),ce}_checkUnique(ie){if(this.schemas[ie]||this.refs[ie])throw new Error(`schema with key or id "${ie}" already exists`)}_compileSchemaEnv(ie){if(ie.meta?this._compileMetaSchema(ie):g.compileSchema.call(this,ie),!ie.validate)throw new Error("ajv implementation error");return ie.validate}_compileMetaSchema(ie){const te=this.opts;this.opts=this._metaOpts;try{g.compileSchema.call(this,ie)}finally{this.opts=te}}}function J(B,ie,te,ee="error"){for(const ue in B){const we=ue;we in ie&&this.logger[ee](`${te}: option ${ue}. ${B[we]}`)}}function Y(B){return B=(0,v.normalizeId)(B),this.schemas[B]||this.refs[B]}function Z(){const B=this.opts.schemas;if(B)if(Array.isArray(B))this.addSchema(B);else for(const ie in B)this.addSchema(B[ie],ie)}function W(){for(const B in this.opts.formats){const ie=this.opts.formats[B];ie&&this.addFormat(B,ie)}}function Q(B){if(Array.isArray(B))this.addVocabulary(B);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const ie in B){const te=B[ie];te.keyword||(te.keyword=ie),this.addKeyword(te)}}}function D(){const B={...this.opts};for(const ie of N)delete B[ie];return B}r.default=V,V.ValidationError=S.default,V.MissingRefError=a.default;const o={log(){},warn(){},error(){}};const m=/^[a-z_$][a-z0-9_$:-]*$/i;function w(B,ie){const{RULES:te}=this;if((0,A.eachItem)(B,ee=>{if(te.keywords[ee])throw new Error(`Keyword ${ee} is already defined`);if(!m.test(ee))throw new Error(`Keyword ${ee} has invalid name`)}),ie&&ie.$data&&!("code"in ie)&&!("validate"in ie))throw new Error('$data keyword must have "code" or "validate" function')}function x(B,ie,te){var ee;const ue=ie?.post;if(te&&ue)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:we}=this;let me=ue?we.post:we.rules.find(({type:ce})=>ce===te);if(me||(me={type:te,rules:[]},we.rules.push(me)),we.keywords[B]=!0,!ie)return;const ve={keyword:B,definition:{...ie,type:(0,b.getJSONTypes)(ie.type),schemaType:(0,b.getJSONTypes)(ie.schemaType)}};ie.before?F.call(this,me,ve,ie.before):me.rules.push(ve),we.all[B]=ve,null===(ee=ie.implements)||void 0===ee||ee.forEach(ce=>this.addKeyword(ce))}function F(B,ie,te){const ee=B.rules.findIndex(ue=>ue.keyword===te);ee>=0?B.rules.splice(ee,0,ie):(B.rules.push(ie),this.logger.warn(`rule ${te} is not defined`))}function G(B){let{metaSchema:ie}=B;void 0!==ie&&(B.$data&&this.opts.$data&&(ie=p(ie)),B.validateSchema=this.compile(ie,!0))}const k={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function p(B){return{anyOf:[B,k]}}},40834:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(12559);l.code='require("ajv/dist/runtime/equal").default',r.default=l},26344:(ne,r)=>{"use strict";function d(l){const _=l.length;let a,E=0,S=0;for(;S<_;)E++,a=l.charCodeAt(S++),a>=55296&&a<=56319&&S<_&&(a=l.charCodeAt(S),56320==(64512&a)&&S++);return E}Object.defineProperty(r,"__esModule",{value:!0}),r.default=d,d.code='require("ajv/dist/runtime/ucs2length").default'},51364:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(96482);l.code='require("ajv/dist/runtime/uri").default',r.default=l},20496:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class d extends Error{constructor(_){super("validation failed"),this.errors=_,this.ajv=this.validation=!0}}r.default=d},29282:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateAdditionalItems=void 0;const l=d(56382),_=d(97990),S={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:h}})=>l.str`must NOT have more than ${h} items`,params:({params:{len:h}})=>l._`{limit: ${h}}`},code(h){const{parentSchema:g,it:y}=h,{items:v}=g;Array.isArray(v)?a(h,v):(0,_.checkStrictMode)(y,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(h,g){const{gen:y,schema:v,data:b,keyword:A,it:O}=h;O.items=!0;const C=y.const("len",l._`${b}.length`);if(!1===v)h.setParams({len:g.length}),h.pass(l._`${C} <= ${g.length}`);else if("object"==typeof v&&!(0,_.alwaysValidSchema)(O,v)){const N=y.var("valid",l._`${C} <= ${g.length}`);y.if((0,l.not)(N),()=>function T(N){y.forRange("i",g.length,C,M=>{h.subschema({keyword:A,dataProp:M,dataPropType:_.Type.Num},N),O.allErrors||y.if((0,l.not)(N),()=>y.break())})}(N)),h.ok(N)}}r.validateAdditionalItems=a,r.default=S},75459:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(92812),_=d(56382),E=d(5976),S=d(97990),h={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:g})=>_._`{additionalProperty: ${g.additionalProperty}}`},code(g){const{gen:y,schema:v,parentSchema:b,data:A,errsCount:O,it:C}=g;if(!O)throw new Error("ajv implementation error");const{allErrors:T,opts:N}=C;if(C.props=!0,"all"!==N.removeAdditional&&(0,S.alwaysValidSchema)(C,v))return;const M=(0,l.allSchemaProperties)(b.properties),P=(0,l.allSchemaProperties)(b.patternProperties);function H(Y){y.code(_._`delete ${A}[${Y}]`)}function V(Y){if("all"===N.removeAdditional||N.removeAdditional&&!1===v)H(Y);else{if(!1===v)return g.setParams({additionalProperty:Y}),g.error(),void(T||y.break());if("object"==typeof v&&!(0,S.alwaysValidSchema)(C,v)){const Z=y.name("valid");"failing"===N.removeAdditional?(J(Y,Z,!1),y.if((0,_.not)(Z),()=>{g.reset(),H(Y)})):(J(Y,Z),T||y.if((0,_.not)(Z),()=>y.break()))}}}function J(Y,Z,W){const Q={keyword:"additionalProperties",dataProp:Y,dataPropType:S.Type.Str};!1===W&&Object.assign(Q,{compositeRule:!0,createErrors:!1,allErrors:!1}),g.subschema(Q,Z)}(function R(){y.forIn("key",A,Y=>{M.length||P.length?y.if(function L(Y){let Z;if(M.length>8){const W=(0,S.schemaRefOrVal)(C,b.properties,"properties");Z=(0,l.isOwnProperty)(y,W,Y)}else Z=M.length?(0,_.or)(...M.map(W=>_._`${Y} === ${W}`)):_.nil;return P.length&&(Z=(0,_.or)(Z,...P.map(W=>_._`${(0,l.usePattern)(g,W)}.test(${Y})`))),(0,_.not)(Z)}(Y),()=>V(Y)):V(Y)})})(),g.ok(_._`${O} === ${E.default.errors}`)}};r.default=h},46186:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(97990),_={keyword:"allOf",schemaType:"array",code(E){const{gen:S,schema:a,it:h}=E;if(!Array.isArray(a))throw new Error("ajv implementation error");const g=S.name("valid");a.forEach((y,v)=>{if((0,l.alwaysValidSchema)(h,y))return;const b=E.subschema({keyword:"allOf",schemaProp:v},g);E.ok(g),E.mergeEvaluated(b)})}};r.default=_},60290:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const _={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:d(92812).validateUnion,error:{message:"must match a schema in anyOf"}};r.default=_},25738:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),S={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:h}})=>void 0===h?l.str`must contain at least ${a} valid item(s)`:l.str`must contain at least ${a} and no more than ${h} valid item(s)`,params:({params:{min:a,max:h}})=>void 0===h?l._`{minContains: ${a}}`:l._`{minContains: ${a}, maxContains: ${h}}`},code(a){const{gen:h,schema:g,parentSchema:y,data:v,it:b}=a;let A,O;const{minContains:C,maxContains:T}=y;b.opts.next?(A=void 0===C?1:C,O=T):A=1;const N=h.const("len",l._`${v}.length`);if(a.setParams({min:A,max:O}),void 0===O&&0===A)return void(0,_.checkStrictMode)(b,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==O&&A>O)return(0,_.checkStrictMode)(b,'"minContains" > "maxContains" is always invalid'),void a.fail();if((0,_.alwaysValidSchema)(b,g)){let H=l._`${N} >= ${A}`;return void 0!==O&&(H=l._`${H} && ${N} <= ${O}`),void a.pass(H)}b.items=!0;const M=h.name("valid");function P(){const H=h.name("_valid"),V=h.let("count",0);R(H,()=>h.if(H,()=>function L(H){h.code(l._`${H}++`),void 0===O?h.if(l._`${H} >= ${A}`,()=>h.assign(M,!0).break()):(h.if(l._`${H} > ${O}`,()=>h.assign(M,!1).break()),1===A?h.assign(M,!0):h.if(l._`${H} >= ${A}`,()=>h.assign(M,!0)))}(V)))}function R(H,V){h.forRange("i",0,N,J=>{a.subschema({keyword:"contains",dataProp:J,dataPropType:_.Type.Num,compositeRule:!0},H),V()})}void 0===O&&1===A?R(M,()=>h.if(M,()=>h.break())):0===A?(h.let(M,!0),void 0!==O&&h.if(l._`${v}.length > 0`,P)):(h.let(M,!1),P()),a.result(M,()=>a.reset())}};r.default=S},1886:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const l=d(56382),_=d(97990),E=d(92812);r.error={message:({params:{property:y,depsCount:v,deps:b}})=>{const A=1===v?"property":"properties";return l.str`must have ${A} ${b} when property ${y} is present`},params:({params:{property:y,depsCount:v,deps:b,missingProperty:A}})=>l._`{property: ${y}, - missingProperty: ${A}, - depsCount: ${v}, - deps: ${b}}`};const S={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(y){const[v,b]=function a({schema:y}){const v={},b={};for(const A in y){if("__proto__"===A)continue;(Array.isArray(y[A])?v:b)[A]=y[A]}return[v,b]}(y);h(y,v),g(y,b)}};function h(y,v=y.schema){const{gen:b,data:A,it:O}=y;if(0===Object.keys(v).length)return;const C=b.let("missing");for(const T in v){const N=v[T];if(0===N.length)continue;const M=(0,E.propertyInData)(b,A,T,O.opts.ownProperties);y.setParams({property:T,depsCount:N.length,deps:N.join(", ")}),O.allErrors?b.if(M,()=>{for(const P of N)(0,E.checkReportMissingProp)(y,P)}):(b.if(l._`${M} && (${(0,E.checkMissingProp)(y,N,C)})`),(0,E.reportMissingProp)(y,C),b.else())}}function g(y,v=y.schema){const{gen:b,data:A,keyword:O,it:C}=y,T=b.name("valid");for(const N in v)(0,_.alwaysValidSchema)(C,v[N])||(b.if((0,E.propertyInData)(b,A,N,C.opts.ownProperties),()=>{const M=y.subschema({keyword:O,schemaProp:N},T);y.mergeValidEvaluated(M,T)},()=>b.var(T,!0)),y.ok(T))}r.validatePropertyDeps=h,r.validateSchemaDeps=g,r.default=S},43632:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),S={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:h})=>l.str`must match "${h.ifClause}" schema`,params:({params:h})=>l._`{failingKeyword: ${h.ifClause}}`},code(h){const{gen:g,parentSchema:y,it:v}=h;void 0===y.then&&void 0===y.else&&(0,_.checkStrictMode)(v,'"if" without "then" and "else" is ignored');const b=a(v,"then"),A=a(v,"else");if(!b&&!A)return;const O=g.let("valid",!0),C=g.name("_valid");if(function T(){const M=h.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},C);h.mergeEvaluated(M)}(),h.reset(),b&&A){const M=g.let("ifClause");h.setParams({ifClause:M}),g.if(C,N("then",M),N("else",M))}else b?g.if(C,N("then")):g.if((0,l.not)(C),N("else"));function N(M,P){return()=>{const R=h.subschema({keyword:M},C);g.assign(O,C),h.mergeValidEvaluated(R,O),P?g.assign(P,l._`${M}`):h.setParams({ifClause:M})}}h.pass(O,()=>h.error(!0))}};function a(h,g){const y=h.schema[g];return void 0!==y&&!(0,_.alwaysValidSchema)(h,y)}r.default=S},17737:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(29282),_=d(84947),E=d(69180),S=d(41785),a=d(25738),h=d(1886),g=d(37947),y=d(75459),v=d(68415),b=d(50896),A=d(36330),O=d(60290),C=d(92337),T=d(46186),N=d(43632),M=d(71344);r.default=function P(R=!1){const L=[A.default,O.default,C.default,T.default,N.default,M.default,g.default,y.default,h.default,v.default,b.default];return R?L.push(_.default,S.default):L.push(l.default,E.default),L.push(a.default),L}},69180:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateTuple=void 0;const l=d(56382),_=d(97990),E=d(92812),S={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(h){const{schema:g,it:y}=h;if(Array.isArray(g))return a(h,"additionalItems",g);y.items=!0,!(0,_.alwaysValidSchema)(y,g)&&h.ok((0,E.validateArray)(h))}};function a(h,g,y=h.schema){const{gen:v,parentSchema:b,data:A,keyword:O,it:C}=h;(function M(P){const{opts:R,errSchemaPath:L}=C,H=y.length,V=H===P.minItems&&(H===P.maxItems||!1===P[g]);if(R.strictTuples&&!V){const J=`"${O}" is ${H}-tuple, but minItems or maxItems/${g} are not specified or different at path "${L}"`;(0,_.checkStrictMode)(C,J,R.strictTuples)}})(b),C.opts.unevaluated&&y.length&&!0!==C.items&&(C.items=_.mergeEvaluated.items(v,y.length,C.items));const T=v.name("valid"),N=v.const("len",l._`${A}.length`);y.forEach((P,R)=>{(0,_.alwaysValidSchema)(C,P)||(v.if(l._`${N} > ${R}`,()=>h.subschema({keyword:O,schemaProp:R,dataProp:R},T)),h.ok(T))})}r.validateTuple=a,r.default=S},41785:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),E=d(92812),S=d(29282),h={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:g}})=>l.str`must NOT have more than ${g} items`,params:({params:{len:g}})=>l._`{limit: ${g}}`},code(g){const{schema:y,parentSchema:v,it:b}=g,{prefixItems:A}=v;b.items=!0,!(0,_.alwaysValidSchema)(b,y)&&(A?(0,S.validateAdditionalItems)(g,A):g.ok((0,E.validateArray)(g)))}};r.default=h},36330:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(97990),_={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(E){const{gen:S,schema:a,it:h}=E;if((0,l.alwaysValidSchema)(h,a))return void E.fail();const g=S.name("valid");E.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},g),E.failResult(g,()=>E.reset(),()=>E.error())},error:{message:"must NOT be valid"}};r.default=_},92337:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),S={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>l._`{passingSchemas: ${a.passing}}`},code(a){const{gen:h,schema:g,parentSchema:y,it:v}=a;if(!Array.isArray(g))throw new Error("ajv implementation error");if(v.opts.discriminator&&y.discriminator)return;const b=g,A=h.let("valid",!1),O=h.let("passing",null),C=h.name("_valid");a.setParams({passing:O}),h.block(function T(){b.forEach((N,M)=>{let P;(0,_.alwaysValidSchema)(v,N)?h.var(C,!0):P=a.subschema({keyword:"oneOf",schemaProp:M,compositeRule:!0},C),M>0&&h.if(l._`${C} && ${A}`).assign(A,!1).assign(O,l._`[${O}, ${M}]`).else(),h.if(C,()=>{h.assign(A,!0),h.assign(O,M),P&&a.mergeEvaluated(P,l.Name)})})}),a.result(A,()=>a.reset(),()=>a.error(!0))}};r.default=S},50896:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(92812),_=d(56382),E=d(97990),S=d(97990),a={keyword:"patternProperties",type:"object",schemaType:"object",code(h){const{gen:g,schema:y,data:v,parentSchema:b,it:A}=h,{opts:O}=A,C=(0,l.allSchemaProperties)(y),T=C.filter(V=>(0,E.alwaysValidSchema)(A,y[V]));if(0===C.length||T.length===C.length&&(!A.opts.unevaluated||!0===A.props))return;const N=O.strictSchema&&!O.allowMatchingProperties&&b.properties,M=g.name("valid");!0!==A.props&&!(A.props instanceof _.Name)&&(A.props=(0,S.evaluatedPropsToName)(g,A.props));const{props:P}=A;function L(V){for(const J in N)new RegExp(V).test(J)&&(0,E.checkStrictMode)(A,`property ${J} matches pattern ${V} (use allowMatchingProperties)`)}function H(V){g.forIn("key",v,J=>{g.if(_._`${(0,l.usePattern)(h,V)}.test(${J})`,()=>{const Y=T.includes(V);Y||h.subschema({keyword:"patternProperties",schemaProp:V,dataProp:J,dataPropType:S.Type.Str},M),A.opts.unevaluated&&!0!==P?g.assign(_._`${P}[${J}]`,!0):!Y&&!A.allErrors&&g.if((0,_.not)(M),()=>g.break())})})}!function R(){for(const V of C)N&&L(V),A.allErrors?H(V):(g.var(M,!0),H(V),g.if(M))}()}};r.default=a},84947:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(69180),_={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:E=>(0,l.validateTuple)(E,"items")};r.default=_},68415:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(66764),_=d(92812),E=d(97990),S=d(75459),a={keyword:"properties",type:"object",schemaType:"object",code(h){const{gen:g,schema:y,parentSchema:v,data:b,it:A}=h;"all"===A.opts.removeAdditional&&void 0===v.additionalProperties&&S.default.code(new l.KeywordCxt(A,S.default,"additionalProperties"));const O=(0,_.allSchemaProperties)(y);for(const P of O)A.definedProperties.add(P);A.opts.unevaluated&&O.length&&!0!==A.props&&(A.props=E.mergeEvaluated.props(g,(0,E.toHash)(O),A.props));const C=O.filter(P=>!(0,E.alwaysValidSchema)(A,y[P]));if(0===C.length)return;const T=g.name("valid");for(const P of C)N(P)?M(P):(g.if((0,_.propertyInData)(g,b,P,A.opts.ownProperties)),M(P),A.allErrors||g.else().var(T,!0),g.endIf()),h.it.definedProperties.add(P),h.ok(T);function N(P){return A.opts.useDefaults&&!A.compositeRule&&void 0!==y[P].default}function M(P){h.subschema({keyword:"properties",schemaProp:P,dataProp:P},T)}}};r.default=a},37947:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),S={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>l._`{propertyName: ${a.propertyName}}`},code(a){const{gen:h,schema:g,data:y,it:v}=a;if((0,_.alwaysValidSchema)(v,g))return;const b=h.name("valid");h.forIn("key",y,A=>{a.setParams({propertyName:A}),a.subschema({keyword:"propertyNames",data:A,dataTypes:["string"],propertyName:A,compositeRule:!0},b),h.if((0,l.not)(b),()=>{a.error(!0),v.allErrors||h.break()})}),a.ok(b)}};r.default=S},71344:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(97990),_={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:E,parentSchema:S,it:a}){void 0===S.if&&(0,l.checkStrictMode)(a,`"${E}" without "if" is ignored`)}};r.default=_},92812:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.validateUnion=r.validateArray=r.usePattern=r.callValidateCode=r.schemaProperties=r.allSchemaProperties=r.noPropertyInData=r.propertyInData=r.isOwnProperty=r.hasPropFunc=r.reportMissingProp=r.checkMissingProp=r.checkReportMissingProp=void 0;const l=d(56382),_=d(97990),E=d(5976),S=d(97990);function y(L){return L.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:l._`Object.prototype.hasOwnProperty`})}function v(L,H,V){return l._`${y(L)}.call(${H}, ${V})`}function A(L,H,V,J){const Y=l._`${H}${(0,l.getProperty)(V)} === undefined`;return J?(0,l.or)(Y,(0,l.not)(v(L,H,V))):Y}function O(L){return L?Object.keys(L).filter(H=>"__proto__"!==H):[]}r.checkReportMissingProp=function a(L,H){const{gen:V,data:J,it:Y}=L;V.if(A(V,J,H,Y.opts.ownProperties),()=>{L.setParams({missingProperty:l._`${H}`},!0),L.error()})},r.checkMissingProp=function h({gen:L,data:H,it:{opts:V}},J,Y){return(0,l.or)(...J.map(Z=>(0,l.and)(A(L,H,Z,V.ownProperties),l._`${Y} = ${Z}`)))},r.reportMissingProp=function g(L,H){L.setParams({missingProperty:H},!0),L.error()},r.hasPropFunc=y,r.isOwnProperty=v,r.propertyInData=function b(L,H,V,J){const Y=l._`${H}${(0,l.getProperty)(V)} !== undefined`;return J?l._`${Y} && ${v(L,H,V)}`:Y},r.noPropertyInData=A,r.allSchemaProperties=O,r.schemaProperties=function C(L,H){return O(H).filter(V=>!(0,_.alwaysValidSchema)(L,H[V]))},r.callValidateCode=function T({schemaCode:L,data:H,it:{gen:V,topSchemaRef:J,schemaPath:Y,errorPath:Z},it:W},Q,D,o){const u=o?l._`${L}, ${H}, ${J}${Y}`:H,m=[[E.default.instancePath,(0,l.strConcat)(E.default.instancePath,Z)],[E.default.parentData,W.parentData],[E.default.parentDataProperty,W.parentDataProperty],[E.default.rootData,E.default.rootData]];W.opts.dynamicRef&&m.push([E.default.dynamicAnchors,E.default.dynamicAnchors]);const w=l._`${u}, ${V.object(...m)}`;return D!==l.nil?l._`${Q}.call(${D}, ${w})`:l._`${Q}(${w})`};const N=l._`new RegExp`;r.usePattern=function M({gen:L,it:{opts:H}},V){const J=H.unicodeRegExp?"u":"",{regExp:Y}=H.code,Z=Y(V,J);return L.scopeValue("pattern",{key:Z.toString(),ref:Z,code:l._`${"new RegExp"===Y.code?N:(0,S.useFunc)(L,Y)}(${V}, ${J})`})},r.validateArray=function P(L){const{gen:H,data:V,keyword:J,it:Y}=L,Z=H.name("valid");if(Y.allErrors){const Q=H.let("valid",!0);return W(()=>H.assign(Q,!1)),Q}return H.var(Z,!0),W(()=>H.break()),Z;function W(Q){const D=H.const("len",l._`${V}.length`);H.forRange("i",0,D,o=>{L.subschema({keyword:J,dataProp:o,dataPropType:_.Type.Num},Z),H.if((0,l.not)(Z),Q)})}},r.validateUnion=function R(L){const{gen:H,schema:V,keyword:J,it:Y}=L;if(!Array.isArray(V))throw new Error("ajv implementation error");if(V.some(D=>(0,_.alwaysValidSchema)(Y,D))&&!Y.opts.unevaluated)return;const W=H.let("valid",!1),Q=H.name("_valid");H.block(()=>V.forEach((D,o)=>{const u=L.subschema({keyword:J,schemaProp:o,compositeRule:!0},Q);H.assign(W,l._`${W} || ${Q}`),L.mergeValidEvaluated(u,Q)||H.if((0,l.not)(W))})),L.result(W,()=>L.reset(),()=>L.error(!0))}},11167:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const d={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};r.default=d},31093:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(11167),_=d(64703),E=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",l.default,_.default];r.default=E},64703:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.callRef=r.getValidate=void 0;const l=d(80140),_=d(92812),E=d(56382),S=d(5976),a=d(17140),h=d(97990),g={keyword:"$ref",schemaType:"string",code(b){const{gen:A,schema:O,it:C}=b,{baseId:T,schemaEnv:N,validateName:M,opts:P,self:R}=C,{root:L}=N;if(("#"===O||"#/"===O)&&T===L.baseId)return function V(){if(N===L)return v(b,M,N,N.$async);const Z=A.scopeValue("root",{ref:L});return v(b,E._`${Z}.validate`,L,L.$async)}();const H=a.resolveRef.call(R,L,T,O);if(void 0===H)throw new l.default(C.opts.uriResolver,T,O);return H instanceof a.SchemaEnv?function J(Z){const W=y(b,Z);v(b,W,Z,Z.$async)}(H):function Y(Z){const W=A.scopeValue("schema",!0===P.code.source?{ref:Z,code:(0,E.stringify)(Z)}:{ref:Z}),Q=A.name("valid"),D=b.subschema({schema:Z,dataTypes:[],schemaPath:E.nil,topSchemaRef:W,errSchemaPath:O},Q);b.mergeEvaluated(D),b.ok(Q)}(H)}};function y(b,A){const{gen:O}=b;return A.validate?O.scopeValue("validate",{ref:A.validate}):E._`${O.scopeValue("wrapper",{ref:A})}.validate`}function v(b,A,O,C){const{gen:T,it:N}=b,{allErrors:M,schemaEnv:P,opts:R}=N,L=R.passContext?S.default.this:E.nil;function J(Z){const W=E._`${Z}.errors`;T.assign(S.default.vErrors,E._`${S.default.vErrors} === null ? ${W} : ${S.default.vErrors}.concat(${W})`),T.assign(S.default.errors,E._`${S.default.vErrors}.length`)}function Y(Z){var W;if(!N.opts.unevaluated)return;const Q=null===(W=O?.validate)||void 0===W?void 0:W.evaluated;if(!0!==N.props)if(Q&&!Q.dynamicProps)void 0!==Q.props&&(N.props=h.mergeEvaluated.props(T,Q.props,N.props));else{const D=T.var("props",E._`${Z}.evaluated.props`);N.props=h.mergeEvaluated.props(T,D,N.props,E.Name)}if(!0!==N.items)if(Q&&!Q.dynamicItems)void 0!==Q.items&&(N.items=h.mergeEvaluated.items(T,Q.items,N.items));else{const D=T.var("items",E._`${Z}.evaluated.items`);N.items=h.mergeEvaluated.items(T,D,N.items,E.Name)}}C?function H(){if(!P.$async)throw new Error("async schema referenced by sync schema");const Z=T.let("valid");T.try(()=>{T.code(E._`await ${(0,_.callValidateCode)(b,A,L)}`),Y(A),M||T.assign(Z,!0)},W=>{T.if(E._`!(${W} instanceof ${N.ValidationError})`,()=>T.throw(W)),J(W),M||T.assign(Z,!1)}),b.ok(Z)}():function V(){b.result((0,_.callValidateCode)(b,A,L),()=>Y(A),()=>J(A))}()}r.getValidate=y,r.callRef=v,r.default=g},81849:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(60797),E=d(17140),S=d(97990),h={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:g,tagName:y}})=>g===_.DiscrError.Tag?`tag "${y}" must be string`:`value of tag "${y}" must be in oneOf`,params:({params:{discrError:g,tag:y,tagName:v}})=>l._`{error: ${g}, tag: ${v}, tagValue: ${y}}`},code(g){const{gen:y,data:v,schema:b,parentSchema:A,it:O}=g,{oneOf:C}=A;if(!O.opts.discriminator)throw new Error("discriminator: requires discriminator option");const T=b.propertyName;if("string"!=typeof T)throw new Error("discriminator: requires propertyName");if(b.mapping)throw new Error("discriminator: mapping is not supported");if(!C)throw new Error("discriminator: requires oneOf keyword");const N=y.let("valid",!1),M=y.const("tag",l._`${v}${(0,l.getProperty)(T)}`);function R(H){const V=y.name("valid"),J=g.subschema({keyword:"oneOf",schemaProp:H},V);return g.mergeEvaluated(J,l.Name),V}y.if(l._`typeof ${M} == "string"`,()=>function P(){const H=function L(){var H;const V={},J=Z(A);let Y=!0;for(let D=0;Dg.error(!1,{discrError:_.DiscrError.Tag,tag:M,tagName:T})),g.ok(N)}};r.default=h},60797:(ne,r)=>{"use strict";var l;Object.defineProperty(r,"__esModule",{value:!0}),r.DiscrError=void 0,(l=r.DiscrError||(r.DiscrError={})).Tag="tag",l.Mapping="mapping"},77032:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(31093),_=d(77887),E=d(17737),S=d(57447),a=d(10760),h=[l.default,_.default,(0,E.default)(),S.default,a.metadataVocabulary,a.contentVocabulary];r.default=h},22364:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),E={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:S})=>l.str`must match format "${S}"`,params:({schemaCode:S})=>l._`{format: ${S}}`},code(S,a){const{gen:h,data:g,$data:y,schema:v,schemaCode:b,it:A}=S,{opts:O,errSchemaPath:C,schemaEnv:T,self:N}=A;O.validateFormats&&(y?function M(){const R=h.scopeValue("formats",{ref:N.formats,code:O.code.formats}),L=h.const("fDef",l._`${R}[${b}]`),H=h.let("fType"),V=h.let("format");h.if(l._`typeof ${L} == "object" && !(${L} instanceof RegExp)`,()=>h.assign(H,l._`${L}.type || "string"`).assign(V,l._`${L}.validate`),()=>h.assign(H,l._`"string"`).assign(V,L)),S.fail$data((0,l.or)(function J(){return!1===O.strictSchema?l.nil:l._`${b} && !${V}`}(),function Y(){const Z=T.$async?l._`(${L}.async ? await ${V}(${g}) : ${V}(${g}))`:l._`${V}(${g})`,W=l._`(typeof ${V} == "function" ? ${Z} : ${V}.test(${g}))`;return l._`${V} && ${V} !== true && ${H} === ${a} && !${W}`}()))}():function P(){const R=N.formats[v];if(!R)return void function J(){if(!1===O.strictSchema)return void N.logger.warn(W());throw new Error(W());function W(){return`unknown format "${v}" ignored in schema at path "${C}"`}}();if(!0===R)return;const[L,H,V]=function Y(W){const Q=W instanceof RegExp?(0,l.regexpCode)(W):O.code.formats?l._`${O.code.formats}${(0,l.getProperty)(v)}`:void 0,D=h.scopeValue("formats",{key:v,ref:W,code:Q});return"object"!=typeof W||W instanceof RegExp?["string",W,D]:[W.type||"string",W.validate,l._`${D}.validate`]}(R);L===a&&S.pass(function Z(){if("object"==typeof R&&!(R instanceof RegExp)&&R.async){if(!T.$async)throw new Error("async format in sync schema");return l._`await ${V}(${g})`}return"function"==typeof H?l._`${V}(${g})`:l._`${V}.test(${g})`}())}())}};r.default=E},57447:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const _=[d(22364).default];r.default=_},10760:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.contentVocabulary=r.metadataVocabulary=void 0,r.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],r.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},37677:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),E=d(40834),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:h})=>l._`{allowedValue: ${h}}`},code(h){const{gen:g,data:y,$data:v,schemaCode:b,schema:A}=h;v||A&&"object"==typeof A?h.fail$data(l._`!${(0,_.useFunc)(g,E.default)}(${y}, ${b})`):h.fail(l._`${A} !== ${y}`)}};r.default=a},38373:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),E=d(40834),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:h})=>l._`{allowedValues: ${h}}`},code(h){const{gen:g,data:y,$data:v,schema:b,schemaCode:A,it:O}=h;if(!v&&0===b.length)throw new Error("enum must have non-empty array");const C=b.length>=O.opts.loopEnum;let T;const N=()=>T??(T=(0,_.useFunc)(g,E.default));let M;if(C||v)M=g.let("valid"),h.block$data(M,function P(){g.assign(M,!1),g.forOf("v",A,L=>g.if(l._`${N()}(${y}, ${L})`,()=>g.assign(M,!0).break()))});else{if(!Array.isArray(b))throw new Error("ajv implementation error");const L=g.const("vSchema",A);M=(0,l.or)(...b.map((H,V)=>function R(L,H){const V=b[H];return"object"==typeof V&&null!==V?l._`${N()}(${y}, ${L}[${H}])`:l._`${y} === ${V}`}(L,V)))}h.pass(M)}};r.default=a},77887:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(37126),_=d(52018),E=d(56230),S=d(58455),a=d(25608),h=d(70109),g=d(45132),y=d(74097),v=d(37677),b=d(38373),A=[l.default,_.default,E.default,S.default,a.default,h.default,g.default,y.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},v.default,b.default];r.default=A},45132:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),E={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:S,schemaCode:a}){const h="maxItems"===S?"more":"fewer";return l.str`must NOT have ${h} than ${a} items`},params:({schemaCode:S})=>l._`{limit: ${S}}`},code(S){const{keyword:a,data:h,schemaCode:g}=S,y="maxItems"===a?l.operators.GT:l.operators.LT;S.fail$data(l._`${h}.length ${y} ${g}`)}};r.default=E},56230:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=d(97990),E=d(26344),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:h,schemaCode:g}){const y="maxLength"===h?"more":"fewer";return l.str`must NOT have ${y} than ${g} characters`},params:({schemaCode:h})=>l._`{limit: ${h}}`},code(h){const{keyword:g,data:y,schemaCode:v,it:b}=h,A="maxLength"===g?l.operators.GT:l.operators.LT,O=!1===b.opts.unicode?l._`${y}.length`:l._`${(0,_.useFunc)(h.gen,E.default)}(${y})`;h.fail$data(l._`${O} ${A} ${v}`)}};r.default=a},37126:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),_=l.operators,E={maximum:{okStr:"<=",ok:_.LTE,fail:_.GT},minimum:{okStr:">=",ok:_.GTE,fail:_.LT},exclusiveMaximum:{okStr:"<",ok:_.LT,fail:_.GTE},exclusiveMinimum:{okStr:">",ok:_.GT,fail:_.LTE}},S={message:({keyword:h,schemaCode:g})=>l.str`must be ${E[h].okStr} ${g}`,params:({keyword:h,schemaCode:g})=>l._`{comparison: ${E[h].okStr}, limit: ${g}}`},a={keyword:Object.keys(E),type:"number",schemaType:"number",$data:!0,error:S,code(h){const{keyword:g,data:y,schemaCode:v}=h;h.fail$data(l._`${y} ${E[g].fail} ${v} || isNaN(${y})`)}};r.default=a},25608:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),E={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:S,schemaCode:a}){const h="maxProperties"===S?"more":"fewer";return l.str`must NOT have ${h} than ${a} properties`},params:({schemaCode:S})=>l._`{limit: ${S}}`},code(S){const{keyword:a,data:h,schemaCode:g}=S,y="maxProperties"===a?l.operators.GT:l.operators.LT;S.fail$data(l._`Object.keys(${h}).length ${y} ${g}`)}};r.default=E},52018:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(56382),E={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:S})=>l.str`must be multiple of ${S}`,params:({schemaCode:S})=>l._`{multipleOf: ${S}}`},code(S){const{gen:a,data:h,schemaCode:g,it:y}=S,v=y.opts.multipleOfPrecision,b=a.let("res"),A=v?l._`Math.abs(Math.round(${b}) - ${b}) > 1e-${v}`:l._`${b} !== parseInt(${b})`;S.fail$data(l._`(${g} === 0 || (${b} = ${h}/${g}, ${A}))`)}};r.default=E},58455:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(92812),_=d(56382),S={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>_.str`must match pattern "${a}"`,params:({schemaCode:a})=>_._`{pattern: ${a}}`},code(a){const{data:h,$data:g,schema:y,schemaCode:v,it:b}=a,A=b.opts.unicodeRegExp?"u":"",O=g?_._`(new RegExp(${v}, ${A}))`:(0,l.usePattern)(a,y);a.fail$data(_._`!${O}.test(${h})`)}};r.default=S},70109:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(92812),_=d(56382),E=d(97990),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:h}})=>_.str`must have required property '${h}'`,params:({params:{missingProperty:h}})=>_._`{missingProperty: ${h}}`},code(h){const{gen:g,schema:y,schemaCode:v,data:b,$data:A,it:O}=h,{opts:C}=O;if(!A&&0===y.length)return;const T=y.length>=C.loopRequired;if(O.allErrors?function N(){if(T||A)h.block$data(_.nil,P);else for(const L of y)(0,l.checkReportMissingProp)(h,L)}():function M(){const L=g.let("missing");if(T||A){const H=g.let("valid",!0);h.block$data(H,()=>function R(L,H){h.setParams({missingProperty:L}),g.forOf(L,v,()=>{g.assign(H,(0,l.propertyInData)(g,b,L,C.ownProperties)),g.if((0,_.not)(H),()=>{h.error(),g.break()})},_.nil)}(L,H)),h.ok(H)}else g.if((0,l.checkMissingProp)(h,y,L)),(0,l.reportMissingProp)(h,L),g.else()}(),C.strictRequired){const L=h.parentSchema.properties,{definedProperties:H}=h.it;for(const V of y)if(void 0===L?.[V]&&!H.has(V)){const Y=`required property "${V}" is not defined at "${O.schemaEnv.baseId+O.errSchemaPath}" (strictRequired)`;(0,E.checkStrictMode)(O,Y,O.opts.strictRequired)}}function P(){g.forOf("prop",v,L=>{h.setParams({missingProperty:L}),g.if((0,l.noPropertyInData)(g,b,L,C.ownProperties),()=>h.error())})}}};r.default=a},74097:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});const l=d(59078),_=d(56382),E=d(97990),S=d(40834),h={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:g,j:y}})=>_.str`must NOT have duplicate items (items ## ${y} and ${g} are identical)`,params:({params:{i:g,j:y}})=>_._`{i: ${g}, j: ${y}}`},code(g){const{gen:y,data:v,$data:b,schema:A,parentSchema:O,schemaCode:C,it:T}=g;if(!b&&!A)return;const N=y.let("valid"),M=O.items?(0,l.getSchemaTypes)(O.items):[];function L(V,J){const Y=y.name("item"),Z=(0,l.checkDataTypes)(M,Y,T.opts.strictNumbers,l.DataType.Wrong),W=y.const("indices",_._`{}`);y.for(_._`;${V}--;`,()=>{y.let(Y,_._`${v}[${V}]`),y.if(Z,_._`continue`),M.length>1&&y.if(_._`typeof ${Y} == "string"`,_._`${Y} += "_"`),y.if(_._`typeof ${W}[${Y}] == "number"`,()=>{y.assign(J,_._`${W}[${Y}]`),g.error(),y.assign(N,!1).break()}).code(_._`${W}[${Y}] = ${V}`)})}function H(V,J){const Y=(0,E.useFunc)(y,S.default),Z=y.name("outer");y.label(Z).for(_._`;${V}--;`,()=>y.for(_._`${J} = ${V}; ${J}--;`,()=>y.if(_._`${Y}(${v}[${V}], ${v}[${J}])`,()=>{g.error(),y.assign(N,!1).break(Z)})))}g.block$data(N,function P(){const V=y.let("i",_._`${v}.length`),J=y.let("j");g.setParams({i:V,j:J}),y.assign(N,!0),y.if(_._`${V} > 1`,()=>(function R(){return M.length>0&&!M.some(V=>"object"===V||"array"===V)}()?L:H)(V,J))},_._`${C} === false`),g.ok(N)}};r.default=h},87977:(ne,r,d)=>{"use strict";const l=r;l.bignum=d(13854),l.define=d(39516).define,l.base=d(87813),l.constants=d(5459),l.decoders=d(70196),l.encoders=d(21131)},39516:(ne,r,d)=>{"use strict";const l=d(21131),_=d(70196),E=d(83894);function a(h,g){this.name=h,this.body=g,this.decoders={},this.encoders={}}r.define=function(g,y){return new a(g,y)},a.prototype._createNamed=function(g){const y=this.name;function v(b){this._initNamed(b,y)}return E(v,g),v.prototype._initNamed=function(A,O){g.call(this,A,O)},new v(this)},a.prototype._getDecoder=function(g){return g=g||"der",this.decoders.hasOwnProperty(g)||(this.decoders[g]=this._createNamed(_[g])),this.decoders[g]},a.prototype.decode=function(g,y,v){return this._getDecoder(y).decode(g,v)},a.prototype._getEncoder=function(g){return g=g||"der",this.encoders.hasOwnProperty(g)||(this.encoders[g]=this._createNamed(l[g])),this.encoders[g]},a.prototype.encode=function(g,y,v){return this._getEncoder(y).encode(g,v)}},12769:(ne,r,d)=>{"use strict";const l=d(83894),_=d(4919).b,E=d(62038).Buffer;function S(h,g){_.call(this,g),E.isBuffer(h)?(this.base=h,this.offset=0,this.length=h.length):this.error("Input not Buffer")}function a(h,g){if(Array.isArray(h))this.length=0,this.value=h.map(function(y){return a.isEncoderBuffer(y)||(y=new a(y,g)),this.length+=y.length,y},this);else if("number"==typeof h){if(!(0<=h&&h<=255))return g.error("non-byte EncoderBuffer value");this.value=h,this.length=1}else if("string"==typeof h)this.value=h,this.length=E.byteLength(h);else{if(!E.isBuffer(h))return g.error("Unsupported type: "+typeof h);this.value=h,this.length=h.length}}l(S,_),r.C=S,S.isDecoderBuffer=function(g){return g instanceof S||"object"==typeof g&&E.isBuffer(g.base)&&"DecoderBuffer"===g.constructor.name&&"number"==typeof g.offset&&"number"==typeof g.length&&"function"==typeof g.save&&"function"==typeof g.restore&&"function"==typeof g.isEmpty&&"function"==typeof g.readUInt8&&"function"==typeof g.skip&&"function"==typeof g.raw},S.prototype.save=function(){return{offset:this.offset,reporter:_.prototype.save.call(this)}},S.prototype.restore=function(g){const y=new S(this.base);return y.offset=g.offset,y.length=this.offset,this.offset=g.offset,_.prototype.restore.call(this,g.reporter),y},S.prototype.isEmpty=function(){return this.offset===this.length},S.prototype.readUInt8=function(g){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(g||"DecoderBuffer overrun")},S.prototype.skip=function(g,y){if(!(this.offset+g<=this.length))return this.error(y||"DecoderBuffer overrun");const v=new S(this.base);return v._reporterState=this._reporterState,v.offset=this.offset,v.length=this.offset+g,this.offset+=g,v},S.prototype.raw=function(g){return this.base.slice(g?g.offset:this.offset,this.length)},r.R=a,a.isEncoderBuffer=function(g){return g instanceof a||"object"==typeof g&&"EncoderBuffer"===g.constructor.name&&"number"==typeof g.length&&"function"==typeof g.join},a.prototype.join=function(g,y){return g||(g=E.alloc(this.length)),y||(y=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(v){v.join(g,y),y+=v.length}):("number"==typeof this.value?g[y]=this.value:"string"==typeof this.value?g.write(this.value,y):E.isBuffer(this.value)&&this.value.copy(g,y),y+=this.length)),g}},87813:(ne,r,d)=>{"use strict";const l=r;l.Reporter=d(4919).b,l.DecoderBuffer=d(12769).C,l.EncoderBuffer=d(12769).R,l.Node=d(31430)},31430:(ne,r,d)=>{"use strict";const l=d(4919).b,_=d(12769).R,E=d(12769).C,S=d(32391),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function y(b,A,O){const C={};this._baseState=C,C.name=O,C.enc=b,C.parent=A||null,C.children=null,C.tag=null,C.args=null,C.reverseArgs=null,C.choice=null,C.optional=!1,C.any=!1,C.obj=!1,C.use=null,C.useDecoder=null,C.key=null,C.default=null,C.explicit=null,C.implicit=null,C.contains=null,C.parent||(C.children=[],this._wrap())}ne.exports=y;const v=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];y.prototype.clone=function(){const A=this._baseState,O={};v.forEach(function(T){O[T]=A[T]});const C=new this.constructor(O.parent);return C._baseState=O,C},y.prototype._wrap=function(){const A=this._baseState;h.forEach(function(O){this[O]=function(){const T=new this.constructor(this);return A.children.push(T),T[O].apply(T,arguments)}},this)},y.prototype._init=function(A){const O=this._baseState;S(null===O.parent),A.call(this),O.children=O.children.filter(function(C){return C._baseState.parent===this},this),S.equal(O.children.length,1,"Root node can have only one child")},y.prototype._useArgs=function(A){const O=this._baseState,C=A.filter(function(T){return T instanceof this.constructor},this);A=A.filter(function(T){return!(T instanceof this.constructor)},this),0!==C.length&&(S(null===O.children),O.children=C,C.forEach(function(T){T._baseState.parent=this},this)),0!==A.length&&(S(null===O.args),O.args=A,O.reverseArgs=A.map(function(T){if("object"!=typeof T||T.constructor!==Object)return T;const N={};return Object.keys(T).forEach(function(M){M==(0|M)&&(M|=0);const P=T[M];N[P]=M}),N}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(b){y.prototype[b]=function(){const O=this._baseState;throw new Error(b+" not implemented for encoding: "+O.enc)}}),a.forEach(function(b){y.prototype[b]=function(){const O=this._baseState,C=Array.prototype.slice.call(arguments);return S(null===O.tag),O.tag=b,this._useArgs(C),this}}),y.prototype.use=function(A){S(A);const O=this._baseState;return S(null===O.use),O.use=A,this},y.prototype.optional=function(){return this._baseState.optional=!0,this},y.prototype.def=function(A){const O=this._baseState;return S(null===O.default),O.default=A,O.optional=!0,this},y.prototype.explicit=function(A){const O=this._baseState;return S(null===O.explicit&&null===O.implicit),O.explicit=A,this},y.prototype.implicit=function(A){const O=this._baseState;return S(null===O.explicit&&null===O.implicit),O.implicit=A,this},y.prototype.obj=function(){const A=this._baseState,O=Array.prototype.slice.call(arguments);return A.obj=!0,0!==O.length&&this._useArgs(O),this},y.prototype.key=function(A){const O=this._baseState;return S(null===O.key),O.key=A,this},y.prototype.any=function(){return this._baseState.any=!0,this},y.prototype.choice=function(A){const O=this._baseState;return S(null===O.choice),O.choice=A,this._useArgs(Object.keys(A).map(function(C){return A[C]})),this},y.prototype.contains=function(A){const O=this._baseState;return S(null===O.use),O.contains=A,this},y.prototype._decode=function(A,O){const C=this._baseState;if(null===C.parent)return A.wrapResult(C.children[0]._decode(A,O));let P,T=C.default,N=!0,M=null;if(null!==C.key&&(M=A.enterKey(C.key)),C.optional){let R=null;if(null!==C.explicit?R=C.explicit:null!==C.implicit?R=C.implicit:null!==C.tag&&(R=C.tag),null!==R||C.any){if(N=this._peekTag(A,R,C.any),A.isError(N))return N}else{const L=A.save();try{null===C.choice?this._decodeGeneric(C.tag,A,O):this._decodeChoice(A,O),N=!0}catch{N=!1}A.restore(L)}}if(C.obj&&N&&(P=A.enterObject()),N){if(null!==C.explicit){const L=this._decodeTag(A,C.explicit);if(A.isError(L))return L;A=L}const R=A.offset;if(null===C.use&&null===C.choice){let L;C.any&&(L=A.save());const H=this._decodeTag(A,null!==C.implicit?C.implicit:C.tag,C.any);if(A.isError(H))return H;C.any?T=A.raw(L):A=H}if(O&&O.track&&null!==C.tag&&O.track(A.path(),R,A.length,"tagged"),O&&O.track&&null!==C.tag&&O.track(A.path(),A.offset,A.length,"content"),C.any||(T=null===C.choice?this._decodeGeneric(C.tag,A,O):this._decodeChoice(A,O)),A.isError(T))return T;if(!C.any&&null===C.choice&&null!==C.children&&C.children.forEach(function(H){H._decode(A,O)}),C.contains&&("octstr"===C.tag||"bitstr"===C.tag)){const L=new E(T);T=this._getUse(C.contains,A._reporterState.obj)._decode(L,O)}}return C.obj&&N&&(T=A.leaveObject(P)),null===C.key||null===T&&!0!==N?null!==M&&A.exitKey(M):A.leaveKey(M,C.key,T),T},y.prototype._decodeGeneric=function(A,O,C){const T=this._baseState;return"seq"===A||"set"===A?null:"seqof"===A||"setof"===A?this._decodeList(O,A,T.args[0],C):/str$/.test(A)?this._decodeStr(O,A,C):"objid"===A&&T.args?this._decodeObjid(O,T.args[0],T.args[1],C):"objid"===A?this._decodeObjid(O,null,null,C):"gentime"===A||"utctime"===A?this._decodeTime(O,A,C):"null_"===A?this._decodeNull(O,C):"bool"===A?this._decodeBool(O,C):"objDesc"===A?this._decodeStr(O,A,C):"int"===A||"enum"===A?this._decodeInt(O,T.args&&T.args[0],C):null!==T.use?this._getUse(T.use,O._reporterState.obj)._decode(O,C):O.error("unknown tag: "+A)},y.prototype._getUse=function(A,O){const C=this._baseState;return C.useDecoder=this._use(A,O),S(null===C.useDecoder._baseState.parent),C.useDecoder=C.useDecoder._baseState.children[0],C.implicit!==C.useDecoder._baseState.implicit&&(C.useDecoder=C.useDecoder.clone(),C.useDecoder._baseState.implicit=C.implicit),C.useDecoder},y.prototype._decodeChoice=function(A,O){const C=this._baseState;let T=null,N=!1;return Object.keys(C.choice).some(function(M){const P=A.save(),R=C.choice[M];try{const L=R._decode(A,O);if(A.isError(L))return!1;T={type:M,value:L},N=!0}catch{return A.restore(P),!1}return!0},this),N?T:A.error("Choice not matched")},y.prototype._createEncoderBuffer=function(A){return new _(A,this.reporter)},y.prototype._encode=function(A,O,C){const T=this._baseState;if(null!==T.default&&T.default===A)return;const N=this._encodeValue(A,O,C);return void 0===N||this._skipDefault(N,O,C)?void 0:N},y.prototype._encodeValue=function(A,O,C){const T=this._baseState;if(null===T.parent)return T.children[0]._encode(A,O||new l);let N=null;if(this.reporter=O,T.optional&&void 0===A){if(null===T.default)return;A=T.default}let M=null,P=!1;if(T.any)N=this._createEncoderBuffer(A);else if(T.choice)N=this._encodeChoice(A,O);else if(T.contains)M=this._getUse(T.contains,C)._encode(A,O),P=!0;else if(T.children)M=T.children.map(function(R){if("null_"===R._baseState.tag)return R._encode(null,O,A);if(null===R._baseState.key)return O.error("Child should have a key");const L=O.enterKey(R._baseState.key);if("object"!=typeof A)return O.error("Child expected, but input is not object");const H=R._encode(A[R._baseState.key],O,A);return O.leaveKey(L),H},this).filter(function(R){return R}),M=this._createEncoderBuffer(M);else if("seqof"===T.tag||"setof"===T.tag){if(!T.args||1!==T.args.length)return O.error("Too many args for : "+T.tag);if(!Array.isArray(A))return O.error("seqof/setof, but data is not Array");const R=this.clone();R._baseState.implicit=null,M=this._createEncoderBuffer(A.map(function(L){const H=this._baseState;return this._getUse(H.args[0],A)._encode(L,O)},R))}else null!==T.use?N=this._getUse(T.use,C)._encode(A,O):(M=this._encodePrimitive(T.tag,A),P=!0);if(!T.any&&null===T.choice){const R=null!==T.implicit?T.implicit:T.tag,L=null===T.implicit?"universal":"context";null===R?null===T.use&&O.error("Tag could be omitted only for .use()"):null===T.use&&(N=this._encodeComposite(R,P,L,M))}return null!==T.explicit&&(N=this._encodeComposite(T.explicit,!1,"context",N)),N},y.prototype._encodeChoice=function(A,O){const C=this._baseState,T=C.choice[A.type];return T||S(!1,A.type+" not found in "+JSON.stringify(Object.keys(C.choice))),T._encode(A.value,O)},y.prototype._encodePrimitive=function(A,O){const C=this._baseState;if(/str$/.test(A))return this._encodeStr(O,A);if("objid"===A&&C.args)return this._encodeObjid(O,C.reverseArgs[0],C.args[1]);if("objid"===A)return this._encodeObjid(O,null,null);if("gentime"===A||"utctime"===A)return this._encodeTime(O,A);if("null_"===A)return this._encodeNull();if("int"===A||"enum"===A)return this._encodeInt(O,C.args&&C.reverseArgs[0]);if("bool"===A)return this._encodeBool(O);if("objDesc"===A)return this._encodeStr(O,A);throw new Error("Unsupported tag: "+A)},y.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},y.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(A)}},4919:(ne,r,d)=>{"use strict";const l=d(83894);function _(S){this._reporterState={obj:null,path:[],options:S||{},errors:[]}}function E(S,a){this.path=S,this.rethrow(a)}r.b=_,_.prototype.isError=function(a){return a instanceof E},_.prototype.save=function(){const a=this._reporterState;return{obj:a.obj,pathLen:a.path.length}},_.prototype.restore=function(a){const h=this._reporterState;h.obj=a.obj,h.path=h.path.slice(0,a.pathLen)},_.prototype.enterKey=function(a){return this._reporterState.path.push(a)},_.prototype.exitKey=function(a){const h=this._reporterState;h.path=h.path.slice(0,a-1)},_.prototype.leaveKey=function(a,h,g){const y=this._reporterState;this.exitKey(a),null!==y.obj&&(y.obj[h]=g)},_.prototype.path=function(){return this._reporterState.path.join("/")},_.prototype.enterObject=function(){const a=this._reporterState,h=a.obj;return a.obj={},h},_.prototype.leaveObject=function(a){const h=this._reporterState,g=h.obj;return h.obj=a,g},_.prototype.error=function(a){let h;const g=this._reporterState,y=a instanceof E;if(h=y?a:new E(g.path.map(function(v){return"["+JSON.stringify(v)+"]"}).join(""),a.message||a,a.stack),!g.options.partial)throw h;return y||g.errors.push(h),h},_.prototype.wrapResult=function(a){const h=this._reporterState;return h.options.partial?{result:this.isError(a)?null:a,errors:h.errors}:a},l(E,Error),E.prototype.rethrow=function(a){if(this.message=a+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,E),!this.stack)try{throw new Error(this.message)}catch(h){this.stack=h.stack}return this}},25496:(ne,r)=>{"use strict";function d(l){const _={};return Object.keys(l).forEach(function(E){(0|E)==E&&(E|=0);const S=l[E];_[S]=E}),_}r.tagClass={0:"universal",1:"application",2:"context",3:"private"},r.tagClassByName=d(r.tagClass),r.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},r.tagByName=d(r.tag)},5459:(ne,r,d)=>{"use strict";const l=r;l._reverse=function(E){const S={};return Object.keys(E).forEach(function(a){(0|a)==a&&(a|=0);const h=E[a];S[h]=a}),S},l.der=d(25496)},87127:(ne,r,d)=>{"use strict";const l=d(83894),_=d(13854),E=d(12769).C,S=d(31430),a=d(25496);function h(b){this.enc="der",this.name=b.name,this.entity=b,this.tree=new g,this.tree._init(b.body)}function g(b){S.call(this,"der",b)}function y(b,A){let O=b.readUInt8(A);if(b.isError(O))return O;const C=a.tagClass[O>>6],T=0==(32&O);if(31==(31&O)){let M=O;for(O=0;128==(128&M);){if(M=b.readUInt8(A),b.isError(M))return M;O<<=7,O|=127&M}}else O&=31;return{cls:C,primitive:T,tag:O,tagStr:a.tag[O]}}function v(b,A,O){let C=b.readUInt8(O);if(b.isError(C))return C;if(!A&&128===C)return null;if(!(128&C))return C;const T=127&C;if(T>4)return b.error("length octect is too long");C=0;for(let N=0;N{"use strict";const l=r;l.der=d(87127),l.pem=d(99617)},99617:(ne,r,d)=>{"use strict";const l=d(83894),_=d(62038).Buffer,E=d(87127);function S(a){E.call(this,a),this.enc="pem"}l(S,E),ne.exports=S,S.prototype.decode=function(h,g){const y=h.toString().split(/[\r\n]+/g),v=g.label.toUpperCase(),b=/^-----(BEGIN|END) ([^-]+)-----$/;let A=-1,O=-1;for(let N=0;N{"use strict";const l=d(83894),_=d(62038).Buffer,E=d(31430),S=d(25496);function a(v){this.enc="der",this.name=v.name,this.entity=v,this.tree=new h,this.tree._init(v.body)}function h(v){E.call(this,"der",v)}function g(v){return v<10?"0"+v:v}ne.exports=a,a.prototype.encode=function(b,A){return this.tree._encode(b,A).join()},l(h,E),h.prototype._encodeComposite=function(b,A,O,C){const T=function y(v,b,A,O){let C;if("seqof"===v?v="seq":"setof"===v&&(v="set"),S.tagByName.hasOwnProperty(v))C=S.tagByName[v];else{if("number"!=typeof v||(0|v)!==v)return O.error("Unknown tag: "+v);C=v}return C>=31?O.error("Multi-octet tag encoding unsupported"):(b||(C|=32),C|=S.tagClassByName[A||"universal"]<<6,C)}(b,A,O,this.reporter);if(C.length<128){const P=_.alloc(2);return P[0]=T,P[1]=C.length,this._createEncoderBuffer([P,C])}let N=1;for(let P=C.length;P>=256;P>>=8)N++;const M=_.alloc(2+N);M[0]=T,M[1]=128|N;for(let P=1+N,R=C.length;R>0;P--,R>>=8)M[P]=255&R;return this._createEncoderBuffer([M,C])},h.prototype._encodeStr=function(b,A){if("bitstr"===A)return this._createEncoderBuffer([0|b.unused,b.data]);if("bmpstr"===A){const O=_.alloc(2*b.length);for(let C=0;C=40)return this.reporter.error("Second objid identifier OOB");b.splice(0,2,40*b[0]+b[1])}let C=0;for(let M=0;M=128;P>>=7)C++}const T=_.alloc(C);let N=T.length-1;for(let M=b.length-1;M>=0;M--){let P=b[M];for(T[N--]=127&P;(P>>=7)>0;)T[N--]=128|127&P}return this._createEncoderBuffer(T)},h.prototype._encodeTime=function(b,A){let O;const C=new Date(b);return"gentime"===A?O=[g(C.getUTCFullYear()),g(C.getUTCMonth()+1),g(C.getUTCDate()),g(C.getUTCHours()),g(C.getUTCMinutes()),g(C.getUTCSeconds()),"Z"].join(""):"utctime"===A?O=[g(C.getUTCFullYear()%100),g(C.getUTCMonth()+1),g(C.getUTCDate()),g(C.getUTCHours()),g(C.getUTCMinutes()),g(C.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+A+" time is not supported yet"),this._encodeStr(O,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(b,A){if("string"==typeof b){if(!A)return this.reporter.error("String int or enum given, but no values map");if(!A.hasOwnProperty(b))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(b));b=A[b]}if("number"!=typeof b&&!_.isBuffer(b)){const T=b.toArray();!b.sign&&128&T[0]&&T.unshift(0),b=_.from(T)}if(_.isBuffer(b)){let T=b.length;0===b.length&&T++;const N=_.alloc(T);return b.copy(N),0===b.length&&(N[0]=0),this._createEncoderBuffer(N)}if(b<128)return this._createEncoderBuffer(b);if(b<256)return this._createEncoderBuffer([0,b]);let O=1;for(let T=b;T>=256;T>>=8)O++;const C=new Array(O);for(let T=C.length-1;T>=0;T--)C[T]=255&b,b>>=8;return 128&C[0]&&C.unshift(0),this._createEncoderBuffer(_.from(C))},h.prototype._encodeBool=function(b){return this._createEncoderBuffer(b?255:0)},h.prototype._use=function(b,A){return"function"==typeof b&&(b=b(A)),b._getEncoder("der").tree},h.prototype._skipDefault=function(b,A,O){const C=this._baseState;let T;if(null===C.default)return!1;const N=b.join();if(void 0===C.defaultBuffer&&(C.defaultBuffer=this._encodeValue(C.default,A,O).join()),N.length!==C.defaultBuffer.length)return!1;for(T=0;T{"use strict";const l=r;l.der=d(16374),l.pem=d(3530)},3530:(ne,r,d)=>{"use strict";const l=d(83894),_=d(16374);function E(S){_.call(this,S),this.enc="pem"}l(E,_),ne.exports=E,E.prototype.encode=function(a,h){const y=_.prototype.encode.call(this,a).toString("base64"),v=["-----BEGIN "+h.label+"-----"];for(let b=0;b=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},21082:(ne,r,d)=>{"use strict";var l=d(73502).Buffer;ne.exports=function _(E){if(E.length>=255)throw new TypeError("Alphabet too long");for(var S=new Uint8Array(256),a=0;a>>0,V=new Uint8Array(H);M[P];){var J=S[M.charCodeAt(P)];if(255===J)return;for(var Y=0,Z=H-1;(0!==J||Y>>0,V[Z]=J%256>>>0,J=J/256>>>0;if(0!==J)throw new Error("Non-zero carry");L=Y,P++}for(var W=H-L;W!==H&&0===V[W];)W++;var Q=l.allocUnsafe(R+(H-W));Q.fill(0,0,R);for(var D=R;W!==H;)Q[D++]=V[W++];return Q}return{encode:function C(M){if((Array.isArray(M)||M instanceof Uint8Array)&&(M=l.from(M)),!l.isBuffer(M))throw new TypeError("Expected Buffer");if(0===M.length)return"";for(var P=0,R=0,L=0,H=M.length;L!==H&&0===M[L];)L++,P++;for(var V=(H-L)*O+1>>>0,J=new Uint8Array(V);L!==H;){for(var Y=M[L],Z=0,W=V-1;(0!==Y||Z>>0,J[W]=Y%v>>>0,Y=Y/v>>>0;if(0!==Y)throw new Error("Non-zero carry");R=Z,L++}for(var Q=V-R;Q!==V&&0===J[Q];)Q++;for(var D=b.repeat(P);Q{"use strict";r.byteLength=function g(C){var T=h(C),N=T[0],M=T[1];return 3*(N+M)/4-M},r.toByteArray=function v(C){var T,V,N=h(C),M=N[0],P=N[1],R=new _(function y(C,T,N){return 3*(T+N)/4-N}(0,M,P)),L=0,H=P>0?M-4:M;for(V=0;V>16&255,R[L++]=T>>8&255,R[L++]=255&T;return 2===P&&(T=l[C.charCodeAt(V)]<<2|l[C.charCodeAt(V+1)]>>4,R[L++]=255&T),1===P&&(T=l[C.charCodeAt(V)]<<10|l[C.charCodeAt(V+1)]<<4|l[C.charCodeAt(V+2)]>>2,R[L++]=T>>8&255,R[L++]=255&T),R},r.fromByteArray=function O(C){for(var T,N=C.length,M=N%3,P=[],R=16383,L=0,H=N-M;LH?H:L+R));return 1===M?(T=C[N-1],P.push(d[T>>2]+d[T<<4&63]+"==")):2===M&&(T=(C[N-2]<<8)+C[N-1],P.push(d[T>>10]+d[T>>4&63]+d[T<<2&63]+"=")),P.join("")};for(var d=[],l=[],_=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,a=E.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var N=C.indexOf("=");return-1===N&&(N=T),[N,N===T?0:4-N%4]}function b(C){return d[C>>18&63]+d[C>>12&63]+d[C>>6&63]+d[63&C]}function A(C,T,N){for(var M,P=[],R=T;R{"use strict";for(var r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",d={},l=0;l>25;return(33554431&T)<<5^996825010&-(N>>0&1)^642813549&-(N>>1&1)^513874426&-(N>>2&1)^1027748829&-(N>>3&1)^705979059&-(N>>4&1)}function S(T){for(var N=1,M=0;M126)return"Invalid prefix ("+T+")";N=E(N)^P>>5}for(N=E(N),M=0;MN)return"Exceeds length limit";var M=T.toLowerCase(),P=T.toUpperCase();if(T!==M&&T!==P)return"Mixed-case string "+T;var R=(T=M).lastIndexOf("1");if(-1===R)return"No separator character for "+T;if(0===R)return"Missing prefix for "+T;var L=T.slice(0,R),H=T.slice(R+1);if(H.length<6)return"Data too short";var V=S(L);if("string"==typeof V)return V;for(var J=[],Y=0;Y=H.length)&&J.push(W)}return 1!==V?"Invalid checksum for "+T:{prefix:L,words:J}}function v(T,N,M,P){for(var R=0,L=0,H=(1<=M;)L-=M,V.push(R>>L&H);if(P)L>0&&V.push(R<=N)return"Excess padding";if(R<M)throw new TypeError("Exceeds length limit");var P=S(T=T.toLowerCase());if("string"==typeof P)throw new Error(P);for(var R=T+"1",L=0;L>5)throw new Error("Non 5-bit word");P=E(P)^H,R+=r.charAt(H)}for(L=0;L<6;++L)P=E(P);for(P^=1,L=0;L<6;++L){var V=P>>5*(5-L)&31;R+=r.charAt(V)}return R},toWordsUnsafe:function b(T){var N=v(T,8,5,!0);if(Array.isArray(N))return N},toWords:function A(T){var N=v(T,8,5,!0);if(Array.isArray(N))return N;throw new Error(N)},fromWordsUnsafe:function O(T){var N=v(T,5,8,!1);if(Array.isArray(N))return N},fromWords:function C(T){var N=v(T,5,8,!1);if(Array.isArray(N))return N;throw new Error(N)}}},48670:(ne,r,d)=>{var l;l=typeof window<"u"&&window.crypto?function(H){var V=new Uint32Array(H);return Buffer.from(window.crypto.getRandomValues(V))}:d(41348).randomBytes;var _=d(96386),E=d(99357).pbkdf2Sync,S=d(24457),a=S,h="Invalid mnemonic",g="Invalid entropy",y="Invalid mnemonic checksum";function v(H,V,J){for(;H.length32)throw new Error(g);if(D.length%4!=0)throw new Error(g);var o=Buffer.from(D);if(O(o)!==Q)throw new Error(y);return o.toString("hex")}function P(H,V){if(Buffer.isBuffer(H)||(H=Buffer.from(H,"hex")),V=V||a,H.length<16)throw new TypeError(g);if(H.length>32)throw new TypeError(g);if(H.length%4!=0)throw new TypeError(g);return(A([].slice.call(H))+O(H)).match(/(.{1,11})/g).map(function(D){var o=b(D);return V[o]}).join(" ")}ne.exports={mnemonicToSeed:T,mnemonicToSeedHex:function N(H,V){return T(H,V).toString("hex")},mnemonicToEntropy:M,entropyToMnemonic:P,generateMnemonic:function R(H,V,J){if((H=H||128)%32!=0)throw new TypeError(g);return P((V=V||l)(H/8),J)},validateMnemonic:function L(H,V){try{M(H,V)}catch{return!1}return!0},wordlists:{EN:S}}},98538:function(ne,r,d){(function(l,_){"use strict";function E(m,w){if(!m)throw new Error(w||"Assertion failed")}function S(m,w){m.super_=w;var x=function(){};x.prototype=w.prototype,m.prototype=new x,m.prototype.constructor=m}function a(m,w,x){if(a.isBN(m))return m;this.negative=0,this.words=null,this.length=0,this.red=null,null!==m&&(("le"===w||"be"===w)&&(x=w,w=10),this._init(m||0,w||10,x||"be"))}var h;"object"==typeof l?l.exports=a:_.BN=a,a.BN=a,a.wordSize=26;try{h=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:d(46601).Buffer}catch{}function g(m,w){var x=m.charCodeAt(w);return x>=48&&x<=57?x-48:x>=65&&x<=70?x-55:x>=97&&x<=102?x-87:void E(!1,"Invalid character in "+m)}function y(m,w,x){var F=g(m,x);return x-1>=w&&(F|=g(m,x-1)<<4),F}function v(m,w,x,F){for(var G=0,k=0,p=Math.min(m.length,x),B=w;B=49?ie-49+10:ie>=17?ie-17+10:ie,E(ie>=0&&k0?w:x},a.min=function(w,x){return w.cmp(x)<0?w:x},a.prototype._init=function(w,x,F){if("number"==typeof w)return this._initNumber(w,x,F);if("object"==typeof w)return this._initArray(w,x,F);"hex"===x&&(x=16),E(x===(0|x)&&x>=2&&x<=36);var G=0;"-"===(w=w.toString().replace(/\s+/g,""))[0]&&(G++,this.negative=1),G=0;G-=3)p=w[G]|w[G-1]<<8|w[G-2]<<16,this.words[k]|=p<>>26-B&67108863,(B+=24)>=26&&(B-=26,k++);else if("le"===F)for(G=0,k=0;G>>26-B&67108863,(B+=24)>=26&&(B-=26,k++);return this._strip()},a.prototype._parseHex=function(w,x,F){this.length=Math.ceil((w.length-x)/6),this.words=new Array(this.length);for(var G=0;G=x;G-=2)B=y(w,x,G)<=18?(k-=18,p+=1,this.words[p]|=B>>>26):k+=8;else for(G=(w.length-x)%2==0?x+1:x;G=18?(k-=18,p+=1,this.words[p]|=B>>>26):k+=8;this._strip()},a.prototype._parseBase=function(w,x,F){this.words=[0],this.length=1;for(var G=0,k=1;k<=67108863;k*=x)G++;G--,k=k/x|0;for(var p=w.length-F,B=p%G,ie=Math.min(p,p-B)+F,te=0,ee=F;ee1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},typeof Symbol<"u"&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{a.prototype.inspect=A}else a.prototype.inspect=A;function A(){return(this.red?""}var O=["","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"],C=[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],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(w,x){var F;if(x=0|x||1,16===(w=w||10)||"hex"===w){F="";for(var G=0,k=0,p=0;p>>24-G&16777215,(G+=2)>=26&&(G-=26,p--),F=0!==k||p!==this.length-1?O[6-ie.length]+ie+F:ie+F}for(0!==k&&(F=k.toString(16)+F);F.length%x!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}if(w===(0|w)&&w>=2&&w<=36){var te=C[w],ee=T[w];F="";var ue=this.clone();for(ue.negative=0;!ue.isZero();){var we=ue.modrn(ee).toString(w);F=(ue=ue.idivn(ee)).isZero()?we+F:O[te-we.length]+we+F}for(this.isZero()&&(F="0"+F);F.length%x!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var w=this.words[0];return 2===this.length?w+=67108864*this.words[1]:3===this.length&&1===this.words[2]?w+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-w:w},a.prototype.toJSON=function(){return this.toString(16,2)},h&&(a.prototype.toBuffer=function(w,x){return this.toArrayLike(h,w,x)}),a.prototype.toArray=function(w,x){return this.toArrayLike(Array,w,x)};function P(m,w,x){x.negative=w.negative^m.negative;var F=m.length+w.length|0;x.length=F,F=F-1|0;var G=0|m.words[0],k=0|w.words[0],p=G*k,B=67108863&p,ie=p/67108864|0;x.words[0]=B;for(var te=1;te>>26,ue=67108863&ie,we=Math.min(te,w.length-1),me=Math.max(0,te-m.length+1);me<=we;me++){var ve=te-me|0;ee+=(p=(G=0|m.words[ve])*(k=0|w.words[me])+ue)/67108864|0,ue=67108863&p}x.words[te]=0|ue,ie=0|ee}return 0!==ie?x.words[te]=0|ie:x.length--,x._strip()}a.prototype.toArrayLike=function(w,x,F){this._strip();var G=this.byteLength(),k=F||Math.max(1,G);E(G<=k,"byte array longer than desired length"),E(k>0,"Requested array length <= 0");var p=function(w,x){return w.allocUnsafe?w.allocUnsafe(x):new w(x)}(w,k);return this["_toArrayLike"+("le"===x?"LE":"BE")](p,G),p},a.prototype._toArrayLikeLE=function(w,x){for(var F=0,G=0,k=0,p=0;k>8&255),F>16&255),6===p?(F>24&255),G=0,p=0):(G=B>>>24,p+=2)}if(F=0&&(w[F--]=B>>8&255),F>=0&&(w[F--]=B>>16&255),6===p?(F>=0&&(w[F--]=B>>24&255),G=0,p=0):(G=B>>>24,p+=2)}if(F>=0)for(w[F--]=G;F>=0;)w[F--]=0},Math.clz32?a.prototype._countBits=function(w){return 32-Math.clz32(w)}:a.prototype._countBits=function(w){var x=w,F=0;return x>=4096&&(F+=13,x>>>=13),x>=64&&(F+=7,x>>>=7),x>=8&&(F+=4,x>>>=4),x>=2&&(F+=2,x>>>=2),F+x},a.prototype._zeroBits=function(w){if(0===w)return 26;var x=w,F=0;return 8191&x||(F+=13,x>>>=13),127&x||(F+=7,x>>>=7),15&x||(F+=4,x>>>=4),3&x||(F+=2,x>>>=2),1&x||F++,F},a.prototype.bitLength=function(){var w=this.words[this.length-1],x=this._countBits(w);return 26*(this.length-1)+x},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var w=0,x=0;xw.length?this.clone().ior(w):w.clone().ior(this)},a.prototype.uor=function(w){return this.length>w.length?this.clone().iuor(w):w.clone().iuor(this)},a.prototype.iuand=function(w){var x;x=this.length>w.length?w:this;for(var F=0;Fw.length?this.clone().iand(w):w.clone().iand(this)},a.prototype.uand=function(w){return this.length>w.length?this.clone().iuand(w):w.clone().iuand(this)},a.prototype.iuxor=function(w){var x,F;this.length>w.length?(x=this,F=w):(x=w,F=this);for(var G=0;Gw.length?this.clone().ixor(w):w.clone().ixor(this)},a.prototype.uxor=function(w){return this.length>w.length?this.clone().iuxor(w):w.clone().iuxor(this)},a.prototype.inotn=function(w){E("number"==typeof w&&w>=0);var x=0|Math.ceil(w/26),F=w%26;this._expand(x),F>0&&x--;for(var G=0;G0&&(this.words[G]=~this.words[G]&67108863>>26-F),this._strip()},a.prototype.notn=function(w){return this.clone().inotn(w)},a.prototype.setn=function(w,x){E("number"==typeof w&&w>=0);var F=w/26|0,G=w%26;return this._expand(F+1),this.words[F]=x?this.words[F]|1<w.length?(F=this,G=w):(F=w,G=this);for(var k=0,p=0;p>>26;for(;0!==k&&p>>26;if(this.length=F.length,0!==k)this.words[this.length]=k,this.length++;else if(F!==this)for(;pw.length?this.clone().iadd(w):w.clone().iadd(this)},a.prototype.isub=function(w){if(0!==w.negative){w.negative=0;var x=this.iadd(w);return w.negative=1,x._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(w),this.negative=1,this._normSign();var G,k,F=this.cmp(w);if(0===F)return this.negative=0,this.length=1,this.words[0]=0,this;F>0?(G=this,k=w):(G=w,k=this);for(var p=0,B=0;B>26,this.words[B]=67108863&x;for(;0!==p&&B>26,this.words[B]=67108863&x;if(0===p&&B>>13,ve=0|G[1],ce=8191&ve,he=ve>>>13,le=0|G[2],de=8191&le,ae=le>>>13,ye=0|G[3],Ce=8191&ye,Pe=ye>>>13,Ge=0|G[4],Ve=8191&Ge,Ue=Ge>>>13,_t=0|G[5],Ze=8191&_t,$e=_t>>>13,Pt=0|G[6],nt=8191&Pt,rt=Pt>>>13,Lt=0|G[7],Re=8191&Lt,Ae=Lt>>>13,xe=0|G[8],je=8191&xe,He=xe>>>13,lt=0|G[9],Je=8191<,at=lt>>>13,fn=0|k[0],ct=8191&fn,dt=fn>>>13,yn=0|k[1],ht=8191&yn,It=yn>>>13,or=0|k[2],Dt=8191&or,Mt=or>>>13,In=0|k[3],yt=8191&In,wt=In>>>13,Pn=0|k[4],vt=8191&Pn,St=Pn>>>13,Fn=0|k[5],pt=8191&Fn,At=Fn>>>13,Ie=0|k[6],Se=8191&Ie,De=Ie>>>13,Ee=0|k[7],Ne=8191&Ee,ze=Ee>>>13,ot=0|k[8],Qe=8191&ot,qe=ot>>>13,Ft=0|k[9],xt=8191&Ft,Yt=Ft>>>13;F.negative=w.negative^x.negative,F.length=19;var Ut=(B+(ie=Math.imul(we,ct))|0)+((8191&(te=(te=Math.imul(we,dt))+Math.imul(me,ct)|0))<<13)|0;B=((ee=Math.imul(me,dt))+(te>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,ie=Math.imul(ce,ct),te=(te=Math.imul(ce,dt))+Math.imul(he,ct)|0,ee=Math.imul(he,dt);var Qt=(B+(ie=ie+Math.imul(we,ht)|0)|0)+((8191&(te=(te=te+Math.imul(we,It)|0)+Math.imul(me,ht)|0))<<13)|0;B=((ee=ee+Math.imul(me,It)|0)+(te>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,ie=Math.imul(de,ct),te=(te=Math.imul(de,dt))+Math.imul(ae,ct)|0,ee=Math.imul(ae,dt),ie=ie+Math.imul(ce,ht)|0,te=(te=te+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,ee=ee+Math.imul(he,It)|0;var Kt=(B+(ie=ie+Math.imul(we,Dt)|0)|0)+((8191&(te=(te=te+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0))<<13)|0;B=((ee=ee+Math.imul(me,Mt)|0)+(te>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,ie=Math.imul(Ce,ct),te=(te=Math.imul(Ce,dt))+Math.imul(Pe,ct)|0,ee=Math.imul(Pe,dt),ie=ie+Math.imul(de,ht)|0,te=(te=te+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,ee=ee+Math.imul(ae,It)|0,ie=ie+Math.imul(ce,Dt)|0,te=(te=te+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,ee=ee+Math.imul(he,Mt)|0;var sn=(B+(ie=ie+Math.imul(we,yt)|0)|0)+((8191&(te=(te=te+Math.imul(we,wt)|0)+Math.imul(me,yt)|0))<<13)|0;B=((ee=ee+Math.imul(me,wt)|0)+(te>>>13)|0)+(sn>>>26)|0,sn&=67108863,ie=Math.imul(Ve,ct),te=(te=Math.imul(Ve,dt))+Math.imul(Ue,ct)|0,ee=Math.imul(Ue,dt),ie=ie+Math.imul(Ce,ht)|0,te=(te=te+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,ee=ee+Math.imul(Pe,It)|0,ie=ie+Math.imul(de,Dt)|0,te=(te=te+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,ee=ee+Math.imul(ae,Mt)|0,ie=ie+Math.imul(ce,yt)|0,te=(te=te+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,ee=ee+Math.imul(he,wt)|0;var qt=(B+(ie=ie+Math.imul(we,vt)|0)|0)+((8191&(te=(te=te+Math.imul(we,St)|0)+Math.imul(me,vt)|0))<<13)|0;B=((ee=ee+Math.imul(me,St)|0)+(te>>>13)|0)+(qt>>>26)|0,qt&=67108863,ie=Math.imul(Ze,ct),te=(te=Math.imul(Ze,dt))+Math.imul($e,ct)|0,ee=Math.imul($e,dt),ie=ie+Math.imul(Ve,ht)|0,te=(te=te+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,ee=ee+Math.imul(Ue,It)|0,ie=ie+Math.imul(Ce,Dt)|0,te=(te=te+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,ee=ee+Math.imul(Pe,Mt)|0,ie=ie+Math.imul(de,yt)|0,te=(te=te+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,ee=ee+Math.imul(ae,wt)|0,ie=ie+Math.imul(ce,vt)|0,te=(te=te+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,ee=ee+Math.imul(he,St)|0;var pn=(B+(ie=ie+Math.imul(we,pt)|0)|0)+((8191&(te=(te=te+Math.imul(we,At)|0)+Math.imul(me,pt)|0))<<13)|0;B=((ee=ee+Math.imul(me,At)|0)+(te>>>13)|0)+(pn>>>26)|0,pn&=67108863,ie=Math.imul(nt,ct),te=(te=Math.imul(nt,dt))+Math.imul(rt,ct)|0,ee=Math.imul(rt,dt),ie=ie+Math.imul(Ze,ht)|0,te=(te=te+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,ee=ee+Math.imul($e,It)|0,ie=ie+Math.imul(Ve,Dt)|0,te=(te=te+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,ee=ee+Math.imul(Ue,Mt)|0,ie=ie+Math.imul(Ce,yt)|0,te=(te=te+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,ee=ee+Math.imul(Pe,wt)|0,ie=ie+Math.imul(de,vt)|0,te=(te=te+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,ee=ee+Math.imul(ae,St)|0,ie=ie+Math.imul(ce,pt)|0,te=(te=te+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,ee=ee+Math.imul(he,At)|0;var ln=(B+(ie=ie+Math.imul(we,Se)|0)|0)+((8191&(te=(te=te+Math.imul(we,De)|0)+Math.imul(me,Se)|0))<<13)|0;B=((ee=ee+Math.imul(me,De)|0)+(te>>>13)|0)+(ln>>>26)|0,ln&=67108863,ie=Math.imul(Re,ct),te=(te=Math.imul(Re,dt))+Math.imul(Ae,ct)|0,ee=Math.imul(Ae,dt),ie=ie+Math.imul(nt,ht)|0,te=(te=te+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,ee=ee+Math.imul(rt,It)|0,ie=ie+Math.imul(Ze,Dt)|0,te=(te=te+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,ee=ee+Math.imul($e,Mt)|0,ie=ie+Math.imul(Ve,yt)|0,te=(te=te+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,ee=ee+Math.imul(Ue,wt)|0,ie=ie+Math.imul(Ce,vt)|0,te=(te=te+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,ee=ee+Math.imul(Pe,St)|0,ie=ie+Math.imul(de,pt)|0,te=(te=te+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,ee=ee+Math.imul(ae,At)|0,ie=ie+Math.imul(ce,Se)|0,te=(te=te+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,ee=ee+Math.imul(he,De)|0;var Xt=(B+(ie=ie+Math.imul(we,Ne)|0)|0)+((8191&(te=(te=te+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0))<<13)|0;B=((ee=ee+Math.imul(me,ze)|0)+(te>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,ie=Math.imul(je,ct),te=(te=Math.imul(je,dt))+Math.imul(He,ct)|0,ee=Math.imul(He,dt),ie=ie+Math.imul(Re,ht)|0,te=(te=te+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,ee=ee+Math.imul(Ae,It)|0,ie=ie+Math.imul(nt,Dt)|0,te=(te=te+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,ee=ee+Math.imul(rt,Mt)|0,ie=ie+Math.imul(Ze,yt)|0,te=(te=te+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,ee=ee+Math.imul($e,wt)|0,ie=ie+Math.imul(Ve,vt)|0,te=(te=te+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,ee=ee+Math.imul(Ue,St)|0,ie=ie+Math.imul(Ce,pt)|0,te=(te=te+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,ee=ee+Math.imul(Pe,At)|0,ie=ie+Math.imul(de,Se)|0,te=(te=te+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,ee=ee+Math.imul(ae,De)|0,ie=ie+Math.imul(ce,Ne)|0,te=(te=te+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,ee=ee+Math.imul(he,ze)|0;var jt=(B+(ie=ie+Math.imul(we,Qe)|0)|0)+((8191&(te=(te=te+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;B=((ee=ee+Math.imul(me,qe)|0)+(te>>>13)|0)+(jt>>>26)|0,jt&=67108863,ie=Math.imul(Je,ct),te=(te=Math.imul(Je,dt))+Math.imul(at,ct)|0,ee=Math.imul(at,dt),ie=ie+Math.imul(je,ht)|0,te=(te=te+Math.imul(je,It)|0)+Math.imul(He,ht)|0,ee=ee+Math.imul(He,It)|0,ie=ie+Math.imul(Re,Dt)|0,te=(te=te+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,ee=ee+Math.imul(Ae,Mt)|0,ie=ie+Math.imul(nt,yt)|0,te=(te=te+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,ee=ee+Math.imul(rt,wt)|0,ie=ie+Math.imul(Ze,vt)|0,te=(te=te+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,ee=ee+Math.imul($e,St)|0,ie=ie+Math.imul(Ve,pt)|0,te=(te=te+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,ee=ee+Math.imul(Ue,At)|0,ie=ie+Math.imul(Ce,Se)|0,te=(te=te+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,ee=ee+Math.imul(Pe,De)|0,ie=ie+Math.imul(de,Ne)|0,te=(te=te+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,ee=ee+Math.imul(ae,ze)|0,ie=ie+Math.imul(ce,Qe)|0,te=(te=te+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0,ee=ee+Math.imul(he,qe)|0;var on=(B+(ie=ie+Math.imul(we,xt)|0)|0)+((8191&(te=(te=te+Math.imul(we,Yt)|0)+Math.imul(me,xt)|0))<<13)|0;B=((ee=ee+Math.imul(me,Yt)|0)+(te>>>13)|0)+(on>>>26)|0,on&=67108863,ie=Math.imul(Je,ht),te=(te=Math.imul(Je,It))+Math.imul(at,ht)|0,ee=Math.imul(at,It),ie=ie+Math.imul(je,Dt)|0,te=(te=te+Math.imul(je,Mt)|0)+Math.imul(He,Dt)|0,ee=ee+Math.imul(He,Mt)|0,ie=ie+Math.imul(Re,yt)|0,te=(te=te+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,ee=ee+Math.imul(Ae,wt)|0,ie=ie+Math.imul(nt,vt)|0,te=(te=te+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,ee=ee+Math.imul(rt,St)|0,ie=ie+Math.imul(Ze,pt)|0,te=(te=te+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,ee=ee+Math.imul($e,At)|0,ie=ie+Math.imul(Ve,Se)|0,te=(te=te+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,ee=ee+Math.imul(Ue,De)|0,ie=ie+Math.imul(Ce,Ne)|0,te=(te=te+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,ee=ee+Math.imul(Pe,ze)|0,ie=ie+Math.imul(de,Qe)|0,te=(te=te+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0,ee=ee+Math.imul(ae,qe)|0;var Wt=(B+(ie=ie+Math.imul(ce,xt)|0)|0)+((8191&(te=(te=te+Math.imul(ce,Yt)|0)+Math.imul(he,xt)|0))<<13)|0;B=((ee=ee+Math.imul(he,Yt)|0)+(te>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,ie=Math.imul(Je,Dt),te=(te=Math.imul(Je,Mt))+Math.imul(at,Dt)|0,ee=Math.imul(at,Mt),ie=ie+Math.imul(je,yt)|0,te=(te=te+Math.imul(je,wt)|0)+Math.imul(He,yt)|0,ee=ee+Math.imul(He,wt)|0,ie=ie+Math.imul(Re,vt)|0,te=(te=te+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,ee=ee+Math.imul(Ae,St)|0,ie=ie+Math.imul(nt,pt)|0,te=(te=te+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,ee=ee+Math.imul(rt,At)|0,ie=ie+Math.imul(Ze,Se)|0,te=(te=te+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,ee=ee+Math.imul($e,De)|0,ie=ie+Math.imul(Ve,Ne)|0,te=(te=te+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,ee=ee+Math.imul(Ue,ze)|0,ie=ie+Math.imul(Ce,Qe)|0,te=(te=te+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0,ee=ee+Math.imul(Pe,qe)|0;var Ht=(B+(ie=ie+Math.imul(de,xt)|0)|0)+((8191&(te=(te=te+Math.imul(de,Yt)|0)+Math.imul(ae,xt)|0))<<13)|0;B=((ee=ee+Math.imul(ae,Yt)|0)+(te>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,ie=Math.imul(Je,yt),te=(te=Math.imul(Je,wt))+Math.imul(at,yt)|0,ee=Math.imul(at,wt),ie=ie+Math.imul(je,vt)|0,te=(te=te+Math.imul(je,St)|0)+Math.imul(He,vt)|0,ee=ee+Math.imul(He,St)|0,ie=ie+Math.imul(Re,pt)|0,te=(te=te+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,ee=ee+Math.imul(Ae,At)|0,ie=ie+Math.imul(nt,Se)|0,te=(te=te+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,ee=ee+Math.imul(rt,De)|0,ie=ie+Math.imul(Ze,Ne)|0,te=(te=te+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,ee=ee+Math.imul($e,ze)|0,ie=ie+Math.imul(Ve,Qe)|0,te=(te=te+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0,ee=ee+Math.imul(Ue,qe)|0;var un=(B+(ie=ie+Math.imul(Ce,xt)|0)|0)+((8191&(te=(te=te+Math.imul(Ce,Yt)|0)+Math.imul(Pe,xt)|0))<<13)|0;B=((ee=ee+Math.imul(Pe,Yt)|0)+(te>>>13)|0)+(un>>>26)|0,un&=67108863,ie=Math.imul(Je,vt),te=(te=Math.imul(Je,St))+Math.imul(at,vt)|0,ee=Math.imul(at,St),ie=ie+Math.imul(je,pt)|0,te=(te=te+Math.imul(je,At)|0)+Math.imul(He,pt)|0,ee=ee+Math.imul(He,At)|0,ie=ie+Math.imul(Re,Se)|0,te=(te=te+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,ee=ee+Math.imul(Ae,De)|0,ie=ie+Math.imul(nt,Ne)|0,te=(te=te+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,ee=ee+Math.imul(rt,ze)|0,ie=ie+Math.imul(Ze,Qe)|0,te=(te=te+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0,ee=ee+Math.imul($e,qe)|0;var Gt=(B+(ie=ie+Math.imul(Ve,xt)|0)|0)+((8191&(te=(te=te+Math.imul(Ve,Yt)|0)+Math.imul(Ue,xt)|0))<<13)|0;B=((ee=ee+Math.imul(Ue,Yt)|0)+(te>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,ie=Math.imul(Je,pt),te=(te=Math.imul(Je,At))+Math.imul(at,pt)|0,ee=Math.imul(at,At),ie=ie+Math.imul(je,Se)|0,te=(te=te+Math.imul(je,De)|0)+Math.imul(He,Se)|0,ee=ee+Math.imul(He,De)|0,ie=ie+Math.imul(Re,Ne)|0,te=(te=te+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,ee=ee+Math.imul(Ae,ze)|0,ie=ie+Math.imul(nt,Qe)|0,te=(te=te+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0,ee=ee+Math.imul(rt,qe)|0;var Et=(B+(ie=ie+Math.imul(Ze,xt)|0)|0)+((8191&(te=(te=te+Math.imul(Ze,Yt)|0)+Math.imul($e,xt)|0))<<13)|0;B=((ee=ee+Math.imul($e,Yt)|0)+(te>>>13)|0)+(Et>>>26)|0,Et&=67108863,ie=Math.imul(Je,Se),te=(te=Math.imul(Je,De))+Math.imul(at,Se)|0,ee=Math.imul(at,De),ie=ie+Math.imul(je,Ne)|0,te=(te=te+Math.imul(je,ze)|0)+Math.imul(He,Ne)|0,ee=ee+Math.imul(He,ze)|0,ie=ie+Math.imul(Re,Qe)|0,te=(te=te+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0,ee=ee+Math.imul(Ae,qe)|0;var bt=(B+(ie=ie+Math.imul(nt,xt)|0)|0)+((8191&(te=(te=te+Math.imul(nt,Yt)|0)+Math.imul(rt,xt)|0))<<13)|0;B=((ee=ee+Math.imul(rt,Yt)|0)+(te>>>13)|0)+(bt>>>26)|0,bt&=67108863,ie=Math.imul(Je,Ne),te=(te=Math.imul(Je,ze))+Math.imul(at,Ne)|0,ee=Math.imul(at,ze),ie=ie+Math.imul(je,Qe)|0,te=(te=te+Math.imul(je,qe)|0)+Math.imul(He,Qe)|0,ee=ee+Math.imul(He,qe)|0;var Zt=(B+(ie=ie+Math.imul(Re,xt)|0)|0)+((8191&(te=(te=te+Math.imul(Re,Yt)|0)+Math.imul(Ae,xt)|0))<<13)|0;B=((ee=ee+Math.imul(Ae,Yt)|0)+(te>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,ie=Math.imul(Je,Qe),te=(te=Math.imul(Je,qe))+Math.imul(at,Qe)|0,ee=Math.imul(at,qe);var kt=(B+(ie=ie+Math.imul(je,xt)|0)|0)+((8191&(te=(te=te+Math.imul(je,Yt)|0)+Math.imul(He,xt)|0))<<13)|0;B=((ee=ee+Math.imul(He,Yt)|0)+(te>>>13)|0)+(kt>>>26)|0,kt&=67108863;var Bt=(B+(ie=Math.imul(Je,xt))|0)+((8191&(te=(te=Math.imul(Je,Yt))+Math.imul(at,xt)|0))<<13)|0;return B=((ee=Math.imul(at,Yt))+(te>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,p[0]=Ut,p[1]=Qt,p[2]=Kt,p[3]=sn,p[4]=qt,p[5]=pn,p[6]=ln,p[7]=Xt,p[8]=jt,p[9]=on,p[10]=Wt,p[11]=Ht,p[12]=un,p[13]=Gt,p[14]=Et,p[15]=bt,p[16]=Zt,p[17]=kt,p[18]=Bt,0!==B&&(p[19]=B,F.length++),F};function L(m,w,x){x.negative=w.negative^m.negative,x.length=m.length+w.length;for(var F=0,G=0,k=0;k>>26)|0)>>>26,p&=67108863}x.words[k]=B,F=p,p=G}return 0!==F?x.words[k]=F:x.length--,x._strip()}function H(m,w,x){return L(m,w,x)}function V(m,w){this.x=m,this.y=w}Math.imul||(R=P),a.prototype.mulTo=function(w,x){var G=this.length+w.length;return 10===this.length&&10===w.length?R(this,w,x):G<63?P(this,w,x):G<1024?L(this,w,x):H(this,w,x)},V.prototype.makeRBT=function(w){for(var x=new Array(w),F=a.prototype._countBits(w)-1,G=0;G>=1;return G},V.prototype.permute=function(w,x,F,G,k,p){for(var B=0;B>>=1)k++;return 1<>>=13,F[2*p+1]=8191&k,k>>>=13;for(p=2*x;p>=26,F+=k/67108864|0,F+=p>>>26,this.words[G]=67108863&p}return 0!==F&&(this.words[G]=F,this.length++),x?this.ineg():this},a.prototype.muln=function(w){return this.clone().imuln(w)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(w){var x=function M(m){for(var w=new Array(m.bitLength()),x=0;x>>G&1}return w}(w);if(0===x.length)return new a(1);for(var F=this,G=0;G=0);var k,x=w%26,F=(w-x)/26,G=67108863>>>26-x<<26-x;if(0!==x){var p=0;for(k=0;k>>26-x}p&&(this.words[k]=p,this.length++)}if(0!==F){for(k=this.length-1;k>=0;k--)this.words[k+F]=this.words[k];for(k=0;k=0),G=x?(x-x%26)/26:0;var k=w%26,p=Math.min((w-k)/26,this.length),B=67108863^67108863>>>k<p)for(this.length-=p,te=0;te=0&&(0!==ee||te>=G);te--){var ue=0|this.words[te];this.words[te]=ee<<26-k|ue>>>k,ee=ue&B}return ie&&0!==ee&&(ie.words[ie.length++]=ee),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(w,x,F){return E(0===this.negative),this.iushrn(w,x,F)},a.prototype.shln=function(w){return this.clone().ishln(w)},a.prototype.ushln=function(w){return this.clone().iushln(w)},a.prototype.shrn=function(w){return this.clone().ishrn(w)},a.prototype.ushrn=function(w){return this.clone().iushrn(w)},a.prototype.testn=function(w){E("number"==typeof w&&w>=0);var x=w%26,F=(w-x)/26,G=1<=0);var x=w%26,F=(w-x)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=F)return this;if(0!==x&&F++,this.length=Math.min(F,this.length),0!==x){var G=67108863^67108863>>>x<=67108864;x++)this.words[x]-=67108864,x===this.length-1?this.words[x+1]=1:this.words[x+1]++;return this.length=Math.max(this.length,x+1),this},a.prototype.isubn=function(w){if(E("number"==typeof w),E(w<67108864),w<0)return this.iaddn(-w);if(0!==this.negative)return this.negative=0,this.iaddn(w),this.negative=1,this;if(this.words[0]-=w,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var x=0;x>26)-(ie/67108864|0),this.words[k+F]=67108863&p}for(;k>26,this.words[k+F]=67108863&p;if(0===B)return this._strip();for(E(-1===B),B=0,k=0;k>26,this.words[k]=67108863&p;return this.negative=1,this._strip()},a.prototype._wordDiv=function(w,x){var F=(this.length,w.length),G=this.clone(),k=w,p=0|k.words[k.length-1];0!==(F=26-this._countBits(p))&&(k=k.ushln(F),G.iushln(F),p=0|k.words[k.length-1]);var te,ie=G.length-k.length;if("mod"!==x){(te=new a(null)).length=ie+1,te.words=new Array(te.length);for(var ee=0;ee=0;we--){var me=67108864*(0|G.words[k.length+we])+(0|G.words[k.length+we-1]);for(me=Math.min(me/p|0,67108863),G._ishlnsubmul(k,me,we);0!==G.negative;)me--,G.negative=0,G._ishlnsubmul(k,1,we),G.isZero()||(G.negative^=1);te&&(te.words[we]=me)}return te&&te._strip(),G._strip(),"div"!==x&&0!==F&&G.iushrn(F),{div:te||null,mod:G}},a.prototype.divmod=function(w,x,F){return E(!w.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===w.negative?(p=this.neg().divmod(w,x),"mod"!==x&&(G=p.div.neg()),"div"!==x&&(k=p.mod.neg(),F&&0!==k.negative&&k.iadd(w)),{div:G,mod:k}):0===this.negative&&0!==w.negative?(p=this.divmod(w.neg(),x),"mod"!==x&&(G=p.div.neg()),{div:G,mod:p.mod}):this.negative&w.negative?(p=this.neg().divmod(w.neg(),x),"div"!==x&&(k=p.mod.neg(),F&&0!==k.negative&&k.isub(w)),{div:p.div,mod:k}):w.length>this.length||this.cmp(w)<0?{div:new a(0),mod:this}:1===w.length?"div"===x?{div:this.divn(w.words[0]),mod:null}:"mod"===x?{div:null,mod:new a(this.modrn(w.words[0]))}:{div:this.divn(w.words[0]),mod:new a(this.modrn(w.words[0]))}:this._wordDiv(w,x);var G,k,p},a.prototype.div=function(w){return this.divmod(w,"div",!1).div},a.prototype.mod=function(w){return this.divmod(w,"mod",!1).mod},a.prototype.umod=function(w){return this.divmod(w,"mod",!0).mod},a.prototype.divRound=function(w){var x=this.divmod(w);if(x.mod.isZero())return x.div;var F=0!==x.div.negative?x.mod.isub(w):x.mod,G=w.ushrn(1),k=w.andln(1),p=F.cmp(G);return p<0||1===k&&0===p?x.div:0!==x.div.negative?x.div.isubn(1):x.div.iaddn(1)},a.prototype.modrn=function(w){var x=w<0;x&&(w=-w),E(w<=67108863);for(var F=(1<<26)%w,G=0,k=this.length-1;k>=0;k--)G=(F*G+(0|this.words[k]))%w;return x?-G:G},a.prototype.modn=function(w){return this.modrn(w)},a.prototype.idivn=function(w){var x=w<0;x&&(w=-w),E(w<=67108863);for(var F=0,G=this.length-1;G>=0;G--){var k=(0|this.words[G])+67108864*F;this.words[G]=k/w|0,F=k%w}return this._strip(),x?this.ineg():this},a.prototype.divn=function(w){return this.clone().idivn(w)},a.prototype.egcd=function(w){E(0===w.negative),E(!w.isZero());var x=this,F=w.clone();x=0!==x.negative?x.umod(w):x.clone();for(var G=new a(1),k=new a(0),p=new a(0),B=new a(1),ie=0;x.isEven()&&F.isEven();)x.iushrn(1),F.iushrn(1),++ie;for(var te=F.clone(),ee=x.clone();!x.isZero();){for(var ue=0,we=1;!(x.words[0]&we)&&ue<26;++ue,we<<=1);if(ue>0)for(x.iushrn(ue);ue-- >0;)(G.isOdd()||k.isOdd())&&(G.iadd(te),k.isub(ee)),G.iushrn(1),k.iushrn(1);for(var me=0,ve=1;!(F.words[0]&ve)&&me<26;++me,ve<<=1);if(me>0)for(F.iushrn(me);me-- >0;)(p.isOdd()||B.isOdd())&&(p.iadd(te),B.isub(ee)),p.iushrn(1),B.iushrn(1);x.cmp(F)>=0?(x.isub(F),G.isub(p),k.isub(B)):(F.isub(x),p.isub(G),B.isub(k))}return{a:p,b:B,gcd:F.iushln(ie)}},a.prototype._invmp=function(w){E(0===w.negative),E(!w.isZero());var ue,x=this,F=w.clone();x=0!==x.negative?x.umod(w):x.clone();for(var G=new a(1),k=new a(0),p=F.clone();x.cmpn(1)>0&&F.cmpn(1)>0;){for(var B=0,ie=1;!(x.words[0]&ie)&&B<26;++B,ie<<=1);if(B>0)for(x.iushrn(B);B-- >0;)G.isOdd()&&G.iadd(p),G.iushrn(1);for(var te=0,ee=1;!(F.words[0]&ee)&&te<26;++te,ee<<=1);if(te>0)for(F.iushrn(te);te-- >0;)k.isOdd()&&k.iadd(p),k.iushrn(1);x.cmp(F)>=0?(x.isub(F),G.isub(k)):(F.isub(x),k.isub(G))}return(ue=0===x.cmpn(1)?G:k).cmpn(0)<0&&ue.iadd(w),ue},a.prototype.gcd=function(w){if(this.isZero())return w.abs();if(w.isZero())return this.abs();var x=this.clone(),F=w.clone();x.negative=0,F.negative=0;for(var G=0;x.isEven()&&F.isEven();G++)x.iushrn(1),F.iushrn(1);for(;;){for(;x.isEven();)x.iushrn(1);for(;F.isEven();)F.iushrn(1);var k=x.cmp(F);if(k<0){var p=x;x=F,F=p}else if(0===k||0===F.cmpn(1))break;x.isub(F)}return F.iushln(G)},a.prototype.invm=function(w){return this.egcd(w).a.umod(w)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(w){return this.words[0]&w},a.prototype.bincn=function(w){E("number"==typeof w);var x=w%26,F=(w-x)/26,G=1<>>26,B&=67108863,this.words[p]=B}return 0!==k&&(this.words[p]=k,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(w){var F,x=w<0;if(0!==this.negative&&!x)return-1;if(0===this.negative&&x)return 1;if(this._strip(),this.length>1)F=1;else{x&&(w=-w),E(w<=67108863,"Number is too big");var G=0|this.words[0];F=G===w?0:Gw.length)return 1;if(this.length=0;F--){var G=0|this.words[F],k=0|w.words[F];if(G!==k){Gk&&(x=1);break}}return x},a.prototype.gtn=function(w){return 1===this.cmpn(w)},a.prototype.gt=function(w){return 1===this.cmp(w)},a.prototype.gten=function(w){return this.cmpn(w)>=0},a.prototype.gte=function(w){return this.cmp(w)>=0},a.prototype.ltn=function(w){return-1===this.cmpn(w)},a.prototype.lt=function(w){return-1===this.cmp(w)},a.prototype.lten=function(w){return this.cmpn(w)<=0},a.prototype.lte=function(w){return this.cmp(w)<=0},a.prototype.eqn=function(w){return 0===this.cmpn(w)},a.prototype.eq=function(w){return 0===this.cmp(w)},a.red=function(w){return new o(w)},a.prototype.toRed=function(w){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),w.convertTo(this)._forceRed(w)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(w){return this.red=w,this},a.prototype.forceRed=function(w){return E(!this.red,"Already a number in reduction context"),this._forceRed(w)},a.prototype.redAdd=function(w){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,w)},a.prototype.redIAdd=function(w){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,w)},a.prototype.redSub=function(w){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,w)},a.prototype.redISub=function(w){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,w)},a.prototype.redShl=function(w){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,w)},a.prototype.redMul=function(w){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.mul(this,w)},a.prototype.redIMul=function(w){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,w),this.red.imul(this,w)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(w){return E(this.red&&!w.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,w)};var J={k256:null,p224:null,p192:null,p25519:null};function Y(m,w){this.name=m,this.p=new a(w,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function Z(){Y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function W(){Y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Q(){Y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function D(){Y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function o(m){if("string"==typeof m){var w=a._prime(m);this.m=w.p,this.prime=w}else E(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function u(m){o.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}Y.prototype._tmp=function(){var w=new a(null);return w.words=new Array(Math.ceil(this.n/13)),w},Y.prototype.ireduce=function(w){var F,x=w;do{this.split(x,this.tmp),F=(x=(x=this.imulK(x)).iadd(this.tmp)).bitLength()}while(F>this.n);var G=F0?x.isub(this.p):void 0!==x.strip?x.strip():x._strip(),x},Y.prototype.split=function(w,x){w.iushrn(this.n,0,x)},Y.prototype.imulK=function(w){return w.imul(this.k)},S(Z,Y),Z.prototype.split=function(w,x){for(var F=4194303,G=Math.min(w.length,9),k=0;k>>22,p=B}p>>>=22,w.words[k-10]=p,0===p&&w.length>10?w.length-=10:w.length-=9},Z.prototype.imulK=function(w){w.words[w.length]=0,w.words[w.length+1]=0,w.length+=2;for(var x=0,F=0;F>>=26,w.words[F]=k,x=G}return 0!==x&&(w.words[w.length++]=x),w},a._prime=function(w){if(J[w])return J[w];var x;if("k256"===w)x=new Z;else if("p224"===w)x=new W;else if("p192"===w)x=new Q;else{if("p25519"!==w)throw new Error("Unknown prime "+w);x=new D}return J[w]=x,x},o.prototype._verify1=function(w){E(0===w.negative,"red works only with positives"),E(w.red,"red works only with red numbers")},o.prototype._verify2=function(w,x){E(0==(w.negative|x.negative),"red works only with positives"),E(w.red&&w.red===x.red,"red works only with red numbers")},o.prototype.imod=function(w){return this.prime?this.prime.ireduce(w)._forceRed(this):(b(w,w.umod(this.m)._forceRed(this)),w)},o.prototype.neg=function(w){return w.isZero()?w.clone():this.m.sub(w)._forceRed(this)},o.prototype.add=function(w,x){this._verify2(w,x);var F=w.add(x);return F.cmp(this.m)>=0&&F.isub(this.m),F._forceRed(this)},o.prototype.iadd=function(w,x){this._verify2(w,x);var F=w.iadd(x);return F.cmp(this.m)>=0&&F.isub(this.m),F},o.prototype.sub=function(w,x){this._verify2(w,x);var F=w.sub(x);return F.cmpn(0)<0&&F.iadd(this.m),F._forceRed(this)},o.prototype.isub=function(w,x){this._verify2(w,x);var F=w.isub(x);return F.cmpn(0)<0&&F.iadd(this.m),F},o.prototype.shl=function(w,x){return this._verify1(w),this.imod(w.ushln(x))},o.prototype.imul=function(w,x){return this._verify2(w,x),this.imod(w.imul(x))},o.prototype.mul=function(w,x){return this._verify2(w,x),this.imod(w.mul(x))},o.prototype.isqr=function(w){return this.imul(w,w.clone())},o.prototype.sqr=function(w){return this.mul(w,w)},o.prototype.sqrt=function(w){if(w.isZero())return w.clone();var x=this.m.andln(3);if(E(x%2==1),3===x){var F=this.m.add(new a(1)).iushrn(2);return this.pow(w,F)}for(var G=this.m.subn(1),k=0;!G.isZero()&&0===G.andln(1);)k++,G.iushrn(1);E(!G.isZero());var p=new a(1).toRed(this),B=p.redNeg(),ie=this.m.subn(1).iushrn(1),te=this.m.bitLength();for(te=new a(2*te*te).toRed(this);0!==this.pow(te,ie).cmp(B);)te.redIAdd(B);for(var ee=this.pow(te,G),ue=this.pow(w,G.addn(1).iushrn(1)),we=this.pow(w,G),me=k;0!==we.cmp(p);){for(var ve=we,ce=0;0!==ve.cmp(p);ce++)ve=ve.redSqr();E(ce=0;k--){for(var ee=x.words[k],ue=te-1;ue>=0;ue--){var we=ee>>ue&1;(p!==G[0]&&(p=this.sqr(p)),0!==we||0!==B)?(B<<=1,B|=we,(4===++ie||0===k&&0===ue)&&(p=this.mul(p,G[B]),ie=0,B=0)):ie=0}te=26}return p},o.prototype.convertTo=function(w){var x=w.umod(this.m);return x===w?x.clone():x},o.prototype.convertFrom=function(w){var x=w.clone();return x.red=null,x},a.mont=function(w){return new u(w)},S(u,o),u.prototype.convertTo=function(w){return this.imod(w.ushln(this.shift))},u.prototype.convertFrom=function(w){var x=this.imod(w.mul(this.rinv));return x.red=null,x},u.prototype.imul=function(w,x){if(w.isZero()||x.isZero())return w.words[0]=0,w.length=1,w;var F=w.imul(x),G=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=F.isub(G).iushrn(this.shift),p=k;return k.cmp(this.m)>=0?p=k.isub(this.m):k.cmpn(0)<0&&(p=k.iadd(this.m)),p._forceRed(this)},u.prototype.mul=function(w,x){if(w.isZero()||x.isZero())return new a(0)._forceRed(this);var F=w.mul(x),G=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=F.isub(G).iushrn(this.shift),p=k;return k.cmp(this.m)>=0?p=k.isub(this.m):k.cmpn(0)<0&&(p=k.iadd(this.m)),p._forceRed(this)},u.prototype.invm=function(w){return this.imod(w._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},21531:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(Q,D,o,u){void 0===u&&(u=o),Object.defineProperty(Q,u,{enumerable:!0,get:function(){return D[o]}})}:function(Q,D,o,u){void 0===u&&(u=o),Q[u]=D[o]}),_=this&&this.__setModuleDefault||(Object.create?function(Q,D){Object.defineProperty(Q,"default",{enumerable:!0,value:D})}:function(Q,D){Q.default=D}),E=this&&this.__decorate||function(Q,D,o,u){var x,m=arguments.length,w=m<3?D:null===u?u=Object.getOwnPropertyDescriptor(D,o):u;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)w=Reflect.decorate(Q,D,o,u);else for(var F=Q.length-1;F>=0;F--)(x=Q[F])&&(w=(m<3?x(w):m>3?x(D,o,w):x(D,o))||w);return m>3&&w&&Object.defineProperty(D,o,w),w},S=this&&this.__importStar||function(Q){if(Q&&Q.__esModule)return Q;var D={};if(null!=Q)for(var o in Q)"default"!==o&&Object.hasOwnProperty.call(Q,o)&&l(D,Q,o);return _(D,Q),D},a=this&&this.__importDefault||function(Q){return Q&&Q.__esModule?Q:{default:Q}};Object.defineProperty(r,"__esModule",{value:!0}),r.deserializeUnchecked=r.deserialize=r.serialize=r.BinaryReader=r.BinaryWriter=r.BorshError=r.baseDecode=r.baseEncode=void 0;const h=a(d(98538)),g=a(d(39076)),y=S(d(62949)),b=new("function"!=typeof TextDecoder?y.TextDecoder:TextDecoder)("utf-8",{fatal:!0});r.baseEncode=function A(Q){return"string"==typeof Q&&(Q=Buffer.from(Q,"utf8")),g.default.encode(Buffer.from(Q))},r.baseDecode=function O(Q){return Buffer.from(g.default.decode(Q))};const C=1024;class T extends Error{constructor(D){super(D),this.fieldPath=[],this.originalMessage=D}addToFieldPath(D){this.fieldPath.splice(0,0,D),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}r.BorshError=T;class N{constructor(){this.buf=Buffer.alloc(C),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(C)]))}writeU8(D){this.maybeResize(),this.buf.writeUInt8(D,this.length),this.length+=1}writeU16(D){this.maybeResize(),this.buf.writeUInt16LE(D,this.length),this.length+=2}writeU32(D){this.maybeResize(),this.buf.writeUInt32LE(D,this.length),this.length+=4}writeU64(D){this.maybeResize(),this.writeBuffer(Buffer.from(new h.default(D).toArray("le",8)))}writeU128(D){this.maybeResize(),this.writeBuffer(Buffer.from(new h.default(D).toArray("le",16)))}writeU256(D){this.maybeResize(),this.writeBuffer(Buffer.from(new h.default(D).toArray("le",32)))}writeU512(D){this.maybeResize(),this.writeBuffer(Buffer.from(new h.default(D).toArray("le",64)))}writeBuffer(D){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),D,Buffer.alloc(C)]),this.length+=D.length}writeString(D){this.maybeResize();const o=Buffer.from(D,"utf8");this.writeU32(o.length),this.writeBuffer(o)}writeFixedArray(D){this.writeBuffer(Buffer.from(D))}writeArray(D,o){this.maybeResize(),this.writeU32(D.length);for(const u of D)this.maybeResize(),o(u)}toArray(){return this.buf.subarray(0,this.length)}}function M(Q,D,o){const u=o.value;o.value=function(...m){try{return u.apply(this,m)}catch(w){if(w instanceof RangeError){const x=w.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(x)>=0)throw new T("Reached the end of buffer when deserializing")}throw w}}}r.BinaryWriter=N;class P{constructor(D){this.buf=D,this.offset=0}readU8(){const D=this.buf.readUInt8(this.offset);return this.offset+=1,D}readU16(){const D=this.buf.readUInt16LE(this.offset);return this.offset+=2,D}readU32(){const D=this.buf.readUInt32LE(this.offset);return this.offset+=4,D}readU64(){const D=this.readBuffer(8);return new h.default(D,"le")}readU128(){const D=this.readBuffer(16);return new h.default(D,"le")}readU256(){const D=this.readBuffer(32);return new h.default(D,"le")}readU512(){const D=this.readBuffer(64);return new h.default(D,"le")}readBuffer(D){if(this.offset+D>this.buf.length)throw new T(`Expected buffer length ${D} isn't within bounds`);const o=this.buf.slice(this.offset,this.offset+D);return this.offset+=D,o}readString(){const D=this.readU32(),o=this.readBuffer(D);try{return b.decode(o)}catch(u){throw new T(`Error decoding UTF-8 string: ${u}`)}}readFixedArray(D){return new Uint8Array(this.readBuffer(D))}readArray(D){const o=this.readU32(),u=Array();for(let m=0;m{L(Q,D,w,u[0],m)});else if(void 0!==u.kind)switch(u.kind){case"option":null==o?m.writeU8(0):(m.writeU8(1),L(Q,D,o,u.type,m));break;case"map":m.writeU32(o.size),o.forEach((w,x)=>{L(Q,D,x,u.key,m),L(Q,D,w,u.value,m)});break;default:throw new T(`FieldType ${u} unrecognized`)}else H(Q,o,m)}catch(w){throw w instanceof T&&w.addToFieldPath(D),w}}function H(Q,D,o){if("function"==typeof D.borshSerialize)return void D.borshSerialize(o);const u=Q.get(D.constructor);if(!u)throw new T(`Class ${D.constructor.name} is missing in schema`);if("struct"===u.kind)u.fields.map(([m,w])=>{L(Q,m,D[m],w,o)});else{if("enum"!==u.kind)throw new T(`Unexpected schema kind: ${u.kind} for ${D.constructor.name}`);{const m=D[u.field];for(let w=0;wJ(Q,D,o[0],u))}if("option"===o.kind)return u.readU8()?J(Q,D,o.type,u):void 0;if("map"===o.kind){let m=new Map;const w=u.readU32();for(let x=0;x=u.values.length)throw new T(`Enum index: ${m} is out of range`);const[w,x]=u.values[m];return new D({[w]:J(Q,w,x,o)})}throw new T(`Unexpected schema kind: ${u.kind} for ${D.constructor.name}`)}E([M],P.prototype,"readU8",null),E([M],P.prototype,"readU16",null),E([M],P.prototype,"readU32",null),E([M],P.prototype,"readU64",null),E([M],P.prototype,"readU128",null),E([M],P.prototype,"readU256",null),E([M],P.prototype,"readU512",null),E([M],P.prototype,"readString",null),E([M],P.prototype,"readFixedArray",null),E([M],P.prototype,"readArray",null),r.BinaryReader=P,r.serialize=function V(Q,D,o=N){const u=new o;return H(Q,D,u),u.toArray()},r.deserialize=function Z(Q,D,o,u=P){const m=new u(o),w=Y(Q,D,m);if(m.offset{var l=d(21082);ne.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},37950:(ne,r,d)=>{var l;function _(S){this.rand=S}if(ne.exports=function(a){return l||(l=new _(null)),l.generate(a)},ne.exports.Rand=_,_.prototype.generate=function(a){return this._rand(a)},_.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);for(var h=new Uint8Array(a),g=0;g{var l=d(73502).Buffer;function _(y){l.isBuffer(y)||(y=l.from(y));for(var v=y.length/4|0,b=new Array(v),A=0;A>>24]^T[R>>>16&255]^N[L>>>8&255]^M[255&H]^v[W++],J=C[R>>>24]^T[L>>>16&255]^N[H>>>8&255]^M[255&P]^v[W++],Y=C[L>>>24]^T[H>>>16&255]^N[P>>>8&255]^M[255&R]^v[W++],Z=C[H>>>24]^T[P>>>16&255]^N[R>>>8&255]^M[255&L]^v[W++],P=V,R=J,L=Y,H=Z;return V=(A[P>>>24]<<24|A[R>>>16&255]<<16|A[L>>>8&255]<<8|A[255&H])^v[W++],J=(A[R>>>24]<<24|A[L>>>16&255]<<16|A[H>>>8&255]<<8|A[255&P])^v[W++],Y=(A[L>>>24]<<24|A[H>>>16&255]<<16|A[P>>>8&255]<<8|A[255&R])^v[W++],Z=(A[H>>>24]<<24|A[P>>>16&255]<<16|A[R>>>8&255]<<8|A[255&L])^v[W++],[V>>>=0,J>>>=0,Y>>>=0,Z>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var y=new Array(256),v=0;v<256;v++)y[v]=v<128?v<<1:v<<1^283;for(var b=[],A=[],O=[[],[],[],[]],C=[[],[],[],[]],T=0,N=0,M=0;M<256;++M){var P=N^N<<1^N<<2^N<<3^N<<4;P=P>>>8^255&P^99,b[T]=P,A[P]=T;var R=y[T],L=y[R],H=y[L],V=257*y[P]^16843008*P;O[0][T]=V<<24|V>>>8,O[1][T]=V<<16|V>>>16,O[2][T]=V<<8|V>>>24,O[3][T]=V,V=16843009*H^65537*L^257*R^16843008*T,C[0][P]=V<<24|V>>>8,C[1][P]=V<<16|V>>>16,C[2][P]=V<<8|V>>>24,C[3][P]=V,0===T?T=N=1:(T=R^y[y[y[H^R]]],N^=y[y[N]])}return{SBOX:b,INV_SBOX:A,SUB_MIX:O,INV_SUB_MIX:C}}();function g(y){this._key=_(y),this._reset()}g.blockSize=16,g.keySize=32,g.prototype.blockSize=g.blockSize,g.prototype.keySize=g.keySize,g.prototype._reset=function(){for(var y=this._key,v=y.length,b=v+6,A=4*(b+1),O=[],C=0;C>>24,T=h.SBOX[T>>>24]<<24|h.SBOX[T>>>16&255]<<16|h.SBOX[T>>>8&255]<<8|h.SBOX[255&T],T^=a[C/v|0]<<24):v>6&&C%v==4&&(T=h.SBOX[T>>>24]<<24|h.SBOX[T>>>16&255]<<16|h.SBOX[T>>>8&255]<<8|h.SBOX[255&T]),O[C]=O[C-v]^T}for(var N=[],M=0;M>>24]]^h.INV_SUB_MIX[1][h.SBOX[R>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[R>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&R]]}this._nRounds=b,this._keySchedule=O,this._invKeySchedule=N},g.prototype.encryptBlockRaw=function(y){return S(y=_(y),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},g.prototype.encryptBlock=function(y){var v=this.encryptBlockRaw(y),b=l.allocUnsafe(16);return b.writeUInt32BE(v[0],0),b.writeUInt32BE(v[1],4),b.writeUInt32BE(v[2],8),b.writeUInt32BE(v[3],12),b},g.prototype.decryptBlock=function(y){var v=(y=_(y))[1];y[1]=y[3],y[3]=v;var b=S(y,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),A=l.allocUnsafe(16);return A.writeUInt32BE(b[0],0),A.writeUInt32BE(b[3],4),A.writeUInt32BE(b[2],8),A.writeUInt32BE(b[1],12),A},g.prototype.scrub=function(){E(this._keySchedule),E(this._invKeySchedule),E(this._key)},ne.exports.AES=g},69382:(ne,r,d)=>{var l=d(41899),_=d(73502).Buffer,E=d(61052),S=d(83894),a=d(68857),h=d(58789),g=d(7968);function b(A,O,C,T){E.call(this);var N=_.alloc(4,0);this._cipher=new l.AES(O);var M=this._cipher.encryptBlock(N);this._ghash=new a(M),C=function v(A,O,C){if(12===O.length)return A._finID=_.concat([O,_.from([0,0,0,1])]),_.concat([O,_.from([0,0,0,2])]);var T=new a(C),N=O.length,M=N%16;T.update(O),M&&(M=16-M,T.update(_.alloc(M,0))),T.update(_.alloc(8,0));var P=8*N,R=_.alloc(8);R.writeUIntBE(P,0,8),T.update(R),A._finID=T.state;var L=_.from(A._finID);return g(L),L}(this,C,M),this._prev=_.from(C),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=T,this._alen=0,this._len=0,this._mode=A,this._authTag=null,this._called=!1}S(b,E),b.prototype._update=function(A){if(!this._called&&this._alen){var O=16-this._alen%16;O<16&&(O=_.alloc(O,0),this._ghash.update(O))}this._called=!0;var C=this._mode.encrypt(this,A);return this._decrypt?this._ghash.update(A):this._ghash.update(C),this._len+=A.length,C},b.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var A=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function y(A,O){var C=0;A.length!==O.length&&C++;for(var T=Math.min(A.length,O.length),N=0;N{var l=d(96900),_=d(40856),E=d(44946);r.createCipher=r.Cipher=l.createCipher,r.createCipheriv=r.Cipheriv=l.createCipheriv,r.createDecipher=r.Decipher=_.createDecipher,r.createDecipheriv=r.Decipheriv=_.createDecipheriv,r.listCiphers=r.getCiphers=function S(){return Object.keys(E)}},40856:(ne,r,d)=>{var l=d(69382),_=d(73502).Buffer,E=d(29171),S=d(38441),a=d(61052),h=d(41899),g=d(40347);function v(T,N,M){a.call(this),this._cache=new b,this._last=void 0,this._cipher=new h.AES(N),this._prev=_.from(M),this._mode=T,this._autopadding=!0}function b(){this.cache=_.allocUnsafe(0)}function O(T,N,M){var P=E[T.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if("string"==typeof M&&(M=_.from(M)),"GCM"!==P.mode&&M.length!==P.iv)throw new TypeError("invalid iv length "+M.length);if("string"==typeof N&&(N=_.from(N)),N.length!==P.key/8)throw new TypeError("invalid key length "+N.length);return"stream"===P.type?new S(P.module,N,M,!0):"auth"===P.type?new l(P.module,N,M,!0):new v(P.module,N,M)}d(83894)(v,a),v.prototype._update=function(T){this._cache.add(T);for(var N,M,P=[];N=this._cache.get(this._autopadding);)M=this._mode.decrypt(this,N),P.push(M);return _.concat(P)},v.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return function A(T){var N=T[15];if(N<1||N>16)throw new Error("unable to decrypt data");for(var M=-1;++M16)return N=this.cache.slice(0,16),this.cache=this.cache.slice(16),N}else if(this.cache.length>=16)return N=this.cache.slice(0,16),this.cache=this.cache.slice(16),N;return null},b.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function C(T,N){var M=E[T.toLowerCase()];if(!M)throw new TypeError("invalid suite type");var P=g(N,!1,M.key,M.iv);return O(T,P.key,P.iv)},r.createDecipheriv=O},96900:(ne,r,d)=>{var l=d(29171),_=d(69382),E=d(73502).Buffer,S=d(38441),a=d(61052),h=d(41899),g=d(40347);function v(T,N,M){a.call(this),this._cache=new A,this._cipher=new h.AES(N),this._prev=E.from(M),this._mode=T,this._autopadding=!0}d(83894)(v,a),v.prototype._update=function(T){this._cache.add(T);for(var N,M,P=[];N=this._cache.get();)M=this._mode.encrypt(this,N),P.push(M);return E.concat(P)};var b=E.alloc(16,16);function A(){this.cache=E.allocUnsafe(0)}function O(T,N,M){var P=l[T.toLowerCase()];if(!P)throw new TypeError("invalid suite type");if("string"==typeof N&&(N=E.from(N)),N.length!==P.key/8)throw new TypeError("invalid key length "+N.length);if("string"==typeof M&&(M=E.from(M)),"GCM"!==P.mode&&M.length!==P.iv)throw new TypeError("invalid iv length "+M.length);return"stream"===P.type?new S(P.module,N,M):"auth"===P.type?new _(P.module,N,M):new v(P.module,N,M)}v.prototype._final=function(){var T=this._cache.flush();if(this._autopadding)return T=this._mode.encrypt(this,T),this._cipher.scrub(),T;if(!T.equals(b))throw this._cipher.scrub(),new Error("data not multiple of block length")},v.prototype.setAutoPadding=function(T){return this._autopadding=!!T,this},A.prototype.add=function(T){this.cache=E.concat([this.cache,T])},A.prototype.get=function(){if(this.cache.length>15){var T=this.cache.slice(0,16);return this.cache=this.cache.slice(16),T}return null},A.prototype.flush=function(){for(var T=16-this.cache.length,N=E.allocUnsafe(T),M=-1;++M{var l=d(73502).Buffer,_=l.alloc(16,0);function S(h){var g=l.allocUnsafe(16);return g.writeUInt32BE(h[0]>>>0,0),g.writeUInt32BE(h[1]>>>0,4),g.writeUInt32BE(h[2]>>>0,8),g.writeUInt32BE(h[3]>>>0,12),g}function a(h){this.h=h,this.state=l.alloc(16,0),this.cache=l.allocUnsafe(0)}a.prototype.ghash=function(h){for(var g=-1;++g0;y--)h[y]=h[y]>>>1|(1&h[y-1])<<31;h[0]=h[0]>>>1,b&&(h[0]=h[0]^225<<24)}this.state=S(g)},a.prototype.update=function(h){this.cache=l.concat([this.cache,h]);for(var g;this.cache.length>=16;)g=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(g)},a.prototype.final=function(h,g){return this.cache.length&&this.ghash(l.concat([this.cache,_],16)),this.ghash(S([0,h,0,g])),this.state},ne.exports=a},7968:ne=>{ne.exports=function r(d){for(var _,l=d.length;l--;){if(255!==(_=d.readUInt8(l))){_++,d.writeUInt8(_,l);break}d.writeUInt8(0,l)}}},64903:(ne,r,d)=>{var l=d(58789);r.encrypt=function(_,E){var S=l(E,_._prev);return _._prev=_._cipher.encryptBlock(S),_._prev},r.decrypt=function(_,E){var S=_._prev;_._prev=E;var a=_._cipher.decryptBlock(E);return l(a,S)}},59885:(ne,r,d)=>{var l=d(73502).Buffer,_=d(58789);function E(S,a,h){var g=a.length,y=_(a,S._cache);return S._cache=S._cache.slice(g),S._prev=l.concat([S._prev,h?a:y]),y}r.encrypt=function(S,a,h){for(var y,g=l.allocUnsafe(0);a.length;){if(0===S._cache.length&&(S._cache=S._cipher.encryptBlock(S._prev),S._prev=l.allocUnsafe(0)),!(S._cache.length<=a.length)){g=l.concat([g,E(S,a,h)]);break}y=S._cache.length,g=l.concat([g,E(S,a.slice(0,y),h)]),a=a.slice(y)}return g}},86531:(ne,r,d)=>{var l=d(73502).Buffer;function _(S,a,h){for(var A,O,y=-1,b=0;++y<8;)A=a&1<<7-y?128:0,b+=(128&(O=S._cipher.encryptBlock(S._prev)[0]^A))>>y%8,S._prev=E(S._prev,h?A:O);return b}function E(S,a){var h=S.length,g=-1,y=l.allocUnsafe(S.length);for(S=l.concat([S,l.from([a])]);++g>7;return y}r.encrypt=function(S,a,h){for(var g=a.length,y=l.allocUnsafe(g),v=-1;++v{var l=d(73502).Buffer;function _(E,S,a){var g=E._cipher.encryptBlock(E._prev)[0]^S;return E._prev=l.concat([E._prev.slice(1),l.from([a?S:g])]),g}r.encrypt=function(E,S,a){for(var h=S.length,g=l.allocUnsafe(h),y=-1;++y{var l=d(58789),_=d(73502).Buffer,E=d(7968);function S(h){var g=h._cipher.encryptBlockRaw(h._prev);return E(h._prev),g}r.encrypt=function(h,g){var y=Math.ceil(g.length/16),v=h._cache.length;h._cache=_.concat([h._cache,_.allocUnsafe(16*y)]);for(var b=0;b{r.encrypt=function(d,l){return d._cipher.encryptBlock(l)},r.decrypt=function(d,l){return d._cipher.decryptBlock(l)}},29171:(ne,r,d)=>{var l={ECB:d(21704),CBC:d(64903),CFB:d(59885),CFB8:d(21641),CFB1:d(86531),OFB:d(86816),CTR:d(11150),GCM:d(11150)},_=d(44946);for(var E in _)_[E].module=l[_[E].mode];ne.exports=_},86816:(ne,r,d)=>{var l=d(58789);function _(E){return E._prev=E._cipher.encryptBlock(E._prev),E._prev}r.encrypt=function(E,S){for(;E._cache.length{var l=d(41899),_=d(73502).Buffer,E=d(61052);function a(h,g,y,v){E.call(this),this._cipher=new l.AES(g),this._prev=_.from(y),this._cache=_.allocUnsafe(0),this._secCache=_.allocUnsafe(0),this._decrypt=v,this._mode=h}d(83894)(a,E),a.prototype._update=function(h){return this._mode.encrypt(this,h,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},ne.exports=a},55255:(ne,r,d)=>{var l=d(9004),_=d(84330),E=d(29171),S=d(51115),a=d(40347);function y(A,O,C){if(A=A.toLowerCase(),E[A])return _.createCipheriv(A,O,C);if(S[A])return new l({key:O,iv:C,mode:A});throw new TypeError("invalid suite type")}function v(A,O,C){if(A=A.toLowerCase(),E[A])return _.createDecipheriv(A,O,C);if(S[A])return new l({key:O,iv:C,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}r.createCipher=r.Cipher=function h(A,O){var C,T;if(A=A.toLowerCase(),E[A])C=E[A].key,T=E[A].iv;else{if(!S[A])throw new TypeError("invalid suite type");C=8*S[A].key,T=S[A].iv}var N=a(O,!1,C,T);return y(A,N.key,N.iv)},r.createCipheriv=r.Cipheriv=y,r.createDecipher=r.Decipher=function g(A,O){var C,T;if(A=A.toLowerCase(),E[A])C=E[A].key,T=E[A].iv;else{if(!S[A])throw new TypeError("invalid suite type");C=8*S[A].key,T=S[A].iv}var N=a(O,!1,C,T);return v(A,N.key,N.iv)},r.createDecipheriv=r.Decipheriv=v,r.listCiphers=r.getCiphers=function b(){return Object.keys(S).concat(_.getCiphers())}},9004:(ne,r,d)=>{var l=d(61052),_=d(73684),E=d(83894),S=d(73502).Buffer,a={"des-ede3-cbc":_.CBC.instantiate(_.EDE),"des-ede3":_.EDE,"des-ede-cbc":_.CBC.instantiate(_.EDE),"des-ede":_.EDE,"des-cbc":_.CBC.instantiate(_.DES),"des-ecb":_.DES};function h(g){l.call(this);var b,y=g.mode.toLowerCase(),v=a[y];b=g.decrypt?"decrypt":"encrypt";var A=g.key;S.isBuffer(A)||(A=S.from(A)),("des-ede"===y||"des-ede-cbc"===y)&&(A=S.concat([A,A.slice(0,8)]));var O=g.iv;S.isBuffer(O)||(O=S.from(O)),this._des=v.create({key:A,iv:O,type:b})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],ne.exports=h,E(h,l),h.prototype._update=function(g){return S.from(this._des.update(g))},h.prototype._final=function(){return S.from(this._des.final())}},51115:(ne,r)=>{r["des-ecb"]={key:8,iv:0},r["des-cbc"]=r.des={key:8,iv:8},r["des-ede3-cbc"]=r.des3={key:24,iv:8},r["des-ede3"]={key:24,iv:0},r["des-ede-cbc"]={key:16,iv:8},r["des-ede"]={key:16,iv:0}},6581:(ne,r,d)=>{var l=d(77105),_=d(4427),E=d(94115),S=_("level-filesystem",{db:l});ne.exports=E(S)},8466:(ne,r,d)=>{var l=d(98538),_=d(53753);function S(h){var y,g=h.modulus.byteLength();do{y=new l(_(g))}while(y.cmp(h.modulus)>=0||!y.umod(h.prime1)||!y.umod(h.prime2));return y}function a(h,g){var y=function E(h){var g=S(h);return{blinder:g.toRed(l.mont(h.modulus)).redPow(new l(h.publicExponent)).fromRed(),unblinder:g.invm(h.modulus)}}(g),v=g.modulus.byteLength(),b=new l(h).mul(y.blinder).umod(g.modulus),A=b.toRed(l.mont(g.prime1)),O=b.toRed(l.mont(g.prime2)),C=g.coefficient,T=g.prime1,N=g.prime2,M=A.redPow(g.exponent1).fromRed(),P=O.redPow(g.exponent2).fromRed(),R=M.isub(P).imul(C).umod(T).imul(N);return P.iadd(R).imul(y.unblinder).umod(g.modulus).toArrayLike(Buffer,"be",v)}a.getr=S,ne.exports=a},87793:(ne,r,d)=>{"use strict";ne.exports=d(75207)},3923:(ne,r,d)=>{"use strict";var l=d(73502).Buffer,_=d(96386),E=d(31496),S=d(83894),a=d(79947),h=d(3946),g=d(75207);function y(O){E.Writable.call(this);var C=g[O];if(!C)throw new Error("Unknown message digest");this._hashType=C.hash,this._hash=_(C.hash),this._tag=C.id,this._signType=C.sign}function v(O){E.Writable.call(this);var C=g[O];if(!C)throw new Error("Unknown message digest");this._hash=_(C.hash),this._tag=C.id,this._signType=C.sign}function b(O){return new y(O)}function A(O){return new v(O)}Object.keys(g).forEach(function(O){g[O].id=l.from(g[O].id,"hex"),g[O.toLowerCase()]=g[O]}),S(y,E.Writable),y.prototype._write=function(C,T,N){this._hash.update(C),N()},y.prototype.update=function(C,T){return this._hash.update("string"==typeof C?l.from(C,T):C),this},y.prototype.sign=function(C,T){this.end();var N=this._hash.digest(),M=a(N,C,this._hashType,this._signType,this._tag);return T?M.toString(T):M},S(v,E.Writable),v.prototype._write=function(C,T,N){this._hash.update(C),N()},v.prototype.update=function(C,T){return this._hash.update("string"==typeof C?l.from(C,T):C),this},v.prototype.verify=function(C,T,N){var M="string"==typeof T?l.from(T,N):T;this.end();var P=this._hash.digest();return h(M,P,C,this._signType,this._tag)},ne.exports={Sign:b,Verify:A,createSign:b,createVerify:A}},79947:(ne,r,d)=>{"use strict";var l=d(73502).Buffer,_=d(74529),E=d(8466),S=d(57715).ec,a=d(98538),h=d(22772),g=d(1308),y=1;function C(R,L,H,V){if((R=l.from(R.toArray())).length0&&H.ishrn(V),H}function M(R,L,H){var V,J;do{for(V=l.alloc(0);8*V.length{"use strict";var l=d(73502).Buffer,_=d(98538),E=d(57715).ec,S=d(22772),a=d(1308);function v(b,A){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(A)>=0)throw new Error("invalid sig")}ne.exports=function h(b,A,O,C,T){var N=S(O);if("ec"===N.type){if("ecdsa"!==C&&"ecdsa/rsa"!==C)throw new Error("wrong public key type");return function g(b,A,O){var C=a[O.data.algorithm.curve.join(".")];if(!C)throw new Error("unknown curve "+O.data.algorithm.curve.join("."));var T=new E(C),N=O.data.subjectPrivateKey.data;return T.verify(A,b,N)}(b,A,N)}if("dsa"===N.type){if("dsa"!==C)throw new Error("wrong public key type");return function y(b,A,O){var C=O.data.p,T=O.data.q,N=O.data.g,M=O.data.pub_key,P=S.signature.decode(b,"der"),R=P.s,L=P.r;v(R,T),v(L,T);var H=_.mont(C),V=R.invm(T),J=N.toRed(H).redPow(new _(A).mul(V).mod(T)).fromRed().mul(M.toRed(H).redPow(L.mul(V).mod(T)).fromRed()).mod(C).mod(T);return 0===J.cmp(L)}(b,A,N)}if("rsa"!==C&&"ecdsa/rsa"!==C)throw new Error("wrong public key type");A=l.concat([T,A]);for(var M=N.modulus.byteLength(),P=[1],R=0;A.length+P.length+2{"use strict";var d={};function l(h,g,y){y||(y=Error);var b=function(A){function O(C,T,N){return A.call(this,function v(A,O,C){return"string"==typeof g?g:g(A,O,C)}(C,T,N))||this}return function r(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}(O,A),O}(y);b.prototype.name=y.name,b.prototype.code=h,d[h]=b}function _(h,g){if(Array.isArray(h)){var y=h.length;return h=h.map(function(v){return String(v)}),y>2?"one of ".concat(g," ").concat(h.slice(0,y-1).join(", "),", or ")+h[y-1]:2===y?"one of ".concat(g," ").concat(h[0]," or ").concat(h[1]):"of ".concat(g," ").concat(h[0])}return"of ".concat(g," ").concat(String(h))}l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,y){var v,b;if("string"==typeof g&&function E(h,g,y){return h.substr(!y||y<0?0:+y,g.length)===g}(g,"not ")?(v="must not be",g=g.replace(/^not /,"")):v="must be",function S(h,g,y){return(void 0===y||y>h.length)&&(y=h.length),h.substring(y-g.length,y)===g}(h," argument"))b="The ".concat(h," ").concat(v," ").concat(_(g,"type"));else{var A=function a(h,g,y){return"number"!=typeof y&&(y=0),!(y+g.length>h.length)&&-1!==h.indexOf(g,y)}(h,".")?"property":"argument";b='The "'.concat(h,'" ').concat(A," ").concat(v," ").concat(_(g,"type"))}return b+=". Received type ".concat(typeof y)},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ne.exports.q=d},55986:(ne,r,d)=>{"use strict";var l=Object.keys||function(b){var A=[];for(var O in b)A.push(O);return A};ne.exports=g;var _=d(14473),E=d(3766);d(83894)(g,_);for(var S=l(E.prototype),a=0;a{"use strict";ne.exports=_;var l=d(3556);function _(E){if(!(this instanceof _))return new _(E);l.call(this,E)}d(83894)(_,l),_.prototype._transform=function(E,S,a){a(null,E)}},14473:(ne,r,d)=>{"use strict";var l;ne.exports=D,D.ReadableState=Q;d(59069).EventEmitter;var E=function(ye,Ce){return ye.listeners(Ce).length},S=d(2228),a=d(93172).Buffer,h=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var b,v=d(56353);b=v&&v.debuglog?v.debuglog("stream"):function(){};var H,V,J,A=d(76083),O=d(34936),T=d(47890).getHighWaterMark,N=d(84162).q,M=N.ERR_INVALID_ARG_TYPE,P=N.ERR_STREAM_PUSH_AFTER_EOF,R=N.ERR_METHOD_NOT_IMPLEMENTED,L=N.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;d(83894)(D,S);var Y=O.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function Q(ae,ye,Ce){l=l||d(55986),ae=ae||{},"boolean"!=typeof Ce&&(Ce=ye instanceof l),this.objectMode=!!ae.objectMode,Ce&&(this.objectMode=this.objectMode||!!ae.readableObjectMode),this.highWaterMark=T(this,ae,"readableHighWaterMark",Ce),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ae.emitClose,this.autoDestroy=!!ae.autoDestroy,this.destroyed=!1,this.defaultEncoding=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(H||(H=d(13465).s),this.decoder=new H(ae.encoding),this.encoding=ae.encoding)}function D(ae){if(l=l||d(55986),!(this instanceof D))return new D(ae);var ye=this instanceof l;this._readableState=new Q(ae,this,ye),this.readable=!0,ae&&("function"==typeof ae.read&&(this._read=ae.read),"function"==typeof ae.destroy&&(this._destroy=ae.destroy)),S.call(this)}function o(ae,ye,Ce,Pe,Ge){b("readableAddChunk",ye);var Ue,Ve=ae._readableState;if(null===ye)Ve.reading=!1,function G(ae,ye){if(b("onEofChunk"),!ye.ended){if(ye.decoder){var Ce=ye.decoder.end();Ce&&Ce.length&&(ye.buffer.push(Ce),ye.length+=ye.objectMode?1:Ce.length)}ye.ended=!0,ye.sync?k(ae):(ye.needReadable=!1,ye.emittedReadable||(ye.emittedReadable=!0,p(ae)))}}(ae,Ve);else if(Ge||(Ue=function m(ae,ye){var Ce;return!function y(ae){return a.isBuffer(ae)||ae instanceof h}(ye)&&"string"!=typeof ye&&void 0!==ye&&!ae.objectMode&&(Ce=new M("chunk",["string","Buffer","Uint8Array"],ye)),Ce}(Ve,ye)),Ue)Y(ae,Ue);else if(Ve.objectMode||ye&&ye.length>0)if("string"!=typeof ye&&!Ve.objectMode&&Object.getPrototypeOf(ye)!==a.prototype&&(ye=function g(ae){return a.from(ae)}(ye)),Pe)Ve.endEmitted?Y(ae,new L):u(ae,Ve,ye,!0);else if(Ve.ended)Y(ae,new P);else{if(Ve.destroyed)return!1;Ve.reading=!1,Ve.decoder&&!Ce?(ye=Ve.decoder.write(ye),Ve.objectMode||0!==ye.length?u(ae,Ve,ye,!1):B(ae,Ve)):u(ae,Ve,ye,!1)}else Pe||(Ve.reading=!1,B(ae,Ve));return!Ve.ended&&(Ve.lengthye.highWaterMark&&(ye.highWaterMark=function x(ae){return ae>=w?ae=w:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}(ae)),ae<=ye.length?ae:ye.ended?ye.length:(ye.needReadable=!0,0))}function k(ae){var ye=ae._readableState;b("emitReadable",ye.needReadable,ye.emittedReadable),ye.needReadable=!1,ye.emittedReadable||(b("emitReadable",ye.flowing),ye.emittedReadable=!0,process.nextTick(p,ae))}function p(ae){var ye=ae._readableState;b("emitReadable_",ye.destroyed,ye.length,ye.ended),!ye.destroyed&&(ye.length||ye.ended)&&(ae.emit("readable"),ye.emittedReadable=!1),ye.needReadable=!ye.flowing&&!ye.ended&&ye.length<=ye.highWaterMark,ve(ae)}function B(ae,ye){ye.readingMore||(ye.readingMore=!0,process.nextTick(ie,ae,ye))}function ie(ae,ye){for(;!ye.reading&&!ye.ended&&(ye.length0,ye.resumeScheduled&&!ye.paused?ye.flowing=!0:ae.listenerCount("data")>0&&ae.resume()}function ue(ae){b("readable nexttick read 0"),ae.read(0)}function me(ae,ye){b("resume",ye.reading),ye.reading||ae.read(0),ye.resumeScheduled=!1,ae.emit("resume"),ve(ae),ye.flowing&&!ye.reading&&ae.read(0)}function ve(ae){var ye=ae._readableState;for(b("flow",ye.flowing);ye.flowing&&null!==ae.read(););}function ce(ae,ye){return 0===ye.length?null:(ye.objectMode?Ce=ye.buffer.shift():!ae||ae>=ye.length?(Ce=ye.decoder?ye.buffer.join(""):1===ye.buffer.length?ye.buffer.first():ye.buffer.concat(ye.length),ye.buffer.clear()):Ce=ye.buffer.consume(ae,ye.decoder),Ce);var Ce}function he(ae){var ye=ae._readableState;b("endReadable",ye.endEmitted),ye.endEmitted||(ye.ended=!0,process.nextTick(le,ye,ae))}function le(ae,ye){if(b("endReadableNT",ae.endEmitted,ae.length),!ae.endEmitted&&0===ae.length&&(ae.endEmitted=!0,ye.readable=!1,ye.emit("end"),ae.autoDestroy)){var Ce=ye._writableState;(!Ce||Ce.autoDestroy&&Ce.finished)&&ye.destroy()}}function de(ae,ye){for(var Ce=0,Pe=ae.length;Ce=ye.highWaterMark:ye.length>0)||ye.ended))return b("read: emitReadable",ye.length,ye.ended),0===ye.length&&ye.ended?he(this):k(this),null;if(0===(ae=F(ae,ye))&&ye.ended)return 0===ye.length&&he(this),null;var Ge,Pe=ye.needReadable;return b("need readable",Pe),(0===ye.length||ye.length-ae0?ce(ae,ye):null)?(ye.needReadable=ye.length<=ye.highWaterMark,ae=0):(ye.length-=ae,ye.awaitDrain=0),0===ye.length&&(ye.ended||(ye.needReadable=!0),Ce!==ae&&ye.ended&&he(this)),null!==Ge&&this.emit("data",Ge),Ge},D.prototype._read=function(ae){Y(this,new R("_read()"))},D.prototype.pipe=function(ae,ye){var Ce=this,Pe=this._readableState;switch(Pe.pipesCount){case 0:Pe.pipes=ae;break;case 1:Pe.pipes=[Pe.pipes,ae];break;default:Pe.pipes.push(ae)}Pe.pipesCount+=1,b("pipe count=%d opts=%j",Pe.pipesCount,ye);var Ve=(!ye||!1!==ye.end)&&ae!==process.stdout&&ae!==process.stderr?_t:Ae;function Ue(xe,je){b("onunpipe"),xe===Ce&&je&&!1===je.hasUnpiped&&(je.hasUnpiped=!0,function Pt(){b("cleanup"),ae.removeListener("close",Lt),ae.removeListener("finish",Re),ae.removeListener("drain",Ze),ae.removeListener("error",rt),ae.removeListener("unpipe",Ue),Ce.removeListener("end",_t),Ce.removeListener("end",Ae),Ce.removeListener("data",nt),$e=!0,Pe.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&&Ze()}())}function _t(){b("onend"),ae.end()}Pe.endEmitted?process.nextTick(Ve):Ce.once("end",Ve),ae.on("unpipe",Ue);var Ze=function te(ae){return function(){var Ce=ae._readableState;b("pipeOnDrain",Ce.awaitDrain),Ce.awaitDrain&&Ce.awaitDrain--,0===Ce.awaitDrain&&E(ae,"data")&&(Ce.flowing=!0,ve(ae))}}(Ce);ae.on("drain",Ze);var $e=!1;function nt(xe){b("ondata");var je=ae.write(xe);b("dest.write",je),!1===je&&((1===Pe.pipesCount&&Pe.pipes===ae||Pe.pipesCount>1&&-1!==de(Pe.pipes,ae))&&!$e&&(b("false write response, pause",Pe.awaitDrain),Pe.awaitDrain++),Ce.pause())}function rt(xe){b("onerror",xe),Ae(),ae.removeListener("error",rt),0===E(ae,"error")&&Y(ae,xe)}function Lt(){ae.removeListener("finish",Re),Ae()}function Re(){b("onfinish"),ae.removeListener("close",Lt),Ae()}function Ae(){b("unpipe"),Ce.unpipe(ae)}return Ce.on("data",nt),function W(ae,ye,Ce){if("function"==typeof ae.prependListener)return ae.prependListener(ye,Ce);ae._events&&ae._events[ye]?Array.isArray(ae._events[ye])?ae._events[ye].unshift(Ce):ae._events[ye]=[Ce,ae._events[ye]]:ae.on(ye,Ce)}(ae,"error",rt),ae.once("close",Lt),ae.once("finish",Re),ae.emit("pipe",Ce),Pe.flowing||(b("pipe resume"),Ce.resume()),ae},D.prototype.unpipe=function(ae){var ye=this._readableState,Ce={hasUnpiped:!1};if(0===ye.pipesCount)return this;if(1===ye.pipesCount)return ae&&ae!==ye.pipes||(ae||(ae=ye.pipes),ye.pipes=null,ye.pipesCount=0,ye.flowing=!1,ae&&ae.emit("unpipe",this,Ce)),this;if(!ae){var Pe=ye.pipes,Ge=ye.pipesCount;ye.pipes=null,ye.pipesCount=0,ye.flowing=!1;for(var Ve=0;Ve0,!1!==Pe.flowing&&this.resume()):"readable"===ae&&!Pe.endEmitted&&!Pe.readableListening&&(Pe.readableListening=Pe.needReadable=!0,Pe.flowing=!1,Pe.emittedReadable=!1,b("on readable",Pe.length,Pe.reading),Pe.length?k(this):Pe.reading||process.nextTick(ue,this)),Ce},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(ae,ye){var Ce=S.prototype.removeListener.call(this,ae,ye);return"readable"===ae&&process.nextTick(ee,this),Ce},D.prototype.removeAllListeners=function(ae){var ye=S.prototype.removeAllListeners.apply(this,arguments);return("readable"===ae||void 0===ae)&&process.nextTick(ee,this),ye},D.prototype.resume=function(){var ae=this._readableState;return ae.flowing||(b("resume"),ae.flowing=!ae.readableListening,function we(ae,ye){ye.resumeScheduled||(ye.resumeScheduled=!0,process.nextTick(me,ae,ye))}(this,ae)),ae.paused=!1,this},D.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},D.prototype.wrap=function(ae){var ye=this,Ce=this._readableState,Pe=!1;for(var Ge in ae.on("end",function(){if(b("wrapped end"),Ce.decoder&&!Ce.ended){var Ue=Ce.decoder.end();Ue&&Ue.length&&ye.push(Ue)}ye.push(null)}),ae.on("data",function(Ue){(b("wrapped data"),Ce.decoder&&(Ue=Ce.decoder.write(Ue)),Ce.objectMode&&null==Ue||!(Ce.objectMode||Ue&&Ue.length))||(ye.push(Ue)||(Pe=!0,ae.pause()))}),ae)void 0===this[Ge]&&"function"==typeof ae[Ge]&&(this[Ge]=function(_t){return function(){return ae[_t].apply(ae,arguments)}}(Ge));for(var Ve=0;Ve{"use strict";ne.exports=y;var l=d(84162).q,_=l.ERR_METHOD_NOT_IMPLEMENTED,E=l.ERR_MULTIPLE_CALLBACK,S=l.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=l.ERR_TRANSFORM_WITH_LENGTH_0,h=d(55986);function g(A,O){var C=this._transformState;C.transforming=!1;var T=C.writecb;if(null===T)return this.emit("error",new E);C.writechunk=null,C.writecb=null,null!=O&&this.push(O),T(A);var N=this._readableState;N.reading=!1,(N.needReadable||N.length{"use strict";function _(ve){var ce=this;this.next=null,this.entry=null,this.finish=function(){!function me(ve,ce,he){var le=ve.entry;for(ve.entry=null;le;){var de=le.callback;ce.pendingcb--,de(he),le=le.next}ce.corkedRequestsFree.next=ve}(ce,ve)}}var E;ne.exports=Q,Q.WritableState=Z;var S={deprecate:d(23532)},a=d(2228),h=d(93172).Buffer,g=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var W,b=d(34936),O=d(47890).getHighWaterMark,C=d(84162).q,T=C.ERR_INVALID_ARG_TYPE,N=C.ERR_METHOD_NOT_IMPLEMENTED,M=C.ERR_MULTIPLE_CALLBACK,P=C.ERR_STREAM_CANNOT_PIPE,R=C.ERR_STREAM_DESTROYED,L=C.ERR_STREAM_NULL_VALUES,H=C.ERR_STREAM_WRITE_AFTER_END,V=C.ERR_UNKNOWN_ENCODING,J=b.errorOrDestroy;function Y(){}function Z(ve,ce,he){E=E||d(55986),ve=ve||{},"boolean"!=typeof he&&(he=ce instanceof E),this.objectMode=!!ve.objectMode,he&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=O(this,ve,"writableHighWaterMark",he),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var le=!1===ve.decodeStrings;this.decodeStrings=!le,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(de){!function G(ve,ce){var he=ve._writableState,le=he.sync,de=he.writecb;if("function"!=typeof de)throw new M;if(function F(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(he),ce)!function x(ve,ce,he,le,de){--ce.pendingcb,he?(process.nextTick(de,le),process.nextTick(ue,ve,ce),ve._writableState.errorEmitted=!0,J(ve,le)):(de(le),ve._writableState.errorEmitted=!0,J(ve,le),ue(ve,ce))}(ve,he,le,ce,de);else{var ae=ie(he)||ve.destroyed;!ae&&!he.corked&&!he.bufferProcessing&&he.bufferedRequest&&B(ve,he),le?process.nextTick(k,ve,he,ae,de):k(ve,he,ae,de)}}(ce,de)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}function Q(ve){var ce=this instanceof(E=E||d(55986));if(!ce&&!W.call(Q,this))return new Q(ve);this._writableState=new Z(ve,this,ce),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),a.call(this)}function w(ve,ce,he,le,de,ae,ye){ce.writelen=le,ce.writecb=ye,ce.writing=!0,ce.sync=!0,ce.destroyed?ce.onwrite(new R("write")):he?ve._writev(de,ce.onwrite):ve._write(de,ae,ce.onwrite),ce.sync=!1}function k(ve,ce,he,le){he||function p(ve,ce){0===ce.length&&ce.needDrain&&(ce.needDrain=!1,ve.emit("drain"))}(ve,ce),ce.pendingcb--,le(),ue(ve,ce)}function B(ve,ce){ce.bufferProcessing=!0;var he=ce.bufferedRequest;if(ve._writev&&he&&he.next){var le=ce.bufferedRequestCount,de=new Array(le),ae=ce.corkedRequestsFree;ae.entry=he;for(var ye=0,Ce=!0;he;)de[ye]=he,he.isBuf||(Ce=!1),he=he.next,ye+=1;de.allBuffers=Ce,w(ve,ce,!0,ce.length,de,"",ae.finish),ce.pendingcb++,ce.lastBufferedRequest=null,ae.next?(ce.corkedRequestsFree=ae.next,ae.next=null):ce.corkedRequestsFree=new _(ce),ce.bufferedRequestCount=0}else{for(;he;){var Pe=he.chunk,Ge=he.encoding,Ve=he.callback;if(w(ve,ce,!1,ce.objectMode?1:Pe.length,Pe,Ge,Ve),he=he.next,ce.bufferedRequestCount--,ce.writing)break}null===he&&(ce.lastBufferedRequest=null)}ce.bufferedRequest=he,ce.bufferProcessing=!1}function ie(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function te(ve,ce){ve._final(function(he){ce.pendingcb--,he&&J(ve,he),ce.prefinished=!0,ve.emit("prefinish"),ue(ve,ce)})}function ue(ve,ce){var he=ie(ce);if(he&&(function ee(ve,ce){!ce.prefinished&&!ce.finalCalled&&("function"!=typeof ve._final||ce.destroyed?(ce.prefinished=!0,ve.emit("prefinish")):(ce.pendingcb++,ce.finalCalled=!0,process.nextTick(te,ve,ce)))}(ve,ce),0===ce.pendingcb&&(ce.finished=!0,ve.emit("finish"),ce.autoDestroy))){var le=ve._readableState;(!le||le.autoDestroy&&le.endEmitted)&&ve.destroy()}return he}d(83894)(Q,a),Z.prototype.getBuffer=function(){for(var ce=this.bufferedRequest,he=[];ce;)he.push(ce),ce=ce.next;return he},function(){try{Object.defineProperty(Z.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(W=Function.prototype[Symbol.hasInstance],Object.defineProperty(Q,Symbol.hasInstance,{value:function(ce){return!!W.call(this,ce)||this===Q&&(ce&&ce._writableState instanceof Z)}})):W=function(ce){return ce instanceof this},Q.prototype.pipe=function(){J(this,new P)},Q.prototype.write=function(ve,ce,he){var le=this._writableState,de=!1,ae=!le.objectMode&&function v(ve){return h.isBuffer(ve)||ve instanceof g}(ve);return ae&&!h.isBuffer(ve)&&(ve=function y(ve){return h.from(ve)}(ve)),"function"==typeof ce&&(he=ce,ce=null),ae?ce="buffer":ce||(ce=le.defaultEncoding),"function"!=typeof he&&(he=Y),le.ending?function D(ve,ce){var he=new H;J(ve,he),process.nextTick(ce,he)}(this,he):(ae||function o(ve,ce,he,le){var de;return null===he?de=new L:"string"!=typeof he&&!ce.objectMode&&(de=new T("chunk",["string","Buffer"],he)),!de||(J(ve,de),process.nextTick(le,de),!1)}(this,le,ve,he))&&(le.pendingcb++,de=function m(ve,ce,he,le,de,ae){if(!he){var ye=function u(ve,ce,he){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ce&&(ce=h.from(ce,he)),ce}(ce,le,de);le!==ye&&(he=!0,de="buffer",le=ye)}var Ce=ce.objectMode?1:le.length;ce.length+=Ce;var Pe=ce.length-1))throw new V(ce);return this._writableState.defaultEncoding=ce,this},Object.defineProperty(Q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Q.prototype._write=function(ve,ce,he){he(new N("_write()"))},Q.prototype._writev=null,Q.prototype.end=function(ve,ce,he){var le=this._writableState;return"function"==typeof ve?(he=ve,ve=null,ce=null):"function"==typeof ce&&(he=ce,ce=null),null!=ve&&this.write(ve,ce),le.corked&&(le.corked=1,this.uncork()),le.ending||function we(ve,ce,he){ce.ending=!0,ue(ve,ce),he&&(ce.finished?process.nextTick(he):ve.once("finish",he)),ce.ended=!0,ve.writable=!1}(this,le,he),this},Object.defineProperty(Q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ce){this._writableState&&(this._writableState.destroyed=ce)}}),Q.prototype.destroy=b.destroy,Q.prototype._undestroy=b.undestroy,Q.prototype._destroy=function(ve,ce){ce(ve)}},56121:(ne,r,d)=>{"use strict";var l;function _(H,V,J){return V=function E(H){var V=function S(H,V){if("object"!=typeof H||null===H)return H;var J=H[Symbol.toPrimitive];if(void 0!==J){var Y=J.call(H,V||"default");if("object"!=typeof Y)return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===V?String:Number)(H)}(H,"string");return"symbol"==typeof V?V:String(V)}(V),V in H?Object.defineProperty(H,V,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[V]=J,H}var a=d(81291),h=Symbol("lastResolve"),g=Symbol("lastReject"),y=Symbol("error"),v=Symbol("ended"),b=Symbol("lastPromise"),A=Symbol("handlePromise"),O=Symbol("stream");function C(H,V){return{value:H,done:V}}function T(H){var V=H[h];if(null!==V){var J=H[O].read();null!==J&&(H[b]=null,H[h]=null,H[g]=null,V(C(J,!1)))}}function N(H){process.nextTick(T,H)}var P=Object.getPrototypeOf(function(){}),R=Object.setPrototypeOf((_(l={get stream(){return this[O]},next:function(){var V=this,J=this[y];if(null!==J)return Promise.reject(J);if(this[v])return Promise.resolve(C(void 0,!0));if(this[O].destroyed)return new Promise(function(Q,D){process.nextTick(function(){V[y]?D(V[y]):Q(C(void 0,!0))})});var Z,Y=this[b];if(Y)Z=new Promise(function M(H,V){return function(J,Y){H.then(function(){V[v]?J(C(void 0,!0)):V[A](J,Y)},Y)}}(Y,this));else{var W=this[O].read();if(null!==W)return Promise.resolve(C(W,!1));Z=new Promise(this[A])}return this[b]=Z,Z}},Symbol.asyncIterator,function(){return this}),_(l,"return",function(){var V=this;return new Promise(function(J,Y){V[O].destroy(null,function(Z){Z?Y(Z):J(C(void 0,!0))})})}),l),P);ne.exports=function(V){var J,Y=Object.create(R,(_(J={},O,{value:V,writable:!0}),_(J,h,{value:null,writable:!0}),_(J,g,{value:null,writable:!0}),_(J,y,{value:null,writable:!0}),_(J,v,{value:V._readableState.endEmitted,writable:!0}),_(J,A,{value:function(W,Q){var D=Y[O].read();D?(Y[b]=null,Y[h]=null,Y[g]=null,W(C(D,!1))):(Y[h]=W,Y[g]=Q)},writable:!0}),J));return Y[b]=null,a(V,function(Z){if(Z&&"ERR_STREAM_PREMATURE_CLOSE"!==Z.code){var W=Y[g];return null!==W&&(Y[b]=null,Y[h]=null,Y[g]=null,W(Z)),void(Y[y]=Z)}var Q=Y[h];null!==Q&&(Y[b]=null,Y[h]=null,Y[g]=null,Q(C(void 0,!0))),Y[v]=!0}),V.on("readable",N.bind(null,Y)),Y}},76083:(ne,r,d)=>{"use strict";function l(N,M){var P=Object.keys(N);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(N);M&&(R=R.filter(function(L){return Object.getOwnPropertyDescriptor(N,L).enumerable})),P.push.apply(P,R)}return P}function _(N){for(var M=1;M0?this.tail.next=R:this.head=R,this.tail=R,++this.length}},{key:"unshift",value:function(P){var R={data:P,next:this.head};0===this.length&&(this.tail=R),this.head=R,++this.length}},{key:"shift",value:function(){if(0!==this.length){var P=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,P}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(P){if(0===this.length)return"";for(var R=this.head,L=""+R.data;R=R.next;)L+=P+R.data;return L}},{key:"concat",value:function(P){if(0===this.length)return b.alloc(0);for(var R=b.allocUnsafe(P>>>0),L=this.head,H=0;L;)T(L.data,R,H),H+=L.data.length,L=L.next;return R}},{key:"consume",value:function(P,R){var L;return PV.length?V.length:P;if(J===V.length?H+=V:H+=V.slice(0,P),0===(P-=J)){J===V.length?(++L,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=V.slice(J));break}++L}return this.length-=L,H}},{key:"_getBuffer",value:function(P){var R=b.allocUnsafe(P),L=this.head,H=1;for(L.data.copy(R),P-=L.data.length;L=L.next;){var V=L.data,J=P>V.length?V.length:P;if(V.copy(R,R.length-P,0,J),0===(P-=J)){J===V.length?(++H,L.next?this.head=L.next:this.head=this.tail=null):(this.head=L,L.data=V.slice(J));break}++H}return this.length-=H,R}},{key:C,value:function(P,R){return O(this,_(_({},R),{},{depth:0,customInspect:!1}))}}]),N}()},34936:ne=>{"use strict";function d(a,h){E(a,h),l(a)}function l(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function E(a,h){a.emit("error",h)}ne.exports={destroy:function r(a,h){var g=this,y=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return y||v?(h?h(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(E,this,a)):process.nextTick(E,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(b){!h&&b?g._writableState?g._writableState.errorEmitted?process.nextTick(l,g):(g._writableState.errorEmitted=!0,process.nextTick(d,g,b)):process.nextTick(d,g,b):h?(process.nextTick(l,g),h(b)):process.nextTick(l,g)}),this)},undestroy:function _(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function S(a,h){var g=a._readableState,y=a._writableState;g&&g.autoDestroy||y&&y.autoDestroy?a.destroy(h):a.emit("error",h)}}},81291:(ne,r,d)=>{"use strict";var l=d(84162).q.ERR_STREAM_PREMATURE_CLOSE;function E(){}ne.exports=function a(h,g,y){if("function"==typeof g)return a(h,null,g);g||(g={}),y=function _(h){var g=!1;return function(){if(!g){g=!0;for(var y=arguments.length,v=new Array(y),b=0;b{ne.exports=function(){throw new Error("Readable.from is not available in the browser")}},33795:(ne,r,d)=>{"use strict";var l;var E=d(84162).q,S=E.ERR_MISSING_ARGS,a=E.ERR_STREAM_DESTROYED;function h(C){if(C)throw C}function v(C){C()}function b(C,T){return C.pipe(T)}ne.exports=function O(){for(var C=arguments.length,T=new Array(C),N=0;N0,function(Y){P||(P=Y),Y&&R.forEach(v),!V&&(R.forEach(v),M(P))})});return T.reduce(b)}},47890:(ne,r,d)=>{"use strict";var l=d(84162).q.ERR_INVALID_OPT_VALUE;ne.exports={getHighWaterMark:function E(S,a,h,g){var y=function _(S,a,h){return null!=S.highWaterMark?S.highWaterMark:a?S[h]:null}(a,g,h);if(null!=y){if(!isFinite(y)||Math.floor(y)!==y||y<0)throw new l(g?h:"highWaterMark",y);return Math.floor(y)}return S.objectMode?16:16384}}},2228:(ne,r,d)=>{ne.exports=d(59069).EventEmitter},31496:(ne,r,d)=>{(r=ne.exports=d(14473)).Stream=r,r.Readable=r,r.Writable=d(3766),r.Duplex=d(55986),r.Transform=d(3556),r.PassThrough=d(1576),r.finished=d(81291),r.pipeline=d(33795)},13465:(ne,r,d)=>{"use strict";var l=d(73502).Buffer,_=l.isEncoding||function(R){switch((R=""+R)&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(R){var L;switch(this.encoding=function S(R){var L=function E(R){if(!R)return"utf8";for(var L;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(L)return;R=(""+R).toLowerCase(),L=!0}}(R);if("string"!=typeof L&&(l.isEncoding===_||!_(R)))throw new Error("Unknown encoding: "+R);return L||R}(R),this.encoding){case"utf16le":this.text=O,this.end=C,L=4;break;case"utf8":this.fillLast=v,L=4;break;case"base64":this.text=T,this.end=N,L=3;break;default:return this.write=M,void(this.end=P)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(L)}function h(R){return R<=127?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function v(R){var L=this.lastTotal-this.lastNeed,H=function y(R,L,H){if(128!=(192&L[0]))return R.lastNeed=0,"\ufffd";if(R.lastNeed>1&&L.length>1){if(128!=(192&L[1]))return R.lastNeed=1,"\ufffd";if(R.lastNeed>2&&L.length>2&&128!=(192&L[2]))return R.lastNeed=2,"\ufffd"}}(this,R);return void 0!==H?H:this.lastNeed<=R.length?(R.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(R.copy(this.lastChar,L,0,R.length),void(this.lastNeed-=R.length))}function O(R,L){if((R.length-L)%2==0){var H=R.toString("utf16le",L);if(H){var V=H.charCodeAt(H.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",L,R.length-1)}function C(R){var L=R&&R.length?this.write(R):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,H)}return L}function T(R,L){var H=(R.length-L)%3;return 0===H?R.toString("base64",L):(this.lastNeed=3-H,this.lastTotal=3,1===H?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",L,R.length-H))}function N(R){var L=R&&R.length?this.write(R):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function M(R){return R.toString(this.encoding)}function P(R){return R&&R.length?this.write(R):""}r.s=a,a.prototype.write=function(R){if(0===R.length)return"";var L,H;if(this.lastNeed){if(void 0===(L=this.fillLast(R)))return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H=0?(J>0&&(R.lastNeed=J-1),J):--V=0?(J>0&&(R.lastNeed=J-2),J):--V=0?(J>0&&(2===J?J=0:R.lastNeed=J-3),J):0))}(this,R,L);if(!this.lastNeed)return R.toString("utf8",L);this.lastTotal=H;var V=R.length-(H-this.lastNeed);return R.copy(this.lastChar,0,V),R.toString("utf8",L,V)},a.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length}},58905:ne=>{var r=Object.prototype.toString,d=typeof Buffer<"u"&&"function"==typeof Buffer.alloc&&"function"==typeof Buffer.allocUnsafe&&"function"==typeof Buffer.from;ne.exports=function S(a,h,g){if("number"==typeof a)throw new TypeError('"value" argument must not be a number');return function l(a){return"ArrayBuffer"===r.call(a).slice(8,-1)}(a)?function _(a,h,g){h>>>=0;var y=a.byteLength-h;if(y<0)throw new RangeError("'offset' is out of bounds");if(void 0===g)g=y;else if((g>>>=0)>y)throw new RangeError("'length' is out of bounds");return d?Buffer.from(a.slice(h,h+g)):new Buffer(new Uint8Array(a.slice(h,h+g)))}(a,h,g):"string"==typeof a?function E(a,h){if(("string"!=typeof h||""===h)&&(h="utf8"),!Buffer.isEncoding(h))throw new TypeError('"encoding" must be a valid string encoding');return d?Buffer.from(a,h):new Buffer(a,h)}(a,h):d?Buffer.from(a):new Buffer(a)}},58789:ne=>{ne.exports=function(d,l){for(var _=Math.min(d.length,l.length),E=new Buffer(_),S=0;S<_;++S)E[S]=d[S]^l[S];return E}},93172:(ne,r,d)=>{"use strict";const l=d(5343),_=d(48461),E="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=g,r.SlowBuffer=function R(Re){return+Re!=Re&&(Re=0),g.alloc(+Re)},r.INSPECT_MAX_BYTES=50;const S=2147483647;function h(Re){if(Re>S)throw new RangeError('The value "'+Re+'" is invalid for option "size"');const Ae=new Uint8Array(Re);return Object.setPrototypeOf(Ae,g.prototype),Ae}function g(Re,Ae,xe){if("number"==typeof Re){if("string"==typeof Ae)throw new TypeError('The "string" argument must be of type string. Received type number');return A(Re)}return y(Re,Ae,xe)}function y(Re,Ae,xe){if("string"==typeof Re)return function O(Re,Ae){if(("string"!=typeof Ae||""===Ae)&&(Ae="utf8"),!g.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);const xe=0|L(Re,Ae);let je=h(xe);const He=je.write(Re,Ae);return He!==xe&&(je=je.slice(0,He)),je}(Re,Ae);if(ArrayBuffer.isView(Re))return function T(Re){if($e(Re,Uint8Array)){const Ae=new Uint8Array(Re);return N(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return C(Re)}(Re);if(null==Re)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re);if($e(Re,ArrayBuffer)||Re&&$e(Re.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(Re,SharedArrayBuffer)||Re&&$e(Re.buffer,SharedArrayBuffer)))return N(Re,Ae,xe);if("number"==typeof Re)throw new TypeError('The "value" argument must not be of type number. Received type number');const je=Re.valueOf&&Re.valueOf();if(null!=je&&je!==Re)return g.from(je,Ae,xe);const He=function M(Re){if(g.isBuffer(Re)){const Ae=0|P(Re.length),xe=h(Ae);return 0===xe.length||Re.copy(xe,0,0,Ae),xe}if(void 0!==Re.length)return"number"!=typeof Re.length||Pt(Re.length)?h(0):C(Re);if("Buffer"===Re.type&&Array.isArray(Re.data))return C(Re.data)}(Re);if(He)return He;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Re[Symbol.toPrimitive])return g.from(Re[Symbol.toPrimitive]("string"),Ae,xe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Re)}function v(Re){if("number"!=typeof Re)throw new TypeError('"size" argument must be of type number');if(Re<0)throw new RangeError('The value "'+Re+'" is invalid for option "size"')}function A(Re){return v(Re),h(Re<0?0:0|P(Re))}function C(Re){const Ae=Re.length<0?0:0|P(Re.length),xe=h(Ae);for(let je=0;je=S)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S.toString(16)+" bytes");return 0|Re}function L(Re,Ae){if(g.isBuffer(Re))return Re.length;if(ArrayBuffer.isView(Re)||$e(Re,ArrayBuffer))return Re.byteLength;if("string"!=typeof Re)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Re);const xe=Re.length,je=arguments.length>2&&!0===arguments[2];if(!je&&0===xe)return 0;let He=!1;for(;;)switch(Ae){case"ascii":case"latin1":case"binary":return xe;case"utf8":case"utf-8":return Ge(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*xe;case"hex":return xe>>>1;case"base64":return _t(Re).length;default:if(He)return je?-1:Ge(Re).length;Ae=(""+Ae).toLowerCase(),He=!0}}function H(Re,Ae,xe){let je=!1;if((void 0===Ae||Ae<0)&&(Ae=0),Ae>this.length||((void 0===xe||xe>this.length)&&(xe=this.length),xe<=0)||(xe>>>=0)<=(Ae>>>=0))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return k(this,Ae,xe);case"utf8":case"utf-8":return m(this,Ae,xe);case"ascii":return F(this,Ae,xe);case"latin1":case"binary":return G(this,Ae,xe);case"base64":return u(this,Ae,xe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p(this,Ae,xe);default:if(je)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),je=!0}}function V(Re,Ae,xe){const je=Re[Ae];Re[Ae]=Re[xe],Re[xe]=je}function J(Re,Ae,xe,je,He){if(0===Re.length)return-1;if("string"==typeof xe?(je=xe,xe=0):xe>2147483647?xe=2147483647:xe<-2147483648&&(xe=-2147483648),Pt(xe=+xe)&&(xe=He?0:Re.length-1),xe<0&&(xe=Re.length+xe),xe>=Re.length){if(He)return-1;xe=Re.length-1}else if(xe<0){if(!He)return-1;xe=0}if("string"==typeof Ae&&(Ae=g.from(Ae,je)),g.isBuffer(Ae))return 0===Ae.length?-1:Y(Re,Ae,xe,je,He);if("number"==typeof Ae)return Ae&=255,"function"==typeof Uint8Array.prototype.indexOf?He?Uint8Array.prototype.indexOf.call(Re,Ae,xe):Uint8Array.prototype.lastIndexOf.call(Re,Ae,xe):Y(Re,[Ae],xe,je,He);throw new TypeError("val must be string, number or Buffer")}function Y(Re,Ae,xe,je,He){let ct,lt=1,Je=Re.length,at=Ae.length;if(void 0!==je&&("ucs2"===(je=String(je).toLowerCase())||"ucs-2"===je||"utf16le"===je||"utf-16le"===je)){if(Re.length<2||Ae.length<2)return-1;lt=2,Je/=2,at/=2,xe/=2}function fn(dt,yn){return 1===lt?dt[yn]:dt.readUInt16BE(yn*lt)}if(He){let dt=-1;for(ct=xe;ctJe&&(xe=Je-at),ct=xe;ct>=0;ct--){let dt=!0;for(let yn=0;ynHe&&(je=He):je=He;const lt=Ae.length;let Je;for(je>lt/2&&(je=lt/2),Je=0;Je>8,He=xe%256,lt.push(He),lt.push(je);return lt}(Ae,Re.length-xe),Re,xe,je)}function u(Re,Ae,xe){return 0===Ae&&xe===Re.length?l.fromByteArray(Re):l.fromByteArray(Re.slice(Ae,xe))}function m(Re,Ae,xe){xe=Math.min(Re.length,xe);const je=[];let He=Ae;for(;He239?4:lt>223?3:lt>191?2:1;if(He+at<=xe){let fn,ct,dt,yn;switch(at){case 1:lt<128&&(Je=lt);break;case 2:fn=Re[He+1],128==(192&fn)&&(yn=(31<)<<6|63&fn,yn>127&&(Je=yn));break;case 3:fn=Re[He+1],ct=Re[He+2],128==(192&fn)&&128==(192&ct)&&(yn=(15<)<<12|(63&fn)<<6|63&ct,yn>2047&&(yn<55296||yn>57343)&&(Je=yn));break;case 4:fn=Re[He+1],ct=Re[He+2],dt=Re[He+3],128==(192&fn)&&128==(192&ct)&&128==(192&dt)&&(yn=(15<)<<18|(63&fn)<<12|(63&ct)<<6|63&dt,yn>65535&&yn<1114112&&(Je=yn))}}null===Je?(Je=65533,at=1):Je>65535&&(Je-=65536,je.push(Je>>>10&1023|55296),Je=56320|1023&Je),je.push(Je),He+=at}return function x(Re){const Ae=Re.length;if(Ae<=w)return String.fromCharCode.apply(String,Re);let xe="",je=0;for(;jeHe.length?(g.isBuffer(Je)||(Je=g.from(Je)),Je.copy(He,lt)):Uint8Array.prototype.set.call(He,Je,lt);else{if(!g.isBuffer(Je))throw new TypeError('"list" argument must be an Array of Buffers');Je.copy(He,lt)}lt+=Je.length}return He},g.byteLength=L,g.prototype._isBuffer=!0,g.prototype.swap16=function(){const Ae=this.length;if(Ae%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let xe=0;xexe&&(Ae+=" ... "),""},E&&(g.prototype[E]=g.prototype.inspect),g.prototype.compare=function(Ae,xe,je,He,lt){if($e(Ae,Uint8Array)&&(Ae=g.from(Ae,Ae.offset,Ae.byteLength)),!g.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Ae);if(void 0===xe&&(xe=0),void 0===je&&(je=Ae?Ae.length:0),void 0===He&&(He=0),void 0===lt&&(lt=this.length),xe<0||je>Ae.length||He<0||lt>this.length)throw new RangeError("out of range index");if(He>=lt&&xe>=je)return 0;if(He>=lt)return-1;if(xe>=je)return 1;if(this===Ae)return 0;let Je=(lt>>>=0)-(He>>>=0),at=(je>>>=0)-(xe>>>=0);const fn=Math.min(Je,at),ct=this.slice(He,lt),dt=Ae.slice(xe,je);for(let yn=0;yn>>=0,isFinite(je)?(je>>>=0,void 0===He&&(He="utf8")):(He=je,je=void 0)}const lt=this.length-xe;if((void 0===je||je>lt)&&(je=lt),Ae.length>0&&(je<0||xe<0)||xe>this.length)throw new RangeError("Attempt to write outside buffer bounds");He||(He="utf8");let Je=!1;for(;;)switch(He){case"hex":return Z(this,Ae,xe,je);case"utf8":case"utf-8":return W(this,Ae,xe,je);case"ascii":case"latin1":case"binary":return Q(this,Ae,xe,je);case"base64":return D(this,Ae,xe,je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o(this,Ae,xe,je);default:if(Je)throw new TypeError("Unknown encoding: "+He);He=(""+He).toLowerCase(),Je=!0}},g.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const w=4096;function F(Re,Ae,xe){let je="";xe=Math.min(Re.length,xe);for(let He=Ae;Heje)&&(xe=je);let He="";for(let lt=Ae;ltxe)throw new RangeError("Trying to access beyond buffer length")}function ie(Re,Ae,xe,je,He,lt){if(!g.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>He||AeRe.length)throw new RangeError("Index out of range")}function te(Re,Ae,xe,je,He){de(Ae,je,He,Re,xe,7);let lt=Number(Ae&BigInt(4294967295));Re[xe++]=lt,lt>>=8,Re[xe++]=lt,lt>>=8,Re[xe++]=lt,lt>>=8,Re[xe++]=lt;let Je=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[xe++]=Je,Je>>=8,Re[xe++]=Je,Je>>=8,Re[xe++]=Je,Je>>=8,Re[xe++]=Je,xe}function ee(Re,Ae,xe,je,He){de(Ae,je,He,Re,xe,7);let lt=Number(Ae&BigInt(4294967295));Re[xe+7]=lt,lt>>=8,Re[xe+6]=lt,lt>>=8,Re[xe+5]=lt,lt>>=8,Re[xe+4]=lt;let Je=Number(Ae>>BigInt(32)&BigInt(4294967295));return Re[xe+3]=Je,Je>>=8,Re[xe+2]=Je,Je>>=8,Re[xe+1]=Je,Je>>=8,Re[xe]=Je,xe+8}function ue(Re,Ae,xe,je,He,lt){if(xe+je>Re.length)throw new RangeError("Index out of range");if(xe<0)throw new RangeError("Index out of range")}function we(Re,Ae,xe,je,He){return Ae=+Ae,xe>>>=0,He||ue(Re,0,xe,4),_.write(Re,Ae,xe,je,23,4),xe+4}function me(Re,Ae,xe,je,He){return Ae=+Ae,xe>>>=0,He||ue(Re,0,xe,8),_.write(Re,Ae,xe,je,52,8),xe+8}g.prototype.slice=function(Ae,xe){const je=this.length;(Ae=~~Ae)<0?(Ae+=je)<0&&(Ae=0):Ae>je&&(Ae=je),(xe=void 0===xe?je:~~xe)<0?(xe+=je)<0&&(xe=0):xe>je&&(xe=je),xe>>=0,xe>>>=0,je||B(Ae,xe,this.length);let He=this[Ae],lt=1,Je=0;for(;++Je>>=0,xe>>>=0,je||B(Ae,xe,this.length);let He=this[Ae+--xe],lt=1;for(;xe>0&&(lt*=256);)He+=this[Ae+--xe]*lt;return He},g.prototype.readUint8=g.prototype.readUInt8=function(Ae,xe){return Ae>>>=0,xe||B(Ae,1,this.length),this[Ae]},g.prototype.readUint16LE=g.prototype.readUInt16LE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},g.prototype.readUint16BE=g.prototype.readUInt16BE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},g.prototype.readUint32LE=g.prototype.readUInt32LE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+16777216*this[Ae+3]},g.prototype.readUint32BE=g.prototype.readUInt32BE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,4,this.length),16777216*this[Ae]+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},g.prototype.readBigUInt64LE=rt(function(Ae){ae(Ae>>>=0,"offset");const xe=this[Ae],je=this[Ae+7];(void 0===xe||void 0===je)&&ye(Ae,this.length-8);const He=xe+256*this[++Ae]+65536*this[++Ae]+this[++Ae]*2**24,lt=this[++Ae]+256*this[++Ae]+65536*this[++Ae]+je*2**24;return BigInt(He)+(BigInt(lt)<>>=0,"offset");const xe=this[Ae],je=this[Ae+7];(void 0===xe||void 0===je)&&ye(Ae,this.length-8);const He=xe*2**24+65536*this[++Ae]+256*this[++Ae]+this[++Ae],lt=this[++Ae]*2**24+65536*this[++Ae]+256*this[++Ae]+je;return(BigInt(He)<>>=0,xe>>>=0,je||B(Ae,xe,this.length);let He=this[Ae],lt=1,Je=0;for(;++Je=lt&&(He-=Math.pow(2,8*xe)),He},g.prototype.readIntBE=function(Ae,xe,je){Ae>>>=0,xe>>>=0,je||B(Ae,xe,this.length);let He=xe,lt=1,Je=this[Ae+--He];for(;He>0&&(lt*=256);)Je+=this[Ae+--He]*lt;return lt*=128,Je>=lt&&(Je-=Math.pow(2,8*xe)),Je},g.prototype.readInt8=function(Ae,xe){return Ae>>>=0,xe||B(Ae,1,this.length),128&this[Ae]?-1*(255-this[Ae]+1):this[Ae]},g.prototype.readInt16LE=function(Ae,xe){Ae>>>=0,xe||B(Ae,2,this.length);const je=this[Ae]|this[Ae+1]<<8;return 32768&je?4294901760|je:je},g.prototype.readInt16BE=function(Ae,xe){Ae>>>=0,xe||B(Ae,2,this.length);const je=this[Ae+1]|this[Ae]<<8;return 32768&je?4294901760|je:je},g.prototype.readInt32LE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},g.prototype.readInt32BE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},g.prototype.readBigInt64LE=rt(function(Ae){ae(Ae>>>=0,"offset");const xe=this[Ae],je=this[Ae+7];(void 0===xe||void 0===je)&&ye(Ae,this.length-8);const He=this[Ae+4]+256*this[Ae+5]+65536*this[Ae+6]+(je<<24);return(BigInt(He)<>>=0,"offset");const xe=this[Ae],je=this[Ae+7];(void 0===xe||void 0===je)&&ye(Ae,this.length-8);const He=(xe<<24)+65536*this[++Ae]+256*this[++Ae]+this[++Ae];return(BigInt(He)<>>=0,xe||B(Ae,4,this.length),_.read(this,Ae,!0,23,4)},g.prototype.readFloatBE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,4,this.length),_.read(this,Ae,!1,23,4)},g.prototype.readDoubleLE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,8,this.length),_.read(this,Ae,!0,52,8)},g.prototype.readDoubleBE=function(Ae,xe){return Ae>>>=0,xe||B(Ae,8,this.length),_.read(this,Ae,!1,52,8)},g.prototype.writeUintLE=g.prototype.writeUIntLE=function(Ae,xe,je,He){if(Ae=+Ae,xe>>>=0,je>>>=0,!He){ie(this,Ae,xe,je,Math.pow(2,8*je)-1,0)}let lt=1,Je=0;for(this[xe]=255&Ae;++Je>>=0,je>>>=0,!He){ie(this,Ae,xe,je,Math.pow(2,8*je)-1,0)}let lt=je-1,Je=1;for(this[xe+lt]=255&Ae;--lt>=0&&(Je*=256);)this[xe+lt]=Ae/Je&255;return xe+je},g.prototype.writeUint8=g.prototype.writeUInt8=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,1,255,0),this[xe]=255&Ae,xe+1},g.prototype.writeUint16LE=g.prototype.writeUInt16LE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,2,65535,0),this[xe]=255&Ae,this[xe+1]=Ae>>>8,xe+2},g.prototype.writeUint16BE=g.prototype.writeUInt16BE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,2,65535,0),this[xe]=Ae>>>8,this[xe+1]=255&Ae,xe+2},g.prototype.writeUint32LE=g.prototype.writeUInt32LE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,4,4294967295,0),this[xe+3]=Ae>>>24,this[xe+2]=Ae>>>16,this[xe+1]=Ae>>>8,this[xe]=255&Ae,xe+4},g.prototype.writeUint32BE=g.prototype.writeUInt32BE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,4,4294967295,0),this[xe]=Ae>>>24,this[xe+1]=Ae>>>16,this[xe+2]=Ae>>>8,this[xe+3]=255&Ae,xe+4},g.prototype.writeBigUInt64LE=rt(function(Ae,xe=0){return te(this,Ae,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeBigUInt64BE=rt(function(Ae,xe=0){return ee(this,Ae,xe,BigInt(0),BigInt("0xffffffffffffffff"))}),g.prototype.writeIntLE=function(Ae,xe,je,He){if(Ae=+Ae,xe>>>=0,!He){const fn=Math.pow(2,8*je-1);ie(this,Ae,xe,je,fn-1,-fn)}let lt=0,Je=1,at=0;for(this[xe]=255&Ae;++lt>0)-at&255;return xe+je},g.prototype.writeIntBE=function(Ae,xe,je,He){if(Ae=+Ae,xe>>>=0,!He){const fn=Math.pow(2,8*je-1);ie(this,Ae,xe,je,fn-1,-fn)}let lt=je-1,Je=1,at=0;for(this[xe+lt]=255&Ae;--lt>=0&&(Je*=256);)Ae<0&&0===at&&0!==this[xe+lt+1]&&(at=1),this[xe+lt]=(Ae/Je>>0)-at&255;return xe+je},g.prototype.writeInt8=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[xe]=255&Ae,xe+1},g.prototype.writeInt16LE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,2,32767,-32768),this[xe]=255&Ae,this[xe+1]=Ae>>>8,xe+2},g.prototype.writeInt16BE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,2,32767,-32768),this[xe]=Ae>>>8,this[xe+1]=255&Ae,xe+2},g.prototype.writeInt32LE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,4,2147483647,-2147483648),this[xe]=255&Ae,this[xe+1]=Ae>>>8,this[xe+2]=Ae>>>16,this[xe+3]=Ae>>>24,xe+4},g.prototype.writeInt32BE=function(Ae,xe,je){return Ae=+Ae,xe>>>=0,je||ie(this,Ae,xe,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[xe]=Ae>>>24,this[xe+1]=Ae>>>16,this[xe+2]=Ae>>>8,this[xe+3]=255&Ae,xe+4},g.prototype.writeBigInt64LE=rt(function(Ae,xe=0){return te(this,Ae,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeBigInt64BE=rt(function(Ae,xe=0){return ee(this,Ae,xe,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),g.prototype.writeFloatLE=function(Ae,xe,je){return we(this,Ae,xe,!0,je)},g.prototype.writeFloatBE=function(Ae,xe,je){return we(this,Ae,xe,!1,je)},g.prototype.writeDoubleLE=function(Ae,xe,je){return me(this,Ae,xe,!0,je)},g.prototype.writeDoubleBE=function(Ae,xe,je){return me(this,Ae,xe,!1,je)},g.prototype.copy=function(Ae,xe,je,He){if(!g.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(je||(je=0),!He&&0!==He&&(He=this.length),xe>=Ae.length&&(xe=Ae.length),xe||(xe=0),He>0&&He=this.length)throw new RangeError("Index out of range");if(He<0)throw new RangeError("sourceEnd out of bounds");He>this.length&&(He=this.length),Ae.length-xe>>=0,je=void 0===je?this.length:je>>>0,Ae||(Ae=0),"number"==typeof Ae)for(lt=xe;lt=je+4;xe-=3)Ae=`_${Re.slice(xe-3,xe)}${Ae}`;return`${Re.slice(0,xe)}${Ae}`}function de(Re,Ae,xe,je,He,lt){if(Re>xe||Re3?0===Ae||Ae===BigInt(0)?`>= 0${Je} and < 2${Je} ** ${8*(lt+1)}${Je}`:`>= -(2${Je} ** ${8*(lt+1)-1}${Je}) and < 2 ** ${8*(lt+1)-1}${Je}`:`>= ${Ae}${Je} and <= ${xe}${Je}`,new ve.ERR_OUT_OF_RANGE("value",at,Re)}!function le(Re,Ae,xe){ae(Ae,"offset"),(void 0===Re[Ae]||void 0===Re[Ae+xe])&&ye(Ae,Re.length-(xe+1))}(je,He,lt)}function ae(Re,Ae){if("number"!=typeof Re)throw new ve.ERR_INVALID_ARG_TYPE(Ae,"number",Re)}function ye(Re,Ae,xe){throw Math.floor(Re)!==Re?(ae(Re,xe),new ve.ERR_OUT_OF_RANGE(xe||"offset","an integer",Re)):Ae<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE(xe||"offset",`>= ${xe?1:0} and <= ${Ae}`,Re)}ce("ERR_BUFFER_OUT_OF_BOUNDS",function(Re){return Re?`${Re} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ce("ERR_INVALID_ARG_TYPE",function(Re,Ae){return`The "${Re}" argument must be of type number. Received type ${typeof Ae}`},TypeError),ce("ERR_OUT_OF_RANGE",function(Re,Ae,xe){let je=`The value of "${Re}" is out of range.`,He=xe;return Number.isInteger(xe)&&Math.abs(xe)>2**32?He=he(String(xe)):"bigint"==typeof xe&&(He=String(xe),(xe>BigInt(2)**BigInt(32)||xe<-(BigInt(2)**BigInt(32)))&&(He=he(He)),He+="n"),je+=` It must be ${Ae}. Received ${He}`,je},RangeError);const Ce=/[^+/0-9A-Za-z-_]/g;function Ge(Re,Ae){let xe;Ae=Ae||1/0;const je=Re.length;let He=null;const lt=[];for(let Je=0;Je55295&&xe<57344){if(!He){if(xe>56319){(Ae-=3)>-1&<.push(239,191,189);continue}if(Je+1===je){(Ae-=3)>-1&<.push(239,191,189);continue}He=xe;continue}if(xe<56320){(Ae-=3)>-1&<.push(239,191,189),He=xe;continue}xe=65536+(He-55296<<10|xe-56320)}else He&&(Ae-=3)>-1&<.push(239,191,189);if(He=null,xe<128){if((Ae-=1)<0)break;lt.push(xe)}else if(xe<2048){if((Ae-=2)<0)break;lt.push(xe>>6|192,63&xe|128)}else if(xe<65536){if((Ae-=3)<0)break;lt.push(xe>>12|224,xe>>6&63|128,63&xe|128)}else{if(!(xe<1114112))throw new Error("Invalid code point");if((Ae-=4)<0)break;lt.push(xe>>18|240,xe>>12&63|128,xe>>6&63|128,63&xe|128)}}return lt}function _t(Re){return l.toByteArray(function Pe(Re){if((Re=(Re=Re.split("=")[0]).trim().replace(Ce,"")).length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}(Re))}function Ze(Re,Ae,xe,je){let He;for(He=0;He=Ae.length||He>=Re.length);++He)Ae[He+xe]=Re[He];return He}function $e(Re,Ae){return Re instanceof Ae||null!=Re&&null!=Re.constructor&&null!=Re.constructor.name&&Re.constructor.name===Ae.name}function Pt(Re){return Re!=Re}const nt=function(){const Re="0123456789abcdef",Ae=new Array(256);for(let xe=0;xe<16;++xe){const je=16*xe;for(let He=0;He<16;++He)Ae[je+He]=Re[xe]+Re[He]}return Ae}();function rt(Re){return typeof BigInt>"u"?Lt:Re}function Lt(){throw new Error("BigInt not supported")}},94525:ne=>{ne.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},75834:(ne,r,d)=>{"use strict";var l=d(60399),_=d(55685),E=_(l("String.prototype.indexOf"));ne.exports=function(a,h){var g=l(a,!!h);return"function"==typeof g&&E(a,".prototype.")>-1?_(g):g}},55685:(ne,r,d)=>{"use strict";var l=d(84444),_=d(60399),E=_("%Function.prototype.apply%"),S=_("%Function.prototype.call%"),a=_("%Reflect.apply%",!0)||l.call(S,E),h=_("%Object.getOwnPropertyDescriptor%",!0),g=_("%Object.defineProperty%",!0),y=_("%Math.max%");if(g)try{g({},"a",{value:1})}catch{g=null}ne.exports=function(A){var O=a(l,S,arguments);h&&g&&(h(O,"length").configurable&&g(O,"length",{value:1+y(0,A.length-(arguments.length-1))}));return O};var v=function(){return a(l,E,arguments)};g?g(ne.exports,"apply",{value:v}):ne.exports.apply=v},60399:(ne,r,d)=>{"use strict";var l,_=SyntaxError,E=Function,S=TypeError,a=function(D){try{return E('"use strict"; return ('+D+").constructor;")()}catch{}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch{h=null}var g=function(){throw new S},y=h?function(){try{return arguments.callee,g}catch{try{return h(arguments,"callee").get}catch{return g}}}():g,v=d(92969)(),b=Object.getPrototypeOf||function(D){return D.__proto__},A={},O=typeof Uint8Array>"u"?l:b(Uint8Array),C={"%AggregateError%":typeof AggregateError>"u"?l:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?l:ArrayBuffer,"%ArrayIteratorPrototype%":v?b([][Symbol.iterator]()):l,"%AsyncFromSyncIteratorPrototype%":l,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?l:Atomics,"%BigInt%":typeof BigInt>"u"?l:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?l:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?l:Float32Array,"%Float64Array%":typeof Float64Array>"u"?l:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?l:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?l:Int8Array,"%Int16Array%":typeof Int16Array>"u"?l:Int16Array,"%Int32Array%":typeof Int32Array>"u"?l:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v?b(b([][Symbol.iterator]())):l,"%JSON%":"object"==typeof JSON?JSON:l,"%Map%":typeof Map>"u"?l:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v?l:b((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?l:Promise,"%Proxy%":typeof Proxy>"u"?l:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?l:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?l:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v?l:b((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?l:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v?b(""[Symbol.iterator]()):l,"%Symbol%":v?Symbol:l,"%SyntaxError%":_,"%ThrowTypeError%":y,"%TypedArray%":O,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?l:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?l:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?l:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?l:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?l:WeakMap,"%WeakRef%":typeof WeakRef>"u"?l:WeakRef,"%WeakSet%":typeof WeakSet>"u"?l:WeakSet},T=function D(o){var u;if("%AsyncFunction%"===o)u=a("async function () {}");else if("%GeneratorFunction%"===o)u=a("function* () {}");else if("%AsyncGeneratorFunction%"===o)u=a("async function* () {}");else if("%AsyncGenerator%"===o){var m=D("%AsyncGeneratorFunction%");m&&(u=m.prototype)}else if("%AsyncIteratorPrototype%"===o){var w=D("%AsyncGenerator%");w&&(u=b(w.prototype))}return C[o]=u,u},N={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},M=d(84444),P=d(93164),R=M.call(Function.call,Array.prototype.concat),L=M.call(Function.apply,Array.prototype.splice),H=M.call(Function.call,String.prototype.replace),V=M.call(Function.call,String.prototype.slice),J=M.call(Function.call,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Z=/\\(\\)?/g,W=function(o){var u=V(o,0,1),m=V(o,-1);if("%"===u&&"%"!==m)throw new _("invalid intrinsic syntax, expected closing `%`");if("%"===m&&"%"!==u)throw new _("invalid intrinsic syntax, expected opening `%`");var w=[];return H(o,Y,function(x,F,G,k){w[w.length]=G?H(k,Z,"$1"):F||x}),w},Q=function(o,u){var w,m=o;if(P(N,m)&&(m="%"+(w=N[m])[0]+"%"),P(C,m)){var x=C[m];if(x===A&&(x=T(m)),typeof x>"u"&&!u)throw new S("intrinsic "+o+" exists, but is not available. Please file an issue!");return{alias:w,name:m,value:x}}throw new _("intrinsic "+o+" does not exist!")};ne.exports=function(o,u){if("string"!=typeof o||0===o.length)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof u)throw new S('"allowMissing" argument must be a boolean');if(null===J(/^%?[^%]*%?$/g,o))throw new _("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var m=W(o),w=m.length>0?m[0]:"",x=Q("%"+w+"%",u),F=x.name,G=x.value,k=!1,p=x.alias;p&&(w=p[0],L(m,R([0,1],p)));for(var B=1,ie=!0;B=m.length){var we=h(G,te);G=(ie=!!we)&&"get"in we&&!("originalValue"in we.get)?we.get:G[te]}else ie=P(G,te),G=G[te];ie&&!k&&(C[F]=G)}}return G}},53495:(ne,r,d)=>{d(37131).check("es5")},37131:(ne,r,d)=>{d(58690),ne.exports=d(21034)},27247:ne=>{var r=function(){this.tests={},this.cache={}};r.prototype={constructor:r,define:function(d,l){if("string"!=typeof d||!(l instanceof Function))throw new Error("Invalid capability definition.");if(this.tests[d])throw new Error('Duplicated capability definition by "'+d+'".');this.tests[d]=l},check:function(d){if(!this.test(d))throw new Error('The current environment does not support "'+d+'", therefore we cannot continue.')},test:function(d){if(void 0!==this.cache[d])return this.cache[d];if(!this.tests[d])throw new Error('Unknown capability with name "'+d+'".');var l=this.tests[d];return this.cache[d]=!!l(),this.cache[d]}},ne.exports=r},58690:(ne,r,d)=>{var l=d(21034),_=l.define,E=l.test;_("strict mode",function(){return void 0===this}),_("arguments.callee.caller",function(){try{return function(){return arguments.callee.caller}()===arguments.callee}catch{return!1}}),_("es5",function(){return E("Array.prototype.forEach")&&E("Array.prototype.map")&&E("Function.prototype.bind")&&E("Object.create")&&E("Object.defineProperties")&&E("Object.defineProperty")&&E("Object.prototype.hasOwnProperty")}),_("Array.prototype.forEach",function(){return Array.prototype.forEach}),_("Array.prototype.map",function(){return Array.prototype.map}),_("Function.prototype.bind",function(){return Function.prototype.bind}),_("Object.create",function(){return Object.create}),_("Object.defineProperties",function(){return Object.defineProperties}),_("Object.defineProperty",function(){return Object.defineProperty}),_("Object.prototype.hasOwnProperty",function(){return Object.prototype.hasOwnProperty}),_("Error.captureStackTrace",function(){return Error.captureStackTrace}),_("Error.prototype.stack",function(){try{throw new Error}catch(S){return S.stack||S.stacktrace}})},21034:(ne,r,d)=>{var _=new(d(27247)),E=function(S){return _.test(S)};E.define=function(S,a){_.define(S,a)},E.check=function(S){_.check(S)},E.test=E,ne.exports=E},83018:ne=>{var r={utf8:{stringToBytes:function(d){return r.bin.stringToBytes(unescape(encodeURIComponent(d)))},bytesToString:function(d){return decodeURIComponent(escape(r.bin.bytesToString(d)))}},bin:{stringToBytes:function(d){for(var l=[],_=0;_{var l=d(73502).Buffer,_=d(295).Transform,E=d(15453).s;function a(h){_.call(this),this.hashMode="string"==typeof h,this.hashMode?this[h]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}d(83894)(a,_),a.prototype.update=function(h,g,y){"string"==typeof h&&(h=l.from(h,g));var v=this._update(h);return this.hashMode?this:(y&&(v=this._toString(v,y)),v)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(h,g,y){var v;try{this.hashMode?this._update(h):this.push(this._update(h))}catch(b){v=b}finally{y(v)}},a.prototype._flush=function(h){var g;try{this.push(this.__final())}catch(y){g=y}h(g)},a.prototype._finalOrDigest=function(h){var g=this.__final()||l.alloc(0);return h&&(g=this._toString(g,h,!0)),g},a.prototype._toString=function(h,g,y){if(this._decoder||(this._decoder=new E(g),this._encoding=g),this._encoding!==g)throw new Error("can't switch encodings");var v=this._decoder.write(h);return y&&(v+=this._decoder.end()),v},ne.exports=a},39448:(ne,r,d)=>{var l=d(72969).Writable,_=d(83894),E=d(58905);if(typeof Uint8Array>"u")var S=d(69830).U2;else S=Uint8Array;function a(C,T){if(!(this instanceof a))return new a(C,T);"function"==typeof C&&(T=C,C={}),C||(C={});var N=C.encoding,M=!1;N?("u8"===(N=String(N).toLowerCase())||"uint8"===N)&&(N="uint8array"):M=!0,l.call(this,{objectMode:!0}),this.encoding=N,this.shouldInferEncoding=M,T&&this.on("finish",function(){T(this.getBody())}),this.body=[]}ne.exports=a,_(a,l),a.prototype._write=function(C,T,N){this.body.push(C),N()},a.prototype.inferEncoding=function(C){var T=void 0===C?this.body[0]:C;return Buffer.isBuffer(T)?"buffer":typeof Uint8Array<"u"&&T instanceof Uint8Array?"uint8array":Array.isArray(T)?"array":"string"==typeof T?"string":"[object Object]"===Object.prototype.toString.call(T)?"object":"buffer"},a.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?function A(C){for(var T=[],N=0;N{var r={}.toString;ne.exports=Array.isArray||function(d){return"[object Array]"==r.call(d)}},83308:(ne,r,d)=>{"use strict";var l=d(95857),_=Object.keys||function(O){var C=[];for(var T in O)C.push(T);return C};ne.exports=v;var E=Object.create(d(26156));E.inherits=d(83894);var S=d(58044),a=d(46615);E.inherits(v,S);for(var h=_(a.prototype),g=0;g{"use strict";ne.exports=E;var l=d(55446),_=Object.create(d(26156));function E(S){if(!(this instanceof E))return new E(S);l.call(this,S)}_.inherits=d(83894),_.inherits(E,l),E.prototype._transform=function(S,a,h){h(null,S)}},58044:(ne,r,d)=>{"use strict";var l=d(95857);ne.exports=H;var E,_=d(77322);H.ReadableState=L;d(59069).EventEmitter;var a=function(ce,he){return ce.listeners(he).length},h=d(18228),g=d(11079).Buffer,y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var A=Object.create(d(26156));A.inherits=d(83894);var O=d(53383),C=void 0;C=O&&O.debuglog?O.debuglog("stream"):function(){};var M,T=d(81054),N=d(8064);A.inherits(H,h);var P=["error","close","destroy","pause","resume"];function L(ce,he){ce=ce||{};var le=he instanceof(E=E||d(83308));this.objectMode=!!ce.objectMode,le&&(this.objectMode=this.objectMode||!!ce.readableObjectMode);var de=ce.highWaterMark,ae=ce.readableHighWaterMark,ye=this.objectMode?16:16384;this.highWaterMark=de||0===de?de:le&&(ae||0===ae)?ae:ye,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=ce.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ce.encoding&&(M||(M=d(95139).s),this.decoder=new M(ce.encoding),this.encoding=ce.encoding)}function H(ce){if(E=E||d(83308),!(this instanceof H))return new H(ce);this._readableState=new L(ce,this),this.readable=!0,ce&&("function"==typeof ce.read&&(this._read=ce.read),"function"==typeof ce.destroy&&(this._destroy=ce.destroy)),h.call(this)}function V(ce,he,le,de,ae){var Ce,ye=ce._readableState;null===he?(ye.reading=!1,function o(ce,he){if(!he.ended){if(he.decoder){var le=he.decoder.end();le&&le.length&&(he.buffer.push(le),he.length+=he.objectMode?1:le.length)}he.ended=!0,u(ce)}}(ce,ye)):(ae||(Ce=function Y(ce,he){var le;return!function b(ce){return g.isBuffer(ce)||ce instanceof y}(he)&&"string"!=typeof he&&void 0!==he&&!ce.objectMode&&(le=new TypeError("Invalid non-string/buffer chunk")),le}(ye,he)),Ce?ce.emit("error",Ce):ye.objectMode||he&&he.length>0?("string"!=typeof he&&!ye.objectMode&&Object.getPrototypeOf(he)!==g.prototype&&(he=function v(ce){return g.from(ce)}(he)),de?ye.endEmitted?ce.emit("error",new Error("stream.unshift() after end event")):J(ce,ye,he,!0):ye.ended?ce.emit("error",new Error("stream.push() after EOF")):(ye.reading=!1,ye.decoder&&!le?(he=ye.decoder.write(he),ye.objectMode||0!==he.length?J(ce,ye,he,!1):w(ce,ye)):J(ce,ye,he,!1))):de||(ye.reading=!1));return function Z(ce){return!ce.ended&&(ce.needReadable||ce.lengthhe.highWaterMark&&(he.highWaterMark=function Q(ce){return ce>=W?ce=W:(ce--,ce|=ce>>>1,ce|=ce>>>2,ce|=ce>>>4,ce|=ce>>>8,ce|=ce>>>16,ce++),ce}(ce)),ce<=he.length?ce:he.ended?he.length:(he.needReadable=!0,0))}function u(ce){var he=ce._readableState;he.needReadable=!1,he.emittedReadable||(C("emitReadable",he.flowing),he.emittedReadable=!0,he.sync?l.nextTick(m,ce):m(ce))}function m(ce){C("emit readable"),ce.emit("readable"),B(ce)}function w(ce,he){he.readingMore||(he.readingMore=!0,l.nextTick(x,ce,he))}function x(ce,he){for(var le=he.length;!he.reading&&!he.flowing&&!he.ended&&he.length=he.length?(le=he.decoder?he.buffer.join(""):1===he.buffer.length?he.buffer.head.data:he.buffer.concat(he.length),he.buffer.clear()):le=function te(ce,he,le){var de;return ceye.length?ye.length:ce;if(Ce===ye.length?ae+=ye:ae+=ye.slice(0,ce),0===(ce-=Ce)){Ce===ye.length?(++de,le.next?he.head=le.next:he.head=he.tail=null):(he.head=le,le.data=ye.slice(Ce));break}++de}return he.length-=de,ae}(ce,he):function ue(ce,he){var le=g.allocUnsafe(ce),de=he.head,ae=1;for(de.data.copy(le),ce-=de.data.length;de=de.next;){var ye=de.data,Ce=ce>ye.length?ye.length:ce;if(ye.copy(le,le.length-ce,0,Ce),0===(ce-=Ce)){Ce===ye.length?(++ae,de.next?he.head=de.next:he.head=he.tail=null):(he.head=de,de.data=ye.slice(Ce));break}++ae}return he.length-=ae,le}(ce,he),de}(ce,he.buffer,he.decoder),le);var le}function we(ce){var he=ce._readableState;if(he.length>0)throw new Error('"endReadable()" called on non-empty stream');he.endEmitted||(he.ended=!0,l.nextTick(me,he,ce))}function me(ce,he){!ce.endEmitted&&0===ce.length&&(ce.endEmitted=!0,he.readable=!1,he.emit("end"))}function ve(ce,he){for(var le=0,de=ce.length;le=he.highWaterMark||he.ended))return C("read: emitReadable",he.length,he.ended),0===he.length&&he.ended?we(this):u(this),null;if(0===(ce=D(ce,he))&&he.ended)return 0===he.length&&we(this),null;var ae,de=he.needReadable;return C("need readable",de),(0===he.length||he.length-ce0?ie(ce,he):null)?(he.needReadable=!0,ce=0):he.length-=ce,0===he.length&&(he.ended||(he.needReadable=!0),le!==ce&&he.ended&&we(this)),null!==ae&&this.emit("data",ae),ae},H.prototype._read=function(ce){this.emit("error",new Error("_read() is not implemented"))},H.prototype.pipe=function(ce,he){var le=this,de=this._readableState;switch(de.pipesCount){case 0:de.pipes=ce;break;case 1:de.pipes=[de.pipes,ce];break;default:de.pipes.push(ce)}de.pipesCount+=1,C("pipe count=%d opts=%j",de.pipesCount,he);var ye=(!he||!1!==he.end)&&ce!==process.stdout&&ce!==process.stderr?Pe:rt;function Ce(Lt,Re){C("onunpipe"),Lt===le&&Re&&!1===Re.hasUnpiped&&(Re.hasUnpiped=!0,function Ue(){C("cleanup"),ce.removeListener("close",Pt),ce.removeListener("finish",nt),ce.removeListener("drain",Ge),ce.removeListener("error",$e),ce.removeListener("unpipe",Ce),le.removeListener("end",Pe),le.removeListener("end",rt),le.removeListener("data",Ze),Ve=!0,de.awaitDrain&&(!ce._writableState||ce._writableState.needDrain)&&Ge()}())}function Pe(){C("onend"),ce.end()}de.endEmitted?l.nextTick(ye):le.once("end",ye),ce.on("unpipe",Ce);var Ge=function F(ce){return function(){var he=ce._readableState;C("pipeOnDrain",he.awaitDrain),he.awaitDrain&&he.awaitDrain--,0===he.awaitDrain&&a(ce,"data")&&(he.flowing=!0,B(ce))}}(le);ce.on("drain",Ge);var Ve=!1;var _t=!1;function Ze(Lt){C("ondata"),_t=!1,!1===ce.write(Lt)&&!_t&&((1===de.pipesCount&&de.pipes===ce||de.pipesCount>1&&-1!==ve(de.pipes,ce))&&!Ve&&(C("false write response, pause",de.awaitDrain),de.awaitDrain++,_t=!0),le.pause())}function $e(Lt){C("onerror",Lt),rt(),ce.removeListener("error",$e),0===a(ce,"error")&&ce.emit("error",Lt)}function Pt(){ce.removeListener("finish",nt),rt()}function nt(){C("onfinish"),ce.removeListener("close",Pt),rt()}function rt(){C("unpipe"),le.unpipe(ce)}return le.on("data",Ze),function R(ce,he,le){if("function"==typeof ce.prependListener)return ce.prependListener(he,le);ce._events&&ce._events[he]?_(ce._events[he])?ce._events[he].unshift(le):ce._events[he]=[le,ce._events[he]]:ce.on(he,le)}(ce,"error",$e),ce.once("close",Pt),ce.once("finish",nt),ce.emit("pipe",le),de.flowing||(C("pipe resume"),le.resume()),ce},H.prototype.unpipe=function(ce){var he=this._readableState,le={hasUnpiped:!1};if(0===he.pipesCount)return this;if(1===he.pipesCount)return ce&&ce!==he.pipes||(ce||(ce=he.pipes),he.pipes=null,he.pipesCount=0,he.flowing=!1,ce&&ce.emit("unpipe",this,le)),this;if(!ce){var de=he.pipes,ae=he.pipesCount;he.pipes=null,he.pipesCount=0,he.flowing=!1;for(var ye=0;ye{"use strict";ne.exports=S;var l=d(83308),_=Object.create(d(26156));function E(g,y){var v=this._transformState;v.transforming=!1;var b=v.writecb;if(!b)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,null!=y&&this.push(y),b(g);var A=this._readableState;A.reading=!1,(A.needReadable||A.length{"use strict";var l=d(95857);function E(k){var p=this;this.next=null,this.entry=null,this.finish=function(){!function G(k,p,B){var ie=k.entry;for(k.entry=null;ie;){var te=ie.callback;p.pendingcb--,te(B),ie=ie.next}p.corkedRequestsFree.next=k}(p,k)}}ne.exports=P;var a,S=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:l.nextTick;P.WritableState=N;var h=Object.create(d(26156));h.inherits=d(83894);var g={deprecate:d(23532)},y=d(18228),v=d(11079).Buffer,b=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};var M,C=d(8064);function T(){}function N(k,p){a=a||d(83308),k=k||{};var B=p instanceof a;this.objectMode=!!k.objectMode,B&&(this.objectMode=this.objectMode||!!k.writableObjectMode);var ie=k.highWaterMark,te=k.writableHighWaterMark,ee=this.objectMode?16:16384;this.highWaterMark=ie||0===ie?ie:B&&(te||0===te)?te:ee,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ue=!1===k.decodeStrings;this.decodeStrings=!ue,this.defaultEncoding=k.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(we){!function W(k,p){var B=k._writableState,ie=B.sync,te=B.writecb;if(function Z(k){k.writing=!1,k.writecb=null,k.length-=k.writelen,k.writelen=0}(B),p)!function Y(k,p,B,ie,te){--p.pendingcb,B?(l.nextTick(te,ie),l.nextTick(x,k,p),k._writableState.errorEmitted=!0,k.emit("error",ie)):(te(ie),k._writableState.errorEmitted=!0,k.emit("error",ie),x(k,p))}(k,B,ie,p,te);else{var ee=u(B);!ee&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&o(k,B),ie?S(Q,k,B,ee,te):Q(k,B,ee,te)}}(p,we)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new E(this)}function P(k){if(a=a||d(83308),!(M.call(P,this)||this instanceof a))return new P(k);this._writableState=new N(k,this),this.writable=!0,k&&("function"==typeof k.write&&(this._write=k.write),"function"==typeof k.writev&&(this._writev=k.writev),"function"==typeof k.destroy&&(this._destroy=k.destroy),"function"==typeof k.final&&(this._final=k.final)),y.call(this)}function J(k,p,B,ie,te,ee,ue){p.writelen=ie,p.writecb=ue,p.writing=!0,p.sync=!0,B?k._writev(te,p.onwrite):k._write(te,ee,p.onwrite),p.sync=!1}function Q(k,p,B,ie){B||function D(k,p){0===p.length&&p.needDrain&&(p.needDrain=!1,k.emit("drain"))}(k,p),p.pendingcb--,ie(),x(k,p)}function o(k,p){p.bufferProcessing=!0;var B=p.bufferedRequest;if(k._writev&&B&&B.next){var ie=p.bufferedRequestCount,te=new Array(ie),ee=p.corkedRequestsFree;ee.entry=B;for(var ue=0,we=!0;B;)te[ue]=B,B.isBuf||(we=!1),B=B.next,ue+=1;te.allBuffers=we,J(k,p,!0,p.length,te,"",ee.finish),p.pendingcb++,p.lastBufferedRequest=null,ee.next?(p.corkedRequestsFree=ee.next,ee.next=null):p.corkedRequestsFree=new E(p),p.bufferedRequestCount=0}else{for(;B;){var me=B.chunk,ve=B.encoding,ce=B.callback;if(J(k,p,!1,p.objectMode?1:me.length,me,ve,ce),B=B.next,p.bufferedRequestCount--,p.writing)break}null===B&&(p.lastBufferedRequest=null)}p.bufferedRequest=B,p.bufferProcessing=!1}function u(k){return k.ending&&0===k.length&&null===k.bufferedRequest&&!k.finished&&!k.writing}function m(k,p){k._final(function(B){p.pendingcb--,B&&k.emit("error",B),p.prefinished=!0,k.emit("prefinish"),x(k,p)})}function x(k,p){var B=u(p);return B&&(function w(k,p){!p.prefinished&&!p.finalCalled&&("function"==typeof k._final?(p.pendingcb++,p.finalCalled=!0,l.nextTick(m,k,p)):(p.prefinished=!0,k.emit("prefinish")))}(k,p),0===p.pendingcb&&(p.finished=!0,k.emit("finish"))),B}h.inherits(P,y),N.prototype.getBuffer=function(){for(var p=this.bufferedRequest,B=[];p;)B.push(p),p=p.next;return B},function(){try{Object.defineProperty(N.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(k){return!!M.call(this,k)||this===P&&(k&&k._writableState instanceof N)}})):M=function(k){return k instanceof this},P.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},P.prototype.write=function(k,p,B){var ie=this._writableState,te=!1,ee=!ie.objectMode&&function O(k){return v.isBuffer(k)||k instanceof b}(k);return ee&&!v.isBuffer(k)&&(k=function A(k){return v.from(k)}(k)),"function"==typeof p&&(B=p,p=null),ee?p="buffer":p||(p=ie.defaultEncoding),"function"!=typeof B&&(B=T),ie.ended?function R(k,p){var B=new Error("write after end");k.emit("error",B),l.nextTick(p,B)}(this,B):(ee||function L(k,p,B,ie){var te=!0,ee=!1;return null===B?ee=new TypeError("May not write null values to stream"):"string"!=typeof B&&void 0!==B&&!p.objectMode&&(ee=new TypeError("Invalid non-string/buffer chunk")),ee&&(k.emit("error",ee),l.nextTick(ie,ee),te=!1),te}(this,ie,k,B))&&(ie.pendingcb++,te=function V(k,p,B,ie,te,ee){if(!B){var ue=function H(k,p,B){return!k.objectMode&&!1!==k.decodeStrings&&"string"==typeof p&&(p=v.from(p,B)),p}(p,ie,te);ie!==ue&&(B=!0,te="buffer",ie=ue)}var we=p.objectMode?1:ie.length;p.length+=we;var me=p.length-1))throw new TypeError("Unknown encoding: "+p);return this._writableState.defaultEncoding=p,this},Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(k,p,B){B(new Error("_write() is not implemented"))},P.prototype._writev=null,P.prototype.end=function(k,p,B){var ie=this._writableState;"function"==typeof k?(B=k,k=null,p=null):"function"==typeof p&&(B=p,p=null),null!=k&&this.write(k,p),ie.corked&&(ie.corked=1,this.uncork()),ie.ending||function F(k,p,B){p.ending=!0,x(k,p),B&&(p.finished?l.nextTick(B):k.once("finish",B)),p.ended=!0,k.writable=!1}(this,ie,B)},Object.defineProperty(P.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(k){this._writableState&&(this._writableState.destroyed=k)}}),P.prototype.destroy=C.destroy,P.prototype._undestroy=C.undestroy,P.prototype._destroy=function(k,p){this.end(),p(k)}},81054:(ne,r,d)=>{"use strict";var _=d(11079).Buffer,E=d(7716);function S(a,h,g){a.copy(h,g)}ne.exports=function(){function a(){(function l(a,h){if(!(a instanceof h))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(g){var y={data:g,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length},a.prototype.unshift=function(g){var y={data:g,next:this.head};0===this.length&&(this.tail=y),this.head=y,++this.length},a.prototype.shift=function(){if(0!==this.length){var g=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,g}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(g){if(0===this.length)return"";for(var y=this.head,v=""+y.data;y=y.next;)v+=g+y.data;return v},a.prototype.concat=function(g){if(0===this.length)return _.alloc(0);for(var y=_.allocUnsafe(g>>>0),v=this.head,b=0;v;)S(v.data,y,b),b+=v.data.length,v=v.next;return y},a}(),E&&E.inspect&&E.inspect.custom&&(ne.exports.prototype[E.inspect.custom]=function(){var a=E.inspect({length:this.length});return this.constructor.name+" "+a})},8064:(ne,r,d)=>{"use strict";var l=d(95857);function S(a,h){a.emit("error",h)}ne.exports={destroy:function _(a,h){var g=this,y=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return y||v?(h?h(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.nextTick(S,this,a)):l.nextTick(S,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(b){!h&&b?g._writableState?g._writableState.errorEmitted||(g._writableState.errorEmitted=!0,l.nextTick(S,g,b)):l.nextTick(S,g,b):h&&h(b)}),this)},undestroy:function E(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},18228:(ne,r,d)=>{ne.exports=d(59069).EventEmitter},72969:(ne,r,d)=>{(r=ne.exports=d(58044)).Stream=r,r.Readable=r,r.Writable=d(46615),r.Duplex=d(83308),r.Transform=d(55446),r.PassThrough=d(60757)},11079:(ne,r,d)=>{var l=d(93172),_=l.Buffer;function E(a,h){for(var g in a)h[g]=a[g]}function S(a,h,g){return _(a,h,g)}_.from&&_.alloc&&_.allocUnsafe&&_.allocUnsafeSlow?ne.exports=l:(E(l,r),r.Buffer=S),E(_,S),S.from=function(a,h,g){if("number"==typeof a)throw new TypeError("Argument must not be a number");return _(a,h,g)},S.alloc=function(a,h,g){if("number"!=typeof a)throw new TypeError("Argument must be a number");var y=_(a);return void 0!==h?"string"==typeof g?y.fill(h,g):y.fill(h):y.fill(0),y},S.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return _(a)},S.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return l.SlowBuffer(a)}},95139:(ne,r,d)=>{"use strict";var l=d(11079).Buffer,_=l.isEncoding||function(R){switch((R=""+R)&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(R){var L;switch(this.encoding=function S(R){var L=function E(R){if(!R)return"utf8";for(var L;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(L)return;R=(""+R).toLowerCase(),L=!0}}(R);if("string"!=typeof L&&(l.isEncoding===_||!_(R)))throw new Error("Unknown encoding: "+R);return L||R}(R),this.encoding){case"utf16le":this.text=O,this.end=C,L=4;break;case"utf8":this.fillLast=v,L=4;break;case"base64":this.text=T,this.end=N,L=3;break;default:return this.write=M,void(this.end=P)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(L)}function h(R){return R<=127?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function v(R){var L=this.lastTotal-this.lastNeed,H=function y(R,L,H){if(128!=(192&L[0]))return R.lastNeed=0,"\ufffd";if(R.lastNeed>1&&L.length>1){if(128!=(192&L[1]))return R.lastNeed=1,"\ufffd";if(R.lastNeed>2&&L.length>2&&128!=(192&L[2]))return R.lastNeed=2,"\ufffd"}}(this,R);return void 0!==H?H:this.lastNeed<=R.length?(R.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(R.copy(this.lastChar,L,0,R.length),void(this.lastNeed-=R.length))}function O(R,L){if((R.length-L)%2==0){var H=R.toString("utf16le",L);if(H){var V=H.charCodeAt(H.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",L,R.length-1)}function C(R){var L=R&&R.length?this.write(R):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,H)}return L}function T(R,L){var H=(R.length-L)%3;return 0===H?R.toString("base64",L):(this.lastNeed=3-H,this.lastTotal=3,1===H?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",L,R.length-H))}function N(R){var L=R&&R.length?this.write(R):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function M(R){return R.toString(this.encoding)}function P(R){return R&&R.length?this.write(R):""}r.s=a,a.prototype.write=function(R){if(0===R.length)return"";var L,H;if(this.lastNeed){if(void 0===(L=this.fillLast(R)))return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H=0?(J>0&&(R.lastNeed=J-1),J):--V=0?(J>0&&(R.lastNeed=J-2),J):--V=0?(J>0&&(2===J?J=0:R.lastNeed=J-3),J):0))}(this,R,L);if(!this.lastNeed)return R.toString("utf8",L);this.lastTotal=H;var V=R.length-(H-this.lastNeed);return R.copy(this.lastChar,0,V),R.toString("utf8",L,V)},a.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length}},89093:(ne,r,d)=>{"use strict";var l=d(43675),_={"text/plain":"Text","text/html":"Url",default:"Text"},E="Copy to clipboard: #{key}, Enter";ne.exports=function a(h,g){var y,v,b,A,O,C,T=!1;g||(g={}),y=g.debug||!1;try{if(b=l(),A=document.createRange(),O=document.getSelection(),(C=document.createElement("span")).textContent=h,C.ariaHidden="true",C.style.all="unset",C.style.position="fixed",C.style.top=0,C.style.clip="rect(0, 0, 0, 0)",C.style.whiteSpace="pre",C.style.webkitUserSelect="text",C.style.MozUserSelect="text",C.style.msUserSelect="text",C.style.userSelect="text",C.addEventListener("copy",function(M){if(M.stopPropagation(),g.format)if(M.preventDefault(),typeof M.clipboardData>"u"){y&&console.warn("unable to use e.clipboardData"),y&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var P=_[g.format]||_.default;window.clipboardData.setData(P,h)}else M.clipboardData.clearData(),M.clipboardData.setData(g.format,h);g.onCopy&&(M.preventDefault(),g.onCopy(M.clipboardData))}),document.body.appendChild(C),A.selectNodeContents(C),O.addRange(A),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");T=!0}catch(M){y&&console.error("unable to copy using execCommand: ",M),y&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(g.format||"text",h),g.onCopy&&g.onCopy(window.clipboardData),T=!0}catch(P){y&&console.error("unable to copy using clipboardData: ",P),y&&console.error("falling back to prompt"),v=function S(h){var g=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return h.replace(/#{\s*key\s*}/g,g)}("message"in g?g.message:E),window.prompt(v,h)}}finally{O&&("function"==typeof O.removeRange?O.removeRange(A):O.removeAllRanges()),C&&document.body.removeChild(C),b()}return T}},26156:(ne,r,d)=>{function N(M){return Object.prototype.toString.call(M)}r.isArray=function l(M){return Array.isArray?Array.isArray(M):"[object Array]"===N(M)},r.isBoolean=function _(M){return"boolean"==typeof M},r.isNull=function E(M){return null===M},r.isNullOrUndefined=function S(M){return null==M},r.isNumber=function a(M){return"number"==typeof M},r.isString=function h(M){return"string"==typeof M},r.isSymbol=function g(M){return"symbol"==typeof M},r.isUndefined=function y(M){return void 0===M},r.isRegExp=function v(M){return"[object RegExp]"===N(M)},r.isObject=function b(M){return"object"==typeof M&&null!==M},r.isDate=function A(M){return"[object Date]"===N(M)},r.isError=function O(M){return"[object Error]"===N(M)||M instanceof Error},r.isFunction=function C(M){return"function"==typeof M},r.isPrimitive=function T(M){return null===M||"boolean"==typeof M||"number"==typeof M||"string"==typeof M||"symbol"==typeof M||typeof M>"u"},r.isBuffer=d(93172).Buffer.isBuffer},74746:(ne,r,d)=>{var l=d(57715),_=d(46422);ne.exports=function(g){return new S(g)};var E={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function S(h){this.curveType=E[h],this.curveType||(this.curveType={name:h}),this.curve=new l.ec(this.curveType.name),this.keys=void 0}function a(h,g,y){Array.isArray(h)||(h=h.toArray());var v=new Buffer(h);if(y&&v.length=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},96386:(ne,r,d)=>{"use strict";var l=d(83894),_=d(8095),E=d(75634),S=d(95244),a=d(61052);function h(g){a.call(this,"digest"),this._hash=g}l(h,a),h.prototype._update=function(g){this._hash.update(g)},h.prototype._final=function(){return this._hash.digest()},ne.exports=function(y){return"md5"===(y=y.toLowerCase())?new _:"rmd160"===y||"ripemd160"===y?new E:new h(S(y))}},55640:(ne,r,d)=>{var l=d(8095);ne.exports=function(_){return(new l).update(_).digest()}},74529:(ne,r,d)=>{"use strict";var l=d(83894),_=d(7309),E=d(61052),S=d(73502).Buffer,a=d(55640),h=d(75634),g=d(95244),y=S.alloc(128);function v(b,A){E.call(this,"digest"),"string"==typeof A&&(A=S.from(A));var O="sha512"===b||"sha384"===b?128:64;(this._alg=b,this._key=A,A.length>O)?A=("rmd160"===b?new h:g(b)).update(A).digest():A.length{"use strict";var l=d(83894),_=d(73502).Buffer,E=d(61052),S=_.alloc(128),a=64;function h(g,y){E.call(this,"digest"),"string"==typeof y&&(y=_.from(y)),this._alg=g,this._key=y,y.length>a?y=g(y):y.length{var r,d;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d={rotl:function(l,_){return l<<_|l>>>32-_},rotr:function(l,_){return l<<32-_|l>>>_},endian:function(l){if(l.constructor==Number)return 16711935&d.rotl(l,8)|4278255360&d.rotl(l,24);for(var _=0;_0;l--)_.push(Math.floor(256*Math.random()));return _},bytesToWords:function(l){for(var _=[],E=0,S=0;E>>5]|=l[E]<<24-S%32;return _},wordsToBytes:function(l){for(var _=[],E=0;E<32*l.length;E+=8)_.push(l[E>>>5]>>>24-E%32&255);return _},bytesToHex:function(l){for(var _=[],E=0;E>>4).toString(16)),_.push((15&l[E]).toString(16));return _.join("")},hexToBytes:function(l){for(var _=[],E=0;E>>6*(3-a)&63)):_.push("=");return _.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/gi,"");for(var _=[],E=0,S=0;E>>6-2*S);return _}},ne.exports=d},41348:(ne,r,d)=>{"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=d(53753),r.createHash=r.Hash=d(96386),r.createHmac=r.Hmac=d(74529);var l=d(87793),_=Object.keys(l),E=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(_);r.getHashes=function(){return E};var S=d(99357);r.pbkdf2=S.pbkdf2,r.pbkdf2Sync=S.pbkdf2Sync;var a=d(55255);r.Cipher=a.Cipher,r.createCipher=a.createCipher,r.Cipheriv=a.Cipheriv,r.createCipheriv=a.createCipheriv,r.Decipher=a.Decipher,r.createDecipher=a.createDecipher,r.Decipheriv=a.Decipheriv,r.createDecipheriv=a.createDecipheriv,r.getCiphers=a.getCiphers,r.listCiphers=a.listCiphers;var h=d(98829);r.DiffieHellmanGroup=h.DiffieHellmanGroup,r.createDiffieHellmanGroup=h.createDiffieHellmanGroup,r.getDiffieHellman=h.getDiffieHellman,r.createDiffieHellman=h.createDiffieHellman,r.DiffieHellman=h.DiffieHellman;var g=d(3923);r.createSign=g.createSign,r.Sign=g.Sign,r.createVerify=g.createVerify,r.Verify=g.Verify,r.createECDH=d(74746);var y=d(63701);r.publicEncrypt=y.publicEncrypt,r.privateEncrypt=y.privateEncrypt,r.publicDecrypt=y.publicDecrypt,r.privateDecrypt=y.privateDecrypt;var v=d(14275);r.randomFill=v.randomFill,r.randomFillSync=v.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},12761:ne=>{"use strict";var r="%[a-f0-9]{2}",d=new RegExp("("+r+")|([^%]+?)","gi"),l=new RegExp("("+r+")+","gi");function _(a,h){try{return[decodeURIComponent(a.join(""))]}catch{}if(1===a.length)return a;h=h||1;var g=a.slice(0,h),y=a.slice(h);return Array.prototype.concat.call([],_(g),_(y))}function E(a){try{return decodeURIComponent(a)}catch{for(var h=a.match(d)||[],g=1;g{var l=d(26788),_=d(30826).NI;function E(S){_.call(this,"string"==typeof S?S:""),this._db=void 0,this._operations=[]}l.inherits(E,_),E.prototype.setDb=function(S){this._db=S,this._operations.forEach(function(a){S[a.method].apply(S,a.args)})},E.prototype._open=function(S,a){return process.nextTick(a)},E.prototype._operation=function(S,a){if(this._db)return this._db[S].apply(this._db,a);this._operations.push({method:S,args:a})},"put get del batch approximateSize".split(" ").forEach(function(S){E.prototype["_"+S]=function(){this._operation(S,arguments)}}),E.prototype._isBuffer=function(S){return Buffer.isBuffer(S)},E.prototype._iterator=function(){throw new TypeError("not implemented")},ne.exports=E},89176:ne=>{"use strict";function d(_,E){if("function"!=typeof _)throw new TypeError("argument fn must be a function");return _}function l(_,E,S){if(!_||"object"!=typeof _&&"function"!=typeof _)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(_,E);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}ne.exports=function r(_){if(!_)throw new TypeError("argument namespace is required");function E(S){}return E._file=void 0,E._ignored=!0,E._namespace=_,E._traced=!1,E._warned=Object.create(null),E.function=d,E.property=l,E}},73684:(ne,r,d)=>{"use strict";r.utils=d(77451),r.Cipher=d(38170),r.DES=d(4631),r.CBC=d(79454),r.EDE=d(21862)},79454:(ne,r,d)=>{"use strict";var l=d(32391),_=d(83894),E={};function S(h){l.equal(h.length,8,"Invalid IV length"),this.iv=new Array(8);for(var g=0;g{"use strict";var l=d(32391);function _(E){this.options=E,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}ne.exports=_,_.prototype._init=function(){},_.prototype.update=function(S){return 0===S.length?[]:"decrypt"===this.type?this._updateDecrypt(S):this._updateEncrypt(S)},_.prototype._buffer=function(S,a){for(var h=Math.min(this.buffer.length-this.bufferOff,S.length-a),g=0;g0;g--)a+=this._buffer(S,a),h+=this._flushBuffer(y,h);return a+=this._buffer(S,a),y},_.prototype.final=function(S){var a,h;return S&&(a=this.update(S)),h="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),a?a.concat(h):h},_.prototype._pad=function(S,a){if(0===a)return!1;for(;a{"use strict";var l=d(32391),_=d(83894),E=d(77451),S=d(38170);function a(){this.tmp=new Array(2),this.keys=null}function h(y){S.call(this,y);var v=new a;this._desState=v,this.deriveKeys(v,y.key)}_(h,S),ne.exports=h,h.create=function(v){return new h(v)};var g=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(v,b){v.keys=new Array(32),l.equal(b.length,this.blockSize,"Invalid key length");var A=E.readUInt32BE(b,0),O=E.readUInt32BE(b,4);E.pc1(A,O,v.tmp,0),A=v.tmp[0],O=v.tmp[1];for(var C=0;C>>1];A=E.r28shl(A,T),O=E.r28shl(O,T),E.pc2(A,O,v.keys,C)}},h.prototype._update=function(v,b,A,O){var C=this._desState,T=E.readUInt32BE(v,b),N=E.readUInt32BE(v,b+4);E.ip(T,N,C.tmp,0),T=C.tmp[0],N=C.tmp[1],"encrypt"===this.type?this._encrypt(C,T,N,C.tmp,0):this._decrypt(C,T,N,C.tmp,0),T=C.tmp[0],N=C.tmp[1],E.writeUInt32BE(A,T,O),E.writeUInt32BE(A,N,O+4)},h.prototype._pad=function(v,b){for(var A=v.length-b,O=b;O>>0,T=V}E.rip(N,T,O,C)},h.prototype._decrypt=function(v,b,A,O,C){for(var T=A,N=b,M=v.keys.length-2;M>=0;M-=2){var P=v.keys[M],R=v.keys[M+1];E.expand(T,v.tmp,0),P^=v.tmp[0],R^=v.tmp[1];var L=E.substitute(P,R),V=T;T=(N^E.permute(L))>>>0,N=V}E.rip(T,N,O,C)}},21862:(ne,r,d)=>{"use strict";var l=d(32391),_=d(83894),E=d(38170),S=d(4631);function a(g,y){l.equal(y.length,24,"Invalid key length");var v=y.slice(0,8),b=y.slice(8,16),A=y.slice(16,24);this.ciphers="encrypt"===g?[S.create({type:"encrypt",key:v}),S.create({type:"decrypt",key:b}),S.create({type:"encrypt",key:A})]:[S.create({type:"decrypt",key:A}),S.create({type:"encrypt",key:b}),S.create({type:"decrypt",key:v})]}function h(g){E.call(this,g);var y=new a(this.type,this.options.key);this._edeState=y}_(h,E),ne.exports=h,h.create=function(y){return new h(y)},h.prototype._update=function(y,v,b,A){var O=this._edeState;O.ciphers[0]._update(y,v,b,A),O.ciphers[1]._update(b,A,b,A),O.ciphers[2]._update(b,A,b,A)},h.prototype._pad=S.prototype._pad,h.prototype._unpad=S.prototype._unpad},77451:(ne,r)=>{"use strict";r.readUInt32BE=function(S,a){return(S[0+a]<<24|S[1+a]<<16|S[2+a]<<8|S[3+a])>>>0},r.writeUInt32BE=function(S,a,h){S[0+h]=a>>>24,S[1+h]=a>>>16&255,S[2+h]=a>>>8&255,S[3+h]=255&a},r.ip=function(S,a,h,g){for(var y=0,v=0,b=6;b>=0;b-=2){for(var A=0;A<=24;A+=8)y<<=1,y|=a>>>A+b&1;for(A=0;A<=24;A+=8)y<<=1,y|=S>>>A+b&1}for(b=6;b>=0;b-=2){for(A=1;A<=25;A+=8)v<<=1,v|=a>>>A+b&1;for(A=1;A<=25;A+=8)v<<=1,v|=S>>>A+b&1}h[g+0]=y>>>0,h[g+1]=v>>>0},r.rip=function(S,a,h,g){for(var y=0,v=0,b=0;b<4;b++)for(var A=24;A>=0;A-=8)y<<=1,y|=a>>>A+b&1,y<<=1,y|=S>>>A+b&1;for(b=4;b<8;b++)for(A=24;A>=0;A-=8)v<<=1,v|=a>>>A+b&1,v<<=1,v|=S>>>A+b&1;h[g+0]=y>>>0,h[g+1]=v>>>0},r.pc1=function(S,a,h,g){for(var y=0,v=0,b=7;b>=5;b--){for(var A=0;A<=24;A+=8)y<<=1,y|=a>>A+b&1;for(A=0;A<=24;A+=8)y<<=1,y|=S>>A+b&1}for(A=0;A<=24;A+=8)y<<=1,y|=a>>A+b&1;for(b=1;b<=3;b++){for(A=0;A<=24;A+=8)v<<=1,v|=a>>A+b&1;for(A=0;A<=24;A+=8)v<<=1,v|=S>>A+b&1}for(A=0;A<=24;A+=8)v<<=1,v|=S>>A+b&1;h[g+0]=y>>>0,h[g+1]=v>>>0},r.r28shl=function(S,a){return S<>>28-a};var d=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(S,a,h,g){for(var y=0,v=0,b=d.length>>>1,A=0;A>>d[A]&1;for(A=b;A>>d[A]&1;h[g+0]=y>>>0,h[g+1]=v>>>0},r.expand=function(S,a,h){var g=0,y=0;g=(1&S)<<5|S>>>27;for(var v=23;v>=15;v-=4)g<<=6,g|=S>>>v&63;for(v=11;v>=3;v-=4)y|=S>>>v&63,y<<=6;y|=(31&S)<<1|S>>>31,a[h+0]=g>>>0,a[h+1]=y>>>0};var l=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(S,a){for(var h=0,g=0;g<4;g++){h<<=4,h|=l[64*g+(S>>>18-6*g&63)]}for(g=0;g<4;g++){h<<=4,h|=l[256+64*g+(a>>>18-6*g&63)]}return h>>>0};var _=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(S){for(var a=0,h=0;h<_.length;h++)a<<=1,a|=S>>>_[h]&1;return a>>>0},r.padSplit=function(S,a,h){for(var g=S.toString(2);g.length{var l=d(85563),_=d(29799),E=d(21419);var a={binary:!0,hex:!0,base64:!0};r.DiffieHellmanGroup=r.createDiffieHellmanGroup=r.getDiffieHellman=function S(g){var y=new Buffer(_[g].prime,"hex"),v=new Buffer(_[g].gen,"hex");return new E(y,v)},r.createDiffieHellman=r.DiffieHellman=function h(g,y,v,b){return Buffer.isBuffer(y)||void 0===a[y]?h(g,"binary",y,v):(y=y||"binary",b=b||"binary",v=v||new Buffer([2]),Buffer.isBuffer(v)||(v=new Buffer(v,b)),"number"==typeof g?new E(l(g,v),v,!0):(Buffer.isBuffer(g)||(g=new Buffer(g,y)),new E(g,v,!0)))}},21419:(ne,r,d)=>{var l=d(88313),E=new(d(17079)),S=new l(24),a=new l(11),h=new l(10),g=new l(3),y=new l(7),v=d(85563),b=d(53753);function A(P,R){return R=R||"utf8",Buffer.isBuffer(P)||(P=new Buffer(P,R)),this._pub=new l(P),this}function O(P,R){return R=R||"utf8",Buffer.isBuffer(P)||(P=new Buffer(P,R)),this._priv=new l(P),this}ne.exports=N;var C={};function N(P,R,L){this.setGenerator(R),this.__prime=new l(P),this._prime=l.mont(this.__prime),this._primeLen=P.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,L?(this.setPublicKey=A,this.setPrivateKey=O):this._primeCode=8}function M(P,R){var L=new Buffer(P.toArray());return R?L.toString(R):L}Object.defineProperty(N.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function T(P,R){var L=R.toString("hex"),H=[L,P.toString(16)].join("_");if(H in C)return C[H];var J,V=0;if(P.isEven()||!v.simpleSieve||!v.fermatTest(P)||!E.test(P))return V+=1,V+="02"===L||"05"===L?8:4,C[H]=V,V;switch(E.test(P.shrn(1))||(V+=2),L){case"02":P.mod(S).cmp(a)&&(V+=8);break;case"05":(J=P.mod(h)).cmp(g)&&J.cmp(y)&&(V+=8);break;default:V+=4}return C[H]=V,V}(this.__prime,this.__gen)),this._primeCode}}),N.prototype.generateKeys=function(){return this._priv||(this._priv=new l(b(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},N.prototype.computeSecret=function(P){var R=(P=(P=new l(P)).toRed(this._prime)).redPow(this._priv).fromRed(),L=new Buffer(R.toArray()),H=this.getPrime();if(L.length{var l=d(53753);ne.exports=V,V.simpleSieve=L,V.fermatTest=H;var _=d(88313),E=new _(24),a=new(d(17079)),h=new _(1),g=new _(2),y=new _(5),A=(new _(16),new _(8),new _(10)),O=new _(3),T=(new _(7),new _(11)),N=new _(4),P=(new _(12),null);function L(J){for(var Y=function R(){if(null!==P)return P;var Y=[];Y[0]=2;for(var Z=1,W=3;W<1048576;W+=2){for(var Q=Math.ceil(Math.sqrt(W)),D=0;DJ;)Z.ishrn(1);if(Z.isEven()&&Z.iadd(h),Z.testn(1)||Z.iadd(g),Y.cmp(g)){if(!Y.cmp(y))for(;Z.mod(A).cmp(O);)Z.iadd(N)}else for(;Z.mod(E).cmp(T);)Z.iadd(N);if(L(W=Z.shrn(1))&&L(Z)&&H(W)&&H(Z)&&a.test(W)&&a.test(Z))return Z}}},88313:function(ne,r,d){(function(l,_){"use strict";function E(D,o){if(!D)throw new Error(o||"Assertion failed")}function S(D,o){D.super_=o;var u=function(){};u.prototype=o.prototype,D.prototype=new u,D.prototype.constructor=D}function a(D,o,u){if(a.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,null!==D&&(("le"===o||"be"===o)&&(u=o,o=10),this._init(D||0,o||10,u||"be"))}var h;"object"==typeof l?l.exports=a:_.BN=a,a.BN=a,a.wordSize=26;try{h=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:d(7748).Buffer}catch{}function g(D,o){var u=D.charCodeAt(o);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},74901:ne=>{"use strict";var r={single_source_shortest_paths:function(d,l,_){var E={},S={};S[l]=0;var h,g,y,v,b,O,C,a=r.PriorityQueue.make();for(a.push(l,0);!a.empty();)for(y in g=(h=a.pop()).value,v=h.cost,b=d[g]||{})b.hasOwnProperty(y)&&(O=v+b[y],C=S[y],(typeof S[y]>"u"||C>O)&&(S[y]=O,a.push(y,O),E[y]=g));if(typeof _<"u"&&typeof S[_]>"u"){var N=["Could not find a path from ",l," to ",_,"."].join("");throw new Error(N)}return E},extract_shortest_path_from_predecessor_list:function(d,l){for(var _=[],E=l;E;)_.push(E),d[E],E=d[E];return _.reverse(),_},find_path:function(d,l,_){var E=r.single_source_shortest_paths(d,l,_);return r.extract_shortest_path_from_predecessor_list(E,_)},PriorityQueue:{make:function(d){var E,l=r.PriorityQueue,_={};for(E in d=d||{},l)l.hasOwnProperty(E)&&(_[E]=l[E]);return _.queue=[],_.sorter=d.sorter||l.default_sorter,_},default_sorter:function(d,l){return d.cost-l.cost},push:function(d,l){var _={value:d,cost:l};this.queue.push(_),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};ne.exports=r},57715:(ne,r,d)=>{"use strict";var l=r;l.version=d(18597).i8,l.utils=d(61970),l.rand=d(37950),l.curve=d(46270),l.curves=d(52916),l.ec=d(67626),l.eddsa=d(81885)},97902:(ne,r,d)=>{"use strict";var l=d(17433),_=d(61970),E=_.getNAF,S=_.getJSF,a=_.assert;function h(y,v){this.type=y,this.p=new l(v.p,16),this.red=v.prime?l.red(v.prime):l.mont(this.p),this.zero=new l(0).toRed(this.red),this.one=new l(1).toRed(this.red),this.two=new l(2).toRed(this.red),this.n=v.n&&new l(v.n,16),this.g=v.g&&this.pointFromJSON(v.g,v.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var b=this.n&&this.p.div(this.n);!b||b.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function g(y,v){this.curve=y,this.type=v,this.precomputed=null}ne.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(v,b){a(v.precomputed);var A=v._getDoubles(),O=E(b,1,this._bitLength),C=(1<=N;P--)M=(M<<1)+O[P];T.push(M)}for(var R=this.jpoint(null,null,null),L=this.jpoint(null,null,null),H=C;H>0;H--){for(N=0;N=0;M--){for(var P=0;M>=0&&0===T[M];M--)P++;if(M>=0&&P++,N=N.dblp(P),M<0)break;var R=T[M];a(0!==R),N="affine"===v.type?R>0?N.mixedAdd(C[R-1>>1]):N.mixedAdd(C[-R-1>>1].neg()):R>0?N.add(C[R-1>>1]):N.add(C[-R-1>>1].neg())}return"affine"===v.type?N.toP():N},h.prototype._wnafMulAdd=function(v,b,A,O,C){var R,L,H,T=this._wnafT1,N=this._wnafT2,M=this._wnafT3,P=0;for(R=0;R=1;R-=2){var J=R-1,Y=R;if(1===T[J]&&1===T[Y]){var Z=[b[J],null,null,b[Y]];0===b[J].y.cmp(b[Y].y)?(Z[1]=b[J].add(b[Y]),Z[2]=b[J].toJ().mixedAdd(b[Y].neg())):0===b[J].y.cmp(b[Y].y.redNeg())?(Z[1]=b[J].toJ().mixedAdd(b[Y]),Z[2]=b[J].add(b[Y].neg())):(Z[1]=b[J].toJ().mixedAdd(b[Y]),Z[2]=b[J].toJ().mixedAdd(b[Y].neg()));var W=[-3,-1,-5,-7,0,7,5,1,3],Q=S(A[J],A[Y]);for(P=Math.max(Q[0].length,P),M[J]=new Array(P),M[Y]=new Array(P),L=0;L=0;R--){for(var w=0;R>=0;){var x=!0;for(L=0;L=0&&w++,u=u.dblp(w),R<0)break;for(L=0;L0?H=N[L][F-1>>1]:F<0&&(H=N[L][-F-1>>1].neg()),u="affine"===H.type?u.mixedAdd(H):u.add(H))}}for(R=0;R=Math.ceil((v.bitLength()+1)/b.step)},g.prototype._getDoubles=function(v,b){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var A=[this],O=this,C=0;C{"use strict";var l=d(61970),_=d(17433),E=d(83894),S=d(97902),a=l.assert;function h(y){this.twisted=1!=(0|y.a),this.mOneA=this.twisted&&-1==(0|y.a),this.extended=this.mOneA,S.call(this,"edwards",y),this.a=new _(y.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new _(y.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new _(y.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|y.c)}function g(y,v,b,A,O){S.BasePoint.call(this,y,"projective"),null===v&&null===b&&null===A?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new _(v,16),this.y=new _(b,16),this.z=A?new _(A,16):this.curve.one,this.t=O&&new _(O,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}E(h,S),ne.exports=h,h.prototype._mulA=function(v){return this.mOneA?v.redNeg():this.a.redMul(v)},h.prototype._mulC=function(v){return this.oneC?v:this.c.redMul(v)},h.prototype.jpoint=function(v,b,A,O){return this.point(v,b,A,O)},h.prototype.pointFromX=function(v,b){(v=new _(v,16)).red||(v=v.toRed(this.red));var A=v.redSqr(),O=this.c2.redSub(this.a.redMul(A)),C=this.one.redSub(this.c2.redMul(this.d).redMul(A)),T=O.redMul(C.redInvm()),N=T.redSqrt();if(0!==N.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");var M=N.fromRed().isOdd();return(b&&!M||!b&&M)&&(N=N.redNeg()),this.point(v,N)},h.prototype.pointFromY=function(v,b){(v=new _(v,16)).red||(v=v.toRed(this.red));var A=v.redSqr(),O=A.redSub(this.c2),C=A.redMul(this.d).redMul(this.c2).redSub(this.a),T=O.redMul(C.redInvm());if(0===T.cmp(this.zero)){if(b)throw new Error("invalid point");return this.point(this.zero,v)}var N=T.redSqrt();if(0!==N.redSqr().redSub(T).cmp(this.zero))throw new Error("invalid point");return N.fromRed().isOdd()!==b&&(N=N.redNeg()),this.point(N,v)},h.prototype.validate=function(v){if(v.isInfinity())return!0;v.normalize();var b=v.x.redSqr(),A=v.y.redSqr(),O=b.redMul(this.a).redAdd(A),C=this.c2.redMul(this.one.redAdd(this.d.redMul(b).redMul(A)));return 0===O.cmp(C)},E(g,S.BasePoint),h.prototype.pointFromJSON=function(v){return g.fromJSON(this,v)},h.prototype.point=function(v,b,A,O){return new g(this,v,b,A,O)},g.fromJSON=function(v,b){return new g(v,b[0],b[1],b[2])},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},g.prototype._extDbl=function(){var v=this.x.redSqr(),b=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var O=this.curve._mulA(v),C=this.x.redAdd(this.y).redSqr().redISub(v).redISub(b),T=O.redAdd(b),N=T.redSub(A),M=O.redSub(b),P=C.redMul(N),R=T.redMul(M),L=C.redMul(M),H=N.redMul(T);return this.curve.point(P,R,H,L)},g.prototype._projDbl=function(){var O,C,T,N,M,P,v=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),A=this.y.redSqr();if(this.curve.twisted){var R=(N=this.curve._mulA(b)).redAdd(A);this.zOne?(O=v.redSub(b).redSub(A).redMul(R.redSub(this.curve.two)),C=R.redMul(N.redSub(A)),T=R.redSqr().redSub(R).redSub(R)):(M=this.z.redSqr(),P=R.redSub(M).redISub(M),O=v.redSub(b).redISub(A).redMul(P),C=R.redMul(N.redSub(A)),T=R.redMul(P))}else N=b.redAdd(A),M=this.curve._mulC(this.z).redSqr(),P=N.redSub(M).redSub(M),O=this.curve._mulC(v.redISub(N)).redMul(P),C=this.curve._mulC(N).redMul(b.redISub(A)),T=N.redMul(P);return this.curve.point(O,C,T)},g.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},g.prototype._extAdd=function(v){var b=this.y.redSub(this.x).redMul(v.y.redSub(v.x)),A=this.y.redAdd(this.x).redMul(v.y.redAdd(v.x)),O=this.t.redMul(this.curve.dd).redMul(v.t),C=this.z.redMul(v.z.redAdd(v.z)),T=A.redSub(b),N=C.redSub(O),M=C.redAdd(O),P=A.redAdd(b),R=T.redMul(N),L=M.redMul(P),H=T.redMul(P),V=N.redMul(M);return this.curve.point(R,L,V,H)},g.prototype._projAdd=function(v){var L,H,b=this.z.redMul(v.z),A=b.redSqr(),O=this.x.redMul(v.x),C=this.y.redMul(v.y),T=this.curve.d.redMul(O).redMul(C),N=A.redSub(T),M=A.redAdd(T),P=this.x.redAdd(this.y).redMul(v.x.redAdd(v.y)).redISub(O).redISub(C),R=b.redMul(N).redMul(P);return this.curve.twisted?(L=b.redMul(M).redMul(C.redSub(this.curve._mulA(O))),H=N.redMul(M)):(L=b.redMul(M).redMul(C.redSub(O)),H=this.curve._mulC(N).redMul(M)),this.curve.point(R,L,H)},g.prototype.add=function(v){return this.isInfinity()?v:v.isInfinity()?this:this.curve.extended?this._extAdd(v):this._projAdd(v)},g.prototype.mul=function(v){return this._hasDoubles(v)?this.curve._fixedNafMul(this,v):this.curve._wnafMul(this,v)},g.prototype.mulAdd=function(v,b,A){return this.curve._wnafMulAdd(1,[this,b],[v,A],2,!1)},g.prototype.jmulAdd=function(v,b,A){return this.curve._wnafMulAdd(1,[this,b],[v,A],2,!0)},g.prototype.normalize=function(){if(this.zOne)return this;var v=this.z.redInvm();return this.x=this.x.redMul(v),this.y=this.y.redMul(v),this.t&&(this.t=this.t.redMul(v)),this.z=this.curve.one,this.zOne=!0,this},g.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},g.prototype.getX=function(){return this.normalize(),this.x.fromRed()},g.prototype.getY=function(){return this.normalize(),this.y.fromRed()},g.prototype.eq=function(v){return this===v||0===this.getX().cmp(v.getX())&&0===this.getY().cmp(v.getY())},g.prototype.eqXToP=function(v){var b=v.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(b))return!0;for(var A=v.clone(),O=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(b.redIAdd(O),0===this.x.cmp(b))return!0}},g.prototype.toP=g.prototype.normalize,g.prototype.mixedAdd=g.prototype.add},46270:(ne,r,d)=>{"use strict";var l=r;l.base=d(97902),l.short=d(41781),l.mont=d(97064),l.edwards=d(13835)},97064:(ne,r,d)=>{"use strict";var l=d(17433),_=d(83894),E=d(97902),S=d(61970);function a(g){E.call(this,"mont",g),this.a=new l(g.a,16).toRed(this.red),this.b=new l(g.b,16).toRed(this.red),this.i4=new l(4).toRed(this.red).redInvm(),this.two=new l(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function h(g,y,v){E.BasePoint.call(this,g,"projective"),null===y&&null===v?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new l(y,16),this.z=new l(v,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}_(a,E),ne.exports=a,a.prototype.validate=function(y){var v=y.normalize().x,b=v.redSqr(),A=b.redMul(v).redAdd(b.redMul(this.a)).redAdd(v);return 0===A.redSqrt().redSqr().cmp(A)},_(h,E.BasePoint),a.prototype.decodePoint=function(y,v){return this.point(S.toArray(y,v),1)},a.prototype.point=function(y,v){return new h(this,y,v)},a.prototype.pointFromJSON=function(y){return h.fromJSON(this,y)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(y,v){return new h(y,v[0],v[1]||y.one)},h.prototype.inspect=function(){return this.isInfinity()?"":""},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var v=this.x.redAdd(this.z).redSqr(),A=this.x.redSub(this.z).redSqr(),O=v.redSub(A),C=v.redMul(A),T=O.redMul(A.redAdd(this.curve.a24.redMul(O)));return this.curve.point(C,T)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(y,v){var b=this.x.redAdd(this.z),A=this.x.redSub(this.z),O=y.x.redAdd(y.z),T=y.x.redSub(y.z).redMul(b),N=O.redMul(A),M=v.z.redMul(T.redAdd(N).redSqr()),P=v.x.redMul(T.redISub(N).redSqr());return this.curve.point(M,P)},h.prototype.mul=function(y){for(var v=y.clone(),b=this,A=this.curve.point(null,null),C=[];0!==v.cmpn(0);v.iushrn(1))C.push(v.andln(1));for(var T=C.length-1;T>=0;T--)0===C[T]?(b=b.diffAdd(A,this),A=A.dbl()):(A=b.diffAdd(A,this),b=b.dbl());return A},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(y){return 0===this.getX().cmp(y.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},41781:(ne,r,d)=>{"use strict";var l=d(61970),_=d(17433),E=d(83894),S=d(97902),a=l.assert;function h(v){S.call(this,"short",v),this.a=new _(v.a,16).toRed(this.red),this.b=new _(v.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(v),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function g(v,b,A,O){S.BasePoint.call(this,v,"affine"),null===b&&null===A?(this.x=null,this.y=null,this.inf=!0):(this.x=new _(b,16),this.y=new _(A,16),O&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function y(v,b,A,O){S.BasePoint.call(this,v,"jacobian"),null===b&&null===A&&null===O?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _(0)):(this.x=new _(b,16),this.y=new _(A,16),this.z=new _(O,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}E(h,S),ne.exports=h,h.prototype._getEndomorphism=function(b){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var A,O;if(b.beta)A=new _(b.beta,16).toRed(this.red);else{var C=this._getEndoRoots(this.p);A=(A=C[0].cmp(C[1])<0?C[0]:C[1]).toRed(this.red)}if(b.lambda)O=new _(b.lambda,16);else{var T=this._getEndoRoots(this.n);0===this.g.mul(T[0]).x.cmp(this.g.x.redMul(A))?O=T[0]:(O=T[1],a(0===this.g.mul(O).x.cmp(this.g.x.redMul(A))))}return{beta:A,lambda:O,basis:b.basis?b.basis.map(function(M){return{a:new _(M.a,16),b:new _(M.b,16)}}):this._getEndoBasis(O)}}},h.prototype._getEndoRoots=function(b){var A=b===this.p?this.red:_.mont(b),O=new _(2).toRed(A).redInvm(),C=O.redNeg(),T=new _(3).toRed(A).redNeg().redSqrt().redMul(O);return[C.redAdd(T).fromRed(),C.redSub(T).fromRed()]},h.prototype._getEndoBasis=function(b){for(var R,L,H,V,J,Y,Z,Q,D,A=this.n.ushrn(Math.floor(this.n.bitLength()/2)),O=b,C=this.n.clone(),T=new _(1),N=new _(0),M=new _(0),P=new _(1),W=0;0!==O.cmpn(0);){var o=C.div(O);Q=C.sub(o.mul(O)),D=M.sub(o.mul(T));var u=P.sub(o.mul(N));if(!H&&Q.cmp(A)<0)R=Z.neg(),L=T,H=Q.neg(),V=D;else if(H&&2==++W)break;Z=Q,C=O,O=Q,M=T,T=D,P=N,N=u}J=Q.neg(),Y=D;var m=H.sqr().add(V.sqr());return J.sqr().add(Y.sqr()).cmp(m)>=0&&(J=R,Y=L),H.negative&&(H=H.neg(),V=V.neg()),J.negative&&(J=J.neg(),Y=Y.neg()),[{a:H,b:V},{a:J,b:Y}]},h.prototype._endoSplit=function(b){var A=this.endo.basis,O=A[0],C=A[1],T=C.b.mul(b).divRound(this.n),N=O.b.neg().mul(b).divRound(this.n),M=T.mul(O.a),P=N.mul(C.a),R=T.mul(O.b),L=N.mul(C.b);return{k1:b.sub(M).sub(P),k2:R.add(L).neg()}},h.prototype.pointFromX=function(b,A){(b=new _(b,16)).red||(b=b.toRed(this.red));var O=b.redSqr().redMul(b).redIAdd(b.redMul(this.a)).redIAdd(this.b),C=O.redSqrt();if(0!==C.redSqr().redSub(O).cmp(this.zero))throw new Error("invalid point");var T=C.fromRed().isOdd();return(A&&!T||!A&&T)&&(C=C.redNeg()),this.point(b,C)},h.prototype.validate=function(b){if(b.inf)return!0;var A=b.x,O=b.y,C=this.a.redMul(A),T=A.redSqr().redMul(A).redIAdd(C).redIAdd(this.b);return 0===O.redSqr().redISub(T).cmpn(0)},h.prototype._endoWnafMulAdd=function(b,A,O){for(var C=this._endoWnafT1,T=this._endoWnafT2,N=0;N":""},g.prototype.isInfinity=function(){return this.inf},g.prototype.add=function(b){if(this.inf)return b;if(b.inf)return this;if(this.eq(b))return this.dbl();if(this.neg().eq(b))return this.curve.point(null,null);if(0===this.x.cmp(b.x))return this.curve.point(null,null);var A=this.y.redSub(b.y);0!==A.cmpn(0)&&(A=A.redMul(this.x.redSub(b.x).redInvm()));var O=A.redSqr().redISub(this.x).redISub(b.x),C=A.redMul(this.x.redSub(O)).redISub(this.y);return this.curve.point(O,C)},g.prototype.dbl=function(){if(this.inf)return this;var b=this.y.redAdd(this.y);if(0===b.cmpn(0))return this.curve.point(null,null);var A=this.curve.a,O=this.x.redSqr(),C=b.redInvm(),T=O.redAdd(O).redIAdd(O).redIAdd(A).redMul(C),N=T.redSqr().redISub(this.x.redAdd(this.x)),M=T.redMul(this.x.redSub(N)).redISub(this.y);return this.curve.point(N,M)},g.prototype.getX=function(){return this.x.fromRed()},g.prototype.getY=function(){return this.y.fromRed()},g.prototype.mul=function(b){return b=new _(b,16),this.isInfinity()?this:this._hasDoubles(b)?this.curve._fixedNafMul(this,b):this.curve.endo?this.curve._endoWnafMulAdd([this],[b]):this.curve._wnafMul(this,b)},g.prototype.mulAdd=function(b,A,O){var C=[this,A],T=[b,O];return this.curve.endo?this.curve._endoWnafMulAdd(C,T):this.curve._wnafMulAdd(1,C,T,2)},g.prototype.jmulAdd=function(b,A,O){var C=[this,A],T=[b,O];return this.curve.endo?this.curve._endoWnafMulAdd(C,T,!0):this.curve._wnafMulAdd(1,C,T,2,!0)},g.prototype.eq=function(b){return this===b||this.inf===b.inf&&(this.inf||0===this.x.cmp(b.x)&&0===this.y.cmp(b.y))},g.prototype.neg=function(b){if(this.inf)return this;var A=this.curve.point(this.x,this.y.redNeg());if(b&&this.precomputed){var O=this.precomputed,C=function(T){return T.neg()};A.precomputed={naf:O.naf&&{wnd:O.naf.wnd,points:O.naf.points.map(C)},doubles:O.doubles&&{step:O.doubles.step,points:O.doubles.points.map(C)}}}return A},g.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},E(y,S.BasePoint),h.prototype.jpoint=function(b,A,O){return new y(this,b,A,O)},y.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var b=this.z.redInvm(),A=b.redSqr(),O=this.x.redMul(A),C=this.y.redMul(A).redMul(b);return this.curve.point(O,C)},y.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},y.prototype.add=function(b){if(this.isInfinity())return b;if(b.isInfinity())return this;var A=b.z.redSqr(),O=this.z.redSqr(),C=this.x.redMul(A),T=b.x.redMul(O),N=this.y.redMul(A.redMul(b.z)),M=b.y.redMul(O.redMul(this.z)),P=C.redSub(T),R=N.redSub(M);if(0===P.cmpn(0))return 0!==R.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var L=P.redSqr(),H=L.redMul(P),V=C.redMul(L),J=R.redSqr().redIAdd(H).redISub(V).redISub(V),Y=R.redMul(V.redISub(J)).redISub(N.redMul(H)),Z=this.z.redMul(b.z).redMul(P);return this.curve.jpoint(J,Y,Z)},y.prototype.mixedAdd=function(b){if(this.isInfinity())return b.toJ();if(b.isInfinity())return this;var A=this.z.redSqr(),O=this.x,C=b.x.redMul(A),T=this.y,N=b.y.redMul(A).redMul(this.z),M=O.redSub(C),P=T.redSub(N);if(0===M.cmpn(0))return 0!==P.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var R=M.redSqr(),L=R.redMul(M),H=O.redMul(R),V=P.redSqr().redIAdd(L).redISub(H).redISub(H),J=P.redMul(H.redISub(V)).redISub(T.redMul(L)),Y=this.z.redMul(M);return this.curve.jpoint(V,J,Y)},y.prototype.dblp=function(b){if(0===b)return this;if(this.isInfinity())return this;if(!b)return this.dbl();var A;if(this.curve.zeroA||this.curve.threeA){var O=this;for(A=0;A=0)return!1;if(O.redIAdd(T),0===this.x.cmp(O))return!0}},y.prototype.inspect=function(){return this.isInfinity()?"":""},y.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},52916:(ne,r,d)=>{"use strict";var y,l=r,_=d(37084),E=d(46270),a=d(61970).assert;function h(v){"short"===v.type?this.curve=new E.short(v):"edwards"===v.type?this.curve=new E.edwards(v):this.curve=new E.mont(v),this.g=this.curve.g,this.n=this.curve.n,this.hash=v.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function g(v,b){Object.defineProperty(l,v,{configurable:!0,enumerable:!0,get:function(){var A=new h(b);return Object.defineProperty(l,v,{configurable:!0,enumerable:!0,value:A}),A}})}l.PresetCurve=h,g("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:_.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),g("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:_.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),g("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:_.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),g("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:_.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),g("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:_.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),g("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:_.sha256,gRed:!1,g:["9"]}),g("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:_.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{y=d(25150)}catch{y=void 0}g("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:_.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",y]})},67626:(ne,r,d)=>{"use strict";var l=d(17433),_=d(52438),E=d(61970),S=d(52916),a=d(37950),h=E.assert,g=d(91259),y=d(65957);function v(b){if(!(this instanceof v))return new v(b);"string"==typeof b&&(h(Object.prototype.hasOwnProperty.call(S,b),"Unknown curve "+b),b=S[b]),b instanceof S.PresetCurve&&(b={curve:b}),this.curve=b.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=b.curve.g,this.g.precompute(b.curve.n.bitLength()+1),this.hash=b.hash||b.curve.hash}ne.exports=v,v.prototype.keyPair=function(A){return new g(this,A)},v.prototype.keyFromPrivate=function(A,O){return g.fromPrivate(this,A,O)},v.prototype.keyFromPublic=function(A,O){return g.fromPublic(this,A,O)},v.prototype.genKeyPair=function(A){A||(A={});for(var O=new _({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||a(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),C=this.n.byteLength(),T=this.n.sub(new l(2));;){var N=new l(O.generate(C));if(!(N.cmp(T)>0))return N.iaddn(1),this.keyFromPrivate(N)}},v.prototype._truncateToN=function(A,O){var C=8*A.byteLength()-this.n.bitLength();return C>0&&(A=A.ushrn(C)),!O&&A.cmp(this.n)>=0?A.sub(this.n):A},v.prototype.sign=function(A,O,C,T){"object"==typeof C&&(T=C,C=null),T||(T={}),O=this.keyFromPrivate(O,C),A=this._truncateToN(new l(A,16));for(var N=this.n.byteLength(),M=O.getPrivate().toArray("be",N),P=A.toArray("be",N),R=new _({hash:this.hash,entropy:M,nonce:P,pers:T.pers,persEnc:T.persEnc||"utf8"}),L=this.n.sub(new l(1)),H=0;;H++){var V=T.k?T.k(H):new l(R.generate(this.n.byteLength()));if(!((V=this._truncateToN(V,!0)).cmpn(1)<=0||V.cmp(L)>=0)){var J=this.g.mul(V);if(!J.isInfinity()){var Y=J.getX(),Z=Y.umod(this.n);if(0!==Z.cmpn(0)){var W=V.invm(this.n).mul(Z.mul(O.getPrivate()).iadd(A));if(0!==(W=W.umod(this.n)).cmpn(0)){var Q=(J.getY().isOdd()?1:0)|(0!==Y.cmp(Z)?2:0);return T.canonical&&W.cmp(this.nh)>0&&(W=this.n.sub(W),Q^=1),new y({r:Z,s:W,recoveryParam:Q})}}}}}},v.prototype.verify=function(A,O,C,T){A=this._truncateToN(new l(A,16)),C=this.keyFromPublic(C,T);var N=(O=new y(O,"hex")).r,M=O.s;if(N.cmpn(1)<0||N.cmp(this.n)>=0||M.cmpn(1)<0||M.cmp(this.n)>=0)return!1;var H,P=M.invm(this.n),R=P.mul(A).umod(this.n),L=P.mul(N).umod(this.n);return this.curve._maxwellTrick?!(H=this.g.jmulAdd(R,C.getPublic(),L)).isInfinity()&&H.eqXToP(N):!(H=this.g.mulAdd(R,C.getPublic(),L)).isInfinity()&&0===H.getX().umod(this.n).cmp(N)},v.prototype.recoverPubKey=function(b,A,O,C){h((3&O)===O,"The recovery param is more than two bits"),A=new y(A,C);var T=this.n,N=new l(b),M=A.r,P=A.s,R=1&O,L=O>>1;if(M.cmp(this.curve.p.umod(this.curve.n))>=0&&L)throw new Error("Unable to find sencond key candinate");M=L?this.curve.pointFromX(M.add(this.curve.n),R):this.curve.pointFromX(M,R);var H=A.r.invm(T),V=T.sub(N).mul(H).umod(T),J=P.mul(H).umod(T);return this.g.mulAdd(V,M,J)},v.prototype.getKeyRecoveryParam=function(b,A,O,C){if(null!==(A=new y(A,C)).recoveryParam)return A.recoveryParam;for(var T=0;T<4;T++){var N;try{N=this.recoverPubKey(b,A,T)}catch{continue}if(N.eq(O))return T}throw new Error("Unable to find valid recovery factor")}},91259:(ne,r,d)=>{"use strict";var l=d(17433),E=d(61970).assert;function S(a,h){this.ec=a,this.priv=null,this.pub=null,h.priv&&this._importPrivate(h.priv,h.privEnc),h.pub&&this._importPublic(h.pub,h.pubEnc)}ne.exports=S,S.fromPublic=function(h,g,y){return g instanceof S?g:new S(h,{pub:g,pubEnc:y})},S.fromPrivate=function(h,g,y){return g instanceof S?g:new S(h,{priv:g,privEnc:y})},S.prototype.validate=function(){var h=this.getPublic();return h.isInfinity()?{result:!1,reason:"Invalid public key"}:h.validate()?h.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},S.prototype.getPublic=function(h,g){return"string"==typeof h&&(g=h,h=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),g?this.pub.encode(g,h):this.pub},S.prototype.getPrivate=function(h){return"hex"===h?this.priv.toString(16,2):this.priv},S.prototype._importPrivate=function(h,g){this.priv=new l(h,g||16),this.priv=this.priv.umod(this.ec.curve.n)},S.prototype._importPublic=function(h,g){if(h.x||h.y)return"mont"===this.ec.curve.type?E(h.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&E(h.x&&h.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(h.x,h.y));this.pub=this.ec.curve.decodePoint(h,g)},S.prototype.derive=function(h){return h.validate()||E(h.validate(),"public point not validated"),h.mul(this.priv).getX()},S.prototype.sign=function(h,g,y){return this.ec.sign(h,this,g,y)},S.prototype.verify=function(h,g){return this.ec.verify(h,g,this)},S.prototype.inspect=function(){return""}},65957:(ne,r,d)=>{"use strict";var l=d(17433),_=d(61970),E=_.assert;function S(v,b){if(v instanceof S)return v;this._importDER(v,b)||(E(v.r&&v.s,"Signature without r or s"),this.r=new l(v.r,16),this.s=new l(v.s,16),void 0===v.recoveryParam?this.recoveryParam=null:this.recoveryParam=v.recoveryParam)}function a(){this.place=0}function h(v,b){var A=v[b.place++];if(!(128&A))return A;var O=15&A;if(0===O||O>4)return!1;for(var C=0,T=0,N=b.place;T>>=0;return!(C<=127)&&(b.place=N,C)}function g(v){for(var b=0,A=v.length-1;!v[b]&&!(128&v[b+1])&&b>>3);for(v.push(128|A);--A;)v.push(b>>>(A<<3)&255);v.push(b)}}ne.exports=S,S.prototype._importDER=function(b,A){b=_.toArray(b,A);var O=new a;if(48!==b[O.place++])return!1;var C=h(b,O);if(!1===C||C+O.place!==b.length||2!==b[O.place++])return!1;var T=h(b,O);if(!1===T)return!1;var N=b.slice(O.place,T+O.place);if(O.place+=T,2!==b[O.place++])return!1;var M=h(b,O);if(!1===M||b.length!==M+O.place)return!1;var P=b.slice(O.place,M+O.place);if(0===N[0]){if(!(128&N[1]))return!1;N=N.slice(1)}if(0===P[0]){if(!(128&P[1]))return!1;P=P.slice(1)}return this.r=new l(N),this.s=new l(P),this.recoveryParam=null,!0},S.prototype.toDER=function(b){var A=this.r.toArray(),O=this.s.toArray();for(128&A[0]&&(A=[0].concat(A)),128&O[0]&&(O=[0].concat(O)),A=g(A),O=g(O);!(O[0]||128&O[1]);)O=O.slice(1);var C=[2];y(C,A.length),(C=C.concat(A)).push(2),y(C,O.length);var T=C.concat(O),N=[48];return y(N,T.length),N=N.concat(T),_.encode(N,b)}},81885:(ne,r,d)=>{"use strict";var l=d(37084),_=d(52916),E=d(61970),S=E.assert,a=E.parseBytes,h=d(97535),g=d(88241);function y(v){if(S("ed25519"===v,"only tested with ed25519 so far"),!(this instanceof y))return new y(v);v=_[v].curve,this.curve=v,this.g=v.g,this.g.precompute(v.n.bitLength()+1),this.pointClass=v.point().constructor,this.encodingLength=Math.ceil(v.n.bitLength()/8),this.hash=l.sha512}ne.exports=y,y.prototype.sign=function(b,A){b=a(b);var O=this.keyFromSecret(A),C=this.hashInt(O.messagePrefix(),b),T=this.g.mul(C),N=this.encodePoint(T),M=this.hashInt(N,O.pubBytes(),b).mul(O.priv()),P=C.add(M).umod(this.curve.n);return this.makeSignature({R:T,S:P,Rencoded:N})},y.prototype.verify=function(b,A,O){b=a(b),A=this.makeSignature(A);var C=this.keyFromPublic(O),T=this.hashInt(A.Rencoded(),C.pubBytes(),b),N=this.g.mul(A.S());return A.R().add(C.pub().mul(T)).eq(N)},y.prototype.hashInt=function(){for(var b=this.hash(),A=0;A{"use strict";var l=d(61970),_=l.assert,E=l.parseBytes,S=l.cachedProperty;function a(h,g){this.eddsa=h,this._secret=E(g.secret),h.isPoint(g.pub)?this._pub=g.pub:this._pubBytes=E(g.pub)}a.fromPublic=function(g,y){return y instanceof a?y:new a(g,{pub:y})},a.fromSecret=function(g,y){return y instanceof a?y:new a(g,{secret:y})},a.prototype.secret=function(){return this._secret},S(a,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),S(a,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),S(a,"privBytes",function(){var g=this.eddsa,y=this.hash(),v=g.encodingLength-1,b=y.slice(0,g.encodingLength);return b[0]&=248,b[v]&=127,b[v]|=64,b}),S(a,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),S(a,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),S(a,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),a.prototype.sign=function(g){return _(this._secret,"KeyPair can only verify"),this.eddsa.sign(g,this)},a.prototype.verify=function(g,y){return this.eddsa.verify(g,y,this)},a.prototype.getSecret=function(g){return _(this._secret,"KeyPair is public only"),l.encode(this.secret(),g)},a.prototype.getPublic=function(g){return l.encode(this.pubBytes(),g)},ne.exports=a},88241:(ne,r,d)=>{"use strict";var l=d(17433),_=d(61970),E=_.assert,S=_.cachedProperty,a=_.parseBytes;function h(g,y){this.eddsa=g,"object"!=typeof y&&(y=a(y)),Array.isArray(y)&&(y={R:y.slice(0,g.encodingLength),S:y.slice(g.encodingLength)}),E(y.R&&y.S,"Signature without R or S"),g.isPoint(y.R)&&(this._R=y.R),y.S instanceof l&&(this._S=y.S),this._Rencoded=Array.isArray(y.R)?y.R:y.Rencoded,this._Sencoded=Array.isArray(y.S)?y.S:y.Sencoded}S(h,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),S(h,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),S(h,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),S(h,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return _.encode(this.toBytes(),"hex").toUpperCase()},ne.exports=h},25150:ne=>{ne.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},61970:(ne,r,d)=>{"use strict";var l=r,_=d(17433),E=d(32391),S=d(58195);l.assert=E,l.toArray=S.toArray,l.zero2=S.zero2,l.toHex=S.toHex,l.encode=S.encode,l.getNAF=function a(b,A,O){var C=new Array(Math.max(b.bitLength(),O)+1);C.fill(0);for(var T=1<(T>>1)-1?(T>>1)-R:R,N.isubn(P)):P=0,C[M]=P,N.iushrn(1)}return C},l.getJSF=function h(b,A){var O=[[],[]];b=b.clone(),A=A.clone();for(var N,C=0,T=0;b.cmpn(-C)>0||A.cmpn(-T)>0;){var R,L,M=b.andln(3)+C&3,P=A.andln(3)+T&3;3===M&&(M=-1),3===P&&(P=-1),1&M?R=3!==(N=b.andln(7)+C&7)&&5!==N||2!==P?M:-M:R=0,O[0].push(R),1&P?L=3!==(N=A.andln(7)+T&7)&&5!==N||2!==M?P:-P:L=0,O[1].push(L),2*C===R+1&&(C=1-C),2*T===L+1&&(T=1-T),b.iushrn(1),A.iushrn(1)}return O},l.cachedProperty=function g(b,A,O){var C="_"+A;b.prototype[A]=function(){return void 0!==this[C]?this[C]:this[C]=O.call(this)}},l.parseBytes=function y(b){return"string"==typeof b?l.toArray(b,"hex"):b},l.intFromLE=function v(b){return new _(b,"hex","le")}},17433:function(ne,r,d){(function(l,_){"use strict";function E(D,o){if(!D)throw new Error(o||"Assertion failed")}function S(D,o){D.super_=o;var u=function(){};u.prototype=o.prototype,D.prototype=new u,D.prototype.constructor=D}function a(D,o,u){if(a.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,null!==D&&(("le"===o||"be"===o)&&(u=o,o=10),this._init(D||0,o||10,u||"be"))}var h;"object"==typeof l?l.exports=a:_.BN=a,a.BN=a,a.wordSize=26;try{h=typeof window<"u"&&typeof window.Buffer<"u"?window.Buffer:d(85568).Buffer}catch{}function g(D,o){var u=D.charCodeAt(o);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},38419:ne=>{"use strict";ne.exports=function(d){for(var l=[],_=d.length,E=0;E<_;E++){var S=d.charCodeAt(E);if(S>=55296&&S<=56319&&_>E+1){var a=d.charCodeAt(E+1);a>=56320&&a<=57343&&(S=1024*(S-55296)+a-56320+65536,E+=1)}S<128?l.push(S):S<2048?(l.push(S>>6|192),l.push(63&S|128)):S<55296||S>=57344&&S<65536?(l.push(S>>12|224),l.push(S>>6&63|128),l.push(63&S|128)):S>=65536&&S<=1114111?(l.push(S>>18|240),l.push(S>>12&63|128),l.push(S>>6&63|128),l.push(63&S|128)):l.push(239,191,189)}return new Uint8Array(l).buffer}},69913:(ne,r,d)=>{var l=d(38739);function _(a,h,g){h&&"string"!=typeof h&&(h=h.message||h.name),l(this,{type:a,name:a,cause:"string"!=typeof h?h:g,message:h},"ewr")}function E(a,h){Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),_.call(this,"CustomError",a,h)}E.prototype=new Error,ne.exports=function(a){var h=function(g,y){return function S(a,h,g){var y=function(v,b){_.call(this,h,v,b),"FilesystemError"==h&&(this.code=this.cause.code,this.path=this.cause.path,this.errno=this.cause.errno,this.message=(a.errno[this.cause.errno]?a.errno[this.cause.errno].description:this.cause.message)+(this.cause.path?" ["+this.cause.path+"]":"")),Error.call(this),Error.captureStackTrace&&Error.captureStackTrace(this,y)};return y.prototype=g?new g:new E,y}(a,g,y)};return{CustomError:E,FilesystemError:h("FilesystemError"),createError:h}}},3161:(ne,r,d)=>{var l=ne.exports.all=[{errno:-2,code:"ENOENT",description:"no such file or directory"},{errno:-1,code:"UNKNOWN",description:"unknown error"},{errno:0,code:"OK",description:"success"},{errno:1,code:"EOF",description:"end of file"},{errno:2,code:"EADDRINFO",description:"getaddrinfo error"},{errno:3,code:"EACCES",description:"permission denied"},{errno:4,code:"EAGAIN",description:"resource temporarily unavailable"},{errno:5,code:"EADDRINUSE",description:"address already in use"},{errno:6,code:"EADDRNOTAVAIL",description:"address not available"},{errno:7,code:"EAFNOSUPPORT",description:"address family not supported"},{errno:8,code:"EALREADY",description:"connection already in progress"},{errno:9,code:"EBADF",description:"bad file descriptor"},{errno:10,code:"EBUSY",description:"resource busy or locked"},{errno:11,code:"ECONNABORTED",description:"software caused connection abort"},{errno:12,code:"ECONNREFUSED",description:"connection refused"},{errno:13,code:"ECONNRESET",description:"connection reset by peer"},{errno:14,code:"EDESTADDRREQ",description:"destination address required"},{errno:15,code:"EFAULT",description:"bad address in system call argument"},{errno:16,code:"EHOSTUNREACH",description:"host is unreachable"},{errno:17,code:"EINTR",description:"interrupted system call"},{errno:18,code:"EINVAL",description:"invalid argument"},{errno:19,code:"EISCONN",description:"socket is already connected"},{errno:20,code:"EMFILE",description:"too many open files"},{errno:21,code:"EMSGSIZE",description:"message too long"},{errno:22,code:"ENETDOWN",description:"network is down"},{errno:23,code:"ENETUNREACH",description:"network is unreachable"},{errno:24,code:"ENFILE",description:"file table overflow"},{errno:25,code:"ENOBUFS",description:"no buffer space available"},{errno:26,code:"ENOMEM",description:"not enough memory"},{errno:27,code:"ENOTDIR",description:"not a directory"},{errno:28,code:"EISDIR",description:"illegal operation on a directory"},{errno:29,code:"ENONET",description:"machine is not on the network"},{errno:31,code:"ENOTCONN",description:"socket is not connected"},{errno:32,code:"ENOTSOCK",description:"socket operation on non-socket"},{errno:33,code:"ENOTSUP",description:"operation not supported on socket"},{errno:34,code:"ENOENT",description:"no such file or directory"},{errno:35,code:"ENOSYS",description:"function not implemented"},{errno:36,code:"EPIPE",description:"broken pipe"},{errno:37,code:"EPROTO",description:"protocol error"},{errno:38,code:"EPROTONOSUPPORT",description:"protocol not supported"},{errno:39,code:"EPROTOTYPE",description:"protocol wrong type for socket"},{errno:40,code:"ETIMEDOUT",description:"connection timed out"},{errno:41,code:"ECHARSET",description:"invalid Unicode character"},{errno:42,code:"EAIFAMNOSUPPORT",description:"address family for hostname not supported"},{errno:44,code:"EAISERVICE",description:"servname not supported for ai_socktype"},{errno:45,code:"EAISOCKTYPE",description:"ai_socktype not supported"},{errno:46,code:"ESHUTDOWN",description:"cannot send after transport endpoint shutdown"},{errno:47,code:"EEXIST",description:"file already exists"},{errno:48,code:"ESRCH",description:"no such process"},{errno:49,code:"ENAMETOOLONG",description:"name too long"},{errno:50,code:"EPERM",description:"operation not permitted"},{errno:51,code:"ELOOP",description:"too many symbolic links encountered"},{errno:52,code:"EXDEV",description:"cross-device link not permitted"},{errno:53,code:"ENOTEMPTY",description:"directory not empty"},{errno:54,code:"ENOSPC",description:"no space left on device"},{errno:55,code:"EIO",description:"i/o error"},{errno:56,code:"EROFS",description:"read-only file system"},{errno:57,code:"ENODEV",description:"no such device"},{errno:58,code:"ESPIPE",description:"invalid seek"},{errno:59,code:"ECANCELED",description:"operation canceled"}];ne.exports.errno={},ne.exports.code={},l.forEach(function(_){ne.exports.errno[_.errno]=_,ne.exports.code[_.code]=_}),ne.exports.custom=d(69913)(ne.exports),ne.exports.create=ne.exports.custom.createError},38739:function(ne){var d,l;d=this,l=function(){var r="function"==typeof Object.defineProperty?function(_,E,S){return Object.defineProperty(_,E,S),_}:function(_,E,S){return _[E]=S.value,_};return function(_,E,S,a){var h;if(a=function(_,E){var S="object"==typeof E,a=!S&&"string"==typeof E,h=function(g){return S?!!E[g]:!!a&&E.indexOf(g[0])>-1};return{enumerable:h("enumerable"),configurable:h("configurable"),writable:h("writable"),value:_}}(S,a),"object"==typeof E){for(h in E)Object.hasOwnProperty.call(E,h)&&(a.value=E[h],r(_,h,a));return _}return r(_,E,a)}},ne.exports?ne.exports=l():d.prr=l()},4073:(ne,r,d)=>{ne.exports=d(36766)},36766:(ne,r,d)=>{d(53495);var _,l=d(37131);_=l("Error.captureStackTrace")?d(56362):l("Error.prototype.stack")?d(56017):d(63998),ne.exports=_()},52047:(ne,r,d)=>{var l=d(90252).Class,_=d(90252).abstractMethod,E=l(Object,{prototype:{init:l.prototype.merge,frameString:void 0,toString:function(){return this.frameString},functionValue:void 0,getThis:_,getTypeName:_,getFunction:function(){return this.functionValue},getFunctionName:_,getMethodName:_,getFileName:_,getLineNumber:_,getColumnNumber:_,getEvalOrigin:_,isTopLevel:_,isEval:_,isNative:_,isConstructor:_}});ne.exports=E},80916:(ne,r,d)=>{var l=d(90252).Class,_=d(52047),E=d(88074).cache,S=l(Object,{prototype:{stackParser:null,frameParser:null,locationParsers:null,constructor:function(a){l.prototype.merge.call(this,a)},getFrames:function(a,h){for(var g=[],y=0,v=a.length;y{var l=d(90252).Class,_=d(90252).abstractMethod,E=d(88074).eachCombination,S=d(88074).cache,a=d(37131),h=l(Object,{prototype:{captureFrameStrings:function(y){var v=this.createError();y.unshift(this.captureFrameStrings),y.unshift(this.createError);var A=this.getFrameStrings(v).slice(y.length),O=[];if(a("arguments.callee.caller")){var C=[this.createError,this.captureFrameStrings];try{for(var T=arguments.callee;T=T.caller;)C.push(T)}catch{}O=C.slice(y.length)}return{frameStrings:A,functionValues:O}},getFrameStrings:function(y){var v=y.message||"",b=y.name||"",A=this.getStackString(y);if(void 0!==A){var O=A.split("\n"),C=0,T=O.length;return this.hasHeader&&(C+=b.split("\n").length+v.split("\n").length-1),this.hasFooter&&(T-=1),O.slice(C,T)}},createError:_,getStackString:_,hasHeader:void 0,hasFooter:void 0}}),g=l(Object,{prototype:{calibrateClass:function(y){return this.calibrateMethods(y)&&this.calibrateEnvelope(y)},calibrateMethods:function(y){try{E([[function(v){return new Error(v)},function(v){try{throw new Error(v)}catch(b){return b}}],[function(v){return v.stack},function(v){return v.stacktrace}]],function(v,b){if(b(v()))throw{getStackString:b,createError:v}})}catch(v){return l.merge.call(y,{prototype:v}),!0}return!1},calibrateEnvelope:function(y){var O=(0,y.prototype.getStackString)((0,y.prototype.createError)("marker")).split("\n");return l.merge.call(y,{prototype:{hasHeader:/marker/.test(O[0]),hasFooter:""===O[O.length-1]}}),!0}}});ne.exports={getClass:S(function(){var y;if(y)return y;if(y=l(h,{}),!(new g).calibrateClass(y))throw new Error("Cannot read Error.prototype.stack in this environment.");return y}),getInstance:S(function(){return new(this.getClass())})}},56017:(ne,r,d)=>{var l=d(31470),_=d(80916),E=d(88074).cache,S=d(52624);ne.exports=function(){return Error.captureStackTrace=function a(h,g){var v=[a];g&&v.push(g);var b=l.getInstance().captureFrameStrings(v);Object.defineProperties(h,{stack:{configurable:!0,get:E(function(){var A=_.getInstance().getFrames(b.frameStrings,b.functionValues);return(Error.prepareStackTrace||S)(h,A,undefined)})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(a){if(a.cachedStack)return a.stack;var y,h=l.getInstance().getFrameStrings(a),g=[];h?g=_.getInstance().getFrames(h,[]):y=["The stack is not readable by unthrown errors in this environment."];var v=(Error.prepareStackTrace||S)(a,g,y);if(h)try{Object.defineProperties(a,{stack:{configurable:!0,writable:!0,enumerable:!1,value:v},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return v},{prepareStackTrace:S}}},52624:ne=>{ne.exports=function(d,l,_){var E="";if(E+=d.name||"Error",E+=": "+(d.message||""),_ instanceof Array)for(var S in _){E+="\n # "+_[S]}for(var h in l){E+="\n at "+l[h].toString()}return E}},63998:(ne,r,d)=>{var l=d(88074).cache,_=d(52624);ne.exports=function(){return Error.captureStackTrace=function(E,S){Object.defineProperties(E,{stack:{configurable:!0,get:l(function(){return(Error.prepareStackTrace||_)(E,[])})},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})},Error.getStackTrace=function(E){if(E.cachedStack)return E.stack;var S=(Error.prepareStackTrace||_)(E,[]);try{Object.defineProperties(E,{stack:{configurable:!0,writable:!0,enumerable:!1,value:S},cachedStack:{configurable:!0,writable:!0,enumerable:!1,value:!0}})}catch{}return S},{prepareStackTrace:_}}},56362:(ne,r,d)=>{var l=d(52624);ne.exports=function(){return Error.getStackTrace=function(_){return _.stack},{prepareStackTrace:l}}},59069:ne=>{"use strict";var l,r="object"==typeof Reflect?Reflect:null,d=r&&"function"==typeof r.apply?r.apply:function(H,V,J){return Function.prototype.apply.call(H,V,J)};l=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(H){return Object.getOwnPropertyNames(H).concat(Object.getOwnPropertySymbols(H))}:function(H){return Object.getOwnPropertyNames(H)};var E=Number.isNaN||function(H){return H!=H};function S(){S.init.call(this)}ne.exports=S,ne.exports.once=function M(L,H){return new Promise(function(V,J){function Y(W){L.removeListener(H,Z),J(W)}function Z(){"function"==typeof L.removeListener&&L.removeListener("error",Y),V([].slice.call(arguments))}R(L,H,Z,{once:!0}),"error"!==H&&function P(L,H,V){"function"==typeof L.on&&R(L,"error",H,V)}(L,Y,{once:!0})})},S.EventEmitter=S,S.prototype._events=void 0,S.prototype._eventsCount=0,S.prototype._maxListeners=void 0;var a=10;function h(L){if("function"!=typeof L)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof L)}function g(L){return void 0===L._maxListeners?S.defaultMaxListeners:L._maxListeners}function y(L,H,V,J){var Y,Z,W;if(h(V),void 0===(Z=L._events)?(Z=L._events=Object.create(null),L._eventsCount=0):(void 0!==Z.newListener&&(L.emit("newListener",H,V.listener?V.listener:V),Z=L._events),W=Z[H]),void 0===W)W=Z[H]=V,++L._eventsCount;else if("function"==typeof W?W=Z[H]=J?[V,W]:[W,V]:J?W.unshift(V):W.push(V),(Y=g(L))>0&&W.length>Y&&!W.warned){W.warned=!0;var Q=new Error("Possible EventEmitter memory leak detected. "+W.length+" "+String(H)+" listeners added. Use emitter.setMaxListeners() to increase limit");Q.name="MaxListenersExceededWarning",Q.emitter=L,Q.type=H,Q.count=W.length,function _(L){console&&console.warn&&console.warn(L)}(Q)}return L}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function b(L,H,V){var J={fired:!1,wrapFn:void 0,target:L,type:H,listener:V},Y=v.bind(J);return Y.listener=V,J.wrapFn=Y,Y}function A(L,H,V){var J=L._events;if(void 0===J)return[];var Y=J[H];return void 0===Y?[]:"function"==typeof Y?V?[Y.listener||Y]:[Y]:V?function N(L){for(var H=new Array(L.length),V=0;V0&&(W=V[0]),W instanceof Error)throw W;var Q=new Error("Unhandled error."+(W?" ("+W.message+")":""));throw Q.context=W,Q}var D=Z[H];if(void 0===D)return!1;if("function"==typeof D)d(D,this,V);else{var o=D.length,u=C(D,o);for(J=0;J=0;W--)if(J[W]===V||J[W].listener===V){Q=J[W].listener,Z=W;break}if(Z<0)return this;0===Z?J.shift():function T(L,H){for(;H+1=0;Y--)this.removeListener(H,V[Y]);return this},S.prototype.listeners=function(H){return A(this,H,!0)},S.prototype.rawListeners=function(H){return A(this,H,!1)},S.listenerCount=function(L,H){return"function"==typeof L.listenerCount?L.listenerCount(H):O.call(L,H)},S.prototype.listenerCount=O,S.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]}},40347:(ne,r,d)=>{var l=d(73502).Buffer,_=d(8095);ne.exports=function E(S,a,h,g){if(l.isBuffer(S)||(S=l.from(S,"binary")),a&&(l.isBuffer(a)||(a=l.from(a,"binary")),8!==a.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var y=h/8,v=l.alloc(y),b=l.alloc(g||0),A=l.alloc(0);y>0||g>0;){var O=new _;O.update(A),O.update(S),a&&O.update(a),A=O.digest();var C=0;if(y>0){var T=v.length-y;C=Math.min(y,A.length),A.copy(v,T,0,C),y-=C}if(C0){var N=b.length-g,M=Math.min(g,A.length-C);A.copy(b,N,C,C+M),g-=M}}return A.fill(0),{key:v,iv:b}}},12559:ne=>{"use strict";ne.exports=function r(d,l){if(d===l)return!0;if(d&&l&&"object"==typeof d&&"object"==typeof l){if(d.constructor!==l.constructor)return!1;var _,E,S;if(Array.isArray(d)){if((_=d.length)!=l.length)return!1;for(E=_;0!=E--;)if(!r(d[E],l[E]))return!1;return!0}if(d.constructor===RegExp)return d.source===l.source&&d.flags===l.flags;if(d.valueOf!==Object.prototype.valueOf)return d.valueOf()===l.valueOf();if(d.toString!==Object.prototype.toString)return d.toString()===l.toString();if((_=(S=Object.keys(d)).length)!==Object.keys(l).length)return!1;for(E=_;0!=E--;)if(!Object.prototype.hasOwnProperty.call(l,S[E]))return!1;for(E=_;0!=E--;){var a=S[E];if(!r(d[a],l[a]))return!1}return!0}return d!=d&&l!=l}},44770:ne=>{"use strict";ne.exports=function(r,d){for(var l={},_=Object.keys(r),E=Array.isArray(d),S=0;S<_.length;S++){var a=_[S],h=r[a];(E?-1!==d.indexOf(a):d(a,h,r))&&(l[a]=h)}return l}},9435:(ne,r,d)=>{"use strict";var l=d(64356),_=Object.prototype.toString,E=Object.prototype.hasOwnProperty,S=function(v,b,A){for(var O=0,C=v.length;O=3&&(O=A),"[object Array]"===_.call(v)?S(v,b,O):"string"==typeof v?a(v,b,O):h(v,b,O)}},64356:ne=>{"use strict";var l,_,r=Function.prototype.toString,d="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof d&&"function"==typeof Object.defineProperty)try{l=Object.defineProperty({},"length",{get:function(){throw _}}),_={},d(function(){throw 42},null,l)}catch(P){P!==_&&(d=null)}else d=null;var E=/^\s*class\b/,S=function(R){try{var L=r.call(R);return E.test(L)}catch{return!1}},a=function(R){try{return!S(R)&&(r.call(R),!0)}catch{return!1}},h=Object.prototype.toString,C="function"==typeof Symbol&&!!Symbol.toStringTag,T=!(0 in[,]),N=function(){return!1};if("object"==typeof document){var M=document.all;h.call(M)===h.call(document.all)&&(N=function(R){if((T||!R)&&(typeof R>"u"||"object"==typeof R))try{var L=h.call(R);return("[object HTMLAllCollection]"===L||"[object HTML document.all class]"===L||"[object HTMLCollection]"===L||"[object Object]"===L)&&null==R("")}catch{}return!1})}ne.exports=d?function(R){if(N(R))return!0;if(!R||"function"!=typeof R&&"object"!=typeof R)return!1;try{d(R,null,l)}catch(L){if(L!==_)return!1}return!S(R)&&a(R)}:function(R){if(N(R))return!0;if(!R||"function"!=typeof R&&"object"!=typeof R)return!1;if(C)return a(R);if(S(R))return!1;var L=h.call(R);return!("[object Function]"!==L&&"[object GeneratorFunction]"!==L&&!/^\[object HTML/.test(L))&&a(R)}},7480:ne=>{var r=Object.prototype.hasOwnProperty,d=Object.prototype.toString;ne.exports=function(_,E,S){if("[object Function]"!==d.call(E))throw new TypeError("iterator must be a function");var a=_.length;if(a===+a)for(var h=0;h{"use strict";var r="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,l=Object.prototype.toString,_="[object Function]";ne.exports=function(S){var a=this;if("function"!=typeof a||l.call(a)!==_)throw new TypeError(r+a);for(var g,h=d.call(arguments,1),v=Math.max(0,a.length-h.length),b=[],A=0;A{"use strict";var l=d(83457);ne.exports=Function.prototype.bind||l},2997:(ne,r,d)=>{var l=d(23874),_=d(14692),E=d(2313),S=new Buffer(0),a=function(){},h=function(v){return"function"==typeof v?v:function(b){b(null,v)}},g=function(v,b){var A=!1,O=!1;return v._read=function(){A=!0},v.destroy=function(){O=!0},b(function(C,T){if(C)return v.emit("error",C);var N=function(){for(var M;null!==(M=T.read());)A=!1,v.push(M)};if(T.on("readable",function(){A&&N()}),T.on("end",function(){N(),v.push(null)}),T.on("error",function(M){v.emit("error",M)}),T.on("close",function(){N(),process.nextTick(function(){v.emit("close")})}),v._read=function(){A=!0,N()},v.destroy=function(){O||(O=!0,T.destroy&&T.destroy())},O)return O=!1,void v.destroy();A&&N()}),v},y=function(v,b){var A=a,O=!1;return v._write=function(C,T,N){A=N},v.destroy=function(){O=!0},v.write(S),b(function(C,T){if(C)return v.emit("error",C);T.on("close",function(){v.emit("close")}),T.on("error",function(M){v.emit("error",M)}),v._write=function(M,P,R){if(M===S)return R();T.write(M,P,R)};var N=v.emit;if(T.on("finish",function(){N.call(v,"finish")}),v.destroy=function(){O||(O=!0,T.destroy&&T.destroy())},v.emit=function(M){if("finish"!==M)return N.apply(v,arguments);T.end()},O)return O=!1,void v.destroy();A()}),v};r.readable=function(v,b){return 1===arguments.length?r.readable(null,v):(v||(v={}),g(new _(v),h(b)))},r.writable=function(v,b){return 1===arguments.length?r.writable(null,v):(v||(v={}),y(new l(v),h(b)))},r.duplex=function(v,b,A){if(2===arguments.length)return r.duplex(null,v,b);v||(v={});var O=new E(v);return y(O,h(b)),g(O,h(A)),O}},2313:(ne,r,d)=>{ne.exports=d(52652)},52652:(ne,r,d)=>{ne.exports=a;var l=Object.keys||function(y){var v=[];for(var b in y)v.push(b);return v},_=d(26156);_.inherits=d(83894);var E=d(15890),S=d(19859);function a(y){if(!(this instanceof a))return new a(y);E.call(this,y),S.call(this,y),y&&!1===y.readable&&(this.readable=!1),y&&!1===y.writable&&(this.writable=!1),this.allowHalfOpen=!0,y&&!1===y.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}_.inherits(a,E),function g(y,v){for(var b=0,A=y.length;b{ne.exports=E;var l=d(59735),_=d(26156);function E(S){if(!(this instanceof E))return new E(S);l.call(this,S)}_.inherits=d(83894),_.inherits(E,l),E.prototype._transform=function(S,a,h){h(null,S)}},15890:(ne,r,d)=>{ne.exports=y;var l=d(66425),_=d(93172).Buffer;y.ReadableState=g;var E=d(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(o,u){return o.listeners(u).length});var h,S=d(295),a=d(26156);function g(o,u){var m=(o=o||{}).highWaterMark;this.highWaterMark=m||0===m?m:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(h||(h=d(15453).s),this.decoder=new h(o.encoding),this.encoding=o.encoding)}function y(o){if(!(this instanceof y))return new y(o);this._readableState=new g(o,this),this.readable=!0,S.call(this)}function v(o,u,m,w,x){var F=function T(o,u){var m=null;return!_.isBuffer(u)&&"string"!=typeof u&&null!=u&&!o.objectMode&&(m=new TypeError("Invalid non-string/buffer chunk")),m}(u,m);if(F)o.emit("error",F);else if(null==m)u.reading=!1,u.ended||function N(o,u){if(u.decoder&&!u.ended){var m=u.decoder.end();m&&m.length&&(u.buffer.push(m),u.length+=u.objectMode?1:m.length)}u.ended=!0,u.length>0?M(o):W(o)}(o,u);else if(u.objectMode||m&&m.length>0)if(u.ended&&!x){var G=new Error("stream.push() after EOF");o.emit("error",G)}else if(u.endEmitted&&x){G=new Error("stream.unshift() after end event");o.emit("error",G)}else u.decoder&&!x&&!w&&(m=u.decoder.write(m)),u.length+=u.objectMode?1:m.length,x?u.buffer.unshift(m):(u.reading=!1,u.buffer.push(m)),u.needReadable&&M(o),function R(o,u){u.readingMore||(u.readingMore=!0,process.nextTick(function(){!function L(o,u){for(var m=u.length;!u.reading&&!u.flowing&&!u.ended&&u.lengthu.highWaterMark&&(u.highWaterMark=function O(o){if(o>=A)o=A;else{o--;for(var u=1;u<32;u<<=1)o|=o>>u;o++}return o}(o)),o>u.length?u.ended?u.length:(u.needReadable=!0,0):o)}function M(o){var u=o._readableState;u.needReadable=!1,!u.emittedReadable&&(u.emittedReadable=!0,u.sync?process.nextTick(function(){P(o)}):P(o))}function P(o){o.emit("readable")}function V(o){var m,u=o._readableState;function w(x,F,G){!1===x.write(m)&&u.awaitDrain++}for(u.awaitDrain=0;u.pipesCount&&null!==(m=o.read());)if(1===u.pipesCount?w(u.pipes):Q(u.pipes,w),o.emit("data",m),u.awaitDrain>0)return;if(0===u.pipesCount)return u.flowing=!1,void(E.listenerCount(o,"data")>0&&Y(o));u.ranOut=!0}function J(){this._readableState.ranOut&&(this._readableState.ranOut=!1,V(this))}function Y(o,u){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var w=u||!1,x=!1;o.readable=!0,o.pipe=S.prototype.pipe,o.on=o.addListener=S.prototype.on,o.on("readable",function(){x=!0;for(var F;!w&&null!==(F=o.read());)o.emit("data",F);null===F&&(x=!1,o._readableState.needReadable=!0)}),o.pause=function(){w=!0,this.emit("pause")},o.resume=function(){w=!1,x?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function Z(o,u){var G,m=u.buffer,w=u.length,x=!!u.decoder,F=!!u.objectMode;if(0===m.length)return null;if(0===w)G=null;else if(F)G=m.shift();else if(!o||o>=w)G=x?m.join(""):_.concat(m,w),m.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!u.endEmitted&&u.calledRead&&(u.ended=!0,process.nextTick(function(){!u.endEmitted&&0===u.length&&(u.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function Q(o,u){for(var m=0,w=o.length;m0)&&(u.emittedReadable=!1),0===o&&u.needReadable&&(u.length>=u.highWaterMark||u.ended))return M(this),null;if(0===(o=C(o,u))&&u.ended)return w=null,u.length>0&&u.decoder&&(w=Z(o,u),u.length-=w.length),0===u.length&&W(this),w;var x=u.needReadable;return u.length-o<=u.highWaterMark&&(x=!0),(u.ended||u.reading)&&(x=!1),x&&(u.reading=!0,u.sync=!0,0===u.length&&(u.needReadable=!0),this._read(u.highWaterMark),u.sync=!1),x&&!u.reading&&(o=C(m,u)),null===(w=o>0?Z(o,u):null)&&(u.needReadable=!0,o=0),u.length-=o,0===u.length&&!u.ended&&(u.needReadable=!0),u.ended&&!u.endEmitted&&0===u.length&&W(this),w},y.prototype._read=function(o){this.emit("error",new Error("not implemented"))},y.prototype.pipe=function(o,u){var m=this,w=this._readableState;switch(w.pipesCount){case 0:w.pipes=o;break;case 1:w.pipes=[w.pipes,o];break;default:w.pipes.push(o)}w.pipesCount+=1;var F=(!u||!1!==u.end)&&o!==process.stdout&&o!==process.stderr?k:B;function G(we){we===m&&B()}function k(){o.end()}w.endEmitted?process.nextTick(F):m.once("end",F),o.on("unpipe",G);var p=function H(o){return function(){var m=o._readableState;m.awaitDrain--,0===m.awaitDrain&&V(o)}}(m);function B(){o.removeListener("close",te),o.removeListener("finish",ee),o.removeListener("drain",p),o.removeListener("error",ie),o.removeListener("unpipe",G),m.removeListener("end",k),m.removeListener("end",B),(!o._writableState||o._writableState.needDrain)&&p()}function ie(we){ue(),o.removeListener("error",ie),0===E.listenerCount(o,"error")&&o.emit("error",we)}function te(){o.removeListener("finish",ee),ue()}function ee(){o.removeListener("close",te),ue()}function ue(){m.unpipe(o)}return o.on("drain",p),o._events&&o._events.error?l(o._events.error)?o._events.error.unshift(ie):o._events.error=[ie,o._events.error]:o.on("error",ie),o.once("close",te),o.once("finish",ee),o.emit("pipe",m),w.flowing||(this.on("readable",J),w.flowing=!0,process.nextTick(function(){V(m)})),o},y.prototype.unpipe=function(o){var u=this._readableState;if(0===u.pipesCount)return this;if(1===u.pipesCount)return o&&o!==u.pipes||(o||(o=u.pipes),u.pipes=null,u.pipesCount=0,this.removeListener("readable",J),u.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var m=u.pipes,w=u.pipesCount;u.pipes=null,u.pipesCount=0,this.removeListener("readable",J),u.flowing=!1;for(var x=0;x"u"&&(this[x]=function(G){return function(){return o[G].apply(o,arguments)}}(x));return Q(["error","close","destroy","pause","resume"],function(G){o.on(G,w.emit.bind(w,G))}),w._read=function(G){m&&(m=!1,o.resume())},w},y._fromList=Z},59735:(ne,r,d)=>{ne.exports=a;var l=d(52652),_=d(26156);function E(g,y){this.afterTransform=function(v,b){return function S(g,y,v){var b=g._transformState;b.transforming=!1;var A=b.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));b.writechunk=null,b.writecb=null,null!=v&&g.push(v),A&&A(y);var O=g._readableState;O.reading=!1,(O.needReadable||O.length{ne.exports=h;var l=d(93172).Buffer;h.WritableState=a;var _=d(26156);_.inherits=d(83894);var E=d(295);function S(V,J,Y){this.chunk=V,this.encoding=J,this.callback=Y}function a(V,J){var Y=(V=V||{}).highWaterMark;this.highWaterMark=Y||0===Y?Y:16384,this.objectMode=!!V.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var Z=!1===V.decodeStrings;this.decodeStrings=!Z,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){!function T(V,J){var Y=V._writableState,Z=Y.sync,W=Y.writecb;if(function C(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}(Y),J)!function O(V,J,Y,Z,W){Y?process.nextTick(function(){W(Z)}):W(Z),V._writableState.errorEmitted=!0,V.emit("error",Z)}(V,0,Z,J,W);else{var Q=R(V,Y);!Q&&!Y.bufferProcessing&&Y.buffer.length&&function P(V,J){J.bufferProcessing=!0;for(var Y=0;Y{var l=d(295);(r=ne.exports=d(15890)).Stream=l,r.Readable=r,r.Writable=d(19859),r.Duplex=d(52652),r.Transform=d(59735),r.PassThrough=d(72936),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=d(295))},23874:(ne,r,d)=>{ne.exports=d(19859)},95203:(ne,r,d)=>{"use strict";var l,_=SyntaxError,E=Function,S=TypeError,a=function(u){try{return E('"use strict"; return ('+u+").constructor;")()}catch{}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch{h=null}var g=function(){throw new S},y=h?function(){try{return arguments.callee,g}catch{try{return h(arguments,"callee").get}catch{return g}}}():g,v=d(92969)(),b=d(49757)(),A=Object.getPrototypeOf||(b?function(u){return u.__proto__}:null),O={},C=typeof Uint8Array>"u"||!A?l:A(Uint8Array),T={"%AggregateError%":typeof AggregateError>"u"?l:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?l:ArrayBuffer,"%ArrayIteratorPrototype%":v&&A?A([][Symbol.iterator]()):l,"%AsyncFromSyncIteratorPrototype%":l,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%Atomics%":typeof Atomics>"u"?l:Atomics,"%BigInt%":typeof BigInt>"u"?l:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?l:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?l:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?l:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?l:Float32Array,"%Float64Array%":typeof Float64Array>"u"?l:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?l:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":O,"%Int8Array%":typeof Int8Array>"u"?l:Int8Array,"%Int16Array%":typeof Int16Array>"u"?l:Int16Array,"%Int32Array%":typeof Int32Array>"u"?l:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&A?A(A([][Symbol.iterator]())):l,"%JSON%":"object"==typeof JSON?JSON:l,"%Map%":typeof Map>"u"?l:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v||!A?l:A((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?l:Promise,"%Proxy%":typeof Proxy>"u"?l:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?l:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?l:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v||!A?l:A((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?l:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&A?A(""[Symbol.iterator]()):l,"%Symbol%":v?Symbol:l,"%SyntaxError%":_,"%ThrowTypeError%":y,"%TypedArray%":C,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?l:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?l:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?l:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?l:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?l:WeakMap,"%WeakRef%":typeof WeakRef>"u"?l:WeakRef,"%WeakSet%":typeof WeakSet>"u"?l:WeakSet};if(A)try{null.error}catch(u){var N=A(A(u));T["%Error.prototype%"]=N}var M=function u(m){var w;if("%AsyncFunction%"===m)w=a("async function () {}");else if("%GeneratorFunction%"===m)w=a("function* () {}");else if("%AsyncGeneratorFunction%"===m)w=a("async function* () {}");else if("%AsyncGenerator%"===m){var x=u("%AsyncGeneratorFunction%");x&&(w=x.prototype)}else if("%AsyncIteratorPrototype%"===m){var F=u("%AsyncGenerator%");F&&A&&(w=A(F.prototype))}return T[m]=w,w},P={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=d(84444),L=d(93164),H=R.call(Function.call,Array.prototype.concat),V=R.call(Function.apply,Array.prototype.splice),J=R.call(Function.call,String.prototype.replace),Y=R.call(Function.call,String.prototype.slice),Z=R.call(Function.call,RegExp.prototype.exec),W=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,D=function(m){var w=Y(m,0,1),x=Y(m,-1);if("%"===w&&"%"!==x)throw new _("invalid intrinsic syntax, expected closing `%`");if("%"===x&&"%"!==w)throw new _("invalid intrinsic syntax, expected opening `%`");var F=[];return J(m,W,function(G,k,p,B){F[F.length]=p?J(B,Q,"$1"):k||G}),F},o=function(m,w){var F,x=m;if(L(P,x)&&(x="%"+(F=P[x])[0]+"%"),L(T,x)){var G=T[x];if(G===O&&(G=M(x)),typeof G>"u"&&!w)throw new S("intrinsic "+m+" exists, but is not available. Please file an issue!");return{alias:F,name:x,value:G}}throw new _("intrinsic "+m+" does not exist!")};ne.exports=function(m,w){if("string"!=typeof m||0===m.length)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof w)throw new S('"allowMissing" argument must be a boolean');if(null===Z(/^%?[^%]*%?$/,m))throw new _("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var x=D(m),F=x.length>0?x[0]:"",G=o("%"+F+"%",w),k=G.name,p=G.value,B=!1,ie=G.alias;ie&&(F=ie[0],V(x,H([0,1],ie)));for(var te=1,ee=!0;te=x.length){var ve=h(p,ue);p=(ee=!!ve)&&"get"in ve&&!("originalValue"in ve.get)?ve.get:p[ue]}else ee=L(p,ue),p=p[ue];ee&&!B&&(T[k]=p)}}return p}},47378:(ne,r,d)=>{"use strict";var _=d(95203)("%Object.getOwnPropertyDescriptor%",!0);if(_)try{_([],"length")}catch{_=null}ne.exports=_},49757:ne=>{"use strict";var r={foo:{}},d=Object;ne.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof d)}},92969:(ne,r,d)=>{"use strict";var l=typeof Symbol<"u"&&Symbol,_=d(81983);ne.exports=function(){return"function"==typeof l&&"function"==typeof Symbol&&"symbol"==typeof l("foo")&&"symbol"==typeof Symbol("bar")&&_()}},81983:ne=>{"use strict";ne.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var d={},l=Symbol("test"),_=Object(l);if("string"==typeof l||"[object Symbol]"!==Object.prototype.toString.call(l)||"[object Symbol]"!==Object.prototype.toString.call(_))return!1;for(l in d[l]=42,d)return!1;if("function"==typeof Object.keys&&0!==Object.keys(d).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(d).length)return!1;var S=Object.getOwnPropertySymbols(d);if(1!==S.length||S[0]!==l||!Object.prototype.propertyIsEnumerable.call(d,l))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(d,l);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},46259:(ne,r,d)=>{"use strict";var l=d(81983);ne.exports=function(){return l()&&!!Symbol.toStringTag}},93164:(ne,r,d)=>{"use strict";var l=d(84444);ne.exports=l.call(Function.call,Object.prototype.hasOwnProperty)},39650:(ne,r,d)=>{"use strict";var l=d(73502).Buffer,_=d(65685).Transform;function a(h){_.call(this),this._block=l.allocUnsafe(h),this._blockSize=h,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}d(83894)(a,_),a.prototype._transform=function(h,g,y){var v=null;try{this.update(h,g)}catch(b){v=b}y(v)},a.prototype._flush=function(h){var g=null;try{this.push(this.digest())}catch(y){g=y}h(g)},a.prototype.update=function(h,g){if(function S(h,g){if(!l.isBuffer(h)&&"string"!=typeof h)throw new TypeError(g+" must be a string or a buffer")}(h,"Data"),this._finalized)throw new Error("Digest already called");l.isBuffer(h)||(h=l.from(h,g));for(var y=this._block,v=0;this._blockOffset+h.length-v>=this._blockSize;){for(var b=this._blockOffset;b0;++A)this._length[A]+=O,(O=this._length[A]/4294967296|0)>0&&(this._length[A]-=4294967296*O);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(h){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var g=this._digest();void 0!==h&&(g=g.toString(h)),this._block.fill(0),this._blockOffset=0;for(var y=0;y<4;++y)this._length[y]=0;return g},a.prototype._digest=function(){throw new Error("_digest is not implemented")},ne.exports=a},37084:(ne,r,d)=>{var l=r;l.utils=d(29299),l.common=d(33800),l.sha=d(54962),l.ripemd=d(99458),l.hmac=d(12194),l.sha1=l.sha.sha1,l.sha256=l.sha.sha256,l.sha224=l.sha.sha224,l.sha384=l.sha.sha384,l.sha512=l.sha.sha512,l.ripemd160=l.ripemd.ripemd160},33800:(ne,r,d)=>{"use strict";var l=d(29299),_=d(32391);function E(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=E,E.prototype.update=function(a,h){if(a=l.toArray(a,h),this.pending?this.pending=this.pending.concat(a):this.pending=a,this.pendingTotal+=a.length,this.pending.length>=this._delta8){var g=(a=this.pending).length%this._delta8;this.pending=a.slice(a.length-g,a.length),0===this.pending.length&&(this.pending=null),a=l.join32(a,0,a.length-g,this.endian);for(var y=0;y>>24&255,y[v++]=a>>>16&255,y[v++]=a>>>8&255,y[v++]=255&a}else for(y[v++]=255&a,y[v++]=a>>>8&255,y[v++]=a>>>16&255,y[v++]=a>>>24&255,y[v++]=0,y[v++]=0,y[v++]=0,y[v++]=0,b=8;b{"use strict";var l=d(29299),_=d(32391);function E(S,a,h){if(!(this instanceof E))return new E(S,a,h);this.Hash=S,this.blockSize=S.blockSize/8,this.outSize=S.outSize/8,this.inner=null,this.outer=null,this._init(l.toArray(a,h))}ne.exports=E,E.prototype._init=function(a){a.length>this.blockSize&&(a=(new this.Hash).update(a).digest()),_(a.length<=this.blockSize);for(var h=a.length;h{"use strict";var l=d(29299),_=d(33800),E=l.rotl32,S=l.sum32,a=l.sum32_3,h=l.sum32_4,g=_.BlockHash;function y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function v(M,P,R,L){return M<=15?P^R^L:M<=31?P&R|~P&L:M<=47?(P|~R)^L:M<=63?P&L|R&~L:P^(R|~L)}function A(M){return M<=15?1352829926:M<=31?1548603684:M<=47?1836072691:M<=63?2053994217:0}l.inherits(y,g),r.ripemd160=y,y.blockSize=512,y.outSize=160,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(P,R){for(var L=this.h[0],H=this.h[1],V=this.h[2],J=this.h[3],Y=this.h[4],Z=L,W=H,Q=V,D=J,o=Y,u=0;u<80;u++){var m=S(E(h(L,v(u,H,V,J),P[O[u]+R],(M=u)<=15?0:M<=31?1518500249:M<=47?1859775393:M<=63?2400959708:2840853838),T[u]),Y);L=Y,Y=J,J=E(V,10),V=H,H=m,m=S(E(h(Z,v(79-u,W,Q,D),P[C[u]+R],A(u)),N[u]),o),Z=o,o=D,D=E(Q,10),Q=W,W=m}var M;m=a(this.h[1],V,D),this.h[1]=a(this.h[2],J,o),this.h[2]=a(this.h[3],Y,Z),this.h[3]=a(this.h[4],L,W),this.h[4]=a(this.h[0],H,Q),this.h[0]=m},y.prototype._digest=function(P){return"hex"===P?l.toHex32(this.h,"little"):l.split32(this.h,"little")};var O=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],C=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],T=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],N=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},54962:(ne,r,d)=>{"use strict";r.sha1=d(59007),r.sha224=d(10055),r.sha256=d(19342),r.sha384=d(88634),r.sha512=d(70039)},59007:(ne,r,d)=>{"use strict";var l=d(29299),_=d(33800),E=d(33113),S=l.rotl32,a=l.sum32,h=l.sum32_5,g=E.ft_1,y=_.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}l.inherits(b,y),ne.exports=b,b.blockSize=512,b.outSize=160,b.hmacStrength=80,b.padLength=64,b.prototype._update=function(O,C){for(var T=this.W,N=0;N<16;N++)T[N]=O[C+N];for(;N{"use strict";var l=d(29299),_=d(19342);function E(){if(!(this instanceof E))return new E;_.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}l.inherits(E,_),ne.exports=E,E.blockSize=512,E.outSize=224,E.hmacStrength=192,E.padLength=64,E.prototype._digest=function(a){return"hex"===a?l.toHex32(this.h.slice(0,7),"big"):l.split32(this.h.slice(0,7),"big")}},19342:(ne,r,d)=>{"use strict";var l=d(29299),_=d(33800),E=d(33113),S=d(32391),a=l.sum32,h=l.sum32_4,g=l.sum32_5,y=E.ch32,v=E.maj32,b=E.s0_256,A=E.s1_256,O=E.g0_256,C=E.g1_256,T=_.BlockHash,N=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function M(){if(!(this instanceof M))return new M;T.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=N,this.W=new Array(64)}l.inherits(M,T),ne.exports=M,M.blockSize=512,M.outSize=256,M.hmacStrength=192,M.padLength=64,M.prototype._update=function(R,L){for(var H=this.W,V=0;V<16;V++)H[V]=R[L+V];for(;V{"use strict";var l=d(29299),_=d(70039);function E(){if(!(this instanceof E))return new E;_.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}l.inherits(E,_),ne.exports=E,E.blockSize=1024,E.outSize=384,E.hmacStrength=192,E.padLength=128,E.prototype._digest=function(a){return"hex"===a?l.toHex32(this.h.slice(0,12),"big"):l.split32(this.h.slice(0,12),"big")}},70039:(ne,r,d)=>{"use strict";var l=d(29299),_=d(33800),E=d(32391),S=l.rotr64_hi,a=l.rotr64_lo,h=l.shr64_hi,g=l.shr64_lo,y=l.sum64,v=l.sum64_hi,b=l.sum64_lo,A=l.sum64_4_hi,O=l.sum64_4_lo,C=l.sum64_5_hi,T=l.sum64_5_lo,N=_.BlockHash,M=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function P(){if(!(this instanceof P))return new P;N.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=M,this.W=new Array(160)}function R(m,w,x,F,G){var k=m&x^~m&G;return k<0&&(k+=4294967296),k}function L(m,w,x,F,G,k){var p=w&F^~w&k;return p<0&&(p+=4294967296),p}function H(m,w,x,F,G){var k=m&x^m&G^x&G;return k<0&&(k+=4294967296),k}function V(m,w,x,F,G,k){var p=w&F^w&k^F&k;return p<0&&(p+=4294967296),p}function J(m,w){var k=S(m,w,28)^S(w,m,2)^S(w,m,7);return k<0&&(k+=4294967296),k}function Y(m,w){var k=a(m,w,28)^a(w,m,2)^a(w,m,7);return k<0&&(k+=4294967296),k}function Z(m,w){var k=S(m,w,14)^S(m,w,18)^S(w,m,9);return k<0&&(k+=4294967296),k}function W(m,w){var k=a(m,w,14)^a(m,w,18)^a(w,m,9);return k<0&&(k+=4294967296),k}function Q(m,w){var k=S(m,w,1)^S(m,w,8)^h(m,w,7);return k<0&&(k+=4294967296),k}function D(m,w){var k=a(m,w,1)^a(m,w,8)^g(m,w,7);return k<0&&(k+=4294967296),k}function o(m,w){var k=S(m,w,19)^S(w,m,29)^h(m,w,6);return k<0&&(k+=4294967296),k}function u(m,w){var k=a(m,w,19)^a(w,m,29)^g(m,w,6);return k<0&&(k+=4294967296),k}l.inherits(P,N),ne.exports=P,P.blockSize=1024,P.outSize=512,P.hmacStrength=192,P.padLength=128,P.prototype._prepareBlock=function(w,x){for(var F=this.W,G=0;G<32;G++)F[G]=w[x+G];for(;G{"use strict";var _=d(29299).rotr32;function S(A,O,C){return A&O^~A&C}function a(A,O,C){return A&O^A&C^O&C}function h(A,O,C){return A^O^C}r.ft_1=function E(A,O,C,T){return 0===A?S(O,C,T):1===A||3===A?h(O,C,T):2===A?a(O,C,T):void 0},r.ch32=S,r.maj32=a,r.p32=h,r.s0_256=function g(A){return _(A,2)^_(A,13)^_(A,22)},r.s1_256=function y(A){return _(A,6)^_(A,11)^_(A,25)},r.g0_256=function v(A){return _(A,7)^_(A,18)^A>>>3},r.g1_256=function b(A){return _(A,17)^_(A,19)^A>>>10}},29299:(ne,r,d)=>{"use strict";var l=d(32391),_=d(83894);function E(u,m){return!(55296!=(64512&u.charCodeAt(m))||m<0||m+1>=u.length)&&56320==(64512&u.charCodeAt(m+1))}function h(u){return(u>>>24|u>>>8&65280|u<<8&16711680|(255&u)<<24)>>>0}function y(u){return 1===u.length?"0"+u:u}function v(u){return 7===u.length?"0"+u:6===u.length?"00"+u:5===u.length?"000"+u:4===u.length?"0000"+u:3===u.length?"00000"+u:2===u.length?"000000"+u:1===u.length?"0000000"+u:u}r.inherits=_,r.toArray=function S(u,m){if(Array.isArray(u))return u.slice();if(!u)return[];var w=[];if("string"==typeof u)if(m){if("hex"===m)for((u=u.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(u="0"+u),F=0;F>6|192,w[x++]=63&G|128):E(u,F)?(G=65536+((1023&G)<<10)+(1023&u.charCodeAt(++F)),w[x++]=G>>18|240,w[x++]=G>>12&63|128,w[x++]=G>>6&63|128,w[x++]=63&G|128):(w[x++]=G>>12|224,w[x++]=G>>6&63|128,w[x++]=63&G|128)}else for(F=0;F>>0}return G},r.split32=function A(u,m){for(var w=new Array(4*u.length),x=0,F=0;x>>24,w[F+1]=G>>>16&255,w[F+2]=G>>>8&255,w[F+3]=255&G):(w[F+3]=G>>>24,w[F+2]=G>>>16&255,w[F+1]=G>>>8&255,w[F]=255&G)}return w},r.rotr32=function O(u,m){return u>>>m|u<<32-m},r.rotl32=function C(u,m){return u<>>32-m},r.sum32=function T(u,m){return u+m>>>0},r.sum32_3=function N(u,m,w){return u+m+w>>>0},r.sum32_4=function M(u,m,w,x){return u+m+w+x>>>0},r.sum32_5=function P(u,m,w,x,F){return u+m+w+x+F>>>0},r.sum64=function R(u,m,w,x){var F=u[m],k=x+u[m+1]>>>0,p=(k>>0,u[m+1]=k},r.sum64_hi=function L(u,m,w,x){return(m+x>>>0>>0},r.sum64_lo=function H(u,m,w,x){return m+x>>>0},r.sum64_4_hi=function V(u,m,w,x,F,G,k,p){var B=0,ie=m;return B+=(ie=ie+x>>>0)>>0)>>0)>>0},r.sum64_4_lo=function J(u,m,w,x,F,G,k,p){return m+x+G+p>>>0},r.sum64_5_hi=function Y(u,m,w,x,F,G,k,p,B,ie){var te=0,ee=m;return te+=(ee=ee+x>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function Z(u,m,w,x,F,G,k,p,B,ie){return m+x+G+p+ie>>>0},r.rotr64_hi=function W(u,m,w){return(m<<32-w|u>>>w)>>>0},r.rotr64_lo=function Q(u,m,w){return(u<<32-w|m>>>w)>>>0},r.shr64_hi=function D(u,m,w){return u>>>w},r.shr64_lo=function o(u,m,w){return(u<<32-w|m>>>w)>>>0}},52438:(ne,r,d)=>{"use strict";var l=d(37084),_=d(58195),E=d(32391);function S(a){if(!(this instanceof S))return new S(a);this.hash=a.hash,this.predResist=!!a.predResist,this.outLen=this.hash.outSize,this.minEntropy=a.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var h=_.toArray(a.entropy,a.entropyEnc||"hex"),g=_.toArray(a.nonce,a.nonceEnc||"hex"),y=_.toArray(a.pers,a.persEnc||"hex");E(h.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(h,g,y)}ne.exports=S,S.prototype._init=function(h,g,y){var v=h.concat(g).concat(y);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var b=0;b=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(h.concat(y||[])),this._reseed=1},S.prototype.generate=function(h,g,y,v){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof g&&(v=y,y=g,g=null),y&&(y=_.toArray(y,v||"hex"),this._update(y));for(var b=[];b.length{var l=d(74216),_=d(68762),E=ne.exports;for(var S in l)l.hasOwnProperty(S)&&(E[S]=l[S]);function a(h){if("string"==typeof h&&(h=_.parse(h)),h.protocol||(h.protocol="https:"),"https:"!==h.protocol)throw new Error('Protocol "'+h.protocol+'" not supported. Expected "https:"');return h}E.request=function(h,g){return h=a(h),l.request.call(this,h,g)},E.get=function(h,g){return h=a(h),l.get.call(this,h,g)}},17294:function(ne,r,d){var l,_;!function(E,S,a){"use strict";l=function(){var E=function(A){throw A},S=function(){},a={storeName:"Store",storePrefix:"IDBWrapper-",dbVersion:1,keyPath:"id",autoIncrement:!0,onStoreReady:function(){},onError:E,indexes:[],implementationPreference:["indexedDB","webkitIndexedDB","mozIndexedDB","shimIndexedDB"]},h=function(A,O){for(var C in typeof O>"u"&&"function"==typeof A&&(O=A),"[object Object]"!=Object.prototype.toString.call(A)&&(A={}),a)this[C]=typeof A[C]<"u"?A[C]:a[C];this.dbName=this.storePrefix+this.storeName,this.dbVersion=parseInt(this.dbVersion,10)||1,O&&(this.onStoreReady=O);var T="object"==typeof window?window:self,N=this.implementationPreference.filter(function(M){return M in T});this.implementation=N[0],this.idb=T[this.implementation],this.keyRange=T.IDBKeyRange||T.webkitIDBKeyRange||T.mozIDBKeyRange,this.consts={READ_ONLY:"readonly",READ_WRITE:"readwrite",VERSION_CHANGE:"versionchange",NEXT:"next",NEXT_NO_DUPLICATE:"nextunique",PREV:"prev",PREV_NO_DUPLICATE:"prevunique"},this.openDB()},g={constructor:h,version:"1.7.2",db:null,dbName:null,dbVersion:null,store:null,storeName:null,storePrefix:null,keyPath:null,autoIncrement:null,indexes:null,implementationPreference:null,implementation:"",onStoreReady:null,onError:null,_insertIdCount:0,openDB:function(){var A=this.idb.open(this.dbName,this.dbVersion),O=!1;A.onerror=function(C){if(b(C))this.onError(new Error("The version number provided is lower than the existing one."));else{var T;if(C.target.error)T=C.target.error;else{var N="IndexedDB unknown error occurred when opening DB "+this.dbName+" version "+this.dbVersion;"errorCode"in C.target&&(N+=" with error code "+C.target.errorCode),T=new Error(N)}this.onError(T)}}.bind(this),A.onsuccess=function(C){if(!O){if(this.db)return void this.onStoreReady();if(this.db=C.target.result,"string"==typeof this.db.version)return void this.onError(new Error("The IndexedDB implementation in this browser is outdated. Please upgrade your browser."));if(!this.db.objectStoreNames.contains(this.storeName))return void this.onError(new Error("Object store couldn't be created."));var T=this.db.transaction([this.storeName],this.consts.READ_ONLY);this.store=T.objectStore(this.storeName);var N=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(M){var P=M.name;if(!P)return O=!0,void this.onError(new Error("Cannot create index: No index name given."));if(this.normalizeIndexData(M),this.hasIndex(P)){var R=this.store.index(P);this.indexComplies(R,M)||(O=!0,this.onError(new Error('Cannot modify index "'+P+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),N.splice(N.indexOf(P),1)}else O=!0,this.onError(new Error('Cannot create new index "'+P+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))},this),N.length&&(O=!0,this.onError(new Error('Cannot delete index(es) "'+N.toString()+'" for current version. Please bump version number to '+(this.dbVersion+1)+"."))),O||this.onStoreReady()}}.bind(this),A.onupgradeneeded=function(C){if(this.db=C.target.result,this.db.objectStoreNames.contains(this.storeName))this.store=C.target.transaction.objectStore(this.storeName);else{var T={autoIncrement:this.autoIncrement};null!==this.keyPath&&(T.keyPath=this.keyPath),this.store=this.db.createObjectStore(this.storeName,T)}var N=Array.prototype.slice.call(this.getIndexList());this.indexes.forEach(function(M){var P=M.name;if(P||(O=!0,this.onError(new Error("Cannot create index: No index name given."))),this.normalizeIndexData(M),this.hasIndex(P)){var R=this.store.index(P);this.indexComplies(R,M)||(this.store.deleteIndex(P),this.store.createIndex(P,M.keyPath,{unique:M.unique,multiEntry:M.multiEntry})),N.splice(N.indexOf(P),1)}else this.store.createIndex(P,M.keyPath,{unique:M.unique,multiEntry:M.multiEntry})},this),N.length&&N.forEach(function(M){this.store.deleteIndex(M)},this)}.bind(this)},deleteDatabase:function(A,O){if(this.idb.deleteDatabase){this.db.close();var C=this.idb.deleteDatabase(this.dbName);C.onsuccess=A,C.onerror=O}else O(new Error("Browser does not support IndexedDB deleteDatabase!"))},put:function(A,O,C,T){null!==this.keyPath&&(T=C,C=O,O=A),T||(T=E),C||(C=S);var P,N=!1,M=null,R=this.db.transaction([this.storeName],this.consts.READ_WRITE);return R.oncomplete=function(){(N?C:T)(M)},R.onabort=T,R.onerror=T,null!==this.keyPath?(this._addIdPropertyIfNeeded(O),P=R.objectStore(this.storeName).put(O)):P=R.objectStore(this.storeName).put(O,A),P.onsuccess=function(L){N=!0,M=L.target.result},P.onerror=T,R},get:function(A,O,C){C||(C=E),O||(O=S);var T=!1,N=null,M=this.db.transaction([this.storeName],this.consts.READ_ONLY);M.oncomplete=function(){(T?O:C)(N)},M.onabort=C,M.onerror=C;var P=M.objectStore(this.storeName).get(A);return P.onsuccess=function(R){T=!0,N=R.target.result},P.onerror=C,M},remove:function(A,O,C){C||(C=E),O||(O=S);var T=!1,N=null,M=this.db.transaction([this.storeName],this.consts.READ_WRITE);M.oncomplete=function(){(T?O:C)(N)},M.onabort=C,M.onerror=C;var P=M.objectStore(this.storeName).delete(A);return P.onsuccess=function(R){T=!0,N=R.target.result},P.onerror=C,M},batch:function(A,O,C){if(C||(C=E),O||(O=S),"[object Array]"!=Object.prototype.toString.call(A))C(new Error("dataArray argument must be of type Array."));else if(0===A.length)return O(!0);var T=A.length,N=!1,M=!1,P=this.db.transaction([this.storeName],this.consts.READ_WRITE);P.oncomplete=function(){(M?O:C)(M)},P.onabort=C,P.onerror=C;var R=function(){0===--T&&!N&&(N=!0,M=!0)};return A.forEach(function(L){var H=L.type,V=L.key,J=L.value,Y=function(Q){P.abort(),N||(N=!0,C(Q,H,V))};if("remove"==H){var Z=P.objectStore(this.storeName).delete(V);Z.onsuccess=R,Z.onerror=Y}else if("put"==H){var W;null!==this.keyPath?(this._addIdPropertyIfNeeded(J),W=P.objectStore(this.storeName).put(J)):W=P.objectStore(this.storeName).put(J,V),W.onsuccess=R,W.onerror=Y}},this),P},putBatch:function(A,O,C){var T=A.map(function(N){return{type:"put",value:N}});return this.batch(T,O,C)},upsertBatch:function(A,O,C,T){"function"==typeof O&&(T=C=O,O={}),T||(T=E),C||(C=S),O||(O={}),"[object Array]"!=Object.prototype.toString.call(A)&&T(new Error("dataArray argument must be of type Array."));var N=O.keyField||this.keyPath,M=A.length,P=!1,R=!1,L=0,H=this.db.transaction([this.storeName],this.consts.READ_WRITE);H.oncomplete=function(){R?C(A):T(!1)},H.onabort=T,H.onerror=T;var V=function(J){A[L++][N]=J.target.result,0===--M&&!P&&(P=!0,R=!0)};return A.forEach(function(J){var W,Y=J.key,Z=function(Q){H.abort(),P||(P=!0,T(Q))};null!==this.keyPath?(this._addIdPropertyIfNeeded(J),W=H.objectStore(this.storeName).put(J)):W=H.objectStore(this.storeName).put(J,Y),W.onsuccess=V,W.onerror=Z},this),H},removeBatch:function(A,O,C){var T=A.map(function(N){return{type:"remove",key:N}});return this.batch(T,O,C)},getBatch:function(A,O,C,T){if(C||(C=E),O||(O=S),T||(T="sparse"),"[object Array]"!=Object.prototype.toString.call(A))C(new Error("keyArray argument must be of type Array."));else if(0===A.length)return O([]);var N=[],M=A.length,R=!1,L=null,H=this.db.transaction([this.storeName],this.consts.READ_ONLY);H.oncomplete=function(){(R?O:C)(L)},H.onabort=C,H.onerror=C;var V=function(J){J.target.result||"dense"==T?N.push(J.target.result):"sparse"==T&&N.length++,0===--M&&(!0,R=!0,L=N)};return A.forEach(function(J){var Y=function(W){!0,L=W,C(W),H.abort()},Z=H.objectStore(this.storeName).get(J);Z.onsuccess=V,Z.onerror=Y},this),H},getAll:function(A,O){O||(O=E),A||(A=S);var C=this.db.transaction([this.storeName],this.consts.READ_ONLY),T=C.objectStore(this.storeName);return T.getAll?this._getAllNative(C,T,A,O):this._getAllCursor(C,T,A,O),C},_getAllNative:function(A,O,C,T){var N=!1,M=null;A.oncomplete=function(){(N?C:T)(M)},A.onabort=T,A.onerror=T;var P=O.getAll();P.onsuccess=function(R){N=!0,M=R.target.result},P.onerror=T},_getAllCursor:function(A,O,C,T){var N=[],M=!1,P=null;A.oncomplete=function(){(M?C:T)(P)},A.onabort=T,A.onerror=T;var R=O.openCursor();R.onsuccess=function(L){var H=L.target.result;H?(N.push(H.value),H.continue()):(M=!0,P=N)},R.onError=T},clear:function(A,O){O||(O=E),A||(A=S);var C=!1,T=null,N=this.db.transaction([this.storeName],this.consts.READ_WRITE);N.oncomplete=function(){(C?A:O)(T)},N.onabort=O,N.onerror=O;var M=N.objectStore(this.storeName).clear();return M.onsuccess=function(P){C=!0,T=P.target.result},M.onerror=O,N},_addIdPropertyIfNeeded:function(A){typeof A[this.keyPath]>"u"&&(A[this.keyPath]=this._insertIdCount+++Date.now())},getIndexList:function(){return this.store.indexNames},hasIndex:function(A){return this.store.indexNames.contains(A)},normalizeIndexData:function(A){A.keyPath=A.keyPath||A.name,A.unique=!!A.unique,A.multiEntry=!!A.multiEntry},indexComplies:function(A,O){return["keyPath","unique","multiEntry"].every(function(T){if("multiEntry"==T&&void 0===A[T]&&!1===O[T])return!0;if("keyPath"==T&&"[object Array]"==Object.prototype.toString.call(O[T])){var N=O.keyPath,M=A.keyPath;if("string"==typeof M)return N.toString()==M;if("function"!=typeof M.contains&&"function"!=typeof M.indexOf||M.length!==N.length)return!1;for(var P=0,R=N.length;P{r.read=function(d,l,_,E,S){var a,h,g=8*S-E-1,y=(1<>1,b=-7,A=_?S-1:0,O=_?-1:1,C=d[l+A];for(A+=O,a=C&(1<<-b)-1,C>>=-b,b+=g;b>0;a=256*a+d[l+A],A+=O,b-=8);for(h=a&(1<<-b)-1,a>>=-b,b+=E;b>0;h=256*h+d[l+A],A+=O,b-=8);if(0===a)a=1-v;else{if(a===y)return h?NaN:1/0*(C?-1:1);h+=Math.pow(2,E),a-=v}return(C?-1:1)*h*Math.pow(2,a-E)},r.write=function(d,l,_,E,S,a){var h,g,y,v=8*a-S-1,b=(1<>1,O=23===S?Math.pow(2,-24)-Math.pow(2,-77):0,C=E?0:a-1,T=E?1:-1,N=l<0||0===l&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(g=isNaN(l)?1:0,h=b):(h=Math.floor(Math.log(l)/Math.LN2),l*(y=Math.pow(2,-h))<1&&(h--,y*=2),(l+=h+A>=1?O/y:O*Math.pow(2,1-A))*y>=2&&(h++,y/=2),h+A>=b?(g=0,h=b):h+A>=1?(g=(l*y-1)*Math.pow(2,S),h+=A):(g=l*Math.pow(2,A-1)*Math.pow(2,S),h=0));S>=8;d[_+C]=255&g,C+=T,g/=256,S-=8);for(h=h<0;d[_+C]=255&h,C+=T,h/=256,v-=8);d[_+C-T]|=128*N}},83894:ne=>{"function"==typeof Object.create?ne.exports=function(d,l){l&&(d.super_=l,d.prototype=Object.create(l.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:ne.exports=function(d,l){if(l){d.super_=l;var _=function(){};_.prototype=l.prototype,d.prototype=new _,d.prototype.constructor=d}}},13407:(ne,r,d)=>{"use strict";var l=d(46259)(),E=d(75834)("Object.prototype.toString"),S=function(y){return!(l&&y&&"object"==typeof y&&Symbol.toStringTag in y)&&"[object Arguments]"===E(y)},a=function(y){return!!S(y)||null!==y&&"object"==typeof y&&"number"==typeof y.length&&y.length>=0&&"[object Array]"!==E(y)&&"[object Function]"===E(y.callee)},h=function(){return S(arguments)}();S.isLegacyArguments=a,ne.exports=h?S:a},20110:(ne,r,d)=>{"use strict";var g,l=Object.prototype.toString,_=Function.prototype.toString,E=/^\s*(?:function)?\*/,S=d(46259)(),a=Object.getPrototypeOf;ne.exports=function(v){if("function"!=typeof v)return!1;if(E.test(_.call(v)))return!0;if(!S)return"[object GeneratorFunction]"===l.call(v);if(!a)return!1;if(typeof g>"u"){var A=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}}();g=!!A&&a(A)}return a(v)===g}},48214:ne=>{"use strict";ne.exports=_,ne.exports.isMobile=_,ne.exports.default=_;const r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,d=/CrOS/,l=/android|ipad|playbook|silk/i;function _(E){E||(E={});let S=E.ua;if(!S&&typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&"string"==typeof S.headers["user-agent"]&&(S=S.headers["user-agent"]),"string"!=typeof S)return!1;let a=r.test(S)&&!d.test(S)||!!E.tablet&&l.test(S);return!a&&E.tablet&&E.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==S.indexOf("Macintosh")&&-1!==S.indexOf("Safari")&&(a=!0),a}},55782:ne=>{var r=Object.prototype,d=r.hasOwnProperty,l=r.toString,_=function(a){return a!=a},E={boolean:1,number:1,string:1,undefined:1},S=ne.exports={};S.a=S.type=function(a,h){return typeof a===h},S.defined=function(a){return void 0!==a},S.empty=function(a){var g,h=l.call(a);if("[object Array]"===h||"[object Arguments]"===h)return 0===a.length;if("[object Object]"===h){for(g in a)if(d.call(a,g))return!1;return!0}return"[object String]"===h&&""===a},S.equal=function(a,h){var y,g=l.call(a);if(g!==l.call(h))return!1;if("[object Object]"===g){for(y in a)if(!S.equal(a[y],h[y]))return!1;return!0}if("[object Array]"===g){if((y=a.length)!==h.length)return!1;for(;--y;)if(!S.equal(a[y],h[y]))return!1;return!0}return"[object Function]"===g?a.prototype===h.prototype:"[object Date]"===g?a.getTime()===h.getTime():a===h},S.hosted=function(a,h){var g=typeof h[a];return"object"===g?!!h[a]:!E[g]},S.instance=S.instanceof=function(a,h){return a instanceof h},S.null=function(a){return null===a},S.undefined=function(a){return void 0===a},S.arguments=function(a){var h="[object Arguments]"===l.call(a),g=!S.array(a)&&S.arraylike(a)&&S.object(a)&&S.fn(a.callee);return h||g},S.array=function(a){return"[object Array]"===l.call(a)},S.arguments.empty=function(a){return S.arguments(a)&&0===a.length},S.array.empty=function(a){return S.array(a)&&0===a.length},S.arraylike=function(a){return!!a&&!S.boolean(a)&&d.call(a,"length")&&isFinite(a.length)&&S.number(a.length)&&a.length>=0},S.boolean=function(a){return"[object Boolean]"===l.call(a)},S.false=function(a){return S.boolean(a)&&(!1===a||!1===a.valueOf())},S.true=function(a){return S.boolean(a)&&(!0===a||!0===a.valueOf())},S.date=function(a){return"[object Date]"===l.call(a)},S.element=function(a){return void 0!==a&&typeof HTMLElement<"u"&&a instanceof HTMLElement&&1===a.nodeType},S.error=function(a){return"[object Error]"===l.call(a)},S.fn=S.function=function(a){return typeof window<"u"&&a===window.alert||"[object Function]"===l.call(a)},S.number=function(a){return"[object Number]"===l.call(a)},S.infinite=function(a){return a===1/0||a===-1/0},S.decimal=function(a){return S.number(a)&&!_(a)&&!S.infinite(a)&&a%1!=0},S.divisibleBy=function(a,h){var g=S.infinite(a),y=S.infinite(h),v=S.number(a)&&!_(a)&&S.number(h)&&!_(h)&&0!==h;return g||y||v&&a%h==0},S.int=function(a){return S.number(a)&&!_(a)&&a%1==0},S.maximum=function(a,h){if(_(a))throw new TypeError("NaN is not a valid value");if(!S.arraylike(h))throw new TypeError("second argument must be array-like");for(var g=h.length;--g>=0;)if(a=0;)if(a>h[g])return!1;return!0},S.nan=function(a){return!S.number(a)||a!=a},S.even=function(a){return S.infinite(a)||S.number(a)&&a==a&&a%2==0},S.odd=function(a){return S.infinite(a)||S.number(a)&&a==a&&a%2!=0},S.ge=function(a,h){if(_(a)||_(h))throw new TypeError("NaN is not a valid value");return!S.infinite(a)&&!S.infinite(h)&&a>=h},S.gt=function(a,h){if(_(a)||_(h))throw new TypeError("NaN is not a valid value");return!S.infinite(a)&&!S.infinite(h)&&a>h},S.le=function(a,h){if(_(a)||_(h))throw new TypeError("NaN is not a valid value");return!S.infinite(a)&&!S.infinite(h)&&a<=h},S.lt=function(a,h){if(_(a)||_(h))throw new TypeError("NaN is not a valid value");return!S.infinite(a)&&!S.infinite(h)&&a=h&&a<=g},S.object=function(a){return a&&"[object Object]"===l.call(a)},S.hash=function(a){return S.object(a)&&a.constructor===Object&&!a.nodeType&&!a.setInterval},S.regexp=function(a){return"[object RegExp]"===l.call(a)},S.string=function(a){return"[object String]"===l.call(a)}},66425:ne=>{ne.exports=Array.isArray||function(r){return"[object Array]"==Object.prototype.toString.call(r)}},40452:(ne,r,d)=>{var l=d(93172).Buffer;ne.exports=function _(E){return l.isBuffer(E)||/\[object (.+Array|Array.+)\]/.test(Object.prototype.toString.call(E))}},33024:(ne,r,d)=>{ne.exports=self.fetch||(self.fetch=d(75557).default||d(75557))},1520:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ne){return"[object Array]"===Object.prototype.toString.call(ne)}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ne){return"object"==typeof ne&&ne.buffer&&ne.buffer.constructor===ArrayBuffer});var createOutputMethod=function(ne,r){return function(d){return new Sha256(r,!0).update(d)[ne]()}},createMethod=function(ne){var r=createOutputMethod("hex",ne);NODE_JS&&(r=nodeWrap(r,ne)),r.create=function(){return new Sha256(ne)},r.update=function(_){return r.create().update(_)};for(var d=0;d>6,E[a++]=128|63&h):h<55296||h>=57344?(E[a++]=224|h>>12,E[a++]=128|h>>6&63,E[a++]=128|63&h):(h=65536+((1023&h)<<10|1023&ne.charCodeAt(++l)),E[a++]=240|h>>18,E[a++]=128|h>>12&63,E[a++]=128|h>>6&63,E[a++]=128|63&h);ne=E}else{if("object"!==_)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR)}ne.length>64&&(ne=new Sha256(r,!0).update(ne).array());var g=[],y=[];for(l=0;l<64;++l){var v=ne[l]||0;g[l]=92^v,y[l]=54^v}Sha256.call(this,r,d),this.update(y),this.oKeyPad=g,this.inner=!0,this.sharedMemory=d}Sha256.prototype.update=function(ne){if(!this.finalized){var r,d=typeof ne;if("string"!==d){if("object"!==d)throw new Error(ERROR);if(null===ne)throw new Error(ERROR);if(ARRAY_BUFFER&&ne.constructor===ArrayBuffer)ne=new Uint8Array(ne);else if(!(Array.isArray(ne)||ARRAY_BUFFER&&ArrayBuffer.isView(ne)))throw new Error(ERROR);r=!0}for(var l,E,_=0,S=ne.length,a=this.blocks;_>2]|=ne[_]<>2]|=l<>2]|=(192|l>>6)<>2]|=(128|63&l)<=57344?(a[E>>2]|=(224|l>>12)<>2]|=(128|l>>6&63)<>2]|=(128|63&l)<>2]|=(240|l>>18)<>2]|=(128|l>>12&63)<>2]|=(128|l>>6&63)<>2]|=(128|63&l)<=64?(this.block=a[16],this.start=E-64,this.hash(),this.hashed=!0):this.start=E}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var ne=this.blocks,r=this.lastByteIndex;ne[16]=this.block,ne[r>>2]|=EXTRA[3&r],this.block=ne[16],r>=56&&(this.hashed||this.hash(),ne[0]=this.block,ne[16]=ne[1]=ne[2]=ne[3]=ne[4]=ne[5]=ne[6]=ne[7]=ne[8]=ne[9]=ne[10]=ne[11]=ne[12]=ne[13]=ne[14]=ne[15]=0),ne[14]=this.hBytes<<3|this.bytes>>>29,ne[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var g,y,v,b,A,T,N,M,P,ne=this.h0,r=this.h1,d=this.h2,l=this.h3,_=this.h4,E=this.h5,S=this.h6,a=this.h7,h=this.blocks;for(g=16;g<64;++g)y=((A=h[g-15])>>>7|A<<25)^(A>>>18|A<<14)^A>>>3,v=((A=h[g-2])>>>17|A<<15)^(A>>>19|A<<13)^A>>>10,h[g]=h[g-16]+y+h[g-7]+v<<0;for(P=r&d,g=0;g<64;g+=4)this.first?(this.is224?(T=300032,a=(A=h[0]-1413257819)-150054599<<0,l=A+24177077<<0):(T=704751109,a=(A=h[0]-210244248)-1521486534<<0,l=A+143694565<<0),this.first=!1):(y=(ne>>>2|ne<<30)^(ne>>>13|ne<<19)^(ne>>>22|ne<<10),b=(T=ne&r)^ne&d^P,a=l+(A=a+(v=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&E^~_&S)+K[g]+h[g])<<0,l=A+(y+b)<<0),y=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),b=(N=l&ne)^l&r^T,S=d+(A=S+(v=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&_^~a&E)+K[g+1]+h[g+1])<<0,y=((d=A+(y+b)<<0)>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),b=(M=d&l)^d&ne^N,E=r+(A=E+(v=(S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&a^~S&_)+K[g+2]+h[g+2])<<0,y=((r=A+(y+b)<<0)>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),b=(P=r&d)^r&l^M,_=ne+(A=_+(v=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&S^~E&a)+K[g+3]+h[g+3])<<0,ne=A+(y+b)<<0;this.h0=this.h0+ne<<0,this.h1=this.h1+r<<0,this.h2=this.h2+d<<0,this.h3=this.h3+l<<0,this.h4=this.h4+_<<0,this.h5=this.h5+E<<0,this.h6=this.h6+S<<0,this.h7=this.h7+a<<0},Sha256.prototype.hex=function(){this.finalize();var ne=this.h0,r=this.h1,d=this.h2,l=this.h3,_=this.h4,E=this.h5,S=this.h6,a=this.h7,h=HEX_CHARS[ne>>28&15]+HEX_CHARS[ne>>24&15]+HEX_CHARS[ne>>20&15]+HEX_CHARS[ne>>16&15]+HEX_CHARS[ne>>12&15]+HEX_CHARS[ne>>8&15]+HEX_CHARS[ne>>4&15]+HEX_CHARS[15&ne]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[d>>28&15]+HEX_CHARS[d>>24&15]+HEX_CHARS[d>>20&15]+HEX_CHARS[d>>16&15]+HEX_CHARS[d>>12&15]+HEX_CHARS[d>>8&15]+HEX_CHARS[d>>4&15]+HEX_CHARS[15&d]+HEX_CHARS[l>>28&15]+HEX_CHARS[l>>24&15]+HEX_CHARS[l>>20&15]+HEX_CHARS[l>>16&15]+HEX_CHARS[l>>12&15]+HEX_CHARS[l>>8&15]+HEX_CHARS[l>>4&15]+HEX_CHARS[15&l]+HEX_CHARS[_>>28&15]+HEX_CHARS[_>>24&15]+HEX_CHARS[_>>20&15]+HEX_CHARS[_>>16&15]+HEX_CHARS[_>>12&15]+HEX_CHARS[_>>8&15]+HEX_CHARS[_>>4&15]+HEX_CHARS[15&_]+HEX_CHARS[E>>28&15]+HEX_CHARS[E>>24&15]+HEX_CHARS[E>>20&15]+HEX_CHARS[E>>16&15]+HEX_CHARS[E>>12&15]+HEX_CHARS[E>>8&15]+HEX_CHARS[E>>4&15]+HEX_CHARS[15&E]+HEX_CHARS[S>>28&15]+HEX_CHARS[S>>24&15]+HEX_CHARS[S>>20&15]+HEX_CHARS[S>>16&15]+HEX_CHARS[S>>12&15]+HEX_CHARS[S>>8&15]+HEX_CHARS[S>>4&15]+HEX_CHARS[15&S];return this.is224||(h+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),h},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var ne=this.h0,r=this.h1,d=this.h2,l=this.h3,_=this.h4,E=this.h5,S=this.h6,a=this.h7,h=[ne>>24&255,ne>>16&255,ne>>8&255,255&ne,r>>24&255,r>>16&255,r>>8&255,255&r,d>>24&255,d>>16&255,d>>8&255,255&d,l>>24&255,l>>16&255,l>>8&255,255&l,_>>24&255,_>>16&255,_>>8&255,255&_,E>>24&255,E>>16&255,E>>8&255,255&E,S>>24&255,S>>16&255,S>>8&255,255&S];return this.is224||h.push(a>>24&255,a>>16&255,a>>8&255,255&a),h},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var ne=new ArrayBuffer(this.is224?28:32),r=new DataView(ne);return r.setUint32(0,this.h0),r.setUint32(4,this.h1),r.setUint32(8,this.h2),r.setUint32(12,this.h3),r.setUint32(16,this.h4),r.setUint32(20,this.h5),r.setUint32(24,this.h6),this.is224||r.setUint32(28,this.h7),ne},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var ne=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(ne),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},54237:(ne,r,d)=>{var l;!function(){"use strict";var _="input is invalid type",S="object"==typeof window,a=S?window:{};a.JS_SHA3_NO_WINDOW&&(S=!1);var h=!S&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=global:h&&(a=self);var y=!a.JS_SHA3_NO_COMMON_JS&&ne.exports,v=d.amdO,b=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",A="0123456789abcdef".split(""),C=[4,1024,262144,67108864],M=[0,8,16,24],P=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],R=[224,256,384,512],L=[128,256],H=["hex","buffer","arrayBuffer","array","digest"],V={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(me){return"[object Array]"===Object.prototype.toString.call(me)}),b&&(a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(me){return"object"==typeof me&&me.buffer&&me.buffer.constructor===ArrayBuffer});for(var J=function(me,ve,ce){return function(he){return new ee(me,ve,me).update(he)[ce]()}},Y=function(me,ve,ce){return function(he,le){return new ee(me,ve,le).update(he)[ce]()}},Z=function(me,ve,ce){return function(he,le,de,ae){return x["cshake"+me].update(he,le,de,ae)[ce]()}},W=function(me,ve,ce){return function(he,le,de,ae){return x["kmac"+me].update(he,le,de,ae)[ce]()}},Q=function(me,ve,ce,he){for(var le=0;le>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ce>>5,this.extraBytes=(31&ce)>>3;for(var he=0;he<50;++he)this.s[he]=0}function ue(me,ve,ce){ee.call(this,me,ve,ce)}ee.prototype.update=function(me){if(this.finalized)throw new Error("finalize already called");var ve,ce=typeof me;if("string"!==ce){if("object"!==ce)throw new Error(_);if(null===me)throw new Error(_);if(b&&me.constructor===ArrayBuffer)me=new Uint8Array(me);else if(!(Array.isArray(me)||b&&ArrayBuffer.isView(me)))throw new Error(_);ve=!0}for(var Pe,Ge,he=this.blocks,le=this.byteCount,de=me.length,ae=this.blockCount,ye=0,Ce=this.s;ye>2]|=me[ye]<>2]|=Ge<>2]|=(192|Ge>>6)<>2]|=(128|63&Ge)<=57344?(he[Pe>>2]|=(224|Ge>>12)<>2]|=(128|Ge>>6&63)<>2]|=(128|63&Ge)<>2]|=(240|Ge>>18)<>2]|=(128|Ge>>12&63)<>2]|=(128|Ge>>6&63)<>2]|=(128|63&Ge)<=le){for(this.start=Pe-le,this.block=he[ae],Pe=0;Pe>=8);ce>0;)le.unshift(ce),ce=255&(me>>=8),++he;return ve?le.push(he):le.unshift(he),this.update(le),le.length},ee.prototype.encodeString=function(me){var ve,ce=typeof me;if("string"!==ce){if("object"!==ce)throw new Error(_);if(null===me)throw new Error(_);if(b&&me.constructor===ArrayBuffer)me=new Uint8Array(me);else if(!(Array.isArray(me)||b&&ArrayBuffer.isView(me)))throw new Error(_);ve=!0}var he=0,le=me.length;if(ve)he=le;else for(var de=0;de=57344?he+=3:(ae=65536+((1023&ae)<<10|1023&me.charCodeAt(++de)),he+=4)}return he+=this.encode(8*he),this.update(me),he},ee.prototype.bytepad=function(me,ve){for(var ce=this.encode(ve),he=0;he>2]|=this.padding[3&ve],this.lastByteIndex===this.byteCount)for(me[0]=me[ce],ve=1;ve>4&15]+A[15&ye]+A[ye>>12&15]+A[ye>>8&15]+A[ye>>20&15]+A[ye>>16&15]+A[ye>>28&15]+A[ye>>24&15];de%me==0&&(we(ve),le=0)}return he&&(ye=ve[le],ae+=A[ye>>4&15]+A[15&ye],he>1&&(ae+=A[ye>>12&15]+A[ye>>8&15]),he>2&&(ae+=A[ye>>20&15]+A[ye>>16&15])),ae},ee.prototype.arrayBuffer=function(){this.finalize();var ye,me=this.blockCount,ve=this.s,ce=this.outputBlocks,he=this.extraBytes,le=0,de=0,ae=this.outputBits>>3;ye=he?new ArrayBuffer(ce+1<<2):new ArrayBuffer(ae);for(var Ce=new Uint32Array(ye);de>8&255,ae[ye+2]=Ce>>16&255,ae[ye+3]=Ce>>24&255;de%me==0&&we(ve)}return he&&(ye=de<<2,Ce=ve[le],ae[ye]=255&Ce,he>1&&(ae[ye+1]=Ce>>8&255),he>2&&(ae[ye+2]=Ce>>16&255)),ae},ue.prototype=new ee,ue.prototype.finalize=function(){return this.encode(this.outputBits,!0),ee.prototype.finalize.call(this)};var we=function(me){var ve,ce,he,le,de,ae,ye,Ce,Pe,Ge,Ve,Ue,_t,Ze,$e,Pt,nt,rt,Lt,Re,Ae,xe,je,He,lt,Je,at,fn,ct,dt,yn,ht,It,or,Dt,Mt,In,yt,wt,Pn,vt,St,Fn,pt,At,Ie,Se,De,Ee,Ne,ze,ot,Qe,qe,Ft,xt,Yt,Ut,Qt,Kt,sn,qt,pn;for(he=0;he<48;he+=2)le=me[0]^me[10]^me[20]^me[30]^me[40],de=me[1]^me[11]^me[21]^me[31]^me[41],ae=me[2]^me[12]^me[22]^me[32]^me[42],ye=me[3]^me[13]^me[23]^me[33]^me[43],Ce=me[4]^me[14]^me[24]^me[34]^me[44],Pe=me[5]^me[15]^me[25]^me[35]^me[45],Ge=me[6]^me[16]^me[26]^me[36]^me[46],Ve=me[7]^me[17]^me[27]^me[37]^me[47],ve=(Ue=me[8]^me[18]^me[28]^me[38]^me[48])^(ae<<1|ye>>>31),ce=(_t=me[9]^me[19]^me[29]^me[39]^me[49])^(ye<<1|ae>>>31),me[0]^=ve,me[1]^=ce,me[10]^=ve,me[11]^=ce,me[20]^=ve,me[21]^=ce,me[30]^=ve,me[31]^=ce,me[40]^=ve,me[41]^=ce,ve=le^(Ce<<1|Pe>>>31),ce=de^(Pe<<1|Ce>>>31),me[2]^=ve,me[3]^=ce,me[12]^=ve,me[13]^=ce,me[22]^=ve,me[23]^=ce,me[32]^=ve,me[33]^=ce,me[42]^=ve,me[43]^=ce,ve=ae^(Ge<<1|Ve>>>31),ce=ye^(Ve<<1|Ge>>>31),me[4]^=ve,me[5]^=ce,me[14]^=ve,me[15]^=ce,me[24]^=ve,me[25]^=ce,me[34]^=ve,me[35]^=ce,me[44]^=ve,me[45]^=ce,ve=Ce^(Ue<<1|_t>>>31),ce=Pe^(_t<<1|Ue>>>31),me[6]^=ve,me[7]^=ce,me[16]^=ve,me[17]^=ce,me[26]^=ve,me[27]^=ce,me[36]^=ve,me[37]^=ce,me[46]^=ve,me[47]^=ce,ve=Ge^(le<<1|de>>>31),ce=Ve^(de<<1|le>>>31),me[8]^=ve,me[9]^=ce,me[18]^=ve,me[19]^=ce,me[28]^=ve,me[29]^=ce,me[38]^=ve,me[39]^=ce,me[48]^=ve,me[49]^=ce,Ze=me[0],$e=me[1],Ie=me[11]<<4|me[10]>>>28,Se=me[10]<<4|me[11]>>>28,fn=me[20]<<3|me[21]>>>29,ct=me[21]<<3|me[20]>>>29,Kt=me[31]<<9|me[30]>>>23,sn=me[30]<<9|me[31]>>>23,St=me[40]<<18|me[41]>>>14,Fn=me[41]<<18|me[40]>>>14,or=me[2]<<1|me[3]>>>31,Dt=me[3]<<1|me[2]>>>31,Pt=me[13]<<12|me[12]>>>20,nt=me[12]<<12|me[13]>>>20,De=me[22]<<10|me[23]>>>22,Ee=me[23]<<10|me[22]>>>22,dt=me[33]<<13|me[32]>>>19,yn=me[32]<<13|me[33]>>>19,qt=me[42]<<2|me[43]>>>30,pn=me[43]<<2|me[42]>>>30,qe=me[5]<<30|me[4]>>>2,Ft=me[4]<<30|me[5]>>>2,Mt=me[14]<<6|me[15]>>>26,In=me[15]<<6|me[14]>>>26,rt=me[25]<<11|me[24]>>>21,Lt=me[24]<<11|me[25]>>>21,Ne=me[34]<<15|me[35]>>>17,ze=me[35]<<15|me[34]>>>17,ht=me[45]<<29|me[44]>>>3,It=me[44]<<29|me[45]>>>3,He=me[6]<<28|me[7]>>>4,lt=me[7]<<28|me[6]>>>4,xt=me[17]<<23|me[16]>>>9,Yt=me[16]<<23|me[17]>>>9,yt=me[26]<<25|me[27]>>>7,wt=me[27]<<25|me[26]>>>7,Re=me[36]<<21|me[37]>>>11,Ae=me[37]<<21|me[36]>>>11,ot=me[47]<<24|me[46]>>>8,Qe=me[46]<<24|me[47]>>>8,pt=me[8]<<27|me[9]>>>5,At=me[9]<<27|me[8]>>>5,Je=me[18]<<20|me[19]>>>12,at=me[19]<<20|me[18]>>>12,Ut=me[29]<<7|me[28]>>>25,Qt=me[28]<<7|me[29]>>>25,Pn=me[38]<<8|me[39]>>>24,vt=me[39]<<8|me[38]>>>24,xe=me[48]<<14|me[49]>>>18,je=me[49]<<14|me[48]>>>18,me[0]=Ze^~Pt&rt,me[1]=$e^~nt&Lt,me[10]=He^~Je&fn,me[11]=lt^~at&ct,me[20]=or^~Mt&yt,me[21]=Dt^~In&wt,me[30]=pt^~Ie&De,me[31]=At^~Se&Ee,me[40]=qe^~xt&Ut,me[41]=Ft^~Yt&Qt,me[2]=Pt^~rt&Re,me[3]=nt^~Lt&Ae,me[12]=Je^~fn&dt,me[13]=at^~ct&yn,me[22]=Mt^~yt&Pn,me[23]=In^~wt&vt,me[32]=Ie^~De&Ne,me[33]=Se^~Ee&ze,me[42]=xt^~Ut&Kt,me[43]=Yt^~Qt&sn,me[4]=rt^~Re&xe,me[5]=Lt^~Ae&je,me[14]=fn^~dt&ht,me[15]=ct^~yn&It,me[24]=yt^~Pn&St,me[25]=wt^~vt&Fn,me[34]=De^~Ne&ot,me[35]=Ee^~ze&Qe,me[44]=Ut^~Kt&qt,me[45]=Qt^~sn&pn,me[6]=Re^~xe&Ze,me[7]=Ae^~je&$e,me[16]=dt^~ht&He,me[17]=yn^~It<,me[26]=Pn^~St&or,me[27]=vt^~Fn&Dt,me[36]=Ne^~ot&pt,me[37]=ze^~Qe&At,me[46]=Kt^~qt&qe,me[47]=sn^~pn&Ft,me[8]=xe^~Ze&Pt,me[9]=je^~$e&nt,me[18]=ht^~He&Je,me[19]=It^~lt&at,me[28]=St^~or&Mt,me[29]=Fn^~Dt&In,me[38]=ot^~pt&Ie,me[39]=Qe^~At&Se,me[48]=qt^~qe&xt,me[49]=pn^~Ft&Yt,me[0]^=P[he],me[1]^=P[he+1]};if(y)ne.exports=x;else{for(G=0;G{"use strict";var r=ne.exports=function(_,E,S){"function"==typeof E&&(S=E,E={}),d(E,"function"==typeof(S=E.cb||S)?S:S.pre||function(){},S.post||function(){},_,"",_)};function d(_,E,S,a,h,g,y,v,b,A){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var O in E(a,h,g,y,v,b,A),a){var C=a[O];if(Array.isArray(C)){if(O in r.arrayKeywords)for(var T=0;T{var l=d(73669),_=d(91050),E=d(68429),S=d(26788),a=d(46389),h=new Buffer(0),g={encode:function(A){return"string"==typeof A?A=new Buffer(A):A},decode:function(A){return Buffer.isBuffer(A)?A:new Buffer(A)},buffer:!0,type:"raw"},y=function(){},v=function(A){return A=A.toString(16),"00000000".slice(0,-A.length)+A};ne.exports=function(A,O){O||(O={});var C={},T=O.blockSize||65536,N=O.batch||100,M=new Buffer(T);A.put("\0","ignore",y);var P={},R=function(V,J,Y,Z,W){var Q=function(){--P[V].locks||delete P[V]},D=function(o){if(o.locks++,!o.block&&!J)return o.block=Y,void W(null,o.block,Q);o.block||(o.block=new Buffer(T)),o.block.lengthQ&&(W=V.slice(Q),V=V.slice(0,Q)),this.bytesWritten+=V.length,this.blockLength+=V.length,this.blocks.push(V),V.lengthY._missing&&(u=u.slice(0,Y._missing)),Y._missing-=u.length,Y._pause(!Y.push(u)),!!Y._missing))};this._reader.on("data",function(u){for(;u.key>D;)if(!o(M))return;o(u.value)}),this._reader.on("error",function(u){Y.emit("error",u)}),this._reader.on("end",function(){Y.push(null)}),_.call(this)};return S.inherits(H,_),H.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this._reader.destroy(),process.nextTick(this.emit.bind(this,"close")))},H.prototype._pause=function(V){this._paused!==V&&(this._paused=V,this._paused?this._reader.pause():this._reader.resume())},H.prototype._read=function(){this._pause(!1)},C.remove=function(V,J){J=a(J||y);var Y=[],Z=A.createKeyStream({start:V+"\xff",end:V+"\xff\xff"});Z.on("error",J),Z.on("data",function(W){Y.push({type:"del",key:W})}),Z.on("end",function(){A.batch(Y,J)})},C.size=function(V,J){E.last(A,{start:V+"\xff",end:V+"\xff\xff",valueEncoding:g},function(Y,Z,W){return Y&&"range not found"===Y.message?J(null,0):Y?J(Y):Z.slice(0,V.length+1)!==V+"\xff"?J(null,0):void J(null,parseInt(Z.toString().slice(V.length+1),16)*T+W.length)})},C.write=function(V,J,Y,Z){if("function"==typeof Y)return C.write(V,J,null,Y);Y||(Y={}),Z||(Z=y);var W=C.createWriteStream(V,Y);W.on("error",Z),W.on("finish",function(){Z()}),W.write(J),W.end()},C.read=function(V,J,Y){if("function"==typeof J)return C.read(V,null,J);J||(J={});var Z=C.createReadStream(V,J),W=[];Z.on("error",Y),Z.on("data",function(Q){W.push(Q)}),Z.on("end",function(){Y(null,1===W.length?W[0]:Buffer.concat(W))})},C.createReadStream=function(V,J){return new H(V,J)},C.createWriteStream=function(V,J){return new L(V,J)},C}},60833:(ne,r,d)=>{ne.exports=a;var l=Object.keys||function(y){var v=[];for(var b in y)v.push(b);return v},_=d(26156);_.inherits=d(83894);var E=d(28460),S=d(37067);function a(y){if(!(this instanceof a))return new a(y);E.call(this,y),S.call(this,y),y&&!1===y.readable&&(this.readable=!1),y&&!1===y.writable&&(this.writable=!1),this.allowHalfOpen=!0,y&&!1===y.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}_.inherits(a,E),function g(y,v){for(var b=0,A=y.length;b{ne.exports=E;var l=d(68081),_=d(26156);function E(S){if(!(this instanceof E))return new E(S);l.call(this,S)}_.inherits=d(83894),_.inherits(E,l),E.prototype._transform=function(S,a,h){h(null,S)}},28460:(ne,r,d)=>{ne.exports=v;var l=d(66425),_=d(93172).Buffer;v.ReadableState=y;var E=d(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(u,m){return u.listeners(m).length});var S=d(295),a=d(26156);a.inherits=d(83894);var h,g=d(6297);function y(u,m){var w=d(60833),x=(u=u||{}).highWaterMark,F=u.objectMode?16:16384;this.highWaterMark=x||0===x?x:F,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!u.objectMode,m instanceof w&&(this.objectMode=this.objectMode||!!u.readableObjectMode),this.defaultEncoding=u.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,u.encoding&&(h||(h=d(15453).s),this.decoder=new h(u.encoding),this.encoding=u.encoding)}function v(u){d(60833);if(!(this instanceof v))return new v(u);this._readableState=new y(u,this),this.readable=!0,S.call(this)}function b(u,m,w,x,F){var G=function N(u,m){var w=null;return!a.isBuffer(m)&&!a.isString(m)&&!a.isNullOrUndefined(m)&&!u.objectMode&&(w=new TypeError("Invalid non-string/buffer chunk")),w}(m,w);if(G)u.emit("error",G);else if(a.isNullOrUndefined(w))m.reading=!1,m.ended||function M(u,m){if(m.decoder&&!m.ended){var w=m.decoder.end();w&&w.length&&(m.buffer.push(w),m.length+=m.objectMode?1:w.length)}m.ended=!0,P(u)}(u,m);else if(m.objectMode||w&&w.length>0)if(m.ended&&!F){var k=new Error("stream.push() after EOF");u.emit("error",k)}else if(m.endEmitted&&F){k=new Error("stream.unshift() after end event");u.emit("error",k)}else m.decoder&&!F&&!x&&(w=m.decoder.write(w)),F||(m.reading=!1),m.flowing&&0===m.length&&!m.sync?(u.emit("data",w),u.read(0)):(m.length+=m.objectMode?1:w.length,F?m.buffer.unshift(w):m.buffer.push(w),m.needReadable&&P(u)),function L(u,m){m.readingMore||(m.readingMore=!0,process.nextTick(function(){!function H(u,m){for(var w=m.length;!m.reading&&!m.flowing&&!m.ended&&m.lengthm.highWaterMark&&(m.highWaterMark=function C(u){if(u>=O)u=O;else{u--;for(var m=1;m<32;m<<=1)u|=u>>m;u++}return u}(u)),u>m.length?m.ended?m.length:(m.needReadable=!0,0):u)}function P(u){var m=u._readableState;m.needReadable=!1,m.emittedReadable||(g("emitReadable",m.flowing),m.emittedReadable=!0,m.sync?process.nextTick(function(){R(u)}):R(u))}function R(u){g("emit readable"),u.emit("readable"),Z(u)}function Z(u){var m=u._readableState;if(g("flow",m.flowing),m.flowing)do{var w=u.read()}while(null!==w&&m.flowing)}function W(u,m){var k,w=m.buffer,x=m.length,F=!!m.decoder,G=!!m.objectMode;if(0===w.length)return null;if(0===x)k=null;else if(G)k=w.shift();else if(!u||u>=x)k=F?w.join(""):_.concat(w,x),w.length=0;else if(u0)throw new Error("endReadable called on non-empty stream");m.endEmitted||(m.ended=!0,process.nextTick(function(){!m.endEmitted&&0===m.length&&(m.endEmitted=!0,u.readable=!1,u.emit("end"))}))}v.prototype.read=function(u){g("read",u);var m=this._readableState,w=u;if((!a.isNumber(u)||u>0)&&(m.emittedReadable=!1),0===u&&m.needReadable&&(m.length>=m.highWaterMark||m.ended))return g("read: emitReadable",m.length,m.ended),0===m.length&&m.ended?Q(this):P(this),null;if(0===(u=T(u,m))&&m.ended)return 0===m.length&&Q(this),null;var F,x=m.needReadable;return g("need readable",x),(0===m.length||m.length-u0?W(u,m):null,a.isNull(F)&&(m.needReadable=!0,u=0),m.length-=u,0===m.length&&!m.ended&&(m.needReadable=!0),w!==u&&m.ended&&0===m.length&&Q(this),a.isNull(F)||this.emit("data",F),F},v.prototype._read=function(u){this.emit("error",new Error("not implemented"))},v.prototype.pipe=function(u,m){var w=this,x=this._readableState;switch(x.pipesCount){case 0:x.pipes=u;break;case 1:x.pipes=[x.pipes,u];break;default:x.pipes.push(u)}x.pipesCount+=1,g("pipe count=%d opts=%j",x.pipesCount,m);var G=(!m||!1!==m.end)&&u!==process.stdout&&u!==process.stderr?p:ie;function k(ve){g("onunpipe"),ve===w&&ie()}function p(){g("onend"),u.end()}x.endEmitted?process.nextTick(G):w.once("end",G),u.on("unpipe",k);var B=function V(u){return function(){var m=u._readableState;g("pipeOnDrain",m.awaitDrain),m.awaitDrain&&m.awaitDrain--,0===m.awaitDrain&&E.listenerCount(u,"data")&&(m.flowing=!0,Z(u))}}(w);function ie(){g("cleanup"),u.removeListener("close",ue),u.removeListener("finish",we),u.removeListener("drain",B),u.removeListener("error",ee),u.removeListener("unpipe",k),w.removeListener("end",p),w.removeListener("end",ie),w.removeListener("data",te),x.awaitDrain&&(!u._writableState||u._writableState.needDrain)&&B()}function te(ve){g("ondata"),!1===u.write(ve)&&(g("false write response, pause",w._readableState.awaitDrain),w._readableState.awaitDrain++,w.pause())}function ee(ve){g("onerror",ve),me(),u.removeListener("error",ee),0===E.listenerCount(u,"error")&&u.emit("error",ve)}function ue(){u.removeListener("finish",we),me()}function we(){g("onfinish"),u.removeListener("close",ue),me()}function me(){g("unpipe"),w.unpipe(u)}return u.on("drain",B),w.on("data",te),u._events&&u._events.error?l(u._events.error)?u._events.error.unshift(ee):u._events.error=[ee,u._events.error]:u.on("error",ee),u.once("close",ue),u.once("finish",we),u.emit("pipe",w),x.flowing||(g("pipe resume"),w.resume()),u},v.prototype.unpipe=function(u){var m=this._readableState;if(0===m.pipesCount)return this;if(1===m.pipesCount)return u&&u!==m.pipes||(u||(u=m.pipes),m.pipes=null,m.pipesCount=0,m.flowing=!1,u&&u.emit("unpipe",this)),this;if(!u){var w=m.pipes,x=m.pipesCount;m.pipes=null,m.pipesCount=0,m.flowing=!1;for(var F=0;F{ne.exports=a;var l=d(60833),_=d(26156);function E(g,y){this.afterTransform=function(v,b){return function S(g,y,v){var b=g._transformState;b.transforming=!1;var A=b.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));b.writechunk=null,b.writecb=null,_.isNullOrUndefined(v)||g.push(v),A&&A(y);var O=g._readableState;O.reading=!1,(O.needReadable||O.length{ne.exports=h;var l=d(93172).Buffer;h.WritableState=a;var _=d(26156);_.inherits=d(83894);var E=d(295);function S(J,Y,Z){this.chunk=J,this.encoding=Y,this.callback=Z}function a(J,Y){var Z=d(60833),W=(J=J||{}).highWaterMark,Q=J.objectMode?16:16384;this.highWaterMark=W||0===W?W:Q,this.objectMode=!!J.objectMode,Y instanceof Z&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var D=!1===J.decodeStrings;this.decodeStrings=!D,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){!function T(J,Y){var Z=J._writableState,W=Z.sync,Q=Z.writecb;if(function C(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}(Z),Y)!function O(J,Y,Z,W,Q){Z?process.nextTick(function(){Y.pendingcb--,Q(W)}):(Y.pendingcb--,Q(W)),J._writableState.errorEmitted=!0,J.emit("error",W)}(J,Z,W,Y,Q);else{var D=R(J,Z);!D&&!Z.corked&&!Z.bufferProcessing&&Z.buffer.length&&P(J,Z),W?process.nextTick(function(){N(J,Z,D,Q)}):N(J,Z,D,Q)}}(Y,o)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function h(J){var Y=d(60833);if(!(this instanceof h||this instanceof Y))return new h(J);this._writableState=new a(J,this),this.writable=!0,E.call(this)}function A(J,Y,Z,W,Q,D,o){Y.writelen=W,Y.writecb=o,Y.writing=!0,Y.sync=!0,Z?J._writev(Q,Y.onwrite):J._write(Q,D,Y.onwrite),Y.sync=!1}function N(J,Y,Z,W){Z||function M(J,Y){0===Y.length&&Y.needDrain&&(Y.needDrain=!1,J.emit("drain"))}(J,Y),Y.pendingcb--,W(),H(J,Y)}function P(J,Y){if(Y.bufferProcessing=!0,J._writev&&Y.buffer.length>1){for(var Z=[],W=0;W{(r=ne.exports=d(28460)).Stream=d(295),r.Readable=r,r.Writable=d(37067),r.Duplex=d(60833),r.Transform=d(68081),r.PassThrough=d(43813),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=d(295))},73669:(ne,r,d)=>{ne.exports=d(37067)},37057:(ne,r,d)=>{var l=d(3161);Object.keys(l.code).forEach(function(_){var E=l.code[_];r[_]=function(S){var a=new Error(_+", "+E.description+(S?" '"+S+"'":""));return a.errno=E.errno,a.code=_,a.path=S,a}})},94115:(ne,r,d)=>{var l=d(2997),_=d(74162),E=d(95882),S=d(68429),a=d(46389),h=d(39199),g=d(37057),y=d(74514),v=d(1077),b=function(O,C,T){process.nextTick(function(){O(C,T)})},A=function(){};ne.exports=function(O,C){var T={};O=_(O);var N=E(O.sublevel("blobs"),C),M=y(O.sublevel("stats")),P=O.sublevel("links"),R=v(),L=[],H=Date.now();T.mkdir=function(W,Q,D){if("function"==typeof Q)return T.mkdir(W,null,Q);Q||(Q=h(777)),D||(D=A),M.follow(W,function(o,u,m){return o&&"ENOENT"!==o.code?D(o):u?D(g.EEXIST(m)):void M.put(m,{type:"directory",mode:Q,size:4096},R.cb(m,D))})},T.rmdir=function(W,Q){Q||(Q=A),M.follow(W,function(D,o,u){if(D)return Q(D);T.readdir(u,function(m,w){return m?Q(m):w.length?Q(g.ENOTEMPTY(u)):void M.del(u,R.cb(u,Q))})})},T.readdir=function(W,Q){M.follow(W,function(D,o,u){return D?Q(D):o?o.isDirectory()?void M.list(u,Q):Q(g.ENOTDIR(u)):Q(g.ENOENT(u))})};var J=function(W,Q,D){Q(W,function(o,u,m){if(o)return D(o);if(!u.isFile())return D(null,u);var w=u&&u.blob||m;N.size(w,function(x,F){if(x)return D(x);u.size=F,D(null,u)})})};T.stat=function(W,Q){J(W,M.follow,Q)},T.lstat=function(W,Q){J(W,M.get,Q)},T.exists=function(W,Q){M.follow(W,function(D){Q(!D)})};var Y=function(W,Q,D,o){o||(o=A),Q(W,function(u,m,w){if(u)return o(u);M.update(w,{mode:D},R.cb(w,o))})};T.chmod=function(W,Q,D){Y(W,M.follow,Q,D)},T.lchmod=function(W,Q,D){Y(W,M.get,Q,D)};var Z=function(W,Q,D,o,u){u||(u=A),Q(W,function(m,w,x){if(m)return u(m);M.update(x,{uid:D,gid:o},R.cb(x,u))})};return T.chown=function(W,Q,D,o){Z(W,M.follow,Q,D,o)},T.lchown=function(W,Q,D,o){Z(W,M.get,Q,D,o)},T.utimes=function(W,Q,D,o){o||(o=A),M.follow(W,function(u,m,w){if(u)return o(u);var x={};Q&&(x.atime=Q),D&&(x.mtime=D),M.update(w,x,R.cb(w,o))})},T.rename=function(W,Q,D){D||(D=A),M.follow(W,function(o,u,m){if(o)return D(o);var w=function(){D=R.cb(Q,R.cb(m,D)),M.put(Q,u,function(x){if(x)return D(x);M.del(m,D)})};M.follow(Q,function(x,F,G){return x&&"ENOENT"!==x.code?D(x):F?u.isDirectory()!==F.isDirectory()?D(g.EISDIR(m)):void(F.isDirectory()?T.readdir(G,function(k,p){return k?D(k):p.length?D(g.ENOTEMPTY(m)):void w()}):w()):w()})})},T.realpath=function(W,Q,D){if("function"==typeof Q)return T.realpath(W,null,Q);M.follow(W,function(o,u,m){if(o)return D(o);D(null,m)})},T.writeFile=function(W,Q,D,o){if("function"==typeof D)return T.writeFile(W,Q,null,D);"string"==typeof D&&(D={encoding:D}),D||(D={}),o||(o=A),Buffer.isBuffer(Q)||(Q=new Buffer(Q,D.encoding||"utf-8"));var u=D.flags||"w";D.append="w"!==u[0],M.follow(W,function(m,w,x){if(m&&"ENOENT"!==m.code)return o(m);if(w&&w.isDirectory())return o(g.EISDIR(x));if(w&&"x"===u[1])return o(g.EEXIST(x));var F=w&&w.blob||x;M.writable(x,function(G){if(G)return o(G);N.write(F,Q,D,function(k){if(k)return o(k);M.put(x,{ctime:w&&w.ctime,mtime:new Date,mode:D.mode||h(666),type:"file"},R.cb(x,o))})})})},T.appendFile=function(W,Q,D,o){if("function"==typeof D)return T.appendFile(W,Q,null,D);"string"==typeof D&&(D={encoding:D}),D||(D={}),D.flags="a",T.writeFile(W,Q,D,o)},T.unlink=function(W,Q){Q||(Q=A),M.get(W,function(D,o,u){if(D)return Q(D);if(o.isDirectory())return Q(g.EISDIR(u));var m=function(x){S(P,{start:x+"\xff",end:x+"\xff\xff"},function(F){if(F)return N.remove(x,Q);Q()})};M.del(u,R.cb(u,function(x){return x?Q(x):o.link?function(){var x=o.link.slice(0,o.link.indexOf("\xff"));P.del(o.link,function(F){if(F)return Q(F);m(x)})}():void P.del(u+"\xff",function(F){if(F)return Q(F);m(u)})}))})},T.readFile=function(W,Q,D){if("function"==typeof Q)return T.readFile(W,null,Q);"string"==typeof Q&&(Q={encoding:Q}),Q||(Q={});Q.encoding,Q.flag;M.follow(W,function(m,w,x){if(m)return D(m);if(w.isDirectory())return D(g.EISDIR(x));var F=w&&w.blob||x;N.read(F,function(G,k){if(G)return D(G);D(null,Q.encoding?k.toString(Q.encoding):k)})})},T.createReadStream=function(W,Q){Q||(Q={});var D=!1,o=l.readable(function(u){M.follow(W,function(m,w,x){if(m)return u(m);if(w.isDirectory())return u(g.EISDIR(x));var F=w&&w.blob||x,G=N.createReadStream(F,Q);o.emit("open"),G.on("end",function(){process.nextTick(function(){D||o.emit("close")})}),u(null,G)})});return o.on("close",function(){D=!0}),o},T.createWriteStream=function(W,Q){Q||(Q={});var D=Q.flags||"w",o=!1,u=Q.mode||h(666);Q.append="a"===D[0];var m=l.writable(function(w){M.follow(W,function(x,F,G){if(x&&"ENOENT"!==x.code)return w(x);if(F&&F.isDirectory())return w(g.EISDIR(G));if(F&&"x"===D[1])return w(g.EEXIST(G));var k=F&&F.blob||G;M.writable(k,function(p){if(p)return w(p);var ie={ctime:F?F.ctime:new Date,mtime:new Date,mode:u,type:"file"};M.put(G,ie,function(te){if(te)return w(te);var ee=N.createWriteStream(k,Q);m.emit("open"),ee.on("finish",function(){ie.mtime=new Date,M.put(G,ie,function(){R.change(G),o||m.emit("close")})}),w(null,ee)})})})});return m.on("close",function(){o=!0}),m},T.truncate=function(W,Q,D){M.follow(W,function(o,u,m){if(o)return D(o);var w=u&&u.blob||m;N.size(w,function(x,F){if(x)return D(x);M.writable(m,function(G){if(G)return D(G);if(D=a(R.cb(m,D)),!Q)return N.remove(w,D);var k=N.createWriteStream(w,{start:F{ne.exports=function r(d){return null!==d&&("object"==typeof d||"function"==typeof d)}},48505:(ne,r,d)=>{var l=d(78170);ne.exports=function _(){for(var E={},S=0;S{var l=d(63928),_=d(46389),E=d(39448),S=d(39199),a=d(90163),h=d(48505),g=d(37057),y=a({type:"directory",mode:S(777),size:4096}),v=function(A){return A="/"===A[0]?A:"/"+A,"/"===(A=l.normalize(A))?A:"/"===A[A.length-1]?A.slice(0,-1):A},b=function(A){var O=A.split("/").length.toString(36);return"0000000000".slice(O.length)+O+A};ne.exports=function(A){var O={};O.normalize=v,O.get=function(T,N){if("/"===(T=v(T)))return process.nextTick(N.bind(null,null,y,"/"));A.get(b(T),{valueEncoding:"json"},function(M,P){return M&&M.notFound?N(g.ENOENT(T),null,T):M?N(M,null,T):void N(null,a(P),T)})},O.writable=function(T,N){if("/"===(T=v(T)))return process.nextTick(N.bind(null,g.EPERM(T)));O.follow(l.dirname(T),function(M,P){return M?N(M):P.isDirectory()?void N(null,T):N(g.ENOTDIR(T))})},O.list=function(T,N){T=v(T);var M=b("/"===T?T:T+"/"),P=A.createKeyStream({start:M,end:M+"\xff"});N=_(N),P.on("error",N),P.pipe(E({encoding:"object"},function(R){R=R.map(function(L){return L.split("/").pop()}),N(null,R)}))};return O.follow=function(T,N){!function(T,N){var M="/",P=T.split("/").slice(1),R=function(){O.get(l.join(M,P.shift()),function(L,H,V){return L?N(L,H,T):(M=H.target||V,P.length?void R():N(null,H,V))})};R()}(v(T),function M(P,R,L){return P?N(P,null,L):R.target?O.get(R.target,M):void N(null,a(R),L)})},O.update=function(T,N,M){O.get(T,function(P,R,L){return P?M(P):"/"===L?M(g.EPERM(L)):void O.put(L,h(R,N),M)})},O.put=function(T,N,M){O.writable(T,function(P,R){if(P)return M(P);A.put(b(R),a(N),{valueEncoding:"json"},M)})},O.del=function(T,N){if("/"===(T=v(T)))return process.nextTick(N.bind(null,g.EPERM(T)));A.del(b(T),N)},O}},90163:ne=>{var r=function(l){return l?"string"==typeof l?new Date(l):l:new Date},d=function(l){this.uid=l.uid||0,this.gid=l.gid||0,this.mode=l.mode||0,this.size=l.size||0,this.mtime=r(l.mtime),this.atime=r(l.atime),this.ctime=r(l.ctime),this.type=l.type,this.target=l.target,this.link=l.link,this.blob=l.blob};d.prototype.isDirectory=function(){return"directory"===this.type},d.prototype.isFile=function(){return"file"===this.type},d.prototype.isBlockDevice=function(){return!1},d.prototype.isCharacterDevice=function(){return!1},d.prototype.isSymbolicLink=function(){return"symlink"===this.type},d.prototype.isFIFO=function(){return!1},d.prototype.isSocket=function(){return!1},ne.exports=function(l){return new d(l)}},1077:(ne,r,d)=>{var l=d(59069);ne.exports=function(){var _={},E=new l.EventEmitter;return E.watch=function(S,a){return _[S]||(_[S]=new l.EventEmitter,_[S].setMaxListeners(0)),a&&_[S].on("change",a),_[S]},E.watcher=function(S,a){var h=new l.EventEmitter,g=function(){h.emit("change","change",S)};return E.watch(S,g),a&&h.on("change",a),h.close=function(){E.unwatch(S,g)},h},E.unwatch=function(S,a){_[S]&&(a?_[S].removeListener("change",a):_[S].removeAllListeners("change"),_[S].listeners("change").length||delete _[S])},E.change=function(S){_[S]&&_[S].emit("change"),E.emit("change",S)},E.cb=function(S,a){return function(h,g){S&&E.change(S),a&&a(h,g)}},E}},55860:(ne,r,d)=>{var l=d(87241);ne.exports=function(E){var S=(E=l(E)).reverse,a=E.max||E.end,h=E.min||E.start,g=[h,a];return null!=h&&null!=a&&g.sort(),S&&(g=g.reverse()),E.start=g[0],E.end=g[1],delete E.min,delete E.max,E}},87241:ne=>{"use strict";function r(_){return Object.prototype.toString.call(_)}var d={isArray:function(_){return Array.isArray(_)||"object"==typeof _&&"[object Array]"===r(_)},isDate:function(_){return"object"==typeof _&&"[object Date]"===r(_)},isRegExp:function(_){return"object"==typeof _&&"[object RegExp]"===r(_)},getRegExpFlags:function(_){var E="";return _.global&&(E+="g"),_.ignoreCase&&(E+="i"),_.multiline&&(E+="m"),E}};function l(_,E,S,a){var h=[],g=[],y=typeof Buffer<"u";return typeof E>"u"&&(E=!0),typeof S>"u"&&(S=1/0),function v(b,A){if(null===b)return null;if(0==A)return b;var O,C;if("object"!=typeof b)return b;if(d.isArray(b))O=[];else if(d.isRegExp(b))O=new RegExp(b.source,d.getRegExpFlags(b)),b.lastIndex&&(O.lastIndex=b.lastIndex);else if(d.isDate(b))O=new Date(b.getTime());else{if(y&&Buffer.isBuffer(b))return O=new Buffer(b.length),b.copy(O),O;typeof a>"u"?(C=Object.getPrototypeOf(b),O=Object.create(C)):(O=Object.create(a),C=a)}if(E){var T=h.indexOf(b);if(-1!=T)return g[T];h.push(b),g.push(O)}for(var N in b){var M;C&&(M=Object.getOwnPropertyDescriptor(C,N)),(!M||null!=M.set)&&(O[N]=v(b[N],A-1))}return O}(_,S)}ne.exports=l,l.clonePrototype=function(_){if(null===_)return null;var E=function(){};return E.prototype=_,new E}},71175:(ne,r,d)=>{var l=d(77826);ne.exports=function(_){if(!_.hooks){var E=[],S=[];_.hooks={post:function(T,N){N||(N=T,T="");var M={test:l.checker(T),hook:N};return E.push(M),y(E,M)},pre:function(T,N){N||(N=T,T="");var M={test:l.checker(T),hook:N,safe:!1!==T.safe};return S.push(M),y(S,M)},posthooks:E,prehooks:S},_.on("put",function(T,N){v({type:"put",key:T,value:N})}),_.on("del",function(T,N){v({type:"del",key:T,value:N})}),_.on("batch",function(N){N.forEach(v)});var b=_.put,A=_.del,O=_.batch;_.put=function(T,N,M,P){return C(!1,[{key:T,value:N,type:"put"}],M,P)},_.del=function(T,N,M){return C(!1,[{key:T,type:"del"}],N,M)},_.batch=function(T,N,M){return C(!0,T,N,M)}}function a(T){return T&&("string"==typeof T?T:"string"==typeof T.prefix?T.prefix:"function"==typeof T.prefix?T.prefix():"")}function y(T,N){return function(){var M=T.indexOf(N);return!!~M&&(T.splice(M,1),!0)}}function v(T){T&&T.type&&E.forEach(function(N){N.test(T.key)&&N.hook(T)})}function C(T,N,M,P){try{N.forEach(function L(H,V){S.forEach(function(J){if(J.test(String(H.key))){var Y={add:function(Z,W){if(typeof Z>"u")return this;if(!1===Z)return delete N[V];var Q=a(Z.prefix)||a(W)||J.prefix||"";if(Q&&(Z.prefix=Q),Z.key=Q+Z.key,J.safe&&J.test(String(Z.key)))throw new Error("prehook cannot insert into own range");var D=Z.keyEncoding||function h(T){if(T&&T._getKeyEncoding)return T._getKeyEncoding(T)}(Z.prefix),o=Z.valueEncoding||function g(T){if(T&&T._getValueEncoding)return T._getValueEncoding(T)}(Z.prefix);return D&&(Z.keyEncoding=D),o&&(Z.valueEncoding=o),N.push(Z),L(Z,N.length-1),this},put:function(Z,W){return"object"==typeof Z&&(Z.type="put"),this.add(Z,W)},del:function(Z,W){return"object"==typeof Z&&(Z.type="del"),this.add(Z,W)},veto:function(){return this.add(!1)}};J.hook.call(Y,H,Y.add,N)}})})}catch(L){return(P||M)(L)}if(1==(N=N.filter(function(L){return L&&L.type})).length&&!T){var R=N[0];return"put"==R.type?b.call(_,R.key,R.value,M,P):A.call(_,R.key,M,P)}return O.call(_,N,M,P)}}},77105:(ne,r,d)=>{ne.exports=y;var l=d(17294),_=d(30826).NI,E=d(26788),S=d(74148),a=d(40452),h=d(4205),g=d(28517);function y(b){if(!(this instanceof y))return new y(b);if(!b)throw new Error("constructor requires at least a location argument");this.IDBOptions={},this.location=b}E.inherits(y,_),y.prototype._open=function(b,A){var O=this,C={storeName:this.location,autoIncrement:!1,keyPath:null,onStoreReady:function(){A&&A(null,O.idb)},onError:function(T){A&&A(T)}};h(C,b),this.IDBOptions=C,this.idb=new l(C)},y.prototype._get=function(b,A,O){this.idb.get(b,function(C){if(void 0===C)return O(new Error("NotFound"));var T=!0;return!1===A.asBuffer&&(T=!1),A.raw&&(T=!1),T&&(C=C instanceof Uint8Array?g(C):new Buffer(String(C))),O(null,C,b)},O)},y.prototype._del=function(b,A,O){this.idb.remove(b,O,O)},y.prototype._put=function(b,A,O,C){A instanceof ArrayBuffer&&(A=g(new Uint8Array(A)));var T=this.convertEncoding(b,A,O);Buffer.isBuffer(T.value)&&("function"==typeof A.toArrayBuffer?T.value=new Uint8Array(A.toArrayBuffer()):T.value=new Uint8Array(A)),this.idb.put(T.key,T.value,function(){C()},C)},y.prototype.convertEncoding=function(b,A,O){if(O.raw)return{key:b,value:A};if(A){var C=A.toString();"NaN"===C&&(A="NaN")}var T=O.valueEncoding,N={key:b,value:A};return A&&(!T||"binary"!==T)&&"object"!=typeof N.value&&(N.value=C),N},y.prototype.iterator=function(b){return"object"!=typeof b&&(b={}),new S(this.idb,b)},y.prototype._batch=function(b,A,O){var T,N,M,P,R=[];if(0===b.length)return setTimeout(O,0);for(T=0;T{var l=d(26788),_=d(30826).YI,E=d(52820);function S(a,h){h||(h={}),this.options=h,_.call(this,a),this._order=h.reverse?"DESC":"ASC",this._limit=h.limit,this._count=0,this._done=!1;var g=E.lowerBound(h),y=E.upperBound(h);try{this._keyRange=g||y?this.db.makeKeyRange({lower:g,upper:y,excludeLower:E.lowerBoundExclusive(h),excludeUpper:E.upperBoundExclusive(h)}):null}catch{this._keyRangeError=!0}this.callback=null}ne.exports=S,l.inherits(S,_),S.prototype.createIterator=function(){var a=this;a.iterator=a.db.iterate(function(){a.onItem.apply(a,arguments)},{keyRange:a._keyRange,autoContinue:!1,order:a._order,onError:function(h){console.log("horrible error",h)}})},S.prototype.onItem=function(a,h,g){if(!h&&this.callback)return this.callback(),void(this.callback=!1);var y=!0;this._limit&&this._limit>0&&this._count++>=this._limit&&(y=!1),y&&this.callback(!1,h.key,h.value),h&&h.continue()},S.prototype._next=function(a){return a?this._keyRangeError?a():(this._started||(this.createIterator(),this._started=!0),void(this.callback=a)):new Error("next() requires a callback argument")}},94442:ne=>{var r=Object.prototype.hasOwnProperty,d=Object.prototype.toString,l=function(_){var E="function"==typeof _&&!(_ instanceof RegExp)||"[object Function]"===d.call(_);return!E&&typeof window<"u"&&(E=_===window.setTimeout||_===window.alert||_===window.confirm||_===window.prompt),E};ne.exports=function(E,S){if(!l(S))throw new TypeError("iterator must be a function");var a,h,g="string"==typeof E,y=E.length,v=arguments.length>2?arguments[2]:null;if(y===+y)for(a=0;a{ne.exports=Object.keys||d(5741)},71133:ne=>{var r=Object.prototype.toString;ne.exports=function(l){var _=r.call(l),E="[object Arguments]"===_;return E||(E="[object Array]"!==_&&null!==l&&"object"==typeof l&&"number"==typeof l.length&&l.length>=0&&"[object Function]"===r.call(l.callee)),E}},5741:(ne,r,d)=>{!function(){"use strict";var y,l=Object.prototype.hasOwnProperty,_=Object.prototype.toString,E=d(94442),S=d(71133),a=!{toString:null}.propertyIsEnumerable("toString"),h=function(){}.propertyIsEnumerable("prototype"),g=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];y=function(b){var A=null!==b&&"object"==typeof b,O="[object Function]"===_.call(b),C=S(b),T=[];if(!A&&!O&&!C)throw new TypeError("Object.keys called on a non-object");if(C)E(b,function(L){T.push(L)});else{var N,M=h&&O;for(N in b)(!M||"prototype"!==N)&&l.call(b,N)&&T.push(N)}if(a){var P=b.constructor,R=P&&P.prototype===b;E(g,function(L){(!R||"constructor"!==L)&&l.call(b,L)&&T.push(L)})}return T},ne.exports=y}()},2968:ne=>{ne.exports=function r(d){return null!==d&&("object"==typeof d||"function"==typeof d)}},4205:(ne,r,d)=>{var l=d(41638),_=d(2968);ne.exports=function E(){for(var S={},a=0;a{var l=d(72426);function E(h,g,y){g.limit=g.reverse?2:1;(function _(h,g,y){var v=[];return g.forEach(function(b){function A(O){!1!==y(b,O)&&v.forEach(function(C){C()})}h.on(b,A),v.push(function(){h.removeListener(b,A)})}),h})(h.createReadStream(g),["data","error","end"],function(b,A){if(g.reverse&&A&&g.start&&A.key.toString()>g.start)return!1;"error"==b?y(A):"end"==b?y(new Error("range not found"),null,null):y(null,A.key,A.value)})}(r=ne.exports=E).first=function S(h,g,y){return y||(y=g,g={}),g.reverse=!1,E(h,l(g),y)},r.last=function a(h,g,y){y||(y=g,g={});g.start;return g.reverse=!0,E(h,l(g),function(b,A,O){if(b){var C=g.start;g.start=null,E(h,g,function(T,N,M){if(!N)return y(b,null,null);var P=N.toString();P<=C&&(!g.end||P>=g.end)?y(T,N,M):y(b,null,null)})}else y(b,A,O)})}},72426:ne=>{ne.exports=function(d){var l=d.reverse,_=d.end,E=d.start,S=[E,_];return null!=E&&null!=_&&S.sort(),l&&(S=S.reverse()),d.start=S[0],d.end=S[1],d}},25904:ne=>{function r(_,E,S,a){var h={type:_,key:E,value:S,options:a};return a&&a.prefix&&(h.prefix=a.prefix,delete a.prefix),this._operations.push(h),this}function d(_){this._operations=[],this._sdb=_,this.put=r.bind(this,"put"),this.del=r.bind(this,"del")}var l=d.prototype;l.clear=function(){this._operations=[]},l.write=function(_){this._sdb.batch(this._operations,_)},ne.exports=d},74162:(ne,r,d)=>{d(59069).EventEmitter,process.nextTick;var E=d(91399),S=d(25904),a=d(55860),h=d(71175);ne.exports=function(g,y){function v(){}v.prototype=g;var b=new v;if(b.sublevel)return b;var A=(y=y||{}).sep=y.sep||"\xff";function O(T){return function(N){return(N=a(N=N||{})).reverse?N.start=N.start||A:N.end=N.end||A,T.call(b,N)}}b._options=y,h(b),b.sublevels={},b.sublevel=function(T,N){return b.sublevels[T]?b.sublevels[T]:new E(b,T,N||this._options)},b.methods={},b.prefix=function(T){return""+(T||"")},b.pre=function(T,N){return N||(N=T,T={max:A}),b.hooks.pre(T,N)},b.post=function(T,N){return N||(N=T,T={max:A}),b.hooks.post(T,N)},b.readStream=b.createReadStream=O(b.createReadStream),b.keyStream=b.createKeyStream=O(b.createKeyStream),b.valuesStream=b.createValueStream=O(b.createValueStream);var C=b.batch;return b.batch=function(T,N,M){if(!Array.isArray(T))return new S(b);T.forEach(function(P){P.prefix&&("function"==typeof P.prefix.prefix?P.key=P.prefix.prefix(P.key):"string"==typeof P.prefix&&(P.key=P.prefix+P.key))}),C.call(b,T,N,M)},b}},23989:(ne,r,d)=>{ne.exports=Object.keys||d(21079)},21079:(ne,r,d)=>{!function(){"use strict";var h,l=Object.prototype.hasOwnProperty,_=d(55782),E=d(7480),S=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];h=function(y){if(!_.object(y)&&!_.array(y))throw new TypeError("Object.keys called on a non-object");var v,b=[];for(v in y)l.call(y,v)&&b.push(v);return S&&E(a,function(A){l.call(y,A)&&b.push(A)}),b},ne.exports=h}()},41698:ne=>{ne.exports=function r(d){return null!==d&&("object"==typeof d||"function"==typeof d)}},34432:(ne,r,d)=>{var l=d(23989),_=d(41698);ne.exports=function E(){for(var S={},a=0;a{var l=d(59069).EventEmitter,_=d(26788).inherits,E=d(77826),S=d(55860),a=d(34432),h=d(25904);function g(O,C,T){if("string"==typeof T&&(console.error("db.sublevel(name, seperator) is depreciated"),console.error("use db.sublevel(name, {sep: separator})) if you must"),T={sep:T}),!(this instanceof g))return new g(O,C,T);if(!O)throw new Error("must provide db");if(!C)throw new Error("must provide prefix");(T=T||{}).sep=T.sep||"\xff",this._parent=O,this._options=T,this.options=T,this._prefix=C,this._root=b(this),O.sublevels[C]=this,this.sublevels={},this.methods={};var N=this;this.hooks={pre:function(){return N.pre.apply(N,arguments)},post:function(){return N.post.apply(N,arguments)}}}_(g,l);var y=g.prototype;function b(O){return O._parent?b(O._parent):O}y._key=function(O){var C=this._options.sep;return C+this._prefix+C+O},y._getOptsAndCb=function(O,C){return"function"==typeof O&&(C=O,O={}),{opts:a(O,this._options),cb:C}},y.sublevel=function(O,C){return this.sublevels[O]?this.sublevels[O]:new g(this,O,C||this._options)},y.put=function(O,C,T,N){var M=this._getOptsAndCb(T,N);this._root.put(this.prefix(O),C,M.opts,M.cb)},y.get=function(O,C,T){var N=this._getOptsAndCb(C,T);this._root.get(this.prefix(O),N.opts,N.cb)},y.del=function(O,C,T){var N=this._getOptsAndCb(C,T);this._root.del(this.prefix(O),N.opts,N.cb)},y.batch=function(O,C,T){if(!Array.isArray(O))return new h(this);var N=this,M=this._getOptsAndCb(C,T);O.forEach(function(P){"string"==typeof P.prefix?P.key=P.prefix+P.key:P.key=(P.prefix||N).prefix(P.key),P.prefix&&(P.prefix=null)}),this._root.batch(O,M.opts,M.cb)},y._getKeyEncoding=function(){return this.options.keyEncoding?this.options.keyEncoding:this._parent&&this._parent._getKeyEncoding?this._parent._getKeyEncoding():void 0},y._getValueEncoding=function(){return this.options.valueEncoding?this.options.valueEncoding:this._parent&&this._parent._getValueEncoding?this._parent._getValueEncoding():void 0},y.prefix=function(O){var C=this._options.sep;return this._parent.prefix()+C+this._prefix+C+(O||"")},y.keyStream=y.createKeyStream=function(O){return(O=O||{}).keys=!0,O.values=!1,this.createReadStream(O)},y.valueStream=y.createValueStream=function(O){return(O=O||{}).keys=!1,O.values=!0,O.keys=!1,this.createReadStream(O)},y.readStream=y.createReadStream=function(O){O=O||{};var C=b(this),T=this.prefix(),N=E.prefix(O,T);!function v(O,C){["valueEncoding","encoding","keyEncoding","reverse","values","keys","limit","fillCache"].forEach(function(T){C.hasOwnProperty(T)&&(O[T]=C[T])})}(N,a(O,this._options));var M=C.createReadStream(N);if(!1===N.values){var P;if(P=M.read)M.read=function(L){var H=P.call(this,L);return H&&(H=H.substring(T.length)),H};else{var R=M.emit;M.emit=function(L,H){"data"===L?R.call(this,"data",H.substring(T.length)):R.call(this,L,H)}}return M}return!1===N.keys||((P=M.read)?M.read=function(H){var V=P.call(this,H);return V&&(V.key=V.key.substring(T.length)),V}:M.on("data",function(H){H.key=H.key.substring(T.length)})),M},y.writeStream=y.createWriteStream=function(){var O=b(this),C=this.prefix(),T=O.createWriteStream.apply(O,arguments),N=T.write,M=this._options.encoding,P=this._options.valueEncoding,R=this._options.keyEncoding,L=!M&&!P&&!R;return T.write=L?function(H){return H.key=C+H.key,N.call(T,H)}:function(H){return H.key=C+H.key,M&&typeof H.encoding>"u"&&(H.encoding=M),P&&typeof H.valueEncoding>"u"&&(H.valueEncoding=P),R&&typeof H.keyEncoding>"u"&&(H.keyEncoding=R),N.call(T,H)},T},y.approximateSize=function(){var O=b(db);return O.approximateSize.apply(O,arguments)},y.pre=function(O,C){C||(C=O,O=null),O=E.prefix(O,this.prefix(),this._options.sep);var T=b(this._parent),N=this.prefix();return T.hooks.pre(S(O),function(M,P,R){C({key:M.key.substring(N.length),value:M.value,type:M.type},function(L,H){P(L,L.prefix?H:H||N)},R)})},y.post=function(O,C){C||(C=O,O=null);var T=b(this._parent),N=this.prefix();return O=E.prefix(O,N,this._options.sep),T.hooks.post(S(O),function(M){C({key:M.key.substring(N.length),value:M.value,type:M.type})})};ne.exports=g},31238:(ne,r,d)=>{var l=d(31404),_=d(24062).WriteError,E=l.getOptions,S=l.dispatchError;function a(h){this._levelup=h,this.batch=h.db.batch(),this.ops=[]}a.prototype.put=function(h,g,y){y=E(this._levelup,y);var v=l.encodeKey(h,y),b=l.encodeValue(g,y);try{this.batch.put(v,b)}catch(A){throw new _(A)}return this.ops.push({type:"put",key:v,value:b}),this},a.prototype.del=function(h,g){g=E(this._levelup,g);var y=l.encodeKey(h,g);try{this.batch.del(y)}catch(v){throw new _(v)}return this.ops.push({type:"del",key:y}),this},a.prototype.clear=function(){try{this.batch.clear()}catch(h){throw new _(h)}return this.ops=[],this},a.prototype.write=function(h){var g=this._levelup,y=this.ops;try{this.batch.write(function(v){if(v)return S(g,new _(v),h);g.emit("batch",y),h&&h()})}catch(v){throw new _(v)}},ne.exports=a},24062:(ne,r,d)=>{var l=d(3161).create,_=l("LevelUPError"),E=l("NotFoundError",_);E.prototype.notFound=!0,E.prototype.status=404,ne.exports={LevelUPError:_,InitializationError:l("InitializationError",_),OpenError:l("OpenError",_),ReadError:l("ReadError",_),WriteError:l("WriteError",_),NotFoundError:E,EncodingError:l("EncodingError",_)}},4427:(ne,r,d)=>{var l=d(59069).EventEmitter,_=d(26788).inherits,E=d(78677),S=d(3218),a=d(67125),h=d(24062).WriteError,g=d(24062).ReadError,y=d(24062).NotFoundError,v=d(24062).OpenError,b=d(24062).EncodingError,A=d(24062).InitializationError,O=d(31022),C=d(95011),T=d(31404),N=d(31238),M=T.getOptions,P=T.defaultOptions,R=T.getLevelDOWN,L=T.dispatchError;function H(Y,Z){return"function"==typeof Y?Y:Z}function V(Y,Z,W){if(!(this instanceof V))return new V(Y,Z,W);var Q;if(l.call(this),this.setMaxListeners(1/0),"function"==typeof Y?((Z="object"==typeof Z?Z:{}).db=Y,Y=null):"object"==typeof Y&&"function"==typeof Y.db&&(Z=Y,Y=null),"function"==typeof Z&&(W=Z,Z={}),(!Z||"function"!=typeof Z.db)&&"string"!=typeof Y){if(Q=new A("Must provide a location for the database"),W)return process.nextTick(function(){W(Q)});throw Q}Z=M(this,Z),this.options=E(P,Z),this._status="new",S(this,"location",Y,"e"),this.open(W)}function J(Y){return function(Z,W){R()[Y](Z,W||function(){})}}_(V,l),V.prototype.open=function(Y){var W,Q,Z=this;return this.isOpen()?(Y&&process.nextTick(function(){Y(null,Z)}),this):this._isOpening()?Y&&this.once("open",function(){Y(null,Z)}):(this.emit("opening"),this._status="opening",this.db=new a(this.location),W=this.options.db||R(),void(Q=W(this.location)).open(this.options,function(D){if(D)return L(Z,new v(D),Y);Z.db.setDb(Q),Z.db=Q,Z._status="open",Y&&Y(null,Z),Z.emit("open"),Z.emit("ready")}))},V.prototype.close=function(Y){var Z=this;if(this.isOpen())this._status="closing",this.db.close(function(){Z._status="closed",Z.emit("closed"),Y&&Y.apply(null,arguments)}),this.emit("closing"),this.db=null;else{if("closed"==this._status&&Y)return process.nextTick(Y);"closing"==this._status&&Y?this.once("closed",Y):this._isOpening()&&this.once("open",function(){Z.close(Y)})}},V.prototype.isOpen=function(){return"open"==this._status},V.prototype._isOpening=function(){return"opening"==this._status},V.prototype.isClosed=function(){return/^clos/.test(this._status)},V.prototype.get=function(Y,Z,W){var D,Q=this;return"function"!=typeof(W=H(Z,W))?L(this,new g("get() requires key and callback arguments")):this._isOpening()||this.isOpen()?(Z=T.getOptions(this,Z),D=T.encodeKey(Y,Z),Z.asBuffer=T.isValueAsBuffer(Z),void this.db.get(D,Z,function(o,u){if(o)return o=/notfound/i.test(o)?new y("Key not found in database ["+Y+"]",o):new g(o),L(Q,o,W);if(W){try{u=T.decodeValue(u,Z)}catch(m){return W(new b(m))}W(null,u)}})):L(this,new g("Database is not open"),W)},V.prototype.put=function(Y,Z,W,Q){var o,u,D=this;return Q=H(W,Q),null==Y||null==Z?L(this,new h("put() requires key and value arguments"),Q):this._isOpening()||this.isOpen()?(W=M(this,W),o=T.encodeKey(Y,W),u=T.encodeValue(Z,W),void this.db.put(o,u,W,function(m){if(m)return L(D,new h(m),Q);D.emit("put",Y,Z),Q&&Q()})):L(this,new h("Database is not open"),Q)},V.prototype.del=function(Y,Z,W){var D,Q=this;return W=H(Z,W),null==Y?L(this,new h("del() requires a key argument"),W):this._isOpening()||this.isOpen()?(Z=M(this,Z),D=T.encodeKey(Y,Z),void this.db.del(D,Z,function(o){if(o)return L(Q,new h(o),W);Q.emit("del",Y),W&&W()})):L(this,new h("Database is not open"),W)},V.prototype.batch=function(Y,Z,W){var D,o,u,Q=this;return arguments.length?(W=H(Z,W),Array.isArray(Y)?this._isOpening()||this.isOpen()?(Z=M(this,Z),D=Z.keyEncoding,o=Z.valueEncoding,u=Y.map(function(m){if(void 0===m.type||void 0===m.key)return{};var F,w=m.keyEncoding||D,x=m.valueEncoding||m.encoding||o;return"utf8"!=w&&"binary"!=w||"utf8"!=x&&"binary"!=x?(F={type:m.type,key:T.encodeKey(m.key,Z,m)},void 0!==m.value&&(F.value=T.encodeValue(m.value,Z,m)),F):m}),void this.db.batch(u,Z,function(m){if(m)return L(Q,new h(m),W);Q.emit("batch",Y),W&&W()})):L(this,new h("Database is not open"),W):L(this,new h("batch() requires an array argument"),W)):new N(this)},V.prototype.approximateSize=function(Y,Z,W){var D,o,Q=this;return null==Y||null==Z||"function"!=typeof W?L(this,new g("approximateSize() requires start, end and callback arguments"),W):(D=T.encodeKey(Y,this.options),o=T.encodeKey(Z,this.options),this._isOpening()||this.isOpen()?void this.db.approximateSize(D,o,function(u,m){if(u)return L(Q,new v(u),W);W&&W(null,m)}):L(this,new h("Database is not open"),W))},V.prototype.readStream=V.prototype.createReadStream=function(Y){var Z=this;return Y=E(this.options,Y),new O(Y,this,function(W){return Z.db.iterator(W)})},V.prototype.keyStream=V.prototype.createKeyStream=function(Y){return this.createReadStream(E(Y,{keys:!0,values:!1}))},V.prototype.valueStream=V.prototype.createValueStream=function(Y){return this.createReadStream(E(Y,{keys:!1,values:!0}))},V.prototype.writeStream=V.prototype.createWriteStream=function(Y){return new C(E(Y),this)},V.prototype.toString=function(){return"LevelUP"},ne.exports=V,ne.exports.copy=T.copy,ne.exports.destroy=J("destroy"),ne.exports.repair=J("repair")},31022:(ne,r,d)=>{var l=d(55717).Readable,_=d(26788).inherits,E=d(78677),S=d(24062).EncodingError,a=d(31404),h={keys:!0,values:!0},g=function(O,C){return{key:a.decodeKey(O,this._options),value:a.decodeValue(C,this._options)}},y=function(O){return a.decodeKey(O,this._options)},v=function(O,C){return a.decodeValue(C,this._options)},b=function(){return null};function A(O,C,T){if(!(this instanceof A))return new A(O,C,T);l.call(this,{objectMode:!0,highWaterMark:O.highWaterMark}),this._db=C,O=this._options=E(h,O),this._keyEncoding=O.keyEncoding||O.encoding,this._valueEncoding=O.valueEncoding||O.encoding,typeof this._options.start<"u"&&(this._options.start=a.encodeKey(this._options.start,this._options)),typeof this._options.end<"u"&&(this._options.end=a.encodeKey(this._options.end,this._options)),"number"!=typeof this._options.limit&&(this._options.limit=-1),this._options.keyAsBuffer=a.isKeyAsBuffer(this._options),this._options.valueAsBuffer=a.isValueAsBuffer(this._options),this._makeData=this._options.keys&&this._options.values?g:this._options.keys?y:this._options.values?v:b;var N=this;this._db.isOpen()?this._iterator=T(this._options):this._db.once("ready",function(){N._destroyed||(N._iterator=T(N._options))})}_(A,l),A.prototype._read=function O(){var C=this;if(!C._db.isOpen())return C._db.once("ready",function(){O.call(C)});C._destroyed||C._iterator.next(function(T,N,M){if(T||void 0===N&&void 0===M)return!T&&!C._destroyed&&C.push(null),C._cleanup(T);try{M=C._makeData(N,M)}catch(P){return C._cleanup(new S(P))}C._destroyed||C.push(M)})},A.prototype._cleanup=function(O){if(!this._destroyed){this._destroyed=!0;var C=this;O&&C.emit("error",O),C._iterator?C._iterator.end(function(){C._iterator=null,C.emit("close")}):C.emit("close")}},A.prototype.destroy=function(){this._cleanup()},A.prototype.toString=function(){return"LevelUP.ReadStream"},ne.exports=A},31404:(ne,r,d)=>{var a,H,l=d(78677),_=d(24062).LevelUPError,E=["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le"],S={createIfMissing:!0,errorIfExists:!1,keyEncoding:"utf8",valueEncoding:"utf8",compression:!0},h=function(){function H(J){return null==J||Buffer.isBuffer(J)}var V={};return V.utf8=V["utf-8"]={encode:function(J){return H(J)?J:String(J)},decode:function(J){return J},buffer:!1,type:"utf8"},V.json={encode:JSON.stringify,decode:JSON.parse,buffer:!1,type:"json"},E.forEach(function(J){V[J]||(V[J]={encode:function(Y){return H(Y)?Y:new Buffer(Y,J)},decode:function(Y){return process.browser?Y.toString(J):Y},buffer:!0,type:J})}),V}(),g=(H={},E.forEach(function(V){H[V]={valueEncoding:V}}),H);function O(H,V){var J=V&&V.keyEncoding||H.keyEncoding||"utf8";return h[J]||J}function C(H,V){var J=V&&(V.valueEncoding||V.encoding)||H.valueEncoding||H.encoding||"utf8";return h[J]||J}ne.exports={defaultOptions:S,copy:function y(H,V,J){H.readStream().pipe(V.writeStream()).on("close",J||function(){}).on("error",J||function(Y){throw Y})},getOptions:function v(H,V){var J="string"==typeof V;return!J&&V&&V.encoding&&!V.valueEncoding&&(V.valueEncoding=V.encoding),l(H&&H.options||{},J?g[V]||g[S.valueEncoding]:V)},getLevelDOWN:function b(){if(a)return a;var J,H=d(73619).v6.ct,V="Could not locate LevelDOWN, try `npm install leveldown`";try{J=d(94093).version}catch{throw new _(V)}if(!d(61695).satisfies(J,H))throw new _("Installed version of LevelDOWN ("+J+") does not match required version ("+H+")");try{return a=d(70131)}catch{throw new _(V)}},dispatchError:function A(H,V,J){return"function"==typeof J?J(V):H.emit("error",V)},encodeKey:function T(H,V,J){return O(V,J).encode(H)},encodeValue:function N(H,V,J){return C(V,J).encode(H)},isValueAsBuffer:function R(H,V){return C(H,V).buffer},isKeyAsBuffer:function L(H,V){return O(H,V).buffer},decodeValue:function P(H,V){return C(V).decode(H)},decodeKey:function M(H,V){return O(V).decode(H)}}},95011:(ne,r,d)=>{var l=d(295).Stream,_=d(26788).inherits,E=d(78677),S=d(5259),a=global.setImmediate||process.nextTick,h=d(31404).getOptions,g={type:"put"};function y(v,b){if(!(this instanceof y))return new y(v,b);l.call(this),this._options=E(g,h(b,v)),this._db=b,this._buffer=[],this._status="init",this._end=!1,this.writable=!0,this.readable=!1;var A=this,O=function(){A.writable&&(A._status="ready",A.emit("ready"),A._process())};b.isOpen()?a(O):b.once("ready",O)}_(y,l),y.prototype.write=function(v){return!!this.writable&&(this._buffer.push(v),"init"!=this._status&&this._processDelayed(),!(this._options.maxBufferLength&&this._buffer.length>this._options.maxBufferLength)||(this._writeBlock=!0,!1))},y.prototype.end=function(v){var b=this;v&&this.write(v),a(function(){b._end=!0,b._process()})},y.prototype.destroy=function(){this.writable=!1,this.end()},y.prototype.destroySoon=function(){this.end()},y.prototype.add=function(v){if(v.props)return v.props.Directory?v.pipe(this._db.writeStream(this._options)):(v.props.File||v.File||"File"==v.type)&&this._write(v),!0},y.prototype._processDelayed=function(){var v=this;a(function(){v._process()})},y.prototype._process=function(){var v,b=this;if("ready"==b._status||!b.writable)return b._buffer.length&&b.writable?(b._status="writing",v=b._buffer,b._buffer=[],b._db.batch(v.map(function(O){return{type:O.type||b._options.type,key:O.key,value:O.value,keyEncoding:O.keyEncoding||b._options.keyEncoding,valueEncoding:O.valueEncoding||O.encoding||b._options.valueEncoding}}),function(O){if(b.writable){if("closed"!=b._status&&(b._status="ready"),O)return b.writable=!1,b.emit("error",O);b._process()}}),void(b._writeBlock&&(b._writeBlock=!1,b.emit("drain")))):void(b._end&&"closed"!=b._status&&(b._status="closed",b.writable=!1,b.emit("close")));b._buffer.length&&"closed"!=b._status&&b._processDelayed()},y.prototype._write=function(v){var b=v.path||v.props.path,A=this;b&&v.pipe(S(function(O,C){if(O)return A.writable=!1,A.emit("error",O);A._options.fstreamRoot&&b.indexOf(A._options.fstreamRoot)>-1&&(b=b.substr(A._options.fstreamRoot.length+1)),A.write({key:b,value:C.slice(0)})}))},y.prototype.toString=function(){return"LevelUP.WriteStream"},ne.exports=y},5259:(ne,r,d)=>{var l=d(55717).Duplex;function E(S){if(!(this instanceof E))return new E(S);if(this._bufs=[],this.length=0,"function"==typeof S){this._callback=S;var a=function(h){this._callback&&(this._callback(h),this._callback=null)}.bind(this);this.on("pipe",function(h){h.on("error",a)}),this.on("unpipe",function(h){h.removeListener("error",a)})}else Buffer.isBuffer(S)?this.append(S):Array.isArray(S)&&S.forEach(function(h){Buffer.isBuffer(h)&&this.append(h)}.bind(this));l.call(this)}d(26788).inherits(E,l),E.prototype._offset=function(S){for(var g,a=0,h=0;hthis.length)&&(g=this.length),h>=this.length)return S||new Buffer(0);if(g<=0)return S||new Buffer(0);var T,N,y=!!S,v=this._offset(h),b=g-h,A=b,O=y&&a||0,C=v[1];if(0===h&&g==this.length){if(!y)return Buffer.concat(this._bufs);for(N=0;N(T=this._bufs[N].length-C))){this._bufs[N].copy(S,O,C,C+A);break}this._bufs[N].copy(S,O,C),O+=T,A-=T,C&&(C=0)}return S},E.prototype.toString=function(S,a,h){return this.slice(a,h).toString(S)},E.prototype.consume=function(S){for(;this._bufs.length;){if(!(S>this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(S),this.length-=S;break}S-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},E.prototype.duplicate=function(){for(var S=0,a=new E;S{ne.exports=a;var l=Object.keys||function(y){var v=[];for(var b in y)v.push(b);return v},_=d(26156);_.inherits=d(83894);var E=d(94515),S=d(23699);function a(y){if(!(this instanceof a))return new a(y);E.call(this,y),S.call(this,y),y&&!1===y.readable&&(this.readable=!1),y&&!1===y.writable&&(this.writable=!1),this.allowHalfOpen=!0,y&&!1===y.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}_.inherits(a,E),function g(y,v){for(var b=0,A=y.length;b{ne.exports=E;var l=d(50596),_=d(26156);function E(S){if(!(this instanceof E))return new E(S);l.call(this,S)}_.inherits=d(83894),_.inherits(E,l),E.prototype._transform=function(S,a,h){h(null,S)}},94515:(ne,r,d)=>{ne.exports=y;var l=d(66425),_=d(93172).Buffer;y.ReadableState=g;var E=d(59069).EventEmitter;E.listenerCount||(E.listenerCount=function(o,u){return o.listeners(u).length});var h,S=d(295),a=d(26156);function g(o,u){var m=(o=o||{}).highWaterMark;this.highWaterMark=m||0===m?m:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!o.objectMode,this.defaultEncoding=o.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,o.encoding&&(h||(h=d(15453).s),this.decoder=new h(o.encoding),this.encoding=o.encoding)}function y(o){if(!(this instanceof y))return new y(o);this._readableState=new g(o,this),this.readable=!0,S.call(this)}function v(o,u,m,w,x){var F=function T(o,u){var m=null;return!_.isBuffer(u)&&"string"!=typeof u&&null!=u&&!o.objectMode&&(m=new TypeError("Invalid non-string/buffer chunk")),m}(u,m);if(F)o.emit("error",F);else if(null==m)u.reading=!1,u.ended||function N(o,u){if(u.decoder&&!u.ended){var m=u.decoder.end();m&&m.length&&(u.buffer.push(m),u.length+=u.objectMode?1:m.length)}u.ended=!0,u.length>0?M(o):W(o)}(o,u);else if(u.objectMode||m&&m.length>0)if(u.ended&&!x){var G=new Error("stream.push() after EOF");o.emit("error",G)}else if(u.endEmitted&&x){G=new Error("stream.unshift() after end event");o.emit("error",G)}else u.decoder&&!x&&!w&&(m=u.decoder.write(m)),u.length+=u.objectMode?1:m.length,x?u.buffer.unshift(m):(u.reading=!1,u.buffer.push(m)),u.needReadable&&M(o),function R(o,u){u.readingMore||(u.readingMore=!0,process.nextTick(function(){!function L(o,u){for(var m=u.length;!u.reading&&!u.flowing&&!u.ended&&u.lengthu.highWaterMark&&(u.highWaterMark=function O(o){if(o>=A)o=A;else{o--;for(var u=1;u<32;u<<=1)o|=o>>u;o++}return o}(o)),o>u.length?u.ended?u.length:(u.needReadable=!0,0):o)}function M(o){var u=o._readableState;u.needReadable=!1,!u.emittedReadable&&(u.emittedReadable=!0,u.sync?process.nextTick(function(){P(o)}):P(o))}function P(o){o.emit("readable")}function V(o){var m,u=o._readableState;function w(x,F,G){!1===x.write(m)&&u.awaitDrain++}for(u.awaitDrain=0;u.pipesCount&&null!==(m=o.read());)if(1===u.pipesCount?w(u.pipes):Q(u.pipes,w),o.emit("data",m),u.awaitDrain>0)return;if(0===u.pipesCount)return u.flowing=!1,void(E.listenerCount(o,"data")>0&&Y(o));u.ranOut=!0}function J(){this._readableState.ranOut&&(this._readableState.ranOut=!1,V(this))}function Y(o,u){if(o._readableState.flowing)throw new Error("Cannot switch to old mode now.");var w=u||!1,x=!1;o.readable=!0,o.pipe=S.prototype.pipe,o.on=o.addListener=S.prototype.on,o.on("readable",function(){x=!0;for(var F;!w&&null!==(F=o.read());)o.emit("data",F);null===F&&(x=!1,o._readableState.needReadable=!0)}),o.pause=function(){w=!0,this.emit("pause")},o.resume=function(){w=!1,x?process.nextTick(function(){o.emit("readable")}):this.read(0),this.emit("resume")},o.emit("readable")}function Z(o,u){var G,m=u.buffer,w=u.length,x=!!u.decoder,F=!!u.objectMode;if(0===m.length)return null;if(0===w)G=null;else if(F)G=m.shift();else if(!o||o>=w)G=x?m.join(""):_.concat(m,w),m.length=0;else if(o0)throw new Error("endReadable called on non-empty stream");!u.endEmitted&&u.calledRead&&(u.ended=!0,process.nextTick(function(){!u.endEmitted&&0===u.length&&(u.endEmitted=!0,o.readable=!1,o.emit("end"))}))}function Q(o,u){for(var m=0,w=o.length;m0)&&(u.emittedReadable=!1),0===o&&u.needReadable&&(u.length>=u.highWaterMark||u.ended))return M(this),null;if(0===(o=C(o,u))&&u.ended)return w=null,u.length>0&&u.decoder&&(w=Z(o,u),u.length-=w.length),0===u.length&&W(this),w;var x=u.needReadable;return u.length-o<=u.highWaterMark&&(x=!0),(u.ended||u.reading)&&(x=!1),x&&(u.reading=!0,u.sync=!0,0===u.length&&(u.needReadable=!0),this._read(u.highWaterMark),u.sync=!1),x&&!u.reading&&(o=C(m,u)),null===(w=o>0?Z(o,u):null)&&(u.needReadable=!0,o=0),u.length-=o,0===u.length&&!u.ended&&(u.needReadable=!0),u.ended&&!u.endEmitted&&0===u.length&&W(this),w},y.prototype._read=function(o){this.emit("error",new Error("not implemented"))},y.prototype.pipe=function(o,u){var m=this,w=this._readableState;switch(w.pipesCount){case 0:w.pipes=o;break;case 1:w.pipes=[w.pipes,o];break;default:w.pipes.push(o)}w.pipesCount+=1;var F=(!u||!1!==u.end)&&o!==process.stdout&&o!==process.stderr?k:B;function G(we){we===m&&B()}function k(){o.end()}w.endEmitted?process.nextTick(F):m.once("end",F),o.on("unpipe",G);var p=function H(o){return function(){var m=o._readableState;m.awaitDrain--,0===m.awaitDrain&&V(o)}}(m);function B(){o.removeListener("close",te),o.removeListener("finish",ee),o.removeListener("drain",p),o.removeListener("error",ie),o.removeListener("unpipe",G),m.removeListener("end",k),m.removeListener("end",B),(!o._writableState||o._writableState.needDrain)&&p()}function ie(we){ue(),o.removeListener("error",ie),0===E.listenerCount(o,"error")&&o.emit("error",we)}function te(){o.removeListener("finish",ee),ue()}function ee(){o.removeListener("close",te),ue()}function ue(){m.unpipe(o)}return o.on("drain",p),o._events&&o._events.error?l(o._events.error)?o._events.error.unshift(ie):o._events.error=[ie,o._events.error]:o.on("error",ie),o.once("close",te),o.once("finish",ee),o.emit("pipe",m),w.flowing||(this.on("readable",J),w.flowing=!0,process.nextTick(function(){V(m)})),o},y.prototype.unpipe=function(o){var u=this._readableState;if(0===u.pipesCount)return this;if(1===u.pipesCount)return o&&o!==u.pipes||(o||(o=u.pipes),u.pipes=null,u.pipesCount=0,this.removeListener("readable",J),u.flowing=!1,o&&o.emit("unpipe",this)),this;if(!o){var m=u.pipes,w=u.pipesCount;u.pipes=null,u.pipesCount=0,this.removeListener("readable",J),u.flowing=!1;for(var x=0;x"u"&&(this[x]=function(G){return function(){return o[G].apply(o,arguments)}}(x));return Q(["error","close","destroy","pause","resume"],function(G){o.on(G,w.emit.bind(w,G))}),w._read=function(G){m&&(m=!1,o.resume())},w},y._fromList=Z},50596:(ne,r,d)=>{ne.exports=a;var l=d(66958),_=d(26156);function E(g,y){this.afterTransform=function(v,b){return function S(g,y,v){var b=g._transformState;b.transforming=!1;var A=b.writecb;if(!A)return g.emit("error",new Error("no writecb in Transform class"));b.writechunk=null,b.writecb=null,null!=v&&g.push(v),A&&A(y);var O=g._readableState;O.reading=!1,(O.needReadable||O.length{ne.exports=h;var l=d(93172).Buffer;h.WritableState=a;var _=d(26156);_.inherits=d(83894);var E=d(295);function S(V,J,Y){this.chunk=V,this.encoding=J,this.callback=Y}function a(V,J){var Y=(V=V||{}).highWaterMark;this.highWaterMark=Y||0===Y?Y:16384,this.objectMode=!!V.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var Z=!1===V.decodeStrings;this.decodeStrings=!Z,this.defaultEncoding=V.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){!function T(V,J){var Y=V._writableState,Z=Y.sync,W=Y.writecb;if(function C(V){V.writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0}(Y),J)!function O(V,J,Y,Z,W){Y?process.nextTick(function(){W(Z)}):W(Z),V._writableState.errorEmitted=!0,V.emit("error",Z)}(V,0,Z,J,W);else{var Q=R(V,Y);!Q&&!Y.bufferProcessing&&Y.buffer.length&&function P(V,J){J.bufferProcessing=!0;for(var Y=0;Y{var l=d(295);(r=ne.exports=d(94515)).Stream=l,r.Readable=r,r.Writable=d(23699),r.Duplex=d(66958),r.Transform=d(50596),r.PassThrough=d(44467),!process.browser&&"disable"===process.env.READABLE_STREAM&&(ne.exports=d(295))},88222:(ne,r,d)=>{ne=d.nmd(ne);var l=200,_="__lodash_hash_undefined__",E=1,S=2,a=9007199254740991,h="[object Arguments]",g="[object Array]",y="[object AsyncFunction]",v="[object Boolean]",b="[object Date]",A="[object Error]",O="[object Function]",C="[object GeneratorFunction]",T="[object Map]",N="[object Number]",M="[object Null]",P="[object Object]",R="[object Promise]",L="[object Proxy]",H="[object RegExp]",V="[object Set]",J="[object String]",Y="[object Symbol]",Z="[object Undefined]",W="[object WeakMap]",Q="[object ArrayBuffer]",D="[object DataView]",ie=/^\[object .+?Constructor\]$/,te=/^(?:0|[1-9]\d*)$/,ee={};ee["[object Float32Array]"]=ee["[object Float64Array]"]=ee["[object Int8Array]"]=ee["[object Int16Array]"]=ee["[object Int32Array]"]=ee["[object Uint8Array]"]=ee["[object Uint8ClampedArray]"]=ee["[object Uint16Array]"]=ee["[object Uint32Array]"]=!0,ee[h]=ee[g]=ee[Q]=ee[v]=ee[D]=ee[b]=ee[A]=ee[O]=ee[T]=ee[N]=ee[P]=ee[H]=ee[V]=ee[J]=ee[W]=!1;var ue="object"==typeof global&&global&&global.Object===Object&&global,we="object"==typeof self&&self&&self.Object===Object&&self,me=ue||we||Function("return this")(),ve=r&&!r.nodeType&&r,ce=ve&&ne&&!ne.nodeType&&ne,he=ce&&ce.exports===ve,le=he&&ue.process,de=function(){try{return le&&le.binding&&le.binding("util")}catch{}}(),ae=de&&de.isTypedArray;function Pe(tt,mt){for(var $t=-1,_n=null==tt?0:tt.length;++$t<_n;)if(mt(tt[$t],$t,tt))return!0;return!1}function Ue(tt,mt){return tt.has(mt)}function Ze(tt){var mt=-1,$t=Array(tt.size);return tt.forEach(function(_n,Gr){$t[++mt]=[Gr,_n]}),$t}function Pt(tt){var mt=-1,$t=Array(tt.size);return tt.forEach(function(_n){$t[++mt]=_n}),$t}var tt,nt=Array.prototype,rt=Function.prototype,Lt=Object.prototype,Re=me["__core-js_shared__"],Ae=rt.toString,xe=Lt.hasOwnProperty,je=(tt=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"",He=Lt.toString,lt=RegExp("^"+Ae.call(xe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Je=he?me.Buffer:void 0,at=me.Symbol,fn=me.Uint8Array,ct=Lt.propertyIsEnumerable,dt=nt.splice,yn=at?at.toStringTag:void 0,ht=Object.getOwnPropertySymbols,It=Je?Je.isBuffer:void 0,or=function $e(tt,mt){return function($t){return tt(mt($t))}}(Object.keys,Object),Dt=dr(me,"DataView"),Mt=dr(me,"Map"),In=dr(me,"Promise"),yt=dr(me,"Set"),wt=dr(me,"WeakMap"),Pn=dr(Object,"create"),vt=go(Dt),St=go(Mt),Fn=go(In),pt=go(yt),At=go(wt),Ie=at?at.prototype:void 0,Se=Ie?Ie.valueOf:void 0;function De(tt){var mt=-1,$t=null==tt?0:tt.length;for(this.clear();++mt<$t;){var _n=tt[mt];this.set(_n[0],_n[1])}}function qe(tt){var mt=-1,$t=null==tt?0:tt.length;for(this.clear();++mt<$t;){var _n=tt[mt];this.set(_n[0],_n[1])}}function Kt(tt){var mt=-1,$t=null==tt?0:tt.length;for(this.clear();++mt<$t;){var _n=tt[mt];this.set(_n[0],_n[1])}}function jt(tt){var mt=-1,$t=null==tt?0:tt.length;for(this.__data__=new Kt;++mt<$t;)this.add(tt[mt])}function Ht(tt){var mt=this.__data__=new qe(tt);this.size=mt.size}function kt(tt,mt){var $t=zo(tt),_n=!$t&&us(tt),Gr=!$t&&!_n&&Ma(tt),cr=!$t&&!_n&&!Gr&&Dl(tt),qr=$t||_n||Gr||cr,ri=qr?function Ge(tt,mt){for(var $t=-1,_n=Array(tt);++$tri))return!1;var Zr=cr.get(tt);if(Zr&&cr.get(mt))return Zr==mt;var Xn=-1,so=!0,Di=$t&S?new jt:void 0;for(cr.set(tt,mt),cr.set(mt,tt);++Xn-1},qe.prototype.set=function Qt(tt,mt){var $t=this.__data__,_n=Bt($t,tt);return _n<0?(++this.size,$t.push([tt,mt])):$t[_n][1]=mt,this},Kt.prototype.clear=function sn(){this.size=0,this.__data__={hash:new De,map:new(Mt||qe),string:new De}},Kt.prototype.delete=function qt(tt){var mt=wr(this,tt).delete(tt);return this.size-=mt?1:0,mt},Kt.prototype.get=function pn(tt){return wr(this,tt).get(tt)},Kt.prototype.has=function ln(tt){return wr(this,tt).has(tt)},Kt.prototype.set=function Xt(tt,mt){var $t=wr(this,tt),_n=$t.size;return $t.set(tt,mt),this.size+=$t.size==_n?0:1,this},jt.prototype.add=jt.prototype.push=function on(tt){return this.__data__.set(tt,_),this},jt.prototype.has=function Wt(tt){return this.__data__.has(tt)},Ht.prototype.clear=function un(){this.__data__=new qe,this.size=0},Ht.prototype.delete=function Gt(tt){var mt=this.__data__,$t=mt.delete(tt);return this.size=mt.size,$t},Ht.prototype.get=function Et(tt){return this.__data__.get(tt)},Ht.prototype.has=function bt(tt){return this.__data__.has(tt)},Ht.prototype.set=function Zt(tt,mt){var $t=this.__data__;if($t instanceof qe){var _n=$t.__data__;if(!Mt||_n.length-1&&tt%1==0&&tt-1&&tt%1==0&&tt<=a}function nu(tt){var mt=typeof tt;return null!=tt&&("object"==mt||"function"==mt)}function ru(tt){return null!=tt&&"object"==typeof tt}var Dl=ae?function Ve(tt){return function(mt){return tt(mt)}}(ae):function Jn(tt){return ru(tt)&&Il(tt.length)&&!!ee[Cn(tt)]};function Cl(tt){return function zu(tt){return null!=tt&&Il(tt.length)&&!Lf(tt)}(tt)?kt(tt):ur(tt)}ne.exports=function cs(tt,mt){return Bn(tt,mt)}},54689:function(ne,r){!function(d){const l=Symbol("newer"),_=Symbol("older");class E{constructor(v,b){"number"!=typeof v&&(b=v,v=0),this.size=0,this.limit=v,this.oldest=this.newest=void 0,this._keymap=new Map,b&&(this.assign(b),v<1&&(this.limit=this.size))}_markEntryAsUsed(v){v!==this.newest&&(v[l]&&(v===this.oldest&&(this.oldest=v[l]),v[l][_]=v[_]),v[_]&&(v[_][l]=v[l]),v[l]=void 0,v[_]=this.newest,this.newest&&(this.newest[l]=v),this.newest=v)}assign(v){let b,A=this.limit||Number.MAX_VALUE;this._keymap.clear();let O=v[Symbol.iterator]();for(let C=O.next();!C.done;C=O.next()){let T=new S(C.value[0],C.value[1]);if(this._keymap.set(T.key,T),b?(b[l]=T,T[_]=b):this.oldest=T,b=T,0==A--)throw new Error("overflow")}this.newest=b,this.size=this._keymap.size}get(v){var b=this._keymap.get(v);return b?(this._markEntryAsUsed(b),b.value):void 0}set(v,b){var A=this._keymap.get(v);return A?(A.value=b,this._markEntryAsUsed(A),this):(this._keymap.set(v,A=new S(v,b)),this.newest?(this.newest[l]=A,A[_]=this.newest):this.oldest=A,this.newest=A,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var v=this.oldest;if(v)return this.oldest[l]?(this.oldest=this.oldest[l],this.oldest[_]=void 0):(this.oldest=void 0,this.newest=void 0),v[l]=v[_]=void 0,this._keymap.delete(v.key),--this.size,[v.key,v.value]}find(v){let b=this._keymap.get(v);return b?b.value:void 0}has(v){return this._keymap.has(v)}delete(v){var b=this._keymap.get(v);return b?(this._keymap.delete(b.key),b[l]&&b[_]?(b[_][l]=b[l],b[l][_]=b[_]):b[l]?(b[l][_]=void 0,this.oldest=b[l]):b[_]?(b[_][l]=void 0,this.newest=b[_]):this.oldest=this.newest=void 0,this.size--,b.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new h(this.oldest)}values(){return new g(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(v,b){"object"!=typeof b&&(b=this);let A=this.oldest;for(;A;)v.call(b,A.value,A.key,this),A=A[l]}toJSON(){for(var v=new Array(this.size),b=0,A=this.oldest;A;)v[b++]={key:A.key,value:A.value},A=A[l];return v}toString(){for(var v="",b=this.oldest;b;)v+=String(b.key)+":"+b.value,(b=b[l])&&(v+=" < ");return v}}function S(y,v){this.key=y,this.value=v,this[l]=void 0,this[_]=void 0}function a(y){this.entry=y}function h(y){this.entry=y}function g(y){this.entry=y}d.LRUMap=E,a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let y=this.entry;return y?(this.entry=y[l],{done:!1,value:[y.key,y.value]}):{done:!0,value:void 0}},h.prototype[Symbol.iterator]=function(){return this},h.prototype.next=function(){let y=this.entry;return y?(this.entry=y[l],{done:!1,value:y.key}):{done:!0,value:void 0}},g.prototype[Symbol.iterator]=function(){return this},g.prototype.next=function(){let y=this.entry;return y?(this.entry=y[l],{done:!1,value:y.value}):{done:!0,value:void 0}}}(r)},52820:(ne,r)=>{function d(O){return void 0!==O&&""!==O}function l(O,C){return Object.hasOwnProperty.call(O,C)}function _(O,C){return Object.hasOwnProperty.call(O,C)&&C}r.compare=function(O,C){if(Buffer.isBuffer(O)){for(var T=Math.min(O.length,C.length),N=0;NC?1:0};var E=r.lowerBoundKey=function(O){return _(O,"gt")||_(O,"gte")||_(O,"min")||(O.reverse?_(O,"end"):_(O,"start"))||void 0},S=r.lowerBound=function(O,C){var T=E(O);return T?O[T]:C},a=r.lowerBoundInclusive=function(O){return!l(O,"gt")},h=r.upperBoundInclusive=function(O){return!l(O,"lt")},g=r.lowerBoundExclusive=function(O){return!a(O)},y=r.upperBoundExclusive=function(O){return!h(O)},v=r.upperBoundKey=function(O){return _(O,"lt")||_(O,"lte")||_(O,"max")||(O.reverse?_(O,"start"):_(O,"end"))||void 0},b=r.upperBound=function(O,C){var T=v(O);return T?O[T]:C};function A(O){return O}r.start=function(O,C){return O.reverse?b(O,C):S(O,C)},r.end=function(O,C){return O.reverse?S(O,C):b(O,C)},r.startInclusive=function(O){return O.reverse?h(O):a(O)},r.endInclusive=function(O){return O.reverse?a(O):h(O)},r.toLtgt=function(O,C,T,N,M){C=C||{},T=T||A;var P=arguments.length>3,R=r.lowerBoundKey(O),L=r.upperBoundKey(O);return R?"gt"===R?C.gt=T(O.gt,!1):C.gte=T(O[R],!1):P&&(C.gte=T(N,!1)),L?"lt"===L?C.lt=T(O.lt,!0):C.lte=T(O[L],!0):P&&(C.lte=T(M,!0)),null!=O.reverse&&(C.reverse=!!O.reverse),l(C,"max")&&delete C.max,l(C,"min")&&delete C.min,l(C,"start")&&delete C.start,l(C,"end")&&delete C.end,C},r.contains=function(O,C,T){T=T||r.compare;var N=S(O);if(d(N)&&((M=T(C,N))<0||0===M&&g(O)))return!1;var M,P=b(O);if(d(P)&&((M=T(C,P))>0||0===M&&y(O)))return!1;return!0},r.filter=function(O,C){return function(T){return r.contains(O,T,C)}}},8095:(ne,r,d)=>{"use strict";var l=d(83894),_=d(39650),E=d(73502).Buffer,S=new Array(16);function a(){_.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(A,O){return A<>>32-O}function g(A,O,C,T,N,M,P){return h(A+(O&C|~O&T)+N+M|0,P)+O|0}function y(A,O,C,T,N,M,P){return h(A+(O&T|C&~T)+N+M|0,P)+O|0}function v(A,O,C,T,N,M,P){return h(A+(O^C^T)+N+M|0,P)+O|0}function b(A,O,C,T,N,M,P){return h(A+(C^(O|~T))+N+M|0,P)+O|0}l(a,_),a.prototype._update=function(){for(var A=S,O=0;O<16;++O)A[O]=this._block.readInt32LE(4*O);var C=this._a,T=this._b,N=this._c,M=this._d;C=g(C,T,N,M,A[0],3614090360,7),M=g(M,C,T,N,A[1],3905402710,12),N=g(N,M,C,T,A[2],606105819,17),T=g(T,N,M,C,A[3],3250441966,22),C=g(C,T,N,M,A[4],4118548399,7),M=g(M,C,T,N,A[5],1200080426,12),N=g(N,M,C,T,A[6],2821735955,17),T=g(T,N,M,C,A[7],4249261313,22),C=g(C,T,N,M,A[8],1770035416,7),M=g(M,C,T,N,A[9],2336552879,12),N=g(N,M,C,T,A[10],4294925233,17),T=g(T,N,M,C,A[11],2304563134,22),C=g(C,T,N,M,A[12],1804603682,7),M=g(M,C,T,N,A[13],4254626195,12),N=g(N,M,C,T,A[14],2792965006,17),C=y(C,T=g(T,N,M,C,A[15],1236535329,22),N,M,A[1],4129170786,5),M=y(M,C,T,N,A[6],3225465664,9),N=y(N,M,C,T,A[11],643717713,14),T=y(T,N,M,C,A[0],3921069994,20),C=y(C,T,N,M,A[5],3593408605,5),M=y(M,C,T,N,A[10],38016083,9),N=y(N,M,C,T,A[15],3634488961,14),T=y(T,N,M,C,A[4],3889429448,20),C=y(C,T,N,M,A[9],568446438,5),M=y(M,C,T,N,A[14],3275163606,9),N=y(N,M,C,T,A[3],4107603335,14),T=y(T,N,M,C,A[8],1163531501,20),C=y(C,T,N,M,A[13],2850285829,5),M=y(M,C,T,N,A[2],4243563512,9),N=y(N,M,C,T,A[7],1735328473,14),C=v(C,T=y(T,N,M,C,A[12],2368359562,20),N,M,A[5],4294588738,4),M=v(M,C,T,N,A[8],2272392833,11),N=v(N,M,C,T,A[11],1839030562,16),T=v(T,N,M,C,A[14],4259657740,23),C=v(C,T,N,M,A[1],2763975236,4),M=v(M,C,T,N,A[4],1272893353,11),N=v(N,M,C,T,A[7],4139469664,16),T=v(T,N,M,C,A[10],3200236656,23),C=v(C,T,N,M,A[13],681279174,4),M=v(M,C,T,N,A[0],3936430074,11),N=v(N,M,C,T,A[3],3572445317,16),T=v(T,N,M,C,A[6],76029189,23),C=v(C,T,N,M,A[9],3654602809,4),M=v(M,C,T,N,A[12],3873151461,11),N=v(N,M,C,T,A[15],530742520,16),C=b(C,T=v(T,N,M,C,A[2],3299628645,23),N,M,A[0],4096336452,6),M=b(M,C,T,N,A[7],1126891415,10),N=b(N,M,C,T,A[14],2878612391,15),T=b(T,N,M,C,A[5],4237533241,21),C=b(C,T,N,M,A[12],1700485571,6),M=b(M,C,T,N,A[3],2399980690,10),N=b(N,M,C,T,A[10],4293915773,15),T=b(T,N,M,C,A[1],2240044497,21),C=b(C,T,N,M,A[8],1873313359,6),M=b(M,C,T,N,A[15],4264355552,10),N=b(N,M,C,T,A[6],2734768916,15),T=b(T,N,M,C,A[13],1309151649,21),C=b(C,T,N,M,A[4],4149444226,6),M=b(M,C,T,N,A[11],3174756917,10),N=b(N,M,C,T,A[2],718787259,15),T=b(T,N,M,C,A[9],3951481745,21),this._a=this._a+C|0,this._b=this._b+T|0,this._c=this._c+N|0,this._d=this._d+M|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=E.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},ne.exports=a},17079:(ne,r,d)=>{var l=d(1378),_=d(37950);function E(S){this.rand=S||new _.Rand}ne.exports=E,E.create=function(a){return new E(a)},E.prototype._randbelow=function(a){var h=a.bitLength(),g=Math.ceil(h/8);do{var y=new l(this.rand.generate(g))}while(y.cmp(a)>=0);return y},E.prototype._randrange=function(a,h){var g=h.sub(a);return a.add(this._randbelow(g))},E.prototype.test=function(a,h,g){var y=a.bitLength(),v=l.mont(a),b=new l(1).toRed(v);h||(h=Math.max(1,y/48|0));for(var A=a.subn(1),O=0;!A.testn(O);O++);for(var C=a.shrn(O),T=A.toRed(v);h>0;h--){var M=this._randrange(new l(2),A);g&&g(M);var P=M.toRed(v).redPow(C);if(0!==P.cmp(b)&&0!==P.cmp(T)){for(var R=1;R0;h--){var T=this._randrange(new l(2),b),N=a.gcd(T);if(0!==N.cmpn(1))return N;var M=T.toRed(y).redPow(O);if(0!==M.cmp(v)&&0!==M.cmp(C)){for(var P=1;P=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},32391:ne=>{function r(d,l){if(!d)throw new Error(l||"Assertion failed")}ne.exports=r,r.equal=function(l,_,E){if(l!=_)throw new Error(E||"Assertion failed: "+l+" != "+_)}},58195:(ne,r)=>{"use strict";var d=r;function _(S){return 1===S.length?"0"+S:S}function E(S){for(var a="",h=0;h>8,b=255&y;v?h.push(v,b):h.push(b)}return h},d.zero2=_,d.toHex=E,d.encode=function(a,h){return"hex"===h?E(a):a}},11346:function(ne){ne.exports=function(){"use strict";var r=Object.prototype.toString,d=Array.isArray||function(Q){return"[object Array]"===r.call(Q)};function l(W){return"function"==typeof W}function _(W){return d(W)?"array":typeof W}function E(W){return W.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function S(W,Q){return null!=W&&"object"==typeof W&&Q in W}function a(W,Q){return null!=W&&"object"!=typeof W&&W.hasOwnProperty&&W.hasOwnProperty(Q)}var h=RegExp.prototype.test;function g(W,Q){return h.call(W,Q)}var y=/\S/;function v(W){return!g(y,W)}var b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function A(W){return String(W).replace(/[&<>"'`=\/]/g,function(D){return b[D]})}var O=/\s*/,C=/\s+/,T=/\s*=/,N=/\s*\}/,M=/#|\^|\/|>|\{|&|=|!/;function P(W,Q){if(!W)return[];var p,B,ie,D=!1,o=[],u=[],m=[],w=!1,x=!1,F="",G=0;function k(){if(w&&!x)for(;m.length;)delete u[m.pop()];else m=[];w=!1,x=!1}function te(ae){if("string"==typeof ae&&(ae=ae.split(C,2)),!d(ae)||2!==ae.length)throw new Error("Invalid tags: "+ae);p=new RegExp(E(ae[0])+"\\s*"),B=new RegExp("\\s*"+E(ae[1])),ie=new RegExp("\\s*"+E("}"+ae[1]))}te(Q||Y.tags);for(var ue,we,me,ve,ce,he,ee=new H(W);!ee.eos();){if(ue=ee.pos,me=ee.scanUntil(p))for(var le=0,de=me.length;le0?o[o.length-1][4]:Q;break;default:D.push(u)}return Q}function H(W){this.string=W,this.tail=W,this.pos=0}function V(W,Q){this.view=W,this.cache={".":this.view},this.parent=Q}function J(){this.templateCache={_cache:{},set:function(Q,D){this._cache[Q]=D},get:function(Q){return this._cache[Q]},clear:function(){this._cache={}}}}H.prototype.eos=function(){return""===this.tail},H.prototype.scan=function(Q){var D=this.tail.match(Q);if(!D||0!==D.index)return"";var o=D[0];return this.tail=this.tail.substring(o.length),this.pos+=o.length,o},H.prototype.scanUntil=function(Q){var o,D=this.tail.search(Q);switch(D){case-1:o=this.tail,this.tail="";break;case 0:o="";break;default:o=this.tail.substring(0,D),this.tail=this.tail.substring(D)}return this.pos+=o.length,o},V.prototype.push=function(Q){return new V(Q,this)},V.prototype.lookup=function(Q){var o,D=this.cache;if(D.hasOwnProperty(Q))o=D[Q];else{for(var m,w,x,u=this,F=!1;u;){if(Q.indexOf(".")>0)for(m=u.view,w=Q.split("."),x=0;null!=m&&x"===F?G=this.renderPartial(x,D,o,m):"&"===F?G=this.unescapedValue(x,D):"name"===F?G=this.escapedValue(x,D,m):"text"===F&&(G=this.rawValue(x)),void 0!==G&&(w+=G);return w},J.prototype.renderSection=function(Q,D,o,u,m){var w=this,x="",F=D.lookup(Q[1]);function G(B){return w.render(B,D,o,m)}if(F){if(d(F))for(var k=0,p=F.length;k0||!o)&&(m[w]=u+m[w]);return m.join("\n")},J.prototype.renderPartial=function(Q,D,o,u){if(o){var m=this.getConfigTags(u),w=l(o)?o(Q[1]):o[Q[1]];if(null!=w){var x=Q[6],F=Q[5],G=Q[4],k=w;0==F&&G&&(k=this.indentPartial(w,G,x));var p=this.parse(k,m);return this.renderTokens(p,D,o,k,u)}}},J.prototype.unescapedValue=function(Q,D){var o=D.lookup(Q[1]);if(null!=o)return o},J.prototype.escapedValue=function(Q,D,o){var u=this.getConfigEscape(o)||Y.escape,m=D.lookup(Q[1]);if(null!=m)return"number"==typeof m&&u===Y.escape?String(m):u(m)},J.prototype.rawValue=function(Q){return Q[1]},J.prototype.getConfigTags=function(Q){return d(Q)?Q:Q&&"object"==typeof Q?Q.tags:void 0},J.prototype.getConfigEscape=function(Q){if(Q&&"object"==typeof Q&&!d(Q))return Q.escape};var Y={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(W){Z.templateCache=W},get templateCache(){return Z.templateCache}},Z=new J;return Y.clearCache=function(){return Z.clearCache()},Y.parse=function(Q,D){return Z.parse(Q,D)},Y.render=function(Q,D,o,u){if("string"!=typeof Q)throw new TypeError('Invalid template! Template should be a "string" but "'+_(Q)+'" was given as the first argument for mustache#render(template, view, partials)');return Z.render(Q,D,o,u)},Y.escape=A,Y.Scanner=H,Y.Context=V,Y.Writer=J,Y}()},84778:(ne,r)=>{"use strict";var E;Object.defineProperty(r,"__esModule",{value:!0}),r.AbiSerializationType=r.AbiFunctionModifier=r.AbiFunctionKind=r.SCHEMA_VERSION=void 0,r.SCHEMA_VERSION="0.3.0",(E=r.AbiFunctionKind||(r.AbiFunctionKind={})).View="view",E.Call="call",function(E){E.Init="init",E.Private="private",E.Payable="payable"}(r.AbiFunctionModifier||(r.AbiFunctionModifier={})),function(E){E.Json="json",E.Borsh="borsh"}(r.AbiSerializationType||(r.AbiSerializationType={}))},81818:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Account=void 0;var l=d(74931);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return l.Account}})},73648:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UrlAccountCreator=r.LocalAccountCreator=r.AccountCreator=void 0;var l=d(74931);Object.defineProperty(r,"AccountCreator",{enumerable:!0,get:function(){return l.AccountCreator}}),Object.defineProperty(r,"LocalAccountCreator",{enumerable:!0,get:function(){return l.LocalAccountCreator}}),Object.defineProperty(r,"UrlAccountCreator",{enumerable:!0,get:function(){return l.UrlAccountCreator}})},73369:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MultisigStateStatus=r.MultisigDeleteRequestRejectionError=r.MULTISIG_CONFIRM_METHODS=r.MULTISIG_CHANGE_METHODS=r.MULTISIG_DEPOSIT=r.MULTISIG_GAS=r.MULTISIG_ALLOWANCE=r.MULTISIG_STORAGE_KEY=r.AccountMultisig=r.Account2FA=void 0;var l=d(74931);Object.defineProperty(r,"Account2FA",{enumerable:!0,get:function(){return l.Account2FA}}),Object.defineProperty(r,"AccountMultisig",{enumerable:!0,get:function(){return l.AccountMultisig}}),Object.defineProperty(r,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(r,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(r,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(r,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(r,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(r,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}}),Object.defineProperty(r,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return l.MultisigDeleteRequestRejectionError}}),Object.defineProperty(r,"MultisigStateStatus",{enumerable:!0,get:function(){return l.MultisigStateStatus}})},33759:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.connect=void 0;const _=d(58010);r.connect=function E(S){return l(this,void 0,void 0,function*(){return new _.Near(S)})}},71836:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(a,h,g,y){void 0===y&&(y=g);var v=Object.getOwnPropertyDescriptor(h,g);(!v||("get"in v?!h.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return h[g]}}),Object.defineProperty(a,y,v)}:function(a,h,g,y){void 0===y&&(y=g),a[y]=h[g]}),_=this&&this.__setModuleDefault||(Object.create?function(a,h){Object.defineProperty(a,"default",{enumerable:!0,value:h})}:function(a,h){a.default=h}),E=this&&this.__importStar||function(a){if(a&&a.__esModule)return a;var h={};if(null!=a)for(var g in a)"default"!==g&&Object.prototype.hasOwnProperty.call(a,g)&&l(h,a,g);return _(h,a),h},S=this&&this.__exportStar||function(a,h){for(var g in a)"default"!==g&&!Object.prototype.hasOwnProperty.call(h,g)&&l(h,a,g)};Object.defineProperty(r,"__esModule",{value:!0}),r.keyStores=void 0,r.keyStores=E(d(57372)),S(d(45957),r),S(d(33759),r),d(4073)},45957:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(P,R,L,H){void 0===H&&(H=L);var V=Object.getOwnPropertyDescriptor(R,L);(!V||("get"in V?!R.__esModule:V.writable||V.configurable))&&(V={enumerable:!0,get:function(){return R[L]}}),Object.defineProperty(P,H,V)}:function(P,R,L,H){void 0===H&&(H=L),P[H]=R[L]}),_=this&&this.__setModuleDefault||(Object.create?function(P,R){Object.defineProperty(P,"default",{enumerable:!0,value:R})}:function(P,R){P.default=R}),E=this&&this.__importStar||function(P){if(P&&P.__esModule)return P;var R={};if(null!=P)for(var L in P)"default"!==L&&Object.prototype.hasOwnProperty.call(P,L)&&l(R,P,L);return _(R,P),R};Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=r.Near=r.KeyPair=r.Signer=r.InMemorySigner=r.Contract=r.Connection=r.Account=r.multisig=r.validators=r.transactions=r.utils=r.providers=r.accountCreator=void 0;const S=E(d(91311));r.providers=S;const a=E(d(8127));r.utils=a;const h=E(d(45733));r.transactions=h;const g=E(d(51631));r.validators=g;const y=d(81818);Object.defineProperty(r,"Account",{enumerable:!0,get:function(){return y.Account}});const v=E(d(73369));r.multisig=v;const b=E(d(73648));r.accountCreator=b;const A=d(12592);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return A.Connection}});const O=d(60351);Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return O.Signer}}),Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return O.InMemorySigner}});const C=d(99676);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return C.Contract}});const T=d(46358);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return T.KeyPair}});const N=d(58010);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return N.Near}});const M=d(47601);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return M.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return M.WalletConnection}})},12592:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Connection=void 0;var l=d(74931);Object.defineProperty(r,"Connection",{enumerable:!0,get:function(){return l.Connection}})},99676:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Contract=void 0;var l=d(74931);Object.defineProperty(r,"Contract",{enumerable:!0,get:function(){return l.Contract}})},57372:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.BrowserLocalStorageKeyStore=r.InMemoryKeyStore=r.KeyStore=void 0;const l=d(35598);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const _=d(56724);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return _.InMemoryKeyStore}});const E=d(82869);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const S=d(7221);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return S.MergeKeyStore}})},82869:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BrowserLocalStorageKeyStore=void 0;var l=d(93271);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return l.BrowserLocalStorageKeyStore}})},56724:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InMemoryKeyStore=void 0;var l=d(69170);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return l.InMemoryKeyStore}})},91001:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=r.UnencryptedFileSystemKeyStore=r.BrowserLocalStorageKeyStore=r.InMemoryKeyStore=r.KeyStore=void 0;const l=d(35598);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}});const _=d(56724);Object.defineProperty(r,"InMemoryKeyStore",{enumerable:!0,get:function(){return _.InMemoryKeyStore}});const E=d(82869);Object.defineProperty(r,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return E.BrowserLocalStorageKeyStore}});const S=d(57324);Object.defineProperty(r,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return S.UnencryptedFileSystemKeyStore}});const a=d(7221);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return a.MergeKeyStore}})},35598:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.KeyStore=void 0;var l=d(69170);Object.defineProperty(r,"KeyStore",{enumerable:!0,get:function(){return l.KeyStore}})},7221:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MergeKeyStore=void 0;var l=d(69170);Object.defineProperty(r,"MergeKeyStore",{enumerable:!0,get:function(){return l.MergeKeyStore}})},57324:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UnencryptedFileSystemKeyStore=r.readKeyFile=void 0;var l=d(55738);Object.defineProperty(r,"readKeyFile",{enumerable:!0,get:function(){return l.readKeyFile}}),Object.defineProperty(r,"UnencryptedFileSystemKeyStore",{enumerable:!0,get:function(){return l.UnencryptedFileSystemKeyStore}})},58010:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Near=void 0;var l=d(9855);Object.defineProperty(r,"Near",{enumerable:!0,get:function(){return l.Near}})},91311:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ErrorContext=r.TypedError=r.getTransactionLastResult=r.FinalExecutionStatusBasic=r.JsonRpcProvider=r.Provider=void 0;const l=d(5754);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return l.Provider}}),Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return l.FinalExecutionStatusBasic}});const _=d(72952);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}})},72952:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.JsonRpcProvider=r.TypedError=r.ErrorContext=void 0;var l=d(17527);Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return l.ErrorContext}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return l.TypedError}});var _=d(47736);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}})},5754:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.FinalExecutionStatusBasic=r.ExecutionStatusBasic=r.IdType=r.Provider=r.getTransactionLastResult=void 0;var l=d(41166);Object.defineProperty(r,"getTransactionLastResult",{enumerable:!0,get:function(){return l.getTransactionLastResult}});var _=d(47736);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return _.Provider}});var E=d(17527);Object.defineProperty(r,"IdType",{enumerable:!0,get:function(){return E.IdType}}),Object.defineProperty(r,"ExecutionStatusBasic",{enumerable:!0,get:function(){return E.ExecutionStatusBasic}}),Object.defineProperty(r,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return E.FinalExecutionStatusBasic}})},60351:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Signer=r.InMemorySigner=void 0;var l=d(82613);Object.defineProperty(r,"InMemorySigner",{enumerable:!0,get:function(){return l.InMemorySigner}}),Object.defineProperty(r,"Signer",{enumerable:!0,get:function(){return l.Signer}})},45733:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.transfer=r.stake=r.functionCallAccessKey=r.functionCall=r.fullAccessKey=r.deployContract=r.deleteKey=r.deleteAccount=r.createAccount=r.addKey=r.encodeDelegateAction=r.encodeSignedDelegate=r.Transaction=r.SignedTransaction=r.Signature=r.signTransaction=r.createTransaction=r.SCHEMA=r.Transfer=r.Stake=r.FunctionCallPermission=r.FunctionCall=r.FullAccessPermission=r.DeployContract=r.DeleteKey=r.DeleteAccount=r.CreateAccount=r.AddKey=r.AccessKeyPermission=r.AccessKey=r.Action=r.stringifyJsonOrBytes=void 0;var l=d(38445);Object.defineProperty(r,"stringifyJsonOrBytes",{enumerable:!0,get:function(){return l.stringifyJsonOrBytes}}),Object.defineProperty(r,"Action",{enumerable:!0,get:function(){return l.Action}}),Object.defineProperty(r,"AccessKey",{enumerable:!0,get:function(){return l.AccessKey}}),Object.defineProperty(r,"AccessKeyPermission",{enumerable:!0,get:function(){return l.AccessKeyPermission}}),Object.defineProperty(r,"AddKey",{enumerable:!0,get:function(){return l.AddKey}}),Object.defineProperty(r,"CreateAccount",{enumerable:!0,get:function(){return l.CreateAccount}}),Object.defineProperty(r,"DeleteAccount",{enumerable:!0,get:function(){return l.DeleteAccount}}),Object.defineProperty(r,"DeleteKey",{enumerable:!0,get:function(){return l.DeleteKey}}),Object.defineProperty(r,"DeployContract",{enumerable:!0,get:function(){return l.DeployContract}}),Object.defineProperty(r,"FullAccessPermission",{enumerable:!0,get:function(){return l.FullAccessPermission}}),Object.defineProperty(r,"FunctionCall",{enumerable:!0,get:function(){return l.FunctionCall}}),Object.defineProperty(r,"FunctionCallPermission",{enumerable:!0,get:function(){return l.FunctionCallPermission}}),Object.defineProperty(r,"Stake",{enumerable:!0,get:function(){return l.Stake}}),Object.defineProperty(r,"Transfer",{enumerable:!0,get:function(){return l.Transfer}}),Object.defineProperty(r,"SCHEMA",{enumerable:!0,get:function(){return l.SCHEMA}}),Object.defineProperty(r,"createTransaction",{enumerable:!0,get:function(){return l.createTransaction}}),Object.defineProperty(r,"signTransaction",{enumerable:!0,get:function(){return l.signTransaction}}),Object.defineProperty(r,"Signature",{enumerable:!0,get:function(){return l.Signature}}),Object.defineProperty(r,"SignedTransaction",{enumerable:!0,get:function(){return l.SignedTransaction}}),Object.defineProperty(r,"Transaction",{enumerable:!0,get:function(){return l.Transaction}}),Object.defineProperty(r,"encodeSignedDelegate",{enumerable:!0,get:function(){return l.encodeSignedDelegate}}),Object.defineProperty(r,"encodeDelegateAction",{enumerable:!0,get:function(){return l.encodeDelegateAction}});const _=d(38445);r.addKey=(C,T)=>_.actionCreators.addKey(C,T);r.createAccount=()=>_.actionCreators.createAccount();r.deleteAccount=C=>_.actionCreators.deleteAccount(C);r.deleteKey=C=>_.actionCreators.deleteKey(C);r.deployContract=C=>_.actionCreators.deployContract(C);r.fullAccessKey=()=>_.actionCreators.fullAccessKey();r.functionCall=(C,T,N,M,P,R)=>_.actionCreators.functionCall(C,T,N,M,P,R);r.functionCallAccessKey=(C,T,N)=>_.actionCreators.functionCallAccessKey(C,T,N);r.stake=(C,T)=>_.actionCreators.stake(C,T);r.transfer=C=>_.actionCreators.transfer(C)},89867:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Enum=r.Assignable=void 0;var l=d(17527);Object.defineProperty(r,"Assignable",{enumerable:!0,get:function(){return l.Assignable}});r.Enum=class _{constructor(S){if(1!==Object.keys(S).length)throw new Error("Enum can only take single value");Object.keys(S).map(a=>{this[a]=S[a],this.enum=a})}}},84528:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=r.TypedError=r.PositionalArgsError=r.ErrorContext=r.ArgumentTypeError=r.UnsupportedSerializationError=r.UnknownArgumentError=r.ConflictingOptions=r.ArgumentSchemaError=void 0;var l=d(74931);Object.defineProperty(r,"ArgumentSchemaError",{enumerable:!0,get:function(){return l.ArgumentSchemaError}}),Object.defineProperty(r,"ConflictingOptions",{enumerable:!0,get:function(){return l.ConflictingOptions}}),Object.defineProperty(r,"UnknownArgumentError",{enumerable:!0,get:function(){return l.UnknownArgumentError}}),Object.defineProperty(r,"UnsupportedSerializationError",{enumerable:!0,get:function(){return l.UnsupportedSerializationError}});var _=d(17527);Object.defineProperty(r,"ArgumentTypeError",{enumerable:!0,get:function(){return _.ArgumentTypeError}}),Object.defineProperty(r,"ErrorContext",{enumerable:!0,get:function(){return _.ErrorContext}}),Object.defineProperty(r,"PositionalArgsError",{enumerable:!0,get:function(){return _.PositionalArgsError}}),Object.defineProperty(r,"TypedError",{enumerable:!0,get:function(){return _.TypedError}});var E=d(41166);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return E.logWarning}})},29110:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parseNearAmount=r.formatNearAmount=r.NEAR_NOMINATION_EXP=r.NEAR_NOMINATION=void 0;var l=d(41166);Object.defineProperty(r,"NEAR_NOMINATION",{enumerable:!0,get:function(){return l.NEAR_NOMINATION}}),Object.defineProperty(r,"NEAR_NOMINATION_EXP",{enumerable:!0,get:function(){return l.NEAR_NOMINATION_EXP}}),Object.defineProperty(r,"formatNearAmount",{enumerable:!0,get:function(){return l.formatNearAmount}}),Object.defineProperty(r,"parseNearAmount",{enumerable:!0,get:function(){return l.parseNearAmount}})},8127:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(O,C,T,N){void 0===N&&(N=T);var M=Object.getOwnPropertyDescriptor(C,T);(!M||("get"in M?!C.__esModule:M.writable||M.configurable))&&(M={enumerable:!0,get:function(){return C[T]}}),Object.defineProperty(O,N,M)}:function(O,C,T,N){void 0===N&&(N=T),O[N]=C[T]}),_=this&&this.__setModuleDefault||(Object.create?function(O,C){Object.defineProperty(O,"default",{enumerable:!0,value:C})}:function(O,C){O.default=C}),E=this&&this.__importStar||function(O){if(O&&O.__esModule)return O;var C={};if(null!=O)for(var T in O)"default"!==T&&Object.prototype.hasOwnProperty.call(O,T)&&l(C,O,T);return _(C,O),C};Object.defineProperty(r,"__esModule",{value:!0}),r.logWarning=r.rpc_errors=r.KeyPairEd25519=r.KeyPair=r.PublicKey=r.format=r.enums=r.web=r.serialize=r.key_pair=void 0;const S=E(d(46358));r.key_pair=S;const a=E(d(7123));r.serialize=a;const h=E(d(36360));r.web=h;const g=E(d(89867));r.enums=g;const y=E(d(29110));r.format=y;const v=E(d(88414));r.rpc_errors=v;const b=d(46358);Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return b.PublicKey}}),Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return b.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return b.KeyPairEd25519}});const A=d(84528);Object.defineProperty(r,"logWarning",{enumerable:!0,get:function(){return A.logWarning}})},46358:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.PublicKey=r.KeyType=r.KeyPairEd25519=r.KeyPair=void 0;var l=d(29761);Object.defineProperty(r,"KeyPair",{enumerable:!0,get:function(){return l.KeyPair}}),Object.defineProperty(r,"KeyPairEd25519",{enumerable:!0,get:function(){return l.KeyPairEd25519}}),Object.defineProperty(r,"KeyType",{enumerable:!0,get:function(){return l.KeyType}}),Object.defineProperty(r,"PublicKey",{enumerable:!0,get:function(){return l.PublicKey}})},88414:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ServerError=r.getErrorTypeFromErrorMessage=r.formatError=r.parseResultError=r.parseRpcError=void 0;var l=d(41166);Object.defineProperty(r,"parseRpcError",{enumerable:!0,get:function(){return l.parseRpcError}}),Object.defineProperty(r,"parseResultError",{enumerable:!0,get:function(){return l.parseResultError}}),Object.defineProperty(r,"formatError",{enumerable:!0,get:function(){return l.formatError}}),Object.defineProperty(r,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return l.getErrorTypeFromErrorMessage}}),Object.defineProperty(r,"ServerError",{enumerable:!0,get:function(){return l.ServerError}})},7123:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.BinaryReader=r.BinaryWriter=r.BorshError=r.deserialize=r.serialize=r.base_decode=r.base_encode=void 0;var l=d(21531);Object.defineProperty(r,"base_encode",{enumerable:!0,get:function(){return l.baseEncode}}),Object.defineProperty(r,"base_decode",{enumerable:!0,get:function(){return l.baseDecode}}),Object.defineProperty(r,"serialize",{enumerable:!0,get:function(){return l.serialize}}),Object.defineProperty(r,"deserialize",{enumerable:!0,get:function(){return l.deserialize}}),Object.defineProperty(r,"BorshError",{enumerable:!0,get:function(){return l.BorshError}}),Object.defineProperty(r,"BinaryWriter",{enumerable:!0,get:function(){return l.BinaryWriter}}),Object.defineProperty(r,"BinaryReader",{enumerable:!0,get:function(){return l.BinaryReader}})},36360:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=void 0;var l=d(47736);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return l.fetchJson}})},51631:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.findSeatPrice=r.diffEpochValidators=void 0;var l=d(41166);Object.defineProperty(r,"diffEpochValidators",{enumerable:!0,get:function(){return l.diffEpochValidators}}),Object.defineProperty(r,"findSeatPrice",{enumerable:!0,get:function(){return l.findSeatPrice}})},47601:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WalletConnection=r.ConnectedWalletAccount=void 0;var l=d(9855);Object.defineProperty(r,"ConnectedWalletAccount",{enumerable:!0,get:function(){return l.ConnectedWalletAccount}}),Object.defineProperty(r,"WalletConnection",{enumerable:!0,get:function(){return l.WalletConnection}})},79227:function(ne,r){"use strict";var d=this&&this.__awaiter||function(E,S,a,h){return new(a||(a=Promise))(function(y,v){function b(C){try{O(h.next(C))}catch(T){v(T)}}function A(C){try{O(h.throw(C))}catch(T){v(T)}}function O(C){C.done?y(C.value):function g(y){return y instanceof a?y:new a(function(v){v(y)})}(C.value).then(b,A)}O((h=h.apply(E,S||[])).next())})};function _(E){return new Promise(S=>setTimeout(S,E))}Object.defineProperty(r,"__esModule",{value:!0}),r.exponentialBackoff=void 0,r.exponentialBackoff=function l(E,S,a,h){return d(this,void 0,void 0,function*(){let g=E;for(let y=0;y!process.env.NEAR_NO_LOGS&&console.warn(...T);r.fetchJson=function C(T,N){return S(this,void 0,void 0,function*(){let M={url:null};"string"==typeof T?M.url=T:M=T;const P=yield(0,y.exponentialBackoff)(v,A,b,()=>S(this,void 0,void 0,function*(){try{global.fetch||(global.fetch=(yield Promise.resolve().then(()=>E(d(29238)))).default);const R=yield global.fetch(M.url,{method:N?"POST":"GET",body:N||void 0,headers:Object.assign(Object.assign({},M.headers),{"Content-Type":"application/json"})});if(!R.ok){if(503===R.status)return O(`Retrying HTTP request for ${M.url} as it's not available now`),null;throw(0,g.default)(R.status,yield R.text())}return R}catch(R){if(R.toString().includes("FetchError")||R.toString().includes("Failed to fetch"))return O(`Retrying HTTP request for ${M.url} because of error: ${R}`),null;throw R}}));if(!P)throw new h.TypedError(`Exceeded ${A} attempts for ${M.url}.`,"RetriesExceeded");return yield P.json()})}},47736:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fetchJson=r.Provider=r.JsonRpcProvider=r.exponentialBackoff=void 0;var l=d(79227);Object.defineProperty(r,"exponentialBackoff",{enumerable:!0,get:function(){return l.exponentialBackoff}});var _=d(379);Object.defineProperty(r,"JsonRpcProvider",{enumerable:!0,get:function(){return _.JsonRpcProvider}});var E=d(67066);Object.defineProperty(r,"Provider",{enumerable:!0,get:function(){return E.Provider}});var S=d(75838);Object.defineProperty(r,"fetchJson",{enumerable:!0,get:function(){return S.fetchJson}})},379:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(N,M,P,R){return new(P||(P=Promise))(function(H,V){function J(W){try{Z(R.next(W))}catch(Q){V(Q)}}function Y(W){try{Z(R.throw(W))}catch(Q){V(Q)}}function Z(W){W.done?H(W.value):function L(H){return H instanceof P?H:new P(function(V){V(H)})}(W.value).then(J,Y)}Z((R=R.apply(N,M||[])).next())})},_=this&&this.__rest||function(N,M){var P={};for(var R in N)Object.prototype.hasOwnProperty.call(N,R)&&M.indexOf(R)<0&&(P[R]=N[R]);if(null!=N&&"function"==typeof Object.getOwnPropertySymbols){var L=0;for(R=Object.getOwnPropertySymbols(N);Ll(this,void 0,void 0,function*(){try{const H={method:M,params:P,id:C++,jsonrpc:"2.0"},V=yield(0,v.fetchJson)(this.connection,JSON.stringify(H));if(V.error){if("object"==typeof V.error.data)throw"string"==typeof V.error.data.error_message&&"string"==typeof V.error.data.error_type?new S.TypedError(V.error.data.error_message,V.error.data.error_type):(0,E.parseRpcError)(V.error.data);{const J=`[${V.error.code}] ${V.error.message}: ${V.error.data}`;throw"Timeout"===V.error.data||J.includes("Timeout error")||J.includes("query has timed out")?new S.TypedError(J,"TimeoutError"):new S.TypedError(J,(0,E.getErrorTypeFromErrorMessage)(V.error.data,V.error.name))}}return V}catch(H){if("TimeoutError"===H.type)return process.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${M} as it has timed out`,P),null;throw H}})),{result:L}=R;if(typeof L>"u")throw new S.TypedError(`Exceeded 12 attempts for request to ${M}.`,"RetriesExceeded");return L})}}r.JsonRpcProvider=T},67066:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Provider=void 0;r.Provider=class d{}},17573:(ne,r,d)=>{"use strict";var l=d(91344)("http-errors"),_=d(1106),E=d(4589),S=d(83894),a=d(77721);function h(N){return Number(String(N).charAt(0)+"00")}function O(N,M){var P=Object.getOwnPropertyDescriptor(N,"name");P&&P.configurable&&(P.value=M,Object.defineProperty(N,"name",P))}function T(N){return"Error"!==N.substr(-5)?N+"Error":N}ne.exports=function g(){for(var N,M,P=500,R={},L=0;L=600)&&l("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof P||!E[P]&&(P<400||P>=600))&&(P=500);var V=g[P]||g[h(P)];for(var J in N||(N=V?new V(M):new Error(M||E[P]),Error.captureStackTrace(N,g)),(!V||!(N instanceof V)||N.status!==P)&&(N.expose=P<500,N.status=N.statusCode=P),R)"status"!==J&&"statusCode"!==J&&(N[J]=R[J]);return N},ne.exports.HttpError=function y(){function N(){throw new TypeError("cannot construct abstract class")}return S(N,Error),N}(),ne.exports.isHttpError=function b(N){return function(P){return!(!P||"object"!=typeof P)&&(P instanceof N||P instanceof Error&&"boolean"==typeof P.expose&&"number"==typeof P.statusCode&&P.status===P.statusCode)}}(ne.exports.HttpError),function C(N,M,P){M.forEach(function(L){var H,V=a(E[L]);switch(h(L)){case 400:H=function v(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!0,L}(P,V,L);break;case 500:H=function A(N,M,P){var R=T(M);function L(H){var V=H??E[P],J=new Error(V);return Error.captureStackTrace(J,L),_(J,L.prototype),Object.defineProperty(J,"message",{enumerable:!0,configurable:!0,value:V,writable:!0}),Object.defineProperty(J,"name",{enumerable:!1,configurable:!0,value:R,writable:!0}),J}return S(L,N),O(L,R),L.prototype.status=P,L.prototype.statusCode=P,L.prototype.expose=!1,L}(P,V,L)}H&&(N[L]=H,N[V]=H)}),N["I'mateapot"]=l.function(N.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(ne.exports,E.codes,ne.exports.HttpError)},91344:ne=>{"use strict";function d(_,E){if("function"!=typeof _)throw new TypeError("argument fn must be a function");return _}function l(_,E,S){if(!_||"object"!=typeof _&&"function"!=typeof _)throw new TypeError("argument obj must be object");var a=Object.getOwnPropertyDescriptor(_,E);if(!a)throw new TypeError("must call property on owner object");if(!a.configurable)throw new TypeError("property must be configurable")}ne.exports=function r(_){if(!_)throw new TypeError("argument namespace is required");function E(S){}return E._file=void 0,E._ignored=!0,E._namespace=_,E._traced=!1,E._warned=Object.create(null),E.function=d,E.property=l,E}},4589:(ne,r,d)=>{"use strict";var l=d(10798);function E(S){if("number"==typeof S){if(!E[S])throw new Error("invalid status code: "+S);return S}if("string"!=typeof S)throw new TypeError("code must be a number or string");var a=parseInt(S,10);if(!isNaN(a)){if(!E[a])throw new Error("invalid status code: "+a);return a}if(!(a=E[S.toLowerCase()]))throw new Error('invalid status message: "'+S+'"');return a}ne.exports=E,E.STATUS_CODES=l,E.codes=function _(S,a){var h=[];return Object.keys(a).forEach(function(y){var v=a[y],b=Number(y);S[b]=v,S[v]=b,S[v.toLowerCase()]=b,h.push(b)}),h}(E,l),E.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},E.empty={204:!0,205:!0,304:!0},E.retry={502:!0,503:!0,504:!0}},46789:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.derivePath=r.isValidPath=r.getPublicKey=r.getMasterKeyFromSeed=void 0;const l=d(74529),_=d(40489),E=d(25076);r.getMasterKeyFromSeed=g=>{const v=l("sha512","ed25519 seed").update(Buffer.from(g,"hex")).digest();return{key:v.slice(0,32),chainCode:v.slice(32)}};r.getPublicKey=(g,y=!0)=>{const b=_.sign.keyPair.fromSeed(g).secretKey.subarray(32),A=Buffer.alloc(1,0);return y?Buffer.concat([A,Buffer.from(b)]):Buffer.from(b)},r.isValidPath=g=>!!E.pathRegex.test(g)&&!g.split("/").slice(1).map(E.replaceDerive).some(isNaN),r.derivePath=(g,y,v=2147483648)=>{if(!r.isValidPath(g))throw new Error("Invalid derivation path");const{key:b,chainCode:A}=r.getMasterKeyFromSeed(y);return g.split("/").slice(1).map(E.replaceDerive).map(C=>parseInt(C,10)).reduce((C,T)=>(({key:g,chainCode:y},v)=>{const b=Buffer.allocUnsafe(4);b.writeUInt32BE(v,0);const A=Buffer.concat([Buffer.alloc(1,0),g,b]),O=l("sha512",y).update(A).digest();return{key:O.slice(0,32),chainCode:O.slice(32)}})(C,T+v),{key:b,chainCode:A})}},25076:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.replaceDerive=r.pathRegex=void 0,r.pathRegex=new RegExp("^m(\\/[0-9]+')+$"),r.replaceDerive=d=>d.replace("'","")},21087:(ne,r,d)=>{const l=d(48670),{derivePath:_}=d(46789),E=d(78141),S=d(40489),a="m/44'/397'/0'",g=b=>b.trim().split(/\s+/).map(A=>A.toLowerCase()).join(" "),y=(b,A)=>{const O=l.mnemonicToSeed(g(b)),{key:C}=_(A||a,O.toString("hex")),T=S.sign.keyPair.fromSeed(C),N="ed25519:"+E.encode(Buffer.from(T.publicKey));return{seedPhrase:b,secretKey:"ed25519:"+E.encode(Buffer.from(T.secretKey)),publicKey:N}};ne.exports={KEY_DERIVATION_PATH:a,generateSeedPhrase:b=>y(void 0!==b?l.entropyToMnemonic(b):l.generateMnemonic()),normalizeSeedPhrase:g,parseSeedPhrase:y,findSeedPhraseKey:(b,A)=>{const O=y(b);return A.indexOf(O.publicKey)<0?{}:O}}},78141:(ne,r,d)=>{var l=d(21082);ne.exports=l("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},69637:(ne,r)=>{"use strict";var l=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}();ne.exports=r=l.fetch,l.fetch&&(r.default=l.fetch.bind(l)),r.Headers=l.Headers,r.Request=l.Request,r.Response=l.Response},90252:(ne,r,d)=>{d(53495),ne.exports=d(6258)},46974:ne=>{var r=function(){var d=Object.create({Source:Object,config:{},buildArgs:[]});function l(g){var y="config";if(g instanceof Function)y="Source";else if(g instanceof Array)y="buildArgs";else{if(!(g instanceof Object))throw new Error("Invalid configuration option.");y="config"}if(d.hasOwnProperty(y))throw new Error("Duplicated configuration option: "+y+".");d[y]=g}for(var _=0,E=arguments.length;_{ne.exports=function(){throw new Error("Not implemented.")}},6258:(ne,r,d)=>{ne.exports={Class:d(46974),abstractMethod:d(93765)}},39199:ne=>{ne.exports=function(r,d){return parseInt(r.toString(),d||8)}},46389:(ne,r,d)=>{var l=d(99136);function _(S){var a=function(){return a.called?a.value:(a.called=!0,a.value=S.apply(this,arguments))};return a.called=!1,a}function E(S){var a=function(){if(a.called)throw new Error(a.onceError);return a.called=!0,a.value=S.apply(this,arguments)},h=S.name||"Function wrapped with `once`";return a.onceError=h+" shouldn't be called more than once",a.called=!1,a}ne.exports=l(_),ne.exports.strict=l(E),_.proto=_(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return _(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return E(this)},configurable:!0})})},52999:(ne,r,d)=>{"use strict";var l=d(87977);r.certificate=d(12390);var _=l.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=_;var E=l.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=E;var S=l.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())});r.PublicKey=S;var a=l.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),h=l.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())});r.PrivateKey=h;var g=l.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=g;var y=l.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=y,r.DSAparam=l.define("DSAparam",function(){this.int()});var v=l.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(b),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=v;var b=l.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=l.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},12390:(ne,r,d)=>{"use strict";var l=d(87977),_=l.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),E=l.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),S=l.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=l.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(S),this.key("subjectPublicKey").bitstr())}),h=l.define("RelativeDistinguishedName",function(){this.setof(E)}),g=l.define("RDNSequence",function(){this.seqof(h)}),y=l.define("Name",function(){this.choice({rdnSequence:this.use(g)})}),v=l.define("Validity",function(){this.seq().obj(this.key("notBefore").use(_),this.key("notAfter").use(_))}),b=l.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),A=l.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(S),this.key("issuer").use(y),this.key("validity").use(v),this.key("subject").use(y),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(b).optional())}),O=l.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(A),this.key("signatureAlgorithm").use(S),this.key("signatureValue").bitstr())});ne.exports=O},65269:(ne,r,d)=>{var l=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,_=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,E=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,S=d(40347),a=d(84330),h=d(73502).Buffer;ne.exports=function(g,y){var A,v=g.toString(),b=v.match(l);if(b){var C="aes"+b[1],T=h.from(b[2],"hex"),N=h.from(b[3].replace(/[\r\n]/g,""),"base64"),M=S(y,T.slice(0,8),parseInt(b[1],10)).key,P=[],R=a.createDecipheriv(C,M,T);P.push(R.update(N)),P.push(R.final()),A=h.concat(P)}else{var O=v.match(E);A=h.from(O[2].replace(/[\r\n]/g,""),"base64")}return{tag:v.match(_)[1],data:A}}},22772:(ne,r,d)=>{var l=d(52999),_=d(22562),E=d(65269),S=d(84330),a=d(99357),h=d(73502).Buffer;function g(v){var b;"object"==typeof v&&!h.isBuffer(v)&&(b=v.passphrase,v=v.key),"string"==typeof v&&(v=h.from(v));var T,N,A=E(v,b),O=A.tag,C=A.data;switch(O){case"CERTIFICATE":N=l.certificate.decode(C,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(N||(N=l.PublicKey.decode(C,"der")),T=N.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPublicKey.decode(N.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return N.subjectPrivateKey=N.subjectPublicKey,{type:"ec",data:N};case"1.2.840.10040.4.1":return N.algorithm.params.pub_key=l.DSAparam.decode(N.subjectPublicKey.data,"der"),{type:"dsa",data:N.algorithm.params};default:throw new Error("unknown key id "+T)}case"ENCRYPTED PRIVATE KEY":C=function y(v,b){var A=v.algorithm.decrypt.kde.kdeparams.salt,O=parseInt(v.algorithm.decrypt.kde.kdeparams.iters.toString(),10),C=_[v.algorithm.decrypt.cipher.algo.join(".")],T=v.algorithm.decrypt.cipher.iv,N=v.subjectPrivateKey,M=parseInt(C.split("-")[1],10)/8,P=a.pbkdf2Sync(b,A,O,M,"sha1"),R=S.createDecipheriv(C,P,T),L=[];return L.push(R.update(N)),L.push(R.final()),h.concat(L)}(C=l.EncryptedPrivateKey.decode(C,"der"),b);case"PRIVATE KEY":switch(T=(N=l.PrivateKey.decode(C,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return l.RSAPrivateKey.decode(N.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:N.algorithm.curve,privateKey:l.ECPrivateKey.decode(N.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return N.algorithm.params.priv_key=l.DSAparam.decode(N.subjectPrivateKey,"der"),{type:"dsa",params:N.algorithm.params};default:throw new Error("unknown key id "+T)}case"RSA PUBLIC KEY":return l.RSAPublicKey.decode(C,"der");case"RSA PRIVATE KEY":return l.RSAPrivateKey.decode(C,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:l.DSAPrivateKey.decode(C,"der")};case"EC PRIVATE KEY":return{curve:(C=l.ECPrivateKey.decode(C,"der")).parameters.value,privateKey:C.privateKey};default:throw new Error("unknown key type "+O)}}ne.exports=g,g.signature=l.signature},63928:ne=>{"use strict";function r(E){if("string"!=typeof E)throw new TypeError("Path must be a string. Received "+JSON.stringify(E))}function d(E,S){for(var v,a="",h=0,g=-1,y=0,b=0;b<=E.length;++b){if(b2){var A=a.lastIndexOf("/");if(A!==a.length-1){-1===A?(a="",h=0):h=(a=a.slice(0,A)).length-1-a.lastIndexOf("/"),g=b,y=0;continue}}else if(2===a.length||1===a.length){a="",h=0,g=b,y=0;continue}S&&(a.length>0?a+="/..":a="..",h=2)}else a.length>0?a+="/"+E.slice(g+1,b):a=E.slice(g+1,b),h=b-g-1;g=b,y=0}else 46===v&&-1!==y?++y:y=-1}return a}var _={resolve:function(){for(var h,S="",a=!1,g=arguments.length-1;g>=-1&&!a;g--){var y;g>=0?y=arguments[g]:(void 0===h&&(h=process.cwd()),y=h),r(y),0!==y.length&&(S=y+"/"+S,a=47===y.charCodeAt(0))}return S=d(S,!a),a?S.length>0?"/"+S:"/":S.length>0?S:"."},normalize:function(S){if(r(S),0===S.length)return".";var a=47===S.charCodeAt(0),h=47===S.charCodeAt(S.length-1);return 0===(S=d(S,!a)).length&&!a&&(S="."),S.length>0&&h&&(S+="/"),a?"/"+S:S},isAbsolute:function(S){return r(S),S.length>0&&47===S.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var S,a=0;a0&&(void 0===S?S=h:S+="/"+h)}return void 0===S?".":_.normalize(S)},relative:function(S,a){if(r(S),r(a),S===a||(S=_.resolve(S))===(a=_.resolve(a)))return"";for(var h=1;hO){if(47===a.charCodeAt(v+T))return a.slice(v+T+1);if(0===T)return a.slice(v+T)}else y>O&&(47===S.charCodeAt(h+T)?C=T:0===T&&(C=0));break}var N=S.charCodeAt(h+T);if(N!==a.charCodeAt(v+T))break;47===N&&(C=T)}var P="";for(T=h+C+1;T<=g;++T)(T===g||47===S.charCodeAt(T))&&(0===P.length?P+="..":P+="/..");return P.length>0?P+a.slice(v+C):(v+=C,47===a.charCodeAt(v)&&++v,a.slice(v))},_makeLong:function(S){return S},dirname:function(S){if(r(S),0===S.length)return".";for(var a=S.charCodeAt(0),h=47===a,g=-1,y=!0,v=S.length-1;v>=1;--v)if(47===(a=S.charCodeAt(v))){if(!y){g=v;break}}else y=!1;return-1===g?h?"/":".":h&&1===g?"//":S.slice(0,g)},basename:function(S,a){if(void 0!==a&&"string"!=typeof a)throw new TypeError('"ext" argument must be a string');r(S);var v,h=0,g=-1,y=!0;if(void 0!==a&&a.length>0&&a.length<=S.length){if(a.length===S.length&&a===S)return"";var b=a.length-1,A=-1;for(v=S.length-1;v>=0;--v){var O=S.charCodeAt(v);if(47===O){if(!y){h=v+1;break}}else-1===A&&(y=!1,A=v+1),b>=0&&(O===a.charCodeAt(b)?-1==--b&&(g=v):(b=-1,g=A))}return h===g?g=A:-1===g&&(g=S.length),S.slice(h,g)}for(v=S.length-1;v>=0;--v)if(47===S.charCodeAt(v)){if(!y){h=v+1;break}}else-1===g&&(y=!1,g=v+1);return-1===g?"":S.slice(h,g)},extname:function(S){r(S);for(var a=-1,h=0,g=-1,y=!0,v=0,b=S.length-1;b>=0;--b){var A=S.charCodeAt(b);if(47!==A)-1===g&&(y=!1,g=b+1),46===A?-1===a?a=b:1!==v&&(v=1):-1!==a&&(v=-1);else if(!y){h=b+1;break}}return-1===a||-1===g||0===v||1===v&&a===g-1&&a===h+1?"":S.slice(a,g)},format:function(S){if(null===S||"object"!=typeof S)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof S);return function l(E,S){var a=S.dir||S.root,h=S.base||(S.name||"")+(S.ext||"");return a?a===S.root?a+h:a+E+h:h}("/",S)},parse:function(S){r(S);var a={root:"",dir:"",base:"",ext:"",name:""};if(0===S.length)return a;var y,h=S.charCodeAt(0),g=47===h;g?(a.root="/",y=1):y=0;for(var v=-1,b=0,A=-1,O=!0,C=S.length-1,T=0;C>=y;--C)if(47!==(h=S.charCodeAt(C)))-1===A&&(O=!1,A=C+1),46===h?-1===v?v=C:1!==T&&(T=1):-1!==v&&(T=-1);else if(!O){b=C+1;break}return-1===v||-1===A||0===T||1===T&&v===A-1&&v===b+1?-1!==A&&(a.base=a.name=0===b&&g?S.slice(1,A):S.slice(b,A)):(0===b&&g?(a.name=S.slice(1,v),a.base=S.slice(1,A)):(a.name=S.slice(b,v),a.base=S.slice(b,A)),a.ext=S.slice(v,A)),b>0?a.dir=S.slice(0,b-1):g&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};_.posix=_,ne.exports=_},99357:(ne,r,d)=>{r.pbkdf2=d(90415),r.pbkdf2Sync=d(77472)},90415:(ne,r,d)=>{var h,A,l=d(73502).Buffer,_=d(62697),E=d(78867),S=d(77472),a=d(94566),g=global.crypto&&global.crypto.subtle,y={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},v=[];function O(){return A||(A=global.process&&global.process.nextTick?global.process.nextTick:global.queueMicrotask?global.queueMicrotask:global.setImmediate?global.setImmediate:global.setTimeout)}function C(N,M,P,R,L){return g.importKey("raw",N,{name:"PBKDF2"},!1,["deriveBits"]).then(function(H){return g.deriveBits({name:"PBKDF2",salt:M,iterations:P,hash:{name:L}},H,R<<3)}).then(function(H){return l.from(H)})}ne.exports=function(N,M,P,R,L,H){"function"==typeof L&&(H=L,L=void 0);var V=y[(L=L||"sha1").toLowerCase()];if(V&&"function"==typeof global.Promise){if(_(P,R),N=a(N,E,"Password"),M=a(M,E,"Salt"),"function"!=typeof H)throw new Error("No callback provided to pbkdf2");!function T(N,M){N.then(function(P){O()(function(){M(null,P)})},function(P){O()(function(){M(P)})})}(function b(N){if(global.process&&!global.process.browser||!g||!g.importKey||!g.deriveBits)return Promise.resolve(!1);if(void 0!==v[N])return v[N];var M=C(h=h||l.alloc(8),h,10,128,N).then(function(){return!0}).catch(function(){return!1});return v[N]=M,M}(V).then(function(J){return J?C(N,M,P,R,V):S(N,M,P,R,L)}),H)}else O()(function(){var J;try{J=S(N,M,P,R,L)}catch(Y){return H(Y)}H(null,J)})}},78867:ne=>{var r;if(global.process&&global.process.browser)r="utf-8";else if(global.process&&global.process.version){r=parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";ne.exports=r},62697:ne=>{var r=Math.pow(2,30)-1;ne.exports=function(d,l){if("number"!=typeof d)throw new TypeError("Iterations not a number");if(d<0)throw new TypeError("Bad iterations");if("number"!=typeof l)throw new TypeError("Key length not a number");if(l<0||l>r||l!=l)throw new TypeError("Bad key length")}},77472:(ne,r,d)=>{var l=d(55640),_=d(75634),E=d(95244),S=d(73502).Buffer,a=d(62697),h=d(78867),g=d(94566),y=S.alloc(128),v={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function b(C,T,N){var M=function A(C){function T(M){return E(C).update(M).digest()}function N(M){return(new _).update(M).digest()}return"rmd160"===C||"ripemd160"===C?N:"md5"===C?l:T}(C),P="sha512"===C||"sha384"===C?128:64;T.length>P?T=M(T):T.length{var l=d(73502).Buffer;ne.exports=function(_,E,S){if(l.isBuffer(_))return _;if("string"==typeof _)return l.from(_,E);if(ArrayBuffer.isView(_))return l.from(_.buffer);throw new TypeError(S+" must be a string, a Buffer, a typed array or a DataView")}},95857:ne=>{"use strict";typeof process>"u"||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?ne.exports={nextTick:function r(d,l,_,E){if("function"!=typeof d)throw new TypeError('"callback" argument must be a function');var a,h,S=arguments.length;switch(S){case 0:case 1:return process.nextTick(d);case 2:return process.nextTick(function(){d.call(null,l)});case 3:return process.nextTick(function(){d.call(null,l,_)});case 4:return process.nextTick(function(){d.call(null,l,_,E)});default:for(a=new Array(S-1),h=0;h-1};return{enumerable:h("enumerable"),configurable:h("configurable"),writable:h("writable"),value:_}}(S,a),"object"==typeof E){for(h in E)Object.hasOwnProperty.call(E,h)&&(a.value=E[h],r(_,h,a));return _}return r(_,E,a)}},ne.exports?ne.exports=l():d.prr=l()},63701:(ne,r,d)=>{r.publicEncrypt=d(16562),r.privateDecrypt=d(36705),r.privateEncrypt=function(_,E){return r.publicEncrypt(_,E,!0)},r.publicDecrypt=function(_,E){return r.privateDecrypt(_,E,!0)}},86945:(ne,r,d)=>{var l=d(96386),_=d(73502).Buffer;function E(S){var a=_.allocUnsafe(4);return a.writeUInt32BE(S,0),a}ne.exports=function(S,a){for(var y,h=_.alloc(0),g=0;h.length=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function y(D,o,u){var m=g(D,u);return u-1>=o&&(m|=g(D,u-1)<<4),m}function v(D,o,u,m){for(var w=0,x=Math.min(D.length,u),F=o;F=49?G-49+10:G>=17?G-17+10:G}return w}a.isBN=function(o){return o instanceof a||null!==o&&"object"==typeof o&&o.constructor.wordSize===a.wordSize&&Array.isArray(o.words)},a.max=function(o,u){return o.cmp(u)>0?o:u},a.min=function(o,u){return o.cmp(u)<0?o:u},a.prototype._init=function(o,u,m){if("number"==typeof o)return this._initNumber(o,u,m);if("object"==typeof o)return this._initArray(o,u,m);"hex"===u&&(u=16),E(u===(0|u)&&u>=2&&u<=36);var w=0;"-"===(o=o.toString().replace(/\s+/g,""))[0]&&(w++,this.negative=1),w=0;w-=3)F=o[w]|o[w-1]<<8|o[w-2]<<16,this.words[x]|=F<>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);else if("le"===m)for(w=0,x=0;w>>26-G&67108863,(G+=24)>=26&&(G-=26,x++);return this.strip()},a.prototype._parseHex=function(o,u,m){this.length=Math.ceil((o.length-u)/6),this.words=new Array(this.length);for(var w=0;w=u;w-=2)G=y(o,u,w)<=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;else for(w=(o.length-u)%2==0?u+1:u;w=18?(x-=18,F+=1,this.words[F]|=G>>>26):x+=8;this.strip()},a.prototype._parseBase=function(o,u,m){this.words=[0],this.length=1;for(var w=0,x=1;x<=67108863;x*=u)w++;w--,x=x/u|0;for(var F=o.length-m,G=F%w,k=Math.min(F,F-G)+m,p=0,B=m;B1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var b=["","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"],A=[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],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function T(D,o,u){u.negative=o.negative^D.negative;var m=D.length+o.length|0;u.length=m,m=m-1|0;var w=0|D.words[0],x=0|o.words[0],F=w*x,G=67108863&F,k=F/67108864|0;u.words[0]=G;for(var p=1;p>>26,ie=67108863&k,te=Math.min(p,o.length-1),ee=Math.max(0,p-D.length+1);ee<=te;ee++){var ue=p-ee|0;B+=(F=(w=0|D.words[ue])*(x=0|o.words[ee])+ie)/67108864|0,ie=67108863&F}u.words[p]=0|ie,k=0|B}return 0!==k?u.words[p]=0|k:u.length--,u.strip()}a.prototype.toString=function(o,u){var m;if(u=0|u||1,16===(o=o||10)||"hex"===o){m="";for(var w=0,x=0,F=0;F>>24-w&16777215)||F!==this.length-1?b[6-k.length]+k+m:k+m,(w+=2)>=26&&(w-=26,F--)}for(0!==x&&(m=x.toString(16)+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}if(o===(0|o)&&o>=2&&o<=36){var p=A[o],B=O[o];m="";var ie=this.clone();for(ie.negative=0;!ie.isZero();){var te=ie.modn(B).toString(o);m=(ie=ie.idivn(B)).isZero()?te+m:b[p-te.length]+te+m}for(this.isZero()&&(m="0"+m);m.length%u!=0;)m="0"+m;return 0!==this.negative&&(m="-"+m),m}E(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var o=this.words[0];return 2===this.length?o+=67108864*this.words[1]:3===this.length&&1===this.words[2]?o+=4503599627370496+67108864*this.words[1]:this.length>2&&E(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-o:o},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(o,u){return E(typeof h<"u"),this.toArrayLike(h,o,u)},a.prototype.toArray=function(o,u){return this.toArrayLike(Array,o,u)},a.prototype.toArrayLike=function(o,u,m){var w=this.byteLength(),x=m||Math.max(1,w);E(w<=x,"byte array longer than desired length"),E(x>0,"Requested array length <= 0"),this.strip();var k,p,F="le"===u,G=new o(x),B=this.clone();if(F){for(p=0;!B.isZero();p++)k=B.andln(255),B.iushrn(8),G[p]=k;for(;p=4096&&(m+=13,u>>>=13),u>=64&&(m+=7,u>>>=7),u>=8&&(m+=4,u>>>=4),u>=2&&(m+=2,u>>>=2),m+u},a.prototype._zeroBits=function(o){if(0===o)return 26;var u=o,m=0;return 8191&u||(m+=13,u>>>=13),127&u||(m+=7,u>>>=7),15&u||(m+=4,u>>>=4),3&u||(m+=2,u>>>=2),1&u||m++,m},a.prototype.bitLength=function(){var o=this.words[this.length-1],u=this._countBits(o);return 26*(this.length-1)+u},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,u=0;uo.length?this.clone().ior(o):o.clone().ior(this)},a.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},a.prototype.iuand=function(o){var u;u=this.length>o.length?o:this;for(var m=0;mo.length?this.clone().iand(o):o.clone().iand(this)},a.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},a.prototype.iuxor=function(o){var u,m;this.length>o.length?(u=this,m=o):(u=o,m=this);for(var w=0;wo.length?this.clone().ixor(o):o.clone().ixor(this)},a.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},a.prototype.inotn=function(o){E("number"==typeof o&&o>=0);var u=0|Math.ceil(o/26),m=o%26;this._expand(u),m>0&&u--;for(var w=0;w0&&(this.words[w]=~this.words[w]&67108863>>26-m),this.strip()},a.prototype.notn=function(o){return this.clone().inotn(o)},a.prototype.setn=function(o,u){E("number"==typeof o&&o>=0);var m=o/26|0,w=o%26;return this._expand(m+1),this.words[m]=u?this.words[m]|1<o.length?(m=this,w=o):(m=o,w=this);for(var x=0,F=0;F>>26;for(;0!==x&&F>>26;if(this.length=m.length,0!==x)this.words[this.length]=x,this.length++;else if(m!==this)for(;Fo.length?this.clone().iadd(o):o.clone().iadd(this)},a.prototype.isub=function(o){if(0!==o.negative){o.negative=0;var u=this.iadd(o);return o.negative=1,u._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var w,x,m=this.cmp(o);if(0===m)return this.negative=0,this.length=1,this.words[0]=0,this;m>0?(w=this,x=o):(w=o,x=this);for(var F=0,G=0;G>26,this.words[G]=67108863&u;for(;0!==F&&G>26,this.words[G]=67108863&u;if(0===F&&G>>13,ue=0|w[1],we=8191&ue,me=ue>>>13,ve=0|w[2],ce=8191&ve,he=ve>>>13,le=0|w[3],de=8191&le,ae=le>>>13,ye=0|w[4],Ce=8191&ye,Pe=ye>>>13,Ge=0|w[5],Ve=8191&Ge,Ue=Ge>>>13,_t=0|w[6],Ze=8191&_t,$e=_t>>>13,Pt=0|w[7],nt=8191&Pt,rt=Pt>>>13,Lt=0|w[8],Re=8191&Lt,Ae=Lt>>>13,xe=0|w[9],je=8191&xe,He=xe>>>13,lt=0|x[0],Je=8191<,at=lt>>>13,fn=0|x[1],ct=8191&fn,dt=fn>>>13,yn=0|x[2],ht=8191&yn,It=yn>>>13,or=0|x[3],Dt=8191&or,Mt=or>>>13,In=0|x[4],yt=8191&In,wt=In>>>13,Pn=0|x[5],vt=8191&Pn,St=Pn>>>13,Fn=0|x[6],pt=8191&Fn,At=Fn>>>13,Ie=0|x[7],Se=8191&Ie,De=Ie>>>13,Ee=0|x[8],Ne=8191&Ee,ze=Ee>>>13,ot=0|x[9],Qe=8191&ot,qe=ot>>>13;m.negative=o.negative^u.negative,m.length=19;var Ft=(G+(k=Math.imul(te,Je))|0)+((8191&(p=(p=Math.imul(te,at))+Math.imul(ee,Je)|0))<<13)|0;G=((B=Math.imul(ee,at))+(p>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,k=Math.imul(we,Je),p=(p=Math.imul(we,at))+Math.imul(me,Je)|0,B=Math.imul(me,at);var xt=(G+(k=k+Math.imul(te,ct)|0)|0)+((8191&(p=(p=p+Math.imul(te,dt)|0)+Math.imul(ee,ct)|0))<<13)|0;G=((B=B+Math.imul(ee,dt)|0)+(p>>>13)|0)+(xt>>>26)|0,xt&=67108863,k=Math.imul(ce,Je),p=(p=Math.imul(ce,at))+Math.imul(he,Je)|0,B=Math.imul(he,at),k=k+Math.imul(we,ct)|0,p=(p=p+Math.imul(we,dt)|0)+Math.imul(me,ct)|0,B=B+Math.imul(me,dt)|0;var Yt=(G+(k=k+Math.imul(te,ht)|0)|0)+((8191&(p=(p=p+Math.imul(te,It)|0)+Math.imul(ee,ht)|0))<<13)|0;G=((B=B+Math.imul(ee,It)|0)+(p>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,k=Math.imul(de,Je),p=(p=Math.imul(de,at))+Math.imul(ae,Je)|0,B=Math.imul(ae,at),k=k+Math.imul(ce,ct)|0,p=(p=p+Math.imul(ce,dt)|0)+Math.imul(he,ct)|0,B=B+Math.imul(he,dt)|0,k=k+Math.imul(we,ht)|0,p=(p=p+Math.imul(we,It)|0)+Math.imul(me,ht)|0,B=B+Math.imul(me,It)|0;var Ut=(G+(k=k+Math.imul(te,Dt)|0)|0)+((8191&(p=(p=p+Math.imul(te,Mt)|0)+Math.imul(ee,Dt)|0))<<13)|0;G=((B=B+Math.imul(ee,Mt)|0)+(p>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,k=Math.imul(Ce,Je),p=(p=Math.imul(Ce,at))+Math.imul(Pe,Je)|0,B=Math.imul(Pe,at),k=k+Math.imul(de,ct)|0,p=(p=p+Math.imul(de,dt)|0)+Math.imul(ae,ct)|0,B=B+Math.imul(ae,dt)|0,k=k+Math.imul(ce,ht)|0,p=(p=p+Math.imul(ce,It)|0)+Math.imul(he,ht)|0,B=B+Math.imul(he,It)|0,k=k+Math.imul(we,Dt)|0,p=(p=p+Math.imul(we,Mt)|0)+Math.imul(me,Dt)|0,B=B+Math.imul(me,Mt)|0;var Qt=(G+(k=k+Math.imul(te,yt)|0)|0)+((8191&(p=(p=p+Math.imul(te,wt)|0)+Math.imul(ee,yt)|0))<<13)|0;G=((B=B+Math.imul(ee,wt)|0)+(p>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,k=Math.imul(Ve,Je),p=(p=Math.imul(Ve,at))+Math.imul(Ue,Je)|0,B=Math.imul(Ue,at),k=k+Math.imul(Ce,ct)|0,p=(p=p+Math.imul(Ce,dt)|0)+Math.imul(Pe,ct)|0,B=B+Math.imul(Pe,dt)|0,k=k+Math.imul(de,ht)|0,p=(p=p+Math.imul(de,It)|0)+Math.imul(ae,ht)|0,B=B+Math.imul(ae,It)|0,k=k+Math.imul(ce,Dt)|0,p=(p=p+Math.imul(ce,Mt)|0)+Math.imul(he,Dt)|0,B=B+Math.imul(he,Mt)|0,k=k+Math.imul(we,yt)|0,p=(p=p+Math.imul(we,wt)|0)+Math.imul(me,yt)|0,B=B+Math.imul(me,wt)|0;var Kt=(G+(k=k+Math.imul(te,vt)|0)|0)+((8191&(p=(p=p+Math.imul(te,St)|0)+Math.imul(ee,vt)|0))<<13)|0;G=((B=B+Math.imul(ee,St)|0)+(p>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,k=Math.imul(Ze,Je),p=(p=Math.imul(Ze,at))+Math.imul($e,Je)|0,B=Math.imul($e,at),k=k+Math.imul(Ve,ct)|0,p=(p=p+Math.imul(Ve,dt)|0)+Math.imul(Ue,ct)|0,B=B+Math.imul(Ue,dt)|0,k=k+Math.imul(Ce,ht)|0,p=(p=p+Math.imul(Ce,It)|0)+Math.imul(Pe,ht)|0,B=B+Math.imul(Pe,It)|0,k=k+Math.imul(de,Dt)|0,p=(p=p+Math.imul(de,Mt)|0)+Math.imul(ae,Dt)|0,B=B+Math.imul(ae,Mt)|0,k=k+Math.imul(ce,yt)|0,p=(p=p+Math.imul(ce,wt)|0)+Math.imul(he,yt)|0,B=B+Math.imul(he,wt)|0,k=k+Math.imul(we,vt)|0,p=(p=p+Math.imul(we,St)|0)+Math.imul(me,vt)|0,B=B+Math.imul(me,St)|0;var sn=(G+(k=k+Math.imul(te,pt)|0)|0)+((8191&(p=(p=p+Math.imul(te,At)|0)+Math.imul(ee,pt)|0))<<13)|0;G=((B=B+Math.imul(ee,At)|0)+(p>>>13)|0)+(sn>>>26)|0,sn&=67108863,k=Math.imul(nt,Je),p=(p=Math.imul(nt,at))+Math.imul(rt,Je)|0,B=Math.imul(rt,at),k=k+Math.imul(Ze,ct)|0,p=(p=p+Math.imul(Ze,dt)|0)+Math.imul($e,ct)|0,B=B+Math.imul($e,dt)|0,k=k+Math.imul(Ve,ht)|0,p=(p=p+Math.imul(Ve,It)|0)+Math.imul(Ue,ht)|0,B=B+Math.imul(Ue,It)|0,k=k+Math.imul(Ce,Dt)|0,p=(p=p+Math.imul(Ce,Mt)|0)+Math.imul(Pe,Dt)|0,B=B+Math.imul(Pe,Mt)|0,k=k+Math.imul(de,yt)|0,p=(p=p+Math.imul(de,wt)|0)+Math.imul(ae,yt)|0,B=B+Math.imul(ae,wt)|0,k=k+Math.imul(ce,vt)|0,p=(p=p+Math.imul(ce,St)|0)+Math.imul(he,vt)|0,B=B+Math.imul(he,St)|0,k=k+Math.imul(we,pt)|0,p=(p=p+Math.imul(we,At)|0)+Math.imul(me,pt)|0,B=B+Math.imul(me,At)|0;var qt=(G+(k=k+Math.imul(te,Se)|0)|0)+((8191&(p=(p=p+Math.imul(te,De)|0)+Math.imul(ee,Se)|0))<<13)|0;G=((B=B+Math.imul(ee,De)|0)+(p>>>13)|0)+(qt>>>26)|0,qt&=67108863,k=Math.imul(Re,Je),p=(p=Math.imul(Re,at))+Math.imul(Ae,Je)|0,B=Math.imul(Ae,at),k=k+Math.imul(nt,ct)|0,p=(p=p+Math.imul(nt,dt)|0)+Math.imul(rt,ct)|0,B=B+Math.imul(rt,dt)|0,k=k+Math.imul(Ze,ht)|0,p=(p=p+Math.imul(Ze,It)|0)+Math.imul($e,ht)|0,B=B+Math.imul($e,It)|0,k=k+Math.imul(Ve,Dt)|0,p=(p=p+Math.imul(Ve,Mt)|0)+Math.imul(Ue,Dt)|0,B=B+Math.imul(Ue,Mt)|0,k=k+Math.imul(Ce,yt)|0,p=(p=p+Math.imul(Ce,wt)|0)+Math.imul(Pe,yt)|0,B=B+Math.imul(Pe,wt)|0,k=k+Math.imul(de,vt)|0,p=(p=p+Math.imul(de,St)|0)+Math.imul(ae,vt)|0,B=B+Math.imul(ae,St)|0,k=k+Math.imul(ce,pt)|0,p=(p=p+Math.imul(ce,At)|0)+Math.imul(he,pt)|0,B=B+Math.imul(he,At)|0,k=k+Math.imul(we,Se)|0,p=(p=p+Math.imul(we,De)|0)+Math.imul(me,Se)|0,B=B+Math.imul(me,De)|0;var pn=(G+(k=k+Math.imul(te,Ne)|0)|0)+((8191&(p=(p=p+Math.imul(te,ze)|0)+Math.imul(ee,Ne)|0))<<13)|0;G=((B=B+Math.imul(ee,ze)|0)+(p>>>13)|0)+(pn>>>26)|0,pn&=67108863,k=Math.imul(je,Je),p=(p=Math.imul(je,at))+Math.imul(He,Je)|0,B=Math.imul(He,at),k=k+Math.imul(Re,ct)|0,p=(p=p+Math.imul(Re,dt)|0)+Math.imul(Ae,ct)|0,B=B+Math.imul(Ae,dt)|0,k=k+Math.imul(nt,ht)|0,p=(p=p+Math.imul(nt,It)|0)+Math.imul(rt,ht)|0,B=B+Math.imul(rt,It)|0,k=k+Math.imul(Ze,Dt)|0,p=(p=p+Math.imul(Ze,Mt)|0)+Math.imul($e,Dt)|0,B=B+Math.imul($e,Mt)|0,k=k+Math.imul(Ve,yt)|0,p=(p=p+Math.imul(Ve,wt)|0)+Math.imul(Ue,yt)|0,B=B+Math.imul(Ue,wt)|0,k=k+Math.imul(Ce,vt)|0,p=(p=p+Math.imul(Ce,St)|0)+Math.imul(Pe,vt)|0,B=B+Math.imul(Pe,St)|0,k=k+Math.imul(de,pt)|0,p=(p=p+Math.imul(de,At)|0)+Math.imul(ae,pt)|0,B=B+Math.imul(ae,At)|0,k=k+Math.imul(ce,Se)|0,p=(p=p+Math.imul(ce,De)|0)+Math.imul(he,Se)|0,B=B+Math.imul(he,De)|0,k=k+Math.imul(we,Ne)|0,p=(p=p+Math.imul(we,ze)|0)+Math.imul(me,Ne)|0,B=B+Math.imul(me,ze)|0;var ln=(G+(k=k+Math.imul(te,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(te,qe)|0)+Math.imul(ee,Qe)|0))<<13)|0;G=((B=B+Math.imul(ee,qe)|0)+(p>>>13)|0)+(ln>>>26)|0,ln&=67108863,k=Math.imul(je,ct),p=(p=Math.imul(je,dt))+Math.imul(He,ct)|0,B=Math.imul(He,dt),k=k+Math.imul(Re,ht)|0,p=(p=p+Math.imul(Re,It)|0)+Math.imul(Ae,ht)|0,B=B+Math.imul(Ae,It)|0,k=k+Math.imul(nt,Dt)|0,p=(p=p+Math.imul(nt,Mt)|0)+Math.imul(rt,Dt)|0,B=B+Math.imul(rt,Mt)|0,k=k+Math.imul(Ze,yt)|0,p=(p=p+Math.imul(Ze,wt)|0)+Math.imul($e,yt)|0,B=B+Math.imul($e,wt)|0,k=k+Math.imul(Ve,vt)|0,p=(p=p+Math.imul(Ve,St)|0)+Math.imul(Ue,vt)|0,B=B+Math.imul(Ue,St)|0,k=k+Math.imul(Ce,pt)|0,p=(p=p+Math.imul(Ce,At)|0)+Math.imul(Pe,pt)|0,B=B+Math.imul(Pe,At)|0,k=k+Math.imul(de,Se)|0,p=(p=p+Math.imul(de,De)|0)+Math.imul(ae,Se)|0,B=B+Math.imul(ae,De)|0,k=k+Math.imul(ce,Ne)|0,p=(p=p+Math.imul(ce,ze)|0)+Math.imul(he,Ne)|0,B=B+Math.imul(he,ze)|0;var Xt=(G+(k=k+Math.imul(we,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(we,qe)|0)+Math.imul(me,Qe)|0))<<13)|0;G=((B=B+Math.imul(me,qe)|0)+(p>>>13)|0)+(Xt>>>26)|0,Xt&=67108863,k=Math.imul(je,ht),p=(p=Math.imul(je,It))+Math.imul(He,ht)|0,B=Math.imul(He,It),k=k+Math.imul(Re,Dt)|0,p=(p=p+Math.imul(Re,Mt)|0)+Math.imul(Ae,Dt)|0,B=B+Math.imul(Ae,Mt)|0,k=k+Math.imul(nt,yt)|0,p=(p=p+Math.imul(nt,wt)|0)+Math.imul(rt,yt)|0,B=B+Math.imul(rt,wt)|0,k=k+Math.imul(Ze,vt)|0,p=(p=p+Math.imul(Ze,St)|0)+Math.imul($e,vt)|0,B=B+Math.imul($e,St)|0,k=k+Math.imul(Ve,pt)|0,p=(p=p+Math.imul(Ve,At)|0)+Math.imul(Ue,pt)|0,B=B+Math.imul(Ue,At)|0,k=k+Math.imul(Ce,Se)|0,p=(p=p+Math.imul(Ce,De)|0)+Math.imul(Pe,Se)|0,B=B+Math.imul(Pe,De)|0,k=k+Math.imul(de,Ne)|0,p=(p=p+Math.imul(de,ze)|0)+Math.imul(ae,Ne)|0,B=B+Math.imul(ae,ze)|0;var jt=(G+(k=k+Math.imul(ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(ce,qe)|0)+Math.imul(he,Qe)|0))<<13)|0;G=((B=B+Math.imul(he,qe)|0)+(p>>>13)|0)+(jt>>>26)|0,jt&=67108863,k=Math.imul(je,Dt),p=(p=Math.imul(je,Mt))+Math.imul(He,Dt)|0,B=Math.imul(He,Mt),k=k+Math.imul(Re,yt)|0,p=(p=p+Math.imul(Re,wt)|0)+Math.imul(Ae,yt)|0,B=B+Math.imul(Ae,wt)|0,k=k+Math.imul(nt,vt)|0,p=(p=p+Math.imul(nt,St)|0)+Math.imul(rt,vt)|0,B=B+Math.imul(rt,St)|0,k=k+Math.imul(Ze,pt)|0,p=(p=p+Math.imul(Ze,At)|0)+Math.imul($e,pt)|0,B=B+Math.imul($e,At)|0,k=k+Math.imul(Ve,Se)|0,p=(p=p+Math.imul(Ve,De)|0)+Math.imul(Ue,Se)|0,B=B+Math.imul(Ue,De)|0,k=k+Math.imul(Ce,Ne)|0,p=(p=p+Math.imul(Ce,ze)|0)+Math.imul(Pe,Ne)|0,B=B+Math.imul(Pe,ze)|0;var on=(G+(k=k+Math.imul(de,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(de,qe)|0)+Math.imul(ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(ae,qe)|0)+(p>>>13)|0)+(on>>>26)|0,on&=67108863,k=Math.imul(je,yt),p=(p=Math.imul(je,wt))+Math.imul(He,yt)|0,B=Math.imul(He,wt),k=k+Math.imul(Re,vt)|0,p=(p=p+Math.imul(Re,St)|0)+Math.imul(Ae,vt)|0,B=B+Math.imul(Ae,St)|0,k=k+Math.imul(nt,pt)|0,p=(p=p+Math.imul(nt,At)|0)+Math.imul(rt,pt)|0,B=B+Math.imul(rt,At)|0,k=k+Math.imul(Ze,Se)|0,p=(p=p+Math.imul(Ze,De)|0)+Math.imul($e,Se)|0,B=B+Math.imul($e,De)|0,k=k+Math.imul(Ve,Ne)|0,p=(p=p+Math.imul(Ve,ze)|0)+Math.imul(Ue,Ne)|0,B=B+Math.imul(Ue,ze)|0;var Wt=(G+(k=k+Math.imul(Ce,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ce,qe)|0)+Math.imul(Pe,Qe)|0))<<13)|0;G=((B=B+Math.imul(Pe,qe)|0)+(p>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,k=Math.imul(je,vt),p=(p=Math.imul(je,St))+Math.imul(He,vt)|0,B=Math.imul(He,St),k=k+Math.imul(Re,pt)|0,p=(p=p+Math.imul(Re,At)|0)+Math.imul(Ae,pt)|0,B=B+Math.imul(Ae,At)|0,k=k+Math.imul(nt,Se)|0,p=(p=p+Math.imul(nt,De)|0)+Math.imul(rt,Se)|0,B=B+Math.imul(rt,De)|0,k=k+Math.imul(Ze,Ne)|0,p=(p=p+Math.imul(Ze,ze)|0)+Math.imul($e,Ne)|0,B=B+Math.imul($e,ze)|0;var Ht=(G+(k=k+Math.imul(Ve,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ve,qe)|0)+Math.imul(Ue,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ue,qe)|0)+(p>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,k=Math.imul(je,pt),p=(p=Math.imul(je,At))+Math.imul(He,pt)|0,B=Math.imul(He,At),k=k+Math.imul(Re,Se)|0,p=(p=p+Math.imul(Re,De)|0)+Math.imul(Ae,Se)|0,B=B+Math.imul(Ae,De)|0,k=k+Math.imul(nt,Ne)|0,p=(p=p+Math.imul(nt,ze)|0)+Math.imul(rt,Ne)|0,B=B+Math.imul(rt,ze)|0;var un=(G+(k=k+Math.imul(Ze,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Ze,qe)|0)+Math.imul($e,Qe)|0))<<13)|0;G=((B=B+Math.imul($e,qe)|0)+(p>>>13)|0)+(un>>>26)|0,un&=67108863,k=Math.imul(je,Se),p=(p=Math.imul(je,De))+Math.imul(He,Se)|0,B=Math.imul(He,De),k=k+Math.imul(Re,Ne)|0,p=(p=p+Math.imul(Re,ze)|0)+Math.imul(Ae,Ne)|0,B=B+Math.imul(Ae,ze)|0;var Gt=(G+(k=k+Math.imul(nt,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(nt,qe)|0)+Math.imul(rt,Qe)|0))<<13)|0;G=((B=B+Math.imul(rt,qe)|0)+(p>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,k=Math.imul(je,Ne),p=(p=Math.imul(je,ze))+Math.imul(He,Ne)|0,B=Math.imul(He,ze);var Et=(G+(k=k+Math.imul(Re,Qe)|0)|0)+((8191&(p=(p=p+Math.imul(Re,qe)|0)+Math.imul(Ae,Qe)|0))<<13)|0;G=((B=B+Math.imul(Ae,qe)|0)+(p>>>13)|0)+(Et>>>26)|0,Et&=67108863;var bt=(G+(k=Math.imul(je,Qe))|0)+((8191&(p=(p=Math.imul(je,qe))+Math.imul(He,Qe)|0))<<13)|0;return G=((B=Math.imul(He,qe))+(p>>>13)|0)+(bt>>>26)|0,bt&=67108863,F[0]=Ft,F[1]=xt,F[2]=Yt,F[3]=Ut,F[4]=Qt,F[5]=Kt,F[6]=sn,F[7]=qt,F[8]=pn,F[9]=ln,F[10]=Xt,F[11]=jt,F[12]=on,F[13]=Wt,F[14]=Ht,F[15]=un,F[16]=Gt,F[17]=Et,F[18]=bt,0!==G&&(F[19]=G,m.length++),m};function P(D,o,u){return(new R).mulp(D,o,u)}function R(D,o){this.x=D,this.y=o}Math.imul||(N=T),a.prototype.mulTo=function(o,u){var m,w=this.length+o.length;return m=10===this.length&&10===o.length?N(this,o,u):w<63?T(this,o,u):w<1024?function M(D,o,u){u.negative=o.negative^D.negative,u.length=D.length+o.length;for(var m=0,w=0,x=0;x>>26)|0)>>>26,F&=67108863}u.words[x]=G,m=F,F=w}return 0!==m?u.words[x]=m:u.length--,u.strip()}(this,o,u):P(this,o,u),m},R.prototype.makeRBT=function(o){for(var u=new Array(o),m=a.prototype._countBits(o)-1,w=0;w>=1;return w},R.prototype.permute=function(o,u,m,w,x,F){for(var G=0;G>>=1)x++;return 1<>>=13,m[2*F+1]=8191&x,x>>>=13;for(F=2*u;F>=26,u+=w/67108864|0,u+=x>>>26,this.words[m]=67108863&x}return 0!==u&&(this.words[m]=u,this.length++),this},a.prototype.muln=function(o){return this.clone().imuln(o)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(o){var u=function C(D){for(var o=new Array(D.bitLength()),u=0;u>>w}return o}(o);if(0===u.length)return new a(1);for(var m=this,w=0;w=0);var x,u=o%26,m=(o-u)/26,w=67108863>>>26-u<<26-u;if(0!==u){var F=0;for(x=0;x>>26-u}F&&(this.words[x]=F,this.length++)}if(0!==m){for(x=this.length-1;x>=0;x--)this.words[x+m]=this.words[x];for(x=0;x=0),w=u?(u-u%26)/26:0;var x=o%26,F=Math.min((o-x)/26,this.length),G=67108863^67108863>>>x<F)for(this.length-=F,p=0;p=0&&(0!==B||p>=w);p--){var ie=0|this.words[p];this.words[p]=B<<26-x|ie>>>x,B=ie&G}return k&&0!==B&&(k.words[k.length++]=B),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(o,u,m){return E(0===this.negative),this.iushrn(o,u,m)},a.prototype.shln=function(o){return this.clone().ishln(o)},a.prototype.ushln=function(o){return this.clone().iushln(o)},a.prototype.shrn=function(o){return this.clone().ishrn(o)},a.prototype.ushrn=function(o){return this.clone().iushrn(o)},a.prototype.testn=function(o){E("number"==typeof o&&o>=0);var u=o%26,m=(o-u)/26,w=1<=0);var u=o%26,m=(o-u)/26;if(E(0===this.negative,"imaskn works only with positive numbers"),this.length<=m)return this;if(0!==u&&m++,this.length=Math.min(m,this.length),0!==u){var w=67108863^67108863>>>u<=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},a.prototype.isubn=function(o){if(E("number"==typeof o),E(o<67108864),o<0)return this.iaddn(-o);if(0!==this.negative)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u>26)-(k/67108864|0),this.words[x+m]=67108863&F}for(;x>26,this.words[x+m]=67108863&F;if(0===G)return this.strip();for(E(-1===G),G=0,x=0;x>26,this.words[x]=67108863&F;return this.negative=1,this.strip()},a.prototype._wordDiv=function(o,u){var m=(this.length,o.length),w=this.clone(),x=o,F=0|x.words[x.length-1];0!==(m=26-this._countBits(F))&&(x=x.ushln(m),w.iushln(m),F=0|x.words[x.length-1]);var p,k=w.length-x.length;if("mod"!==u){(p=new a(null)).length=k+1,p.words=new Array(p.length);for(var B=0;B=0;te--){var ee=67108864*(0|w.words[x.length+te])+(0|w.words[x.length+te-1]);for(ee=Math.min(ee/F|0,67108863),w._ishlnsubmul(x,ee,te);0!==w.negative;)ee--,w.negative=0,w._ishlnsubmul(x,1,te),w.isZero()||(w.negative^=1);p&&(p.words[te]=ee)}return p&&p.strip(),w.strip(),"div"!==u&&0!==m&&w.iushrn(m),{div:p||null,mod:w}},a.prototype.divmod=function(o,u,m){return E(!o.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===o.negative?(F=this.neg().divmod(o,u),"mod"!==u&&(w=F.div.neg()),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.iadd(o)),{div:w,mod:x}):0===this.negative&&0!==o.negative?(F=this.divmod(o.neg(),u),"mod"!==u&&(w=F.div.neg()),{div:w,mod:F.mod}):this.negative&o.negative?(F=this.neg().divmod(o.neg(),u),"div"!==u&&(x=F.mod.neg(),m&&0!==x.negative&&x.isub(o)),{div:F.div,mod:x}):o.length>this.length||this.cmp(o)<0?{div:new a(0),mod:this}:1===o.length?"div"===u?{div:this.divn(o.words[0]),mod:null}:"mod"===u?{div:null,mod:new a(this.modn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new a(this.modn(o.words[0]))}:this._wordDiv(o,u);var w,x,F},a.prototype.div=function(o){return this.divmod(o,"div",!1).div},a.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},a.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},a.prototype.divRound=function(o){var u=this.divmod(o);if(u.mod.isZero())return u.div;var m=0!==u.div.negative?u.mod.isub(o):u.mod,w=o.ushrn(1),x=o.andln(1),F=m.cmp(w);return F<0||1===x&&0===F?u.div:0!==u.div.negative?u.div.isubn(1):u.div.iaddn(1)},a.prototype.modn=function(o){E(o<=67108863);for(var u=(1<<26)%o,m=0,w=this.length-1;w>=0;w--)m=(u*m+(0|this.words[w]))%o;return m},a.prototype.idivn=function(o){E(o<=67108863);for(var u=0,m=this.length-1;m>=0;m--){var w=(0|this.words[m])+67108864*u;this.words[m]=w/o|0,u=w%o}return this.strip()},a.prototype.divn=function(o){return this.clone().idivn(o)},a.prototype.egcd=function(o){E(0===o.negative),E(!o.isZero());var u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=new a(0),G=new a(1),k=0;u.isEven()&&m.isEven();)u.iushrn(1),m.iushrn(1),++k;for(var p=m.clone(),B=u.clone();!u.isZero();){for(var ie=0,te=1;!(u.words[0]&te)&&ie<26;++ie,te<<=1);if(ie>0)for(u.iushrn(ie);ie-- >0;)(w.isOdd()||x.isOdd())&&(w.iadd(p),x.isub(B)),w.iushrn(1),x.iushrn(1);for(var ee=0,ue=1;!(m.words[0]&ue)&&ee<26;++ee,ue<<=1);if(ee>0)for(m.iushrn(ee);ee-- >0;)(F.isOdd()||G.isOdd())&&(F.iadd(p),G.isub(B)),F.iushrn(1),G.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(F),x.isub(G)):(m.isub(u),F.isub(w),G.isub(x))}return{a:F,b:G,gcd:m.iushln(k)}},a.prototype._invmp=function(o){E(0===o.negative),E(!o.isZero());var ie,u=this,m=o.clone();u=0!==u.negative?u.umod(o):u.clone();for(var w=new a(1),x=new a(0),F=m.clone();u.cmpn(1)>0&&m.cmpn(1)>0;){for(var G=0,k=1;!(u.words[0]&k)&&G<26;++G,k<<=1);if(G>0)for(u.iushrn(G);G-- >0;)w.isOdd()&&w.iadd(F),w.iushrn(1);for(var p=0,B=1;!(m.words[0]&B)&&p<26;++p,B<<=1);if(p>0)for(m.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(F),x.iushrn(1);u.cmp(m)>=0?(u.isub(m),w.isub(x)):(m.isub(u),x.isub(w))}return(ie=0===u.cmpn(1)?w:x).cmpn(0)<0&&ie.iadd(o),ie},a.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var u=this.clone(),m=o.clone();u.negative=0,m.negative=0;for(var w=0;u.isEven()&&m.isEven();w++)u.iushrn(1),m.iushrn(1);for(;;){for(;u.isEven();)u.iushrn(1);for(;m.isEven();)m.iushrn(1);var x=u.cmp(m);if(x<0){var F=u;u=m,m=F}else if(0===x||0===m.cmpn(1))break;u.isub(m)}return m.iushln(w)},a.prototype.invm=function(o){return this.egcd(o).a.umod(o)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(o){return this.words[0]&o},a.prototype.bincn=function(o){E("number"==typeof o);var u=o%26,m=(o-u)/26,w=1<>>26,G&=67108863,this.words[F]=G}return 0!==x&&(this.words[F]=x,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(o){var m,u=o<0;if(0!==this.negative&&!u)return-1;if(0===this.negative&&u)return 1;if(this.strip(),this.length>1)m=1;else{u&&(o=-o),E(o<=67108863,"Number is too big");var w=0|this.words[0];m=w===o?0:wo.length)return 1;if(this.length=0;m--){var w=0|this.words[m],x=0|o.words[m];if(w!==x){wx&&(u=1);break}}return u},a.prototype.gtn=function(o){return 1===this.cmpn(o)},a.prototype.gt=function(o){return 1===this.cmp(o)},a.prototype.gten=function(o){return this.cmpn(o)>=0},a.prototype.gte=function(o){return this.cmp(o)>=0},a.prototype.ltn=function(o){return-1===this.cmpn(o)},a.prototype.lt=function(o){return-1===this.cmp(o)},a.prototype.lten=function(o){return this.cmpn(o)<=0},a.prototype.lte=function(o){return this.cmp(o)<=0},a.prototype.eqn=function(o){return 0===this.cmpn(o)},a.prototype.eq=function(o){return 0===this.cmp(o)},a.red=function(o){return new W(o)},a.prototype.toRed=function(o){return E(!this.red,"Already a number in reduction context"),E(0===this.negative,"red works only with positives"),o.convertTo(this)._forceRed(o)},a.prototype.fromRed=function(){return E(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(o){return this.red=o,this},a.prototype.forceRed=function(o){return E(!this.red,"Already a number in reduction context"),this._forceRed(o)},a.prototype.redAdd=function(o){return E(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},a.prototype.redIAdd=function(o){return E(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},a.prototype.redSub=function(o){return E(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},a.prototype.redISub=function(o){return E(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},a.prototype.redShl=function(o){return E(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},a.prototype.redMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},a.prototype.redIMul=function(o){return E(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},a.prototype.redSqr=function(){return E(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return E(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return E(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return E(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return E(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(o){return E(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var L={k256:null,p224:null,p192:null,p25519:null};function H(D,o){this.name=D,this.p=new a(o,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function V(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function J(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function Y(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function Z(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function W(D){if("string"==typeof D){var o=a._prime(D);this.m=o.p,this.prime=o}else E(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}function Q(D){W.call(this,D),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}H.prototype._tmp=function(){var o=new a(null);return o.words=new Array(Math.ceil(this.n/13)),o},H.prototype.ireduce=function(o){var m,u=o;do{this.split(u,this.tmp),m=(u=(u=this.imulK(u)).iadd(this.tmp)).bitLength()}while(m>this.n);var w=m0?u.isub(this.p):void 0!==u.strip?u.strip():u._strip(),u},H.prototype.split=function(o,u){o.iushrn(this.n,0,u)},H.prototype.imulK=function(o){return o.imul(this.k)},S(V,H),V.prototype.split=function(o,u){for(var m=4194303,w=Math.min(o.length,9),x=0;x>>22,F=G}F>>>=22,o.words[x-10]=F,0===F&&o.length>10?o.length-=10:o.length-=9},V.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var u=0,m=0;m>>=26,o.words[m]=x,u=w}return 0!==u&&(o.words[o.length++]=u),o},a._prime=function(o){if(L[o])return L[o];var u;if("k256"===o)u=new V;else if("p224"===o)u=new J;else if("p192"===o)u=new Y;else{if("p25519"!==o)throw new Error("Unknown prime "+o);u=new Z}return L[o]=u,u},W.prototype._verify1=function(o){E(0===o.negative,"red works only with positives"),E(o.red,"red works only with red numbers")},W.prototype._verify2=function(o,u){E(0==(o.negative|u.negative),"red works only with positives"),E(o.red&&o.red===u.red,"red works only with red numbers")},W.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):o.umod(this.m)._forceRed(this)},W.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},W.prototype.add=function(o,u){this._verify2(o,u);var m=o.add(u);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},W.prototype.iadd=function(o,u){this._verify2(o,u);var m=o.iadd(u);return m.cmp(this.m)>=0&&m.isub(this.m),m},W.prototype.sub=function(o,u){this._verify2(o,u);var m=o.sub(u);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},W.prototype.isub=function(o,u){this._verify2(o,u);var m=o.isub(u);return m.cmpn(0)<0&&m.iadd(this.m),m},W.prototype.shl=function(o,u){return this._verify1(o),this.imod(o.ushln(u))},W.prototype.imul=function(o,u){return this._verify2(o,u),this.imod(o.imul(u))},W.prototype.mul=function(o,u){return this._verify2(o,u),this.imod(o.mul(u))},W.prototype.isqr=function(o){return this.imul(o,o.clone())},W.prototype.sqr=function(o){return this.mul(o,o)},W.prototype.sqrt=function(o){if(o.isZero())return o.clone();var u=this.m.andln(3);if(E(u%2==1),3===u){var m=this.m.add(new a(1)).iushrn(2);return this.pow(o,m)}for(var w=this.m.subn(1),x=0;!w.isZero()&&0===w.andln(1);)x++,w.iushrn(1);E(!w.isZero());var F=new a(1).toRed(this),G=F.redNeg(),k=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,k).cmp(G);)p.redIAdd(G);for(var B=this.pow(p,w),ie=this.pow(o,w.addn(1).iushrn(1)),te=this.pow(o,w),ee=x;0!==te.cmp(F);){for(var ue=te,we=0;0!==ue.cmp(F);we++)ue=ue.redSqr();E(we=0;x--){for(var B=u.words[x],ie=p-1;ie>=0;ie--){var te=B>>ie&1;(F!==w[0]&&(F=this.sqr(F)),0!==te||0!==G)?(G<<=1,G|=te,(4===++k||0===x&&0===ie)&&(F=this.mul(F,w[G]),k=0,G=0)):k=0}p=26}return F},W.prototype.convertTo=function(o){var u=o.umod(this.m);return u===o?u.clone():u},W.prototype.convertFrom=function(o){var u=o.clone();return u.red=null,u},a.mont=function(o){return new Q(o)},S(Q,W),Q.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},Q.prototype.convertFrom=function(o){var u=this.imod(o.mul(this.rinv));return u.red=null,u},Q.prototype.imul=function(o,u){if(o.isZero()||u.isZero())return o.words[0]=0,o.length=1,o;var m=o.imul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.mul=function(o,u){if(o.isZero()||u.isZero())return new a(0)._forceRed(this);var m=o.mul(u),w=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=m.isub(w).iushrn(this.shift),F=x;return x.cmp(this.m)>=0?F=x.isub(this.m):x.cmpn(0)<0&&(F=x.iadd(this.m)),F._forceRed(this)},Q.prototype.invm=function(o){return this.imod(o._invmp(this.m).mul(this.r2))._forceRed(this)}})(ne=d.nmd(ne),this)},36705:(ne,r,d)=>{var l=d(22772),_=d(86945),E=d(79401),S=d(82057),a=d(8466),h=d(96386),g=d(38651),y=d(73502).Buffer;ne.exports=function(C,T,N){var M;M=C.padding?C.padding:N?1:4;var L,P=l(C),R=P.modulus.byteLength();if(T.length>R||new S(T).cmp(P.modulus)>=0)throw new Error("decryption error");L=N?g(new S(T),P):a(T,P);var H=y.alloc(R-L.length);if(L=y.concat([H,L],R),4===M)return function v(O,C){var T=O.modulus.byteLength(),N=h("sha1").update(y.alloc(0)).digest(),M=N.length;if(0!==C[0])throw new Error("decryption error");var P=C.slice(1,M+1),R=C.slice(M+1),L=E(P,_(R,M)),H=E(R,_(L,T-M-1));if(function A(O,C){O=y.from(O),C=y.from(C);var T=0,N=O.length;O.length!==C.length&&(T++,N=Math.min(O.length,C.length));for(var M=-1;++M=C.length){P++;break}var R=C.slice(2,M-1);if(("0002"!==N.toString("hex")&&!T||"0001"!==N.toString("hex")&&T)&&P++,R.length<8&&P++,P)throw new Error("decryption error");return C.slice(M)}(0,L,N);if(3===M)return L;throw new Error("unknown padding")}},16562:(ne,r,d)=>{var l=d(22772),_=d(53753),E=d(96386),S=d(86945),a=d(79401),h=d(82057),g=d(38651),y=d(8466),v=d(73502).Buffer;ne.exports=function(T,N,M){var P;P=T.padding?T.padding:M?1:4;var L,R=l(T);if(4===P)L=function b(C,T){var N=C.modulus.byteLength(),M=T.length,P=E("sha1").update(v.alloc(0)).digest(),R=P.length,L=2*R;if(M>N-L-2)throw new Error("message too long");var H=v.alloc(N-M-L-2),V=N-R-1,J=_(R),Y=a(v.concat([P,H,v.alloc(1,1),T],V),S(J,V)),Z=a(J,S(Y,R));return new h(v.concat([v.alloc(1),Z,Y],N))}(R,N);else if(1===P)L=function A(C,T,N){var R,M=T.length,P=C.modulus.byteLength();if(M>P-11)throw new Error("message too long");return R=N?v.alloc(P-M-3,255):function O(C){for(var R,T=v.allocUnsafe(C),N=0,M=_(2*C),P=0;N=0)throw new Error("data too long for modulus")}return M?y(L,R):g(L,R)}},38651:(ne,r,d)=>{var l=d(82057),_=d(73502).Buffer;ne.exports=function E(S,a){return _.from(S.toRed(l.mont(a.modulus)).redPow(new l(a.publicExponent)).fromRed().toArray())}},79401:ne=>{ne.exports=function(d,l){for(var _=d.length,E=-1;++E<_;)d[E]^=l[E];return d}},3259:(ne,r,d)=>{const l=d(88695),_=d(71465),E=d(23210),S=d(22334);function a(h,g,y,v,b){const A=[].slice.call(arguments,1),O=A.length,C="function"==typeof A[O-1];if(!C&&!l())throw new Error("Callback required as last argument");if(!C){if(O<1)throw new Error("Too few arguments provided");return 1===O?(y=g,g=v=void 0):2===O&&!g.getContext&&(v=y,y=g,g=void 0),new Promise(function(T,N){try{const M=_.create(y,v);T(h(M,g,v))}catch(M){N(M)}})}if(O<2)throw new Error("Too few arguments provided");2===O?(b=y,y=g,g=v=void 0):3===O&&(g.getContext&&typeof b>"u"?(b=v,v=void 0):(b=v,v=y,y=g,g=void 0));try{const T=_.create(y,v);b(null,h(T,g,v))}catch(T){b(T)}}r.create=_.create,r.toCanvas=a.bind(null,E.render),r.toDataURL=a.bind(null,E.renderToDataURL),r.toString=a.bind(null,function(h,g,y){return S.render(h,y)})},88695:ne=>{ne.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},46221:(ne,r,d)=>{const l=d(34792).getSymbolSize;r.getRowColCoords=function(E){if(1===E)return[];const S=Math.floor(E/7)+2,a=l(E),h=145===a?26:2*Math.ceil((a-13)/(2*S-2)),g=[a-7];for(let y=1;y{const l=d(64016),_=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function E(S){this.mode=l.ALPHANUMERIC,this.data=S}E.getBitsLength=function(a){return 11*Math.floor(a/2)+a%2*6},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(a){let h;for(h=0;h+2<=this.data.length;h+=2){let g=45*_.indexOf(this.data[h]);g+=_.indexOf(this.data[h+1]),a.put(g,11)}this.data.length%2&&a.put(_.indexOf(this.data[h]),6)},ne.exports=E},52118:ne=>{function r(){this.buffer=[],this.length=0}r.prototype={get:function(d){const l=Math.floor(d/8);return 1==(this.buffer[l]>>>7-d%8&1)},put:function(d,l){for(let _=0;_>>l-_-1&1))},getLengthInBits:function(){return this.length},putBit:function(d){const l=Math.floor(this.length/8);this.buffer.length<=l&&this.buffer.push(0),d&&(this.buffer[l]|=128>>>this.length%8),this.length++}},ne.exports=r},34425:ne=>{function r(d){if(!d||d<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=d,this.data=new Uint8Array(d*d),this.reservedBit=new Uint8Array(d*d)}r.prototype.set=function(d,l,_,E){const S=d*this.size+l;this.data[S]=_,E&&(this.reservedBit[S]=!0)},r.prototype.get=function(d,l){return this.data[d*this.size+l]},r.prototype.xor=function(d,l,_){this.data[d*this.size+l]^=_},r.prototype.isReserved=function(d,l){return this.reservedBit[d*this.size+l]},ne.exports=r},85663:(ne,r,d)=>{const l=d(38419),_=d(64016);function E(S){this.mode=_.BYTE,"string"==typeof S&&(S=l(S)),this.data=new Uint8Array(S)}E.getBitsLength=function(a){return 8*a},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(S){for(let a=0,h=this.data.length;a{const l=d(82259),_=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],E=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];r.getBlocksCount=function(a,h){switch(h){case l.L:return _[4*(a-1)+0];case l.M:return _[4*(a-1)+1];case l.Q:return _[4*(a-1)+2];case l.H:return _[4*(a-1)+3];default:return}},r.getTotalCodewordsCount=function(a,h){switch(h){case l.L:return E[4*(a-1)+0];case l.M:return E[4*(a-1)+1];case l.Q:return E[4*(a-1)+2];case l.H:return E[4*(a-1)+3];default:return}}},82259:(ne,r)=>{r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2},r.isValid=function(_){return _&&typeof _.bit<"u"&&_.bit>=0&&_.bit<4},r.from=function(_,E){if(r.isValid(_))return _;try{return function d(l){if("string"!=typeof l)throw new Error("Param is not a string");switch(l.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+l)}}(_)}catch{return E}}},43114:(ne,r,d)=>{const l=d(34792).getSymbolSize;r.getPositions=function(S){const a=l(S);return[[0,0],[a-7,0],[0,a-7]]}},17078:(ne,r,d)=>{const l=d(34792),S=l.getBCHDigit(1335);r.getEncodedBits=function(h,g){const y=h.bit<<3|g;let v=y<<10;for(;l.getBCHDigit(v)-S>=0;)v^=1335<{const d=new Uint8Array(512),l=new Uint8Array(256);(function(){let E=1;for(let S=0;S<255;S++)d[S]=E,l[E]=S,E<<=1,256&E&&(E^=285);for(let S=255;S<512;S++)d[S]=d[S-255]})(),r.log=function(E){if(E<1)throw new Error("log("+E+")");return l[E]},r.exp=function(E){return d[E]},r.mul=function(E,S){return 0===E||0===S?0:d[l[E]+l[S]]}},80449:(ne,r,d)=>{const l=d(64016),_=d(34792);function E(S){this.mode=l.KANJI,this.data=S}E.getBitsLength=function(a){return 13*a},E.prototype.getLength=function(){return this.data.length},E.prototype.getBitsLength=function(){return E.getBitsLength(this.data.length)},E.prototype.write=function(S){let a;for(a=0;a=33088&&h<=40956)h-=33088;else{if(!(h>=57408&&h<=60351))throw new Error("Invalid SJIS character: "+this.data[a]+"\nMake sure your charset is UTF-8");h-=49472}h=192*(h>>>8&255)+(255&h),S.put(h,13)}},ne.exports=E},33667:(ne,r)=>{r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const d_N1=3,d_N2=3,d_N3=40,d_N4=10;function l(_,E,S){switch(_){case r.Patterns.PATTERN000:return(E+S)%2==0;case r.Patterns.PATTERN001:return E%2==0;case r.Patterns.PATTERN010:return S%3==0;case r.Patterns.PATTERN011:return(E+S)%3==0;case r.Patterns.PATTERN100:return(Math.floor(E/2)+Math.floor(S/3))%2==0;case r.Patterns.PATTERN101:return E*S%2+E*S%3==0;case r.Patterns.PATTERN110:return(E*S%2+E*S%3)%2==0;case r.Patterns.PATTERN111:return(E*S%3+(E+S)%2)%2==0;default:throw new Error("bad maskPattern:"+_)}}r.isValid=function(E){return null!=E&&""!==E&&!isNaN(E)&&E>=0&&E<=7},r.from=function(E){return r.isValid(E)?parseInt(E,10):void 0},r.getPenaltyN1=function(E){const S=E.size;let a=0,h=0,g=0,y=null,v=null;for(let b=0;b=5&&(a+=d_N1+(h-5)),y=O,h=1),O=E.get(A,b),O===v?g++:(g>=5&&(a+=d_N1+(g-5)),v=O,g=1)}h>=5&&(a+=d_N1+(h-5)),g>=5&&(a+=d_N1+(g-5))}return a},r.getPenaltyN2=function(E){const S=E.size;let a=0;for(let h=0;h=10&&(1488===h||93===h)&&a++,g=g<<1&2047|E.get(v,y),v>=10&&(1488===g||93===g)&&a++}return a*d_N3},r.getPenaltyN4=function(E){let S=0;const a=E.data.length;for(let g=0;g{const l=d(94406),_=d(2699);r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(a,h){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!l.isValid(h))throw new Error("Invalid version: "+h);return h>=1&&h<10?a.ccBits[0]:h<27?a.ccBits[1]:a.ccBits[2]},r.getBestModeForData=function(a){return _.testNumeric(a)?r.NUMERIC:_.testAlphanumeric(a)?r.ALPHANUMERIC:_.testKanji(a)?r.KANJI:r.BYTE},r.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},r.isValid=function(a){return a&&a.bit&&a.ccBits},r.from=function(a,h){if(r.isValid(a))return a;try{return function E(S){if("string"!=typeof S)throw new Error("Param is not a string");switch(S.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+S)}}(a)}catch{return h}}},97783:(ne,r,d)=>{const l=d(64016);function _(E){this.mode=l.NUMERIC,this.data=E.toString()}_.getBitsLength=function(S){return 10*Math.floor(S/3)+(S%3?S%3*3+1:0)},_.prototype.getLength=function(){return this.data.length},_.prototype.getBitsLength=function(){return _.getBitsLength(this.data.length)},_.prototype.write=function(S){let a,h,g;for(a=0;a+3<=this.data.length;a+=3)h=this.data.substr(a,3),g=parseInt(h,10),S.put(g,10);const y=this.data.length-a;y>0&&(h=this.data.substr(a),g=parseInt(h,10),S.put(g,3*y+1))},ne.exports=_},61106:(ne,r,d)=>{const l=d(45339);r.mul=function(E,S){const a=new Uint8Array(E.length+S.length-1);for(let h=0;h=0;){const h=a[0];for(let y=0;y{const l=d(34792),_=d(82259),E=d(52118),S=d(34425),a=d(46221),h=d(43114),g=d(33667),y=d(14655),v=d(12636),b=d(42088),A=d(17078),O=d(64016),C=d(62033);function R(Y,Z,W){const Q=Y.size,D=A.getEncodedBits(Z,W);let o,u;for(o=0;o<15;o++)u=1==(D>>o&1),o<6?Y.set(o,8,u,!0):o<8?Y.set(o+1,8,u,!0):Y.set(Q-15+o,8,u,!0),o<8?Y.set(8,Q-o-1,u,!0):o<9?Y.set(8,15-o-1+1,u,!0):Y.set(8,15-o-1,u,!0);Y.set(Q-8,8,1,!0)}function H(Y,Z,W){const Q=new E;W.forEach(function(w){Q.put(w.mode.bit,4),Q.put(w.getLength(),O.getCharCountIndicator(w.mode,Y)),w.write(Q)});const u=8*(l.getSymbolTotalCodewords(Y)-y.getTotalCodewordsCount(Y,Z));for(Q.getLengthInBits()+4<=u&&Q.put(0,4);Q.getLengthInBits()%8!=0;)Q.putBit(0);const m=(u-Q.getLengthInBits())/8;for(let w=0;w=0&&m<=6&&(0===w||6===w)||w>=0&&w<=6&&(0===m||6===m)||m>=2&&m<=4&&w>=2&&w<=4?Y.set(o+m,u+w,!0,!0):Y.set(o+m,u+w,!1,!0))}}(w,Z),function N(Y){const Z=Y.size;for(let W=8;W=7&&function P(Y,Z){const W=Y.size,Q=b.getEncodedBits(Z);let D,o,u;for(let m=0;m<18;m++)D=Math.floor(m/3),o=m%3+W-8-3,u=1==(Q>>m&1),Y.set(D,o,u,!0),Y.set(o,D,u,!0)}(w,Z),function L(Y,Z){const W=Y.size;let Q=-1,D=W-1,o=7,u=0;for(let m=W-1;m>0;m-=2)for(6===m&&m--;;){for(let w=0;w<2;w++)if(!Y.isReserved(D,m-w)){let x=!1;u>>o&1)),Y.set(D,m-w,x),o--,-1===o&&(u++,o=7)}if(D+=Q,D<0||W<=D){D-=Q,Q=-Q;break}}}(w,u),isNaN(Q)&&(Q=g.getBestMask(w,R.bind(null,w,W))),g.applyMask(Q,w),R(w,W,Q),{modules:w,version:Z,errorCorrectionLevel:W,maskPattern:Q,segments:D}}r.create=function(Z,W){if(typeof Z>"u"||""===Z)throw new Error("No input text");let D,o,Q=_.M;return typeof W<"u"&&(Q=_.from(W.errorCorrectionLevel,_.M),D=b.from(W.version),o=g.from(W.maskPattern),W.toSJISFunc&&l.setToSJISFunction(W.toSJISFunc)),J(Z,D,Q,o)}},12636:(ne,r,d)=>{const l=d(61106);function _(E){this.genPoly=void 0,this.degree=E,this.degree&&this.initialize(this.degree)}_.prototype.initialize=function(S){this.degree=S,this.genPoly=l.generateECPolynomial(this.degree)},_.prototype.encode=function(S){if(!this.genPoly)throw new Error("Encoder not initialized");const a=new Uint8Array(S.length+this.degree);a.set(S);const h=l.mod(a,this.genPoly),g=this.degree-h.length;if(g>0){const y=new Uint8Array(this.degree);return y.set(h,g),y}return h},ne.exports=_},2699:(ne,r)=>{const d="[0-9]+";let _="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";_=_.replace(/u/g,"\\u");const E="(?:(?![A-Z0-9 $%*+\\-./:]|"+_+")(?:.|[\r\n]))+";r.KANJI=new RegExp(_,"g"),r.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),r.BYTE=new RegExp(E,"g"),r.NUMERIC=new RegExp(d,"g"),r.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const S=new RegExp("^"+_+"$"),a=new RegExp("^"+d+"$"),h=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");r.testKanji=function(y){return S.test(y)},r.testNumeric=function(y){return a.test(y)},r.testAlphanumeric=function(y){return h.test(y)}},62033:(ne,r,d)=>{const l=d(64016),_=d(97783),E=d(32424),S=d(85663),a=d(80449),h=d(2699),g=d(34792),y=d(74901);function v(P){return unescape(encodeURIComponent(P)).length}function b(P,R,L){const H=[];let V;for(;null!==(V=P.exec(L));)H.push({data:V[0],index:V.index,mode:R,length:V[0].length});return H}function A(P){const R=b(h.NUMERIC,l.NUMERIC,P),L=b(h.ALPHANUMERIC,l.ALPHANUMERIC,P);let H,V;return g.isKanjiModeEnabled()?(H=b(h.BYTE,l.BYTE,P),V=b(h.KANJI,l.KANJI,P)):(H=b(h.BYTE_KANJI,l.BYTE,P),V=[]),R.concat(L,H,V).sort(function(Y,Z){return Y.index-Z.index}).map(function(Y){return{data:Y.data,mode:Y.mode,length:Y.length}})}function O(P,R){switch(R){case l.NUMERIC:return _.getBitsLength(P);case l.ALPHANUMERIC:return E.getBitsLength(P);case l.KANJI:return a.getBitsLength(P);case l.BYTE:return S.getBitsLength(P)}}function M(P,R){let L;const H=l.getBestModeForData(P);if(L=l.from(R,H),L!==l.BYTE&&L.bit=0?R[R.length-1]:null;return H&&H.mode===L.mode?(R[R.length-1].data+=L.data,R):(R.push(L),R)},[])}(Z))},r.rawSplit=function(R){return r.fromArray(A(R,g.isKanjiModeEnabled()))}},34792:(ne,r)=>{let d;const l=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];r.getSymbolSize=function(E){if(!E)throw new Error('"version" cannot be null or undefined');if(E<1||E>40)throw new Error('"version" should be in range from 1 to 40');return 4*E+17},r.getSymbolTotalCodewords=function(E){return l[E]},r.getBCHDigit=function(_){let E=0;for(;0!==_;)E++,_>>>=1;return E},r.setToSJISFunction=function(E){if("function"!=typeof E)throw new Error('"toSJISFunc" is not a valid function.');d=E},r.isKanjiModeEnabled=function(){return typeof d<"u"},r.toSJIS=function(E){return d(E)}},94406:(ne,r)=>{r.isValid=function(l){return!isNaN(l)&&l>=1&&l<=40}},42088:(ne,r,d)=>{const l=d(34792),_=d(14655),E=d(82259),S=d(64016),a=d(94406),g=l.getBCHDigit(7973);function v(O,C){return S.getCharCountIndicator(O,C)+4}function b(O,C){let T=0;return O.forEach(function(N){const M=v(N.mode,C);T+=M+N.getBitsLength()}),T}r.from=function(C,T){return a.isValid(C)?parseInt(C,10):T},r.getCapacity=function(C,T,N){if(!a.isValid(C))throw new Error("Invalid QR Code version");typeof N>"u"&&(N=S.BYTE);const R=8*(l.getSymbolTotalCodewords(C)-_.getTotalCodewordsCount(C,T));if(N===S.MIXED)return R;const L=R-v(N,C);switch(N){case S.NUMERIC:return Math.floor(L/10*3);case S.ALPHANUMERIC:return Math.floor(L/11*2);case S.KANJI:return Math.floor(L/13);case S.BYTE:default:return Math.floor(L/8)}},r.getBestVersionForData=function(C,T){let N;const M=E.from(T,E.M);if(Array.isArray(C)){if(C.length>1)return function A(O,C){for(let T=1;T<=40;T++)if(b(O,T)<=r.getCapacity(T,C,S.MIXED))return T}(C,M);if(0===C.length)return 1;N=C[0]}else N=C;return function y(O,C,T){for(let N=1;N<=40;N++)if(C<=r.getCapacity(N,T,O))return N}(N.mode,N.getLength(),M)},r.getEncodedBits=function(C){if(!a.isValid(C)||C<7)throw new Error("Invalid QR Code version");let T=C<<12;for(;l.getBCHDigit(T)-g>=0;)T^=7973<{const l=d(36355);r.render=function(a,h,g){let y=g,v=h;typeof y>"u"&&(!h||!h.getContext)&&(y=h,h=void 0),h||(v=function E(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),y=l.getOptions(y);const b=l.getImageWidth(a.modules.size,y),A=v.getContext("2d"),O=A.createImageData(b,b);return l.qrToImageData(O.data,a,y),function _(S,a,h){S.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=h,a.width=h,a.style.height=h+"px",a.style.width=h+"px"}(A,v,b),A.putImageData(O,0,0),v},r.renderToDataURL=function(a,h,g){let y=g;typeof y>"u"&&(!h||!h.getContext)&&(y=h,h=void 0),y||(y={});const v=r.render(a,h,y),b=y.type||"image/png",A=y.rendererOpts||{};return v.toDataURL(b,A.quality)}},22334:(ne,r,d)=>{const l=d(36355);function _(a,h){const g=a.a/255,y=h+'="'+a.hex+'"';return g<1?y+" "+h+'-opacity="'+g.toFixed(2).slice(1)+'"':y}function E(a,h,g){let y=a+h;return typeof g<"u"&&(y+=" "+g),y}r.render=function(h,g,y){const v=l.getOptions(g),b=h.modules.size,A=h.modules.data,O=b+2*v.margin,C=v.color.light.a?"':"",T="0&&C>0&&a[O-1]||(y+=b?E("M",C+g,.5+T+g):E("m",v,0),v=0,b=!1),C+1',N='viewBox="0 0 '+O+" "+O+'"',P=''+C+T+"\n";return"function"==typeof y&&y(null,P),P}},36355:(ne,r)=>{function d(l){if("number"==typeof l&&(l=l.toString()),"string"!=typeof l)throw new Error("Color should be defined as hex string");let _=l.slice().replace("#","").split("");if(_.length<3||5===_.length||_.length>8)throw new Error("Invalid hex color: "+l);(3===_.length||4===_.length)&&(_=Array.prototype.concat.apply([],_.map(function(S){return[S,S]}))),6===_.length&&_.push("F","F");const E=parseInt(_.join(""),16);return{r:E>>24&255,g:E>>16&255,b:E>>8&255,a:255&E,hex:"#"+_.slice(0,6).join("")}}r.getOptions=function(_){_||(_={}),_.color||(_.color={});const E=typeof _.margin>"u"||null===_.margin||_.margin<0?4:_.margin,S=_.width&&_.width>=21?_.width:void 0,a=_.scale||4;return{width:S,scale:S?4:a,margin:E,color:{dark:d(_.color.dark||"#000000ff"),light:d(_.color.light||"#ffffffff")},type:_.type,rendererOpts:_.rendererOpts||{}}},r.getScale=function(_,E){return E.width&&E.width>=_+2*E.margin?E.width/(_+2*E.margin):E.scale},r.getImageWidth=function(_,E){const S=r.getScale(_,E);return Math.floor((_+2*E.margin)*S)},r.qrToImageData=function(_,E,S){const a=E.modules.size,h=E.modules.data,g=r.getScale(a,S),y=Math.floor((a+2*S.margin)*g),v=S.margin*g,b=[S.color.light,S.color.dark];for(let A=0;A=v&&O>=v&&A{"use strict";const l=d(18372),_=d(12761),E=d(78951),S=d(44770),h=Symbol("encodeFragmentIdentifier");function v(R){if("string"!=typeof R||1!==R.length)throw new TypeError("arrayFormatSeparator must be single character string")}function b(R,L){return L.encode?L.strict?l(R):encodeURIComponent(R):R}function A(R,L){return L.decode?_(R):R}function O(R){return Array.isArray(R)?R.sort():"object"==typeof R?O(Object.keys(R)).sort((L,H)=>Number(L)-Number(H)).map(L=>R[L]):R}function C(R){const L=R.indexOf("#");return-1!==L&&(R=R.slice(0,L)),R}function N(R){const L=(R=C(R)).indexOf("?");return-1===L?"":R.slice(L+1)}function M(R,L){return L.parseNumbers&&!Number.isNaN(Number(R))&&"string"==typeof R&&""!==R.trim()?R=Number(R):L.parseBooleans&&null!==R&&("true"===R.toLowerCase()||"false"===R.toLowerCase())&&(R="true"===R.toLowerCase()),R}function P(R,L){v((L=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},L)).arrayFormatSeparator);const H=function y(R){let L;switch(R.arrayFormat){case"index":return(H,V,J)=>{L=/\[(\d*)\]$/.exec(H),H=H.replace(/\[\d*\]$/,""),L?(void 0===J[H]&&(J[H]={}),J[H][L[1]]=V):J[H]=V};case"bracket":return(H,V,J)=>{L=/(\[\])$/.exec(H),H=H.replace(/\[\]$/,""),L?void 0!==J[H]?J[H]=[].concat(J[H],V):J[H]=[V]:J[H]=V};case"colon-list-separator":return(H,V,J)=>{L=/(:list)$/.exec(H),H=H.replace(/:list$/,""),L?void 0!==J[H]?J[H]=[].concat(J[H],V):J[H]=[V]:J[H]=V};case"comma":case"separator":return(H,V,J)=>{const Y="string"==typeof V&&V.includes(R.arrayFormatSeparator),Z="string"==typeof V&&!Y&&A(V,R).includes(R.arrayFormatSeparator);V=Z?A(V,R):V;const W=Y||Z?V.split(R.arrayFormatSeparator).map(Q=>A(Q,R)):null===V?V:A(V,R);J[H]=W};case"bracket-separator":return(H,V,J)=>{const Y=/(\[\])$/.test(H);if(H=H.replace(/\[\]$/,""),!Y)return void(J[H]=V&&A(V,R));const Z=null===V?[]:V.split(R.arrayFormatSeparator).map(W=>A(W,R));void 0!==J[H]?J[H]=[].concat(J[H],Z):J[H]=Z};default:return(H,V,J)=>{void 0!==J[H]?J[H]=[].concat(J[H],V):J[H]=V}}}(L),V=Object.create(null);if("string"!=typeof R||!(R=R.trim().replace(/^[?#&]/,"")))return V;for(const J of R.split("&")){if(""===J)continue;let[Y,Z]=E(L.decode?J.replace(/\+/g," "):J,"=");Z=void 0===Z?null:["comma","separator","bracket-separator"].includes(L.arrayFormat)?Z:A(Z,L),H(A(Y,L),Z,V)}for(const J of Object.keys(V)){const Y=V[J];if("object"==typeof Y&&null!==Y)for(const Z of Object.keys(Y))Y[Z]=M(Y[Z],L);else V[J]=M(Y,L)}return!1===L.sort?V:(!0===L.sort?Object.keys(V).sort():Object.keys(V).sort(L.sort)).reduce((J,Y)=>{const Z=V[Y];return Boolean(Z)&&"object"==typeof Z&&!Array.isArray(Z)?J[Y]=O(Z):J[Y]=Z,J},Object.create(null))}r.extract=N,r.parse=P,r.stringify=(R,L)=>{if(!R)return"";v((L=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},L)).arrayFormatSeparator);const H=Z=>L.skipNull&&(R=>null==R)(R[Z])||L.skipEmptyString&&""===R[Z],V=function g(R){switch(R.arrayFormat){case"index":return L=>(H,V)=>{const J=H.length;return void 0===V||R.skipNull&&null===V||R.skipEmptyString&&""===V?H:null===V?[...H,[b(L,R),"[",J,"]"].join("")]:[...H,[b(L,R),"[",b(J,R),"]=",b(V,R)].join("")]};case"bracket":return L=>(H,V)=>void 0===V||R.skipNull&&null===V||R.skipEmptyString&&""===V?H:null===V?[...H,[b(L,R),"[]"].join("")]:[...H,[b(L,R),"[]=",b(V,R)].join("")];case"colon-list-separator":return L=>(H,V)=>void 0===V||R.skipNull&&null===V||R.skipEmptyString&&""===V?H:null===V?[...H,[b(L,R),":list="].join("")]:[...H,[b(L,R),":list=",b(V,R)].join("")];case"comma":case"separator":case"bracket-separator":{const L="bracket-separator"===R.arrayFormat?"[]=":"=";return H=>(V,J)=>void 0===J||R.skipNull&&null===J||R.skipEmptyString&&""===J?V:(J=null===J?"":J,0===V.length?[[b(H,R),L,b(J,R)].join("")]:[[V,b(J,R)].join(R.arrayFormatSeparator)])}default:return L=>(H,V)=>void 0===V||R.skipNull&&null===V||R.skipEmptyString&&""===V?H:null===V?[...H,b(L,R)]:[...H,[b(L,R),"=",b(V,R)].join("")]}}(L),J={};for(const Z of Object.keys(R))H(Z)||(J[Z]=R[Z]);const Y=Object.keys(J);return!1!==L.sort&&Y.sort(L.sort),Y.map(Z=>{const W=R[Z];return void 0===W?"":null===W?b(Z,L):Array.isArray(W)?0===W.length&&"bracket-separator"===L.arrayFormat?b(Z,L)+"[]":W.reduce(V(Z),[]).join("&"):b(Z,L)+"="+b(W,L)}).filter(Z=>Z.length>0).join("&")},r.parseUrl=(R,L)=>{L=Object.assign({decode:!0},L);const[H,V]=E(R,"#");return Object.assign({url:H.split("?")[0]||"",query:P(N(R),L)},L&&L.parseFragmentIdentifier&&V?{fragmentIdentifier:A(V,L)}:{})},r.stringifyUrl=(R,L)=>{L=Object.assign({encode:!0,strict:!0,[h]:!0},L);const H=C(R.url).split("?")[0]||"",V=r.extract(R.url),J=r.parse(V,{sort:!1}),Y=Object.assign(J,R.query);let Z=r.stringify(Y,L);Z&&(Z=`?${Z}`);let W=function T(R){let L="";const H=R.indexOf("#");return-1!==H&&(L=R.slice(H)),L}(R.url);return R.fragmentIdentifier&&(W=`#${L[h]?b(R.fragmentIdentifier,L):R.fragmentIdentifier}`),`${H}${Z}${W}`},r.pick=(R,L,H)=>{H=Object.assign({parseFragmentIdentifier:!0,[h]:!1},H);const{url:V,query:J,fragmentIdentifier:Y}=r.parseUrl(R,H);return r.stringifyUrl({url:V,query:S(J,L),fragmentIdentifier:Y},H)},r.exclude=(R,L,H)=>{const V=Array.isArray(L)?J=>!L.includes(J):(J,Y)=>!L(J,Y);return r.pick(R,V,H)}},90516:ne=>{"use strict";function r(d,l){return Object.prototype.hasOwnProperty.call(d,l)}ne.exports=function(d,l,_,E){l=l||"&",_=_||"=";var S={};if("string"!=typeof d||0===d.length)return S;var a=/\+/g;d=d.split(l);var h=1e3;E&&"number"==typeof E.maxKeys&&(h=E.maxKeys);var g=d.length;h>0&&g>h&&(g=h);for(var y=0;y=0?(A=v.substr(0,b),O=v.substr(b+1)):(A=v,O=""),C=decodeURIComponent(A),T=decodeURIComponent(O),r(S,C)?Array.isArray(S[C])?S[C].push(T):S[C]=[S[C],T]:S[C]=T}return S}},75776:ne=>{"use strict";var r=function(d){switch(typeof d){case"string":return d;case"boolean":return d?"true":"false";case"number":return isFinite(d)?d:"";default:return""}};ne.exports=function(d,l,_,E){return l=l||"&",_=_||"=",null===d&&(d=void 0),"object"==typeof d?Object.keys(d).map(function(S){var a=encodeURIComponent(r(S))+_;return Array.isArray(d[S])?d[S].map(function(h){return a+encodeURIComponent(r(h))}).join(l):a+encodeURIComponent(r(d[S]))}).join(l):E?encodeURIComponent(r(E))+_+encodeURIComponent(r(d)):""}},17137:(ne,r,d)=>{"use strict";r.decode=r.parse=d(90516),r.encode=r.stringify=d(75776)},18958:ne=>{"use strict";function r(l){try{return JSON.stringify(l)}catch{return'"[Circular]"'}}ne.exports=function d(l,_,E){var S=E&&E.stringify||r;if("object"==typeof l&&null!==l){var h=_.length+1;if(1===h)return l;var g=new Array(h);g[0]=S(l);for(var y=1;y-1?O:0,l.charCodeAt(T+1)){case 100:case 102:if(A>=v||null==_[A])break;O=v||null==_[A])break;O=v||void 0===_[A])break;O",O=T+2,T++;break}b+=S(_[A]),O=T+2,T++;break;case 115:if(A>=v)break;O{"use strict";var l=65536,_=4294967295;var S=d(73502).Buffer,a=global.crypto||global.msCrypto;a&&a.getRandomValues?ne.exports=function h(g,y){if(g>_)throw new RangeError("requested too many random bytes");var v=S.allocUnsafe(g);if(g>0)if(g>l)for(var b=0;b{"use strict";function l(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var _=d(73502),E=d(53753),S=_.Buffer,a=_.kMaxLength,h=global.crypto||global.msCrypto,g=Math.pow(2,32)-1;function y(C,T){if("number"!=typeof C||C!=C)throw new TypeError("offset must be a number");if(C>g||C<0)throw new TypeError("offset must be a uint32");if(C>a||C>T)throw new RangeError("offset out of range")}function v(C,T,N){if("number"!=typeof C||C!=C)throw new TypeError("size must be a number");if(C>g||C<0)throw new TypeError("size must be a uint32");if(C+T>N||C>a)throw new RangeError("buffer too small")}function A(C,T,N,M){if(process.browser){var P=C.buffer,R=new Uint8Array(P,T,N);return h.getRandomValues(R),M?void process.nextTick(function(){M(null,C)}):C}if(!M)return E(N).copy(C,T),C;E(N,function(H,V){if(H)return M(H);V.copy(C,T),M(null,C)})}h&&h.getRandomValues||!process.browser?(r.randomFill=function b(C,T,N,M){if(!(S.isBuffer(C)||C instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof T)M=T,T=0,N=C.length;else if("function"==typeof N)M=N,N=C.length-T;else if("function"!=typeof M)throw new TypeError('"cb" argument must be a function');return y(T,C.length),v(N,T,C.length),A(C,T,N,M)},r.randomFillSync=function O(C,T,N){if(typeof T>"u"&&(T=0),!(S.isBuffer(C)||C instanceof global.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return y(T,C.length),void 0===N&&(N=C.length-T),v(N,T,C.length),A(C,T,N)}):(r.randomFill=l,r.randomFillSync=l)},66509:(ne,r,d)=>{"use strict";var l=d(54284),_=d(44854);function E(z){for(var $="https://reactjs.org/docs/error-decoder.html?invariant="+z,oe=1;oe"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,b=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,A={},O={};function M(z,$,oe,pe,Me,ke,We){this.acceptsBooleans=2===$||3===$||4===$,this.attributeName=pe,this.attributeNamespace=Me,this.mustUseProperty=oe,this.propertyName=z,this.type=$,this.sanitizeURL=ke,this.removeEmptyString=We}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(z){P[z]=new M(z,0,!1,z,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(z){var $=z[0];P[$]=new M($,1,!1,z[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(z){P[z]=new M(z,2,!1,z.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(z){P[z]=new M(z,2,!1,z,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(z){P[z]=new M(z,3,!1,z.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(z){P[z]=new M(z,3,!0,z,null,!1,!1)}),["capture","download"].forEach(function(z){P[z]=new M(z,4,!1,z,null,!1,!1)}),["cols","rows","size","span"].forEach(function(z){P[z]=new M(z,6,!1,z,null,!1,!1)}),["rowSpan","start"].forEach(function(z){P[z]=new M(z,5,!1,z.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function L(z){return z[1].toUpperCase()}function H(z,$,oe,pe){var Me=P.hasOwnProperty($)?P[$]:null;(null!==Me?0!==Me.type:pe||!(2<$.length)||"o"!==$[0]&&"O"!==$[0]||"n"!==$[1]&&"N"!==$[1])&&(function N(z,$,oe,pe){if(null===$||typeof $>"u"||function T(z,$,oe,pe){if(null!==oe&&0===oe.type)return!1;switch(typeof $){case"function":case"symbol":return!0;case"boolean":return!pe&&(null!==oe?!oe.acceptsBooleans:"data-"!==(z=z.toLowerCase().slice(0,5))&&"aria-"!==z);default:return!1}}(z,$,oe,pe))return!0;if(pe)return!1;if(null!==oe)switch(oe.type){case 3:return!$;case 4:return!1===$;case 5:return isNaN($);case 6:return isNaN($)||1>$}return!1}($,oe,Me,pe)&&(oe=null),pe||null===Me?function C(z){return!!v.call(O,z)||!v.call(A,z)&&(b.test(z)?O[z]=!0:(A[z]=!0,!1))}($)&&(null===oe?z.removeAttribute($):z.setAttribute($,""+oe)):Me.mustUseProperty?z[Me.propertyName]=null===oe?3!==Me.type&&"":oe:($=Me.attributeName,pe=Me.attributeNamespace,null===oe?z.removeAttribute($):(oe=3===(Me=Me.type)||4===Me&&!0===oe?"":""+oe,pe?z.setAttributeNS(pe,$,oe):z.setAttribute($,oe))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(z){var $=z.replace(R,L);P[$]=new M($,1,!1,z,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(z){var $=z.replace(R,L);P[$]=new M($,1,!1,z,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(z){var $=z.replace(R,L);P[$]=new M($,1,!1,z,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(z){P[z]=new M(z,1,!1,z.toLowerCase(),null,!1,!1)}),P.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(z){P[z]=new M(z,1,!1,z.toLowerCase(),null,!0,!0)});var V=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=Symbol.for("react.element"),Y=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),F=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var G=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var k=Symbol.iterator;function p(z){return null===z||"object"!=typeof z?null:"function"==typeof(z=k&&z[k]||z["@@iterator"])?z:null}var ie,B=Object.assign;function te(z){if(void 0===ie)try{throw Error()}catch(oe){var $=oe.stack.trim().match(/\n( *(at )?)/);ie=$&&$[1]||""}return"\n"+ie+z}var ee=!1;function ue(z,$){if(!z||ee)return"";ee=!0;var oe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if($)if($=function(){throw Error()},Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct($,[])}catch(Rt){var pe=Rt}Reflect.construct(z,[],$)}else{try{$.call()}catch(Rt){pe=Rt}z.call($.prototype)}else{try{throw Error()}catch(Rt){pe=Rt}z()}}catch(Rt){if(Rt&&pe&&"string"==typeof Rt.stack){for(var Me=Rt.stack.split("\n"),ke=pe.stack.split("\n"),We=Me.length-1,it=ke.length-1;1<=We&&0<=it&&Me[We]!==ke[it];)it--;for(;1<=We&&0<=it;We--,it--)if(Me[We]!==ke[it]){if(1!==We||1!==it)do{if(We--,0>--it||Me[We]!==ke[it]){var ft="\n"+Me[We].replace(" at new "," at ");return z.displayName&&ft.includes("")&&(ft=ft.replace("",z.displayName)),ft}}while(1<=We&&0<=it);break}}}finally{ee=!1,Error.prepareStackTrace=oe}return(z=z?z.displayName||z.name:"")?te(z):""}function we(z){switch(z.tag){case 5:return te(z.type);case 16:return te("Lazy");case 13:return te("Suspense");case 19:return te("SuspenseList");case 0:case 2:case 15:return z=ue(z.type,!1);case 11:return z=ue(z.type.render,!1);case 1:return z=ue(z.type,!0);default:return""}}function me(z){if(null==z)return null;if("function"==typeof z)return z.displayName||z.name||null;if("string"==typeof z)return z;switch(z){case Z:return"Fragment";case Y:return"Portal";case Q:return"Profiler";case W:return"StrictMode";case m:return"Suspense";case w:return"SuspenseList"}if("object"==typeof z)switch(z.$$typeof){case o:return(z.displayName||"Context")+".Consumer";case D:return(z._context.displayName||"Context")+".Provider";case u:var $=z.render;return(z=z.displayName)||(z=""!==(z=$.displayName||$.name||"")?"ForwardRef("+z+")":"ForwardRef"),z;case x:return null!==($=z.displayName||null)?$:me(z.type)||"Memo";case F:$=z._payload,z=z._init;try{return me(z($))}catch{}}return null}function ve(z){var $=z.type;switch(z.tag){case 24:return"Cache";case 9:return($.displayName||"Context")+".Consumer";case 10:return($._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return z=(z=$.render).displayName||z.name||"",$.displayName||(""!==z?"ForwardRef("+z+")":"ForwardRef");case 7:return"Fragment";case 5:return $;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me($);case 8:return $===W?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof $)return $.displayName||$.name||null;if("string"==typeof $)return $}return null}function ce(z){switch(typeof z){case"boolean":case"number":case"string":case"undefined":case"object":return z;default:return""}}function he(z){var $=z.type;return(z=z.nodeName)&&"input"===z.toLowerCase()&&("checkbox"===$||"radio"===$)}function de(z){z._valueTracker||(z._valueTracker=function le(z){var $=he(z)?"checked":"value",oe=Object.getOwnPropertyDescriptor(z.constructor.prototype,$),pe=""+z[$];if(!z.hasOwnProperty($)&&typeof oe<"u"&&"function"==typeof oe.get&&"function"==typeof oe.set){var Me=oe.get,ke=oe.set;return Object.defineProperty(z,$,{configurable:!0,get:function(){return Me.call(this)},set:function(We){pe=""+We,ke.call(this,We)}}),Object.defineProperty(z,$,{enumerable:oe.enumerable}),{getValue:function(){return pe},setValue:function(We){pe=""+We},stopTracking:function(){z._valueTracker=null,delete z[$]}}}}(z))}function ae(z){if(!z)return!1;var $=z._valueTracker;if(!$)return!0;var oe=$.getValue(),pe="";return z&&(pe=he(z)?z.checked?"true":"false":z.value),(z=pe)!==oe&&($.setValue(z),!0)}function ye(z){if(typeof(z=z||(typeof document<"u"?document:void 0))>"u")return null;try{return z.activeElement||z.body}catch{return z.body}}function Ce(z,$){var oe=$.checked;return B({},$,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:oe??z._wrapperState.initialChecked})}function Pe(z,$){var oe=null==$.defaultValue?"":$.defaultValue,pe=null!=$.checked?$.checked:$.defaultChecked;oe=ce(null!=$.value?$.value:oe),z._wrapperState={initialChecked:pe,initialValue:oe,controlled:"checkbox"===$.type||"radio"===$.type?null!=$.checked:null!=$.value}}function Ge(z,$){null!=($=$.checked)&&H(z,"checked",$,!1)}function Ve(z,$){Ge(z,$);var oe=ce($.value),pe=$.type;if(null!=oe)"number"===pe?(0===oe&&""===z.value||z.value!=oe)&&(z.value=""+oe):z.value!==""+oe&&(z.value=""+oe);else if("submit"===pe||"reset"===pe)return void z.removeAttribute("value");$.hasOwnProperty("value")?_t(z,$.type,oe):$.hasOwnProperty("defaultValue")&&_t(z,$.type,ce($.defaultValue)),null==$.checked&&null!=$.defaultChecked&&(z.defaultChecked=!!$.defaultChecked)}function Ue(z,$,oe){if($.hasOwnProperty("value")||$.hasOwnProperty("defaultValue")){var pe=$.type;if(!("submit"!==pe&&"reset"!==pe||void 0!==$.value&&null!==$.value))return;$=""+z._wrapperState.initialValue,oe||$===z.value||(z.value=$),z.defaultValue=$}""!==(oe=z.name)&&(z.name=""),z.defaultChecked=!!z._wrapperState.initialChecked,""!==oe&&(z.name=oe)}function _t(z,$,oe){("number"!==$||ye(z.ownerDocument)!==z)&&(null==oe?z.defaultValue=""+z._wrapperState.initialValue:z.defaultValue!==""+oe&&(z.defaultValue=""+oe))}var Ze=Array.isArray;function $e(z,$,oe,pe){if(z=z.options,$){$={};for(var Me=0;Me"+$.valueOf().toString()+"",$=xe.firstChild;z.firstChild;)z.removeChild(z.firstChild);for(;$.firstChild;)z.appendChild($.firstChild)}},typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function($,oe,pe,Me){MSApp.execUnsafeLocalFunction(function(){return z($,oe)})}:z);function He(z,$){if($){var oe=z.firstChild;if(oe&&oe===z.lastChild&&3===oe.nodeType)return void(oe.nodeValue=$)}z.textContent=$}var lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Je=["Webkit","ms","Moz","O"];function at(z,$,oe){return null==$||"boolean"==typeof $||""===$?"":oe||"number"!=typeof $||0===$||lt.hasOwnProperty(z)&<[z]?(""+$).trim():$+"px"}function fn(z,$){for(var oe in z=z.style,$)if($.hasOwnProperty(oe)){var pe=0===oe.indexOf("--"),Me=at(oe,$[oe],pe);"float"===oe&&(oe="cssFloat"),pe?z.setProperty(oe,Me):z[oe]=Me}}Object.keys(lt).forEach(function(z){Je.forEach(function($){$=$+z.charAt(0).toUpperCase()+z.substring(1),lt[$]=lt[z]})});var ct=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dt(z,$){if($){if(ct[z]&&(null!=$.children||null!=$.dangerouslySetInnerHTML))throw Error(E(137,z));if(null!=$.dangerouslySetInnerHTML){if(null!=$.children)throw Error(E(60));if("object"!=typeof $.dangerouslySetInnerHTML||!("__html"in $.dangerouslySetInnerHTML))throw Error(E(61))}if(null!=$.style&&"object"!=typeof $.style)throw Error(E(62))}}function yn(z,$){if(-1===z.indexOf("-"))return"string"==typeof $.is;switch(z){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ht=null;function It(z){return(z=z.target||z.srcElement||window).correspondingUseElement&&(z=z.correspondingUseElement),3===z.nodeType?z.parentNode:z}var or=null,Dt=null,Mt=null;function In(z){if(z=To(z)){if("function"!=typeof or)throw Error(E(280));var $=z.stateNode;$&&($=qp($),or(z.stateNode,z.type,$))}}function yt(z){Dt?Mt?Mt.push(z):Mt=[z]:Dt=z}function wt(){if(Dt){var z=Dt,$=Mt;if(Mt=Dt=null,In(z),$)for(z=0;z<$.length;z++)In($[z])}}function Pn(z,$){return z($)}function vt(){}var St=!1;function Fn(z,$,oe){if(St)return z($,oe);St=!0;try{return Pn(z,$,oe)}finally{St=!1,(null!==Dt||null!==Mt)&&(vt(),wt())}}function pt(z,$){var oe=z.stateNode;if(null===oe)return null;var pe=qp(oe);if(null===pe)return null;oe=pe[$];e:switch($){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(pe=!pe.disabled)||(pe=!("button"===(z=z.type)||"input"===z||"select"===z||"textarea"===z)),z=!pe;break e;default:z=!1}if(z)return null;if(oe&&"function"!=typeof oe)throw Error(E(231,$,typeof oe));return oe}var At=!1;if(y)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){At=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch{At=!1}function Se(z,$,oe,pe,Me,ke,We,it,ft){var Rt=Array.prototype.slice.call(arguments,3);try{$.apply(oe,Rt)}catch(cn){this.onError(cn)}}var De=!1,Ee=null,Ne=!1,ze=null,ot={onError:function(z){De=!0,Ee=z}};function Qe(z,$,oe,pe,Me,ke,We,it,ft){De=!1,Ee=null,Se.apply(ot,arguments)}function Ft(z){var $=z,oe=z;if(z.alternate)for(;$.return;)$=$.return;else{z=$;do{4098&($=z).flags&&(oe=$.return),z=$.return}while(z)}return 3===$.tag?oe:null}function xt(z){if(13===z.tag){var $=z.memoizedState;if(null===$&&(null!==(z=z.alternate)&&($=z.memoizedState)),null!==$)return $.dehydrated}return null}function Yt(z){if(Ft(z)!==z)throw Error(E(188))}function Qt(z){return null!==(z=function Ut(z){var $=z.alternate;if(!$){if(null===($=Ft(z)))throw Error(E(188));return $!==z?null:z}for(var oe=z,pe=$;;){var Me=oe.return;if(null===Me)break;var ke=Me.alternate;if(null===ke){if(null!==(pe=Me.return)){oe=pe;continue}break}if(Me.child===ke.child){for(ke=Me.child;ke;){if(ke===oe)return Yt(Me),z;if(ke===pe)return Yt(Me),$;ke=ke.sibling}throw Error(E(188))}if(oe.return!==pe.return)oe=Me,pe=ke;else{for(var We=!1,it=Me.child;it;){if(it===oe){We=!0,oe=Me,pe=ke;break}if(it===pe){We=!0,pe=Me,oe=ke;break}it=it.sibling}if(!We){for(it=ke.child;it;){if(it===oe){We=!0,oe=ke,pe=Me;break}if(it===pe){We=!0,pe=ke,oe=Me;break}it=it.sibling}if(!We)throw Error(E(189))}}if(oe.alternate!==pe)throw Error(E(190))}if(3!==oe.tag)throw Error(E(188));return oe.stateNode.current===oe?z:$}(z))?Kt(z):null}function Kt(z){if(5===z.tag||6===z.tag)return z;for(z=z.child;null!==z;){var $=Kt(z);if(null!==$)return $;z=z.sibling}return null}var sn=_.unstable_scheduleCallback,qt=_.unstable_cancelCallback,pn=_.unstable_shouldYield,ln=_.unstable_requestPaint,Xt=_.unstable_now,jt=_.unstable_getCurrentPriorityLevel,on=_.unstable_ImmediatePriority,Wt=_.unstable_UserBlockingPriority,Ht=_.unstable_NormalPriority,un=_.unstable_LowPriority,Gt=_.unstable_IdlePriority,Et=null,bt=null;var kt=Math.clz32?Math.clz32:function Cn(z){return z>>>=0,0===z?32:31-(Bt(z)/tn|0)|0},Bt=Math.log,tn=Math.LN2;var Un=64,Bn=4194304;function Vn(z){switch(z&-z){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&z;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&z;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return z}}function st(z,$){var oe=z.pendingLanes;if(0===oe)return 0;var pe=0,Me=z.suspendedLanes,ke=z.pingedLanes,We=268435455&oe;if(0!==We){var it=We&~Me;0!==it?pe=Vn(it):0!==(ke&=We)&&(pe=Vn(ke))}else 0!==(We=oe&~Me)?pe=Vn(We):0!==ke&&(pe=Vn(ke));if(0===pe)return 0;if(0!==$&&$!==pe&&!($&Me)&&((Me=pe&-pe)>=(ke=$&-$)||16===Me&&0!=(4194240&ke)))return $;if(4&pe&&(pe|=16&oe),0!==($=z.entangledLanes))for(z=z.entanglements,$&=pe;0<$;)Me=1<<(oe=31-kt($)),pe|=z[oe],$&=~Me;return pe}function Jn(z,$){switch(z){case 1:case 2:case 4:return $+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return $+5e3;default:return-1}}function Yn(z){return 0!==(z=-1073741825&z.pendingLanes)?z:1073741824&z?1073741824:0}function Gn(){var z=Un;return!(4194240&(Un<<=1))&&(Un=64),z}function $n(z){for(var $=[],oe=0;31>oe;oe++)$.push(z);return $}function er(z,$,oe){z.pendingLanes|=$,536870912!==$&&(z.suspendedLanes=0,z.pingedLanes=0),(z=z.eventTimes)[$=31-kt($)]=oe}function dr(z,$){var oe=z.entangledLanes|=$;for(z=z.entanglements;oe;){var pe=31-kt(oe),Me=1<=wc),Mr=String.fromCharCode(32),bh=!1;function sv(z,$){switch(z){case"keyup":return-1!==rv.indexOf($.keyCode);case"keydown":return 229!==$.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fs(z){return"object"==typeof(z=z.detail)&&"data"in z?z.data:null}var Ec=!1;var L3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ww(z){var $=z&&z.nodeName&&z.nodeName.toLowerCase();return"input"===$?!!L3[z.type]:"textarea"===$}function Ew(z,$,oe,pe){yt(pe),0<($=Dc($,"onChange")).length&&(oe=new hn("onChange","change",null,oe,pe),z.push({event:oe,listeners:$}))}var Bs=null,Ac=null;function wh(z){Sn(z,0)}function Eh(z){if(ae(Nl(z)))return z}function Aw(z,$){if("change"===z)return $}var av=!1;if(y){var Ah;if(y){var _c="oninput"in document;if(!_c){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),_c="function"==typeof Sc.oninput}Ah=_c}else Ah=!1;av=Ah&&(!document.documentMode||9=$)return{node:oe,offset:$-z};z=pe}e:{for(;oe;){if(oe.nextSibling){oe=oe.nextSibling;break e}oe=oe.parentNode}oe=void 0}oe=lv(oe)}}function Mc(z,$){return!(!z||!$)&&(z===$||(!z||3!==z.nodeType)&&($&&3===$.nodeType?Mc(z,$.parentNode):"contains"in z?z.contains($):!!z.compareDocumentPosition&&!!(16&z.compareDocumentPosition($))))}function Da(){for(var z=window,$=ye();$ instanceof z.HTMLIFrameElement;){try{var oe="string"==typeof $.contentWindow.location.href}catch{oe=!1}if(!oe)break;$=ye((z=$.contentWindow).document)}return $}function na(z){var $=z&&z.nodeName&&z.nodeName.toLowerCase();return $&&("input"===$&&("text"===z.type||"search"===z.type||"tel"===z.type||"url"===z.type||"password"===z.type)||"textarea"===$||"true"===z.contentEditable)}function Fr(z){var $=Da(),oe=z.focusedElem,pe=z.selectionRange;if($!==oe&&oe&&oe.ownerDocument&&Mc(oe.ownerDocument.documentElement,oe)){if(null!==pe&&na(oe))if($=pe.start,void 0===(z=pe.end)&&(z=$),"selectionStart"in oe)oe.selectionStart=$,oe.selectionEnd=Math.min(z,oe.value.length);else if((z=($=oe.ownerDocument||document)&&$.defaultView||window).getSelection){z=z.getSelection();var Me=oe.textContent.length,ke=Math.min(pe.start,Me);pe=void 0===pe.end?ke:Math.min(pe.end,Me),!z.extend&&ke>pe&&(Me=pe,pe=ke,ke=Me),Me=Ia(oe,ke);var We=Ia(oe,pe);Me&&We&&(1!==z.rangeCount||z.anchorNode!==Me.node||z.anchorOffset!==Me.offset||z.focusNode!==We.node||z.focusOffset!==We.offset)&&(($=$.createRange()).setStart(Me.node,Me.offset),z.removeAllRanges(),ke>pe?(z.addRange($),z.extend(We.node,We.offset)):($.setEnd(We.node,We.offset),z.addRange($)))}for($=[],z=oe;z=z.parentNode;)1===z.nodeType&&$.push({element:z,left:z.scrollLeft,top:z.scrollTop});for("function"==typeof oe.focus&&oe.focus(),oe=0;oe<$.length;oe++)(z=$[oe]).element.scrollLeft=z.left,z.element.scrollTop=z.top}}var Sh=y&&"documentMode"in document&&11>=document.documentMode,Hu=null,Uf=null,Ol=null,ra=!1;function xl(z,$,oe){var pe=oe.window===oe?oe.document:9===oe.nodeType?oe:oe.ownerDocument;ra||null==Hu||Hu!==ye(pe)||("selectionStart"in(pe=Hu)&&na(pe)?pe={start:pe.selectionStart,end:pe.selectionEnd}:pe={anchorNode:(pe=(pe.ownerDocument&&pe.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:pe.anchorOffset,focusNode:pe.focusNode,focusOffset:pe.focusOffset},Ol&&Ff(Ol,pe)||(Ol=pe,0<(pe=Dc(Uf,"onSelect")).length&&($=new hn("onSelect","select",null,$,oe),z.push({event:$,listeners:pe}),$.target=Hu)))}function Mh(z,$){var oe={};return oe[z.toLowerCase()]=$.toLowerCase(),oe["Webkit"+z]="webkit"+$,oe["Moz"+z]="moz"+$,oe}var Ho={animationend:Mh("Animation","AnimationEnd"),animationiteration:Mh("Animation","AnimationIteration"),animationstart:Mh("Animation","AnimationStart"),transitionend:Mh("Transition","TransitionEnd")},Zp={},fv={};function Ih(z){if(Zp[z])return Zp[z];if(!Ho[z])return z;var oe,$=Ho[z];for(oe in $)if($.hasOwnProperty(oe)&&oe in fv)return Zp[z]=$[oe];return z}y&&(fv=document.createElement("div").style,"AnimationEvent"in window||(delete Ho.animationend.animation,delete Ho.animationiteration.animation,delete Ho.animationstart.animation),"TransitionEvent"in window||delete Ho.transitionend.transition);var js=Ih("animationend"),dv=Ih("animationiteration"),Jp=Ih("animationstart"),nr=Ih("transitionend"),Co=new Map,Ur="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yi(z,$){Co.set(z,$),h($,[z])}for(var yo=0;yoRl||(z.current=eg[Rl],eg[Rl]=null,Rl--)}function si(z,$){Rl++,eg[Rl]=z.current,z.current=$}var xc={},Oo=Oc(xc),ps=Oc(!1),kl=xc;function Hf(z,$){var oe=z.type.contextTypes;if(!oe)return xc;var pe=z.stateNode;if(pe&&pe.__reactInternalMemoizedUnmaskedChildContext===$)return pe.__reactInternalMemoizedMaskedChildContext;var ke,Me={};for(ke in oe)Me[ke]=$[ke];return pe&&((z=z.stateNode).__reactInternalMemoizedUnmaskedChildContext=$,z.__reactInternalMemoizedMaskedChildContext=Me),Me}function gs(z){return null!=(z=z.childContextTypes)}function tg(){di(ps),di(Oo)}function _w(z,$,oe){if(Oo.current!==xc)throw Error(E(168));si(Oo,$),si(ps,oe)}function Sw(z,$,oe){var pe=z.stateNode;if($=$.childContextTypes,"function"!=typeof pe.getChildContext)return oe;for(var Me in pe=pe.getChildContext())if(!(Me in $))throw Error(E(108,ve(z)||"Unknown",Me));return B({},oe,pe)}function Wf(z){return z=(z=z.stateNode)&&z.__reactInternalMemoizedMergedChildContext||xc,kl=Oo.current,si(Oo,z),si(ps,ps.current),!0}function ng(z,$,oe){var pe=z.stateNode;if(!pe)throw Error(E(169));oe?(z=Sw(z,$,kl),pe.__reactInternalMemoizedMergedChildContext=z,di(ps),di(Oo),si(Oo,z)):di(ps),si(ps,oe)}var Zu=null,rg=!1,gv=!1;function Ju(z){null===Zu?Zu=[z]:Zu.push(z)}function uo(){if(!gv&&null!==Zu){gv=!0;var z=0,$=Rn;try{var oe=Zu;for(Rn=1;z>=We,Me-=We,au=1<<32-kt($)+Me|oe<Zn?(Yi=Kn,Kn=null):Yi=Kn.sibling;var xr=an(Ct,Kn,Nt[Zn],gn);if(null===xr){null===Kn&&(Kn=Yi);break}z&&Kn&&null===xr.alternate&&$(Ct,Kn),gt=ke(xr,gt,Zn),null===Wn?Ln=xr:Wn.sibling=xr,Wn=xr,Kn=Yi}if(Zn===Nt.length)return oe(Ct,Kn),hi&&Yu(Ct,Zn),Ln;if(null===Kn){for(;ZnZn?(Yi=Kn,Kn=null):Yi=Kn.sibling;var mu=an(Ct,Kn,xr.value,gn);if(null===mu){null===Kn&&(Kn=Yi);break}z&&Kn&&null===mu.alternate&&$(Ct,Kn),gt=ke(mu,gt,Zn),null===Wn?Ln=mu:Wn.sibling=mu,Wn=mu,Kn=Yi}if(xr.done)return oe(Ct,Kn),hi&&Yu(Ct,Zn),Ln;if(null===Kn){for(;!xr.done;Zn++,xr=Nt.next())null!==(xr=dn(Ct,xr.value,gn))&&(gt=ke(xr,gt,Zn),null===Wn?Ln=xr:Wn.sibling=xr,Wn=xr);return hi&&Yu(Ct,Zn),Ln}for(Kn=pe(Ct,Kn);!xr.done;Zn++,xr=Nt.next())null!==(xr=En(Kn,Ct,Zn,xr.value,gn))&&(z&&null!==xr.alternate&&Kn.delete(null===xr.key?Zn:xr.key),gt=ke(xr,gt,Zn),null===Wn?Ln=xr:Wn.sibling=xr,Wn=xr);return z&&Kn.forEach(function(Xc){return $(Ct,Xc)}),hi&&Yu(Ct,Zn),Ln}(Ct,gt,Nt,gn);$f(Ct,Nt)}return"string"==typeof Nt&&""!==Nt||"number"==typeof Nt?(Nt=""+Nt,null!==gt&&6===gt.tag?(oe(Ct,gt.sibling),(gt=Me(gt,Nt)).return=Ct,Ct=gt):(oe(Ct,gt),(gt=Jg(Nt,Ct.mode,gn)).return=Ct,Ct=gt),We(Ct)):oe(Ct,gt)}}var Bc=wv(!0),Bh=wv(!1),Fl={},ca=Oc(Fl),Ul=Oc(Fl),Kl=Oc(Fl);function cu(z){if(z===Fl)throw Error(E(174));return z}function hg(z,$){switch(si(Kl,$),si(Ul,z),si(ca,Fl),z=$.nodeType){case 9:case 11:$=($=$.documentElement)?$.namespaceURI:Ae(null,"");break;default:$=Ae($=(z=8===z?$.parentNode:$).namespaceURI||null,z=z.tagName)}di(ca),si(ca,$)}function zl(){di(ca),di(Ul),di(Kl)}function bo(z){cu(Kl.current);var $=cu(ca.current),oe=Ae($,z.type);$!==oe&&(si(Ul,z),si(ca,oe))}function lu(z){Ul.current===z&&(di(ca),di(Ul))}var ir=Oc(0);function jh(z){for(var $=z;null!==$;){if(13===$.tag){var oe=$.memoizedState;if(null!==oe&&(null===(oe=oe.dehydrated)||"$?"===oe.data||"$!"===oe.data))return $}else if(19===$.tag&&void 0!==$.memoizedProps.revealOrder){if(128&$.flags)return $}else if(null!==$.child){$.child.return=$,$=$.child;continue}if($===z)break;for(;null===$.sibling;){if(null===$.return||$.return===z)return null;$=$.return}$.sibling.return=$.return,$=$.sibling}return null}var pg=[];function gg(){for(var z=0;zoe?oe:4,z(!0);var pe=yg.transition;yg.transition={};try{z(!1),$()}finally{Rn=oe,yg.transition=pe}}function Mg(){return Vs().memoizedState}function Dv(z,$,oe){var pe=La(z);if(oe={lane:pe,action:oe,hasEagerState:!1,eagerState:null,next:null},Ig(z))Tv($,oe);else if(null!==(oe=lg(z,$,oe,pe))){da(oe,z,pe,Eo()),rd(oe,$,pe)}}function Cv(z,$,oe){var pe=La(z),Me={lane:pe,action:oe,hasEagerState:!1,eagerState:null,next:null};if(Ig(z))Tv($,Me);else{var ke=z.alternate;if(0===z.lanes&&(null===ke||0===ke.lanes)&&null!==(ke=$.lastRenderedReducer))try{var We=$.lastRenderedState,it=ke(We,oe);if(Me.hasEagerState=!0,Me.eagerState=it,ta(it,We)){var ft=$.interleaved;return null===ft?(Me.next=Me,Hi($)):(Me.next=ft.next,ft.next=Me),void($.interleaved=Me)}}catch{}null!==(oe=lg(z,$,Me,pe))&&(da(oe,z,pe,Me=Eo()),rd(oe,$,pe))}}function Ig(z){var $=z.alternate;return z===ti||null!==$&&$===ti}function Tv(z,$){Hl=Vl=!0;var oe=z.pending;null===oe?$.next=$:($.next=oe.next,oe.next=$),z.pending=$}function rd(z,$,oe){if(4194240&oe){var pe=$.lanes;oe|=pe&=z.pendingLanes,$.lanes=oe,dr(z,oe)}}var xa={readContext:Li,useCallback:Bi,useContext:Bi,useEffect:Bi,useImperativeHandle:Bi,useInsertionEffect:Bi,useLayoutEffect:Bi,useMemo:Bi,useReducer:Bi,useRef:Bi,useState:Bi,useDebugValue:Bi,useDeferredValue:Bi,useTransition:Bi,useMutableSource:Bi,useSyncExternalStore:Bi,useId:Bi,unstable_isNewReconciler:!1},Dw={readContext:Li,useCallback:function(z,$){return fu().memoizedState=[z,void 0===$?null:$],z},useContext:Li,useEffect:_g,useImperativeHandle:function(z,$,oe){return oe=null!=oe?oe.concat([z]):null,Fc(4194308,4,Iv.bind(null,$,z),oe)},useLayoutEffect:function(z,$){return Fc(4194308,4,z,$)},useInsertionEffect:function(z,$){return Fc(4,2,z,$)},useMemo:function(z,$){var oe=fu();return $=void 0===$?null:$,z=z(),oe.memoizedState=[z,$],z},useReducer:function(z,$,oe){var pe=fu();return $=void 0!==oe?oe($):$,pe.memoizedState=pe.baseState=$,z={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:z,lastRenderedState:$},pe.queue=z,z=z.dispatch=Dv.bind(null,ti,z),[pe.memoizedState,z]},useRef:function(z){return z={current:z},fu().memoizedState=z},useState:Sv,useDebugValue:nd,useDeferredValue:function(z){return fu().memoizedState=z},useTransition:function(){var z=Sv(!1),$=z[0];return z=Iw.bind(null,z[1]),fu().memoizedState=z,[$,z]},useMutableSource:function(){},useSyncExternalStore:function(z,$,oe){var pe=ti,Me=fu();if(hi){if(void 0===oe)throw Error(E(407));oe=oe()}else{if(oe=$(),null===Gi)throw Error(E(349));30&jc||bg(pe,$,oe)}Me.memoizedState=oe;var ke={value:oe,getSnapshot:$};return Me.queue=ke,_g(wg.bind(null,pe,ke,z),[z]),pe.flags|=2048,Qu(9,Gl.bind(null,pe,ke,oe,$),void 0,null),oe},useId:function(){var z=fu(),$=Gi.identifierPrefix;if(hi){var oe=ki;$=":"+$+"R"+(oe=(au&~(1<<32-kt(au)-1)).toString(32)+oe),0<(oe=Qf++)&&($+="H"+oe.toString(32)),$+=":"}else $=":"+$+"r"+(oe=Wl++).toString(32)+":";return z.memoizedState=$},unstable_isNewReconciler:!1},Ov={readContext:Li,useCallback:Sg,useContext:Li,useEffect:zh,useImperativeHandle:td,useInsertionEffect:Mv,useLayoutEffect:la,useMemo:Vh,useReducer:Av,useRef:Kh,useState:function(){return Av(qf)},useDebugValue:nd,useDeferredValue:function(z){return Hh(Vs(),Ei.memoizedState,z)},useTransition:function(){return[Av(qf)[0],Vs().memoizedState]},useMutableSource:Uh,useSyncExternalStore:vg,useId:Mg,unstable_isNewReconciler:!1},xv={readContext:Li,useCallback:Sg,useContext:Li,useEffect:zh,useImperativeHandle:td,useInsertionEffect:Mv,useLayoutEffect:la,useMemo:Vh,useReducer:_v,useRef:Kh,useState:function(){return _v(qf)},useDebugValue:nd,useDeferredValue:function(z){var $=Vs();return null===Ei?$.memoizedState=z:Hh($,Ei.memoizedState,z)},useTransition:function(){return[_v(qf)[0],Vs().memoizedState]},useMutableSource:Uh,useSyncExternalStore:vg,useId:Mg,unstable_isNewReconciler:!1};function fa(z,$){try{var oe="",pe=$;do{oe+=we(pe),pe=pe.return}while(pe);var Me=oe}catch(ke){Me="\nError generating stack: "+ke.message+"\n"+ke.stack}return{value:z,source:$,stack:Me,digest:null}}function Dg(z,$,oe){return{value:z,source:null,stack:oe??null,digest:$??null}}function Wi(z,$){try{console.error($.value)}catch(oe){setTimeout(function(){throw oe})}}var Cg="function"==typeof WeakMap?WeakMap:Map;function Pv(z,$,oe){(oe=uu(-1,oe)).tag=3,oe.payload={element:null};var pe=$.value;return oe.callback=function(){e0||(e0=!0,t0=pe),Wi(0,$)},oe}function Tg(z,$,oe){(oe=uu(-1,oe)).tag=3;var pe=z.type.getDerivedStateFromError;if("function"==typeof pe){var Me=$.value;oe.payload=function(){return pe(Me)},oe.callback=function(){Wi(0,$)}}var ke=z.stateNode;return null!==ke&&"function"==typeof ke.componentDidCatch&&(oe.callback=function(){Wi(0,$),"function"!=typeof pe&&(null===ka?ka=new Set([this]):ka.add(this));var We=$.stack;this.componentDidCatch($.value,{componentStack:null!==We?We:""})}),oe}function Wh(z,$,oe){var pe=z.pingCache;if(null===pe){pe=z.pingCache=new Cg;var Me=new Set;pe.set($,Me)}else void 0===(Me=pe.get($))&&(Me=new Set,pe.set($,Me));Me.has(oe)||(Me.add(oe),z=fd.bind(null,z,$,oe),$.then(z,z))}function Uc(z){do{var $;if(($=13===z.tag)&&($=null===($=z.memoizedState)||null!==$.dehydrated),$)return z;z=z.return}while(null!==z);return null}function Kc(z,$,oe,pe,Me){return 1&z.mode?(z.flags|=65536,z.lanes=Me,z):(z===$?z.flags|=65536:(z.flags|=128,oe.flags|=131072,oe.flags&=-52805,1===oe.tag&&(null===oe.alternate?oe.tag=17:(($=uu(-1,1)).tag=2,Rc(oe,$,1))),oe.lanes|=1),z)}var Zl=V.ReactCurrentOwner,qi=!1;function lo(z,$,oe,pe){$.child=null===z?Bh($,null,oe,pe):Bc($,z.child,oe,pe)}function zc(z,$,oe,pe,Me){oe=oe.render;var ke=$.ref;return Er($,Me),pe=Ev(z,$,oe,pe,ke,Me),oe=Xf(),null===z||qi?(hi&&oe&&Vi($),$.flags|=1,lo(z,$,pe,Me),$.child):($.updateQueue=z.updateQueue,$.flags&=-2053,z.lanes&=~Me,Na(z,$,Me))}function du(z,$,oe,pe,Me){if(null===z){var ke=oe.type;return"function"!=typeof ke||c0(ke)||void 0!==ke.defaultProps||null!==oe.compare||void 0!==oe.defaultProps?((z=l0(oe.type,null,pe,$,$.mode,Me)).ref=$.ref,z.return=$,$.child=z):($.tag=15,$.type=ke,Nv(z,$,ke,pe,Me))}if(ke=z.child,!(z.lanes&Me)){var We=ke.memoizedProps;if((oe=null!==(oe=oe.compare)?oe:Ff)(We,pe)&&z.ref===$.ref)return Na(z,$,Me)}return $.flags|=1,(z=Ba(ke,pe)).ref=$.ref,z.return=$,$.child=z}function Nv(z,$,oe,pe,Me){if(null!==z){var ke=z.memoizedProps;if(Ff(ke,pe)&&z.ref===$.ref){if(qi=!1,$.pendingProps=pe=ke,0==(z.lanes&Me))return $.lanes=z.lanes,Na(z,$,Me);131072&z.flags&&(qi=!0)}}return Gh(z,$,oe,pe,Me)}function qn(z,$,oe){var pe=$.pendingProps,Me=pe.children,ke=null!==z?z.memoizedState:null;if("hidden"===pe.mode)if(1&$.mode){if(!(1073741824&oe))return z=null!==ke?ke.baseLanes|oe:oe,$.lanes=$.childLanes=1073741824,$.memoizedState={baseLanes:z,cachePool:null,transitions:null},$.updateQueue=null,si(nf,Hs),Hs|=z,null;$.memoizedState={baseLanes:0,cachePool:null,transitions:null},pe=null!==ke?ke.baseLanes:oe,si(nf,Hs),Hs|=pe}else $.memoizedState={baseLanes:0,cachePool:null,transitions:null},si(nf,Hs),Hs|=oe;else null!==ke?(pe=ke.baseLanes|oe,$.memoizedState=null):pe=oe,si(nf,Hs),Hs|=pe;return lo(z,$,Me,oe),$.child}function Cw(z,$){var oe=$.ref;(null===z&&null!==oe||null!==z&&z.ref!==oe)&&($.flags|=512,$.flags|=2097152)}function Gh(z,$,oe,pe,Me){var ke=gs(oe)?kl:Oo.current;return ke=Hf($,ke),Er($,Me),oe=Ev(z,$,oe,pe,ke,Me),pe=Xf(),null===z||qi?(hi&&pe&&Vi($),$.flags|=1,lo(z,$,oe,Me),$.child):($.updateQueue=z.updateQueue,$.flags&=-2053,z.lanes&=~Me,Na(z,$,Me))}function id(z,$,oe,pe,Me){if(gs(oe)){var ke=!0;Wf($)}else ke=!1;if(Er($,Me),null===$.stateNode)Pa(z,$),vv($,oe,pe),Yf($,oe,pe,Me),pe=!0;else if(null===z){var We=$.stateNode,it=$.memoizedProps;We.props=it;var ft=We.context,Rt=oe.contextType;"object"==typeof Rt&&null!==Rt?Rt=Li(Rt):Rt=Hf($,Rt=gs(oe)?kl:Oo.current);var cn=oe.getDerivedStateFromProps,dn="function"==typeof cn||"function"==typeof We.getSnapshotBeforeUpdate;dn||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(it!==pe||ft!==Rt)&&bv($,We,pe,Rt),co=!1;var an=$.memoizedState;We.state=an,zs($,pe,We,Me),ft=$.memoizedState,it!==pe||an!==ft||ps.current||co?("function"==typeof cn&&(ua($,oe,cn,pe),ft=$.memoizedState),(it=co||dg($,oe,it,pe,an,ft,Rt))?(dn||"function"!=typeof We.UNSAFE_componentWillMount&&"function"!=typeof We.componentWillMount||("function"==typeof We.componentWillMount&&We.componentWillMount(),"function"==typeof We.UNSAFE_componentWillMount&&We.UNSAFE_componentWillMount()),"function"==typeof We.componentDidMount&&($.flags|=4194308)):("function"==typeof We.componentDidMount&&($.flags|=4194308),$.memoizedProps=pe,$.memoizedState=ft),We.props=pe,We.state=ft,We.context=Rt,pe=it):("function"==typeof We.componentDidMount&&($.flags|=4194308),pe=!1)}else{We=$.stateNode,Rh(z,$),it=$.memoizedProps,Rt=$.type===$.elementType?it:Oa($.type,it),We.props=Rt,dn=$.pendingProps,an=We.context,"object"==typeof(ft=oe.contextType)&&null!==ft?ft=Li(ft):ft=Hf($,ft=gs(oe)?kl:Oo.current);var En=oe.getDerivedStateFromProps;(cn="function"==typeof En||"function"==typeof We.getSnapshotBeforeUpdate)||"function"!=typeof We.UNSAFE_componentWillReceiveProps&&"function"!=typeof We.componentWillReceiveProps||(it!==dn||an!==ft)&&bv($,We,pe,ft),co=!1,an=$.memoizedState,We.state=an,zs($,pe,We,Me);var xn=$.memoizedState;it!==dn||an!==xn||ps.current||co?("function"==typeof En&&(ua($,oe,En,pe),xn=$.memoizedState),(Rt=co||dg($,oe,Rt,pe,an,xn,ft)||!1)?(cn||"function"!=typeof We.UNSAFE_componentWillUpdate&&"function"!=typeof We.componentWillUpdate||("function"==typeof We.componentWillUpdate&&We.componentWillUpdate(pe,xn,ft),"function"==typeof We.UNSAFE_componentWillUpdate&&We.UNSAFE_componentWillUpdate(pe,xn,ft)),"function"==typeof We.componentDidUpdate&&($.flags|=4),"function"==typeof We.getSnapshotBeforeUpdate&&($.flags|=1024)):("function"!=typeof We.componentDidUpdate||it===z.memoizedProps&&an===z.memoizedState||($.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||it===z.memoizedProps&&an===z.memoizedState||($.flags|=1024),$.memoizedProps=pe,$.memoizedState=xn),We.props=pe,We.state=xn,We.context=ft,pe=Rt):("function"!=typeof We.componentDidUpdate||it===z.memoizedProps&&an===z.memoizedState||($.flags|=4),"function"!=typeof We.getSnapshotBeforeUpdate||it===z.memoizedProps&&an===z.memoizedState||($.flags|=1024),pe=!1)}return Rv(z,$,oe,pe,ke,Me)}function Rv(z,$,oe,pe,Me,ke){Cw(z,$);var We=0!=(128&$.flags);if(!pe&&!We)return Me&&ng($,oe,!1),Na(z,$,ke);pe=$.stateNode,Zl.current=$;var it=We&&"function"!=typeof oe.getDerivedStateFromError?null:pe.render();return $.flags|=1,null!==z&&We?($.child=Bc($,z.child,null,ke),$.child=Bc($,null,it,ke)):lo(z,$,it,ke),$.memoizedState=pe.state,Me&&ng($,oe,!0),$.child}function Tw(z){var $=z.stateNode;$.pendingContext?_w(0,$.pendingContext,$.pendingContext!==$.context):$.context&&_w(0,$.context,!1),hg(z,$.containerInfo)}function Ow(z,$,oe,pe,Me){return $u(),rr(Me),$.flags|=256,lo(z,$,oe,pe),$.child}var Yl,Ng,xw,Lv,kv={dehydrated:null,treeContext:null,retryLane:0};function hu(z){return{baseLanes:z,cachePool:null,transitions:null}}function Og(z,$,oe){var it,pe=$.pendingProps,Me=ir.current,ke=!1,We=0!=(128&$.flags);if((it=We)||(it=(null===z||null!==z.memoizedState)&&0!=(2&Me)),it?(ke=!0,$.flags&=-129):(null===z||null!==z.memoizedState)&&(Me|=1),si(ir,1&Me),null===z)return Bl($),null!==(z=$.memoizedState)&&null!==(z=z.dehydrated)?(1&$.mode?"$!"===z.data?$.lanes=8:$.lanes=1073741824:$.lanes=1,null):(We=pe.children,z=pe.fallback,ke?(pe=$.mode,ke=$.child,We={mode:"hidden",children:We},1&pe||null===ke?ke=f0(We,pe,0,null):(ke.childLanes=0,ke.pendingProps=We),z=Zc(z,pe,oe,null),ke.return=$,z.return=$,ke.sibling=z,$.child=ke,$.child.memoizedState=hu(oe),$.memoizedState=kv,z):Zh($,We));if(null!==(Me=z.memoizedState)&&null!==(it=Me.dehydrated))return function xg(z,$,oe,pe,Me,ke,We){if(oe)return 256&$.flags?($.flags&=-257,pe=Dg(Error(E(422))),Ai(z,$,We,pe)):null!==$.memoizedState?($.child=z.child,$.flags|=128,null):(ke=pe.fallback,Me=$.mode,pe=f0({mode:"visible",children:pe.children},Me,0,null),ke=Zc(ke,Me,We,null),ke.flags|=2,pe.return=$,ke.return=$,pe.sibling=ke,$.child=pe,1&$.mode&&Bc($,z.child,null,We),$.child.memoizedState=hu(We),$.memoizedState=kv,ke);if(!(1&$.mode))return Ai(z,$,We,null);if("$!"===Me.data){if(pe=Me.nextSibling&&Me.nextSibling.dataset)var it=pe.dgst;return pe=it,Ai(z,$,We,pe=Dg(ke=Error(E(419)),pe,void 0))}if(it=0!=(We&z.childLanes),qi||it){if(null!==(pe=Gi)){switch(We&-We){case 4:Me=2;break;case 16:Me=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:Me=32;break;case 536870912:Me=268435456;break;default:Me=0}0!==(Me=Me&(pe.suspendedLanes|We)?0:Me)&&Me!==ke.retryLane&&(ke.retryLane=Me,ms(z,Me),da(pe,z,Me,-1))}return Hg(),Ai(z,$,We,pe=Dg(Error(E(421))))}return"$?"===Me.data?($.flags|=128,$.child=z.child,$=Fw.bind(null,z),Me._reactRetry=$,null):(z=ke.treeContext,ai=oa(Me.nextSibling),mo=$,hi=!0,Ks=null,null!==z&&(ys[Us++]=au,ys[Us++]=ki,ys[Us++]=su,au=z.id,ki=z.overflow,su=$),$=Zh($,pe.children),$.flags|=4096,$)}(z,$,We,pe,it,Me,oe);if(ke){ke=pe.fallback,We=$.mode,it=(Me=z.child).sibling;var ft={mode:"hidden",children:pe.children};return 1&We||$.child===Me?(pe=Ba(Me,ft)).subtreeFlags=14680064&Me.subtreeFlags:((pe=$.child).childLanes=0,pe.pendingProps=ft,$.deletions=null),null!==it?ke=Ba(it,ke):(ke=Zc(ke,We,oe,null)).flags|=2,ke.return=$,pe.return=$,pe.sibling=ke,$.child=pe,pe=ke,ke=$.child,We=null===(We=z.child.memoizedState)?hu(oe):{baseLanes:We.baseLanes|oe,cachePool:null,transitions:We.transitions},ke.memoizedState=We,ke.childLanes=z.childLanes&~oe,$.memoizedState=kv,pe}return z=(ke=z.child).sibling,pe=Ba(ke,{mode:"visible",children:pe.children}),!(1&$.mode)&&(pe.lanes=oe),pe.return=$,pe.sibling=null,null!==z&&(null===(oe=$.deletions)?($.deletions=[z],$.flags|=16):oe.push(z)),$.child=pe,$.memoizedState=null,pe}function Zh(z,$){return($=f0({mode:"visible",children:$},z.mode,0,null)).return=z,z.child=$}function Ai(z,$,oe,pe){return null!==pe&&rr(pe),Bc($,z.child,null,oe),(z=Zh($,$.pendingProps.children)).flags|=2,$.memoizedState=null,z}function Jl(z,$,oe){z.lanes|=$;var pe=z.alternate;null!==pe&&(pe.lanes|=$),nn(z.return,$,oe)}function Pg(z,$,oe,pe,Me){var ke=z.memoizedState;null===ke?z.memoizedState={isBackwards:$,rendering:null,renderingStartTime:0,last:pe,tail:oe,tailMode:Me}:(ke.isBackwards=$,ke.rendering=null,ke.renderingStartTime=0,ke.last=pe,ke.tail=oe,ke.tailMode=Me)}function vs(z,$,oe){var pe=$.pendingProps,Me=pe.revealOrder,ke=pe.tail;if(lo(z,$,pe.children,oe),2&(pe=ir.current))pe=1&pe|2,$.flags|=128;else{if(null!==z&&128&z.flags)e:for(z=$.child;null!==z;){if(13===z.tag)null!==z.memoizedState&&Jl(z,oe,$);else if(19===z.tag)Jl(z,oe,$);else if(null!==z.child){z.child.return=z,z=z.child;continue}if(z===$)break e;for(;null===z.sibling;){if(null===z.return||z.return===$)break e;z=z.return}z.sibling.return=z.return,z=z.sibling}pe&=1}if(si(ir,pe),1&$.mode)switch(Me){case"forwards":for(oe=$.child,Me=null;null!==oe;)null!==(z=oe.alternate)&&null===jh(z)&&(Me=oe),oe=oe.sibling;null===(oe=Me)?(Me=$.child,$.child=null):(Me=oe.sibling,oe.sibling=null),Pg($,!1,Me,oe,ke);break;case"backwards":for(oe=null,Me=$.child,$.child=null;null!==Me;){if(null!==(z=Me.alternate)&&null===jh(z)){$.child=Me;break}z=Me.sibling,Me.sibling=oe,oe=Me,Me=z}Pg($,!0,oe,null,ke);break;case"together":Pg($,!1,null,null,void 0);break;default:$.memoizedState=null}else $.memoizedState=null;return $.child}function Pa(z,$){!(1&$.mode)&&null!==z&&(z.alternate=null,$.alternate=null,$.flags|=2)}function Na(z,$,oe){if(null!==z&&($.dependencies=z.dependencies),rf|=$.lanes,!(oe&$.childLanes))return null;if(null!==z&&$.child!==z.child)throw Error(E(153));if(null!==$.child){for(oe=Ba(z=$.child,z.pendingProps),$.child=oe,oe.return=$;null!==z.sibling;)z=z.sibling,(oe=oe.sibling=Ba(z,z.pendingProps)).return=$;oe.sibling=null}return $.child}function Yh(z,$){if(!hi)switch(z.tailMode){case"hidden":$=z.tail;for(var oe=null;null!==$;)null!==$.alternate&&(oe=$),$=$.sibling;null===oe?z.tail=null:oe.sibling=null;break;case"collapsed":oe=z.tail;for(var pe=null;null!==oe;)null!==oe.alternate&&(pe=oe),oe=oe.sibling;null===pe?$||null===z.tail?z.tail=null:z.tail.sibling=null:pe.sibling=null}}function Jr(z){var $=null!==z.alternate&&z.alternate.child===z.child,oe=0,pe=0;if($)for(var Me=z.child;null!==Me;)oe|=Me.lanes|Me.childLanes,pe|=14680064&Me.subtreeFlags,pe|=14680064&Me.flags,Me.return=z,Me=Me.sibling;else for(Me=z.child;null!==Me;)oe|=Me.lanes|Me.childLanes,pe|=Me.subtreeFlags,pe|=Me.flags,Me.return=z,Me=Me.sibling;return z.subtreeFlags|=pe,z.childLanes=oe,$}function Rg(z,$,oe){var pe=$.pendingProps;switch(og($),$.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jr($),null;case 1:case 17:return gs($.type)&&tg(),Jr($),null;case 3:return pe=$.stateNode,zl(),di(ps),di(Oo),gg(),pe.pendingContext&&(pe.context=pe.pendingContext,pe.pendingContext=null),(null===z||null===z.child)&&(aa($)?$.flags|=4:null===z||z.memoizedState.isDehydrated&&!(256&$.flags)||($.flags|=1024,null!==Ks&&(Kg(Ks),Ks=null))),Ng(z,$),Jr($),null;case 5:lu($);var Me=cu(Kl.current);if(oe=$.type,null!==z&&null!=$.stateNode)xw(z,$,oe,pe,Me),z.ref!==$.ref&&($.flags|=512,$.flags|=2097152);else{if(!pe){if(null===$.stateNode)throw Error(E(166));return Jr($),null}if(z=cu(ca.current),aa($)){pe=$.stateNode,oe=$.type;var ke=$.memoizedProps;switch(pe[fi]=$,pe[Th]=ke,z=0!=(1&$.mode),oe){case"dialog":Nn("cancel",pe),Nn("close",pe);break;case"iframe":case"object":case"embed":Nn("load",pe);break;case"video":case"audio":for(Me=0;Me<\/script>",z=z.removeChild(z.firstChild)):"string"==typeof pe.is?z=We.createElement(oe,{is:pe.is}):(z=We.createElement(oe),"select"===oe&&(We=z,pe.multiple?We.multiple=!0:pe.size&&(We.size=pe.size))):z=We.createElementNS(z,oe),z[fi]=$,z[Th]=pe,Yl(z,$,!1,!1),$.stateNode=z;e:{switch(We=yn(oe,pe),oe){case"dialog":Nn("cancel",z),Nn("close",z),Me=pe;break;case"iframe":case"object":case"embed":Nn("load",z),Me=pe;break;case"video":case"audio":for(Me=0;Mead&&($.flags|=128,pe=!0,Yh(ke,!1),$.lanes=4194304)}else{if(!pe)if(null!==(z=jh(We))){if($.flags|=128,pe=!0,null!==(oe=z.updateQueue)&&($.updateQueue=oe,$.flags|=4),Yh(ke,!0),null===ke.tail&&"hidden"===ke.tailMode&&!We.alternate&&!hi)return Jr($),null}else 2*Xt()-ke.renderingStartTime>ad&&1073741824!==oe&&($.flags|=128,pe=!0,Yh(ke,!1),$.lanes=4194304);ke.isBackwards?(We.sibling=$.child,$.child=We):(null!==(oe=ke.last)?oe.sibling=We:$.child=We,ke.last=We)}return null!==ke.tail?($=ke.tail,ke.rendering=$,ke.tail=$.sibling,ke.renderingStartTime=Xt(),$.sibling=null,oe=ir.current,si(ir,pe?1&oe|2:1&oe),$):(Jr($),null);case 22:case 23:return to(),pe=null!==$.memoizedState,null!==z&&null!==z.memoizedState!==pe&&($.flags|=8192),pe&&1&$.mode?1073741824&Hs&&(Jr($),6&$.subtreeFlags&&($.flags|=8192)):Jr($),null;case 24:case 25:return null}throw Error(E(156,$.tag))}function $l(z,$){switch(og($),$.tag){case 1:return gs($.type)&&tg(),65536&(z=$.flags)?($.flags=-65537&z|128,$):null;case 3:return zl(),di(ps),di(Oo),gg(),65536&(z=$.flags)&&!(128&z)?($.flags=-65537&z|128,$):null;case 5:return lu($),null;case 13:if(di(ir),null!==(z=$.memoizedState)&&null!==z.dehydrated){if(null===$.alternate)throw Error(E(340));$u()}return 65536&(z=$.flags)?($.flags=-65537&z|128,$):null;case 19:return di(ir),null;case 4:return zl(),null;case 10:return cg($.type._context),null;case 22:case 23:return to(),null;default:return null}}Yl=function(z,$){for(var oe=$.child;null!==oe;){if(5===oe.tag||6===oe.tag)z.appendChild(oe.stateNode);else if(4!==oe.tag&&null!==oe.child){oe.child.return=oe,oe=oe.child;continue}if(oe===$)break;for(;null===oe.sibling;){if(null===oe.return||oe.return===$)return;oe=oe.return}oe.sibling.return=oe.return,oe=oe.sibling}},Ng=function(){},xw=function(z,$,oe,pe){var Me=z.memoizedProps;if(Me!==pe){z=$.stateNode,cu(ca.current);var We,ke=null;switch(oe){case"input":Me=Ce(z,Me),pe=Ce(z,pe),ke=[];break;case"select":Me=B({},Me,{value:void 0}),pe=B({},pe,{value:void 0}),ke=[];break;case"textarea":Me=Pt(z,Me),pe=Pt(z,pe),ke=[];break;default:"function"!=typeof Me.onClick&&"function"==typeof pe.onClick&&(z.onclick=zi)}for(Rt in dt(oe,pe),oe=null,Me)if(!pe.hasOwnProperty(Rt)&&Me.hasOwnProperty(Rt)&&null!=Me[Rt])if("style"===Rt){var it=Me[Rt];for(We in it)it.hasOwnProperty(We)&&(oe||(oe={}),oe[We]="")}else"dangerouslySetInnerHTML"!==Rt&&"children"!==Rt&&"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&"autoFocus"!==Rt&&(a.hasOwnProperty(Rt)?ke||(ke=[]):(ke=ke||[]).push(Rt,null));for(Rt in pe){var ft=pe[Rt];if(it=Me?.[Rt],pe.hasOwnProperty(Rt)&&ft!==it&&(null!=ft||null!=it))if("style"===Rt)if(it){for(We in it)!it.hasOwnProperty(We)||ft&&ft.hasOwnProperty(We)||(oe||(oe={}),oe[We]="");for(We in ft)ft.hasOwnProperty(We)&&it[We]!==ft[We]&&(oe||(oe={}),oe[We]=ft[We])}else oe||(ke||(ke=[]),ke.push(Rt,oe)),oe=ft;else"dangerouslySetInnerHTML"===Rt?(ft=ft?ft.__html:void 0,it=it?it.__html:void 0,null!=ft&&it!==ft&&(ke=ke||[]).push(Rt,ft)):"children"===Rt?"string"!=typeof ft&&"number"!=typeof ft||(ke=ke||[]).push(Rt,""+ft):"suppressContentEditableWarning"!==Rt&&"suppressHydrationWarning"!==Rt&&(a.hasOwnProperty(Rt)?(null!=ft&&"onScroll"===Rt&&Nn("scroll",z),ke||it===ft||(ke=[])):(ke=ke||[]).push(Rt,ft))}oe&&(ke=ke||[]).push("style",oe);var Rt=ke;($.updateQueue=Rt)&&($.flags|=4)}},Lv=function(z,$,oe,pe){oe!==pe&&($.flags|=4)};var kg=!1,fo=!1,Pw="function"==typeof WeakSet?WeakSet:Set,On=null;function Ql(z,$){var oe=z.ref;if(null!==oe)if("function"==typeof oe)try{oe(null)}catch(pe){_i(z,$,pe)}else oe.current=null}function Lg(z,$,oe){try{oe()}catch(pe){_i(z,$,pe)}}var Bv=!1;function Vc(z,$,oe){var pe=$.updateQueue;if(null!==(pe=null!==pe?pe.lastEffect:null)){var Me=pe=pe.next;do{if((Me.tag&z)===z){var ke=Me.destroy;Me.destroy=void 0,void 0!==ke&&Lg($,oe,ke)}Me=Me.next}while(Me!==pe)}}function Hc(z,$){if(null!==($=null!==($=$.updateQueue)?$.lastEffect:null)){var oe=$=$.next;do{if((oe.tag&z)===z){var pe=oe.create;oe.destroy=pe()}oe=oe.next}while(oe!==$)}}function od(z){var $=z.ref;if(null!==$){var oe=z.stateNode;z.tag,z=oe,"function"==typeof $?$(z):$.current=z}}function Xl(z){var $=z.alternate;null!==$&&(z.alternate=null,Xl($)),z.child=null,z.deletions=null,z.sibling=null,5===z.tag&&(null!==($=z.stateNode)&&(delete $[fi],delete $[Th],delete $[hs],delete $[Xp],delete $[Vf])),z.stateNode=null,z.return=null,z.dependencies=null,z.memoizedProps=null,z.memoizedState=null,z.pendingProps=null,z.stateNode=null,z.updateQueue=null}function $h(z){return 5===z.tag||3===z.tag||4===z.tag}function ql(z){e:for(;;){for(;null===z.sibling;){if(null===z.return||$h(z.return))return null;z=z.return}for(z.sibling.return=z.return,z=z.sibling;5!==z.tag&&6!==z.tag&&18!==z.tag;){if(2&z.flags||null===z.child||4===z.tag)continue e;z.child.return=z,z=z.child}if(!(2&z.flags))return z.stateNode}}function Bg(z,$,oe){var pe=z.tag;if(5===pe||6===pe)z=z.stateNode,$?8===oe.nodeType?oe.parentNode.insertBefore(z,$):oe.insertBefore(z,$):(8===oe.nodeType?($=oe.parentNode).insertBefore(z,oe):($=oe).appendChild(z),null!=(oe=oe._reactRootContainer)||null!==$.onclick||($.onclick=zi));else if(4!==pe&&null!==(z=z.child))for(Bg(z,$,oe),z=z.sibling;null!==z;)Bg(z,$,oe),z=z.sibling}function Qh(z,$,oe){var pe=z.tag;if(5===pe||6===pe)z=z.stateNode,$?oe.insertBefore(z,$):oe.appendChild(z);else if(4!==pe&&null!==(z=z.child))for(Qh(z,$,oe),z=z.sibling;null!==z;)Qh(z,$,oe),z=z.sibling}var Oi=null,Go=!1;function pu(z,$,oe){for(oe=oe.child;null!==oe;)jv(z,$,oe),oe=oe.sibling}function jv(z,$,oe){if(bt&&"function"==typeof bt.onCommitFiberUnmount)try{bt.onCommitFiberUnmount(Et,oe)}catch{}switch(oe.tag){case 5:fo||Ql(oe,$);case 6:var pe=Oi,Me=Go;Oi=null,pu(z,$,oe),Go=Me,null!==(Oi=pe)&&(Go?(z=Oi,oe=oe.stateNode,8===z.nodeType?z.parentNode.removeChild(oe):z.removeChild(oe)):Oi.removeChild(oe.stateNode));break;case 18:null!==Oi&&(Go?(z=Oi,oe=oe.stateNode,8===z.nodeType?Ch(z.parentNode,oe):1===z.nodeType&&Ch(z,oe),mt(z)):Ch(Oi,oe.stateNode));break;case 4:pe=Oi,Me=Go,Oi=oe.stateNode.containerInfo,Go=!0,pu(z,$,oe),Oi=pe,Go=Me;break;case 0:case 11:case 14:case 15:if(!fo&&(null!==(pe=oe.updateQueue)&&null!==(pe=pe.lastEffect))){Me=pe=pe.next;do{var ke=Me,We=ke.destroy;ke=ke.tag,void 0!==We&&(2&ke||4&ke)&&Lg(oe,$,We),Me=Me.next}while(Me!==pe)}pu(z,$,oe);break;case 1:if(!fo&&(Ql(oe,$),"function"==typeof(pe=oe.stateNode).componentWillUnmount))try{pe.props=oe.memoizedProps,pe.state=oe.memoizedState,pe.componentWillUnmount()}catch(it){_i(oe,$,it)}pu(z,$,oe);break;case 21:pu(z,$,oe);break;case 22:1&oe.mode?(fo=(pe=fo)||null!==oe.memoizedState,pu(z,$,oe),fo=pe):pu(z,$,oe);break;default:pu(z,$,oe)}}function Fv(z){var $=z.updateQueue;if(null!==$){z.updateQueue=null;var oe=z.stateNode;null===oe&&(oe=z.stateNode=new Pw),$.forEach(function(pe){var Me=Gg.bind(null,z,pe);oe.has(pe)||(oe.add(pe),pe.then(Me,Me))})}}function wo(z,$){var oe=$.deletions;if(null!==oe)for(var pe=0;peMe&&(Me=We),pe&=~ke}if(pe=Me,10<(pe=(120>(pe=Xt()-pe)?120:480>pe?480:1080>pe?1080:1920>pe?1920:3e3>pe?3e3:4320>pe?4320:1960*kw(pe/1960))-pe)){z.timeoutHandle=Tc(Gc.bind(null,z,ws,Xu),pe);break}Gc(z,ws,Xu);break;default:throw Error(E(329))}}}return Zo(z,Xt()),z.callbackNode===oe?Vv.bind(null,z):null}function i0(z,$){var oe=qh;return z.current.memoizedState.isDehydrated&&(ha(z,$).flags|=256),2!==(z=ld(z,$))&&($=ws,ws=oe,null!==$&&Kg($)),z}function Kg(z){null===ws?ws=z:ws.push.apply(ws,z)}function xi(z,$){for($&=~sd,$&=~Fg,z.suspendedLanes|=$,z.pingedLanes&=~$,z=z.expirationTimes;0<$;){var oe=31-kt($),pe=1<z?16:z,null===gu)var pe=!1;else{if(z=gu,gu=null,cd=0,6&Or)throw Error(E(331));var Me=Or;for(Or|=4,On=z.current;null!==On;){var ke=On,We=ke.child;if(16&On.flags){var it=ke.deletions;if(null!==it){for(var ft=0;ftXt()-zv?ha(z,0):sd|=oe),Zo(z,$)}function Gv(z,$){0===$&&(1&z.mode?($=Bn,!(130023424&(Bn<<=1))&&(Bn=4194304)):$=1);var oe=Eo();null!==(z=ms(z,$))&&(er(z,$,oe),Zo(z,oe))}function Fw(z){var $=z.memoizedState,oe=0;null!==$&&(oe=$.retryLane),Gv(z,oe)}function Gg(z,$){var oe=0;switch(z.tag){case 13:var pe=z.stateNode,Me=z.memoizedState;null!==Me&&(oe=Me.retryLane);break;case 19:pe=z.stateNode;break;default:throw Error(E(314))}null!==pe&&pe.delete($),Gv(z,oe)}function Zg(z,$){return sn(z,$)}function of(z,$,oe,pe){this.tag=z,this.key=oe,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=$,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=pe,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jo(z,$,oe,pe){return new of(z,$,oe,pe)}function c0(z){return!(!(z=z.prototype)||!z.isReactComponent)}function Ba(z,$){var oe=z.alternate;return null===oe?((oe=Jo(z.tag,$,z.key,z.mode)).elementType=z.elementType,oe.type=z.type,oe.stateNode=z.stateNode,oe.alternate=z,z.alternate=oe):(oe.pendingProps=$,oe.type=z.type,oe.flags=0,oe.subtreeFlags=0,oe.deletions=null),oe.flags=14680064&z.flags,oe.childLanes=z.childLanes,oe.lanes=z.lanes,oe.child=z.child,oe.memoizedProps=z.memoizedProps,oe.memoizedState=z.memoizedState,oe.updateQueue=z.updateQueue,$=z.dependencies,oe.dependencies=null===$?null:{lanes:$.lanes,firstContext:$.firstContext},oe.sibling=z.sibling,oe.index=z.index,oe.ref=z.ref,oe}function l0(z,$,oe,pe,Me,ke){var We=2;if(pe=z,"function"==typeof z)c0(z)&&(We=1);else if("string"==typeof z)We=5;else e:switch(z){case Z:return Zc(oe.children,Me,ke,$);case W:We=8,Me|=8;break;case Q:return(z=Jo(12,oe,$,2|Me)).elementType=Q,z.lanes=ke,z;case m:return(z=Jo(13,oe,$,Me)).elementType=m,z.lanes=ke,z;case w:return(z=Jo(19,oe,$,Me)).elementType=w,z.lanes=ke,z;case G:return f0(oe,Me,ke,$);default:if("object"==typeof z&&null!==z)switch(z.$$typeof){case D:We=10;break e;case o:We=9;break e;case u:We=11;break e;case x:We=14;break e;case F:We=16,pe=null;break e}throw Error(E(130,null==z?z:typeof z,""))}return($=Jo(We,oe,$,Me)).elementType=z,$.type=pe,$.lanes=ke,$}function Zc(z,$,oe,pe){return(z=Jo(7,z,pe,$)).lanes=oe,z}function f0(z,$,oe,pe){return(z=Jo(22,z,pe,$)).elementType=G,z.lanes=oe,z.stateNode={isHidden:!1},z}function Jg(z,$,oe){return(z=Jo(6,z,null,$)).lanes=oe,z}function Yg(z,$,oe){return($=Jo(4,null!==z.children?z.children:[],z.key,$)).lanes=oe,$.stateNode={containerInfo:z.containerInfo,pendingChildren:null,implementation:z.implementation},$}function Kw(z,$,oe,pe,Me){this.tag=$,this.containerInfo=z,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=$n(0),this.expirationTimes=$n(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$n(0),this.identifierPrefix=pe,this.onRecoverableError=Me,this.mutableSourceEagerHydrationData=null}function d0(z,$,oe,pe,Me,ke,We,it,ft){return z=new Kw(z,$,oe,it,ft),1===$?($=1,!0===ke&&($|=8)):$=0,ke=Jo(3,null,null,$),z.current=ke,ke.stateNode=z,ke.memoizedState={element:pe,isDehydrated:oe,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zf(ke),z}function Qg(z){if(!z)return xc;e:{if(Ft(z=z._reactInternals)!==z||1!==z.tag)throw Error(E(170));var $=z;do{switch($.tag){case 3:$=$.stateNode.context;break e;case 1:if(gs($.type)){$=$.stateNode.__reactInternalMemoizedMergedChildContext;break e}}$=$.return}while(null!==$);throw Error(E(171))}if(1===z.tag){var oe=z.type;if(gs(oe))return Sw(z,oe,$)}return $}function h0(z,$,oe,pe,Me,ke,We,it,ft){return(z=d0(oe,pe,!0,z,0,ke,0,it,ft)).context=Qg(null),oe=z.current,(ke=uu(pe=Eo(),Me=La(oe))).callback=$??null,Rc(oe,ke,Me),z.current.lanes=Me,er(z,Me,pe),Zo(z,pe),z}function p0(z,$,oe,pe){var Me=$.current,ke=Eo(),We=La(Me);return oe=Qg(oe),null===$.context?$.context=oe:$.pendingContext=oe,($=uu(ke,We)).payload={element:z},null!==(pe=void 0===pe?null:pe)&&($.callback=pe),null!==(z=Rc(Me,$,We))&&(da(z,Me,We,ke),Jf(z,Me,We)),We}function g0(z){return(z=z.current).child?(z.child.tag,z.child.stateNode):null}function Xg(z,$){if(null!==(z=z.memoizedState)&&null!==z.dehydrated){var oe=z.retryLane;z.retryLane=0!==oe&&oe<$?oe:$}}function y0(z,$){Xg(z,$),(z=z.alternate)&&Xg(z,$)}u0=function(z,$,oe){if(null!==z)if(z.memoizedProps!==$.pendingProps||ps.current)qi=!0;else{if(!(z.lanes&oe||128&$.flags))return qi=!1,function Jh(z,$,oe){switch($.tag){case 3:Tw($),$u();break;case 5:bo($);break;case 1:gs($.type)&&Wf($);break;case 4:hg($,$.stateNode.containerInfo);break;case 10:var pe=$.type._context,Me=$.memoizedProps.value;si(xh,pe._currentValue),pe._currentValue=Me;break;case 13:if(null!==(pe=$.memoizedState))return null!==pe.dehydrated?(si(ir,1&ir.current),$.flags|=128,null):oe&$.child.childLanes?Og(z,$,oe):(si(ir,1&ir.current),null!==(z=Na(z,$,oe))?z.sibling:null);si(ir,1&ir.current);break;case 19:if(pe=0!=(oe&$.childLanes),128&z.flags){if(pe)return vs(z,$,oe);$.flags|=128}if(null!==(Me=$.memoizedState)&&(Me.rendering=null,Me.tail=null,Me.lastEffect=null),si(ir,ir.current),pe)break;return null;case 22:case 23:return $.lanes=0,qn(z,$,oe)}return Na(z,$,oe)}(z,$,oe);qi=!!(131072&z.flags)}else qi=!1,hi&&1048576&$.flags&&ig($,Gf,$.index);switch($.lanes=0,$.tag){case 2:var pe=$.type;Pa(z,$),z=$.pendingProps;var Me=Hf($,Oo.current);Er($,oe),Me=Ev(null,$,pe,z,Me,oe);var ke=Xf();return $.flags|=1,"object"==typeof Me&&null!==Me&&"function"==typeof Me.render&&void 0===Me.$$typeof?($.tag=1,$.memoizedState=null,$.updateQueue=null,gs(pe)?(ke=!0,Wf($)):ke=!1,$.memoizedState=null!==Me.state&&void 0!==Me.state?Me.state:null,Zf($),Me.updater=kh,$.stateNode=Me,Me._reactInternals=$,Yf($,pe,z,oe),$=Rv(null,$,pe,!0,ke,oe)):($.tag=0,hi&&ke&&Vi($),lo(null,$,Me,oe),$=$.child),$;case 16:pe=$.elementType;e:{switch(Pa(z,$),z=$.pendingProps,pe=(Me=pe._init)(pe._payload),$.type=pe,Me=$.tag=function Uw(z){if("function"==typeof z)return c0(z)?1:0;if(null!=z){if((z=z.$$typeof)===u)return 11;if(z===x)return 14}return 2}(pe),z=Oa(pe,z),Me){case 0:$=Gh(null,$,pe,z,oe);break e;case 1:$=id(null,$,pe,z,oe);break e;case 11:$=zc(null,$,pe,z,oe);break e;case 14:$=du(null,$,pe,Oa(pe.type,z),oe);break e}throw Error(E(306,pe,""))}return $;case 0:return pe=$.type,Me=$.pendingProps,Gh(z,$,pe,Me=$.elementType===pe?Me:Oa(pe,Me),oe);case 1:return pe=$.type,Me=$.pendingProps,id(z,$,pe,Me=$.elementType===pe?Me:Oa(pe,Me),oe);case 3:e:{if(Tw($),null===z)throw Error(E(387));pe=$.pendingProps,Me=(ke=$.memoizedState).element,Rh(z,$),zs($,pe,null,oe);var We=$.memoizedState;if(pe=We.element,ke.isDehydrated){if(ke={element:pe,isDehydrated:!1,cache:We.cache,pendingSuspenseBoundaries:We.pendingSuspenseBoundaries,transitions:We.transitions},$.updateQueue.baseState=ke,$.memoizedState=ke,256&$.flags){$=Ow(z,$,pe,oe,Me=fa(Error(E(423)),$));break e}if(pe!==Me){$=Ow(z,$,pe,oe,Me=fa(Error(E(424)),$));break e}for(ai=oa($.stateNode.containerInfo.firstChild),mo=$,hi=!0,Ks=null,oe=Bh($,null,pe,oe),$.child=oe;oe;)oe.flags=-3&oe.flags|4096,oe=oe.sibling}else{if($u(),pe===Me){$=Na(z,$,oe);break e}lo(z,$,pe,oe)}$=$.child}return $;case 5:return bo($),null===z&&Bl($),pe=$.type,Me=$.pendingProps,ke=null!==z?z.memoizedProps:null,We=Me.children,Fs(pe,Me)?We=null:null!==ke&&Fs(pe,ke)&&($.flags|=32),Cw(z,$),lo(z,$,We,oe),$.child;case 6:return null===z&&Bl($),null;case 13:return Og(z,$,oe);case 4:return hg($,$.stateNode.containerInfo),pe=$.pendingProps,null===z?$.child=Bc($,null,pe,oe):lo(z,$,pe,oe),$.child;case 11:return pe=$.type,Me=$.pendingProps,zc(z,$,pe,Me=$.elementType===pe?Me:Oa(pe,Me),oe);case 7:return lo(z,$,$.pendingProps,oe),$.child;case 8:case 12:return lo(z,$,$.pendingProps.children,oe),$.child;case 10:e:{if(pe=$.type._context,Me=$.pendingProps,ke=$.memoizedProps,We=Me.value,si(xh,pe._currentValue),pe._currentValue=We,null!==ke)if(ta(ke.value,We)){if(ke.children===Me.children&&!ps.current){$=Na(z,$,oe);break e}}else for(null!==(ke=$.child)&&(ke.return=$);null!==ke;){var it=ke.dependencies;if(null!==it){We=ke.child;for(var ft=it.firstContext;null!==ft;){if(ft.context===pe){if(1===ke.tag){(ft=uu(-1,oe&-oe)).tag=2;var Rt=ke.updateQueue;if(null!==Rt){var cn=(Rt=Rt.shared).pending;null===cn?ft.next=ft:(ft.next=cn.next,cn.next=ft),Rt.pending=ft}}ke.lanes|=oe,null!==(ft=ke.alternate)&&(ft.lanes|=oe),nn(ke.return,oe,$),it.lanes|=oe;break}ft=ft.next}}else if(10===ke.tag)We=ke.type===$.type?null:ke.child;else if(18===ke.tag){if(null===(We=ke.return))throw Error(E(341));We.lanes|=oe,null!==(it=We.alternate)&&(it.lanes|=oe),nn(We,oe,$),We=ke.sibling}else We=ke.child;if(null!==We)We.return=ke;else for(We=ke;null!==We;){if(We===$){We=null;break}if(null!==(ke=We.sibling)){ke.return=We.return,We=ke;break}We=We.return}ke=We}lo(z,$,Me.children,oe),$=$.child}return $;case 9:return Me=$.type,pe=$.pendingProps.children,Er($,oe),pe=pe(Me=Li(Me)),$.flags|=1,lo(z,$,pe,oe),$.child;case 14:return Me=Oa(pe=$.type,$.pendingProps),du(z,$,pe,Me=Oa(pe.type,Me),oe);case 15:return Nv(z,$,$.type,$.pendingProps,oe);case 17:return pe=$.type,Me=$.pendingProps,Me=$.elementType===pe?Me:Oa(pe,Me),Pa(z,$),$.tag=1,gs(pe)?(z=!0,Wf($)):z=!1,Er($,oe),vv($,pe,Me),Yf($,pe,Me,oe),Rv(null,$,pe,!0,z,oe);case 19:return vs(z,$,oe);case 22:return qn(z,$,oe)}throw Error(E(156,$.tag))};var qg="function"==typeof reportError?reportError:function(z){console.error(z)};function m0(z){this._internalRoot=z}function v0(z){this._internalRoot=z}function Zv(z){return!(!z||1!==z.nodeType&&9!==z.nodeType&&11!==z.nodeType)}function Yc(z){return!(!z||1!==z.nodeType&&9!==z.nodeType&&11!==z.nodeType&&(8!==z.nodeType||" react-mount-point-unstable "!==z.nodeValue))}function Jv(){}function dd(z,$,oe,pe,Me){var ke=oe._reactRootContainer;if(ke){var We=ke;if("function"==typeof Me){var it=Me;Me=function(){var ft=g0(We);it.call(ft)}}p0($,We,z,Me)}else We=function Yv(z,$,oe,pe,Me){if(Me){if("function"==typeof pe){var ke=pe;pe=function(){var Rt=g0(We);ke.call(Rt)}}var We=h0($,pe,z,0,null,!1,0,"",Jv);return z._reactRootContainer=We,z[Ci]=We.current,ia(8===z.nodeType?z.parentNode:z),yu(),We}for(;Me=z.lastChild;)z.removeChild(Me);if("function"==typeof pe){var it=pe;pe=function(){var Rt=g0(ft);it.call(Rt)}}var ft=d0(z,0,!1,null,0,!1,0,"",Jv);return z._reactRootContainer=ft,z[Ci]=ft.current,ia(8===z.nodeType?z.parentNode:z),yu(function(){p0($,ft,oe,pe)}),ft}(oe,$,z,Me,pe);return g0(We)}v0.prototype.render=m0.prototype.render=function(z){var $=this._internalRoot;if(null===$)throw Error(E(409));p0(z,$,null,null)},v0.prototype.unmount=m0.prototype.unmount=function(){var z=this._internalRoot;if(null!==z){this._internalRoot=null;var $=z.containerInfo;yu(function(){p0(null,z,null,null)}),$[Ci]=null}},v0.prototype.unstable_scheduleHydration=function(z){if(z){var $=bi();z={blockedOn:null,target:z,priority:$};for(var oe=0;oe{"use strict";var _=d(51291);r.s=_.createRoot,_.hydrateRoot},51291:(ne,r,d)=>{"use strict";(function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(_){console.error(_)}})(),ne.exports=d(66509)},50433:(ne,r,d)=>{"use strict";var l=d(54284),_=Symbol.for("react.element"),E=Symbol.for("react.fragment"),S=Object.prototype.hasOwnProperty,a=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function g(y,v,b){var A,O={},C=null,T=null;for(A in void 0!==b&&(C=""+b),void 0!==v.key&&(C=""+v.key),void 0!==v.ref&&(T=v.ref),v)S.call(v,A)&&!h.hasOwnProperty(A)&&(O[A]=v[A]);if(y&&y.defaultProps)for(A in v=y.defaultProps)void 0===O[A]&&(O[A]=v[A]);return{$$typeof:_,type:y,key:C,ref:T,props:O,_owner:a.current}}r.Fragment=E,r.jsx=g,r.jsxs=g},3851:(ne,r)=>{"use strict";var d=Symbol.for("react.element"),l=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),A=Symbol.iterator;var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,N={};function M(p,B,ie){this.props=p,this.context=B,this.refs=N,this.updater=ie||C}function P(){}function R(p,B,ie){this.props=p,this.context=B,this.refs=N,this.updater=ie||C}M.prototype.isReactComponent={},M.prototype.setState=function(p,B){if("object"!=typeof p&&"function"!=typeof p&&null!=p)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,p,B,"setState")},M.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")},P.prototype=M.prototype;var L=R.prototype=new P;L.constructor=R,T(L,M.prototype),L.isPureReactComponent=!0;var H=Array.isArray,V=Object.prototype.hasOwnProperty,J={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function Z(p,B,ie){var te,ee={},ue=null,we=null;if(null!=B)for(te in void 0!==B.ref&&(we=B.ref),void 0!==B.key&&(ue=""+B.key),B)V.call(B,te)&&!Y.hasOwnProperty(te)&&(ee[te]=B[te]);var me=arguments.length-2;if(1===me)ee.children=ie;else if(1{"use strict";ne.exports=d(3851)},18348:(ne,r,d)=>{"use strict";ne.exports=d(50433)},70891:ne=>{"use strict";var d={};function l(h,g,y){y||(y=Error);var b=function(A){function O(C,T,N){return A.call(this,function v(A,O,C){return"string"==typeof g?g:g(A,O,C)}(C,T,N))||this}return function r(h,g){h.prototype=Object.create(g.prototype),h.prototype.constructor=h,h.__proto__=g}(O,A),O}(y);b.prototype.name=y.name,b.prototype.code=h,d[h]=b}function _(h,g){if(Array.isArray(h)){var y=h.length;return h=h.map(function(v){return String(v)}),y>2?"one of ".concat(g," ").concat(h.slice(0,y-1).join(", "),", or ")+h[y-1]:2===y?"one of ".concat(g," ").concat(h[0]," or ").concat(h[1]):"of ".concat(g," ").concat(h[0])}return"of ".concat(g," ").concat(String(h))}l("ERR_INVALID_OPT_VALUE",function(h,g){return'The value "'+g+'" is invalid for option "'+h+'"'},TypeError),l("ERR_INVALID_ARG_TYPE",function(h,g,y){var v,b;if("string"==typeof g&&function E(h,g,y){return h.substr(!y||y<0?0:+y,g.length)===g}(g,"not ")?(v="must not be",g=g.replace(/^not /,"")):v="must be",function S(h,g,y){return(void 0===y||y>h.length)&&(y=h.length),h.substring(y-g.length,y)===g}(h," argument"))b="The ".concat(h," ").concat(v," ").concat(_(g,"type"));else{var A=function a(h,g,y){return"number"!=typeof y&&(y=0),!(y+g.length>h.length)&&-1!==h.indexOf(g,y)}(h,".")?"property":"argument";b='The "'.concat(h,'" ').concat(A," ").concat(v," ").concat(_(g,"type"))}return b+=". Received type ".concat(typeof y)},TypeError),l("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),l("ERR_METHOD_NOT_IMPLEMENTED",function(h){return"The "+h+" method is not implemented"}),l("ERR_STREAM_PREMATURE_CLOSE","Premature close"),l("ERR_STREAM_DESTROYED",function(h){return"Cannot call "+h+" after a stream was destroyed"}),l("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),l("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),l("ERR_STREAM_WRITE_AFTER_END","write after end"),l("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),l("ERR_UNKNOWN_ENCODING",function(h){return"Unknown encoding: "+h},TypeError),l("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ne.exports.q=d},41339:(ne,r,d)=>{"use strict";var l=Object.keys||function(b){var A=[];for(var O in b)A.push(O);return A};ne.exports=g;var _=d(3154),E=d(20520);d(83894)(g,_);for(var S=l(E.prototype),a=0;a{"use strict";ne.exports=_;var l=d(6025);function _(E){if(!(this instanceof _))return new _(E);l.call(this,E)}d(83894)(_,l),_.prototype._transform=function(E,S,a){a(null,E)}},3154:(ne,r,d)=>{"use strict";var l;ne.exports=D,D.ReadableState=Q;d(59069).EventEmitter;var E=function(ye,Ce){return ye.listeners(Ce).length},S=d(4970),a=d(93172).Buffer,h=global.Uint8Array||function(){};var b,v=d(94616);b=v&&v.debuglog?v.debuglog("stream"):function(){};var H,V,J,A=d(25019),O=d(41920),T=d(47102).getHighWaterMark,N=d(70891).q,M=N.ERR_INVALID_ARG_TYPE,P=N.ERR_STREAM_PUSH_AFTER_EOF,R=N.ERR_METHOD_NOT_IMPLEMENTED,L=N.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;d(83894)(D,S);var Y=O.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function Q(ae,ye,Ce){l=l||d(41339),ae=ae||{},"boolean"!=typeof Ce&&(Ce=ye instanceof l),this.objectMode=!!ae.objectMode,Ce&&(this.objectMode=this.objectMode||!!ae.readableObjectMode),this.highWaterMark=T(this,ae,"readableHighWaterMark",Ce),this.buffer=new A,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==ae.emitClose,this.autoDestroy=!!ae.autoDestroy,this.destroyed=!1,this.defaultEncoding=ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ae.encoding&&(H||(H=d(53720).s),this.decoder=new H(ae.encoding),this.encoding=ae.encoding)}function D(ae){if(l=l||d(41339),!(this instanceof D))return new D(ae);var ye=this instanceof l;this._readableState=new Q(ae,this,ye),this.readable=!0,ae&&("function"==typeof ae.read&&(this._read=ae.read),"function"==typeof ae.destroy&&(this._destroy=ae.destroy)),S.call(this)}function o(ae,ye,Ce,Pe,Ge){b("readableAddChunk",ye);var Ue,Ve=ae._readableState;if(null===ye)Ve.reading=!1,function G(ae,ye){if(b("onEofChunk"),!ye.ended){if(ye.decoder){var Ce=ye.decoder.end();Ce&&Ce.length&&(ye.buffer.push(Ce),ye.length+=ye.objectMode?1:Ce.length)}ye.ended=!0,ye.sync?k(ae):(ye.needReadable=!1,ye.emittedReadable||(ye.emittedReadable=!0,p(ae)))}}(ae,Ve);else if(Ge||(Ue=function m(ae,ye){var Ce;return!function y(ae){return a.isBuffer(ae)||ae instanceof h}(ye)&&"string"!=typeof ye&&void 0!==ye&&!ae.objectMode&&(Ce=new M("chunk",["string","Buffer","Uint8Array"],ye)),Ce}(Ve,ye)),Ue)Y(ae,Ue);else if(Ve.objectMode||ye&&ye.length>0)if("string"!=typeof ye&&!Ve.objectMode&&Object.getPrototypeOf(ye)!==a.prototype&&(ye=function g(ae){return a.from(ae)}(ye)),Pe)Ve.endEmitted?Y(ae,new L):u(ae,Ve,ye,!0);else if(Ve.ended)Y(ae,new P);else{if(Ve.destroyed)return!1;Ve.reading=!1,Ve.decoder&&!Ce?(ye=Ve.decoder.write(ye),Ve.objectMode||0!==ye.length?u(ae,Ve,ye,!1):B(ae,Ve)):u(ae,Ve,ye,!1)}else Pe||(Ve.reading=!1,B(ae,Ve));return!Ve.ended&&(Ve.lengthye.highWaterMark&&(ye.highWaterMark=function x(ae){return ae>=w?ae=w:(ae--,ae|=ae>>>1,ae|=ae>>>2,ae|=ae>>>4,ae|=ae>>>8,ae|=ae>>>16,ae++),ae}(ae)),ae<=ye.length?ae:ye.ended?ye.length:(ye.needReadable=!0,0))}function k(ae){var ye=ae._readableState;b("emitReadable",ye.needReadable,ye.emittedReadable),ye.needReadable=!1,ye.emittedReadable||(b("emitReadable",ye.flowing),ye.emittedReadable=!0,process.nextTick(p,ae))}function p(ae){var ye=ae._readableState;b("emitReadable_",ye.destroyed,ye.length,ye.ended),!ye.destroyed&&(ye.length||ye.ended)&&(ae.emit("readable"),ye.emittedReadable=!1),ye.needReadable=!ye.flowing&&!ye.ended&&ye.length<=ye.highWaterMark,ve(ae)}function B(ae,ye){ye.readingMore||(ye.readingMore=!0,process.nextTick(ie,ae,ye))}function ie(ae,ye){for(;!ye.reading&&!ye.ended&&(ye.length0,ye.resumeScheduled&&!ye.paused?ye.flowing=!0:ae.listenerCount("data")>0&&ae.resume()}function ue(ae){b("readable nexttick read 0"),ae.read(0)}function me(ae,ye){b("resume",ye.reading),ye.reading||ae.read(0),ye.resumeScheduled=!1,ae.emit("resume"),ve(ae),ye.flowing&&!ye.reading&&ae.read(0)}function ve(ae){var ye=ae._readableState;for(b("flow",ye.flowing);ye.flowing&&null!==ae.read(););}function ce(ae,ye){return 0===ye.length?null:(ye.objectMode?Ce=ye.buffer.shift():!ae||ae>=ye.length?(Ce=ye.decoder?ye.buffer.join(""):1===ye.buffer.length?ye.buffer.first():ye.buffer.concat(ye.length),ye.buffer.clear()):Ce=ye.buffer.consume(ae,ye.decoder),Ce);var Ce}function he(ae){var ye=ae._readableState;b("endReadable",ye.endEmitted),ye.endEmitted||(ye.ended=!0,process.nextTick(le,ye,ae))}function le(ae,ye){if(b("endReadableNT",ae.endEmitted,ae.length),!ae.endEmitted&&0===ae.length&&(ae.endEmitted=!0,ye.readable=!1,ye.emit("end"),ae.autoDestroy)){var Ce=ye._writableState;(!Ce||Ce.autoDestroy&&Ce.finished)&&ye.destroy()}}function de(ae,ye){for(var Ce=0,Pe=ae.length;Ce=ye.highWaterMark:ye.length>0)||ye.ended))return b("read: emitReadable",ye.length,ye.ended),0===ye.length&&ye.ended?he(this):k(this),null;if(0===(ae=F(ae,ye))&&ye.ended)return 0===ye.length&&he(this),null;var Ge,Pe=ye.needReadable;return b("need readable",Pe),(0===ye.length||ye.length-ae0?ce(ae,ye):null)?(ye.needReadable=ye.length<=ye.highWaterMark,ae=0):(ye.length-=ae,ye.awaitDrain=0),0===ye.length&&(ye.ended||(ye.needReadable=!0),Ce!==ae&&ye.ended&&he(this)),null!==Ge&&this.emit("data",Ge),Ge},D.prototype._read=function(ae){Y(this,new R("_read()"))},D.prototype.pipe=function(ae,ye){var Ce=this,Pe=this._readableState;switch(Pe.pipesCount){case 0:Pe.pipes=ae;break;case 1:Pe.pipes=[Pe.pipes,ae];break;default:Pe.pipes.push(ae)}Pe.pipesCount+=1,b("pipe count=%d opts=%j",Pe.pipesCount,ye);var Ve=(!ye||!1!==ye.end)&&ae!==process.stdout&&ae!==process.stderr?_t:Ae;function Ue(xe,je){b("onunpipe"),xe===Ce&&je&&!1===je.hasUnpiped&&(je.hasUnpiped=!0,function Pt(){b("cleanup"),ae.removeListener("close",Lt),ae.removeListener("finish",Re),ae.removeListener("drain",Ze),ae.removeListener("error",rt),ae.removeListener("unpipe",Ue),Ce.removeListener("end",_t),Ce.removeListener("end",Ae),Ce.removeListener("data",nt),$e=!0,Pe.awaitDrain&&(!ae._writableState||ae._writableState.needDrain)&&Ze()}())}function _t(){b("onend"),ae.end()}Pe.endEmitted?process.nextTick(Ve):Ce.once("end",Ve),ae.on("unpipe",Ue);var Ze=function te(ae){return function(){var Ce=ae._readableState;b("pipeOnDrain",Ce.awaitDrain),Ce.awaitDrain&&Ce.awaitDrain--,0===Ce.awaitDrain&&E(ae,"data")&&(Ce.flowing=!0,ve(ae))}}(Ce);ae.on("drain",Ze);var $e=!1;function nt(xe){b("ondata");var je=ae.write(xe);b("dest.write",je),!1===je&&((1===Pe.pipesCount&&Pe.pipes===ae||Pe.pipesCount>1&&-1!==de(Pe.pipes,ae))&&!$e&&(b("false write response, pause",Pe.awaitDrain),Pe.awaitDrain++),Ce.pause())}function rt(xe){b("onerror",xe),Ae(),ae.removeListener("error",rt),0===E(ae,"error")&&Y(ae,xe)}function Lt(){ae.removeListener("finish",Re),Ae()}function Re(){b("onfinish"),ae.removeListener("close",Lt),Ae()}function Ae(){b("unpipe"),Ce.unpipe(ae)}return Ce.on("data",nt),function W(ae,ye,Ce){if("function"==typeof ae.prependListener)return ae.prependListener(ye,Ce);ae._events&&ae._events[ye]?Array.isArray(ae._events[ye])?ae._events[ye].unshift(Ce):ae._events[ye]=[Ce,ae._events[ye]]:ae.on(ye,Ce)}(ae,"error",rt),ae.once("close",Lt),ae.once("finish",Re),ae.emit("pipe",Ce),Pe.flowing||(b("pipe resume"),Ce.resume()),ae},D.prototype.unpipe=function(ae){var ye=this._readableState,Ce={hasUnpiped:!1};if(0===ye.pipesCount)return this;if(1===ye.pipesCount)return ae&&ae!==ye.pipes||(ae||(ae=ye.pipes),ye.pipes=null,ye.pipesCount=0,ye.flowing=!1,ae&&ae.emit("unpipe",this,Ce)),this;if(!ae){var Pe=ye.pipes,Ge=ye.pipesCount;ye.pipes=null,ye.pipesCount=0,ye.flowing=!1;for(var Ve=0;Ve0,!1!==Pe.flowing&&this.resume()):"readable"===ae&&!Pe.endEmitted&&!Pe.readableListening&&(Pe.readableListening=Pe.needReadable=!0,Pe.flowing=!1,Pe.emittedReadable=!1,b("on readable",Pe.length,Pe.reading),Pe.length?k(this):Pe.reading||process.nextTick(ue,this)),Ce},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(ae,ye){var Ce=S.prototype.removeListener.call(this,ae,ye);return"readable"===ae&&process.nextTick(ee,this),Ce},D.prototype.removeAllListeners=function(ae){var ye=S.prototype.removeAllListeners.apply(this,arguments);return("readable"===ae||void 0===ae)&&process.nextTick(ee,this),ye},D.prototype.resume=function(){var ae=this._readableState;return ae.flowing||(b("resume"),ae.flowing=!ae.readableListening,function we(ae,ye){ye.resumeScheduled||(ye.resumeScheduled=!0,process.nextTick(me,ae,ye))}(this,ae)),ae.paused=!1,this},D.prototype.pause=function(){return b("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(b("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},D.prototype.wrap=function(ae){var ye=this,Ce=this._readableState,Pe=!1;for(var Ge in ae.on("end",function(){if(b("wrapped end"),Ce.decoder&&!Ce.ended){var Ue=Ce.decoder.end();Ue&&Ue.length&&ye.push(Ue)}ye.push(null)}),ae.on("data",function(Ue){(b("wrapped data"),Ce.decoder&&(Ue=Ce.decoder.write(Ue)),Ce.objectMode&&null==Ue||!(Ce.objectMode||Ue&&Ue.length))||(ye.push(Ue)||(Pe=!0,ae.pause()))}),ae)void 0===this[Ge]&&"function"==typeof ae[Ge]&&(this[Ge]=function(_t){return function(){return ae[_t].apply(ae,arguments)}}(Ge));for(var Ve=0;Ve{"use strict";ne.exports=y;var l=d(70891).q,_=l.ERR_METHOD_NOT_IMPLEMENTED,E=l.ERR_MULTIPLE_CALLBACK,S=l.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=l.ERR_TRANSFORM_WITH_LENGTH_0,h=d(41339);function g(A,O){var C=this._transformState;C.transforming=!1;var T=C.writecb;if(null===T)return this.emit("error",new E);C.writechunk=null,C.writecb=null,null!=O&&this.push(O),T(A);var N=this._readableState;N.reading=!1,(N.needReadable||N.length{"use strict";function _(ve){var ce=this;this.next=null,this.entry=null,this.finish=function(){!function me(ve,ce,he){var le=ve.entry;for(ve.entry=null;le;){var de=le.callback;ce.pendingcb--,de(he),le=le.next}ce.corkedRequestsFree.next=ve}(ce,ve)}}var E;ne.exports=Q,Q.WritableState=Z;var S={deprecate:d(23532)},a=d(4970),h=d(93172).Buffer,g=global.Uint8Array||function(){};var W,b=d(41920),O=d(47102).getHighWaterMark,C=d(70891).q,T=C.ERR_INVALID_ARG_TYPE,N=C.ERR_METHOD_NOT_IMPLEMENTED,M=C.ERR_MULTIPLE_CALLBACK,P=C.ERR_STREAM_CANNOT_PIPE,R=C.ERR_STREAM_DESTROYED,L=C.ERR_STREAM_NULL_VALUES,H=C.ERR_STREAM_WRITE_AFTER_END,V=C.ERR_UNKNOWN_ENCODING,J=b.errorOrDestroy;function Y(){}function Z(ve,ce,he){E=E||d(41339),ve=ve||{},"boolean"!=typeof he&&(he=ce instanceof E),this.objectMode=!!ve.objectMode,he&&(this.objectMode=this.objectMode||!!ve.writableObjectMode),this.highWaterMark=O(this,ve,"writableHighWaterMark",he),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var le=!1===ve.decodeStrings;this.decodeStrings=!le,this.defaultEncoding=ve.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(de){!function G(ve,ce){var he=ve._writableState,le=he.sync,de=he.writecb;if("function"!=typeof de)throw new M;if(function F(ve){ve.writing=!1,ve.writecb=null,ve.length-=ve.writelen,ve.writelen=0}(he),ce)!function x(ve,ce,he,le,de){--ce.pendingcb,he?(process.nextTick(de,le),process.nextTick(ue,ve,ce),ve._writableState.errorEmitted=!0,J(ve,le)):(de(le),ve._writableState.errorEmitted=!0,J(ve,le),ue(ve,ce))}(ve,he,le,ce,de);else{var ae=ie(he)||ve.destroyed;!ae&&!he.corked&&!he.bufferProcessing&&he.bufferedRequest&&B(ve,he),le?process.nextTick(k,ve,he,ae,de):k(ve,he,ae,de)}}(ce,de)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==ve.emitClose,this.autoDestroy=!!ve.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new _(this)}function Q(ve){var ce=this instanceof(E=E||d(41339));if(!ce&&!W.call(Q,this))return new Q(ve);this._writableState=new Z(ve,this,ce),this.writable=!0,ve&&("function"==typeof ve.write&&(this._write=ve.write),"function"==typeof ve.writev&&(this._writev=ve.writev),"function"==typeof ve.destroy&&(this._destroy=ve.destroy),"function"==typeof ve.final&&(this._final=ve.final)),a.call(this)}function w(ve,ce,he,le,de,ae,ye){ce.writelen=le,ce.writecb=ye,ce.writing=!0,ce.sync=!0,ce.destroyed?ce.onwrite(new R("write")):he?ve._writev(de,ce.onwrite):ve._write(de,ae,ce.onwrite),ce.sync=!1}function k(ve,ce,he,le){he||function p(ve,ce){0===ce.length&&ce.needDrain&&(ce.needDrain=!1,ve.emit("drain"))}(ve,ce),ce.pendingcb--,le(),ue(ve,ce)}function B(ve,ce){ce.bufferProcessing=!0;var he=ce.bufferedRequest;if(ve._writev&&he&&he.next){var le=ce.bufferedRequestCount,de=new Array(le),ae=ce.corkedRequestsFree;ae.entry=he;for(var ye=0,Ce=!0;he;)de[ye]=he,he.isBuf||(Ce=!1),he=he.next,ye+=1;de.allBuffers=Ce,w(ve,ce,!0,ce.length,de,"",ae.finish),ce.pendingcb++,ce.lastBufferedRequest=null,ae.next?(ce.corkedRequestsFree=ae.next,ae.next=null):ce.corkedRequestsFree=new _(ce),ce.bufferedRequestCount=0}else{for(;he;){var Pe=he.chunk,Ge=he.encoding,Ve=he.callback;if(w(ve,ce,!1,ce.objectMode?1:Pe.length,Pe,Ge,Ve),he=he.next,ce.bufferedRequestCount--,ce.writing)break}null===he&&(ce.lastBufferedRequest=null)}ce.bufferedRequest=he,ce.bufferProcessing=!1}function ie(ve){return ve.ending&&0===ve.length&&null===ve.bufferedRequest&&!ve.finished&&!ve.writing}function te(ve,ce){ve._final(function(he){ce.pendingcb--,he&&J(ve,he),ce.prefinished=!0,ve.emit("prefinish"),ue(ve,ce)})}function ue(ve,ce){var he=ie(ce);if(he&&(function ee(ve,ce){!ce.prefinished&&!ce.finalCalled&&("function"!=typeof ve._final||ce.destroyed?(ce.prefinished=!0,ve.emit("prefinish")):(ce.pendingcb++,ce.finalCalled=!0,process.nextTick(te,ve,ce)))}(ve,ce),0===ce.pendingcb&&(ce.finished=!0,ve.emit("finish"),ce.autoDestroy))){var le=ve._readableState;(!le||le.autoDestroy&&le.endEmitted)&&ve.destroy()}return he}d(83894)(Q,a),Z.prototype.getBuffer=function(){for(var ce=this.bufferedRequest,he=[];ce;)he.push(ce),ce=ce.next;return he},function(){try{Object.defineProperty(Z.prototype,"buffer",{get:S.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(W=Function.prototype[Symbol.hasInstance],Object.defineProperty(Q,Symbol.hasInstance,{value:function(ce){return!!W.call(this,ce)||this===Q&&(ce&&ce._writableState instanceof Z)}})):W=function(ce){return ce instanceof this},Q.prototype.pipe=function(){J(this,new P)},Q.prototype.write=function(ve,ce,he){var le=this._writableState,de=!1,ae=!le.objectMode&&function v(ve){return h.isBuffer(ve)||ve instanceof g}(ve);return ae&&!h.isBuffer(ve)&&(ve=function y(ve){return h.from(ve)}(ve)),"function"==typeof ce&&(he=ce,ce=null),ae?ce="buffer":ce||(ce=le.defaultEncoding),"function"!=typeof he&&(he=Y),le.ending?function D(ve,ce){var he=new H;J(ve,he),process.nextTick(ce,he)}(this,he):(ae||function o(ve,ce,he,le){var de;return null===he?de=new L:"string"!=typeof he&&!ce.objectMode&&(de=new T("chunk",["string","Buffer"],he)),!de||(J(ve,de),process.nextTick(le,de),!1)}(this,le,ve,he))&&(le.pendingcb++,de=function m(ve,ce,he,le,de,ae){if(!he){var ye=function u(ve,ce,he){return!ve.objectMode&&!1!==ve.decodeStrings&&"string"==typeof ce&&(ce=h.from(ce,he)),ce}(ce,le,de);le!==ye&&(he=!0,de="buffer",le=ye)}var Ce=ce.objectMode?1:le.length;ce.length+=Ce;var Pe=ce.length-1))throw new V(ce);return this._writableState.defaultEncoding=ce,this},Object.defineProperty(Q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Q.prototype._write=function(ve,ce,he){he(new N("_write()"))},Q.prototype._writev=null,Q.prototype.end=function(ve,ce,he){var le=this._writableState;return"function"==typeof ve?(he=ve,ve=null,ce=null):"function"==typeof ce&&(he=ce,ce=null),null!=ve&&this.write(ve,ce),le.corked&&(le.corked=1,this.uncork()),le.ending||function we(ve,ce,he){ce.ending=!0,ue(ve,ce),he&&(ce.finished?process.nextTick(he):ve.once("finish",he)),ce.ended=!0,ve.writable=!1}(this,le,he),this},Object.defineProperty(Q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Q.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ce){this._writableState&&(this._writableState.destroyed=ce)}}),Q.prototype.destroy=b.destroy,Q.prototype._undestroy=b.undestroy,Q.prototype._destroy=function(ve,ce){ce(ve)}},13872:(ne,r,d)=>{"use strict";var l;function _(R,L,H){return L in R?Object.defineProperty(R,L,{value:H,enumerable:!0,configurable:!0,writable:!0}):R[L]=H,R}var E=d(67542),S=Symbol("lastResolve"),a=Symbol("lastReject"),h=Symbol("error"),g=Symbol("ended"),y=Symbol("lastPromise"),v=Symbol("handlePromise"),b=Symbol("stream");function A(R,L){return{value:R,done:L}}function O(R){var L=R[S];if(null!==L){var H=R[b].read();null!==H&&(R[y]=null,R[S]=null,R[a]=null,L(A(H,!1)))}}function C(R){process.nextTick(O,R)}var N=Object.getPrototypeOf(function(){}),M=Object.setPrototypeOf((_(l={get stream(){return this[b]},next:function(){var L=this,H=this[h];if(null!==H)return Promise.reject(H);if(this[g])return Promise.resolve(A(void 0,!0));if(this[b].destroyed)return new Promise(function(Z,W){process.nextTick(function(){L[h]?W(L[h]):Z(A(void 0,!0))})});var J,V=this[y];if(V)J=new Promise(function T(R,L){return function(H,V){R.then(function(){L[g]?H(A(void 0,!0)):L[v](H,V)},V)}}(V,this));else{var Y=this[b].read();if(null!==Y)return Promise.resolve(A(Y,!1));J=new Promise(this[v])}return this[y]=J,J}},Symbol.asyncIterator,function(){return this}),_(l,"return",function(){var L=this;return new Promise(function(H,V){L[b].destroy(null,function(J){J?V(J):H(A(void 0,!0))})})}),l),N);ne.exports=function(L){var H,V=Object.create(M,(_(H={},b,{value:L,writable:!0}),_(H,S,{value:null,writable:!0}),_(H,a,{value:null,writable:!0}),_(H,h,{value:null,writable:!0}),_(H,g,{value:L._readableState.endEmitted,writable:!0}),_(H,v,{value:function(Y,Z){var W=V[b].read();W?(V[y]=null,V[S]=null,V[a]=null,Y(A(W,!1))):(V[S]=Y,V[a]=Z)},writable:!0}),H));return V[y]=null,E(L,function(J){if(J&&"ERR_STREAM_PREMATURE_CLOSE"!==J.code){var Y=V[a];return null!==Y&&(V[y]=null,V[S]=null,V[a]=null,Y(J)),void(V[h]=J)}var Z=V[S];null!==Z&&(V[y]=null,V[S]=null,V[a]=null,Z(A(void 0,!0))),V[g]=!0}),L.on("readable",C.bind(null,V)),V}},25019:(ne,r,d)=>{"use strict";function l(C,T){var N=Object.keys(C);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(C);T&&(M=M.filter(function(P){return Object.getOwnPropertyDescriptor(C,P).enumerable})),N.push.apply(N,M)}return N}function E(C,T,N){return T in C?Object.defineProperty(C,T,{value:N,enumerable:!0,configurable:!0,writable:!0}):C[T]=N,C}function a(C,T){for(var N=0;N0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(N){var M={data:N,next:this.head};0===this.length&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(0!==this.length){var N=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,N}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(N){if(0===this.length)return"";for(var M=this.head,P=""+M.data;M=M.next;)P+=N+M.data;return P}},{key:"concat",value:function(N){if(0===this.length)return y.alloc(0);for(var M=y.allocUnsafe(N>>>0),P=this.head,R=0;P;)O(P.data,M,R),R+=P.data.length,P=P.next;return M}},{key:"consume",value:function(N,M){var P;return NL.length?L.length:N;if(H===L.length?R+=L:R+=L.slice(0,N),0===(N-=H)){H===L.length?(++P,M.next?this.head=M.next:this.head=this.tail=null):(this.head=M,M.data=L.slice(H));break}++P}return this.length-=P,R}},{key:"_getBuffer",value:function(N){var M=y.allocUnsafe(N),P=this.head,R=1;for(P.data.copy(M),N-=P.data.length;P=P.next;){var L=P.data,H=N>L.length?L.length:N;if(L.copy(M,M.length-N,0,H),0===(N-=H)){H===L.length?(++R,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=L.slice(H));break}++R}return this.length-=R,M}},{key:A,value:function(N,M){return b(this,function _(C){for(var T=1;T{"use strict";function d(a,h){E(a,h),l(a)}function l(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function E(a,h){a.emit("error",h)}ne.exports={destroy:function r(a,h){var g=this,y=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return y||v?(h?h(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(E,this,a)):process.nextTick(E,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(b){!h&&b?g._writableState?g._writableState.errorEmitted?process.nextTick(l,g):(g._writableState.errorEmitted=!0,process.nextTick(d,g,b)):process.nextTick(d,g,b):h?(process.nextTick(l,g),h(b)):process.nextTick(l,g)}),this)},undestroy:function _(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function S(a,h){var g=a._readableState,y=a._writableState;g&&g.autoDestroy||y&&y.autoDestroy?a.destroy(h):a.emit("error",h)}}},67542:(ne,r,d)=>{"use strict";var l=d(70891).q.ERR_STREAM_PREMATURE_CLOSE;function E(){}ne.exports=function a(h,g,y){if("function"==typeof g)return a(h,null,g);g||(g={}),y=function _(h){var g=!1;return function(){if(!g){g=!0;for(var y=arguments.length,v=new Array(y),b=0;b{ne.exports=function(){throw new Error("Readable.from is not available in the browser")}},90954:(ne,r,d)=>{"use strict";var l;var E=d(70891).q,S=E.ERR_MISSING_ARGS,a=E.ERR_STREAM_DESTROYED;function h(C){if(C)throw C}function v(C){C()}function b(C,T){return C.pipe(T)}ne.exports=function O(){for(var C=arguments.length,T=new Array(C),N=0;N0,function(Y){P||(P=Y),Y&&R.forEach(v),!V&&(R.forEach(v),M(P))})});return T.reduce(b)}},47102:(ne,r,d)=>{"use strict";var l=d(70891).q.ERR_INVALID_OPT_VALUE;ne.exports={getHighWaterMark:function E(S,a,h,g){var y=function _(S,a,h){return null!=S.highWaterMark?S.highWaterMark:a?S[h]:null}(a,g,h);if(null!=y){if(!isFinite(y)||Math.floor(y)!==y||y<0)throw new l(g?h:"highWaterMark",y);return Math.floor(y)}return S.objectMode?16:16384}}},4970:(ne,r,d)=>{ne.exports=d(59069).EventEmitter},53720:(ne,r,d)=>{"use strict";var l=d(73502).Buffer,_=l.isEncoding||function(R){switch((R=""+R)&&R.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(R){var L;switch(this.encoding=function S(R){var L=function E(R){if(!R)return"utf8";for(var L;;)switch(R){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return R;default:if(L)return;R=(""+R).toLowerCase(),L=!0}}(R);if("string"!=typeof L&&(l.isEncoding===_||!_(R)))throw new Error("Unknown encoding: "+R);return L||R}(R),this.encoding){case"utf16le":this.text=O,this.end=C,L=4;break;case"utf8":this.fillLast=v,L=4;break;case"base64":this.text=T,this.end=N,L=3;break;default:return this.write=M,void(this.end=P)}this.lastNeed=0,this.lastTotal=0,this.lastChar=l.allocUnsafe(L)}function h(R){return R<=127?0:R>>5==6?2:R>>4==14?3:R>>3==30?4:R>>6==2?-1:-2}function v(R){var L=this.lastTotal-this.lastNeed,H=function y(R,L,H){if(128!=(192&L[0]))return R.lastNeed=0,"\ufffd";if(R.lastNeed>1&&L.length>1){if(128!=(192&L[1]))return R.lastNeed=1,"\ufffd";if(R.lastNeed>2&&L.length>2&&128!=(192&L[2]))return R.lastNeed=2,"\ufffd"}}(this,R);return void 0!==H?H:this.lastNeed<=R.length?(R.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(R.copy(this.lastChar,L,0,R.length),void(this.lastNeed-=R.length))}function O(R,L){if((R.length-L)%2==0){var H=R.toString("utf16le",L);if(H){var V=H.charCodeAt(H.length-1);if(V>=55296&&V<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1],H.slice(0,-1)}return H}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=R[R.length-1],R.toString("utf16le",L,R.length-1)}function C(R){var L=R&&R.length?this.write(R):"";if(this.lastNeed){var H=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,H)}return L}function T(R,L){var H=(R.length-L)%3;return 0===H?R.toString("base64",L):(this.lastNeed=3-H,this.lastTotal=3,1===H?this.lastChar[0]=R[R.length-1]:(this.lastChar[0]=R[R.length-2],this.lastChar[1]=R[R.length-1]),R.toString("base64",L,R.length-H))}function N(R){var L=R&&R.length?this.write(R):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function M(R){return R.toString(this.encoding)}function P(R){return R&&R.length?this.write(R):""}r.s=a,a.prototype.write=function(R){if(0===R.length)return"";var L,H;if(this.lastNeed){if(void 0===(L=this.fillLast(R)))return"";H=this.lastNeed,this.lastNeed=0}else H=0;return H=0?(J>0&&(R.lastNeed=J-1),J):--V=0?(J>0&&(R.lastNeed=J-2),J):--V=0?(J>0&&(2===J?J=0:R.lastNeed=J-3),J):0))}(this,R,L);if(!this.lastNeed)return R.toString("utf8",L);this.lastTotal=H;var V=R.length-(H-this.lastNeed);return R.copy(this.lastChar,0,V),R.toString("utf8",L,V)},a.prototype.fillLast=function(R){if(this.lastNeed<=R.length)return R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);R.copy(this.lastChar,this.lastTotal-this.lastNeed,0,R.length),this.lastNeed-=R.length}},65685:(ne,r,d)=>{(r=ne.exports=d(3154)).Stream=r,r.Readable=r,r.Writable=d(20520),r.Duplex=d(41339),r.Transform=d(6025),r.PassThrough=d(56071),r.finished=d(67542),r.pipeline=d(90954)},75634:(ne,r,d)=>{"use strict";var l=d(93172).Buffer,_=d(83894),E=d(39650),S=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];function A(){E.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function O(R,L){return R<>>32-L}function C(R,L,H,V,J,Y,Z,W){return O(R+(L^H^V)+Y+Z|0,W)+J|0}function T(R,L,H,V,J,Y,Z,W){return O(R+(L&H|~L&V)+Y+Z|0,W)+J|0}function N(R,L,H,V,J,Y,Z,W){return O(R+((L|~H)^V)+Y+Z|0,W)+J|0}function M(R,L,H,V,J,Y,Z,W){return O(R+(L&V|H&~V)+Y+Z|0,W)+J|0}function P(R,L,H,V,J,Y,Z,W){return O(R+(L^(H|~V))+Y+Z|0,W)+J|0}_(A,E),A.prototype._update=function(){for(var R=S,L=0;L<16;++L)R[L]=this._block.readInt32LE(4*L);for(var H=0|this._a,V=0|this._b,J=0|this._c,Y=0|this._d,Z=0|this._e,W=0|this._a,Q=0|this._b,D=0|this._c,o=0|this._d,u=0|this._e,m=0;m<80;m+=1){var w,x;m<16?(w=C(H,V,J,Y,Z,R[a[m]],v[0],g[m]),x=P(W,Q,D,o,u,R[h[m]],b[0],y[m])):m<32?(w=T(H,V,J,Y,Z,R[a[m]],v[1],g[m]),x=M(W,Q,D,o,u,R[h[m]],b[1],y[m])):m<48?(w=N(H,V,J,Y,Z,R[a[m]],v[2],g[m]),x=N(W,Q,D,o,u,R[h[m]],b[2],y[m])):m<64?(w=M(H,V,J,Y,Z,R[a[m]],v[3],g[m]),x=T(W,Q,D,o,u,R[h[m]],b[3],y[m])):(w=P(H,V,J,Y,Z,R[a[m]],v[4],g[m]),x=C(W,Q,D,o,u,R[h[m]],b[4],y[m])),H=Z,Z=Y,Y=O(J,10),J=V,V=w,W=u,u=o,o=O(D,10),D=Q,Q=x}var F=this._b+J+o|0;this._b=this._c+Y+u|0,this._c=this._d+Z+W|0,this._d=this._e+H+Q|0,this._e=this._a+V+D|0,this._a=F},A.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var R=l.alloc?l.alloc(20):new l(20);return R.writeInt32LE(this._a,0),R.writeInt32LE(this._b,4),R.writeInt32LE(this._c,8),R.writeInt32LE(this._d,12),R.writeInt32LE(this._e,16),R},ne.exports=A},73502:(ne,r,d)=>{var l=d(93172),_=l.Buffer;function E(a,h){for(var g in a)h[g]=a[g]}function S(a,h,g){return _(a,h,g)}_.from&&_.alloc&&_.allocUnsafe&&_.allocUnsafeSlow?ne.exports=l:(E(l,r),r.Buffer=S),S.prototype=Object.create(_.prototype),E(_,S),S.from=function(a,h,g){if("number"==typeof a)throw new TypeError("Argument must not be a number");return _(a,h,g)},S.alloc=function(a,h,g){if("number"!=typeof a)throw new TypeError("Argument must be a number");var y=_(a);return void 0!==h?"string"==typeof g?y.fill(h,g):y.fill(h):y.fill(0),y},S.allocUnsafe=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return _(a)},S.allocUnsafeSlow=function(a){if("number"!=typeof a)throw new TypeError("Argument must be a number");return l.SlowBuffer(a)}},62038:(ne,r,d)=>{"use strict";var S,l=d(93172),_=l.Buffer,E={};for(S in l)l.hasOwnProperty(S)&&("SlowBuffer"===S||"Buffer"===S||(E[S]=l[S]));var a=E.Buffer={};for(S in _)_.hasOwnProperty(S)&&("allocUnsafe"===S||"allocUnsafeSlow"===S||(a[S]=_[S]));if(E.Buffer.prototype=_.prototype,(!a.from||a.from===Uint8Array.from)&&(a.from=function(h,g,y){if("number"==typeof h)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof h);if(h&&typeof h.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);return _(h,g,y)}),a.alloc||(a.alloc=function(h,g,y){if("number"!=typeof h)throw new TypeError('The "size" argument must be of type number. Received type '+typeof h);if(h<0||h>=2*(1<<30))throw new RangeError('The value "'+h+'" is invalid for option "size"');var v=_(h);return g&&0!==g.length?"string"==typeof y?v.fill(g,y):v.fill(g):v.fill(0),v}),!E.kStringMaxLength)try{E.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}E.constants||(E.constants={MAX_LENGTH:E.kMaxLength},E.kStringMaxLength&&(E.constants.MAX_STRING_LENGTH=E.kStringMaxLength)),ne.exports=E},40191:(ne,r)=>{"use strict";function d(F,G){var k=F.length;F.push(G);e:for(;0>>1,B=F[p];if(!(0>>1;pE(ee,k))ueE(we,ee)?(F[p]=we,F[ue]=k,p=ue):(F[p]=ee,F[te]=k,p=te);else{if(!(ueE(we,k)))break e;F[p]=we,F[ue]=k,p=ue}}}return G}function E(F,G){var k=F.sortIndex-G.sortIndex;return 0!==k?k:F.id-G.id}if("object"==typeof performance&&"function"==typeof performance.now){var S=performance;r.unstable_now=function(){return S.now()}}else{var a=Date,h=a.now();r.unstable_now=function(){return a.now()-h}}var g=[],y=[],v=1,b=null,A=3,O=!1,C=!1,T=!1,N="function"==typeof setTimeout?setTimeout:null,M="function"==typeof clearTimeout?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function R(F){for(var G=l(y);null!==G;){if(null===G.callback)_(y);else{if(!(G.startTime<=F))break;_(y),G.sortIndex=G.expirationTime,d(g,G)}G=l(y)}}function L(F){if(T=!1,R(F),!C)if(null!==l(g))C=!0,w(H);else{var G=l(y);null!==G&&x(L,G.startTime-F)}}function H(F,G){C=!1,T&&(T=!1,M(Y),Y=-1),O=!0;var k=A;try{for(R(G),b=l(g);null!==b&&(!(b.expirationTime>G)||F&&!Q());){var p=b.callback;if("function"==typeof p){b.callback=null,A=b.priorityLevel;var B=p(b.expirationTime<=G);G=r.unstable_now(),"function"==typeof B?b.callback=B:b===l(g)&&_(g),R(G)}else _(g);b=l(g)}if(null!==b)var ie=!0;else{var te=l(y);null!==te&&x(L,te.startTime-G),ie=!1}return ie}finally{b=null,A=k,O=!1}}typeof navigator<"u"&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var o,V=!1,J=null,Y=-1,Z=5,W=-1;function Q(){return!(r.unstable_now()-WF||125p?(F.sortIndex=k,d(y,F),null===l(g)&&F===l(y)&&(T?(M(Y),Y=-1):T=!0,x(L,k-p))):(F.sortIndex=B,d(g,F),C||O||(C=!0,w(H))),F},r.unstable_shouldYield=Q,r.unstable_wrapCallback=function(F){var G=A;return function(){var k=A;A=G;try{return F.apply(this,arguments)}finally{A=k}}}},44854:(ne,r,d)=>{"use strict";ne.exports=d(40191)},50508:(ne,r,d)=>{const l=Symbol("SemVer ANY");class _{static get ANY(){return l}constructor(A,O){if(O=E(O),A instanceof _){if(A.loose===!!O.loose)return A;A=A.value}A=A.trim().split(/\s+/).join(" "),g("comparator",A,O),this.options=O,this.loose=!!O.loose,this.parse(A),this.semver===l?this.value="":this.value=this.operator+this.semver.version,g("comp",this)}parse(A){const O=this.options.loose?S[a.COMPARATORLOOSE]:S[a.COMPARATOR],C=A.match(O);if(!C)throw new TypeError(`Invalid comparator: ${A}`);this.operator=void 0!==C[1]?C[1]:"","="===this.operator&&(this.operator=""),C[2]?this.semver=new y(C[2],this.options.loose):this.semver=l}toString(){return this.value}test(A){if(g("Comparator.test",A,this.options.loose),this.semver===l||A===l)return!0;if("string"==typeof A)try{A=new y(A,this.options)}catch{return!1}return h(A,this.operator,this.semver,this.options)}intersects(A,O){if(!(A instanceof _))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new v(A.value,O).test(this.value):""===A.operator?""===A.value||new v(this.value,O).test(A.semver):!((O=E(O)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===A.value)||!O.includePrerelease&&(this.value.startsWith("<0.0.0")||A.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&A.operator.startsWith(">")||this.operator.startsWith("<")&&A.operator.startsWith("<")||this.semver.version===A.semver.version&&this.operator.includes("=")&&A.operator.includes("=")||h(this.semver,"<",A.semver,O)&&this.operator.startsWith(">")&&A.operator.startsWith("<")||h(this.semver,">",A.semver,O)&&this.operator.startsWith("<")&&A.operator.startsWith(">"))}}ne.exports=_;const E=d(20471),{safeRe:S,t:a}=d(1338),h=d(68127),g=d(66070),y=d(51839),v=d(48611)},48611:(ne,r,d)=>{class l{constructor(w,x){if(x=S(x),w instanceof l)return w.loose===!!x.loose&&w.includePrerelease===!!x.includePrerelease?w:new l(w.raw,x);if(w instanceof a)return this.raw=w.value,this.set=[[w]],this.format(),this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=w.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(G=>!N(G[0])),0===this.set.length)this.set=[F];else if(this.set.length>1)for(const G of this.set)if(1===G.length&&M(G[0])){this.set=[G];break}}this.format()}format(){return this.range=this.set.map(w=>w.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(w){const F=((this.options.includePrerelease&&C)|(this.options.loose&&T))+":"+w,G=E.get(F);if(G)return G;const k=this.options.loose,p=k?y[v.HYPHENRANGELOOSE]:y[v.HYPHENRANGE];w=w.replace(p,o(this.options.includePrerelease)),h("hyphen replace",w),w=w.replace(y[v.COMPARATORTRIM],b),h("comparator trim",w),w=w.replace(y[v.TILDETRIM],A),h("tilde trim",w),w=w.replace(y[v.CARETTRIM],O),h("caret trim",w);let B=w.split(" ").map(ue=>R(ue,this.options)).join(" ").split(/\s+/).map(ue=>D(ue,this.options));k&&(B=B.filter(ue=>(h("loose invalid filter",ue,this.options),!!ue.match(y[v.COMPARATORLOOSE])))),h("range list",B);const ie=new Map,te=B.map(ue=>new a(ue,this.options));for(const ue of te){if(N(ue))return[ue];ie.set(ue.value,ue)}ie.size>1&&ie.has("")&&ie.delete("");const ee=[...ie.values()];return E.set(F,ee),ee}intersects(w,x){if(!(w instanceof l))throw new TypeError("a Range is required");return this.set.some(F=>P(F,x)&&w.set.some(G=>P(G,x)&&F.every(k=>G.every(p=>k.intersects(p,x)))))}test(w){if(!w)return!1;if("string"==typeof w)try{w=new g(w,this.options)}catch{return!1}for(let x=0;x"<0.0.0-0"===m.value,M=m=>""===m.value,P=(m,w)=>{let x=!0;const F=m.slice();let G=F.pop();for(;x&&F.length;)x=F.every(k=>G.intersects(k,w)),G=F.pop();return x},R=(m,w)=>(h("comp",m,w),m=J(m,w),h("caret",m),m=H(m,w),h("tildes",m),m=Z(m,w),h("xrange",m),m=Q(m,w),h("stars",m),m),L=m=>!m||"x"===m.toLowerCase()||"*"===m,H=(m,w)=>m.trim().split(/\s+/).map(x=>V(x,w)).join(" "),V=(m,w)=>{const x=w.loose?y[v.TILDELOOSE]:y[v.TILDE];return m.replace(x,(F,G,k,p,B)=>{let ie;return h("tilde",m,F,G,k,p,B),L(G)?ie="":L(k)?ie=`>=${G}.0.0 <${+G+1}.0.0-0`:L(p)?ie=`>=${G}.${k}.0 <${G}.${+k+1}.0-0`:B?(h("replaceTilde pr",B),ie=`>=${G}.${k}.${p}-${B} <${G}.${+k+1}.0-0`):ie=`>=${G}.${k}.${p} <${G}.${+k+1}.0-0`,h("tilde return",ie),ie})},J=(m,w)=>m.trim().split(/\s+/).map(x=>Y(x,w)).join(" "),Y=(m,w)=>{h("caret",m,w);const x=w.loose?y[v.CARETLOOSE]:y[v.CARET],F=w.includePrerelease?"-0":"";return m.replace(x,(G,k,p,B,ie)=>{let te;return h("caret",m,G,k,p,B,ie),L(k)?te="":L(p)?te=`>=${k}.0.0${F} <${+k+1}.0.0-0`:L(B)?te="0"===k?`>=${k}.${p}.0${F} <${k}.${+p+1}.0-0`:`>=${k}.${p}.0${F} <${+k+1}.0.0-0`:ie?(h("replaceCaret pr",ie),te="0"===k?"0"===p?`>=${k}.${p}.${B}-${ie} <${k}.${p}.${+B+1}-0`:`>=${k}.${p}.${B}-${ie} <${k}.${+p+1}.0-0`:`>=${k}.${p}.${B}-${ie} <${+k+1}.0.0-0`):(h("no pr"),te="0"===k?"0"===p?`>=${k}.${p}.${B}${F} <${k}.${p}.${+B+1}-0`:`>=${k}.${p}.${B}${F} <${k}.${+p+1}.0-0`:`>=${k}.${p}.${B} <${+k+1}.0.0-0`),h("caret return",te),te})},Z=(m,w)=>(h("replaceXRanges",m,w),m.split(/\s+/).map(x=>W(x,w)).join(" ")),W=(m,w)=>{m=m.trim();const x=w.loose?y[v.XRANGELOOSE]:y[v.XRANGE];return m.replace(x,(F,G,k,p,B,ie)=>{h("xRange",m,F,G,k,p,B,ie);const te=L(k),ee=te||L(p),ue=ee||L(B),we=ue;return"="===G&&we&&(G=""),ie=w.includePrerelease?"-0":"",te?F=">"===G||"<"===G?"<0.0.0-0":"*":G&&we?(ee&&(p=0),B=0,">"===G?(G=">=",ee?(k=+k+1,p=0,B=0):(p=+p+1,B=0)):"<="===G&&(G="<",ee?k=+k+1:p=+p+1),"<"===G&&(ie="-0"),F=`${G+k}.${p}.${B}${ie}`):ee?F=`>=${k}.0.0${ie} <${+k+1}.0.0-0`:ue&&(F=`>=${k}.${p}.0${ie} <${k}.${+p+1}.0-0`),h("xRange return",F),F})},Q=(m,w)=>(h("replaceStars",m,w),m.trim().replace(y[v.STAR],"")),D=(m,w)=>(h("replaceGTE0",m,w),m.trim().replace(y[w.includePrerelease?v.GTE0PRE:v.GTE0],"")),o=m=>(w,x,F,G,k,p,B,ie,te,ee,ue,we,me)=>`${x=L(F)?"":L(G)?`>=${F}.0.0${m?"-0":""}`:L(k)?`>=${F}.${G}.0${m?"-0":""}`:p?`>=${x}`:`>=${x}${m?"-0":""}`} ${ie=L(te)?"":L(ee)?`<${+te+1}.0.0-0`:L(ue)?`<${te}.${+ee+1}.0-0`:we?`<=${te}.${ee}.${ue}-${we}`:m?`<${te}.${ee}.${+ue+1}-0`:`<=${ie}`}`.trim(),u=(m,w,x)=>{for(let F=0;F0){const G=m[F].semver;if(G.major===w.major&&G.minor===w.minor&&G.patch===w.patch)return!0}return!1}return!0}},51839:(ne,r,d)=>{const l=d(66070),{MAX_LENGTH:_,MAX_SAFE_INTEGER:E}=d(31696),{safeRe:S,t:a}=d(1338),h=d(20471),{compareIdentifiers:g}=d(67165);class y{constructor(b,A){if(A=h(A),b instanceof y){if(b.loose===!!A.loose&&b.includePrerelease===!!A.includePrerelease)return b;b=b.version}else if("string"!=typeof b)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof b}".`);if(b.length>_)throw new TypeError(`version is longer than ${_} characters`);l("SemVer",b,A),this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease;const O=b.trim().match(A.loose?S[a.LOOSE]:S[a.FULL]);if(!O)throw new TypeError(`Invalid Version: ${b}`);if(this.raw=b,this.major=+O[1],this.minor=+O[2],this.patch=+O[3],this.major>E||this.major<0)throw new TypeError("Invalid major version");if(this.minor>E||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>E||this.patch<0)throw new TypeError("Invalid patch version");O[4]?this.prerelease=O[4].split(".").map(C=>{if(/^[0-9]+$/.test(C)){const T=+C;if(T>=0&&T=0;)"number"==typeof this.prerelease[T]&&(this.prerelease[T]++,T=-2);if(-1===T){if(A===this.prerelease.join(".")&&!1===O)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(C)}}if(A){let T=[A,C];!1===O&&(T=[A]),0===g(this.prerelease[0],A)?isNaN(this.prerelease[1])&&(this.prerelease=T):this.prerelease=T}break}default:throw new Error(`invalid increment argument: ${b}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}ne.exports=y},69862:(ne,r,d)=>{const l=d(62306);ne.exports=(E,S)=>{const a=l(E.trim().replace(/^[=v]+/,""),S);return a?a.version:null}},68127:(ne,r,d)=>{const l=d(95097),_=d(42046),E=d(97283),S=d(45844),a=d(30845),h=d(20477);ne.exports=(y,v,b,A)=>{switch(v){case"===":return"object"==typeof y&&(y=y.version),"object"==typeof b&&(b=b.version),y===b;case"!==":return"object"==typeof y&&(y=y.version),"object"==typeof b&&(b=b.version),y!==b;case"":case"=":case"==":return l(y,b,A);case"!=":return _(y,b,A);case">":return E(y,b,A);case">=":return S(y,b,A);case"<":return a(y,b,A);case"<=":return h(y,b,A);default:throw new TypeError(`Invalid operator: ${v}`)}}},8797:(ne,r,d)=>{const l=d(51839),_=d(62306),{safeRe:E,t:S}=d(1338);ne.exports=(h,g)=>{if(h instanceof l)return h;if("number"==typeof h&&(h=String(h)),"string"!=typeof h)return null;let y=null;if((g=g||{}).rtl){let v;for(;(v=E[S.COERCERTL].exec(h))&&(!y||y.index+y[0].length!==h.length);)(!y||v.index+v[0].length!==y.index+y[0].length)&&(y=v),E[S.COERCERTL].lastIndex=v.index+v[1].length+v[2].length;E[S.COERCERTL].lastIndex=-1}else y=h.match(E[S.COERCE]);return null===y?null:_(`${y[2]}.${y[3]||"0"}.${y[4]||"0"}`,g)}},13621:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S,a)=>{const h=new l(E,a),g=new l(S,a);return h.compare(g)||h.compareBuild(g)}},28088:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S)=>l(E,S,!0)},65522:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S,a)=>new l(E,a).compare(new l(S,a))},70380:(ne,r,d)=>{const l=d(62306);ne.exports=(E,S)=>{const a=l(E,null,!0),h=l(S,null,!0),g=a.compare(h);if(0===g)return null;const y=g>0,v=y?a:h,b=y?h:a,A=!!v.prerelease.length;if(b.prerelease.length&&!A)return b.patch||b.minor?v.patch?"patch":v.minor?"minor":"major":"major";const C=A?"pre":"";return a.major!==h.major?C+"major":a.minor!==h.minor?C+"minor":a.patch!==h.patch?C+"patch":"prerelease"}},95097:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>0===l(E,S,a)},97283:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>l(E,S,a)>0},45844:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>l(E,S,a)>=0},74749:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S,a,h,g)=>{"string"==typeof a&&(g=h,h=a,a=void 0);try{return new l(E instanceof l?E.version:E,a).inc(S,h,g).version}catch{return null}}},30845:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>l(E,S,a)<0},20477:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>l(E,S,a)<=0},24303:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S)=>new l(E,S).major},87920:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S)=>new l(E,S).minor},42046:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>0!==l(E,S,a)},62306:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S,a=!1)=>{if(E instanceof l)return E;try{return new l(E,S)}catch(h){if(!a)return null;throw h}}},81387:(ne,r,d)=>{const l=d(51839);ne.exports=(E,S)=>new l(E,S).patch},71964:(ne,r,d)=>{const l=d(62306);ne.exports=(E,S)=>{const a=l(E,S);return a&&a.prerelease.length?a.prerelease:null}},48034:(ne,r,d)=>{const l=d(65522);ne.exports=(E,S,a)=>l(S,E,a)},89610:(ne,r,d)=>{const l=d(13621);ne.exports=(E,S)=>E.sort((a,h)=>l(h,a,S))},52866:(ne,r,d)=>{const l=d(48611);ne.exports=(E,S,a)=>{try{S=new l(S,a)}catch{return!1}return S.test(E)}},2379:(ne,r,d)=>{const l=d(13621);ne.exports=(E,S)=>E.sort((a,h)=>l(a,h,S))},26473:(ne,r,d)=>{const l=d(62306);ne.exports=(E,S)=>{const a=l(E,S);return a?a.version:null}},97858:(ne,r,d)=>{const l=d(1338),_=d(31696),E=d(51839),S=d(67165),a=d(62306),h=d(26473),g=d(69862),y=d(74749),v=d(70380),b=d(24303),A=d(87920),O=d(81387),C=d(71964),T=d(65522),N=d(48034),M=d(28088),P=d(13621),R=d(2379),L=d(89610),H=d(97283),V=d(30845),J=d(95097),Y=d(42046),Z=d(45844),W=d(20477),Q=d(68127),D=d(8797),o=d(50508),u=d(48611),m=d(52866),w=d(16892),x=d(27693),F=d(24499),G=d(57291),k=d(14282),p=d(97203),B=d(82764),ie=d(51658),te=d(74741),ee=d(93807),ue=d(24158);ne.exports={parse:a,valid:h,clean:g,inc:y,diff:v,major:b,minor:A,patch:O,prerelease:C,compare:T,rcompare:N,compareLoose:M,compareBuild:P,sort:R,rsort:L,gt:H,lt:V,eq:J,neq:Y,gte:Z,lte:W,cmp:Q,coerce:D,Comparator:o,Range:u,satisfies:m,toComparators:w,maxSatisfying:x,minSatisfying:F,minVersion:G,validRange:k,outside:p,gtr:B,ltr:ie,intersects:te,simplifyRange:ee,subset:ue,SemVer:E,re:l.re,src:l.src,tokens:l.t,SEMVER_SPEC_VERSION:_.SEMVER_SPEC_VERSION,RELEASE_TYPES:_.RELEASE_TYPES,compareIdentifiers:S.compareIdentifiers,rcompareIdentifiers:S.rcompareIdentifiers}},31696:ne=>{const l=Number.MAX_SAFE_INTEGER||9007199254740991;ne.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:l,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},66070:ne=>{const r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...d)=>console.error("SEMVER",...d):()=>{};ne.exports=r},67165:ne=>{const r=/^[0-9]+$/,d=(_,E)=>{const S=r.test(_),a=r.test(E);return S&&a&&(_=+_,E=+E),_===E?0:S&&!a?-1:a&&!S?1:_d(E,_)}},20471:ne=>{const r=Object.freeze({loose:!0}),d=Object.freeze({});ne.exports=_=>_?"object"!=typeof _?r:_:d},1338:(ne,r,d)=>{const{MAX_SAFE_COMPONENT_LENGTH:l,MAX_SAFE_BUILD_LENGTH:_,MAX_LENGTH:E}=d(31696),S=d(66070),a=(r=ne.exports={}).re=[],h=r.safeRe=[],g=r.src=[],y=r.t={};let v=0;const b="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",E],[b,_]],C=(T,N,M)=>{const P=(T=>{for(const[N,M]of A)T=T.split(`${N}*`).join(`${N}{0,${M}}`).split(`${N}+`).join(`${N}{1,${M}}`);return T})(N),R=v++;S(T,R,N),y[T]=R,g[R]=N,a[R]=new RegExp(N,M?"g":void 0),h[R]=new RegExp(P,M?"g":void 0)};C("NUMERICIDENTIFIER","0|[1-9]\\d*"),C("NUMERICIDENTIFIERLOOSE","\\d+"),C("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${b}*`),C("MAINVERSION",`(${g[y.NUMERICIDENTIFIER]})\\.(${g[y.NUMERICIDENTIFIER]})\\.(${g[y.NUMERICIDENTIFIER]})`),C("MAINVERSIONLOOSE",`(${g[y.NUMERICIDENTIFIERLOOSE]})\\.(${g[y.NUMERICIDENTIFIERLOOSE]})\\.(${g[y.NUMERICIDENTIFIERLOOSE]})`),C("PRERELEASEIDENTIFIER",`(?:${g[y.NUMERICIDENTIFIER]}|${g[y.NONNUMERICIDENTIFIER]})`),C("PRERELEASEIDENTIFIERLOOSE",`(?:${g[y.NUMERICIDENTIFIERLOOSE]}|${g[y.NONNUMERICIDENTIFIER]})`),C("PRERELEASE",`(?:-(${g[y.PRERELEASEIDENTIFIER]}(?:\\.${g[y.PRERELEASEIDENTIFIER]})*))`),C("PRERELEASELOOSE",`(?:-?(${g[y.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${g[y.PRERELEASEIDENTIFIERLOOSE]})*))`),C("BUILDIDENTIFIER",`${b}+`),C("BUILD",`(?:\\+(${g[y.BUILDIDENTIFIER]}(?:\\.${g[y.BUILDIDENTIFIER]})*))`),C("FULLPLAIN",`v?${g[y.MAINVERSION]}${g[y.PRERELEASE]}?${g[y.BUILD]}?`),C("FULL",`^${g[y.FULLPLAIN]}$`),C("LOOSEPLAIN",`[v=\\s]*${g[y.MAINVERSIONLOOSE]}${g[y.PRERELEASELOOSE]}?${g[y.BUILD]}?`),C("LOOSE",`^${g[y.LOOSEPLAIN]}$`),C("GTLT","((?:<|>)?=?)"),C("XRANGEIDENTIFIERLOOSE",`${g[y.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),C("XRANGEIDENTIFIER",`${g[y.NUMERICIDENTIFIER]}|x|X|\\*`),C("XRANGEPLAIN",`[v=\\s]*(${g[y.XRANGEIDENTIFIER]})(?:\\.(${g[y.XRANGEIDENTIFIER]})(?:\\.(${g[y.XRANGEIDENTIFIER]})(?:${g[y.PRERELEASE]})?${g[y.BUILD]}?)?)?`),C("XRANGEPLAINLOOSE",`[v=\\s]*(${g[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${g[y.XRANGEIDENTIFIERLOOSE]})(?:\\.(${g[y.XRANGEIDENTIFIERLOOSE]})(?:${g[y.PRERELEASELOOSE]})?${g[y.BUILD]}?)?)?`),C("XRANGE",`^${g[y.GTLT]}\\s*${g[y.XRANGEPLAIN]}$`),C("XRANGELOOSE",`^${g[y.GTLT]}\\s*${g[y.XRANGEPLAINLOOSE]}$`),C("COERCE",`(^|[^\\d])(\\d{1,${l}})(?:\\.(\\d{1,${l}}))?(?:\\.(\\d{1,${l}}))?(?:$|[^\\d])`),C("COERCERTL",g[y.COERCE],!0),C("LONETILDE","(?:~>?)"),C("TILDETRIM",`(\\s*)${g[y.LONETILDE]}\\s+`,!0),r.tildeTrimReplace="$1~",C("TILDE",`^${g[y.LONETILDE]}${g[y.XRANGEPLAIN]}$`),C("TILDELOOSE",`^${g[y.LONETILDE]}${g[y.XRANGEPLAINLOOSE]}$`),C("LONECARET","(?:\\^)"),C("CARETTRIM",`(\\s*)${g[y.LONECARET]}\\s+`,!0),r.caretTrimReplace="$1^",C("CARET",`^${g[y.LONECARET]}${g[y.XRANGEPLAIN]}$`),C("CARETLOOSE",`^${g[y.LONECARET]}${g[y.XRANGEPLAINLOOSE]}$`),C("COMPARATORLOOSE",`^${g[y.GTLT]}\\s*(${g[y.LOOSEPLAIN]})$|^$`),C("COMPARATOR",`^${g[y.GTLT]}\\s*(${g[y.FULLPLAIN]})$|^$`),C("COMPARATORTRIM",`(\\s*)${g[y.GTLT]}\\s*(${g[y.LOOSEPLAIN]}|${g[y.XRANGEPLAIN]})`,!0),r.comparatorTrimReplace="$1$2$3",C("HYPHENRANGE",`^\\s*(${g[y.XRANGEPLAIN]})\\s+-\\s+(${g[y.XRANGEPLAIN]})\\s*$`),C("HYPHENRANGELOOSE",`^\\s*(${g[y.XRANGEPLAINLOOSE]})\\s+-\\s+(${g[y.XRANGEPLAINLOOSE]})\\s*$`),C("STAR","(<|>)?=?\\s*\\*"),C("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),C("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},20578:(ne,r,d)=>{"use strict";const l=d(47245),_=Symbol("max"),E=Symbol("length"),S=Symbol("lengthCalculator"),a=Symbol("allowStale"),h=Symbol("maxAge"),g=Symbol("dispose"),y=Symbol("noDisposeOnSet"),v=Symbol("lruList"),b=Symbol("cache"),A=Symbol("updateAgeOnGet"),O=()=>1;const T=(H,V,J)=>{const Y=H[b].get(V);if(Y){const Z=Y.value;if(N(H,Z)){if(P(H,Y),!H[a])return}else J&&(H[A]&&(Y.value.now=Date.now()),H[v].unshiftNode(Y));return Z.value}},N=(H,V)=>{if(!V||!V.maxAge&&!H[h])return!1;const J=Date.now()-V.now;return V.maxAge?J>V.maxAge:H[h]&&J>H[h]},M=H=>{if(H[E]>H[_])for(let V=H[v].tail;H[E]>H[_]&&null!==V;){const J=V.prev;P(H,V),V=J}},P=(H,V)=>{if(V){const J=V.value;H[g]&&H[g](J.key,J.value),H[E]-=J.length,H[b].delete(J.key),H[v].removeNode(V)}};class R{constructor(V,J,Y,Z,W){this.key=V,this.value=J,this.length=Y,this.now=Z,this.maxAge=W||0}}const L=(H,V,J,Y)=>{let Z=J.value;N(H,Z)&&(P(H,J),H[a]||(Z=void 0)),Z&&V.call(Y,Z.value,Z.key,H)};ne.exports=class C{constructor(V){if("number"==typeof V&&(V={max:V}),V||(V={}),V.max&&("number"!=typeof V.max||V.max<0))throw new TypeError("max must be a non-negative number");this[_]=V.max||1/0;const Y=V.length||O;if(this[S]="function"!=typeof Y?O:Y,this[a]=V.stale||!1,V.maxAge&&"number"!=typeof V.maxAge)throw new TypeError("maxAge must be a number");this[h]=V.maxAge||0,this[g]=V.dispose,this[y]=V.noDisposeOnSet||!1,this[A]=V.updateAgeOnGet||!1,this.reset()}set max(V){if("number"!=typeof V||V<0)throw new TypeError("max must be a non-negative number");this[_]=V||1/0,M(this)}get max(){return this[_]}set allowStale(V){this[a]=!!V}get allowStale(){return this[a]}set maxAge(V){if("number"!=typeof V)throw new TypeError("maxAge must be a non-negative number");this[h]=V,M(this)}get maxAge(){return this[h]}set lengthCalculator(V){"function"!=typeof V&&(V=O),V!==this[S]&&(this[S]=V,this[E]=0,this[v].forEach(J=>{J.length=this[S](J.value,J.key),this[E]+=J.length})),M(this)}get lengthCalculator(){return this[S]}get length(){return this[E]}get itemCount(){return this[v].length}rforEach(V,J){J=J||this;for(let Y=this[v].tail;null!==Y;){const Z=Y.prev;L(this,V,Y,J),Y=Z}}forEach(V,J){J=J||this;for(let Y=this[v].head;null!==Y;){const Z=Y.next;L(this,V,Y,J),Y=Z}}keys(){return this[v].toArray().map(V=>V.key)}values(){return this[v].toArray().map(V=>V.value)}reset(){this[g]&&this[v]&&this[v].length&&this[v].forEach(V=>this[g](V.key,V.value)),this[b]=new Map,this[v]=new l,this[E]=0}dump(){return this[v].map(V=>!N(this,V)&&{k:V.key,v:V.value,e:V.now+(V.maxAge||0)}).toArray().filter(V=>V)}dumpLru(){return this[v]}set(V,J,Y){if((Y=Y||this[h])&&"number"!=typeof Y)throw new TypeError("maxAge must be a number");const Z=Y?Date.now():0,W=this[S](J,V);if(this[b].has(V)){if(W>this[_])return P(this,this[b].get(V)),!1;const o=this[b].get(V).value;return this[g]&&(this[y]||this[g](V,o.value)),o.now=Z,o.maxAge=Y,o.value=J,this[E]+=W-o.length,o.length=W,this.get(V),M(this),!0}const Q=new R(V,J,W,Z,Y);return Q.length>this[_]?(this[g]&&this[g](V,J),!1):(this[E]+=Q.length,this[v].unshift(Q),this[b].set(V,this[v].head),M(this),!0)}has(V){if(!this[b].has(V))return!1;const J=this[b].get(V).value;return!N(this,J)}get(V){return T(this,V,!0)}peek(V){return T(this,V,!1)}pop(){const V=this[v].tail;return V?(P(this,V),V.value):null}del(V){P(this,this[b].get(V))}load(V){this.reset();const J=Date.now();for(let Y=V.length-1;Y>=0;Y--){const Z=V[Y],W=Z.e||0;if(0===W)this.set(Z.k,Z.v);else{const Q=W-J;Q>0&&this.set(Z.k,Z.v,Q)}}}prune(){this[b].forEach((V,J)=>T(this,J,!1))}}},82764:(ne,r,d)=>{const l=d(97203);ne.exports=(E,S,a)=>l(E,S,">",a)},74741:(ne,r,d)=>{const l=d(48611);ne.exports=(E,S,a)=>(E=new l(E,a),S=new l(S,a),E.intersects(S,a))},51658:(ne,r,d)=>{const l=d(97203);ne.exports=(E,S,a)=>l(E,S,"<",a)},27693:(ne,r,d)=>{const l=d(51839),_=d(48611);ne.exports=(S,a,h)=>{let g=null,y=null,v=null;try{v=new _(a,h)}catch{return null}return S.forEach(b=>{v.test(b)&&(!g||-1===y.compare(b))&&(g=b,y=new l(g,h))}),g}},24499:(ne,r,d)=>{const l=d(51839),_=d(48611);ne.exports=(S,a,h)=>{let g=null,y=null,v=null;try{v=new _(a,h)}catch{return null}return S.forEach(b=>{v.test(b)&&(!g||1===y.compare(b))&&(g=b,y=new l(g,h))}),g}},57291:(ne,r,d)=>{const l=d(51839),_=d(48611),E=d(97283);ne.exports=(a,h)=>{a=new _(a,h);let g=new l("0.0.0");if(a.test(g)||(g=new l("0.0.0-0"),a.test(g)))return g;g=null;for(let y=0;y{const O=new l(A.semver.version);switch(A.operator){case">":0===O.prerelease.length?O.patch++:O.prerelease.push(0),O.raw=O.format();case"":case">=":(!b||E(O,b))&&(b=O);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${A.operator}`)}}),b&&(!g||E(g,b))&&(g=b)}return g&&a.test(g)?g:null}},97203:(ne,r,d)=>{const l=d(51839),_=d(50508),{ANY:E}=_,S=d(48611),a=d(52866),h=d(97283),g=d(30845),y=d(20477),v=d(45844);ne.exports=(A,O,C,T)=>{let N,M,P,R,L;switch(A=new l(A,T),O=new S(O,T),C){case">":N=h,M=y,P=g,R=">",L=">=";break;case"<":N=g,M=v,P=h,R="<",L="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(A,O,T))return!1;for(let H=0;H{Z.semver===E&&(Z=new _(">=0.0.0")),J=J||Z,Y=Y||Z,N(Z.semver,J.semver,T)?J=Z:P(Z.semver,Y.semver,T)&&(Y=Z)}),J.operator===R||J.operator===L||(!Y.operator||Y.operator===R)&&M(A,Y.semver))return!1;if(Y.operator===L&&P(A,Y.semver))return!1}return!0}},93807:(ne,r,d)=>{const l=d(52866),_=d(65522);ne.exports=(E,S,a)=>{const h=[];let g=null,y=null;const v=E.sort((C,T)=>_(C,T,a));for(const C of v)l(C,S,a)?(y=C,g||(g=C)):(y&&h.push([g,y]),y=null,g=null);g&&h.push([g,null]);const b=[];for(const[C,T]of h)C===T?b.push(C):T||C!==v[0]?T?C===v[0]?b.push(`<=${T}`):b.push(`${C} - ${T}`):b.push(`>=${C}`):b.push("*");const A=b.join(" || "),O="string"==typeof S.raw?S.raw:String(S);return A.length{const l=d(48611),_=d(50508),{ANY:E}=_,S=d(52866),a=d(65522),g=[new _(">=0.0.0-0")],y=[new _(">=0.0.0")],v=(O,C,T)=>{if(O===C)return!0;if(1===O.length&&O[0].semver===E){if(1===C.length&&C[0].semver===E)return!0;O=T.includePrerelease?g:y}if(1===C.length&&C[0].semver===E){if(T.includePrerelease)return!0;C=y}const N=new Set;let M,P,R;for(const W of O)">"===W.operator||">="===W.operator?M=b(M,W,T):"<"===W.operator||"<="===W.operator?P=A(P,W,T):N.add(W.semver);if(N.size>1)return null;if(M&&P){if(R=a(M.semver,P.semver,T),R>0)return null;if(0===R&&(">="!==M.operator||"<="!==P.operator))return null}for(const W of N){if(M&&!S(W,String(M),T)||P&&!S(W,String(P),T))return null;for(const Q of C)if(!S(W,String(Q),T))return!1;return!0}let L,H,V,J,Y=!(!P||T.includePrerelease||!P.semver.prerelease.length)&&P.semver,Z=!(!M||T.includePrerelease||!M.semver.prerelease.length)&&M.semver;Y&&1===Y.prerelease.length&&"<"===P.operator&&0===Y.prerelease[0]&&(Y=!1);for(const W of C){if(J=J||">"===W.operator||">="===W.operator,V=V||"<"===W.operator||"<="===W.operator,M)if(Z&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===Z.major&&W.semver.minor===Z.minor&&W.semver.patch===Z.patch&&(Z=!1),">"===W.operator||">="===W.operator){if(L=b(M,W,T),L===W&&L!==M)return!1}else if(">="===M.operator&&!S(M.semver,String(W),T))return!1;if(P)if(Y&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===Y.major&&W.semver.minor===Y.minor&&W.semver.patch===Y.patch&&(Y=!1),"<"===W.operator||"<="===W.operator){if(H=A(P,W,T),H===W&&H!==P)return!1}else if("<="===P.operator&&!S(P.semver,String(W),T))return!1;if(!W.operator&&(P||M)&&0!==R)return!1}return!(M&&V&&!P&&0!==R||P&&J&&!M&&0!==R||Z||Y)},b=(O,C,T)=>{if(!O)return C;const N=a(O.semver,C.semver,T);return N>0?O:N<0||">"===C.operator&&">="===O.operator?C:O},A=(O,C,T)=>{if(!O)return C;const N=a(O.semver,C.semver,T);return N<0?O:N>0||"<"===C.operator&&"<="===O.operator?C:O};ne.exports=(O,C,T={})=>{if(O===C)return!0;O=new l(O,T),C=new l(C,T);let N=!1;e:for(const M of O.set){for(const P of C.set){const R=v(M,P,T);if(N=N||null!==R,R)continue e}if(N)return!1}return!0}},16892:(ne,r,d)=>{const l=d(48611);ne.exports=(E,S)=>new l(E,S).set.map(a=>a.map(h=>h.value).join(" ").trim().split(" "))},14282:(ne,r,d)=>{const l=d(48611);ne.exports=(E,S)=>{try{return new l(E,S).range||"*"}catch{return null}}},1106:ne=>{"use strict";ne.exports=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function r(l,_){return l.__proto__=_,l}:function d(l,_){for(var E in _)Object.prototype.hasOwnProperty.call(l,E)||(l[E]=_[E]);return l})},86692:(ne,r,d)=>{var l=d(73502).Buffer;function _(E,S){this._block=l.alloc(E),this._finalSize=S,this._blockSize=E,this._len=0}_.prototype.update=function(E,S){"string"==typeof E&&(S=S||"utf8",E=l.from(E,S));for(var a=this._block,h=this._blockSize,g=E.length,y=this._len,v=0;v=this._finalSize&&(this._update(this._block),this._block.fill(0));var a=8*this._len;if(a<=4294967295)this._block.writeUInt32BE(a,this._blockSize-4);else{var h=(4294967295&a)>>>0,g=(a-h)/4294967296;this._block.writeUInt32BE(g,this._blockSize-8),this._block.writeUInt32BE(h,this._blockSize-4)}this._update(this._block);var y=this._hash();return E?y.toString(E):y},_.prototype._update=function(){throw new Error("_update must be implemented by subclass")},ne.exports=_},95244:(ne,r,d)=>{var l=ne.exports=function(E){E=E.toLowerCase();var S=l[E];if(!S)throw new Error(E+" is not supported (we accept pull requests)");return new S};l.sha=d(88932),l.sha1=d(17736),l.sha224=d(25044),l.sha256=d(15014),l.sha384=d(76540),l.sha512=d(10117)},88932:(ne,r,d)=>{var l=d(83894),_=d(86692),E=d(73502).Buffer,S=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,_.call(this,64,56)}function g(b){return b<<5|b>>>27}function y(b){return b<<30|b>>>2}function v(b,A,O,C){return 0===b?A&O|~A&C:2===b?A&O|A&C|O&C:A^O^C}l(h,_),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(b){for(var A=this._w,O=0|this._a,C=0|this._b,T=0|this._c,N=0|this._d,M=0|this._e,P=0;P<16;++P)A[P]=b.readInt32BE(4*P);for(;P<80;++P)A[P]=A[P-3]^A[P-8]^A[P-14]^A[P-16];for(var R=0;R<80;++R){var L=~~(R/20),H=g(O)+v(L,C,T,N)+M+A[R]+S[L]|0;M=N,N=T,T=y(C),C=O,O=H}this._a=O+this._a|0,this._b=C+this._b|0,this._c=T+this._c|0,this._d=N+this._d|0,this._e=M+this._e|0},h.prototype._hash=function(){var b=E.allocUnsafe(20);return b.writeInt32BE(0|this._a,0),b.writeInt32BE(0|this._b,4),b.writeInt32BE(0|this._c,8),b.writeInt32BE(0|this._d,12),b.writeInt32BE(0|this._e,16),b},ne.exports=h},17736:(ne,r,d)=>{var l=d(83894),_=d(86692),E=d(73502).Buffer,S=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,_.call(this,64,56)}function g(A){return A<<1|A>>>31}function y(A){return A<<5|A>>>27}function v(A){return A<<30|A>>>2}function b(A,O,C,T){return 0===A?O&C|~O&T:2===A?O&C|O&T|C&T:O^C^T}l(h,_),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(A){for(var O=this._w,C=0|this._a,T=0|this._b,N=0|this._c,M=0|this._d,P=0|this._e,R=0;R<16;++R)O[R]=A.readInt32BE(4*R);for(;R<80;++R)O[R]=g(O[R-3]^O[R-8]^O[R-14]^O[R-16]);for(var L=0;L<80;++L){var H=~~(L/20),V=y(C)+b(H,T,N,M)+P+O[L]+S[H]|0;P=M,M=N,N=v(T),T=C,C=V}this._a=C+this._a|0,this._b=T+this._b|0,this._c=N+this._c|0,this._d=M+this._d|0,this._e=P+this._e|0},h.prototype._hash=function(){var A=E.allocUnsafe(20);return A.writeInt32BE(0|this._a,0),A.writeInt32BE(0|this._b,4),A.writeInt32BE(0|this._c,8),A.writeInt32BE(0|this._d,12),A.writeInt32BE(0|this._e,16),A},ne.exports=h},25044:(ne,r,d)=>{var l=d(83894),_=d(15014),E=d(86692),S=d(73502).Buffer,a=new Array(64);function h(){this.init(),this._w=a,E.call(this,64,56)}l(h,_),h.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},h.prototype._hash=function(){var g=S.allocUnsafe(28);return g.writeInt32BE(this._a,0),g.writeInt32BE(this._b,4),g.writeInt32BE(this._c,8),g.writeInt32BE(this._d,12),g.writeInt32BE(this._e,16),g.writeInt32BE(this._f,20),g.writeInt32BE(this._g,24),g},ne.exports=h},15014:(ne,r,d)=>{var l=d(83894),_=d(86692),E=d(73502).Buffer,S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function h(){this.init(),this._w=a,_.call(this,64,56)}function g(C,T,N){return N^C&(T^N)}function y(C,T,N){return C&T|N&(C|T)}function v(C){return(C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10)}function b(C){return(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7)}function A(C){return(C>>>7|C<<25)^(C>>>18|C<<14)^C>>>3}function O(C){return(C>>>17|C<<15)^(C>>>19|C<<13)^C>>>10}l(h,_),h.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},h.prototype._update=function(C){for(var T=this._w,N=0|this._a,M=0|this._b,P=0|this._c,R=0|this._d,L=0|this._e,H=0|this._f,V=0|this._g,J=0|this._h,Y=0;Y<16;++Y)T[Y]=C.readInt32BE(4*Y);for(;Y<64;++Y)T[Y]=O(T[Y-2])+T[Y-7]+A(T[Y-15])+T[Y-16]|0;for(var Z=0;Z<64;++Z){var W=J+b(L)+g(L,H,V)+S[Z]+T[Z]|0,Q=v(N)+y(N,M,P)|0;J=V,V=H,H=L,L=R+W|0,R=P,P=M,M=N,N=W+Q|0}this._a=N+this._a|0,this._b=M+this._b|0,this._c=P+this._c|0,this._d=R+this._d|0,this._e=L+this._e|0,this._f=H+this._f|0,this._g=V+this._g|0,this._h=J+this._h|0},h.prototype._hash=function(){var C=E.allocUnsafe(32);return C.writeInt32BE(this._a,0),C.writeInt32BE(this._b,4),C.writeInt32BE(this._c,8),C.writeInt32BE(this._d,12),C.writeInt32BE(this._e,16),C.writeInt32BE(this._f,20),C.writeInt32BE(this._g,24),C.writeInt32BE(this._h,28),C},ne.exports=h},76540:(ne,r,d)=>{var l=d(83894),_=d(10117),E=d(86692),S=d(73502).Buffer,a=new Array(160);function h(){this.init(),this._w=a,E.call(this,128,112)}l(h,_),h.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},h.prototype._hash=function(){var g=S.allocUnsafe(48);function y(v,b,A){g.writeInt32BE(v,A),g.writeInt32BE(b,A+4)}return y(this._ah,this._al,0),y(this._bh,this._bl,8),y(this._ch,this._cl,16),y(this._dh,this._dl,24),y(this._eh,this._el,32),y(this._fh,this._fl,40),g},ne.exports=h},10117:(ne,r,d)=>{var l=d(83894),_=d(86692),E=d(73502).Buffer,S=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function h(){this.init(),this._w=a,_.call(this,128,112)}function g(M,P,R){return R^M&(P^R)}function y(M,P,R){return M&P|R&(M|P)}function v(M,P){return(M>>>28|P<<4)^(P>>>2|M<<30)^(P>>>7|M<<25)}function b(M,P){return(M>>>14|P<<18)^(M>>>18|P<<14)^(P>>>9|M<<23)}function A(M,P){return(M>>>1|P<<31)^(M>>>8|P<<24)^M>>>7}function O(M,P){return(M>>>1|P<<31)^(M>>>8|P<<24)^(M>>>7|P<<25)}function C(M,P){return(M>>>19|P<<13)^(P>>>29|M<<3)^M>>>6}function T(M,P){return(M>>>19|P<<13)^(P>>>29|M<<3)^(M>>>6|P<<26)}function N(M,P){return M>>>0

>>0?1:0}l(h,_),h.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},h.prototype._update=function(M){for(var P=this._w,R=0|this._ah,L=0|this._bh,H=0|this._ch,V=0|this._dh,J=0|this._eh,Y=0|this._fh,Z=0|this._gh,W=0|this._hh,Q=0|this._al,D=0|this._bl,o=0|this._cl,u=0|this._dl,m=0|this._el,w=0|this._fl,x=0|this._gl,F=0|this._hl,G=0;G<32;G+=2)P[G]=M.readInt32BE(4*G),P[G+1]=M.readInt32BE(4*G+4);for(;G<160;G+=2){var k=P[G-30],p=P[G-30+1],B=A(k,p),ie=O(p,k),te=C(k=P[G-4],p=P[G-4+1]),ee=T(p,k),ue=P[G-14],we=P[G-14+1],me=P[G-32],ve=P[G-32+1],ce=ie+we|0,he=B+ue+N(ce,ie)|0;he=(he=he+te+N(ce=ce+ee|0,ee)|0)+me+N(ce=ce+ve|0,ve)|0,P[G]=he,P[G+1]=ce}for(var le=0;le<160;le+=2){he=P[le],ce=P[le+1];var de=y(R,L,H),ae=y(Q,D,o),ye=v(R,Q),Ce=v(Q,R),Pe=b(J,m),Ge=b(m,J),Ve=S[le],Ue=S[le+1],_t=g(J,Y,Z),Ze=g(m,w,x),$e=F+Ge|0,Pt=W+Pe+N($e,F)|0;Pt=(Pt=(Pt=Pt+_t+N($e=$e+Ze|0,Ze)|0)+Ve+N($e=$e+Ue|0,Ue)|0)+he+N($e=$e+ce|0,ce)|0;var nt=Ce+ae|0,rt=ye+de+N(nt,Ce)|0;W=Z,F=x,Z=Y,x=w,Y=J,w=m,J=V+Pt+N(m=u+$e|0,u)|0,V=H,u=o,H=L,o=D,L=R,D=Q,R=Pt+rt+N(Q=$e+nt|0,$e)|0}this._al=this._al+Q|0,this._bl=this._bl+D|0,this._cl=this._cl+o|0,this._dl=this._dl+u|0,this._el=this._el+m|0,this._fl=this._fl+w|0,this._gl=this._gl+x|0,this._hl=this._hl+F|0,this._ah=this._ah+R+N(this._al,Q)|0,this._bh=this._bh+L+N(this._bl,D)|0,this._ch=this._ch+H+N(this._cl,o)|0,this._dh=this._dh+V+N(this._dl,u)|0,this._eh=this._eh+J+N(this._el,m)|0,this._fh=this._fh+Y+N(this._fl,w)|0,this._gh=this._gh+Z+N(this._gl,x)|0,this._hh=this._hh+W+N(this._hl,F)|0},h.prototype._hash=function(){var M=E.allocUnsafe(64);function P(R,L,H){M.writeInt32BE(R,H),M.writeInt32BE(L,H+4)}return P(this._ah,this._al,0),P(this._bh,this._bl,8),P(this._ch,this._cl,16),P(this._dh,this._dl,24),P(this._eh,this._el,32),P(this._fh,this._fl,40),P(this._gh,this._gl,48),P(this._hh,this._hl,56),M},ne.exports=h},9562:(ne,r,d)=>{var l,_,E,a;l=d(25585),_=d(83018).utf8,E=d(83018).bin,(a=function(h,g){var y=l.wordsToBytes(function(h){h.constructor==String?h=_.stringToBytes(h):typeof Buffer<"u"&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||(h=h.toString());var g=l.bytesToWords(h),y=8*h.length,v=[],b=1732584193,A=-271733879,O=-1732584194,C=271733878,T=-1009589776;g[y>>5]|=128<<24-y%32,g[15+(y+64>>>9<<4)]=y;for(var N=0;N>>31}var Y=(b<<5|b>>>27)+T+(v[V]>>>0)+(V<20?1518500249+(A&O|~A&C):V<40?1859775393+(A^O^C):V<60?(A&O|A&C|O&C)-1894007588:(A^O^C)-899497514);T=C,C=O,O=A<<30|A>>>2,A=b,b=Y}b+=M,A+=P,O+=R,C+=L,T+=H}return[b,A,O,C,T]}(h));return g&&g.asBytes?y:g&&g.asString?E.bytesToString(y):l.bytesToHex(y)})._blocksize=16,a._digestsize=20,ne.exports=a},78951:ne=>{"use strict";ne.exports=(r,d)=>{if("string"!=typeof r||"string"!=typeof d)throw new TypeError("Expected the arguments to be of type `string`");if(""===d)return[r];const l=r.indexOf(d);return-1===l?[r]:[r.slice(0,l),r.slice(l+d.length)]}},295:(ne,r,d)=>{ne.exports=E;var l=d(59069).EventEmitter;function E(){l.call(this)}d(83894)(E,l),E.Readable=d(3154),E.Writable=d(20520),E.Duplex=d(41339),E.Transform=d(6025),E.PassThrough=d(56071),E.finished=d(67542),E.pipeline=d(90954),E.Stream=E,E.prototype.pipe=function(S,a){var h=this;function g(T){S.writable&&!1===S.write(T)&&h.pause&&h.pause()}function y(){h.readable&&h.resume&&h.resume()}h.on("data",g),S.on("drain",y),!S._isStdio&&(!a||!1!==a.end)&&(h.on("end",b),h.on("close",A));var v=!1;function b(){v||(v=!0,S.end())}function A(){v||(v=!0,"function"==typeof S.destroy&&S.destroy())}function O(T){if(C(),0===l.listenerCount(this,"error"))throw T}function C(){h.removeListener("data",g),S.removeListener("drain",y),h.removeListener("end",b),h.removeListener("close",A),h.removeListener("error",O),S.removeListener("error",O),h.removeListener("end",C),h.removeListener("close",C),S.removeListener("close",C)}return h.on("error",O),S.on("error",O),h.on("end",C),h.on("close",C),S.on("close",C),S.emit("pipe",h),S}},74216:(ne,r,d)=>{var l=d(3724),_=d(62359),E=d(78629),S=d(94525),a=d(68762),h=r;h.request=function(g,y){g="string"==typeof g?a.parse(g):E(g);var v=-1===global.location.protocol.search(/^https?:$/)?"http:":"",b=g.protocol||v,A=g.hostname||g.host,O=g.port,C=g.path||"/";A&&-1!==A.indexOf(":")&&(A="["+A+"]"),g.url=(A?b+"//"+A:"")+(O?":"+O:"")+C,g.method=(g.method||"GET").toUpperCase(),g.headers=g.headers||{};var T=new l(g);return y&&T.on("response",y),T},h.get=function(y,v){var b=h.request(y,v);return b.end(),b},h.ClientRequest=l,h.IncomingMessage=_.IncomingMessage,h.Agent=function(){},h.Agent.defaultMaxSockets=4,h.globalAgent=new h.Agent,h.STATUS_CODES=S,h.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},57976:(ne,r)=>{var d;function l(){if(void 0!==d)return d;if(global.XMLHttpRequest){d=new global.XMLHttpRequest;try{d.open("GET",global.XDomainRequest?"/":"https://example.com")}catch{d=null}}else d=null;return d}function _(S){var a=l();if(!a)return!1;try{return a.responseType=S,a.responseType===S}catch{}return!1}function E(S){return"function"==typeof S}r.fetch=E(global.fetch)&&E(global.ReadableStream),r.writableStream=E(global.WritableStream),r.abortController=E(global.AbortController),r.arraybuffer=r.fetch||_("arraybuffer"),r.msstream=!r.fetch&&_("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&_("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!l()&&E(l().overrideMimeType),d=null},3724:(ne,r,d)=>{var l=d(57976),_=d(83894),E=d(62359),S=d(65685),a=E.IncomingMessage,h=E.readyStates;var y=ne.exports=function(A){var O=this;S.Writable.call(O),O._opts=A,O._body=[],O._headers={},A.auth&&O.setHeader("Authorization","Basic "+Buffer.from(A.auth).toString("base64")),Object.keys(A.headers).forEach(function(N){O.setHeader(N,A.headers[N])});var C,T=!0;if("disable-fetch"===A.mode||"requestTimeout"in A&&!l.abortController)T=!1,C=!0;else if("prefer-streaming"===A.mode)C=!1;else if("allow-wrong-content-type"===A.mode)C=!l.overrideMimeType;else{if(A.mode&&"default"!==A.mode&&"prefer-fast"!==A.mode)throw new Error("Invalid value for opts.mode");C=!0}O._mode=function g(A,O){return l.fetch&&O?"fetch":l.mozchunkedarraybuffer?"moz-chunked-arraybuffer":l.msstream?"ms-stream":l.arraybuffer&&A?"arraybuffer":"text"}(C,T),O._fetchTimer=null,O._socketTimeout=null,O._socketTimer=null,O.on("finish",function(){O._onFinish()})};_(y,S.Writable),y.prototype.setHeader=function(A,O){var T=A.toLowerCase();-1===b.indexOf(T)&&(this._headers[T]={name:A,value:O})},y.prototype.getHeader=function(A){var O=this._headers[A.toLowerCase()];return O?O.value:null},y.prototype.removeHeader=function(A){delete this._headers[A.toLowerCase()]},y.prototype._onFinish=function(){var A=this;if(!A._destroyed){var O=A._opts;"timeout"in O&&0!==O.timeout&&A.setTimeout(O.timeout);var C=A._headers,T=null;"GET"!==O.method&&"HEAD"!==O.method&&(T=new Blob(A._body,{type:(C["content-type"]||{}).value||""}));var N=[];if(Object.keys(C).forEach(function(L){var H=C[L].name,V=C[L].value;Array.isArray(V)?V.forEach(function(J){N.push([H,J])}):N.push([H,V])}),"fetch"===A._mode){var M=null;if(l.abortController){var P=new AbortController;M=P.signal,A._fetchAbortController=P,"requestTimeout"in O&&0!==O.requestTimeout&&(A._fetchTimer=global.setTimeout(function(){A.emit("requestTimeout"),A._fetchAbortController&&A._fetchAbortController.abort()},O.requestTimeout))}global.fetch(A._opts.url,{method:A._opts.method,headers:N,body:T||void 0,mode:"cors",credentials:O.withCredentials?"include":"same-origin",signal:M}).then(function(L){A._fetchResponse=L,A._resetTimers(!1),A._connect()},function(L){A._resetTimers(!0),A._destroyed||A.emit("error",L)})}else{var R=A._xhr=new global.XMLHttpRequest;try{R.open(A._opts.method,A._opts.url,!0)}catch(L){return void process.nextTick(function(){A.emit("error",L)})}"responseType"in R&&(R.responseType=A._mode),"withCredentials"in R&&(R.withCredentials=!!O.withCredentials),"text"===A._mode&&"overrideMimeType"in R&&R.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in O&&(R.timeout=O.requestTimeout,R.ontimeout=function(){A.emit("requestTimeout")}),N.forEach(function(L){R.setRequestHeader(L[0],L[1])}),A._response=null,R.onreadystatechange=function(){switch(R.readyState){case h.LOADING:case h.DONE:A._onXHRProgress()}},"moz-chunked-arraybuffer"===A._mode&&(R.onprogress=function(){A._onXHRProgress()}),R.onerror=function(){A._destroyed||(A._resetTimers(!0),A.emit("error",new Error("XHR error")))};try{R.send(T)}catch(L){return void process.nextTick(function(){A.emit("error",L)})}}}},y.prototype._onXHRProgress=function(){var A=this;A._resetTimers(!1),function v(A){try{var O=A.status;return null!==O&&0!==O}catch{return!1}}(A._xhr)&&!A._destroyed&&(A._response||A._connect(),A._response._onXHRProgress(A._resetTimers.bind(A)))},y.prototype._connect=function(){var A=this;A._destroyed||(A._response=new a(A._xhr,A._fetchResponse,A._mode,A._resetTimers.bind(A)),A._response.on("error",function(O){A.emit("error",O)}),A.emit("response",A._response))},y.prototype._write=function(A,O,C){this._body.push(A),C()},y.prototype._resetTimers=function(A){var O=this;global.clearTimeout(O._socketTimer),O._socketTimer=null,A?(global.clearTimeout(O._fetchTimer),O._fetchTimer=null):O._socketTimeout&&(O._socketTimer=global.setTimeout(function(){O.emit("timeout")},O._socketTimeout))},y.prototype.abort=y.prototype.destroy=function(A){var O=this;O._destroyed=!0,O._resetTimers(!0),O._response&&(O._response._destroyed=!0),O._xhr?O._xhr.abort():O._fetchAbortController&&O._fetchAbortController.abort(),A&&O.emit("error",A)},y.prototype.end=function(A,O,C){"function"==typeof A&&(C=A,A=void 0),S.Writable.prototype.end.call(this,A,O,C)},y.prototype.setTimeout=function(A,O){var C=this;O&&C.once("timeout",O),C._socketTimeout=A,C._resetTimers(!1)},y.prototype.flushHeaders=function(){},y.prototype.setNoDelay=function(){},y.prototype.setSocketKeepAlive=function(){};var b=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},62359:(ne,r,d)=>{var l=d(57976),_=d(83894),E=d(65685),S=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},a=r.IncomingMessage=function(h,g,y,v){var b=this;if(E.Readable.call(b),b._mode=y,b.headers={},b.rawHeaders=[],b.trailers={},b.rawTrailers=[],b.on("end",function(){process.nextTick(function(){b.emit("close")})}),"fetch"===y){let P=function(){O.read().then(function(R){if(!b._destroyed){if(v(R.done),R.done)return void b.push(null);b.push(Buffer.from(R.value)),P()}}).catch(function(R){v(!0),b._destroyed||b.emit("error",R)})};if(b._fetchResponse=g,b.url=g.url,b.statusCode=g.status,b.statusMessage=g.statusText,g.headers.forEach(function(R,L){b.headers[L.toLowerCase()]=R,b.rawHeaders.push(L,R)}),l.writableStream){var A=new WritableStream({write:function(R){return v(!1),new Promise(function(L,H){b._destroyed?H():b.push(Buffer.from(R))?L():b._resumeFetch=L})},close:function(){v(!0),b._destroyed||b.push(null)},abort:function(R){v(!0),b._destroyed||b.emit("error",R)}});try{return void g.body.pipeTo(A).catch(function(R){v(!0),b._destroyed||b.emit("error",R)})}catch{}}var O=g.body.getReader();P()}else{if(b._xhr=h,b._pos=0,b.url=h.responseURL,b.statusCode=h.status,b.statusMessage=h.statusText,h.getAllResponseHeaders().split(/\r?\n/).forEach(function(P){var R=P.match(/^([^:]+):\s*(.*)/);if(R){var L=R[1].toLowerCase();"set-cookie"===L?(void 0===b.headers[L]&&(b.headers[L]=[]),b.headers[L].push(R[2])):void 0!==b.headers[L]?b.headers[L]+=", "+R[2]:b.headers[L]=R[2],b.rawHeaders.push(R[1],R[2])}}),b._charset="x-user-defined",!l.overrideMimeType){var T=b.rawHeaders["mime-type"];if(T){var N=T.match(/;\s*charset=([^;])(;|$)/);N&&(b._charset=N[1].toLowerCase())}b._charset||(b._charset="utf-8")}}};_(a,E.Readable),a.prototype._read=function(){var g=this._resumeFetch;g&&(this._resumeFetch=null,g())},a.prototype._onXHRProgress=function(h){var g=this,y=g._xhr,v=null;switch(g._mode){case"text":if((v=y.responseText).length>g._pos){var b=v.substr(g._pos);if("x-user-defined"===g._charset){for(var A=Buffer.alloc(b.length),O=0;Og._pos&&(g.push(Buffer.from(new Uint8Array(C.result.slice(g._pos)))),g._pos=C.result.byteLength)},C.onload=function(){h(!0),g.push(null)},C.readAsArrayBuffer(v)}g._xhr.readyState===S.DONE&&"ms-stream"!==g._mode&&(h(!0),g.push(null))}},78629:ne=>{ne.exports=function d(){for(var l={},_=0;_{"use strict";ne.exports=r=>encodeURIComponent(r).replace(/[!'()*]/g,d=>`%${d.charCodeAt(0).toString(16).toUpperCase()}`)},77826:(ne,r)=>{var d=r.range=function(S){return null==S?{}:"string"==typeof d?{min:d,max:d+"\xff"}:S},_=(r.prefix=function(S,a,h){var g={};return h=h||"\xff",(S=r.range(S))instanceof RegExp||"function"==typeof S?(g.min=a,g.max=a+h,g.inner=function(y){var v=y.substring(a.length);return S.test?S.test(v):S(v)}):"object"==typeof S&&(g.min=a+(S.min||S.start||""),g.max=a+(S.max||S.end||h||"~"),g.reverse=!!S.reverse),g},r.checker=function(S){return S||(S={}),"string"==typeof S?function(a){return 0==a.indexOf(S)}:S instanceof RegExp?function(a){return S.test(a)}:"object"==typeof S?function(a){var h=S.min||S.start,g=S.max||S.end;return a=String(a),(!h||a>=h)&&(!g||a<=g)&&(!S.inner||(S.inner.test?S.inner.test(a):S.inner(a)))}:"function"==typeof S?S:void 0});r.satisfies=function(S,a){return _(a)(S)}},15453:(ne,r,d)=>{var l=d(93172).Buffer,_=l.isEncoding||function(y){switch(y&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var S=r.s=function(y){switch(this.encoding=(y||"utf8").toLowerCase().replace(/[-_]/,""),function E(y){if(y&&!_(y))throw new Error("Unknown encoding: "+y)}(y),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=h;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:return void(this.write=a)}this.charBuffer=new l(6),this.charReceived=0,this.charLength=0};function a(y){return y.toString(this.encoding)}function h(y){this.charReceived=y.length%2,this.charLength=this.charReceived?2:0}function g(y){this.charReceived=y.length%3,this.charLength=this.charReceived?3:0}S.prototype.write=function(y){for(var v="";this.charLength;){var b=y.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:y.length;if(y.copy(this.charBuffer,this.charReceived,0,b),this.charReceived+=b,this.charReceived=55296&&O<=56319)){if(this.charReceived=this.charLength=0,0===y.length)return v;break}this.charLength+=this.surrogateSize,v=""}this.detectIncompleteChar(y);var A=y.length;this.charLength&&(y.copy(this.charBuffer,0,y.length-this.charReceived,A),A-=this.charReceived);var O;A=(v+=y.toString(this.encoding,0,A)).length-1;if((O=v.charCodeAt(A))>=55296&&O<=56319){var C=this.surrogateSize;return this.charLength+=C,this.charReceived+=C,this.charBuffer.copy(this.charBuffer,C,0,C),y.copy(this.charBuffer,0,0,C),v.substring(0,A)}return v},S.prototype.detectIncompleteChar=function(y){for(var v=y.length>=3?3:y.length;v>0;v--){var b=y[y.length-v];if(1==v&&b>>5==6){this.charLength=2;break}if(v<=2&&b>>4==14){this.charLength=3;break}if(v<=3&&b>>3==30){this.charLength=4;break}}this.charReceived=v},S.prototype.end=function(y){var v="";if(y&&y.length&&(v=this.write(y)),this.charReceived){var b=this.charReceived,A=this.charBuffer,O=this.encoding;v+=A.slice(0,b).toString(O)}return v}},43675:ne=>{ne.exports=function(){var r=document.getSelection();if(!r.rangeCount)return function(){};for(var d=document.activeElement,l=[],_=0;_{"use strict";ne.exports=function r(d){return d.split(" ").map(function(l){return l.slice(0,1).toUpperCase()+l.slice(1)}).join("").replace(/[^ _0-9a-z]/gi,"")}},47768:function(ne){!function(r,d){"use strict";ne.exports?ne.exports=d():(r.nacl||(r.nacl={}),r.nacl.util=d())}(this,function(){"use strict";var r={};function d(l){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(l))throw new TypeError("invalid encoding")}return r.decodeUTF8=function(l){if("string"!=typeof l)throw new TypeError("expected string");var _,E=unescape(encodeURIComponent(l)),S=new Uint8Array(E.length);for(_=0;_"u"?typeof Buffer.from<"u"?(r.encodeBase64=function(l){return Buffer.from(l).toString("base64")},r.decodeBase64=function(l){return d(l),new Uint8Array(Array.prototype.slice.call(Buffer.from(l,"base64"),0))}):(r.encodeBase64=function(l){return new Buffer(l).toString("base64")},r.decodeBase64=function(l){return d(l),new Uint8Array(Array.prototype.slice.call(new Buffer(l,"base64"),0))}):(r.encodeBase64=function(l){var _,E=[],S=l.length;for(_=0;_{!function(l){"use strict";var _=function(Ie){var Se,De=new Float64Array(16);if(Ie)for(Se=0;Se>24&255,Ie[Se+1]=De>>16&255,Ie[Se+2]=De>>8&255,Ie[Se+3]=255&De,Ie[Se+4]=Ee>>24&255,Ie[Se+5]=Ee>>16&255,Ie[Se+6]=Ee>>8&255,Ie[Se+7]=255&Ee}function N(Ie,Se,De,Ee,Ne){var ze,ot=0;for(ze=0;ze>>8)-1}function M(Ie,Se,De,Ee){return N(Ie,Se,De,Ee,16)}function P(Ie,Se,De,Ee){return N(Ie,Se,De,Ee,32)}function H(Ie,Se,De,Ee){!function R(Ie,Se,De,Ee){for(var st,Ne=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,ze=255&De[0]|(255&De[1])<<8|(255&De[2])<<16|(255&De[3])<<24,ot=255&De[4]|(255&De[5])<<8|(255&De[6])<<16|(255&De[7])<<24,Qe=255&De[8]|(255&De[9])<<8|(255&De[10])<<16|(255&De[11])<<24,qe=255&De[12]|(255&De[13])<<8|(255&De[14])<<16|(255&De[15])<<24,Ft=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,xt=255&Se[0]|(255&Se[1])<<8|(255&Se[2])<<16|(255&Se[3])<<24,Yt=255&Se[4]|(255&Se[5])<<8|(255&Se[6])<<16|(255&Se[7])<<24,Ut=255&Se[8]|(255&Se[9])<<8|(255&Se[10])<<16|(255&Se[11])<<24,Qt=255&Se[12]|(255&Se[13])<<8|(255&Se[14])<<16|(255&Se[15])<<24,Kt=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,sn=255&De[16]|(255&De[17])<<8|(255&De[18])<<16|(255&De[19])<<24,qt=255&De[20]|(255&De[21])<<8|(255&De[22])<<16|(255&De[23])<<24,pn=255&De[24]|(255&De[25])<<8|(255&De[26])<<16|(255&De[27])<<24,ln=255&De[28]|(255&De[29])<<8|(255&De[30])<<16|(255&De[31])<<24,Xt=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,jt=Ne,on=ze,Wt=ot,Ht=Qe,un=qe,Gt=Ft,Et=xt,bt=Yt,Zt=Ut,kt=Qt,Bt=Kt,tn=sn,Cn=qt,Un=pn,Bn=ln,Vn=Xt,Jn=0;Jn<20;Jn+=2)jt^=(st=(Cn^=(st=(Zt^=(st=(un^=(st=jt+Cn|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+un|0)<<13|st>>>19)+Zt|0)<<18|st>>>14,Gt^=(st=(on^=(st=(Un^=(st=(kt^=(st=Gt+on|0)<<7|st>>>25)+Gt|0)<<9|st>>>23)+kt|0)<<13|st>>>19)+Un|0)<<18|st>>>14,Bt^=(st=(Et^=(st=(Wt^=(st=(Bn^=(st=Bt+Et|0)<<7|st>>>25)+Bt|0)<<9|st>>>23)+Bn|0)<<13|st>>>19)+Wt|0)<<18|st>>>14,Vn^=(st=(tn^=(st=(bt^=(st=(Ht^=(st=Vn+tn|0)<<7|st>>>25)+Vn|0)<<9|st>>>23)+Ht|0)<<13|st>>>19)+bt|0)<<18|st>>>14,jt^=(st=(Ht^=(st=(Wt^=(st=(on^=(st=jt+Ht|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+on|0)<<13|st>>>19)+Wt|0)<<18|st>>>14,Gt^=(st=(un^=(st=(bt^=(st=(Et^=(st=Gt+un|0)<<7|st>>>25)+Gt|0)<<9|st>>>23)+Et|0)<<13|st>>>19)+bt|0)<<18|st>>>14,Bt^=(st=(kt^=(st=(Zt^=(st=(tn^=(st=Bt+kt|0)<<7|st>>>25)+Bt|0)<<9|st>>>23)+tn|0)<<13|st>>>19)+Zt|0)<<18|st>>>14,Vn^=(st=(Bn^=(st=(Un^=(st=(Cn^=(st=Vn+Bn|0)<<7|st>>>25)+Vn|0)<<9|st>>>23)+Cn|0)<<13|st>>>19)+Un|0)<<18|st>>>14;jt=jt+Ne|0,on=on+ze|0,Wt=Wt+ot|0,Ht=Ht+Qe|0,un=un+qe|0,Gt=Gt+Ft|0,Et=Et+xt|0,bt=bt+Yt|0,Zt=Zt+Ut|0,kt=kt+Qt|0,Bt=Bt+Kt|0,tn=tn+sn|0,Cn=Cn+qt|0,Un=Un+pn|0,Bn=Bn+ln|0,Vn=Vn+Xt|0,Ie[0]=jt>>>0&255,Ie[1]=jt>>>8&255,Ie[2]=jt>>>16&255,Ie[3]=jt>>>24&255,Ie[4]=on>>>0&255,Ie[5]=on>>>8&255,Ie[6]=on>>>16&255,Ie[7]=on>>>24&255,Ie[8]=Wt>>>0&255,Ie[9]=Wt>>>8&255,Ie[10]=Wt>>>16&255,Ie[11]=Wt>>>24&255,Ie[12]=Ht>>>0&255,Ie[13]=Ht>>>8&255,Ie[14]=Ht>>>16&255,Ie[15]=Ht>>>24&255,Ie[16]=un>>>0&255,Ie[17]=un>>>8&255,Ie[18]=un>>>16&255,Ie[19]=un>>>24&255,Ie[20]=Gt>>>0&255,Ie[21]=Gt>>>8&255,Ie[22]=Gt>>>16&255,Ie[23]=Gt>>>24&255,Ie[24]=Et>>>0&255,Ie[25]=Et>>>8&255,Ie[26]=Et>>>16&255,Ie[27]=Et>>>24&255,Ie[28]=bt>>>0&255,Ie[29]=bt>>>8&255,Ie[30]=bt>>>16&255,Ie[31]=bt>>>24&255,Ie[32]=Zt>>>0&255,Ie[33]=Zt>>>8&255,Ie[34]=Zt>>>16&255,Ie[35]=Zt>>>24&255,Ie[36]=kt>>>0&255,Ie[37]=kt>>>8&255,Ie[38]=kt>>>16&255,Ie[39]=kt>>>24&255,Ie[40]=Bt>>>0&255,Ie[41]=Bt>>>8&255,Ie[42]=Bt>>>16&255,Ie[43]=Bt>>>24&255,Ie[44]=tn>>>0&255,Ie[45]=tn>>>8&255,Ie[46]=tn>>>16&255,Ie[47]=tn>>>24&255,Ie[48]=Cn>>>0&255,Ie[49]=Cn>>>8&255,Ie[50]=Cn>>>16&255,Ie[51]=Cn>>>24&255,Ie[52]=Un>>>0&255,Ie[53]=Un>>>8&255,Ie[54]=Un>>>16&255,Ie[55]=Un>>>24&255,Ie[56]=Bn>>>0&255,Ie[57]=Bn>>>8&255,Ie[58]=Bn>>>16&255,Ie[59]=Bn>>>24&255,Ie[60]=Vn>>>0&255,Ie[61]=Vn>>>8&255,Ie[62]=Vn>>>16&255,Ie[63]=Vn>>>24&255}(Ie,Se,De,Ee)}function V(Ie,Se,De,Ee){!function L(Ie,Se,De,Ee){for(var st,jt=255&Ee[0]|(255&Ee[1])<<8|(255&Ee[2])<<16|(255&Ee[3])<<24,on=255&De[0]|(255&De[1])<<8|(255&De[2])<<16|(255&De[3])<<24,Wt=255&De[4]|(255&De[5])<<8|(255&De[6])<<16|(255&De[7])<<24,Ht=255&De[8]|(255&De[9])<<8|(255&De[10])<<16|(255&De[11])<<24,un=255&De[12]|(255&De[13])<<8|(255&De[14])<<16|(255&De[15])<<24,Gt=255&Ee[4]|(255&Ee[5])<<8|(255&Ee[6])<<16|(255&Ee[7])<<24,Et=255&Se[0]|(255&Se[1])<<8|(255&Se[2])<<16|(255&Se[3])<<24,bt=255&Se[4]|(255&Se[5])<<8|(255&Se[6])<<16|(255&Se[7])<<24,Zt=255&Se[8]|(255&Se[9])<<8|(255&Se[10])<<16|(255&Se[11])<<24,kt=255&Se[12]|(255&Se[13])<<8|(255&Se[14])<<16|(255&Se[15])<<24,Bt=255&Ee[8]|(255&Ee[9])<<8|(255&Ee[10])<<16|(255&Ee[11])<<24,tn=255&De[16]|(255&De[17])<<8|(255&De[18])<<16|(255&De[19])<<24,Cn=255&De[20]|(255&De[21])<<8|(255&De[22])<<16|(255&De[23])<<24,Un=255&De[24]|(255&De[25])<<8|(255&De[26])<<16|(255&De[27])<<24,Bn=255&De[28]|(255&De[29])<<8|(255&De[30])<<16|(255&De[31])<<24,Vn=255&Ee[12]|(255&Ee[13])<<8|(255&Ee[14])<<16|(255&Ee[15])<<24,Jn=0;Jn<20;Jn+=2)jt^=(st=(Cn^=(st=(Zt^=(st=(un^=(st=jt+Cn|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+un|0)<<13|st>>>19)+Zt|0)<<18|st>>>14,Gt^=(st=(on^=(st=(Un^=(st=(kt^=(st=Gt+on|0)<<7|st>>>25)+Gt|0)<<9|st>>>23)+kt|0)<<13|st>>>19)+Un|0)<<18|st>>>14,Bt^=(st=(Et^=(st=(Wt^=(st=(Bn^=(st=Bt+Et|0)<<7|st>>>25)+Bt|0)<<9|st>>>23)+Bn|0)<<13|st>>>19)+Wt|0)<<18|st>>>14,Vn^=(st=(tn^=(st=(bt^=(st=(Ht^=(st=Vn+tn|0)<<7|st>>>25)+Vn|0)<<9|st>>>23)+Ht|0)<<13|st>>>19)+bt|0)<<18|st>>>14,jt^=(st=(Ht^=(st=(Wt^=(st=(on^=(st=jt+Ht|0)<<7|st>>>25)+jt|0)<<9|st>>>23)+on|0)<<13|st>>>19)+Wt|0)<<18|st>>>14,Gt^=(st=(un^=(st=(bt^=(st=(Et^=(st=Gt+un|0)<<7|st>>>25)+Gt|0)<<9|st>>>23)+Et|0)<<13|st>>>19)+bt|0)<<18|st>>>14,Bt^=(st=(kt^=(st=(Zt^=(st=(tn^=(st=Bt+kt|0)<<7|st>>>25)+Bt|0)<<9|st>>>23)+tn|0)<<13|st>>>19)+Zt|0)<<18|st>>>14,Vn^=(st=(Bn^=(st=(Un^=(st=(Cn^=(st=Vn+Bn|0)<<7|st>>>25)+Vn|0)<<9|st>>>23)+Cn|0)<<13|st>>>19)+Un|0)<<18|st>>>14;Ie[0]=jt>>>0&255,Ie[1]=jt>>>8&255,Ie[2]=jt>>>16&255,Ie[3]=jt>>>24&255,Ie[4]=Gt>>>0&255,Ie[5]=Gt>>>8&255,Ie[6]=Gt>>>16&255,Ie[7]=Gt>>>24&255,Ie[8]=Bt>>>0&255,Ie[9]=Bt>>>8&255,Ie[10]=Bt>>>16&255,Ie[11]=Bt>>>24&255,Ie[12]=Vn>>>0&255,Ie[13]=Vn>>>8&255,Ie[14]=Vn>>>16&255,Ie[15]=Vn>>>24&255,Ie[16]=Et>>>0&255,Ie[17]=Et>>>8&255,Ie[18]=Et>>>16&255,Ie[19]=Et>>>24&255,Ie[20]=bt>>>0&255,Ie[21]=bt>>>8&255,Ie[22]=bt>>>16&255,Ie[23]=bt>>>24&255,Ie[24]=Zt>>>0&255,Ie[25]=Zt>>>8&255,Ie[26]=Zt>>>16&255,Ie[27]=Zt>>>24&255,Ie[28]=kt>>>0&255,Ie[29]=kt>>>8&255,Ie[30]=kt>>>16&255,Ie[31]=kt>>>24&255}(Ie,Se,De,Ee)}var J=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Y(Ie,Se,De,Ee,Ne,ze,ot){var Ft,xt,Qe=new Uint8Array(16),qe=new Uint8Array(64);for(xt=0;xt<16;xt++)Qe[xt]=0;for(xt=0;xt<8;xt++)Qe[xt]=ze[xt];for(;Ne>=64;){for(H(qe,Qe,ot,J),xt=0;xt<64;xt++)Ie[Se+xt]=De[Ee+xt]^qe[xt];for(Ft=1,xt=8;xt<16;xt++)Ft=Ft+(255&Qe[xt])|0,Qe[xt]=255&Ft,Ft>>>=8;Ne-=64,Se+=64,Ee+=64}if(Ne>0)for(H(qe,Qe,ot,J),xt=0;xt=64;){for(H(ot,ze,Ne,J),qe=0;qe<64;qe++)Ie[Se+qe]=ot[qe];for(Qe=1,qe=8;qe<16;qe++)Qe=Qe+(255&ze[qe])|0,ze[qe]=255&Qe,Qe>>>=8;De-=64,Se+=64}if(De>0)for(H(ot,ze,Ne,J),qe=0;qe>>13|De<<3),Ee=255&Ie[4]|(255&Ie[5])<<8,this.r[2]=7939&(De>>>10|Ee<<6),Ne=255&Ie[6]|(255&Ie[7])<<8,this.r[3]=8191&(Ee>>>7|Ne<<9),ze=255&Ie[8]|(255&Ie[9])<<8,this.r[4]=255&(Ne>>>4|ze<<12),this.r[5]=ze>>>1&8190,ot=255&Ie[10]|(255&Ie[11])<<8,this.r[6]=8191&(ze>>>14|ot<<2),Qe=255&Ie[12]|(255&Ie[13])<<8,this.r[7]=8065&(ot>>>11|Qe<<5),qe=255&Ie[14]|(255&Ie[15])<<8,this.r[8]=8191&(Qe>>>8|qe<<8),this.r[9]=qe>>>5&127,this.pad[0]=255&Ie[16]|(255&Ie[17])<<8,this.pad[1]=255&Ie[18]|(255&Ie[19])<<8,this.pad[2]=255&Ie[20]|(255&Ie[21])<<8,this.pad[3]=255&Ie[22]|(255&Ie[23])<<8,this.pad[4]=255&Ie[24]|(255&Ie[25])<<8,this.pad[5]=255&Ie[26]|(255&Ie[27])<<8,this.pad[6]=255&Ie[28]|(255&Ie[29])<<8,this.pad[7]=255&Ie[30]|(255&Ie[31])<<8};function o(Ie,Se,De,Ee,Ne,ze){var ot=new D(ze);return ot.update(De,Ee,Ne),ot.finish(Ie,Se),0}function u(Ie,Se,De,Ee,Ne,ze){var ot=new Uint8Array(16);return o(ot,0,De,Ee,Ne,ze),M(Ie,Se,ot,0)}function m(Ie,Se,De,Ee,Ne){var ze;if(De<32)return-1;for(Q(Ie,0,Se,0,De,Ee,Ne),o(Ie,16,Ie,32,De-32,Ie),ze=0;ze<16;ze++)Ie[ze]=0;return 0}function w(Ie,Se,De,Ee,Ne){var ze,ot=new Uint8Array(32);if(De<32||(W(ot,0,32,Ee,Ne),0!==u(Se,16,Se,32,De-32,ot)))return-1;for(Q(Ie,0,Se,0,De,Ee,Ne),ze=0;ze<32;ze++)Ie[ze]=0;return 0}function x(Ie,Se){var De;for(De=0;De<16;De++)Ie[De]=0|Se[De]}function F(Ie){var Se,De,Ee=1;for(Se=0;Se<16;Se++)De=Ie[Se]+Ee+65535,Ee=Math.floor(De/65536),Ie[Se]=De-65536*Ee;Ie[0]+=Ee-1+37*(Ee-1)}function G(Ie,Se,De){for(var Ee,Ne=~(De-1),ze=0;ze<16;ze++)Ee=Ne&(Ie[ze]^Se[ze]),Ie[ze]^=Ee,Se[ze]^=Ee}function k(Ie,Se){var De,Ee,Ne,ze=_(),ot=_();for(De=0;De<16;De++)ot[De]=Se[De];for(F(ot),F(ot),F(ot),Ee=0;Ee<2;Ee++){for(ze[0]=ot[0]-65517,De=1;De<15;De++)ze[De]=ot[De]-65535-(ze[De-1]>>16&1),ze[De-1]&=65535;ze[15]=ot[15]-32767-(ze[14]>>16&1),Ne=ze[15]>>16&1,ze[14]&=65535,G(ot,ze,1-Ne)}for(De=0;De<16;De++)Ie[2*De]=255&ot[De],Ie[2*De+1]=ot[De]>>8}function p(Ie,Se){var De=new Uint8Array(32),Ee=new Uint8Array(32);return k(De,Ie),k(Ee,Se),P(De,0,Ee,0)}function B(Ie){var Se=new Uint8Array(32);return k(Se,Ie),1&Se[0]}function ie(Ie,Se){var De;for(De=0;De<16;De++)Ie[De]=Se[2*De]+(Se[2*De+1]<<8);Ie[15]&=32767}function te(Ie,Se,De){for(var Ee=0;Ee<16;Ee++)Ie[Ee]=Se[Ee]+De[Ee]}function ee(Ie,Se,De){for(var Ee=0;Ee<16;Ee++)Ie[Ee]=Se[Ee]-De[Ee]}function ue(Ie,Se,De){var Ee,Ne,ze=0,ot=0,Qe=0,qe=0,Ft=0,xt=0,Yt=0,Ut=0,Qt=0,Kt=0,sn=0,qt=0,pn=0,ln=0,Xt=0,jt=0,on=0,Wt=0,Ht=0,un=0,Gt=0,Et=0,bt=0,Zt=0,kt=0,Bt=0,tn=0,Cn=0,Un=0,Bn=0,Vn=0,st=De[0],Jn=De[1],ur=De[2],Yn=De[3],Gn=De[4],$n=De[5],er=De[6],wr=De[7],dr=De[8],Rn=De[9],Cr=De[10],_r=De[11],jr=De[12],Wr=De[13],bi=De[14],Dr=De[15];ze+=(Ee=Se[0])*st,ot+=Ee*Jn,Qe+=Ee*ur,qe+=Ee*Yn,Ft+=Ee*Gn,xt+=Ee*$n,Yt+=Ee*er,Ut+=Ee*wr,Qt+=Ee*dr,Kt+=Ee*Rn,sn+=Ee*Cr,qt+=Ee*_r,pn+=Ee*jr,ln+=Ee*Wr,Xt+=Ee*bi,jt+=Ee*Dr,ot+=(Ee=Se[1])*st,Qe+=Ee*Jn,qe+=Ee*ur,Ft+=Ee*Yn,xt+=Ee*Gn,Yt+=Ee*$n,Ut+=Ee*er,Qt+=Ee*wr,Kt+=Ee*dr,sn+=Ee*Rn,qt+=Ee*Cr,pn+=Ee*_r,ln+=Ee*jr,Xt+=Ee*Wr,jt+=Ee*bi,on+=Ee*Dr,Qe+=(Ee=Se[2])*st,qe+=Ee*Jn,Ft+=Ee*ur,xt+=Ee*Yn,Yt+=Ee*Gn,Ut+=Ee*$n,Qt+=Ee*er,Kt+=Ee*wr,sn+=Ee*dr,qt+=Ee*Rn,pn+=Ee*Cr,ln+=Ee*_r,Xt+=Ee*jr,jt+=Ee*Wr,on+=Ee*bi,Wt+=Ee*Dr,qe+=(Ee=Se[3])*st,Ft+=Ee*Jn,xt+=Ee*ur,Yt+=Ee*Yn,Ut+=Ee*Gn,Qt+=Ee*$n,Kt+=Ee*er,sn+=Ee*wr,qt+=Ee*dr,pn+=Ee*Rn,ln+=Ee*Cr,Xt+=Ee*_r,jt+=Ee*jr,on+=Ee*Wr,Wt+=Ee*bi,Ht+=Ee*Dr,Ft+=(Ee=Se[4])*st,xt+=Ee*Jn,Yt+=Ee*ur,Ut+=Ee*Yn,Qt+=Ee*Gn,Kt+=Ee*$n,sn+=Ee*er,qt+=Ee*wr,pn+=Ee*dr,ln+=Ee*Rn,Xt+=Ee*Cr,jt+=Ee*_r,on+=Ee*jr,Wt+=Ee*Wr,Ht+=Ee*bi,un+=Ee*Dr,xt+=(Ee=Se[5])*st,Yt+=Ee*Jn,Ut+=Ee*ur,Qt+=Ee*Yn,Kt+=Ee*Gn,sn+=Ee*$n,qt+=Ee*er,pn+=Ee*wr,ln+=Ee*dr,Xt+=Ee*Rn,jt+=Ee*Cr,on+=Ee*_r,Wt+=Ee*jr,Ht+=Ee*Wr,un+=Ee*bi,Gt+=Ee*Dr,Yt+=(Ee=Se[6])*st,Ut+=Ee*Jn,Qt+=Ee*ur,Kt+=Ee*Yn,sn+=Ee*Gn,qt+=Ee*$n,pn+=Ee*er,ln+=Ee*wr,Xt+=Ee*dr,jt+=Ee*Rn,on+=Ee*Cr,Wt+=Ee*_r,Ht+=Ee*jr,un+=Ee*Wr,Gt+=Ee*bi,Et+=Ee*Dr,Ut+=(Ee=Se[7])*st,Qt+=Ee*Jn,Kt+=Ee*ur,sn+=Ee*Yn,qt+=Ee*Gn,pn+=Ee*$n,ln+=Ee*er,Xt+=Ee*wr,jt+=Ee*dr,on+=Ee*Rn,Wt+=Ee*Cr,Ht+=Ee*_r,un+=Ee*jr,Gt+=Ee*Wr,Et+=Ee*bi,bt+=Ee*Dr,Qt+=(Ee=Se[8])*st,Kt+=Ee*Jn,sn+=Ee*ur,qt+=Ee*Yn,pn+=Ee*Gn,ln+=Ee*$n,Xt+=Ee*er,jt+=Ee*wr,on+=Ee*dr,Wt+=Ee*Rn,Ht+=Ee*Cr,un+=Ee*_r,Gt+=Ee*jr,Et+=Ee*Wr,bt+=Ee*bi,Zt+=Ee*Dr,Kt+=(Ee=Se[9])*st,sn+=Ee*Jn,qt+=Ee*ur,pn+=Ee*Yn,ln+=Ee*Gn,Xt+=Ee*$n,jt+=Ee*er,on+=Ee*wr,Wt+=Ee*dr,Ht+=Ee*Rn,un+=Ee*Cr,Gt+=Ee*_r,Et+=Ee*jr,bt+=Ee*Wr,Zt+=Ee*bi,kt+=Ee*Dr,sn+=(Ee=Se[10])*st,qt+=Ee*Jn,pn+=Ee*ur,ln+=Ee*Yn,Xt+=Ee*Gn,jt+=Ee*$n,on+=Ee*er,Wt+=Ee*wr,Ht+=Ee*dr,un+=Ee*Rn,Gt+=Ee*Cr,Et+=Ee*_r,bt+=Ee*jr,Zt+=Ee*Wr,kt+=Ee*bi,Bt+=Ee*Dr,qt+=(Ee=Se[11])*st,pn+=Ee*Jn,ln+=Ee*ur,Xt+=Ee*Yn,jt+=Ee*Gn,on+=Ee*$n,Wt+=Ee*er,Ht+=Ee*wr,un+=Ee*dr,Gt+=Ee*Rn,Et+=Ee*Cr,bt+=Ee*_r,Zt+=Ee*jr,kt+=Ee*Wr,Bt+=Ee*bi,tn+=Ee*Dr,pn+=(Ee=Se[12])*st,ln+=Ee*Jn,Xt+=Ee*ur,jt+=Ee*Yn,on+=Ee*Gn,Wt+=Ee*$n,Ht+=Ee*er,un+=Ee*wr,Gt+=Ee*dr,Et+=Ee*Rn,bt+=Ee*Cr,Zt+=Ee*_r,kt+=Ee*jr,Bt+=Ee*Wr,tn+=Ee*bi,Cn+=Ee*Dr,ln+=(Ee=Se[13])*st,Xt+=Ee*Jn,jt+=Ee*ur,on+=Ee*Yn,Wt+=Ee*Gn,Ht+=Ee*$n,un+=Ee*er,Gt+=Ee*wr,Et+=Ee*dr,bt+=Ee*Rn,Zt+=Ee*Cr,kt+=Ee*_r,Bt+=Ee*jr,tn+=Ee*Wr,Cn+=Ee*bi,Un+=Ee*Dr,Xt+=(Ee=Se[14])*st,jt+=Ee*Jn,on+=Ee*ur,Wt+=Ee*Yn,Ht+=Ee*Gn,un+=Ee*$n,Gt+=Ee*er,Et+=Ee*wr,bt+=Ee*dr,Zt+=Ee*Rn,kt+=Ee*Cr,Bt+=Ee*_r,tn+=Ee*jr,Cn+=Ee*Wr,Un+=Ee*bi,Bn+=Ee*Dr,jt+=(Ee=Se[15])*st,ot+=38*(Wt+=Ee*ur),Qe+=38*(Ht+=Ee*Yn),qe+=38*(un+=Ee*Gn),Ft+=38*(Gt+=Ee*$n),xt+=38*(Et+=Ee*er),Yt+=38*(bt+=Ee*wr),Ut+=38*(Zt+=Ee*dr),Qt+=38*(kt+=Ee*Rn),Kt+=38*(Bt+=Ee*Cr),sn+=38*(tn+=Ee*_r),qt+=38*(Cn+=Ee*jr),pn+=38*(Un+=Ee*Wr),ln+=38*(Bn+=Ee*bi),Xt+=38*(Vn+=Ee*Dr),ze=(Ee=(ze+=38*(on+=Ee*Jn))+(Ne=1)+65535)-65536*(Ne=Math.floor(Ee/65536)),ot=(Ee=ot+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Qe=(Ee=Qe+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),qe=(Ee=qe+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Ft=(Ee=Ft+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),xt=(Ee=xt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Yt=(Ee=Yt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Ut=(Ee=Ut+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Qt=(Ee=Qt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Kt=(Ee=Kt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),sn=(Ee=sn+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),qt=(Ee=qt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),pn=(Ee=pn+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),ln=(Ee=ln+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Xt=(Ee=Xt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),jt=(Ee=jt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),ze=(Ee=(ze+=Ne-1+37*(Ne-1))+(Ne=1)+65535)-65536*(Ne=Math.floor(Ee/65536)),ot=(Ee=ot+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Qe=(Ee=Qe+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),qe=(Ee=qe+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Ft=(Ee=Ft+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),xt=(Ee=xt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Yt=(Ee=Yt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Ut=(Ee=Ut+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Qt=(Ee=Qt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Kt=(Ee=Kt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),sn=(Ee=sn+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),qt=(Ee=qt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),pn=(Ee=pn+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),ln=(Ee=ln+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),Xt=(Ee=Xt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),jt=(Ee=jt+Ne+65535)-65536*(Ne=Math.floor(Ee/65536)),ze+=Ne-1+37*(Ne-1),Ie[0]=ze,Ie[1]=ot,Ie[2]=Qe,Ie[3]=qe,Ie[4]=Ft,Ie[5]=xt,Ie[6]=Yt,Ie[7]=Ut,Ie[8]=Qt,Ie[9]=Kt,Ie[10]=sn,Ie[11]=qt,Ie[12]=pn,Ie[13]=ln,Ie[14]=Xt,Ie[15]=jt}function we(Ie,Se){ue(Ie,Se,Se)}function me(Ie,Se){var Ee,De=_();for(Ee=0;Ee<16;Ee++)De[Ee]=Se[Ee];for(Ee=253;Ee>=0;Ee--)we(De,De),2!==Ee&&4!==Ee&&ue(De,De,Se);for(Ee=0;Ee<16;Ee++)Ie[Ee]=De[Ee]}function ve(Ie,Se){var Ee,De=_();for(Ee=0;Ee<16;Ee++)De[Ee]=Se[Ee];for(Ee=250;Ee>=0;Ee--)we(De,De),1!==Ee&&ue(De,De,Se);for(Ee=0;Ee<16;Ee++)Ie[Ee]=De[Ee]}function ce(Ie,Se,De){var ze,ot,Ee=new Uint8Array(32),Ne=new Float64Array(80),Qe=_(),qe=_(),Ft=_(),xt=_(),Yt=_(),Ut=_();for(ot=0;ot<31;ot++)Ee[ot]=Se[ot];for(Ee[31]=127&Se[31]|64,Ee[0]&=248,ie(Ne,De),ot=0;ot<16;ot++)qe[ot]=Ne[ot],xt[ot]=Qe[ot]=Ft[ot]=0;for(Qe[0]=xt[0]=1,ot=254;ot>=0;--ot)G(Qe,qe,ze=Ee[ot>>>3]>>>(7&ot)&1),G(Ft,xt,ze),te(Yt,Qe,Ft),ee(Qe,Qe,Ft),te(Ft,qe,xt),ee(qe,qe,xt),we(xt,Yt),we(Ut,Qe),ue(Qe,Ft,Qe),ue(Ft,qe,Yt),te(Yt,Qe,Ft),ee(Qe,Qe,Ft),we(qe,Qe),ee(Ft,xt,Ut),ue(Qe,Ft,y),te(Qe,Qe,xt),ue(Ft,Ft,Qe),ue(Qe,xt,Ut),ue(xt,qe,Ne),we(qe,Yt),G(Qe,qe,ze),G(Ft,xt,ze);for(ot=0;ot<16;ot++)Ne[ot+16]=Qe[ot],Ne[ot+32]=Ft[ot],Ne[ot+48]=qe[ot],Ne[ot+64]=xt[ot];var Qt=Ne.subarray(32),Kt=Ne.subarray(16);return me(Qt,Qt),ue(Kt,Kt,Qt),k(Ie,Kt),0}function he(Ie,Se){return ce(Ie,Se,a)}function le(Ie,Se){return E(Se,32),he(Ie,Se)}function de(Ie,Se,De){var Ee=new Uint8Array(32);return ce(Ee,De,Se),V(Ie,S,Ee,J)}D.prototype.blocks=function(Ie,Se,De){for(var Ne,ze,ot,Qe,qe,Ft,xt,Yt,Ut,Qt,Kt,sn,qt,pn,ln,Xt,jt,on,Wt,Ee=this.fin?0:2048,Ht=this.h[0],un=this.h[1],Gt=this.h[2],Et=this.h[3],bt=this.h[4],Zt=this.h[5],kt=this.h[6],Bt=this.h[7],tn=this.h[8],Cn=this.h[9],Un=this.r[0],Bn=this.r[1],Vn=this.r[2],st=this.r[3],Jn=this.r[4],ur=this.r[5],Yn=this.r[6],Gn=this.r[7],$n=this.r[8],er=this.r[9];De>=16;)Qt=Ut=0,Qt+=(Ht+=8191&(Ne=255&Ie[Se+0]|(255&Ie[Se+1])<<8))*Un,Qt+=(un+=8191&(Ne>>>13|(ze=255&Ie[Se+2]|(255&Ie[Se+3])<<8)<<3))*(5*er),Qt+=(Gt+=8191&(ze>>>10|(ot=255&Ie[Se+4]|(255&Ie[Se+5])<<8)<<6))*(5*$n),Qt+=(Et+=8191&(ot>>>7|(Qe=255&Ie[Se+6]|(255&Ie[Se+7])<<8)<<9))*(5*Gn),Ut=(Qt+=(bt+=8191&(Qe>>>4|(qe=255&Ie[Se+8]|(255&Ie[Se+9])<<8)<<12))*(5*Yn))>>>13,Qt&=8191,Qt+=(Zt+=qe>>>1&8191)*(5*ur),Qt+=(kt+=8191&(qe>>>14|(Ft=255&Ie[Se+10]|(255&Ie[Se+11])<<8)<<2))*(5*Jn),Qt+=(Bt+=8191&(Ft>>>11|(xt=255&Ie[Se+12]|(255&Ie[Se+13])<<8)<<5))*(5*st),Qt+=(tn+=8191&(xt>>>8|(Yt=255&Ie[Se+14]|(255&Ie[Se+15])<<8)<<8))*(5*Vn),Kt=Ut+=(Qt+=(Cn+=Yt>>>5|Ee)*(5*Bn))>>>13,Kt+=Ht*Bn,Kt+=un*Un,Kt+=Gt*(5*er),Kt+=Et*(5*$n),Ut=(Kt+=bt*(5*Gn))>>>13,Kt&=8191,Kt+=Zt*(5*Yn),Kt+=kt*(5*ur),Kt+=Bt*(5*Jn),Kt+=tn*(5*st),Ut+=(Kt+=Cn*(5*Vn))>>>13,Kt&=8191,sn=Ut,sn+=Ht*Vn,sn+=un*Bn,sn+=Gt*Un,sn+=Et*(5*er),Ut=(sn+=bt*(5*$n))>>>13,sn&=8191,sn+=Zt*(5*Gn),sn+=kt*(5*Yn),sn+=Bt*(5*ur),sn+=tn*(5*Jn),qt=Ut+=(sn+=Cn*(5*st))>>>13,qt+=Ht*st,qt+=un*Vn,qt+=Gt*Bn,qt+=Et*Un,Ut=(qt+=bt*(5*er))>>>13,qt&=8191,qt+=Zt*(5*$n),qt+=kt*(5*Gn),qt+=Bt*(5*Yn),qt+=tn*(5*ur),pn=Ut+=(qt+=Cn*(5*Jn))>>>13,pn+=Ht*Jn,pn+=un*st,pn+=Gt*Vn,pn+=Et*Bn,Ut=(pn+=bt*Un)>>>13,pn&=8191,pn+=Zt*(5*er),pn+=kt*(5*$n),pn+=Bt*(5*Gn),pn+=tn*(5*Yn),ln=Ut+=(pn+=Cn*(5*ur))>>>13,ln+=Ht*ur,ln+=un*Jn,ln+=Gt*st,ln+=Et*Vn,Ut=(ln+=bt*Bn)>>>13,ln&=8191,ln+=Zt*Un,ln+=kt*(5*er),ln+=Bt*(5*$n),ln+=tn*(5*Gn),Xt=Ut+=(ln+=Cn*(5*Yn))>>>13,Xt+=Ht*Yn,Xt+=un*ur,Xt+=Gt*Jn,Xt+=Et*st,Ut=(Xt+=bt*Vn)>>>13,Xt&=8191,Xt+=Zt*Bn,Xt+=kt*Un,Xt+=Bt*(5*er),Xt+=tn*(5*$n),jt=Ut+=(Xt+=Cn*(5*Gn))>>>13,jt+=Ht*Gn,jt+=un*Yn,jt+=Gt*ur,jt+=Et*Jn,Ut=(jt+=bt*st)>>>13,jt&=8191,jt+=Zt*Vn,jt+=kt*Bn,jt+=Bt*Un,jt+=tn*(5*er),on=Ut+=(jt+=Cn*(5*$n))>>>13,on+=Ht*$n,on+=un*Gn,on+=Gt*Yn,on+=Et*ur,Ut=(on+=bt*Jn)>>>13,on&=8191,on+=Zt*st,on+=kt*Vn,on+=Bt*Bn,on+=tn*Un,Wt=Ut+=(on+=Cn*(5*er))>>>13,Wt+=Ht*er,Wt+=un*$n,Wt+=Gt*Gn,Wt+=Et*Yn,Ut=(Wt+=bt*ur)>>>13,Wt&=8191,Wt+=Zt*Jn,Wt+=kt*st,Wt+=Bt*Vn,Wt+=tn*Bn,Ht=Qt=8191&(Ut=(Ut=((Ut+=(Wt+=Cn*Un)>>>13)<<2)+Ut|0)+(Qt&=8191)|0),un=Kt+=Ut>>>=13,Gt=sn&=8191,Et=qt&=8191,bt=pn&=8191,Zt=ln&=8191,kt=Xt&=8191,Bt=jt&=8191,tn=on&=8191,Cn=Wt&=8191,Se+=16,De-=16;this.h[0]=Ht,this.h[1]=un,this.h[2]=Gt,this.h[3]=Et,this.h[4]=bt,this.h[5]=Zt,this.h[6]=kt,this.h[7]=Bt,this.h[8]=tn,this.h[9]=Cn},D.prototype.finish=function(Ie,Se){var Ee,Ne,ze,ot,De=new Uint16Array(10);if(this.leftover){for(ot=this.leftover,this.buffer[ot++]=1;ot<16;ot++)this.buffer[ot]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(Ee=this.h[1]>>>13,this.h[1]&=8191,ot=2;ot<10;ot++)this.h[ot]+=Ee,Ee=this.h[ot]>>>13,this.h[ot]&=8191;for(this.h[0]+=5*Ee,Ee=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=Ee,Ee=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=Ee,De[0]=this.h[0]+5,Ee=De[0]>>>13,De[0]&=8191,ot=1;ot<10;ot++)De[ot]=this.h[ot]+Ee,Ee=De[ot]>>>13,De[ot]&=8191;for(De[9]-=8192,Ne=(1^Ee)-1,ot=0;ot<10;ot++)De[ot]&=Ne;for(Ne=~Ne,ot=0;ot<10;ot++)this.h[ot]=this.h[ot]&Ne|De[ot];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),ze=this.h[0]+this.pad[0],this.h[0]=65535&ze,ot=1;ot<8;ot++)ze=(this.h[ot]+this.pad[ot]|0)+(ze>>>16)|0,this.h[ot]=65535&ze;Ie[Se+0]=this.h[0]>>>0&255,Ie[Se+1]=this.h[0]>>>8&255,Ie[Se+2]=this.h[1]>>>0&255,Ie[Se+3]=this.h[1]>>>8&255,Ie[Se+4]=this.h[2]>>>0&255,Ie[Se+5]=this.h[2]>>>8&255,Ie[Se+6]=this.h[3]>>>0&255,Ie[Se+7]=this.h[3]>>>8&255,Ie[Se+8]=this.h[4]>>>0&255,Ie[Se+9]=this.h[4]>>>8&255,Ie[Se+10]=this.h[5]>>>0&255,Ie[Se+11]=this.h[5]>>>8&255,Ie[Se+12]=this.h[6]>>>0&255,Ie[Se+13]=this.h[6]>>>8&255,Ie[Se+14]=this.h[7]>>>0&255,Ie[Se+15]=this.h[7]>>>8&255},D.prototype.update=function(Ie,Se,De){var Ee,Ne;if(this.leftover){for((Ne=16-this.leftover)>De&&(Ne=De),Ee=0;Ee=16&&(Ne=De-De%16,this.blocks(Ie,Se,Ne),Se+=Ne,De-=Ne),De){for(Ee=0;Ee=128;){for(un=0;un<16;un++)Gt=8*un+jr,Ne[un]=De[Gt+0]<<24|De[Gt+1]<<16|De[Gt+2]<<8|De[Gt+3],ze[un]=De[Gt+4]<<24|De[Gt+5]<<16|De[Gt+6]<<8|De[Gt+7];for(un=0;un<80;un++)if(ot=Cn,Qe=Un,qe=Bn,Ft=Vn,xt=st,Yt=Jn,Ut=ur,Yn,Kt=Gn,sn=$n,qt=er,pn=wr,ln=dr,Xt=Rn,jt=Cr,_r,Zt=65535&(bt=_r),kt=bt>>>16,Bt=65535&(Et=Yn),tn=Et>>>16,Zt+=65535&(bt=(dr>>>14|st<<18)^(dr>>>18|st<<14)^(st>>>9|dr<<23)),kt+=bt>>>16,Bt+=65535&(Et=(st>>>14|dr<<18)^(st>>>18|dr<<14)^(dr>>>9|st<<23)),tn+=Et>>>16,Zt+=65535&(bt=dr&Rn^~dr&Cr),kt+=bt>>>16,Bt+=65535&(Et=st&Jn^~st&ur),tn+=Et>>>16,Et=Ge[2*un],Zt+=65535&(bt=Ge[2*un+1]),kt+=bt>>>16,Bt+=65535&Et,tn+=Et>>>16,Et=Ne[un%16],kt+=(bt=ze[un%16])>>>16,Bt+=65535&Et,tn+=Et>>>16,Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16,Zt=65535&(bt=Ht=65535&Zt|kt<<16),kt=bt>>>16,Bt=65535&(Et=Wt=65535&Bt|(tn+=Bt>>>16)<<16),tn=Et>>>16,Zt+=65535&(bt=(Gn>>>28|Cn<<4)^(Cn>>>2|Gn<<30)^(Cn>>>7|Gn<<25)),kt+=bt>>>16,Bt+=65535&(Et=(Cn>>>28|Gn<<4)^(Gn>>>2|Cn<<30)^(Gn>>>7|Cn<<25)),tn+=Et>>>16,kt+=(bt=Gn&$n^Gn&er^$n&er)>>>16,Bt+=65535&(Et=Cn&Un^Cn&Bn^Un&Bn),tn+=Et>>>16,Qt=65535&(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)|(tn+=Bt>>>16)<<16,on=65535&Zt|kt<<16,Zt=65535&(bt=pn),kt=bt>>>16,Bt=65535&(Et=Ft),tn=Et>>>16,kt+=(bt=Ht)>>>16,Bt+=65535&(Et=Wt),tn+=Et>>>16,Un=ot,Bn=Qe,Vn=qe,st=Ft=65535&(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)|(tn+=Bt>>>16)<<16,Jn=xt,ur=Yt,Yn=Ut,Cn=Qt,$n=Kt,er=sn,wr=qt,dr=pn=65535&Zt|kt<<16,Rn=ln,Cr=Xt,_r=jt,Gn=on,un%16==15)for(Gt=0;Gt<16;Gt++)Et=Ne[Gt],Zt=65535&(bt=ze[Gt]),kt=bt>>>16,Bt=65535&Et,tn=Et>>>16,Et=Ne[(Gt+9)%16],Zt+=65535&(bt=ze[(Gt+9)%16]),kt+=bt>>>16,Bt+=65535&Et,tn+=Et>>>16,Wt=Ne[(Gt+1)%16],Zt+=65535&(bt=((Ht=ze[(Gt+1)%16])>>>1|Wt<<31)^(Ht>>>8|Wt<<24)^(Ht>>>7|Wt<<25)),kt+=bt>>>16,Bt+=65535&(Et=(Wt>>>1|Ht<<31)^(Wt>>>8|Ht<<24)^Wt>>>7),tn+=Et>>>16,Wt=Ne[(Gt+14)%16],kt+=(bt=((Ht=ze[(Gt+14)%16])>>>19|Wt<<13)^(Wt>>>29|Ht<<3)^(Ht>>>6|Wt<<26))>>>16,Bt+=65535&(Et=(Wt>>>19|Ht<<13)^(Ht>>>29|Wt<<3)^Wt>>>6),tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ne[Gt]=65535&Bt|tn<<16,ze[Gt]=65535&Zt|kt<<16;Zt=65535&(bt=Gn),kt=bt>>>16,Bt=65535&(Et=Cn),tn=Et>>>16,Et=Ie[0],kt+=(bt=Se[0])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[0]=Cn=65535&Bt|tn<<16,Se[0]=Gn=65535&Zt|kt<<16,Zt=65535&(bt=$n),kt=bt>>>16,Bt=65535&(Et=Un),tn=Et>>>16,Et=Ie[1],kt+=(bt=Se[1])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[1]=Un=65535&Bt|tn<<16,Se[1]=$n=65535&Zt|kt<<16,Zt=65535&(bt=er),kt=bt>>>16,Bt=65535&(Et=Bn),tn=Et>>>16,Et=Ie[2],kt+=(bt=Se[2])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[2]=Bn=65535&Bt|tn<<16,Se[2]=er=65535&Zt|kt<<16,Zt=65535&(bt=wr),kt=bt>>>16,Bt=65535&(Et=Vn),tn=Et>>>16,Et=Ie[3],kt+=(bt=Se[3])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[3]=Vn=65535&Bt|tn<<16,Se[3]=wr=65535&Zt|kt<<16,Zt=65535&(bt=dr),kt=bt>>>16,Bt=65535&(Et=st),tn=Et>>>16,Et=Ie[4],kt+=(bt=Se[4])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[4]=st=65535&Bt|tn<<16,Se[4]=dr=65535&Zt|kt<<16,Zt=65535&(bt=Rn),kt=bt>>>16,Bt=65535&(Et=Jn),tn=Et>>>16,Et=Ie[5],kt+=(bt=Se[5])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[5]=Jn=65535&Bt|tn<<16,Se[5]=Rn=65535&Zt|kt<<16,Zt=65535&(bt=Cr),kt=bt>>>16,Bt=65535&(Et=ur),tn=Et>>>16,Et=Ie[6],kt+=(bt=Se[6])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[6]=ur=65535&Bt|tn<<16,Se[6]=Cr=65535&Zt|kt<<16,Zt=65535&(bt=_r),kt=bt>>>16,Bt=65535&(Et=Yn),tn=Et>>>16,Et=Ie[7],kt+=(bt=Se[7])>>>16,Bt+=65535&Et,tn+=Et>>>16,tn+=(Bt+=(kt+=(Zt+=65535&bt)>>>16)>>>16)>>>16,Ie[7]=Yn=65535&Bt|tn<<16,Se[7]=_r=65535&Zt|kt<<16,jr+=128,Ee-=128}return Ee}function Ue(Ie,Se,De){var ot,Ee=new Int32Array(8),Ne=new Int32Array(8),ze=new Uint8Array(256),Qe=De;for(Ee[0]=1779033703,Ee[1]=3144134277,Ee[2]=1013904242,Ee[3]=2773480762,Ee[4]=1359893119,Ee[5]=2600822924,Ee[6]=528734635,Ee[7]=1541459225,Ne[0]=4089235720,Ne[1]=2227873595,Ne[2]=4271175723,Ne[3]=1595750129,Ne[4]=2917565137,Ne[5]=725511199,Ne[6]=4215389547,Ne[7]=327033209,Ve(Ee,Ne,Se,De),De%=128,ot=0;ot=0;--Ne)Ze(Ie,Se,Ee=De[Ne/8|0]>>(7&Ne)&1),_t(Se,Ie),_t(Ie,Ie),Ze(Ie,Se,Ee)}function nt(Ie,Se){var De=[_(),_(),_(),_()];x(De[0],A),x(De[1],O),x(De[2],g),ue(De[3],A,O),Pt(Ie,De,Se)}function rt(Ie,Se,De){var ze,Ee=new Uint8Array(64),Ne=[_(),_(),_(),_()];for(De||E(Se,32),Ue(Ee,Se,32),Ee[0]&=248,Ee[31]&=127,Ee[31]|=64,nt(Ne,Ee),$e(Ie,Ne),ze=0;ze<32;ze++)Se[ze+32]=Ie[ze];return 0}var Lt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Re(Ie,Se){var De,Ee,Ne,ze;for(Ee=63;Ee>=32;--Ee){for(De=0,Ne=Ee-32,ze=Ee-12;Ne>4)*Lt[Ne],De=Se[Ne]>>8,Se[Ne]&=255;for(Ne=0;Ne<32;Ne++)Se[Ne]-=De*Lt[Ne];for(Ee=0;Ee<32;Ee++)Se[Ee+1]+=Se[Ee]>>8,Ie[Ee]=255&Se[Ee]}function Ae(Ie){var De,Se=new Float64Array(64);for(De=0;De<64;De++)Se[De]=Ie[De];for(De=0;De<64;De++)Ie[De]=0;Re(Ie,Se)}function xe(Ie,Se,De,Ee){var Qe,qe,Ne=new Uint8Array(64),ze=new Uint8Array(64),ot=new Uint8Array(64),Ft=new Float64Array(64),xt=[_(),_(),_(),_()];Ue(Ne,Ee,32),Ne[0]&=248,Ne[31]&=127,Ne[31]|=64;var Yt=De+64;for(Qe=0;Qe>7&&ee(Ie[0],h,Ie[0]),ue(Ie[3],Ie[0],Ie[1]),0)}(qe,Ee))return-1;for(Ne=0;Ne=0},l.sign.keyPair=function(){var Ie=new Uint8Array(32),Se=new Uint8Array(64);return rt(Ie,Se),{publicKey:Ie,secretKey:Se}},l.sign.keyPair.fromSecretKey=function(Ie){if(pt(Ie),64!==Ie.length)throw new Error("bad secret key size");for(var Se=new Uint8Array(32),De=0;De{ne.exports=function(r){return"function"==typeof Buffer._augment&&Buffer.TYPED_ARRAY_SUPPORT?Buffer._augment(r):new Buffer(r)}},69830:(ne,r)=>{var k,p,A,d=void 0,l=1e5,_=(k=Object.prototype.toString,p=Object.prototype.hasOwnProperty,{Class:function(B){return k.call(B).replace(/^\[object *|\]$/g,"")},HasProperty:function(B,ie){return ie in B},HasOwnProperty:function(B,ie){return p.call(B,ie)},IsCallable:function(B){return"function"==typeof B},ToInt32:function(B){return B>>0},ToUint32:function(B){return B>>>0}}),E=Math.LN2,S=Math.abs,a=Math.floor,h=Math.log,g=Math.min,y=Math.pow,v=Math.round;function b(k){if(O&&A){var B,p=O(k);for(B=0;B>B}function N(k,p){var B=32-p;return k<>>B}function M(k){return[255&k]}function P(k){return T(k[0],8)}function R(k){return[255&k]}function L(k){return N(k[0],8)}function H(k){return[(k=v(Number(k)))<0?0:k>255?255:255&k]}function V(k){return[k>>8&255,255&k]}function J(k){return T(k[0]<<8|k[1],16)}function Y(k){return[k>>8&255,255&k]}function Z(k){return N(k[0]<<8|k[1],16)}function W(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}function Q(k){return T(k[0]<<24|k[1]<<16|k[2]<<8|k[3],32)}function D(k){return[k>>24&255,k>>16&255,k>>8&255,255&k]}function o(k){return N(k[0]<<24|k[1]<<16|k[2]<<8|k[3],32)}function u(k,p,B){var te,ee,ue,me,ve,ce,he,ie=(1<.5||ae%2?ae+1:ae}for(k!=k?(ee=(1<=y(2,1-ie)?(ee=g(a(h(k)/E),1023),(ue=le(k/y(2,ee)*y(2,B)))/y(2,B)>=2&&(ee+=1,ue=1),ee>ie?(ee=(1<>=1;return ie.reverse(),we=ie.join(""),me=(1<0?ve*y(2,ce-me)*(1+he/y(2,B)):0!==he?ve*y(2,-(me-1))*(he/y(2,B)):ve<0?-0:0}function w(k){return m(k,11,52)}function x(k){return u(k,11,52)}function F(k){return m(k,8,23)}function G(k){return u(k,8,23)}(function(){var k=function(de){if((de=_.ToInt32(de))<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");var ae;for(this.byteLength=de,this._bytes=[],this._bytes.length=de,ae=0;aethis.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=_.ToUint32(Ge),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(Ue=arguments[0],this.length=_.ToUint32(Ue.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new k(this.byteLength),this.byteOffset=0,_t=0;_tl)throw new RangeError("Array too large for polyfill");var B;for(B=0;B=this.length)return d;var Ge,Ve,Pe=[];for(Ge=0,Ve=this.byteOffset+Ce*this.BYTES_PER_ELEMENT;Ge=this.length)return d;var Ve,Ue,Ge=this._pack(Pe);for(Ve=0,Ue=this.byteOffset+Ce*this.BYTES_PER_ELEMENT;Vethis.length)throw new RangeError("Offset plus length of array is out of range");if(nt=this.byteOffset+Ue*this.BYTES_PER_ELEMENT,rt=Ge.length*this.BYTES_PER_ELEMENT,Ge.buffer===this.buffer){for(Lt=[],Ze=0,$e=Ge.byteOffset;Zethis.length)throw new RangeError("Offset plus length of array is out of range");for(Ze=0;Ze<_t;Ze+=1)$e=Ve[Ze],this._setter(Ue+Ze,Number($e))}},ye.prototype.subarray=function(Ce,Pe){function Ge(Ue,_t,Ze){return Ue<_t?_t:Ue>Ze?Ze:Ue}Ce=_.ToInt32(Ce),Pe=_.ToInt32(Pe),arguments.length<1&&(Ce=0),arguments.length<2&&(Pe=this.length),Ce<0&&(Ce=this.length+Ce),Pe<0&&(Pe=this.length+Pe),Ce=Ge(Ce,0,this.length);var Ve=(Pe=Ge(Pe,0,this.length))-Ce;return Ve<0&&(Ve=0),new this.constructor(this.buffer,this.byteOffset+Ce*this.BYTES_PER_ELEMENT,Ve)},ye}var ie=B(1,M,P),te=B(1,R,L),ee=B(1,H,L),ue=B(2,V,J),we=B(2,Y,Z),me=B(4,W,Q),ve=B(4,D,o),ce=B(4,G,F),he=B(8,x,w);r.iq=r.iq||ie,r.U2=r.U2||te,r.we=r.we||ee,r.M2=r.M2||ue,r.HA=r.HA||we,r.ZV=r.ZV||me,r._R=r._R||ve,r.$L=r.$L||ce,r.I=r.I||he})(),function(){function k(ee,ue){return _.IsCallable(ee.get)?ee.get(ue):ee[ue]}var ee,p=(ee=new r.HA([4660]),18===k(new r.U2(ee.buffer),0)),B=function(ue,we,me){if(0===arguments.length)ue=new r.eT(0);else if(!(ue instanceof r.eT||"ArrayBuffer"===_.Class(ue)))throw new TypeError("TypeError");if(this.buffer=ue||new r.eT(0),this.byteOffset=_.ToUint32(we),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=_.ToUint32(me),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");b(this)};function ie(ee){return function(ue,we){if((ue=_.ToUint32(ue))+ee.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");ue+=this.byteOffset;var ce,me=new r.U2(this.buffer,ue,ee.BYTES_PER_ELEMENT),ve=[];for(ce=0;cethis.byteLength)throw new RangeError("Array index out of range");var le,ve=new ee([we]),ce=new r.U2(ve.buffer),he=[];for(le=0;le{ne.exports=d(62074)},46564:ne=>{ne.exports=function(d){var _,l=!1;return d instanceof Function||(l=!0,_=d,d=null),function(){return l||(l=!0,_=d.apply(this,arguments),d=null),_}}},25554:ne=>{ne.exports=function r(d,l,_){if(_||(_=[]),_.length{ne.exports={cache:d(46564),eachCombination:d(25554)}},75557:(ne,r,d)=>{"use strict";function l(_,E){return E=E||{},new Promise(function(S,a){var h=new XMLHttpRequest,g=[],y=[],v={},b=function(){return{ok:2==(h.status/100|0),statusText:h.statusText,status:h.status,url:h.responseURL,text:function(){return Promise.resolve(h.responseText)},json:function(){return Promise.resolve(h.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([h.response]))},clone:b,headers:{keys:function(){return g},entries:function(){return y},get:function(O){return v[O.toLowerCase()]},has:function(O){return O.toLowerCase()in v}}}};for(var A in h.open(E.method||"get",_,!0),h.onload=function(){h.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(O,C,T){g.push(C=C.toLowerCase()),y.push([C,T]),v[C]=v[C]?v[C]+","+T:T}),S(b())},h.onerror=a,h.withCredentials="include"==E.credentials,E.headers)h.setRequestHeader(A,E.headers[A]);h.send(E.body||null)})}d.r(r),d.d(r,{default:()=>l})},96482:function(ne,r){!function(d){"use strict";function l(){for(var Ie=arguments.length,Se=Array(Ie),De=0;De1){Se[0]=Se[0].slice(0,-1);for(var Ee=Se.length-1,Ne=1;Ne= 0x80 (not a basic code point)","invalid-input":"Invalid input"},W=C-T,Q=Math.floor,D=String.fromCharCode;function o(Ie){throw new RangeError(Z[Ie])}function u(Ie,Se){for(var De=[],Ee=Ie.length;Ee--;)De[Ee]=Se(Ie[Ee]);return De}function m(Ie,Se){var De=Ie.split("@"),Ee="";return De.length>1&&(Ee=De[0]+"@",Ie=De[1]),Ee+u((Ie=Ie.replace(Y,".")).split("."),Se).join(".")}function w(Ie){for(var Se=[],De=0,Ee=Ie.length;De=55296&&Ne<=56319&&De>1,Se+=Q(Se/De);Se>W*N>>1;Ne+=C)Se=Q(Se/W);return Q(Ne+(W+1)*Se/(Se+M))},p=function(Se){var De=[],Ee=Se.length,Ne=0,ze=L,ot=R,Qe=Se.lastIndexOf(H);Qe<0&&(Qe=0);for(var qe=0;qe=128&&o("not-basic"),De.push(Se.charCodeAt(qe));for(var Ft=Qe>0?Qe+1:0;Ft=Ee&&o("invalid-input");var Qt=F(Se.charCodeAt(Ft++));(Qt>=C||Qt>Q((O-Ne)/Yt))&&o("overflow"),Ne+=Qt*Yt;var Kt=Ut<=ot?T:Ut>=ot+N?N:Ut-ot;if(QtQ(O/sn)&&o("overflow"),Yt*=sn}var qt=De.length+1;ot=k(Ne-xt,qt,0==xt),Q(Ne/qt)>O-ze&&o("overflow"),ze+=Q(Ne/qt),Ne%=qt,De.splice(Ne++,0,ze)}return String.fromCodePoint.apply(String,De)},B=function(Se){var De=[],Ee=(Se=w(Se)).length,Ne=L,ze=0,ot=R,Qe=!0,qe=!1,Ft=void 0;try{for(var Yt,xt=Se[Symbol.iterator]();!(Qe=(Yt=xt.next()).done);Qe=!0){var Ut=Yt.value;Ut<128&&De.push(D(Ut))}}catch(Bn){qe=!0,Ft=Bn}finally{try{!Qe&&xt.return&&xt.return()}finally{if(qe)throw Ft}}var Qt=De.length,Kt=Qt;for(Qt&&De.push(H);Kt=Ne&&onQ((O-ze)/Wt)&&o("overflow"),ze+=(sn-Ne)*Wt,Ne=sn;var Ht=!0,un=!1,Gt=void 0;try{for(var bt,Et=Se[Symbol.iterator]();!(Ht=(bt=Et.next()).done);Ht=!0){var Zt=bt.value;if(ZtO&&o("overflow"),Zt==Ne){for(var kt=ze,Bt=C;;Bt+=C){var tn=Bt<=ot?T:Bt>=ot+N?N:Bt-ot;if(kt>6|192).toString(16).toUpperCase()+"%"+(63&Se|128).toString(16).toUpperCase():"%"+(Se>>12|224).toString(16).toUpperCase()+"%"+(Se>>6&63|128).toString(16).toUpperCase()+"%"+(63&Se|128).toString(16).toUpperCase()}function me(Ie){for(var Se="",De=0,Ee=Ie.length;De=194&&Ne<224){if(Ee-De>=6){var ze=parseInt(Ie.substr(De+4,2),16);Se+=String.fromCharCode((31&Ne)<<6|63&ze)}else Se+=Ie.substr(De,6);De+=6}else if(Ne>=224){if(Ee-De>=9){var ot=parseInt(Ie.substr(De+4,2),16),Qe=parseInt(Ie.substr(De+7,2),16);Se+=String.fromCharCode((15&Ne)<<12|(63&ot)<<6|63&Qe)}else Se+=Ie.substr(De,9);De+=9}else Se+=Ie.substr(De,3),De+=3}return Se}function ve(Ie,Se){function De(Ee){var Ne=me(Ee);return Ne.match(Se.UNRESERVED)?Ne:Ee}return Ie.scheme&&(Ie.scheme=String(Ie.scheme).replace(Se.PCT_ENCODED,De).toLowerCase().replace(Se.NOT_SCHEME,"")),void 0!==Ie.userinfo&&(Ie.userinfo=String(Ie.userinfo).replace(Se.PCT_ENCODED,De).replace(Se.NOT_USERINFO,we).replace(Se.PCT_ENCODED,S)),void 0!==Ie.host&&(Ie.host=String(Ie.host).replace(Se.PCT_ENCODED,De).toLowerCase().replace(Se.NOT_HOST,we).replace(Se.PCT_ENCODED,S)),void 0!==Ie.path&&(Ie.path=String(Ie.path).replace(Se.PCT_ENCODED,De).replace(Ie.scheme?Se.NOT_PATH:Se.NOT_PATH_NOSCHEME,we).replace(Se.PCT_ENCODED,S)),void 0!==Ie.query&&(Ie.query=String(Ie.query).replace(Se.PCT_ENCODED,De).replace(Se.NOT_QUERY,we).replace(Se.PCT_ENCODED,S)),void 0!==Ie.fragment&&(Ie.fragment=String(Ie.fragment).replace(Se.PCT_ENCODED,De).replace(Se.NOT_FRAGMENT,we).replace(Se.PCT_ENCODED,S)),Ie}function ce(Ie){return Ie.replace(/^0*(.*)/,"$1")||"0"}function he(Ie,Se){var De=Ie.match(Se.IPV4ADDRESS)||[],Ne=b(De,2)[1];return Ne?Ne.split(".").map(ce).join("."):Ie}function le(Ie,Se){var De=Ie.match(Se.IPV6ADDRESS)||[],Ee=b(De,3),Ne=Ee[1],ze=Ee[2];if(Ne){for(var ot=Ne.toLowerCase().split("::").reverse(),Qe=b(ot,2),qe=Qe[0],Ft=Qe[1],xt=Ft?Ft.split(":").map(ce):[],Yt=qe.split(":").map(ce),Ut=Se.IPV4ADDRESS.test(Yt[Yt.length-1]),Qt=Ut?7:8,Kt=Yt.length-Qt,sn=Array(Qt),qt=0;qt1){var jt=sn.slice(0,ln.index),on=sn.slice(ln.index+ln.length);Xt=jt.join(":")+"::"+on.join(":")}else Xt=sn.join(":");return ze&&(Xt+="%"+ze),Xt}return Ie}var de=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ae=void 0==="".match(/(){0}/)[1];function ye(Ie){var Se=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},De={},Ee=!1!==Se.iri?v:y;"suffix"===Se.reference&&(Ie=(Se.scheme?Se.scheme+":":"")+"//"+Ie);var Ne=Ie.match(de);if(Ne){ae?(De.scheme=Ne[1],De.userinfo=Ne[3],De.host=Ne[4],De.port=parseInt(Ne[5],10),De.path=Ne[6]||"",De.query=Ne[7],De.fragment=Ne[8],isNaN(De.port)&&(De.port=Ne[5])):(De.scheme=Ne[1]||void 0,De.userinfo=-1!==Ie.indexOf("@")?Ne[3]:void 0,De.host=-1!==Ie.indexOf("//")?Ne[4]:void 0,De.port=parseInt(Ne[5],10),De.path=Ne[6]||"",De.query=-1!==Ie.indexOf("?")?Ne[7]:void 0,De.fragment=-1!==Ie.indexOf("#")?Ne[8]:void 0,isNaN(De.port)&&(De.port=Ie.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ne[4]:void 0)),De.host&&(De.host=le(he(De.host,Ee),Ee)),void 0!==De.scheme||void 0!==De.userinfo||void 0!==De.host||void 0!==De.port||De.path||void 0!==De.query?void 0===De.scheme?De.reference="relative":void 0===De.fragment?De.reference="absolute":De.reference="uri":De.reference="same-document",Se.reference&&"suffix"!==Se.reference&&Se.reference!==De.reference&&(De.error=De.error||"URI is not a "+Se.reference+" reference.");var ze=ue[(Se.scheme||De.scheme||"").toLowerCase()];if(Se.unicodeSupport||ze&&ze.unicodeSupport)ve(De,Ee);else{if(De.host&&(Se.domainHost||ze&&ze.domainHost))try{De.host=ee.toASCII(De.host.replace(Ee.PCT_ENCODED,me).toLowerCase())}catch(ot){De.error=De.error||"Host's domain name can not be converted to ASCII via punycode: "+ot}ve(De,y)}ze&&ze.parse&&ze.parse(De,Se)}else De.error=De.error||"URI can not be parsed.";return De}function Ce(Ie,Se){var De=!1!==Se.iri?v:y,Ee=[];return void 0!==Ie.userinfo&&(Ee.push(Ie.userinfo),Ee.push("@")),void 0!==Ie.host&&Ee.push(le(he(String(Ie.host),De),De).replace(De.IPV6ADDRESS,function(Ne,ze,ot){return"["+ze+(ot?"%25"+ot:"")+"]"})),("number"==typeof Ie.port||"string"==typeof Ie.port)&&(Ee.push(":"),Ee.push(String(Ie.port))),Ee.length?Ee.join(""):void 0}var Pe=/^\.\.?\//,Ge=/^\/\.(\/|$)/,Ve=/^\/\.\.(\/|$)/,Ue=/^\/?(?:.|\n)*?(?=\/|$)/;function _t(Ie){for(var Se=[];Ie.length;)if(Ie.match(Pe))Ie=Ie.replace(Pe,"");else if(Ie.match(Ge))Ie=Ie.replace(Ge,"/");else if(Ie.match(Ve))Ie=Ie.replace(Ve,"/"),Se.pop();else if("."===Ie||".."===Ie)Ie="";else{var De=Ie.match(Ue);if(!De)throw new Error("Unexpected dot segment condition");var Ee=De[0];Ie=Ie.slice(Ee.length),Se.push(Ee)}return Se.join("")}function Ze(Ie){var Se=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},De=Se.iri?v:y,Ee=[],Ne=ue[(Se.scheme||Ie.scheme||"").toLowerCase()];if(Ne&&Ne.serialize&&Ne.serialize(Ie,Se),Ie.host&&!De.IPV6ADDRESS.test(Ie.host)&&(Se.domainHost||Ne&&Ne.domainHost))try{Ie.host=Se.iri?ee.toUnicode(Ie.host):ee.toASCII(Ie.host.replace(De.PCT_ENCODED,me).toLowerCase())}catch(Qe){Ie.error=Ie.error||"Host's domain name can not be converted to "+(Se.iri?"Unicode":"ASCII")+" via punycode: "+Qe}ve(Ie,De),"suffix"!==Se.reference&&Ie.scheme&&(Ee.push(Ie.scheme),Ee.push(":"));var ze=Ce(Ie,Se);if(void 0!==ze&&("suffix"!==Se.reference&&Ee.push("//"),Ee.push(ze),Ie.path&&"/"!==Ie.path.charAt(0)&&Ee.push("/")),void 0!==Ie.path){var ot=Ie.path;!Se.absolutePath&&(!Ne||!Ne.absolutePath)&&(ot=_t(ot)),void 0===ze&&(ot=ot.replace(/^\/\//,"/%2F")),Ee.push(ot)}return void 0!==Ie.query&&(Ee.push("?"),Ee.push(Ie.query)),void 0!==Ie.fragment&&(Ee.push("#"),Ee.push(Ie.fragment)),Ee.join("")}function $e(Ie,Se){var De=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Ne={};return arguments[3]||(Ie=ye(Ze(Ie,De),De),Se=ye(Ze(Se,De),De)),!(De=De||{}).tolerant&&Se.scheme?(Ne.scheme=Se.scheme,Ne.userinfo=Se.userinfo,Ne.host=Se.host,Ne.port=Se.port,Ne.path=_t(Se.path||""),Ne.query=Se.query):(void 0!==Se.userinfo||void 0!==Se.host||void 0!==Se.port?(Ne.userinfo=Se.userinfo,Ne.host=Se.host,Ne.port=Se.port,Ne.path=_t(Se.path||""),Ne.query=Se.query):(Se.path?("/"===Se.path.charAt(0)?Ne.path=_t(Se.path):(void 0===Ie.userinfo&&void 0===Ie.host&&void 0===Ie.port||Ie.path?Ie.path?Ne.path=Ie.path.slice(0,Ie.path.lastIndexOf("/")+1)+Se.path:Ne.path=Se.path:Ne.path="/"+Se.path,Ne.path=_t(Ne.path)),Ne.query=Se.query):(Ne.path=Ie.path,void 0!==Se.query?Ne.query=Se.query:Ne.query=Ie.query),Ne.userinfo=Ie.userinfo,Ne.host=Ie.host,Ne.port=Ie.port),Ne.scheme=Ie.scheme),Ne.fragment=Se.fragment,Ne}function Pt(Ie,Se,De){var Ee=h({scheme:"null"},De);return Ze($e(ye(Ie,Ee),ye(Se,Ee),Ee,!0),Ee)}function nt(Ie,Se){return"string"==typeof Ie?Ie=Ze(ye(Ie,Se),Se):"object"===E(Ie)&&(Ie=ye(Ze(Ie,Se),Se)),Ie}function rt(Ie,Se,De){return"string"==typeof Ie?Ie=Ze(ye(Ie,De),De):"object"===E(Ie)&&(Ie=Ze(Ie,De)),"string"==typeof Se?Se=Ze(ye(Se,De),De):"object"===E(Se)&&(Se=Ze(Se,De)),Ie===Se}function Lt(Ie,Se){return Ie&&Ie.toString().replace(Se&&Se.iri?v.ESCAPE:y.ESCAPE,we)}function Re(Ie,Se){return Ie&&Ie.toString().replace(Se&&Se.iri?v.PCT_ENCODED:y.PCT_ENCODED,me)}var Ae={scheme:"http",domainHost:!0,parse:function(Se,De){return Se.host||(Se.error=Se.error||"HTTP URIs must have a host."),Se},serialize:function(Se,De){var Ee="https"===String(Se.scheme).toLowerCase();return(Se.port===(Ee?443:80)||""===Se.port)&&(Se.port=void 0),Se.path||(Se.path="/"),Se}},xe={scheme:"https",domainHost:Ae.domainHost,parse:Ae.parse,serialize:Ae.serialize};function je(Ie){return"boolean"==typeof Ie.secure?Ie.secure:"wss"===String(Ie.scheme).toLowerCase()}var He={scheme:"ws",domainHost:!0,parse:function(Se,De){var Ee=Se;return Ee.secure=je(Ee),Ee.resourceName=(Ee.path||"/")+(Ee.query?"?"+Ee.query:""),Ee.path=void 0,Ee.query=void 0,Ee},serialize:function(Se,De){if((Se.port===(je(Se)?443:80)||""===Se.port)&&(Se.port=void 0),"boolean"==typeof Se.secure&&(Se.scheme=Se.secure?"wss":"ws",Se.secure=void 0),Se.resourceName){var Ee=Se.resourceName.split("?"),Ne=b(Ee,2),ze=Ne[0],ot=Ne[1];Se.path=ze&&"/"!==ze?ze:void 0,Se.query=ot,Se.resourceName=void 0}return Se.fragment=void 0,Se}},lt={scheme:"wss",domainHost:He.domainHost,parse:He.parse,serialize:He.serialize},Je={},fn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ct="[0-9A-Fa-f]",dt=_(_("%[EFef]"+ct+"%"+ct+ct+"%"+ct+ct)+"|"+_("%[89A-Fa-f]"+ct+"%"+ct+ct)+"|"+_("%"+ct+ct)),yn="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",It=l("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),or="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Dt=new RegExp(fn,"g"),Mt=new RegExp(dt,"g"),In=new RegExp(l("[^]",yn,"[\\.]",'[\\"]',It),"g"),yt=new RegExp(l("[^]",fn,or),"g"),wt=yt;function Pn(Ie){var Se=me(Ie);return Se.match(Dt)?Se:Ie}var vt={scheme:"mailto",parse:function(Se,De){var Ee=Se,Ne=Ee.to=Ee.path?Ee.path.split(","):[];if(Ee.path=void 0,Ee.query){for(var ze=!1,ot={},Qe=Ee.query.split("&"),qe=0,Ft=Qe.length;qe= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=y-v,V=Math.floor,J=String.fromCharCode;function Z(p){throw RangeError(L[p])}function W(p,B){for(var ie=p.length,te=[];ie--;)te[ie]=B(p[ie]);return te}function Q(p,B){var ie=p.split("@"),te="";return ie.length>1&&(te=ie[0]+"@",p=ie[1]),te+W((p=p.replace(R,".")).split("."),B).join(".")}function D(p){for(var ee,ue,B=[],ie=0,te=p.length;ie=55296&&ee<=56319&&ie65535&&(ie+=J((B-=65536)>>>10&1023|55296),B=56320|1023&B),ie+=J(B)}).join("")}function u(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:y}function m(p,B){return p+22+75*(p<26)-((0!=B)<<5)}function w(p,B,ie){var te=0;for(p=ie?V(p/O):p>>1,p+=V(p/B);p>H*b>>1;te+=y)p=V(p/H);return V(te+(H+1)*p/(p+A))}function x(p){var te,me,ve,ce,he,le,de,ae,ye,Ce,B=[],ie=p.length,ee=0,ue=T,we=C;for((me=p.lastIndexOf(N))<0&&(me=0),ve=0;ve=128&&Z("not-basic"),B.push(p.charCodeAt(ve));for(ce=me>0?me+1:0;ce=ie&&Z("invalid-input"),((ae=u(p.charCodeAt(ce++)))>=y||ae>V((g-ee)/le))&&Z("overflow"),ee+=ae*le,!(ae<(ye=de<=we?v:de>=we+b?b:de-we));de+=y)le>V(g/(Ce=y-ye))&&Z("overflow"),le*=Ce;we=w(ee-he,te=B.length+1,0==he),V(ee/te)>g-ue&&Z("overflow"),ue+=V(ee/te),ee%=te,B.splice(ee++,0,ue)}return o(B)}function F(p){var B,ie,te,ee,ue,we,me,ve,ce,he,le,ae,ye,Ce,Pe,de=[];for(ae=(p=D(p)).length,B=T,ie=0,ue=C,we=0;we=B&&leV((g-ie)/(ye=te+1))&&Z("overflow"),ie+=(me-B)*ye,B=me,we=0;weg&&Z("overflow"),le==B){for(ve=ie,ce=y;!(ve<(he=ce<=ue?v:ce>=ue+b?b:ce-ue));ce+=y)Pe=ve-he,Ce=y-he,de.push(J(m(he+Pe%Ce,0))),ve=V(Pe/Ce);de.push(J(m(ve,0))),ue=w(ie,ye,te==ee),ie=0,++te}++ie,++B}return de.join("")}h={version:"1.3.2",ucs2:{decode:D,encode:o},decode:x,encode:F,toASCII:function k(p){return Q(p,function(B){return P.test(B)?"xn--"+F(B):B})},toUnicode:function G(p){return Q(p,function(B){return M.test(B)?x(B.slice(4).toLowerCase()):B})}},void 0!==(l=function(){return h}.call(r,d,r,ne))&&(ne.exports=l)}()},68762:(ne,r,d)=>{"use strict";var l=d(11308),_=d(70796);function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=L,r.resolve=function V(Y,Z){return L(Y,!1,!0).resolve(Z)},r.resolveObject=function J(Y,Z){return Y?L(Y,!1,!0).resolveObject(Z):Z},r.format=function H(Y){return _.isString(Y)&&(Y=L(Y)),Y instanceof E?Y.format():E.prototype.format.call(Y)},r.Url=E;var S=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,g=["<",">",'"',"`"," ","\r","\n","\t"],y=["{","}","|","\\","^","`"].concat(g),v=["'"].concat(y),b=["%","/","?",";","#"].concat(v),A=["/","?","#"],C=/^[+a-z0-9A-Z_-]{0,63}$/,T=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,N={javascript:!0,"javascript:":!0},M={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},R=d(17137);function L(Y,Z,W){if(Y&&_.isObject(Y)&&Y instanceof E)return Y;var Q=new E;return Q.parse(Y,Z,W),Q}E.prototype.parse=function(Y,Z,W){if(!_.isString(Y))throw new TypeError("Parameter 'url' must be a string, not "+typeof Y);var Q=Y.indexOf("?"),D=-1!==Q&&Q127?ve+="x":ve+=me[ce];if(!ve.match(C)){var le=ue.slice(0,p),de=ue.slice(p+1),ae=me.match(T);ae&&(le.push(ae[1]),de.unshift(ae[2])),de.length&&(m="/"+de.join(".")+m),this.hostname=le.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),ee||(this.hostname=l.toASCII(this.hostname));var ye=this.port?":"+this.port:"",Ce=this.hostname||"";this.host=Ce+ye,this.href+=this.host,ee&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==m[0]&&(m="/"+m))}if(!N[F])for(p=0,we=v.length;p0)&&W.host.split("@"))&&(W.auth=ve.shift(),W.host=W.hostname=ve.shift());return W.search=Y.search,W.query=Y.query,(!_.isNull(W.pathname)||!_.isNull(W.search))&&(W.path=(W.pathname?W.pathname:"")+(W.search?W.search:"")),W.href=W.format(),W}if(!ue.length)return W.pathname=null,W.search?W.path="/"+W.search:W.path=null,W.href=W.format(),W;for(var ce=ue.slice(-1)[0],he=(W.host||Y.host||ue.length>1)&&("."===ce||".."===ce)||""===ce,le=0,de=ue.length;de>=0;de--)"."===(ce=ue[de])?ue.splice(de,1):".."===ce?(ue.splice(de,1),le++):le&&(ue.splice(de,1),le--);if(!te&&!ee)for(;le--;le)ue.unshift("..");te&&""!==ue[0]&&(!ue[0]||"/"!==ue[0].charAt(0))&&ue.unshift(""),he&&"/"!==ue.join("/").substr(-1)&&ue.push("");var ve,ae=""===ue[0]||ue[0]&&"/"===ue[0].charAt(0);me&&(W.hostname=W.host=ae?"":ue.length?ue.shift():"",(ve=!!(W.host&&W.host.indexOf("@")>0)&&W.host.split("@"))&&(W.auth=ve.shift(),W.host=W.hostname=ve.shift()));return(te=te||W.host&&ue.length)&&!ae&&ue.unshift(""),ue.length?W.pathname=ue.join("/"):(W.pathname=null,W.path=null),(!_.isNull(W.pathname)||!_.isNull(W.search))&&(W.path=(W.pathname?W.pathname:"")+(W.search?W.search:"")),W.auth=Y.auth||W.auth,W.slashes=W.slashes||Y.slashes,W.href=W.format(),W},E.prototype.parseHost=function(){var Y=this.host,Z=a.exec(Y);Z&&(":"!==(Z=Z[0])&&(this.port=Z.substr(1)),Y=Y.substr(0,Y.length-Z.length)),Y&&(this.hostname=Y)}},70796:ne=>{"use strict";ne.exports={isString:function(r){return"string"==typeof r},isObject:function(r){return"object"==typeof r&&null!==r},isNull:function(r){return null===r},isNullOrUndefined:function(r){return null==r}}},23532:ne=>{function d(l){try{if(!global.localStorage)return!1}catch{return!1}var _=global.localStorage[l];return null!=_&&"true"===String(_).toLowerCase()}ne.exports=function r(l,_){if(d("noDeprecation"))return l;var E=!1;return function S(){if(!E){if(d("throwDeprecation"))throw new Error(_);d("traceDeprecation")?console.trace(_):console.warn(_),E=!0}return l.apply(this,arguments)}}},94372:(ne,r,d)=>{"use strict";var l=d(42031);ne.exports=function(E){return!!l(E)}},11451:ne=>{ne.exports=function(d){return d&&"object"==typeof d&&"function"==typeof d.copy&&"function"==typeof d.fill&&"function"==typeof d.readUInt8}},78791:(ne,r,d)=>{"use strict";var l=d(13407),_=d(20110),E=d(42031),S=d(94372);function a(Ue){return Ue.call.bind(Ue)}var h=typeof BigInt<"u",g=typeof Symbol<"u",y=a(Object.prototype.toString),v=a(Number.prototype.valueOf),b=a(String.prototype.valueOf),A=a(Boolean.prototype.valueOf);if(h)var O=a(BigInt.prototype.valueOf);if(g)var C=a(Symbol.prototype.valueOf);function T(Ue,_t){if("object"!=typeof Ue)return!1;try{return _t(Ue),!0}catch{return!1}}function o(Ue){return"[object Map]"===y(Ue)}function m(Ue){return"[object Set]"===y(Ue)}function x(Ue){return"[object WeakMap]"===y(Ue)}function G(Ue){return"[object WeakSet]"===y(Ue)}function p(Ue){return"[object ArrayBuffer]"===y(Ue)}function B(Ue){return!(typeof ArrayBuffer>"u")&&(p.working?p(Ue):Ue instanceof ArrayBuffer)}function ie(Ue){return"[object DataView]"===y(Ue)}function te(Ue){return!(typeof DataView>"u")&&(ie.working?ie(Ue):Ue instanceof DataView)}r.isArgumentsObject=l,r.isGeneratorFunction=_,r.isTypedArray=S,r.isPromise=function N(Ue){return typeof Promise<"u"&&Ue instanceof Promise||null!==Ue&&"object"==typeof Ue&&"function"==typeof Ue.then&&"function"==typeof Ue.catch},r.isArrayBufferView=function M(Ue){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(Ue):S(Ue)||te(Ue)},r.isUint8Array=function P(Ue){return"Uint8Array"===E(Ue)},r.isUint8ClampedArray=function R(Ue){return"Uint8ClampedArray"===E(Ue)},r.isUint16Array=function L(Ue){return"Uint16Array"===E(Ue)},r.isUint32Array=function H(Ue){return"Uint32Array"===E(Ue)},r.isInt8Array=function V(Ue){return"Int8Array"===E(Ue)},r.isInt16Array=function J(Ue){return"Int16Array"===E(Ue)},r.isInt32Array=function Y(Ue){return"Int32Array"===E(Ue)},r.isFloat32Array=function Z(Ue){return"Float32Array"===E(Ue)},r.isFloat64Array=function W(Ue){return"Float64Array"===E(Ue)},r.isBigInt64Array=function Q(Ue){return"BigInt64Array"===E(Ue)},r.isBigUint64Array=function D(Ue){return"BigUint64Array"===E(Ue)},o.working=typeof Map<"u"&&o(new Map),r.isMap=function u(Ue){return!(typeof Map>"u")&&(o.working?o(Ue):Ue instanceof Map)},m.working=typeof Set<"u"&&m(new Set),r.isSet=function w(Ue){return!(typeof Set>"u")&&(m.working?m(Ue):Ue instanceof Set)},x.working=typeof WeakMap<"u"&&x(new WeakMap),r.isWeakMap=function F(Ue){return!(typeof WeakMap>"u")&&(x.working?x(Ue):Ue instanceof WeakMap)},G.working=typeof WeakSet<"u"&&G(new WeakSet),r.isWeakSet=function k(Ue){return G(Ue)},p.working=typeof ArrayBuffer<"u"&&p(new ArrayBuffer),r.isArrayBuffer=B,ie.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&ie(new DataView(new ArrayBuffer(1),0,1)),r.isDataView=te;var ee=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ue(Ue){return"[object SharedArrayBuffer]"===y(Ue)}function we(Ue){return!(typeof ee>"u")&&(typeof ue.working>"u"&&(ue.working=ue(new ee)),ue.working?ue(Ue):Ue instanceof ee)}function de(Ue){return T(Ue,v)}function ae(Ue){return T(Ue,b)}function ye(Ue){return T(Ue,A)}function Ce(Ue){return h&&T(Ue,O)}function Pe(Ue){return g&&T(Ue,C)}r.isSharedArrayBuffer=we,r.isAsyncFunction=function me(Ue){return"[object AsyncFunction]"===y(Ue)},r.isMapIterator=function ve(Ue){return"[object Map Iterator]"===y(Ue)},r.isSetIterator=function ce(Ue){return"[object Set Iterator]"===y(Ue)},r.isGeneratorObject=function he(Ue){return"[object Generator]"===y(Ue)},r.isWebAssemblyCompiledModule=function le(Ue){return"[object WebAssembly.Module]"===y(Ue)},r.isNumberObject=de,r.isStringObject=ae,r.isBooleanObject=ye,r.isBigIntObject=Ce,r.isSymbolObject=Pe,r.isBoxedPrimitive=function Ge(Ue){return de(Ue)||ae(Ue)||ye(Ue)||Ce(Ue)||Pe(Ue)},r.isAnyArrayBuffer=function Ve(Ue){return typeof Uint8Array<"u"&&(B(Ue)||we(Ue))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Ue){Object.defineProperty(r,Ue,{enumerable:!1,value:function(){throw new Error(Ue+" is not supported in userland")}})})},26788:(ne,r,d)=>{var l=Object.getOwnPropertyDescriptors||function(te){for(var ee=Object.keys(te),ue={},we=0;we=we)return ce;switch(ce){case"%s":return String(ue[ee++]);case"%d":return Number(ue[ee++]);case"%j":try{return JSON.stringify(ue[ee++])}catch{return"[Circular]"}default:return ce}}),ve=ue[ee];ee"u")return function(){return r.deprecate(ie,te).apply(this,arguments)};var ee=!1;return function ue(){if(!ee){if(process.throwDeprecation)throw new Error(te);process.traceDeprecation?console.trace(te):console.error(te),ee=!0}return ie.apply(this,arguments)}};var E={},S=/^$/;if(process.env.NODE_DEBUG){var a=process.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),S=new RegExp("^"+a+"$","i")}function h(ie,te){var ee={seen:[],stylize:y};return arguments.length>=3&&(ee.depth=arguments[2]),arguments.length>=4&&(ee.colors=arguments[3]),P(te)?ee.showHidden=te:te&&r._extend(ee,te),Y(ee.showHidden)&&(ee.showHidden=!1),Y(ee.depth)&&(ee.depth=2),Y(ee.colors)&&(ee.colors=!1),Y(ee.customInspect)&&(ee.customInspect=!0),ee.colors&&(ee.stylize=g),b(ee,ie,ee.depth)}function g(ie,te){var ee=h.styles[te];return ee?"\x1b["+h.colors[ee][0]+"m"+ie+"\x1b["+h.colors[ee][1]+"m":ie}function y(ie,te){return ie}function b(ie,te,ee){if(ie.customInspect&&te&&o(te.inspect)&&te.inspect!==r.inspect&&(!te.constructor||te.constructor.prototype!==te)){var ue=te.inspect(ee,ie);return V(ue)||(ue=b(ie,ue,ee)),ue}var we=function A(ie,te){if(Y(te))return ie.stylize("undefined","undefined");if(V(te)){var ee="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ie.stylize(ee,"string")}if(H(te))return ie.stylize(""+te,"number");if(P(te))return ie.stylize(""+te,"boolean");if(R(te))return ie.stylize("null","null")}(ie,te);if(we)return we;var me=Object.keys(te),ve=function v(ie){var te={};return ie.forEach(function(ee,ue){te[ee]=!0}),te}(me);if(ie.showHidden&&(me=Object.getOwnPropertyNames(te)),D(te)&&(me.indexOf("message")>=0||me.indexOf("description")>=0))return O(te);if(0===me.length){if(o(te)){var ce=te.name?": "+te.name:"";return ie.stylize("[Function"+ce+"]","special")}if(Z(te))return ie.stylize(RegExp.prototype.toString.call(te),"regexp");if(Q(te))return ie.stylize(Date.prototype.toString.call(te),"date");if(D(te))return O(te)}var ye,he="",le=!1,de=["{","}"];(M(te)&&(le=!0,de=["[","]"]),o(te))&&(he=" [Function"+(te.name?": "+te.name:"")+"]");return Z(te)&&(he=" "+RegExp.prototype.toString.call(te)),Q(te)&&(he=" "+Date.prototype.toUTCString.call(te)),D(te)&&(he=" "+O(te)),0!==me.length||le&&0!=te.length?ee<0?Z(te)?ie.stylize(RegExp.prototype.toString.call(te),"regexp"):ie.stylize("[Object]","special"):(ie.seen.push(te),ye=le?function C(ie,te,ee,ue,we){for(var me=[],ve=0,ce=te.length;ve=0&&0,me+ve.replace(/\u001b\[\d\d?m/g,"").length+1},0);return we>60?ee[0]+(""===te?"":te+"\n ")+" "+ie.join(",\n ")+" "+ee[1]:ee[0]+te+" "+ie.join(", ")+" "+ee[1]}(ye,he,de)):de[0]+he+de[1]}function O(ie){return"["+Error.prototype.toString.call(ie)+"]"}function T(ie,te,ee,ue,we,me){var ve,ce,he;if((he=Object.getOwnPropertyDescriptor(te,we)||{value:te[we]}).get?ce=he.set?ie.stylize("[Getter/Setter]","special"):ie.stylize("[Getter]","special"):he.set&&(ce=ie.stylize("[Setter]","special")),G(ue,we)||(ve="["+we+"]"),ce||(ie.seen.indexOf(he.value)<0?(ce=R(ee)?b(ie,he.value,null):b(ie,he.value,ee-1)).indexOf("\n")>-1&&(ce=me?ce.split("\n").map(function(le){return" "+le}).join("\n").slice(2):"\n"+ce.split("\n").map(function(le){return" "+le}).join("\n")):ce=ie.stylize("[Circular]","special")),Y(ve)){if(me&&we.match(/^\d+$/))return ce;(ve=JSON.stringify(""+we)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ve=ve.slice(1,-1),ve=ie.stylize(ve,"name")):(ve=ve.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ve=ie.stylize(ve,"string"))}return ve+": "+ce}function M(ie){return Array.isArray(ie)}function P(ie){return"boolean"==typeof ie}function R(ie){return null===ie}function H(ie){return"number"==typeof ie}function V(ie){return"string"==typeof ie}function Y(ie){return void 0===ie}function Z(ie){return W(ie)&&"[object RegExp]"===m(ie)}function W(ie){return"object"==typeof ie&&null!==ie}function Q(ie){return W(ie)&&"[object Date]"===m(ie)}function D(ie){return W(ie)&&("[object Error]"===m(ie)||ie instanceof Error)}function o(ie){return"function"==typeof ie}function m(ie){return Object.prototype.toString.call(ie)}function w(ie){return ie<10?"0"+ie.toString(10):ie.toString(10)}r.debuglog=function(ie){if(ie=ie.toUpperCase(),!E[ie])if(S.test(ie)){var te=process.pid;E[ie]=function(){var ee=r.format.apply(r,arguments);console.error("%s %d: %s",ie,te,ee)}}else E[ie]=function(){};return E[ie]},r.inspect=h,h.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},h.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.types=d(78791),r.isArray=M,r.isBoolean=P,r.isNull=R,r.isNullOrUndefined=function L(ie){return null==ie},r.isNumber=H,r.isString=V,r.isSymbol=function J(ie){return"symbol"==typeof ie},r.isUndefined=Y,r.isRegExp=Z,r.types.isRegExp=Z,r.isObject=W,r.isDate=Q,r.types.isDate=Q,r.isError=D,r.types.isNativeError=D,r.isFunction=o,r.isPrimitive=function u(ie){return null===ie||"boolean"==typeof ie||"number"==typeof ie||"string"==typeof ie||"symbol"==typeof ie||typeof ie>"u"},r.isBuffer=d(11451);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(ie,te){return Object.prototype.hasOwnProperty.call(ie,te)}r.log=function(){console.log("%s - %s",function F(){var ie=new Date,te=[w(ie.getHours()),w(ie.getMinutes()),w(ie.getSeconds())].join(":");return[ie.getDate(),x[ie.getMonth()],te].join(" ")}(),r.format.apply(r,arguments))},r.inherits=d(83894),r._extend=function(ie,te){if(!te||!W(te))return ie;for(var ee=Object.keys(te),ue=ee.length;ue--;)ie[ee[ue]]=te[ee[ue]];return ie};var k=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function p(ie,te){if(!ie){var ee=new Error("Promise was rejected with a falsy value");ee.reason=ie,ie=ee}return te(ie)}r.promisify=function(te){if("function"!=typeof te)throw new TypeError('The "original" argument must be of type Function');if(k&&te[k]){var ee;if("function"!=typeof(ee=te[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ee,k,{value:ee,enumerable:!1,writable:!1,configurable:!0}),ee}function ee(){for(var ue,we,me=new Promise(function(he,le){ue=he,we=le}),ve=[],ce=0;ce{"use strict";var l=d(9435),_=d(87029),E=d(55685),S=d(75834),a=d(47378),h=S("Object.prototype.toString"),g=d(46259)(),y=typeof globalThis>"u"?global:globalThis,v=_(),b=S("String.prototype.slice"),A=Object.getPrototypeOf,O=S("Array.prototype.indexOf",!0)||function(P,R){for(var L=0;L-1?R:"Object"===R&&function(P){var R=!1;return l(C,function(L,H){if(!R)try{L(P),R=b(H,1)}catch{}}),R}(P)}return a?function(P){var R=!1;return l(C,function(L,H){if(!R)try{"$"+L(P)===H&&(R=b(H,1))}catch{}}),R}(P):null}},99136:ne=>{ne.exports=function r(d,l){if(d&&l)return r(d)(l);if("function"!=typeof d)throw new TypeError("need wrapper function");return Object.keys(d).forEach(function(E){_[E]=d[E]}),_;function _(){for(var E=new Array(arguments.length),S=0;S{ne.exports=function r(){for(var d={},l=0;l{"use strict";ne.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let d=this.head;d;d=d.next)yield d.value}}},47245:(ne,r,d)=>{"use strict";function l(h){var g=this;if(g instanceof l||(g=new l),g.tail=null,g.head=null,g.length=0,h&&"function"==typeof h.forEach)h.forEach(function(b){g.push(b)});else if(arguments.length>0)for(var y=0,v=arguments.length;y1)y=g;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");v=this.head.next,y=this.head.value}for(var b=0;null!==v;b++)y=h(y,v.value,b),v=v.next;return y},l.prototype.reduceReverse=function(h,g){var y,v=this.tail;if(arguments.length>1)y=g;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");v=this.tail.prev,y=this.tail.value}for(var b=this.length-1;null!==v;b--)y=h(y,v.value,b),v=v.prev;return y},l.prototype.toArray=function(){for(var h=new Array(this.length),g=0,y=this.head;null!==y;g++)h[g]=y.value,y=y.next;return h},l.prototype.toArrayReverse=function(){for(var h=new Array(this.length),g=0,y=this.tail;null!==y;g++)h[g]=y.value,y=y.prev;return h},l.prototype.slice=function(h,g){(g=g||this.length)<0&&(g+=this.length),(h=h||0)<0&&(h+=this.length);var y=new l;if(gthis.length&&(g=this.length);for(var v=0,b=this.head;null!==b&&vthis.length&&(g=this.length);for(var v=this.length,b=this.tail;null!==b&&v>g;v--)b=b.prev;for(;null!==b&&v>h;v--,b=b.prev)y.push(b.value);return y},l.prototype.splice=function(h,g,...y){h>this.length&&(h=this.length-1),h<0&&(h=this.length+h);for(var v=0,b=this.head;null!==b&&v{"use strict";d.r(r),d.d(r,{__assign:()=>E,__asyncDelegator:()=>R,__asyncGenerator:()=>P,__asyncValues:()=>L,__await:()=>M,__awaiter:()=>y,__classPrivateFieldGet:()=>Y,__classPrivateFieldSet:()=>Z,__createBinding:()=>b,__decorate:()=>a,__exportStar:()=>A,__extends:()=>_,__generator:()=>v,__importDefault:()=>J,__importStar:()=>V,__makeTemplateObject:()=>H,__metadata:()=>g,__param:()=>h,__read:()=>C,__rest:()=>S,__spread:()=>T,__spreadArrays:()=>N,__values:()=>O});var l=function(W,Q){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,o){D.__proto__=o}||function(D,o){for(var u in o)o.hasOwnProperty(u)&&(D[u]=o[u])})(W,Q)};function _(W,Q){function D(){this.constructor=W}l(W,Q),W.prototype=null===Q?Object.create(Q):(D.prototype=Q.prototype,new D)}var E=function(){return E=Object.assign||function(Q){for(var D,o=1,u=arguments.length;o=0;x--)(w=W[x])&&(m=(u<3?w(m):u>3?w(Q,D,m):w(Q,D))||m);return u>3&&m&&Object.defineProperty(Q,D,m),m}function h(W,Q){return function(D,o){Q(D,o,W)}}function g(W,Q){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(W,Q)}function y(W,Q,D,o){return new(D||(D=Promise))(function(m,w){function x(k){try{G(o.next(k))}catch(p){w(p)}}function F(k){try{G(o.throw(k))}catch(p){w(p)}}function G(k){k.done?m(k.value):function u(m){return m instanceof D?m:new D(function(w){w(m)})}(k.value).then(x,F)}G((o=o.apply(W,Q||[])).next())})}function v(W,Q){var o,u,m,w,D={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return w={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(w[Symbol.iterator]=function(){return this}),w;function x(G){return function(k){return function F(G){if(o)throw new TypeError("Generator is already executing.");for(;D;)try{if(o=1,u&&(m=2&G[0]?u.return:G[0]?u.throw||((m=u.return)&&m.call(u),0):u.next)&&!(m=m.call(u,G[1])).done)return m;switch(u=0,m&&(G=[2&G[0],m.value]),G[0]){case 0:case 1:m=G;break;case 4:return D.label++,{value:G[1],done:!1};case 5:D.label++,u=G[1],G=[0];continue;case 7:G=D.ops.pop(),D.trys.pop();continue;default:if(!(m=(m=D.trys).length>0&&m[m.length-1])&&(6===G[0]||2===G[0])){D=0;continue}if(3===G[0]&&(!m||G[1]>m[0]&&G[1]=W.length&&(W=void 0),{value:W&&W[o++],done:!W}}};throw new TypeError(Q?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(W,Q){var D="function"==typeof Symbol&&W[Symbol.iterator];if(!D)return W;var u,w,o=D.call(W),m=[];try{for(;(void 0===Q||Q-- >0)&&!(u=o.next()).done;)m.push(u.value)}catch(x){w={error:x}}finally{try{u&&!u.done&&(D=o.return)&&D.call(o)}finally{if(w)throw w.error}}return m}function T(){for(var W=[],Q=0;Q1||x(B,ie)})})}function x(B,ie){try{!function F(B){B.value instanceof M?Promise.resolve(B.value.v).then(G,k):p(m[0][2],B)}(o[B](ie))}catch(te){p(m[0][3],te)}}function G(B){x("next",B)}function k(B){x("throw",B)}function p(B,ie){B(ie),m.shift(),m.length&&x(m[0][0],m[0][1])}}function R(W){var Q,D;return Q={},o("next"),o("throw",function(u){throw u}),o("return"),Q[Symbol.iterator]=function(){return this},Q;function o(u,m){Q[u]=W[u]?function(w){return(D=!D)?{value:M(W[u](w)),done:"return"===u}:m?m(w):w}:m}}function L(W){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D,Q=W[Symbol.asyncIterator];return Q?Q.call(W):(W=O(W),D={},o("next"),o("throw"),o("return"),D[Symbol.asyncIterator]=function(){return this},D);function o(m){D[m]=W[m]&&function(w){return new Promise(function(x,F){(function u(m,w,x,F){Promise.resolve(F).then(function(G){m({value:G,done:x})},w)})(x,F,(w=W[m](w)).done,w.value)})}}}function H(W,Q){return Object.defineProperty?Object.defineProperty(W,"raw",{value:Q}):W.raw=Q,W}function V(W){if(W&&W.__esModule)return W;var Q={};if(null!=W)for(var D in W)Object.hasOwnProperty.call(W,D)&&(Q[D]=W[D]);return Q.default=W,Q}function J(W){return W&&W.__esModule?W:{default:W}}function Y(W,Q){if(!Q.has(W))throw new TypeError("attempted to get private field on non-instance");return Q.get(W)}function Z(W,Q,D){if(!Q.has(W))throw new TypeError("attempted to set private field on non-instance");return Q.set(W,D),D}},39653:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{__assign:()=>E,__asyncDelegator:()=>R,__asyncGenerator:()=>P,__asyncValues:()=>L,__await:()=>M,__awaiter:()=>y,__classPrivateFieldGet:()=>Y,__classPrivateFieldSet:()=>Z,__createBinding:()=>b,__decorate:()=>a,__exportStar:()=>A,__extends:()=>_,__generator:()=>v,__importDefault:()=>J,__importStar:()=>V,__makeTemplateObject:()=>H,__metadata:()=>g,__param:()=>h,__read:()=>C,__rest:()=>S,__spread:()=>T,__spreadArrays:()=>N,__values:()=>O});var l=function(W,Q){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,o){D.__proto__=o}||function(D,o){for(var u in o)o.hasOwnProperty(u)&&(D[u]=o[u])})(W,Q)};function _(W,Q){function D(){this.constructor=W}l(W,Q),W.prototype=null===Q?Object.create(Q):(D.prototype=Q.prototype,new D)}var E=function(){return E=Object.assign||function(Q){for(var D,o=1,u=arguments.length;o=0;x--)(w=W[x])&&(m=(u<3?w(m):u>3?w(Q,D,m):w(Q,D))||m);return u>3&&m&&Object.defineProperty(Q,D,m),m}function h(W,Q){return function(D,o){Q(D,o,W)}}function g(W,Q){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(W,Q)}function y(W,Q,D,o){return new(D||(D=Promise))(function(m,w){function x(k){try{G(o.next(k))}catch(p){w(p)}}function F(k){try{G(o.throw(k))}catch(p){w(p)}}function G(k){k.done?m(k.value):function u(m){return m instanceof D?m:new D(function(w){w(m)})}(k.value).then(x,F)}G((o=o.apply(W,Q||[])).next())})}function v(W,Q){var o,u,m,w,D={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return w={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(w[Symbol.iterator]=function(){return this}),w;function x(G){return function(k){return function F(G){if(o)throw new TypeError("Generator is already executing.");for(;D;)try{if(o=1,u&&(m=2&G[0]?u.return:G[0]?u.throw||((m=u.return)&&m.call(u),0):u.next)&&!(m=m.call(u,G[1])).done)return m;switch(u=0,m&&(G=[2&G[0],m.value]),G[0]){case 0:case 1:m=G;break;case 4:return D.label++,{value:G[1],done:!1};case 5:D.label++,u=G[1],G=[0];continue;case 7:G=D.ops.pop(),D.trys.pop();continue;default:if(!(m=(m=D.trys).length>0&&m[m.length-1])&&(6===G[0]||2===G[0])){D=0;continue}if(3===G[0]&&(!m||G[1]>m[0]&&G[1]=W.length&&(W=void 0),{value:W&&W[o++],done:!W}}};throw new TypeError(Q?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(W,Q){var D="function"==typeof Symbol&&W[Symbol.iterator];if(!D)return W;var u,w,o=D.call(W),m=[];try{for(;(void 0===Q||Q-- >0)&&!(u=o.next()).done;)m.push(u.value)}catch(x){w={error:x}}finally{try{u&&!u.done&&(D=o.return)&&D.call(o)}finally{if(w)throw w.error}}return m}function T(){for(var W=[],Q=0;Q1||x(B,ie)})})}function x(B,ie){try{!function F(B){B.value instanceof M?Promise.resolve(B.value.v).then(G,k):p(m[0][2],B)}(o[B](ie))}catch(te){p(m[0][3],te)}}function G(B){x("next",B)}function k(B){x("throw",B)}function p(B,ie){B(ie),m.shift(),m.length&&x(m[0][0],m[0][1])}}function R(W){var Q,D;return Q={},o("next"),o("throw",function(u){throw u}),o("return"),Q[Symbol.iterator]=function(){return this},Q;function o(u,m){Q[u]=W[u]?function(w){return(D=!D)?{value:M(W[u](w)),done:"return"===u}:m?m(w):w}:m}}function L(W){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D,Q=W[Symbol.asyncIterator];return Q?Q.call(W):(W=O(W),D={},o("next"),o("throw"),o("return"),D[Symbol.asyncIterator]=function(){return this},D);function o(m){D[m]=W[m]&&function(w){return new Promise(function(x,F){(function u(m,w,x,F){Promise.resolve(F).then(function(G){m({value:G,done:x})},w)})(x,F,(w=W[m](w)).done,w.value)})}}}function H(W,Q){return Object.defineProperty?Object.defineProperty(W,"raw",{value:Q}):W.raw=Q,W}function V(W){if(W&&W.__esModule)return W;var Q={};if(null!=W)for(var D in W)Object.hasOwnProperty.call(W,D)&&(Q[D]=W[D]);return Q.default=W,Q}function J(W){return W&&W.__esModule?W:{default:W}}function Y(W,Q){if(!Q.has(W))throw new TypeError("attempted to get private field on non-instance");return Q.get(W)}function Z(W,Q,D){if(!Q.has(W))throw new TypeError("attempted to set private field on non-instance");return Q.set(W,D),D}},57121:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{__assign:()=>E,__asyncDelegator:()=>R,__asyncGenerator:()=>P,__asyncValues:()=>L,__await:()=>M,__awaiter:()=>y,__classPrivateFieldGet:()=>Y,__classPrivateFieldSet:()=>Z,__createBinding:()=>b,__decorate:()=>a,__exportStar:()=>A,__extends:()=>_,__generator:()=>v,__importDefault:()=>J,__importStar:()=>V,__makeTemplateObject:()=>H,__metadata:()=>g,__param:()=>h,__read:()=>C,__rest:()=>S,__spread:()=>T,__spreadArrays:()=>N,__values:()=>O});var l=function(W,Q){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,o){D.__proto__=o}||function(D,o){for(var u in o)o.hasOwnProperty(u)&&(D[u]=o[u])})(W,Q)};function _(W,Q){function D(){this.constructor=W}l(W,Q),W.prototype=null===Q?Object.create(Q):(D.prototype=Q.prototype,new D)}var E=function(){return E=Object.assign||function(Q){for(var D,o=1,u=arguments.length;o=0;x--)(w=W[x])&&(m=(u<3?w(m):u>3?w(Q,D,m):w(Q,D))||m);return u>3&&m&&Object.defineProperty(Q,D,m),m}function h(W,Q){return function(D,o){Q(D,o,W)}}function g(W,Q){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(W,Q)}function y(W,Q,D,o){return new(D||(D=Promise))(function(m,w){function x(k){try{G(o.next(k))}catch(p){w(p)}}function F(k){try{G(o.throw(k))}catch(p){w(p)}}function G(k){k.done?m(k.value):function u(m){return m instanceof D?m:new D(function(w){w(m)})}(k.value).then(x,F)}G((o=o.apply(W,Q||[])).next())})}function v(W,Q){var o,u,m,w,D={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return w={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(w[Symbol.iterator]=function(){return this}),w;function x(G){return function(k){return function F(G){if(o)throw new TypeError("Generator is already executing.");for(;D;)try{if(o=1,u&&(m=2&G[0]?u.return:G[0]?u.throw||((m=u.return)&&m.call(u),0):u.next)&&!(m=m.call(u,G[1])).done)return m;switch(u=0,m&&(G=[2&G[0],m.value]),G[0]){case 0:case 1:m=G;break;case 4:return D.label++,{value:G[1],done:!1};case 5:D.label++,u=G[1],G=[0];continue;case 7:G=D.ops.pop(),D.trys.pop();continue;default:if(!(m=(m=D.trys).length>0&&m[m.length-1])&&(6===G[0]||2===G[0])){D=0;continue}if(3===G[0]&&(!m||G[1]>m[0]&&G[1]=W.length&&(W=void 0),{value:W&&W[o++],done:!W}}};throw new TypeError(Q?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(W,Q){var D="function"==typeof Symbol&&W[Symbol.iterator];if(!D)return W;var u,w,o=D.call(W),m=[];try{for(;(void 0===Q||Q-- >0)&&!(u=o.next()).done;)m.push(u.value)}catch(x){w={error:x}}finally{try{u&&!u.done&&(D=o.return)&&D.call(o)}finally{if(w)throw w.error}}return m}function T(){for(var W=[],Q=0;Q1||x(B,ie)})})}function x(B,ie){try{!function F(B){B.value instanceof M?Promise.resolve(B.value.v).then(G,k):p(m[0][2],B)}(o[B](ie))}catch(te){p(m[0][3],te)}}function G(B){x("next",B)}function k(B){x("throw",B)}function p(B,ie){B(ie),m.shift(),m.length&&x(m[0][0],m[0][1])}}function R(W){var Q,D;return Q={},o("next"),o("throw",function(u){throw u}),o("return"),Q[Symbol.iterator]=function(){return this},Q;function o(u,m){Q[u]=W[u]?function(w){return(D=!D)?{value:M(W[u](w)),done:"return"===u}:m?m(w):w}:m}}function L(W){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D,Q=W[Symbol.asyncIterator];return Q?Q.call(W):(W=O(W),D={},o("next"),o("throw"),o("return"),D[Symbol.asyncIterator]=function(){return this},D);function o(m){D[m]=W[m]&&function(w){return new Promise(function(x,F){(function u(m,w,x,F){Promise.resolve(F).then(function(G){m({value:G,done:x})},w)})(x,F,(w=W[m](w)).done,w.value)})}}}function H(W,Q){return Object.defineProperty?Object.defineProperty(W,"raw",{value:Q}):W.raw=Q,W}function V(W){if(W&&W.__esModule)return W;var Q={};if(null!=W)for(var D in W)Object.hasOwnProperty.call(W,D)&&(Q[D]=W[D]);return Q.default=W,Q}function J(W){return W&&W.__esModule?W:{default:W}}function Y(W,Q){if(!Q.has(W))throw new TypeError("attempted to get private field on non-instance");return Q.get(W)}function Z(W,Q,D){if(!Q.has(W))throw new TypeError("attempted to set private field on non-instance");return Q.set(W,D),D}},30004:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{__assign:()=>E,__asyncDelegator:()=>R,__asyncGenerator:()=>P,__asyncValues:()=>L,__await:()=>M,__awaiter:()=>y,__classPrivateFieldGet:()=>Y,__classPrivateFieldSet:()=>Z,__createBinding:()=>b,__decorate:()=>a,__exportStar:()=>A,__extends:()=>_,__generator:()=>v,__importDefault:()=>J,__importStar:()=>V,__makeTemplateObject:()=>H,__metadata:()=>g,__param:()=>h,__read:()=>C,__rest:()=>S,__spread:()=>T,__spreadArrays:()=>N,__values:()=>O});var l=function(W,Q){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,o){D.__proto__=o}||function(D,o){for(var u in o)o.hasOwnProperty(u)&&(D[u]=o[u])})(W,Q)};function _(W,Q){function D(){this.constructor=W}l(W,Q),W.prototype=null===Q?Object.create(Q):(D.prototype=Q.prototype,new D)}var E=function(){return E=Object.assign||function(Q){for(var D,o=1,u=arguments.length;o=0;x--)(w=W[x])&&(m=(u<3?w(m):u>3?w(Q,D,m):w(Q,D))||m);return u>3&&m&&Object.defineProperty(Q,D,m),m}function h(W,Q){return function(D,o){Q(D,o,W)}}function g(W,Q){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(W,Q)}function y(W,Q,D,o){return new(D||(D=Promise))(function(m,w){function x(k){try{G(o.next(k))}catch(p){w(p)}}function F(k){try{G(o.throw(k))}catch(p){w(p)}}function G(k){k.done?m(k.value):function u(m){return m instanceof D?m:new D(function(w){w(m)})}(k.value).then(x,F)}G((o=o.apply(W,Q||[])).next())})}function v(W,Q){var o,u,m,w,D={label:0,sent:function(){if(1&m[0])throw m[1];return m[1]},trys:[],ops:[]};return w={next:x(0),throw:x(1),return:x(2)},"function"==typeof Symbol&&(w[Symbol.iterator]=function(){return this}),w;function x(G){return function(k){return function F(G){if(o)throw new TypeError("Generator is already executing.");for(;D;)try{if(o=1,u&&(m=2&G[0]?u.return:G[0]?u.throw||((m=u.return)&&m.call(u),0):u.next)&&!(m=m.call(u,G[1])).done)return m;switch(u=0,m&&(G=[2&G[0],m.value]),G[0]){case 0:case 1:m=G;break;case 4:return D.label++,{value:G[1],done:!1};case 5:D.label++,u=G[1],G=[0];continue;case 7:G=D.ops.pop(),D.trys.pop();continue;default:if(!(m=(m=D.trys).length>0&&m[m.length-1])&&(6===G[0]||2===G[0])){D=0;continue}if(3===G[0]&&(!m||G[1]>m[0]&&G[1]=W.length&&(W=void 0),{value:W&&W[o++],done:!W}}};throw new TypeError(Q?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(W,Q){var D="function"==typeof Symbol&&W[Symbol.iterator];if(!D)return W;var u,w,o=D.call(W),m=[];try{for(;(void 0===Q||Q-- >0)&&!(u=o.next()).done;)m.push(u.value)}catch(x){w={error:x}}finally{try{u&&!u.done&&(D=o.return)&&D.call(o)}finally{if(w)throw w.error}}return m}function T(){for(var W=[],Q=0;Q1||x(B,ie)})})}function x(B,ie){try{!function F(B){B.value instanceof M?Promise.resolve(B.value.v).then(G,k):p(m[0][2],B)}(o[B](ie))}catch(te){p(m[0][3],te)}}function G(B){x("next",B)}function k(B){x("throw",B)}function p(B,ie){B(ie),m.shift(),m.length&&x(m[0][0],m[0][1])}}function R(W){var Q,D;return Q={},o("next"),o("throw",function(u){throw u}),o("return"),Q[Symbol.iterator]=function(){return this},Q;function o(u,m){Q[u]=W[u]?function(w){return(D=!D)?{value:M(W[u](w)),done:"return"===u}:m?m(w):w}:m}}function L(W){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var D,Q=W[Symbol.asyncIterator];return Q?Q.call(W):(W=O(W),D={},o("next"),o("throw"),o("return"),D[Symbol.asyncIterator]=function(){return this},D);function o(m){D[m]=W[m]&&function(w){return new Promise(function(x,F){(function u(m,w,x,F){Promise.resolve(F).then(function(G){m({value:G,done:x})},w)})(x,F,(w=W[m](w)).done,w.value)})}}}function H(W,Q){return Object.defineProperty?Object.defineProperty(W,"raw",{value:Q}):W.raw=Q,W}function V(W){if(W&&W.__esModule)return W;var Q={};if(null!=W)for(var D in W)Object.hasOwnProperty.call(W,D)&&(Q[D]=W[D]);return Q.default=W,Q}function J(W){return W&&W.__esModule?W:{default:W}}function Y(W,Q){if(!Q.has(W))throw new TypeError("attempted to get private field on non-instance");return Q.get(W)}function Z(W,Q,D){if(!Q.has(W))throw new TypeError("attempted to set private field on non-instance");return Q.set(W,D),D}},80950:()=>{},46601:()=>{},96419:()=>{},56353:()=>{},7716:()=>{},53383:()=>{},8623:()=>{},7748:()=>{},85568:()=>{},6297:()=>{},70131:()=>{},94093:()=>{},61695:()=>{},56619:()=>{},77108:()=>{},52361:()=>{},94616:()=>{},59344:ne=>{function r(l,_,E,S,a,h,g){try{var y=l[h](g),v=y.value}catch(b){return void E(b)}y.done?_(v):Promise.resolve(v).then(S,a)}ne.exports=function d(l){return function(){var _=this,E=arguments;return new Promise(function(S,a){var h=l.apply(_,E);function g(v){r(h,S,a,g,y,"next",v)}function y(v){r(h,S,a,g,y,"throw",v)}g(void 0)})}},ne.exports.__esModule=!0,ne.exports.default=ne.exports},82253:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(a,h,g,y){return new(g||(g=Promise))(function(b,A){function O(N){try{T(y.next(N))}catch(M){A(M)}}function C(N){try{T(y.throw(N))}catch(M){A(M)}}function T(N){N.done?b(N.value):function v(b){return b instanceof g?b:new g(function(A){A(b)})}(N.value).then(O,C)}T((y=y.apply(a,h||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.HereKeyStore=void 0;const _=d(35802),E=d(37996);r.HereKeyStore=class S{constructor(h=new E.StateStorage){this.storage=h}setActiveAccount(h,g){return l(this,void 0,void 0,function*(){const y=yield this.storage.getState(h);y.activeAccount=g,this.storage.setState(h,y)})}setKey(h,g,y){return l(this,void 0,void 0,function*(){const v=yield this.storage.getState(h);v.accounts[g]=y.toString(),this.storage.setState(h,v)})}getAccounts(h){return l(this,void 0,void 0,function*(){const g=yield this.storage.getState(h);return Object.keys(g.accounts)})}getActiveAccount(h){return l(this,void 0,void 0,function*(){return(yield this.storage.getState(h)).activeAccount})}getKey(h,g){return l(this,void 0,void 0,function*(){const v=(yield this.storage.getState(h)).accounts[g];if(null==v)throw Error(`For ${g} in ${h} network key not found`);return _.KeyPair.fromString(v)})}removeKey(h,g){return l(this,void 0,void 0,function*(){let y=yield this.storage.getState(h);y.activeAccount===g&&(y.activeAccount=null),delete y.accounts[g],this.storage.setState(h,y)})}getNetworks(){return l(this,void 0,void 0,function*(){let h=yield this.storage.getFullState();return Object.keys(h.accounts)})}clear(){return l(this,void 0,void 0,function*(){yield this.storage.clear()})}}},37996:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(S,a,h,g){return new(h||(h=Promise))(function(v,b){function A(T){try{C(g.next(T))}catch(N){b(N)}}function O(T){try{C(g.throw(T))}catch(N){b(N)}}function C(T){T.done?v(T.value):function y(v){return v instanceof h?v:new h(function(b){b(v)})}(T.value).then(A,O)}C((g=g.apply(S,a||[])).next())})};Object.defineProperty(r,"__esModule",{value:!0}),r.StateStorage=void 0;const _=d(73530);r.StateStorage=class E{constructor(){this.dataKey="herewallet:keystore",_.waitInjectedHereWallet.then(a=>{a&&this.setState(a.network,{accounts:{[a.accountId]:a.publicKey},activeAccount:a.accountId})})}setState(a,h){return l(this,void 0,void 0,function*(){yield _.waitInjectedHereWallet;const g=yield this.getFullState();g[a]=h,window.localStorage.setItem(this.dataKey,JSON.stringify(g))})}getFullState(){return l(this,void 0,void 0,function*(){yield _.waitInjectedHereWallet;try{return JSON.parse(window.localStorage.getItem(this.dataKey))||{}}catch{return{}}})}getState(a){return l(this,void 0,void 0,function*(){return yield _.waitInjectedHereWallet,(yield this.getFullState())[a]||{activeAccount:null,accounts:{}}})}clear(){return l(this,void 0,void 0,function*(){window.localStorage.removeItem(this.dataKey)})}}},45173:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WidgetStrategy=r.defaultUrl=void 0;r.defaultUrl="https://my.herewallet.app/connector/index.html";class l{constructor(E={widget:r.defaultUrl,lazy:!1}){this.options={lazy:"object"==typeof E&&E.lazy||!1,widget:"string"==typeof E?E:E.widget||r.defaultUrl},this.options.lazy||this.initIframe()}initIframe(){return null==l.connector&&(l.connector=(_=>{const E=document.createElement("iframe");return E.src=_,E.allow="usb",E.style.border="none",E.style.zIndex="10000",E.style.position="fixed",E.style.display="none",E.style.top="0",E.style.left="0",E.style.width="100%",E.style.height="100%",document.body.appendChild(E),E})(this.options.widget),l.connector.addEventListener("load",()=>{l.isLoaded=!0})),l.connector}onRequested(E,S,a){const h=this.initIframe();h.style.display="block";const g=()=>{var y,v,b;null===(y=l.connector)||void 0===y||y.removeEventListener("load",g),null===(b=null===(v=l.connector)||void 0===v?void 0:v.contentWindow)||void 0===b||b.postMessage(JSON.stringify({type:"request",payload:{id:E,request:S}}),new URL(this.options.widget).origin)};l.isLoaded?g():h.addEventListener("load",g),this.messageHandler=y=>{try{if(y.origin!==new URL(this.options.widget).origin)return;"reject"===JSON.parse(y.data).type&&a()}catch{}},window.addEventListener("message",this.messageHandler)}postMessage(E){var S;const a=this.initIframe(),h=JSON.stringify(E),g=new URL(this.options.widget).origin;null===(S=a.contentWindow)||void 0===S||S.postMessage(h,g)}onApproving(){this.postMessage({type:"approving"})}onSuccess(E){console.log(E),this.postMessage({type:"result",payload:{request:E}}),this.close()}onFailed(E){this.postMessage({type:"result",payload:{request:E}}),this.close()}close(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0),l.connector&&(l.connector.style.display="none")}}r.WidgetStrategy=l,l.isLoaded=!1},55217:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WindowStrategy=void 0;r.WindowStrategy=class d{constructor(_="https://my.herewallet.app"){this.endpoint=_,this.signWindow=null,this.onFailed=()=>this.close(),this.onSuccess=()=>this.close()}onInitialized(){if(this.signWindow)return;const _=window.innerWidth/2-210,E=window.innerHeight/2-350;this.signWindow=window.open(`${this.endpoint}/loading`,"_blank",`popup=1,width=420,height=700,top=${E},left=${_}`)}onRequested(_,E,S){null!=this.signWindow&&(this.unloadHandler=()=>{var a;return null===(a=this.signWindow)||void 0===a?void 0:a.close()},window.addEventListener("beforeunload",this.unloadHandler),this.signWindow.location=`${this.endpoint}/request/${_}`,this.timerHandler=setInterval(()=>{var a;null!==(a=this.signWindow)&&void 0!==a&&a.closed&&S("CLOSED")},1e3))}close(){var _;clearInterval(this.timerHandler),null===(_=this.signWindow)||void 0===_||_.close(),this.signWindow=null,this.unloadHandler&&window.removeEventListener("beforeunload",this.unloadHandler)}}},64099:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createAction=r.parseArgs=void 0;const l=d(98538),_=d(82692);r.parseArgs=h=>"string"==typeof h?Buffer.from(h,"base64"):h;r.createAction=h=>{switch(h.type){case"CreateAccount":return _.transactions.createAccount();case"DeployContract":{const{code:g}=h.params;return _.transactions.deployContract(g)}case"FunctionCall":{const{methodName:g,args:y,gas:v,deposit:b}=h.params;return _.transactions.functionCall(g,(0,r.parseArgs)(y),new l.BN(v),new l.BN(b))}case"Transfer":{const{deposit:g}=h.params;return _.transactions.transfer(new l.BN(g))}case"Stake":{const{stake:g,publicKey:y}=h.params;return _.transactions.stake(new l.BN(g),_.utils.PublicKey.from(y))}case"AddKey":{const{publicKey:g,accessKey:y}=h.params;return _.transactions.addKey(_.utils.PublicKey.from(g),(h=>{if("FullAccess"===h)return _.transactions.fullAccessKey();const{receiverId:g,methodNames:y=[]}=h,v=h.allowance?new l.BN(h.allowance):void 0;return _.transactions.functionCallAccessKey(g,y,v)})(y.permission))}case"DeleteKey":{const{publicKey:g}=h.params;return _.transactions.deleteKey(_.utils.PublicKey.from(g))}case"DeleteAccount":{const{beneficiaryId:g}=h.params;return _.transactions.deleteAccount(g)}default:throw new Error("Invalid action type")}}},19169:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},73530:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(v,b,A,O){return new(A||(A=Promise))(function(T,N){function M(L){try{R(O.next(L))}catch(H){N(H)}}function P(L){try{R(O.throw(L))}catch(H){N(H)}}function R(L){L.done?T(L.value):function C(T){return T instanceof A?T:new A(function(N){N(T)})}(L.value).then(M,P)}R((O=O.apply(v,b||[])).next())})},_=this&&this.__rest||function(v,b){var A={};for(var O in v)Object.prototype.hasOwnProperty.call(v,O)&&b.indexOf(O)<0&&(A[O]=v[O]);if(null!=v&&"function"==typeof Object.getOwnPropertySymbols){var C=0;for(O=Object.getOwnPropertySymbols(v);C{if(typeof window>"u"||window.self===window.top)return v(null);const b=A=>{"here-wallet-injected"===A.data.type&&(window.parent.postMessage("here-sdk-init","*"),window.removeEventListener("message",b),v({accountId:A.data.accountId,publicKey:A.data.publicKey,network:A.data.network||"mainnet"}))};window.addEventListener("message",b),setTimeout(()=>v(null),2e3)});r.proxyProvider=v=>l(void 0,void 0,void 0,function*(){if((yield r.waitInjectedHereWallet)&&typeof window<"u")return new Promise(P=>{const R=(0,S.default)(),L=H=>{if(H.data.id===R&&(H.data.status===h.HereProviderStatus.SUCCESS||H.data.status===h.HereProviderStatus.FAILED))return window.removeEventListener("message",L),P(H.data)};window.parent.postMessage(Object.assign(Object.assign({$here:!0},v.request),{id:R}),"*"),window.addEventListener("message",L)});let{strategy:A,request:O,disableCleanupRequest:C,id:T,signal:N}=v,M=_(v,["strategy","request","disableCleanupRequest","id","signal"]);return null!=T?O=yield(0,g.getRequest)(T,N):T=yield(0,g.createRequest)(O,N),new Promise((P,R)=>{var L,H;const V=g.proxyApi.replace("https","wss");let J=null,Y=null;const Z=()=>l(void 0,void 0,void 0,function*(){J=-1,clearInterval(J),Y?.close(),!0!==C&&(yield(0,g.deleteRequest)(T))}),W=o=>{var u,m,w,x,F,G;switch(o.status){case h.HereProviderStatus.APPROVING:return null===(u=M.onApproving)||void 0===u||u.call(M,o),void(null===(m=A?.onApproving)||void 0===m||m.call(A,o));case h.HereProviderStatus.FAILED:return Z(),R(new h.HereProviderError(o.payload)),null===(w=M.onFailed)||void 0===w||w.call(M,o),void(null===(x=A?.onFailed)||void 0===x||x.call(A,o));case h.HereProviderStatus.SUCCESS:return Z(),P(o),null===(F=M.onSuccess)||void 0===F||F.call(M,o),void(null===(G=A?.onSuccess)||void 0===G||G.call(A,o))}},Q=o=>{var u;W({type:(null===(u=O.selector)||void 0===u?void 0:u.type)||"local",status:h.HereProviderStatus.FAILED,payload:o})};null===(L=M.onRequested)||void 0===L||L.call(M,T,O,Q),null===(H=A?.onRequested)||void 0===H||H.call(A,T,O,Q),N?.addEventListener("abort",()=>Q());const D=()=>{-1!==J&&(J=setTimeout(()=>l(void 0,void 0,void 0,function*(){var o,u,m,w;try{const x=yield(0,g.getResponse)(T);if(-1===J)return;W(x),D()}catch(x){const F=h.HereProviderStatus.FAILED,G=x instanceof Error?x:void 0,k=G?.message;Z(),R(new h.HereProviderError(k,G)),null===(o=M.onFailed)||void 0===o||o.call(M,{type:(null===(u=O.selector)||void 0===u?void 0:u.type)||"local",status:F,payload:k}),null===(m=A?.onFailed)||void 0===m||m.call(A,{type:(null===(w=O.selector)||void 0===w?void 0:w.type)||"local",status:F,payload:k})}}),3e3))};if(D(),!1===(0,a.isMobile)()){Y=new WebSocket(`${V}/ws/${T}`),Y.onmessage=u=>{if(null!=u.data)try{const m=JSON.parse(u.data);W(m)}catch{}}}})})},66212:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(A,O,C,T){return new(C||(C=Promise))(function(M,P){function R(V){try{H(T.next(V))}catch(J){P(J)}}function L(V){try{H(T.throw(V))}catch(J){P(J)}}function H(V){V.done?M(V.value):function N(M){return M instanceof C?M:new C(function(P){P(M)})}(V.value).then(R,L)}H((T=T.apply(A,O||[])).next())})},_=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0}),r.createRequest=r.deleteRequest=r.getResponse=r.getRequest=r.proxyApi=void 0;const E=_(d(9562)),S=_(d(78948)),a=d(41327),h=d(45530);r.proxyApi="https://h4n.app";r.getRequest=(A,O)=>l(void 0,void 0,void 0,function*(){const C=yield fetch(`${r.proxyApi}/${A}/request`,{signal:O,headers:{"content-type":"application/json"},method:"GET"});if(!1===C.ok)throw Error(yield C.text());const{data:T}=yield C.json();return JSON.parse(Buffer.from((0,a.base_decode)(T)).toString("utf8"))});r.getResponse=A=>l(void 0,void 0,void 0,function*(){var O;const C=yield fetch(`${r.proxyApi}/${A}/response`,{headers:{"content-type":"application/json"},method:"GET"});if(!1===C.ok)throw Error(yield C.text());const{data:T}=yield C.json(),N=null!==(O=JSON.parse(T))&&void 0!==O?O:{};return Object.assign({type:"here",public_key:"",account_id:"",payload:"",status:-1,path:""},N)});r.deleteRequest=A=>l(void 0,void 0,void 0,function*(){const O=yield fetch(`${r.proxyApi}/${A}`,{headers:{"content-type":"application/json"},method:"DELETE"});if(!1===O.ok)throw Error(yield O.text())});r.createRequest=(A,O)=>l(void 0,void 0,void 0,function*(){const C=(0,a.base_encode)(JSON.stringify(Object.assign(Object.assign({},A),{_id:(0,S.default)()}))),T=(0,E.default)(C),M=Buffer.from(T,"hex").toString("base64").replaceAll("/","_").replaceAll("-","+").slice(0,13),P=yield fetch(`${r.proxyApi}/${M}/request`,{method:"POST",signal:O,body:JSON.stringify({topic_id:(0,h.getDeviceId)(),data:C}),headers:{"content-type":"application/json"}});if(!1===P.ok)throw Error(yield P.text());return M})},84960:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(S,a,h,g){void 0===g&&(g=h),Object.defineProperty(S,g,{enumerable:!0,get:function(){return a[h]}})}:function(S,a,h,g){void 0===g&&(g=h),S[g]=a[h]}),_=this&&this.__exportStar||function(S,a){for(var h in S)"default"!==h&&!Object.prototype.hasOwnProperty.call(a,h)&&l(a,S,h)};Object.defineProperty(r,"__esModule",{value:!0}),r.HereWallet=void 0;var E=d(5238);Object.defineProperty(r,"HereWallet",{enumerable:!0,get:function(){return E.HereWallet}}),_(d(64099),r),_(d(82253),r),_(d(37996),r),_(d(19169),r),_(d(45173),r),_(d(55217),r),_(d(67701),r),_(d(37874),r),_(d(45530),r),_(d(73530),r)},11867:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(b,A,O,C){void 0===C&&(C=O),Object.defineProperty(b,C,{enumerable:!0,get:function(){return A[O]}})}:function(b,A,O,C){void 0===C&&(C=O),b[C]=A[O]}),_=this&&this.__setModuleDefault||(Object.create?function(b,A){Object.defineProperty(b,"default",{enumerable:!0,value:A})}:function(b,A){b.default=A}),E=this&&this.__importStar||function(b){if(b&&b.__esModule)return b;var A={};if(null!=b)for(var O in b)"default"!==O&&Object.prototype.hasOwnProperty.call(b,O)&&l(A,b,O);return _(A,b),A},S=this&&this.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(r,"__esModule",{value:!0}),r.verifySignature=r.authPayloadSchema=r.AuthPayload=void 0;const a=E(d(21531)),h=S(d(1520)),g=d(55183);class y{constructor({message:A,nonce:O,recipient:C,callbackUrl:T}){this.tag=2147484061,this.message=A,this.nonce=O,this.recipient=C,T&&(this.callbackUrl=T)}}r.AuthPayload=y,r.authPayloadSchema={struct:{tag:"u32",message:"string",nonce:{array:{type:"u8",len:32}},recipient:"string",callbackUrl:{option:"string"}}},r.verifySignature=function v(b,A){const O=new y(b),C=a.serialize(r.authPayloadSchema,O),T=Uint8Array.from(h.default.sha256.array(C));let N=new Uint8Array(Buffer.from(A.signature,"base64"));return g.PublicKey.from(A.publicKey).verify(T,N)}},67701:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.HereProviderError=r.HereProviderStatus=void 0,(_=r.HereProviderStatus||(r.HereProviderStatus={}))[_.APPROVING=1]="APPROVING",_[_.FAILED=2]="FAILED",_[_.SUCCESS=3]="SUCCESS";class l extends Error{constructor(E,S){super(E??S?.message),this.payload=E,this.parentError=S}}r.HereProviderError=l},37874:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0})},45530:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(A,O,C,T){return new(C||(C=Promise))(function(M,P){function R(V){try{H(T.next(V))}catch(J){P(J)}}function L(V){try{H(T.throw(V))}catch(J){P(J)}}function H(V){V.done?M(V.value):function N(M){return M instanceof C?M:new C(function(P){P(M)})}(V.value).then(R,L)}H((T=T.apply(A,O||[])).next())})},_=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(r,"__esModule",{value:!0}),r.isValidAccessKey=r.internalThrow=r.getPublicKeys=r.serializeActions=r.isMobile=r.getDeviceId=void 0;const E=_(d(78948)),S=d(67701);r.getDeviceId=()=>{const A=window.localStorage.getItem("herewallet-topic")||(0,E.default)();return window.localStorage.setItem("herewallet-topic",A),A};r.isMobile=()=>window.matchMedia("(any-pointer:coarse)").matches;r.serializeActions=A=>A.map(O=>{if("FunctionCall"!==O.type)return O;let{args:C,deposit:T,gas:N,methodName:M}=O.params;return ArrayBuffer.isView(C)&&(C=Buffer.from(C.buffer,C.byteOffset,C.byteLength)),C instanceof Buffer&&(C=C.toString("base64")),{type:O.type,params:{args:C,deposit:T,gas:N,methodName:M}}});r.getPublicKeys=(A,O)=>l(void 0,void 0,void 0,function*(){const C=yield fetch(A,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:"dontcare",method:"query",params:{request_type:"view_access_key_list",finality:"final",account_id:O}}),headers:{"content-type":"application/json"}});return!1===C.ok?[]:(yield C.json()).result.keys});r.internalThrow=(A,O)=>{var C,T,N,M,P;if(A instanceof S.HereProviderError)throw A;const R={payload:A instanceof Error?A.message:"UNKNOWN",status:S.HereProviderStatus.FAILED,type:(null===(C=O.selector)||void 0===C?void 0:C.type)||"local",account_id:(null===(T=O.selector)||void 0===T?void 0:T.id)||""};throw null===(N=O.onFailed)||void 0===N||N.call(O,R),null===(P=null===(M=O?.strategy)||void 0===M?void 0:M.onFailed)||void 0===P||P.call(M,R),A};r.isValidAccessKey=(A,O,C)=>{const{permission:T}=O.access_key;if("FullAccess"===T)return!0;if(T.FunctionCall){const{receiver_id:N,method_names:M}=T.FunctionCall;if(N===A&&M.includes("add_request_and_confirm"))return!0;if(N===C.receiverId)return 1===C.actions.length&&C.actions.every(P=>"FunctionCall"===P.type&&((!P.params.deposit||"0"===P.params.deposit.toString())&&(0===M.length||M.includes(P.params.methodName))))}return!1}},5238:function(ne,r,d){"use strict";var l=this&&this.__awaiter||function(L,H,V,J){return new(V||(V=Promise))(function(Z,W){function Q(u){try{o(J.next(u))}catch(m){W(m)}}function D(u){try{o(J.throw(u))}catch(m){W(m)}}function o(u){u.done?Z(u.value):function Y(Z){return Z instanceof V?Z:new V(function(W){W(Z)})}(u.value).then(Q,D)}o((J=J.apply(L,H||[])).next())})},_=this&&this.__rest||function(L,H){var V={};for(var J in L)Object.prototype.hasOwnProperty.call(L,J)&&H.indexOf(J)<0&&(V[J]=L[J]);if(null!=L&&"function"==typeof Object.getOwnPropertySymbols){var Y=0;for(J=Object.getOwnPropertySymbols(L);Ynew N.WidgetStrategy),defaultProvider:Z=C.proxyProvider}={}){this.authStorage=J,this.defaultProvider=Z,this.defaultStrategy=Y;const W=new S.InMemorySigner(this.authStorage),Q=new a.JsonRpcProvider({url:H??`https://rpc.${V}.near.org`});this.connection=S.Connection.fromConfig({jsvmAccountId:`jsvm.${V}`,provider:Q,networkId:V,signer:W})}get rpc(){return this.connection.provider}get signer(){return this.connection.signer}get networkId(){return this.connection.networkId}account(H){return l(this,void 0,void 0,function*(){const V=H??(yield this.authStorage.getActiveAccount(this.networkId));if(null==V)throw new P("Wallet not signed in");return new S.Account(this.connection,V)})}isSignedIn(){return l(this,void 0,void 0,function*(){return null!=(yield this.authStorage.getActiveAccount(this.networkId))})}signOut(){return l(this,void 0,void 0,function*(){const H=yield this.authStorage.getActiveAccount(this.networkId);if(null==H)throw new Error("Wallet not signed in");const V=yield this.authStorage.getKey(this.networkId,H);if(null!=V){const J=V.getPublicKey().toString();yield this.silentSignAndSendTransaction({receiverId:H,actions:[{type:"DeleteKey",params:{publicKey:J}}]}).catch(()=>{})}yield this.authStorage.removeKey(this.networkId,H)})}getHereBalance(H){return l(this,void 0,void 0,function*(){const V=yield this.account(H),J="mainnet"===this.networkId?"here.storage.near":"here.storage.testnet",Y=yield V.viewFunction({args:{account_id:V.accountId},methodName:"ft_balance_of",contractId:J}).catch(()=>"0");return new v.default(Y)})}getAvailableBalance(H){return l(this,void 0,void 0,function*(){const J=yield(yield this.account(H)).getAccountBalance(),Y=yield this.getHereBalance();return new v.default(J.available).add(new v.default(Y))})}getAccounts(){return l(this,void 0,void 0,function*(){return yield this.authStorage.getAccounts(this.networkId)})}getAccountId(){return l(this,void 0,void 0,function*(){const H=yield this.authStorage.getActiveAccount(this.networkId);if(null==H)throw new Error("Wallet not signed in");return H})}switchAccount(H){return l(this,void 0,void 0,function*(){if(null==(yield this.authStorage.getKey(this.networkId,H)))throw new Error(`Account ${H} not signed in`);yield this.authStorage.setActiveAccount(this.networkId,H)})}signIn(H={}){var V,J,Y,Z,W,{contractId:Q,allowance:D,methodNames:o=[],selector:u}=H,m=_(H,["contractId","allowance","methodNames","selector"]);return l(this,void 0,void 0,function*(){if(null==Q){const{accountId:w}=yield this.authenticate(m);return yield this.authStorage.setKey(this.networkId,w,h.KeyPairEd25519.fromRandom()),yield this.authStorage.setActiveAccount(this.networkId,w),w}m.strategy=null!==(V=m.strategy)&&void 0!==V?V:this.defaultStrategy(),m.provider=null!==(J=m.provider)&&void 0!==J?J:this.defaultProvider,null===(Y=m.onInitialized)||void 0===Y||Y.call(m),null===(W=null===(Z=m.strategy)||void 0===Z?void 0:Z.onInitialized)||void 0===W||W.call(Z);try{const w=S.KeyPair.fromRandom("ed25519"),x={receiverId:Q,methodNames:o,allowance:D},F=yield m.provider(Object.assign(Object.assign({},m),{request:{type:"call",network:this.networkId,selector:u||{},transactions:[{actions:[{type:"AddKey",params:{publicKey:w.getPublicKey().toString(),accessKey:{permission:x}}}]}]}}));if(null==F.account_id)throw Error("Transaction is failed");return yield this.authStorage.setKey(this.networkId,F.account_id,w),yield this.authStorage.setActiveAccount(this.networkId,F.account_id),F.account_id}catch(w){throw(0,O.internalThrow)(w,m),w}})}silentSignAndSendTransaction({actions:H,receiverId:V,signerId:J}){return l(this,void 0,void 0,function*(){const Y=yield this.account(J),Z=yield this.authStorage.getKey(this.networkId,Y.accountId).catch(()=>null);if(null==Z)throw new P;const W=Z.getPublicKey(),Q=yield Y.getAccessKeys(),D={receiverId:V,actions:H};if(!1===Q.some(u=>u.public_key===W.toString()&&(0,O.isValidAccessKey)(Y.accountId,u,D)))throw new P;return yield Y.signAndSendTransaction({actions:H.map(u=>(0,T.createAction)(u)),receiverId:V??Y.accountId})})}signAndSendTransaction(H){var V,J,Y,Z,W,Q,D,o;return l(this,void 0,void 0,function*(){const{signerId:u,receiverId:m,actions:w}=H,F=_(H,["signerId","receiverId","actions"]);F.strategy=null!==(V=F.strategy)&&void 0!==V?V:this.defaultStrategy(),F.provider=null!==(J=F.provider)&&void 0!==J?J:this.defaultProvider,null===(Y=F.onInitialized)||void 0===Y||Y.call(F),null===(W=null===(Z=F.strategy)||void 0===Z?void 0:Z.onInitialized)||void 0===W||W.call(Z);try{const G=yield this.silentSignAndSendTransaction({receiverId:m,actions:w,signerId:u}),k={type:"local",status:A.HereProviderStatus.SUCCESS,payload:G?.transaction_outcome.id};return null===(Q=F.onSuccess)||void 0===Q||Q.call(F,k),null===(o=null===(D=F.strategy)||void 0===D?void 0:D.onSuccess)||void 0===o||o.call(D,k),G}catch(G){try{if(!(G instanceof P)&&"NotEnoughAllowance"!==G?.type)throw(0,O.internalThrow)(G,F),G;const k=yield this.getAccountId().catch(()=>{}),p=yield F.provider(Object.assign(Object.assign({},F),{request:{type:"call",network:this.networkId,transactions:[{actions:(0,O.serializeActions)(w),receiverId:m,signerId:u}],selector:H.selector||{id:u||k}}}));if(null==p.payload||null==p.account_id)throw Error("Transaction not found, but maybe executed");return yield this.rpc.txStatus(p.payload,p.account_id)}catch(k){throw(0,O.internalThrow)(k,F),k}}})}verifyMessageNEP0413(H,V){return l(this,void 0,void 0,function*(){if(!(0,M.verifySignature)(H,V))throw Error("Incorrect signature");if(!(yield(yield this.account(V.accountId)).getAccessKeys()).some(Q=>!(Q.public_key!==V.publicKey||"FullAccess"!==Q.access_key.permission)))throw Error("Signer public key is not full access");return!0})}authenticate(H={}){var V,J,Y;return l(this,void 0,void 0,function*(){const Z={nonce:null!==(V=H.nonce)&&void 0!==V?V:(0,y.randomBytes)(32),recipient:null!==(J=H.recipient)&&void 0!==J?J:window.location.host,message:null!==(Y=H.message)&&void 0!==Y?Y:"Authenticate"},W=yield this.signMessage(Object.assign(Object.assign({},Z),H));return yield this.verifyMessageNEP0413(Z,W),W})}signMessage(H){var V,J,Y,Z,W;return l(this,void 0,void 0,function*(){if(H.strategy=null!==(V=H.strategy)&&void 0!==V?V:this.defaultStrategy(),H.provider=null!==(J=H.provider)&&void 0!==J?J:this.defaultProvider,null===(Y=H.onInitialized)||void 0===Y||Y.call(H),null===(W=null===(Z=H.strategy)||void 0===Z?void 0:Z.onInitialized)||void 0===W||W.call(Z),"receiver"in H)return yield this.legacySignMessage(H);const Q=yield this.getAccountId().catch(()=>{}),D=yield H.provider(Object.assign(Object.assign({},H),{request:{type:"sign",message:H.message,recipient:H.recipient,nonce:Array.from(H.nonce),network:this.networkId,selector:H.selector||{id:Q}}}));if(null==D?.payload)throw Error("Signature not found");const{publicKey:o,signature:u,accountId:m}=JSON.parse(D.payload);return{publicKey:o,signature:u,accountId:m}})}legacySignMessage(H){var V,{message:J,receiver:Y,nonce:Z,selector:W}=H,Q=_(H,["message","receiver","nonce","selector"]);return l(this,void 0,void 0,function*(){if(null==Z){let u=new Uint8Array(32);Z=[...crypto.getRandomValues(u)]}const D=yield this.getAccountId().catch(()=>{}),o=yield null===(V=Q.provider)||void 0===V?void 0:V.call(Q,Object.assign(Object.assign({},Q),{request:{type:"sign",network:this.networkId,selector:W||{id:D},message:J,receiver:Y,nonce:Z}}));if(null==o?.payload)throw Error("Signature not found");try{const{publicKey:u,signature:m,accountId:w}=JSON.parse(o.payload),x=new Uint8Array(Buffer.from(m,"base64")),F=JSON.stringify({message:J,receiver:Y,nonce:Z}),G=new Uint8Array(g.sha256.digest("NEP0413:"+F));if(!1===h.PublicKey.from(u).verify(G,x))throw Error();const B=yield(yield this.account(w)).getAccessKeys(),ie=u.toString();if(!1===B.some(ee=>!(ee.public_key!==ie||"FullAccess"!==ee.access_key.permission)))throw Error();return{signature:new Uint8Array(Buffer.from(m,"base64")),publicKey:h.PublicKey.from(u),message:"NEP0413:"+F,receiver:Y,accountId:w,nonce:Z}}catch{throw Error("Signature not correct")}})}signAndSendTransactions(H){var V,J,Y,Z,W,Q,D,o,{transactions:u,selector:m}=H,w=_(H,["transactions","selector"]);return l(this,void 0,void 0,function*(){w.strategy=null!==(V=w.strategy)&&void 0!==V?V:this.defaultStrategy(),w.provider=null!==(J=w.provider)&&void 0!==J?J:this.defaultProvider,null===(Y=w.onInitialized)||void 0===Y||Y.call(w),null===(W=null===(Z=w.strategy)||void 0===Z?void 0:Z.onInitialized)||void 0===W||W.call(Z);let x=[];try{for(const k of u){const p=yield this.silentSignAndSendTransaction(k);x.push(p)}const F=x.map(k=>k.transaction_outcome.id).join(","),G={type:"local",status:A.HereProviderStatus.SUCCESS,payload:F};return null===(Q=w.onSuccess)||void 0===Q||Q.call(w,G),null===(o=null===(D=w.strategy)||void 0===D?void 0:D.onSuccess)||void 0===o||o.call(D,G),x}catch(F){try{if(!(F instanceof P)&&"NotEnoughAllowance"!==F?.type)throw(0,O.internalThrow)(F,w),F;const G=yield this.getAccountId().catch(()=>{}),k=u.slice(x.length),p=yield w.provider(Object.assign(Object.assign({},w),{request:{type:"call",network:this.networkId,selector:m||{id:k[0].signerId||G},transactions:k.map(ie=>Object.assign(Object.assign({},ie),{actions:(0,O.serializeActions)(ie.actions)}))}}));if(null==p.payload||null==p.account_id)throw Error("Transaction not found, but maybe executed");const B=p.payload.split(",").map(ie=>this.rpc.txStatus(ie,p.account_id));return yield Promise.all(B)}catch(G){throw(0,O.internalThrow)(G,w),G}}})}}},82945:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.THEME_SMALL_WINDOW_WIDTH_MAX=r.THEME_CONSTANT_BADGE_GREY_COLOR=r.THEME_CONSTANT_GREEN_COLOR=r.THEME_CONSTANT_RED_COLOR=r.THEME_CONSTANT_COLOR_DARK=r.THEME_CONSTANT_COLOR_BRAND=r.SIGN_POPUP_HEIGHT=r.SIGN_POPUP_WIDTH=void 0,r.SIGN_POPUP_WIDTH=390,r.SIGN_POPUP_HEIGHT=650,r.THEME_CONSTANT_COLOR_BRAND="#471be8",r.THEME_CONSTANT_COLOR_DARK="#101046",r.THEME_CONSTANT_RED_COLOR="#e25252",r.THEME_CONSTANT_GREEN_COLOR="#8bdaa1",r.THEME_CONSTANT_BADGE_GREY_COLOR="rgba(116,117,126,0.67)",r.THEME_SMALL_WINDOW_WIDTH_MAX=600},20534:(ne,r)=>{"use strict";var _;Object.defineProperty(r,"__esModule",{value:!0}),r.ENearNetworkSuffix=r.ENearNetwork=void 0,(_=r.ENearNetwork||(r.ENearNetwork={})).localnet="localnet",_.testnet="testnet",_.betanet="betanet",_.mainnet="mainnet",function(_){_.testnet=".testnet",_.mainnet=".near"}(r.ENearNetworkSuffix||(r.ENearNetworkSuffix={}))},61483:(ne,r)=>{"use strict";var d,E;Object.defineProperty(r,"__esModule",{value:!0}),r.getExternalActionErrorMessageForEndTag=r.EDappActionErrorTag=void 0,(E=d=r.EDappActionErrorTag||(r.EDappActionErrorTag={})).NEW_ACTION_STARTED="NEW_ACTION_STARTED",E.INCOMPLETE_ACTION="INCOMPLETE_ACTION",E.NO_ACCOUNTS="NO_ACCOUNTS",E.WINDOW_CLOSED="WINDOW_CLOSED",E.USER_CANCELLED="USER_CANCELLED",E.POPUP_WINDOW_REFUSED="POPUP_WINDOW_REFUSED",E.POPUP_WINDOW_OPEN_FAILED="POPUP_WINDOW_OPEN_FAILED";const l={[d.WINDOW_CLOSED]:"User closed the window",[d.INCOMPLETE_ACTION]:"User didn't complete the action",[d.NEW_ACTION_STARTED]:"A new action was started by the user, old action failed",[d.POPUP_WINDOW_OPEN_FAILED]:"Popup window failed to open",[d.POPUP_WINDOW_REFUSED]:"User refused to allow the popup window to open",[d.USER_CANCELLED]:"User cancelled the action",[d.NO_ACCOUNTS]:"No Meteor account found- try again after creating one"};r.getExternalActionErrorMessageForEndTag=function _(E){return l[E]??"An unknown error occurred"}},18788:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.EDappActionConnectionStatus=r.EDappActionSource=r.EMeteorInjectedFeature=r.EMeteorExtensionDirectActionType=r.EWalletExternalActionStatus=r.EWalletExternalAction_SignIn_AccessType=r.EMeteorWalletSignInType=r.EExternalActionType=r.MeteorActionError=void 0;const l=d(61483);class _ extends Error{constructor(O,C){super(),null==O.message&&(O.message=(0,l.getExternalActionErrorMessageForEndTag)(O.endTags?.[O.endTags.length-1]??"unknown")),this._reason=O,this.message=O.message,this.name="MeteorActionError",this.cause=C}}var A;r.MeteorActionError=_,(A=r.EExternalActionType||(r.EExternalActionType={})).login="login",A.sign="sign",A.logout="logout",A.verify_owner="verify_owner",A.keypom_claim="keypom_claim",A.sign_message="sign_message",function(A){A.ALL_METHODS="ALL_METHODS",A.SELECTED_METHODS="SELECTED_METHODS",A.FULL_ACCESS="FULL_ACCESS"}(r.EMeteorWalletSignInType||(r.EMeteorWalletSignInType={})),function(A){A.FULL_ACCESS="fullAccess",A.LIMITED_ACCESS="limitedAccess"}(r.EWalletExternalAction_SignIn_AccessType||(r.EWalletExternalAction_SignIn_AccessType={})),function(A){A.UNCONFIRMED="UNCONFIRMED",A.PENDING="PENDING",A.SUCCESS="SUCCESS",A.FAILURE="FAILURE"}(r.EWalletExternalActionStatus||(r.EWalletExternalActionStatus={})),function(A){A.check_sync_status="check_sync_status",A.sync_accounts="sync_accounts",A.open_page="open_page"}(r.EMeteorExtensionDirectActionType||(r.EMeteorExtensionDirectActionType={})),function(A){A.open_page="open_page",A.batch_import="batch_import",A.sync_check="sync_check",A.account_sync="account_sync"}(r.EMeteorInjectedFeature||(r.EMeteorInjectedFeature={})),function(A){A.website_callback="wcb",A.website_post_message="wpm",A.website_visit="wv",A.extension_injected="ext"}(r.EDappActionSource||(r.EDappActionSource={})),function(A){A.initializing="initializing",A.connected="connected",A.attempting_reconnect="attempting_reconnect",A.disconnected="disconnected",A.closed_success="closed_success",A.closed_fail="closed_fail",A.closed_window="closed_window"}(r.EDappActionConnectionStatus||(r.EDappActionConnectionStatus={}))},74577:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.StringUtils=r.stringToConstantStyledString=r.convertToSlug=r.pad=r.createPadder=r.BetterStringArray=r.safeAppend=r.firstNotNullEmpty=r.nullEmpty=r.notNullEmpty=r.StringRegex=void 0,r.StringRegex={digitsRegex:/\b\d+\b/gi};r.notNullEmpty=o=>null!=o&&o.length>0;r.nullEmpty=o=>!(0,r.notNullEmpty)(o);r.firstNotNullEmpty=(...o)=>{for(const u of o)if((0,r.notNullEmpty)(u))return u};r.safeAppend=(o,u,m=null)=>(0,r.notNullEmpty)(o)?o+u:m??u;function h(o,u,m=!1){return w=>g(w,o,u,m)}function g(o,u,m,w=!1){const x=m-`${o}`.length;if(x>0){const F=new Array(x).fill(u);return w?`${o}${F.join("")}`:`${F.join("")}${o}`}return`${o}`}r.BetterStringArray=class a extends Array{pushIfNotNullEmpty(u){(0,r.notNullEmpty)(u)&&this.push(u)}},r.createPadder=h,r.pad=g;const y=new RegExp("\\s+","g"),v=new RegExp("--+","g"),b=new RegExp("^-+","g"),A=new RegExp("-+$","g"),O=new RegExp("-","g"),C=new RegExp("[^\\w\\-]+","g"),T=new RegExp("_","g");r.convertToSlug=(o,{slugDivider:u="-",letterCase:m="LOWER",normalize:w=!0,excludeCharacters:x=[]}={})=>{if(!o||0===o.length)return"";let F=o.toString();return w&&(F=F.normalize("NFD")),"LOWER"===m?F=F.toLowerCase():"UPPER"===m&&(F=F.toUpperCase()),F.replace(y,"-").replace(x.length>0?new RegExp(`[^\\w\\-${x.map(G=>function N(o){return o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(G)).join("")}]+`,"g"):C,"").replace(x.includes("_")?y:T,"-").replace(v,"-").replace(b,"").replace(A,"").replace(O,u)};r.stringToConstantStyledString=o=>(0,r.convertToSlug)(o,{normalize:!0,slugDivider:"_",letterCase:"UPPER"});function L(o){return(o=o||"")!==decodeURIComponent(o)}const W=(...o)=>o.filter(u=>u).map((u,m,w)=>{const x=0!==m,F=m!==w.length-1;return x&&(u=u.startsWith("/")?u.slice(1):u),F&&(u=u.endsWith("/")?u.slice(0,-1):u),u}).join("/");r.StringUtils={isUriEncoded:L,decodeUriFully:o=>{let u=0;for(;L(o);)if(u+=1,o=decodeURIComponent(o),u>20)throw new Error("String Utils: Decode URI Fully: Enacted while loop too many times with attempt to decode fully.");return o},StringRegex:r.StringRegex,reverse:o=>{let u="";for(const m of o)u=`${m}${u}`;return u},notNullEmpty:r.notNullEmpty,nullEmpty:r.nullEmpty,anyNullEmpty:o=>{for(const u of o)if((0,r.nullEmpty)(u))return!0;return!1},safeAppend:r.safeAppend,createPadder:h,pad:g,convertToSlug:r.convertToSlug,stringToConstantStyledString:r.stringToConstantStyledString,removeAndTrim:(o,u,{spaceAware:m=!0,insideWords:w=!1}={})=>{let x=`${o}`;for(const F of u)if(m)if(w){const G=[new RegExp(`\\s${F}\\s`,"g"),new RegExp(`\\s${F}`,"g"),new RegExp(`${F}\\s`,"g")];for(const k of G)k.test(x)&&(console.log(`Replacing "${k}" in "${x}"`),x=x.replace(k," "),console.log(`Text after: "${x}"`))}else x.indexOf(` ${F} `)>=0?x=x.replace(` ${F} `," "):(x.startsWith(`${F} `)&&(x=x.substring(F.length+1)),x.endsWith(` ${F}`)&&(x=x.substring(0,x.length-(F.length+1))));else x.indexOf(F)>=0&&(x=x.replace(F,""));return x.trim()},sortCompareStrings:function J(o,u){const m=o.toLowerCase(),w=u.toLowerCase();return mw?1:0},comparePure:function Y(o,u){return o>u?1:ou.startsWith("http://")||u.startsWith("https://")?u:W(o,u),isHashId:o=>{const u=o.match(/^[a-zA-Z0-9]+$/);return Boolean(u)}}},18015:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.EnvironmentStateAdapter_Sync=r.EnvironmentStateAdapter=void 0;r.EnvironmentStateAdapter=class _{constructor(a){this.implementation=a}setJson(a,h){var g=this;return l(function*(){yield g.implementation.setString(a,JSON.stringify(h))})()}getJson(a){var h=this;return l(function*(){const g=yield h.implementation.getString(a);if(null!=g&&"undefined"!==g&&"null"!==g)return JSON.parse(g)})()}setString(a,h){var g=this;return l(function*(){yield g.implementation.setString(a,h)})()}getString(a){var h=this;return l(function*(){const g=yield h.implementation.getString(a);if(null!=g)return g})()}createJsonGetterSetter(a){return{get:()=>this.getJson(a),set:h=>this.setJson(a,h)}}createStringGetterSetter(a){return{get:()=>this.getString(a),set:h=>this.setString(a,h)}}};r.EnvironmentStateAdapter_Sync=class E{constructor(a){this.implementation=a}setJson(a,h){this.implementation.setString(a,JSON.stringify(h))}getJson(a){const h=this.implementation.getString(a);if(null!=h&&"undefined"!==h&&"null"!==h)return JSON.parse(h)}setString(a,h){this.implementation.setString(a,h)}getString(a){const h=this.implementation.getString(a);if(null!=h)return h}clear(a){this.implementation.clear(a)}createJsonGetterSetter(a){return{get:()=>this.getJson(a),set:h=>this.setJson(a,h)}}createStringGetterSetter(a){return{get:()=>this.getString(a),set:h=>this.setString(a,h)}}}},15973:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.ConnectedMeteorWalletAccount=r.MeteorWallet=void 0;const _=d(71836),E=d(38445),S=d(18788),a=d(21531),h=d(74577),g=d(18015),y=d(61445),v=d(34552),b=d(18223),A=d(29761),O=d(6213),C=d(98538),L=new g.EnvironmentStateAdapter_Sync({getString:Y=>window.localStorage.getItem(Y),setString:(Y,Z)=>window.localStorage.setItem(Y,Z),clear:Y=>window.localStorage.removeItem(Y)});new g.EnvironmentStateAdapter_Sync({getString:Y=>window.sessionStorage.getItem(Y),setString:(Y,Z)=>window.sessionStorage.setItem(Y,Z),clear:Y=>window.sessionStorage.removeItem(Y)});class V{static init({walletUrl:Z,...W}){return l(function*(){const Q=new _.keyStores.BrowserLocalStorageKeyStore,D=yield(0,_.connect)({keyStore:Q,headers:{},walletUrl:(0,y.resolveWalletUrl)(W.networkId,Z),...(0,y.getNetworkPreset)(W.networkId),...W}),o=new V({near:D,appKeyPrefix:"near_app"});return o.isSignedIn()||(yield Q.clear()),o})()}constructor({near:Z,appKeyPrefix:W=Z.config.contractName??"default"}){this._initializationPromises=[],this._near=Z;const Q=W+"_meteor_wallet_auth_key";this._authDataKey=Q,this._authData=L.getJson(Q)??{allKeys:[]},this._networkId=Z.config.networkId,this._walletBaseUrl=Z.config.walletUrl,this._keyStore=Z.connection.signer.keyStore}isExtensionInstalled(){return null!=window.meteorWallet}isSignedIn(){return!!this._authData.accountId}getAccountId(){return this._authData.accountId}verifyOwner(Z){var W=this;return l(function*(){const Q=Z.accountId??W.getAccountId(),D=yield(0,v.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:S.EExternalActionType.verify_owner,inputs:{accountId:Q,message:Z.message},network:W._networkId});if(D.success)return D;throw new S.MeteorActionError({endTags:D.endTags,message:D.message})})()}requestSignIn(Z){var W=this;return l(function*(){const{keyPair:Q,...D}=Z,o=Q??_.KeyPair.fromRandom("ed25519");let u=o.getPublicKey().toString();const m=yield(0,v.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:S.EExternalActionType.login,inputs:{public_key:u,...D},network:W._networkId});if(m.success){const{allKeys:w,accountId:x}=m.payload;return W._authData={accountId:x,allKeys:w,signedInContract:{contract_id:D.contract_id,public_key:u}},L.setJson(W._authDataKey,W._authData),yield W._keyStore.setKey(W._networkId,x,o),{success:!0,endTags:[],payload:{accessKey:o,accountId:x}}}throw new S.MeteorActionError({endTags:m.endTags,message:m.message})})()}signOut(){var Z=this;return l(function*(){const W=Z.getAccountId();if(null!=Z._authData.signedInContract&&null!=W){const Q={accountId:W,contractInfo:Z._authData.signedInContract};yield(0,v.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:S.EExternalActionType.logout,inputs:Q,network:Z._networkId})}Z._authData={allKeys:[]},L.clear(Z._authDataKey)})()}signMessage({message:Z,nonce:W,recipient:Q,callbackUrl:D,state:o,accountId:u}){var m=this;return l(function*(){const w=yield(0,v.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:S.EExternalActionType.sign_message,inputs:{message:Z,nonce:W,recipient:Q,callbackUrl:D,state:o,accountId:u},network:m._networkId});if(w.success)return w.payload.state=o,w;throw new S.MeteorActionError({endTags:w.endTags,message:w.message})})()}requestSignTransactions(Z){var W=this;return l(function*(){const{transactions:Q}=Z,D=yield W.transformTransactions(Q);console.log("Transformed transactions",D);const o=yield(0,v.getMeteorPostMessenger)().connectAndWaitForResponse({actionType:S.EExternalActionType.sign,inputs:{transactions:D.map(u=>(0,a.serialize)(b.SCHEMA_V2,u)).map(u=>Buffer.from(u).toString("base64")).join(",")},network:W._networkId});if(o.success)return o.payload.executionOutcomes;throw new S.MeteorActionError({endTags:o.endTags,message:o.message})})()}account(){const Z=this.getAccountId();return(0,h.notNullEmpty)(Z)&&this._connectedAccount?.accountId!==Z&&(this._connectedAccount=new J(this,this._near.connection,Z)),this._connectedAccount}transformTransactions(Z){var W=this;return l(function*(){const Q=W.account(),{networkId:D,signer:o,provider:u}=Q.connection,m=yield o.getPublicKey(Q.accountId,D);return Promise.all(Z.map(function(){var w=l(function*(x,F){const G=yield Q.accessKeyForTransaction(m);if(!G)throw new Error(`Failed to find matching key for transaction sent to ${x.receiverId}`);const k=x.actions.map(B=>(0,O.createAction)(B)),p=yield u.block({finality:"final"});return(0,E.createTransaction)(Q.accountId,A.PublicKey.from(G.public_key),x.receiverId,new C.BN(G.access_key.nonce).add(new C.BN(F)).add(new C.BN(1)),k,_.utils.serialize.base_decode(p.header.hash))});return function(x,F){return w.apply(this,arguments)}}()))})()}}r.MeteorWallet=V;class J extends _.Account{constructor(Z,W,Q){super(W,Q),this.meteorWallet=Z}signAndSendTransaction(...Z){var W=this;return l(function*(){return"string"==typeof Z[0]?W.signAndSendTransaction_direct({receiverId:Z[0],actions:Z[1]}):W.signAndSendTransaction_direct(Z[0])})()}trySendOrCreateTransaction({receiverId:Z,actions:W}){var Q=()=>super.signAndSendTransaction,D=this;return l(function*(){const o=yield D.connection.signer.getPublicKey(D.accountId,D.connection.networkId);let u=yield D.accessKeyForTransaction(o);if(null!=u&&"FullAccess"!==u.access_key.permission&&!(yield D.accessKeyMatchesTransaction(u,Z,W)))return{sent:!1,transaction:{receiverId:Z,signerId:D.accountId,actions:W}};if(u&&o&&o.toString()===u.public_key)try{return{executionOutcome:yield Q().call(D,{receiverId:Z,actions:W.map(m=>(0,O.createAction)(m))}),sent:!0}}catch(m){if("NotEnoughAllowance"!==m.type)throw m}return{sent:!1,transaction:{receiverId:Z,signerId:D.accountId,actions:W}}})()}signAndSendTransaction_direct({receiverId:Z,actions:W}){var Q=this;return l(function*(){const{transaction:D,sent:o,executionOutcome:u}=yield Q.trySendOrCreateTransaction({receiverId:Z,actions:W});return o?u:(yield Q.meteorWallet.requestSignTransactions({transactions:[D]}))[0]})()}accessKeyMatchesTransaction(Z,W,Q){return l(function*(){const{access_key:{permission:D}}=Z;if("FullAccess"===D)return!0;if(console.log("Comparing access key and actions",{accessKey:Z,receiverId:W,actions:Q}),D.FunctionCall){const{receiver_id:o,method_names:u}=D.FunctionCall;if(o===W&&u.includes("add_request_and_confirm"))return!0;if(o===W){if(1!==Q.length)return!1;const m=Q[0];if(console.log(m),"FunctionCall"===m.type){const w=m.params;return(!w.deposit||"0"===w.deposit.toString())&&(0===u.length||u.includes(w.methodName))}}}return!1})()}accessKeyForTransaction(Z){var W=this;return l(function*(){const Q=yield W.getAccessKeys();if(console.log("accessKeys",Q),Z){const o=Q.find(u=>u.public_key.toString()===Z.toString());if(o)return o}const D=W.meteorWallet._authData.allKeys;for(const o of Q)if(-1!==D.indexOf(o.public_key))return o;for(const o of Q)if("FullAccess"===o.access_key.permission)return o;return null})()}}r.ConnectedMeteorWalletAccount=J},83635:(ne,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.WALLET_URL_LOCALHOST_BASE=r.WALLET_URL_PRODUCTION_BASE=r.WALLET_URL_DEV_BASE=void 0,r.WALLET_URL_DEV_BASE="https://dev.wallet.meteorwallet.app",r.WALLET_URL_PRODUCTION_BASE="https://wallet.meteorwallet.app",r.WALLET_URL_LOCALHOST_BASE="https://localhost:3000"},85538:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.setEnvConfig=r.envConfig=void 0;const l=d(83635),_=typeof window<"u"?window.localStorage.getItem("DEV__METEOR_WALLET_BASE_URL"):void 0;r.envConfig={wallet_base_url:_??l.WALLET_URL_PRODUCTION_BASE},r.setEnvConfig=function E(S){Object.assign(r.envConfig,S)}},96831:function(ne,r,d){"use strict";var l=this&&this.__createBinding||(Object.create?function(a,h,g,y){void 0===y&&(y=g);var v=Object.getOwnPropertyDescriptor(h,g);(!v||("get"in v?!h.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return h[g]}}),Object.defineProperty(a,y,v)}:function(a,h,g,y){void 0===y&&(y=g),a[y]=h[g]}),_=this&&this.__exportStar||function(a,h){for(var g in a)"default"!==g&&!Object.prototype.hasOwnProperty.call(h,g)&&l(h,a,g)};Object.defineProperty(r,"__esModule",{value:!0}),r.setEnvConfig=r.ENearNetwork=void 0,_(d(15973),r),_(d(61445),r),_(d(83635),r),_(d(18788),r);var E=d(20534);Object.defineProperty(r,"ENearNetwork",{enumerable:!0,get:function(){return E.ENearNetwork}});var S=d(85538);Object.defineProperty(r,"setEnvConfig",{enumerable:!0,get:function(){return S.setEnvConfig}})},18223:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SCHEMA_V2=void 0;const l=d(29761),_=d(38445);r.SCHEMA_V2=new Map([[_.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[_.SignedTransaction,{kind:"struct",fields:[["transaction",_.Transaction],["signature",_.Signature]]}],[_.Transaction,{kind:"struct",fields:[["signerId","string"],["publicKey",l.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[_.Action]]]}],[l.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[_.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",_.AccessKeyPermission]]}],[_.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",_.FunctionCallPermission],["fullAccess",_.FullAccessPermission]]}],[_.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[_.FullAccessPermission,{kind:"struct",fields:[]}],[_.Action,{kind:"enum",field:"enum",values:[["createAccount",_.CreateAccount],["deployContract",_.DeployContract],["functionCall",_.FunctionCall],["transfer",_.Transfer],["stake",_.Stake],["addKey",_.AddKey],["deleteKey",_.DeleteKey],["deleteAccount",_.DeleteAccount],["signedDelegate",_.SignedDelegate]]}],[_.CreateAccount,{kind:"struct",fields:[]}],[_.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[_.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[_.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[_.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",l.PublicKey]]}],[_.AddKey,{kind:"struct",fields:[["publicKey",l.PublicKey],["accessKey",_.AccessKey]]}],[_.DeleteKey,{kind:"struct",fields:[["publicKey",l.PublicKey]]}],[_.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[_.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[_.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",l.PublicKey]]}],[_.SignedDelegate,{kind:"struct",fields:[["delegateAction",_.DelegateAction],["signature",_.Signature]]}]])},34552:(ne,r,d)=>{"use strict";var l=d(59344).default;Object.defineProperty(r,"__esModule",{value:!0}),r.getMeteorPostMessenger=void 0;const _=d(27184),E=d(85538),S=d(18788),a=d(63230),h=d(61483),g=d(82945);class y{constructor(T,N){const M=E.envConfig.wallet_base_url,P=new URL(M);if(this.walletOrigin=P.origin,null==window.meteorCom){this.comType=S.EDappActionSource.website_post_message,console.log("No extension found. Need to connect to web popup for Meteor communication");const R={source:S.EDappActionSource.website_post_message,connectionUid:T.uid},L=g.SIGN_POPUP_WIDTH,H=g.SIGN_POPUP_HEIGHT,V=window.top.outerHeight/2+window.top.screenY-H/2,J=window.top.outerWidth/2+window.top.screenX-L/2,Y=window.open(`${M}/connect/${T.network}/${T.actionType}?${(0,a.stringify)(R)}`,"_blank",`popup=1,width=${L},height=${H},top=${V},left=${J}`);if(null==Y)throw new S.MeteorActionError({message:"Couldn't open popup window to complete wallet action",endTags:[h.EDappActionErrorTag.POPUP_WINDOW_OPEN_FAILED]});this.websiteWindow=Y,window.addEventListener("message",Z=>N(Z.data)),this.wasOpened=!1}else this.comType=S.EDappActionSource.extension_injected,this.wasOpened=!0,window.meteorCom.addMessageDataListener(N)}focus(){this.comType===S.EDappActionSource.website_post_message&&this.websiteWindow?.focus()}sendMessage(T){this.comType===S.EDappActionSource.website_post_message?this.websiteWindow?.postMessage(T,this.walletOrigin):window.meteorCom?.sendMessageData(T)}isWindowClosed(){return this.comType===S.EDappActionSource.website_post_message&&(this.websiteWindow?.closed??!0)}hasActiveWindow(){return this.comType!==S.EDappActionSource.website_post_message||null!=this.websiteWindow}close(){this.comType===S.EDappActionSource.website_post_message&&delete this.websiteWindow}}class b{constructor(){this.connections=[];const T=E.envConfig.wallet_base_url,N=new URL(T);this.baseWalletUrl=T,this.walletOrigin=N.origin,this.listener=M=>{if(null!=M){const P=this.connections.find(R=>R.uid===M.uid);null!=P&&(this.updateConnection(P.uid,{lastConnection:Date.now()}),M.status===S.EDappActionConnectionStatus.attempting_reconnect&&(this.updateConnection(P.uid,{status:S.EDappActionConnectionStatus.initializing}),this.sendComs()),M.status===S.EDappActionConnectionStatus.connected&&P.status===S.EDappActionConnectionStatus.initializing&&this.updateConnection(P.uid,{status:S.EDappActionConnectionStatus.connected}),M.status===S.EDappActionConnectionStatus.closed_success&&(P.resolve({success:!0,endTags:[],payload:M.payload}),this.updateConnection(P.uid,{status:S.EDappActionConnectionStatus.closed_success}),this.sendComs()),M.status===S.EDappActionConnectionStatus.closed_fail&&(this.updateConnection(P.uid,{status:S.EDappActionConnectionStatus.closed_fail}),this.sendComs(),P.reject(new S.MeteorActionError({endTags:M.endTags}))),M.status===S.EDappActionConnectionStatus.closed_window&&(this.updateConnection(P.uid,{status:S.EDappActionConnectionStatus.closed_window}),P.reject(new S.MeteorActionError({endTags:M.endTags,message:"User closed the window"}))),[S.EDappActionConnectionStatus.disconnected,S.EDappActionConnectionStatus.closed_fail,S.EDappActionConnectionStatus.closed_window,S.EDappActionConnectionStatus.closed_success].includes(M.status)&&this.removeConnection(P.uid))}}}removeConnection(T){this.connections=this.connections.filter(N=>N.uid!==T),0===this.connections.length&&(delete this.comWindow,clearInterval(this.comInterval),delete this.comInterval)}updateConnection(T,N){this.connections=this.connections.map(M=>M.uid===T?{...M,...N,uid:M.uid}:M)}sendComs(){if(this.comWindow?.hasActiveWindow()&&this.connections.length>0)if(null==this.comInterval&&(this.comInterval=setInterval(()=>this.sendComs(),450)),this.comWindow.isWindowClosed())if(this.comWindow.wasOpened){for(const T of this.connections)T.reject(new S.MeteorActionError({message:"User closed the window before completing the action",endTags:[h.EDappActionErrorTag.INCOMPLETE_ACTION,h.EDappActionErrorTag.WINDOW_CLOSED]}));this.connections=[],this.comWindow.close()}else console.log("Window is closed, need to allow popup");else{this.comWindow.wasOpened=!0;for(const{network:T,actionType:N,endTags:M,status:P,inputs:R,uid:L}of this.connections){const H={endTags:M,actionType:N,status:P,uid:L,network:T};P===S.EDappActionConnectionStatus.initializing&&(H.inputs=R),this.comWindow.sendMessage(H)}}else clearInterval(this.comInterval),delete this.comInterval}addAndStartConnection(T){if(this.connections.length>0)for(const N of this.connections)N.status=S.EDappActionConnectionStatus.disconnected,N.endTags=[h.EDappActionErrorTag.NEW_ACTION_STARTED];this.connections.push(T),null!=this.comWindow&&this.comWindow.hasActiveWindow()?this.comWindow.focus():this.comWindow=new y(T,this.listener),this.sendComs()}connectAndWaitForResponse({actionType:T,network:N,inputs:M}){var P=this;return l(function*(){let R={uid:(0,_.nanoid)(),actionType:T,lastAttemptedConnection:0,lastConnection:0,status:S.EDappActionConnectionStatus.initializing,promise:void 0,reject:void 0,resolve:void 0,currentPayload:{},inputs:M,network:N,endTags:[]};const L=new Promise((H,V)=>{R.resolve=H,R.reject=J=>{P.connections=P.connections.filter(Y=>Y.uid!==R.uid),V(J)}});return R.promise=L,P.addAndStartConnection(R),yield L})()}}let A;r.getMeteorPostMessenger=function O(){return null==A&&(A=new b),A}},61445:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getNetworkPreset=r.resolveWalletUrl=void 0;const l=d(85538);r.resolveWalletUrl=(S,a)=>{if(a)return a;const h=l.envConfig.wallet_base_url;switch(S){case"mainnet":return`${h}/connect/mainnet`;case"testnet":return`${h}/connect/testnet`;case"betanet":return`${h}/connect/betanet`;default:throw new Error("Invalid wallet URL")}};r.getNetworkPreset=S=>{switch(S){case"mainnet":return{networkId:S,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://explorer.near.org"};case"testnet":return{networkId:S,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://explorer.testnet.near.org"};case"betanet":return{networkId:S,nodeUrl:"https://rpc.betanet.near.org",helperUrl:"https://helper.betanet.near.org",explorerUrl:"https://explorer.betanet.near.org"};default:throw Error(`Failed to find config for: '${S}'`)}}},6213:(ne,r,d)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.createAction=r.parseArgs=void 0;const l=d(98538),_=d(38445),E=d(29761);r.parseArgs=g=>"string"==typeof g?Buffer.from(g,"base64"):g;r.createAction=g=>{switch(g.type){case"CreateAccount":return _.actionCreators.createAccount();case"DeployContract":{const{code:y}=g.params;return _.actionCreators.deployContract(y)}case"FunctionCall":{const{methodName:y,args:v,gas:b,deposit:A}=g.params;return _.actionCreators.functionCall(y,(0,r.parseArgs)(v),new l.BN(b),new l.BN(A))}case"Transfer":{const{deposit:y}=g.params;return _.actionCreators.transfer(new l.BN(y))}case"Stake":{const{stake:y,publicKey:v}=g.params;return _.actionCreators.stake(new l.BN(y),E.PublicKey.from(v))}case"AddKey":{const{publicKey:y,accessKey:v}=g.params;return _.actionCreators.addKey(E.PublicKey.from(y),(g=>{if("FullAccess"===g)return _.actionCreators.fullAccessKey();const{receiverId:y,methodNames:v=[]}=g,b=g.allowance?new l.BN(g.allowance):void 0;return _.actionCreators.functionCallAccessKey(y,v,b)})(v.permission))}case"DeleteKey":{const{publicKey:y}=g.params;return _.actionCreators.deleteKey(E.PublicKey.from(y))}case"DeleteAccount":{const{beneficiaryId:y}=g.params;return _.actionCreators.deleteAccount(y)}default:throw new Error("Invalid action type")}}},87029:ne=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],d=typeof globalThis>"u"?global:globalThis;ne.exports=function(){for(var _=[],E=0;E{"use strict";const l=d(18958);ne.exports=a;const _=function J(){function Y(Z){return typeof Z<"u"&&Z}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return Y(self)||Y(window)||Y(this)||{}}}().console||{},E={mapHttpRequest:N,mapHttpResponse:N,wrapRequestSerializer:M,wrapResponseSerializer:M,wrapErrorSerializer:M,req:N,res:N,err:function C(Y){const Z={type:Y.constructor.name,msg:Y.message,stack:Y.stack};for(const W in Y)void 0===Z[W]&&(Z[W]=Y[W]);return Z}};function a(Y){(Y=Y||{}).browser=Y.browser||{};const Z=Y.browser.transmit;if(Z&&"function"!=typeof Z.send)throw Error("pino: transmit option must have a send function");const W=Y.browser.write||_;Y.browser.write&&(Y.browser.asObject=!0);const Q=Y.serializers||{},D=function S(Y,Z){return Array.isArray(Y)?Y.filter(function(Q){return"!stdSerializers.err"!==Q}):!0===Y&&Object.keys(Z)}(Y.browser.serialize,Q);let o=Y.browser.serialize;Array.isArray(Y.browser.serialize)&&Y.browser.serialize.indexOf("!stdSerializers.err")>-1&&(o=!1);"function"==typeof W&&(W.error=W.fatal=W.warn=W.info=W.debug=W.trace=W),!1===Y.enabled&&(Y.level="silent");const m=Y.level||"info",w=Object.create(W);w.log||(w.log=P),Object.defineProperty(w,"levelVal",{get:function F(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(w,"level",{get:function G(){return this._level},set:function k(B){if("silent"!==B&&!this.levels.values[B])throw Error("unknown level "+B);this._level=B,h(x,w,"error","log"),h(x,w,"fatal","error"),h(x,w,"warn","error"),h(x,w,"info","log"),h(x,w,"debug","log"),h(x,w,"trace","log")}});const x={transmit:Z,serialize:D,asObject:Y.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:T(Y)};return w.levels=a.levels,w.level=m,w.setMaxListeners=w.getMaxListeners=w.emit=w.addListener=w.on=w.prependListener=w.once=w.prependOnceListener=w.removeListener=w.removeAllListeners=w.listeners=w.listenerCount=w.eventNames=w.write=w.flush=P,w.serializers=Q,w._serialize=D,w._stdErrSerialize=o,w.child=function p(B,ie){if(!B)throw new Error("missing bindings for child Pino");ie=ie||{},D&&B.serializers&&(ie.serializers=B.serializers);const te=ie.serializers;if(D&&te){var ee=Object.assign({},Q,te),ue=!0===Y.browser.serialize?Object.keys(ee):D;delete B.serializers,v([B],ue,ee,this._stdErrSerialize)}function we(me){this._childLevel=1+(0|me._childLevel),this.error=b(me,B,"error"),this.fatal=b(me,B,"fatal"),this.warn=b(me,B,"warn"),this.info=b(me,B,"info"),this.debug=b(me,B,"debug"),this.trace=b(me,B,"trace"),ee&&(this.serializers=ee,this._serialize=ue),Z&&(this._logEvent=O([].concat(me._logEvent.bindings,B)))}return we.prototype=this,new we(this)},Z&&(w._logEvent=O()),w}function h(Y,Z,W,Q){const D=Object.getPrototypeOf(Z);Z[W]=Z.levelVal>Z.levels.values[W]?P:D[W]?D[W]:_[W]||_[Q]||P,function g(Y,Z,W){!Y.transmit&&Z[W]===P||(Z[W]=function(Q){return function(){const o=Y.timestamp(),u=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===_?_:this;for(var w=0;w-1&&o in W&&(Y[D][o]=W[o](Y[D][o]))}function b(Y,Z,W){return function(){const Q=new Array(1+arguments.length);Q[0]=Z;for(var D=1;D{"use strict";function l(E,S,a,h,g,y,v){try{var b=E[y](v),A=b.value}catch(O){return void a(O)}b.done?S(A):Promise.resolve(A).then(h,g)}function _(E){return function(){var S=this,a=arguments;return new Promise(function(h,g){var y=E.apply(S,a);function v(A){l(y,h,g,v,b,"next",A)}function b(A){l(y,h,g,v,b,"throw",A)}v(void 0)})}}d.d(r,{Z:()=>_})},27184:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{customAlphabet:()=>S,customRandom:()=>E,nanoid:()=>a,random:()=>_,urlAlphabet:()=>l});let l="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_=h=>crypto.getRandomValues(new Uint8Array(h)),E=(h,g,y)=>{let v=(2<{let O="";for(;;){let C=y(b),T=b;for(;T--;)if(O+=h[C[T]&v]||"",O.length===A)return O}}},S=(h,g=21)=>E(h,g,_),a=(h=21)=>crypto.getRandomValues(new Uint8Array(h)).reduce((g,y)=>g+=(y&=63)<36?y.toString(36):y<62?(y-26).toString(36).toUpperCase():y>62?"-":"_","")},62949:(ne,r,d)=>{"use strict";function l(M,P,R){return P<=M&&M<=R}function _(M){if(void 0===M)return{};if(M===Object(M))return M;throw TypeError("Could not convert argument to dictionary")}d.r(r),d.d(r,{TextDecoder:()=>O,TextEncoder:()=>C});var a=-1;function h(M){this.tokens=[].slice.call(M)}h.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():a},prepend:function(M){if(Array.isArray(M))for(var P=M;P.length;)this.tokens.unshift(P.pop());else this.tokens.unshift(M)},push:function(M){if(Array.isArray(M))for(var P=M;P.length;)this.tokens.push(P.shift());else this.tokens.push(M)}};var g=-1;function y(M,P){if(M)throw TypeError("Decoder error");return P||65533}(function v(){}).prototype={handler:function(M,P){}},function b(){}.prototype={handler:function(M,P){}};var A="utf-8";function O(M,P){if(!(this instanceof O))return new O(M,P);if((M=void 0!==M?String(M).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");P=_(P),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(P.fatal),this._ignoreBOM=Boolean(P.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function C(M,P){if(!(this instanceof C))return new C(M,P);if((M=void 0!==M?String(M).toLowerCase():A)!==A)throw new Error("Encoding not supported. Only utf-8 is supported");P=_(P),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(P.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function T(M){var P=M.fatal,R=0,L=0,H=0,V=128,J=191;this.handler=function(Y,Z){if(Z===a&&0!==H)return H=0,y(P);if(Z===a)return g;if(0===H){if(l(Z,0,127))return Z;if(l(Z,194,223))H=1,R=Z-192;else if(l(Z,224,239))224===Z&&(V=160),237===Z&&(J=159),H=2,R=Z-224;else{if(!l(Z,240,244))return y(P);240===Z&&(V=144),244===Z&&(J=143),H=3,R=Z-240}return R<<=6*H,null}if(!l(Z,V,J))return R=H=L=0,V=128,J=191,Y.prepend(Z),y(P);if(V=128,J=191,R+=Z-128<<6*(H-(L+=1)),L!==H)return null;var W=R;return R=H=L=0,W}}function N(M){M.fatal;this.handler=function(R,L){if(L===a)return g;if(l(L,0,127))return L;var H,V;l(L,128,2047)?(H=1,V=192):l(L,2048,65535)?(H=2,V=224):l(L,65536,1114111)&&(H=3,V=240);for(var J=[(L>>6*H)+V];H>0;){var Y=L>>6*(H-1);J.push(128|63&Y),H-=1}return J}}O.prototype={decode:function(P,R){var L;L="object"==typeof P&&P instanceof ArrayBuffer?new Uint8Array(P):"object"==typeof P&&"buffer"in P&&P.buffer instanceof ArrayBuffer?new Uint8Array(P.buffer,P.byteOffset,P.byteLength):new Uint8Array(0),R=_(R),this._streaming||(this._decoder=new T({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(R.stream);for(var J,H=new h(L),V=[];!H.endOfStream()&&(J=this._decoder.handler(H,H.read()))!==g;)null!==J&&(Array.isArray(J)?V.push.apply(V,J):V.push(J));if(!this._streaming){do{if((J=this._decoder.handler(H,H.read()))===g)break;null!==J&&(Array.isArray(J)?V.push.apply(V,J):V.push(J))}while(!H.endOfStream());this._decoder=null}return V.length&&-1!==["utf-8"].indexOf(this.encoding)&&!this._ignoreBOM&&!this._BOMseen&&(65279===V[0]?(this._BOMseen=!0,V.shift()):this._BOMseen=!0),function S(M){for(var P="",R=0;R>10),56320+(1023&L)))}return P}(V)}},C.prototype={encode:function(P,R){P=P?String(P):"",R=_(R),this._streaming||(this._encoder=new N(this._options)),this._streaming=Boolean(R.stream);for(var V,L=[],H=new h(function E(M){for(var P=String(M),R=P.length,L=0,H=[];L57343)H.push(V);else if(56320<=V&&V<=57343)H.push(65533);else if(55296<=V&&V<=56319)if(L===R-1)H.push(65533);else{var J=M.charCodeAt(L+1);if(56320<=J&&J<=57343){var Y=1023&V,Z=1023&J;H.push(65536+(Y<<10)+Z),L+=1}else H.push(65533)}L+=1}return H}(P));!H.endOfStream()&&(V=this._encoder.handler(H,H.read()))!==g;)Array.isArray(V)?L.push.apply(L,V):L.push(V);if(!this._streaming){for(;(V=this._encoder.handler(H,H.read()))!==g;)Array.isArray(V)?L.push.apply(L,V):L.push(V);this._encoder=null}return new Uint8Array(L)}}},78948:(ne,r,d)=>{"use strict";d.r(r),d.d(r,{default:()=>S,uuid4:()=>E,valid:()=>_});const l=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function _(a){return l.test(a)}function E(){var a=URL.createObjectURL(new Blob),h=a.toString();return URL.revokeObjectURL(a),h.split(/[:\/]/g).pop().toLowerCase()}E.valid=_;const S=E},1242:ne=>{"use strict";ne.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},97219:ne=>{"use strict";ne.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},54615:ne=>{"use strict";ne.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},87088:ne=>{"use strict";ne.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},38512:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},86164:ne=>{"use strict";ne.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},3427:ne=>{"use strict";ne.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},20863:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},56584:ne=>{"use strict";ne.exports=JSON.parse('{"GasLimitExceeded":"Exceeded the maximum amount of gas allowed to burn per contract","MethodEmptyName":"Method name is empty","WasmerCompileError":"Wasmer compilation error: {{msg}}","GuestPanic":"Smart contract panicked: {{panic_msg}}","Memory":"Error creating Wasm memory","GasExceeded":"Exceeded the prepaid gas","MethodUTF8Error":"Method name is not valid UTF8 string","BadUTF16":"String encoding is bad UTF-16 sequence","WasmTrap":"WebAssembly trap: {{msg}}","GasInstrumentation":"Gas instrumentation failed or contract has denied instructions.","InvalidPromiseIndex":"{{promise_idx}} does not correspond to existing promises","InvalidPromiseResultIndex":"Accessed invalid promise result index: {{result_idx}}","Deserialization":"Error happened while deserializing the module","MethodNotFound":"Contract method is not found","InvalidRegisterId":"Accessed invalid register id: {{register_id}}","InvalidReceiptIndex":"VM Logic returned an invalid receipt index: {{receipt_index}}","EmptyMethodName":"Method name is empty in contract call","CannotReturnJointPromise":"Returning joint promise is currently prohibited","StackHeightInstrumentation":"Stack instrumentation failed","CodeDoesNotExist":"Cannot find contract code for account {{account_id}}","MethodInvalidSignature":"Invalid method signature","IntegerOverflow":"Integer overflow happened during contract execution","MemoryAccessViolation":"MemoryAccessViolation","InvalidIteratorIndex":"Iterator index {{iterator_index}} does not exist","IteratorWasInvalidated":"Iterator {{iterator_index}} was invalidated after its creation by performing a mutable operation on trie","InvalidAccountId":"VM Logic returned an invalid account id","Serialization":"Error happened while serializing the module","CannotAppendActionToJointPromise":"Actions can only be appended to non-joint promise.","InternalMemoryDeclared":"Internal memory declaration has been found in the module","Instantiate":"Error happened during instantiation","ProhibitedInView":"{{method_name}} is not allowed in view calls","InvalidMethodName":"VM Logic returned an invalid method name","BadUTF8":"String encoding is bad UTF-8 sequence","BalanceExceeded":"Exceeded the account balance","LinkError":"Wasm contract link error: {{msg}}","InvalidPublicKey":"VM Logic provided an invalid public key","ActorNoPermission":"Actor {{actor_id}} doesn\'t have permission to account {{account_id}} to complete the action","LackBalanceForState":"The account {{account_id}} wouldn\'t have enough balance to cover storage, required to have {{amount}} yoctoNEAR more","ReceiverMismatch":"Wrong AccessKey used for transaction: transaction is sent to receiver_id={{tx_receiver}}, but is signed with function call access key that restricted to only use with receiver_id={{ak_receiver}}. Either change receiver_id in your transaction or switch to use a FullAccessKey.","CostOverflow":"Transaction gas or balance cost is too high","InvalidSignature":"Transaction is not signed with the given public key","AccessKeyNotFound":"Signer \\"{{account_id}}\\" doesn\'t have access key with the given public_key {{public_key}}","NotEnoughBalance":"Sender {{signer_id}} does not have enough balance {{#formatNear}}{{balance}}{{/formatNear}} for operation costing {{#formatNear}}{{cost}}{{/formatNear}}","NotEnoughAllowance":"Access Key {account_id}:{public_key} does not have enough balance {{#formatNear}}{{allowance}}{{/formatNear}} for transaction costing {{#formatNear}}{{cost}}{{/formatNear}}","Expired":"Transaction has expired","DeleteAccountStaking":"Account {{account_id}} is staking and can not be deleted","SignerDoesNotExist":"Signer {{signer_id}} does not exist","TriesToStake":"Account {{account_id}} tried to stake {{#formatNear}}{{stake}}{{/formatNear}}, but has staked {{#formatNear}}{{locked}}{{/formatNear}} and only has {{#formatNear}}{{balance}}{{/formatNear}}","AddKeyAlreadyExists":"The public key {{public_key}} is already used for an existing access key","InvalidSigner":"Invalid signer account ID {{signer_id}} according to requirements","CreateAccountNotAllowed":"The new account_id {{account_id}} can\'t be created by {{predecessor_id}}","RequiresFullAccess":"The transaction contains more then one action, but it was signed with an access key which allows transaction to apply only one specific action. To apply more then one actions TX must be signed with a full access key","TriesToUnstake":"Account {{account_id}} is not yet staked, but tried to unstake","InvalidNonce":"Transaction nonce {{tx_nonce}} must be larger than nonce of the used access key {{ak_nonce}}","AccountAlreadyExists":"Can\'t create a new account {{account_id}}, because it already exists","InvalidChain":"Transaction parent block hash doesn\'t belong to the current chain","AccountDoesNotExist":"Can\'t complete the action because account {{account_id}} doesn\'t exist","MethodNameMismatch":"Transaction method name {{method_name}} isn\'t allowed by the access key","DeleteAccountHasRent":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover the rent","DeleteAccountHasEnoughBalance":"Account {{account_id}} can\'t be deleted. It has {{#formatNear}}{{balance}}{{/formatNear}}, which is enough to cover it\'s storage","InvalidReceiver":"Invalid receiver account ID {{receiver_id}} according to requirements","DeleteKeyDoesNotExist":"Account {{account_id}} tries to remove an access key that doesn\'t exist","Timeout":"Timeout exceeded","Closed":"Connection closed"}')},96747:ne=>{"use strict";ne.exports=JSON.parse('{"schema":{"BadUTF16":{"name":"BadUTF16","subtypes":[],"props":{}},"BadUTF8":{"name":"BadUTF8","subtypes":[],"props":{}},"BalanceExceeded":{"name":"BalanceExceeded","subtypes":[],"props":{}},"BreakpointTrap":{"name":"BreakpointTrap","subtypes":[],"props":{}},"CacheError":{"name":"CacheError","subtypes":["ReadError","WriteError","DeserializationError","SerializationError"],"props":{}},"CallIndirectOOB":{"name":"CallIndirectOOB","subtypes":[],"props":{}},"CannotAppendActionToJointPromise":{"name":"CannotAppendActionToJointPromise","subtypes":[],"props":{}},"CannotReturnJointPromise":{"name":"CannotReturnJointPromise","subtypes":[],"props":{}},"CodeDoesNotExist":{"name":"CodeDoesNotExist","subtypes":[],"props":{"account_id":""}},"CompilationError":{"name":"CompilationError","subtypes":["CodeDoesNotExist","PrepareError","WasmerCompileError"],"props":{}},"ContractSizeExceeded":{"name":"ContractSizeExceeded","subtypes":[],"props":{"limit":"","size":""}},"Deprecated":{"name":"Deprecated","subtypes":[],"props":{"method_name":""}},"Deserialization":{"name":"Deserialization","subtypes":[],"props":{}},"DeserializationError":{"name":"DeserializationError","subtypes":[],"props":{}},"EmptyMethodName":{"name":"EmptyMethodName","subtypes":[],"props":{}},"FunctionCallError":{"name":"FunctionCallError","subtypes":["CompilationError","LinkError","MethodResolveError","WasmTrap","WasmUnknownError","HostError","EvmError"],"props":{}},"GasExceeded":{"name":"GasExceeded","subtypes":[],"props":{}},"GasInstrumentation":{"name":"GasInstrumentation","subtypes":[],"props":{}},"GasLimitExceeded":{"name":"GasLimitExceeded","subtypes":[],"props":{}},"GenericTrap":{"name":"GenericTrap","subtypes":[],"props":{}},"GuestPanic":{"name":"GuestPanic","subtypes":[],"props":{"panic_msg":""}},"HostError":{"name":"HostError","subtypes":["BadUTF16","BadUTF8","GasExceeded","GasLimitExceeded","BalanceExceeded","EmptyMethodName","GuestPanic","IntegerOverflow","InvalidPromiseIndex","CannotAppendActionToJointPromise","CannotReturnJointPromise","InvalidPromiseResultIndex","InvalidRegisterId","IteratorWasInvalidated","MemoryAccessViolation","InvalidReceiptIndex","InvalidIteratorIndex","InvalidAccountId","InvalidMethodName","InvalidPublicKey","ProhibitedInView","NumberOfLogsExceeded","KeyLengthExceeded","ValueLengthExceeded","TotalLogLengthExceeded","NumberPromisesExceeded","NumberInputDataDependenciesExceeded","ReturnedValueLengthExceeded","ContractSizeExceeded","Deprecated"],"props":{}},"IllegalArithmetic":{"name":"IllegalArithmetic","subtypes":[],"props":{}},"IncorrectCallIndirectSignature":{"name":"IncorrectCallIndirectSignature","subtypes":[],"props":{}},"Instantiate":{"name":"Instantiate","subtypes":[],"props":{}},"IntegerOverflow":{"name":"IntegerOverflow","subtypes":[],"props":{}},"InternalMemoryDeclared":{"name":"InternalMemoryDeclared","subtypes":[],"props":{}},"InvalidAccountId":{"name":"InvalidAccountId","subtypes":[],"props":{"account_id":""}},"InvalidIteratorIndex":{"name":"InvalidIteratorIndex","subtypes":[],"props":{"iterator_index":""}},"InvalidMethodName":{"name":"InvalidMethodName","subtypes":[],"props":{}},"InvalidPromiseIndex":{"name":"InvalidPromiseIndex","subtypes":[],"props":{"promise_idx":""}},"InvalidPromiseResultIndex":{"name":"InvalidPromiseResultIndex","subtypes":[],"props":{"result_idx":""}},"InvalidPublicKey":{"name":"InvalidPublicKey","subtypes":[],"props":{}},"InvalidReceiptIndex":{"name":"InvalidReceiptIndex","subtypes":[],"props":{"receipt_index":""}},"InvalidRegisterId":{"name":"InvalidRegisterId","subtypes":[],"props":{"register_id":""}},"IteratorWasInvalidated":{"name":"IteratorWasInvalidated","subtypes":[],"props":{"iterator_index":""}},"KeyLengthExceeded":{"name":"KeyLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"LinkError":{"name":"LinkError","subtypes":[],"props":{"msg":""}},"Memory":{"name":"Memory","subtypes":[],"props":{}},"MemoryAccessViolation":{"name":"MemoryAccessViolation","subtypes":[],"props":{}},"MemoryOutOfBounds":{"name":"MemoryOutOfBounds","subtypes":[],"props":{}},"MethodEmptyName":{"name":"MethodEmptyName","subtypes":[],"props":{}},"MethodInvalidSignature":{"name":"MethodInvalidSignature","subtypes":[],"props":{}},"MethodNotFound":{"name":"MethodNotFound","subtypes":[],"props":{}},"MethodResolveError":{"name":"MethodResolveError","subtypes":["MethodEmptyName","MethodUTF8Error","MethodNotFound","MethodInvalidSignature"],"props":{}},"MethodUTF8Error":{"name":"MethodUTF8Error","subtypes":[],"props":{}},"MisalignedAtomicAccess":{"name":"MisalignedAtomicAccess","subtypes":[],"props":{}},"NumberInputDataDependenciesExceeded":{"name":"NumberInputDataDependenciesExceeded","subtypes":[],"props":{"limit":"","number_of_input_data_dependencies":""}},"NumberOfLogsExceeded":{"name":"NumberOfLogsExceeded","subtypes":[],"props":{"limit":""}},"NumberPromisesExceeded":{"name":"NumberPromisesExceeded","subtypes":[],"props":{"limit":"","number_of_promises":""}},"PrepareError":{"name":"PrepareError","subtypes":["Serialization","Deserialization","InternalMemoryDeclared","GasInstrumentation","StackHeightInstrumentation","Instantiate","Memory"],"props":{}},"ProhibitedInView":{"name":"ProhibitedInView","subtypes":[],"props":{"method_name":""}},"ReadError":{"name":"ReadError","subtypes":[],"props":{}},"ReturnedValueLengthExceeded":{"name":"ReturnedValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Serialization":{"name":"Serialization","subtypes":[],"props":{}},"SerializationError":{"name":"SerializationError","subtypes":[],"props":{"hash":""}},"StackHeightInstrumentation":{"name":"StackHeightInstrumentation","subtypes":[],"props":{}},"StackOverflow":{"name":"StackOverflow","subtypes":[],"props":{}},"TotalLogLengthExceeded":{"name":"TotalLogLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"Unreachable":{"name":"Unreachable","subtypes":[],"props":{}},"ValueLengthExceeded":{"name":"ValueLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"WasmTrap":{"name":"WasmTrap","subtypes":["Unreachable","IncorrectCallIndirectSignature","MemoryOutOfBounds","CallIndirectOOB","IllegalArithmetic","MisalignedAtomicAccess","BreakpointTrap","StackOverflow","GenericTrap"],"props":{}},"WasmUnknownError":{"name":"WasmUnknownError","subtypes":[],"props":{}},"WasmerCompileError":{"name":"WasmerCompileError","subtypes":[],"props":{"msg":""}},"WriteError":{"name":"WriteError","subtypes":[],"props":{}},"AccessKeyNotFound":{"name":"AccessKeyNotFound","subtypes":[],"props":{"account_id":"","public_key":""}},"AccountAlreadyExists":{"name":"AccountAlreadyExists","subtypes":[],"props":{"account_id":""}},"AccountDoesNotExist":{"name":"AccountDoesNotExist","subtypes":[],"props":{"account_id":""}},"ActionError":{"name":"ActionError","subtypes":["AccountAlreadyExists","AccountDoesNotExist","CreateAccountOnlyByRegistrar","CreateAccountNotAllowed","ActorNoPermission","DeleteKeyDoesNotExist","AddKeyAlreadyExists","DeleteAccountStaking","LackBalanceForState","TriesToUnstake","TriesToStake","InsufficientStake","FunctionCallError","NewReceiptValidationError","OnlyImplicitAccountCreationAllowed"],"props":{"index":""}},"ActionsValidationError":{"name":"ActionsValidationError","subtypes":["DeleteActionMustBeFinal","TotalPrepaidGasExceeded","TotalNumberOfActionsExceeded","AddKeyMethodNamesNumberOfBytesExceeded","AddKeyMethodNameLengthExceeded","IntegerOverflow","InvalidAccountId","ContractSizeExceeded","FunctionCallMethodNameLengthExceeded","FunctionCallArgumentsLengthExceeded","UnsuitableStakingKey","FunctionCallZeroAttachedGas"],"props":{}},"ActorNoPermission":{"name":"ActorNoPermission","subtypes":[],"props":{"account_id":"","actor_id":""}},"AddKeyAlreadyExists":{"name":"AddKeyAlreadyExists","subtypes":[],"props":{"account_id":"","public_key":""}},"AddKeyMethodNameLengthExceeded":{"name":"AddKeyMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"AddKeyMethodNamesNumberOfBytesExceeded":{"name":"AddKeyMethodNamesNumberOfBytesExceeded","subtypes":[],"props":{"limit":"","total_number_of_bytes":""}},"BalanceMismatchError":{"name":"BalanceMismatchError","subtypes":[],"props":{"final_accounts_balance":"","final_postponed_receipts_balance":"","incoming_receipts_balance":"","incoming_validator_rewards":"","initial_accounts_balance":"","initial_postponed_receipts_balance":"","new_delayed_receipts_balance":"","other_burnt_amount":"","outgoing_receipts_balance":"","processed_delayed_receipts_balance":"","slashed_burnt_amount":"","tx_burnt_amount":""}},"CostOverflow":{"name":"CostOverflow","subtypes":[],"props":{}},"CreateAccountNotAllowed":{"name":"CreateAccountNotAllowed","subtypes":[],"props":{"account_id":"","predecessor_id":""}},"CreateAccountOnlyByRegistrar":{"name":"CreateAccountOnlyByRegistrar","subtypes":[],"props":{"account_id":"","predecessor_id":"","registrar_account_id":""}},"DeleteAccountStaking":{"name":"DeleteAccountStaking","subtypes":[],"props":{"account_id":""}},"DeleteActionMustBeFinal":{"name":"DeleteActionMustBeFinal","subtypes":[],"props":{}},"DeleteKeyDoesNotExist":{"name":"DeleteKeyDoesNotExist","subtypes":[],"props":{"account_id":"","public_key":""}},"DepositWithFunctionCall":{"name":"DepositWithFunctionCall","subtypes":[],"props":{}},"Expired":{"name":"Expired","subtypes":[],"props":{}},"FunctionCallArgumentsLengthExceeded":{"name":"FunctionCallArgumentsLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallMethodNameLengthExceeded":{"name":"FunctionCallMethodNameLengthExceeded","subtypes":[],"props":{"length":"","limit":""}},"FunctionCallZeroAttachedGas":{"name":"FunctionCallZeroAttachedGas","subtypes":[],"props":{}},"InsufficientStake":{"name":"InsufficientStake","subtypes":[],"props":{"account_id":"","minimum_stake":"","stake":""}},"InvalidAccessKeyError":{"name":"InvalidAccessKeyError","subtypes":["AccessKeyNotFound","ReceiverMismatch","MethodNameMismatch","RequiresFullAccess","NotEnoughAllowance","DepositWithFunctionCall"],"props":{}},"InvalidChain":{"name":"InvalidChain","subtypes":[],"props":{}},"InvalidDataReceiverId":{"name":"InvalidDataReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidNonce":{"name":"InvalidNonce","subtypes":[],"props":{"ak_nonce":"","tx_nonce":""}},"InvalidPredecessorId":{"name":"InvalidPredecessorId","subtypes":[],"props":{"account_id":""}},"InvalidReceiverId":{"name":"InvalidReceiverId","subtypes":[],"props":{"account_id":""}},"InvalidSignature":{"name":"InvalidSignature","subtypes":[],"props":{}},"InvalidSignerId":{"name":"InvalidSignerId","subtypes":[],"props":{"account_id":""}},"InvalidTxError":{"name":"InvalidTxError","subtypes":["InvalidAccessKeyError","InvalidSignerId","SignerDoesNotExist","InvalidNonce","InvalidReceiverId","InvalidSignature","NotEnoughBalance","LackBalanceForState","CostOverflow","InvalidChain","Expired","ActionsValidation"],"props":{}},"LackBalanceForState":{"name":"LackBalanceForState","subtypes":[],"props":{"account_id":"","amount":""}},"MethodNameMismatch":{"name":"MethodNameMismatch","subtypes":[],"props":{"method_name":""}},"NotEnoughAllowance":{"name":"NotEnoughAllowance","subtypes":[],"props":{"account_id":"","allowance":"","cost":"","public_key":""}},"NotEnoughBalance":{"name":"NotEnoughBalance","subtypes":[],"props":{"balance":"","cost":"","signer_id":""}},"OnlyImplicitAccountCreationAllowed":{"name":"OnlyImplicitAccountCreationAllowed","subtypes":[],"props":{"account_id":""}},"ReceiptValidationError":{"name":"ReceiptValidationError","subtypes":["InvalidPredecessorId","InvalidReceiverId","InvalidSignerId","InvalidDataReceiverId","ReturnedValueLengthExceeded","NumberInputDataDependenciesExceeded","ActionsValidation"],"props":{}},"ReceiverMismatch":{"name":"ReceiverMismatch","subtypes":[],"props":{"ak_receiver":"","tx_receiver":""}},"RequiresFullAccess":{"name":"RequiresFullAccess","subtypes":[],"props":{}},"SignerDoesNotExist":{"name":"SignerDoesNotExist","subtypes":[],"props":{"signer_id":""}},"TotalNumberOfActionsExceeded":{"name":"TotalNumberOfActionsExceeded","subtypes":[],"props":{"limit":"","total_number_of_actions":""}},"TotalPrepaidGasExceeded":{"name":"TotalPrepaidGasExceeded","subtypes":[],"props":{"limit":"","total_prepaid_gas":""}},"TriesToStake":{"name":"TriesToStake","subtypes":[],"props":{"account_id":"","balance":"","locked":"","stake":""}},"TriesToUnstake":{"name":"TriesToUnstake","subtypes":[],"props":{"account_id":""}},"TxExecutionError":{"name":"TxExecutionError","subtypes":["ActionError","InvalidTxError"],"props":{}},"UnsuitableStakingKey":{"name":"UnsuitableStakingKey","subtypes":[],"props":{"public_key":""}},"Closed":{"name":"Closed","subtypes":[],"props":{}},"InternalError":{"name":"InternalError","subtypes":[],"props":{}},"ServerError":{"name":"ServerError","subtypes":["TxExecutionError","Timeout","Closed","InternalError"],"props":{}},"Timeout":{"name":"Timeout","subtypes":[],"props":{}}}}')},50539:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":"near-mobile-wallet://sign"}')},87908:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},13917:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend_production.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend_production.peersyst.tech"}')},15247:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"https://near-mobile-signer-backend.peersyst.tech","widgetUrl":"https://near-mobile-signer-backend.peersyst.tech"}')},98593:ne=>{"use strict";ne.exports=JSON.parse('{"proxyUrl":"","widgetUrl":"","polling":{"maxIterations":1000},"nearMobileWalletUrl":""}')},31008:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},64775:ne=>{"use strict";ne.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},98:ne=>{"use strict";ne.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},24457:ne=>{"use strict";ne.exports=JSON.parse('["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]')},44946:ne=>{"use strict";ne.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:ne=>{"use strict";ne.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:ne=>{"use strict";ne.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},29799:ne=>{"use strict";ne.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:ne=>{"use strict";ne.exports={i8:"6.5.4"}},73619:ne=>{"use strict";ne.exports=JSON.parse('{"v6":{"ct":"~0.10.0"}}')},10798:ne=>{"use strict";ne.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","306":"(Unused)","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Unordered Collection","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')},22562:ne=>{"use strict";ne.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},ne=>{var l;l=40744,ne(ne.s=l)}]); \ No newline at end of file diff --git a/runtime.533875b919b0f0d0.js b/runtime.533875b919b0f0d0.js deleted file mode 100644 index 5b5aab8da..000000000 --- a/runtime.533875b919b0f0d0.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,r.amdO={},e=[],r.O=(n,t,u,f)=>{if(!t){var a=1/0;for(i=0;i=f)&&Object.keys(r.O).every(b=>r.O[b](t[l]))?t.splice(l--,1):(s=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,u,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{283:"a96038e1f6201dba",390:"466975e8770a6f7a"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angular:";r.l=(t,u,f,i)=>{if(e[t])e[t].push(u);else{var a,s;if(void 0!==f)for(var l=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(u,f)=>{var i=r.o(e,u)?e[u]:void 0;if(0!==i)if(i)f.push(i[2]);else if(666!=u){var a=new Promise((o,c)=>i=e[u]=[o,c]);f.push(i[2]=a);var s=r.p+r.u(u),l=new Error;r.l(s,o=>{if(r.o(e,u)&&(0!==(i=e[u])&&(e[u]=void 0),i)){var c=o&&("load"===o.type?"missing":o.type),p=o&&o.target&&o.target.src;l.message="Loading chunk "+u+" failed.\n("+c+": "+p+")",l.name="ChunkLoadError",l.type=c,l.request=p,i[1](l)}},"chunk-"+u,u)}else e[u]=0},r.O.j=u=>0===e[u];var n=(u,f)=>{var l,d,[i,a,s]=f,o=0;if(i.some(p=>0!==e[p])){for(l in a)r.o(a,l)&&(r.m[l]=a[l]);if(s)var c=s(r)}for(u&&u(f);o{"use strict";var e,b={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return b[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=b,r.amdO={},e=[],r.O=(n,t,f,u)=>{if(!t){var a=1/0;for(i=0;i=u)&&Object.keys(r.O).every(v=>r.O[v](t[l]))?t.splice(l--,1):(s=!1,u0&&e[i-1][2]>u;i--)e[i]=e[i-1];e[i]=[t,f,u]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{283:"8d97d764e5cd9c37",652:"8ac23b511cb4abaa"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angular:";r.l=(t,f,u,i)=>{if(e[t])e[t].push(f);else{var a,s;if(void 0!==u)for(var l=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(v)),m)return m(v)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),s&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,u)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)u.push(i[2]);else if(666!=f){var a=new Promise((o,c)=>i=e[f]=[o,c]);u.push(i[2]=a);var s=r.p+r.u(f),l=new Error;r.l(s,o=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var c=o&&("load"===o.type?"missing":o.type),p=o&&o.target&&o.target.src;l.message="Loading chunk "+f+" failed.\n("+c+": "+p+")",l.name="ChunkLoadError",l.type=c,l.request=p,i[1](l)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,u)=>{var l,d,[i,a,s]=u,o=0;if(i.some(p=>0!==e[p])){for(l in a)r.o(a,l)&&(r.m[l]=a[l]);if(s)var c=s(r)}for(f&&f(u);odiv:first-of-type{padding:20px;margin-bottom:20px;border-radius:16px;background:#fff}.scan-qr-code .qr-code{height:calc(100% - 200px);border:1px solid var(--wallet-selector-content-bg, var(--content-bg));border-radius:4px;text-align:center;margin-top:64px}.scan-qr-code .qr-code svg{width:239px;height:239px}.scan-qr-code .qr-code .copy-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--selected-wallet-bg);font-size:14px}.scan-qr-code .qr-code .copy-btn svg{margin-right:5px;width:24px;height:24px}.scan-qr-code .qr-code .notification{font-size:14px}.scan-qr-code .footer{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;bottom:0;font-size:14px}.scan-qr-code .footer .btn{background:var(--secondary-button-bg-color);color:var(--secondary-button-text-color);border:1px solid var(--secondary-button-border-color);border-radius:4px;font-weight:700;font-size:14px;line-height:24px;padding:8px 24px}@media (min-width: 577px){.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-mobile{display:none}.scan-qr-code .footer{position:absolute}}@media (min-width: 769px){.button-spacing{margin:90px}}@media (max-width: 768px){.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper{margin-top:45px}.button-spacing{margin:45px}.nws-modal-wrapper .nws-modal .modal-left{width:40%;border-right:1px solid var(--wallet-selector-sidebar-border-color, var(--sidebar-border-color));padding:32px 16px;height:100%;max-height:70vh;overflow:auto}.nws-modal-wrapper .nws-modal .modal-right{width:60%;padding:32px 16px;overflow:auto}.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper{padding:0 0 0 10px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-image{margin-top:30px;margin-bottom:35px}}@media (max-width: 576px){.nws-modal-wrapper .nws-modal .wallet-home-wrapper .get-wallet-wrapper,.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper,.nws-modal-wrapper .nws-modal .connecting-wrapper,.nws-modal-wrapper .nws-modal .wallet-not-installed-wrapper,.nws-modal-wrapper .nws-modal .switch-network-message-wrapper{margin-top:20px}.nws-modal-wrapper .nws-modal .modal-left .modal-left-title h2{text-align:center}.nws-modal-wrapper .wallet-not-installed-wrapper>p{margin:20px 0 30px;max-width:500px}.nws-modal-wrapper .nws-modal .nws-modal-body button.get-wallet{background-color:var(--wallet-selector-home-button-bg, var(--content-bg))}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-hide{display:none}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-mobile p{font-size:14px;text-align:center;margin:auto}.nws-modal-wrapper .nws-modal{width:100%;display:block;overflow:auto;bottom:0;height:500px;background:var(--wallet-selector-mobile-bottom-section, var(--bottom-section));border-radius:16px 16px 0 0}.nws-modal-wrapper .nws-modal .modal-left{width:100%;background-color:var(--wallet-selector-content-bg, var(--content-bg));height:auto;padding:32px 12px}.nws-modal-wrapper .nws-modal .modal-left .nws-modal-body{display:flex;overflow:auto}.nws-modal-wrapper .nws-modal .modal-left .nws-modal-body .wallet-options-wrapper{margin:auto}.nws-modal-wrapper .nws-modal .modal-right{width:100%;background-color:var(--wallet-selector-mobile-bottom-section, var(--bottom-section))}.nws-modal-wrapper .nws-modal .connecting-wrapper .content{padding-top:0}.connecting-wrapper .content .icon .green-dot{border-color:var(--wallet-selector-mobile-bottom-section, var(--bottom-section))}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-header h3.middleTitle{text-align:center;font-size:16px;margin:4px auto}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-header h3.middleTitle.-open{padding-right:32px}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .content{font-size:14px;text-align:center;color:var(--mobile-text);margin:0}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body{margin-top:10px;padding:0}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton{margin:25px auto 12px}.nws-modal-wrapper .nws-modal .modal-header{display:block;font-size:18px;text-align:center}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button{position:absolute;right:30px;top:30px}.nws-modal-wrapper .nws-modal .nws-modal-header h2{font-size:18px;text-align:center}.nws-modal-wrapper .nws-modal .wallet-options-wrapper{margin-bottom:0}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .description{display:none}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list{display:flex;overflow:auto;padding-block:10px;grid-gap:0;gap:0}.nws-modal-wrapper .nws-modal .info{display:none;width:90px}.single-wallet{display:block;min-width:76px;max-width:76px}.single-wallet.sidebar .icon{width:56px;height:56px;margin:auto}.single-wallet.sidebar .content{width:auto}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .content .title{font-size:12px;line-height:16px;margin-top:10px;text-align:center;margin-left:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.single-wallet.wallet-connect,.single-wallet.my-near-wallet{word-break:break-word}.single-wallet-get:hover{background-color:#4f7cd129}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-image,.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper{margin-top:30px;margin-bottom:30px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-description>p{max-width:450px;margin-left:auto;margin-right:auto}.nws-modal-wrapper ::-webkit-scrollbar{height:4px;width:4px;background:var(--backdrop-bg)}.nws-modal-wrapper ::-webkit-scrollbar-thumb:horizontal{background:var(--close-button-fill-icon-color);border-radius:10px}}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .import-content{width:auto}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet .import-content .title,.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet .import-content .import-type{color:#fff}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .import-content .title{font-size:14px;color:var(--wallet-selector-heading-color, var(--heading-color));margin-left:10px}.import-content .import-type{font-size:10px;margin-left:10px;margin-top:2px;font-weight:400}.nws-modal-wrapper .nws-modal .modal-right .middleContainer{display:flex;flex-direction:column;align-content:center;width:100%}.nws-modal-wrapper .nws-modal .modal-right .middleContainer p{margin:0;text-align:center;font-weight:400;font-size:14px}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton:disabled,.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton[disabled]{cursor:not-allowed;background-color:var(--wallet-selector-home-button-bg, var(--home-button-bg));color:#606060;border:1px solid transparent}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton.account-export-button{width:300px;margin:0 auto}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton.account-export-button.secondary{background:var( --secondary-button-bg-color);border:1px solid var(--secondary-button-border-color);border-radius:4px;color:var(--secondary-button-text-color);margin-bottom:10px}.checkbox{position:relative;display:flex;margin:10px}.checkbox label{position:relative;display:block;padding-left:40px;margin-bottom:0;cursor:pointer;color:var(--wallet-selector-heading-color, var(--heading-color))}.checkbox label:before{content:"";position:absolute;left:0;top:-2px;margin:4px;width:18px;height:18px;transition:transform .28s ease;border-radius:3px;border:2px solid #C1C1C1}.checkbox label:after{content:"";display:block;width:10px;height:5px;border-bottom:2px solid #4FD98F;border-left:2px solid #4FD98F;transform:rotate(-45deg) scale(0);transition:transform ease .25s;position:absolute;top:8px;left:10px}.checkbox input[type=checkbox]{width:auto;opacity:0;position:absolute;left:0;margin-left:-20px;margin-top:0}.checkbox input[type=checkbox]:checked+label:before{border:2px solid #4FD98F;background-color:#4fd98f4d}.checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.checkbox input[type=checkbox]:focus+label:before{outline:0}.checkbox input[type=checkbox]:disabled+label{color:var(--wallet-selector-text-color, var(--text-color));cursor:not-allowed;display:flex;flex-direction:column}.checkbox input[type=checkbox]:disabled+label>span.error{color:var(--wallet-selector-error, var(--error));font-size:10px}.checkbox input[type=checkbox]:disabled+label>span.warning{color:#e9b870;font-size:10px}.checkbox input[type=checkbox]:disabled+label:before{border:2px solid #606060}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy{position:relative;cursor:copy;background-color:var(--wallet-selector-content-bg, var(--content-bg));display:block;margin:0 auto;border-radius:8px;border:1px solid var(--wallet-option-border-color, var(--sidebar-border-color));padding:0;filter:brightness(95%)}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy>.copy-success{position:absolute;left:50%;transform:translate(-50%);text-align:center;background-color:#8decc6;color:#005a46;border-radius:4px;padding:6px 8px;font-size:13px;top:-30px;opacity:0;pointer-events:none;transition:.2s;font-weight:400}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy>.copy-success.show{top:-40px;opacity:1}.account-export-body{height:100%;display:flex;flex-direction:column}.account-export{height:100%;margin-top:0!important;padding:0!important}.account-export .content{width:100%;height:100%;padding:25px 0 0!important;display:flex;flex-direction:column;align-items:center}.account-export .content .account-selection-spinner{width:80px;margin:70px auto auto}.account-export .filler{flex:1}.account-export .account-selection{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;max-height:200px;min-height:50px;overflow-y:auto;overflow-x:hidden;margin:20px 0}.account-export .account-selection-container{display:flex;flex:1;flex-direction:column}.account-export .account-select-all{width:100%;text-align:left;cursor:pointer;color:var( --wallet-option-outline-color, var(--outline-color));font-size:14px}.account-export .account-unavailable{width:100%;color:var(--wallet-selector-text-color, var(--text-color));font-size:14px;text-align:left}.account-export .account-selection .account-selection-row{display:flex;flex-direction:row;align-items:center;width:100%;border-bottom:1px solid rgba(60,60,60,.22)}.account-export .account-selection .account-selection-row label{display:flex;flex-direction:column;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;width:399px}.account-export .checkbox .label{font-size:14px}.account-export .passphrase-title{font-size:14px;text-align:center;font-weight:300;color:var(--wallet-selector-text-color, var(--text-color));margin:40px 0 30px}.account-export .passphrase-text{display:flex;flex-direction:row;align-items:flex-start;background:transparent;word-break:break-word;text-align:center;filter:blur(4px);padding:20px;border-radius:5px}.account-export .passphrase-text:hover{filter:none}.account-export .passphrase-check-container{margin-bottom:20px}.account-export .passphrase-label{font-size:10px;cursor:copy;color:var(--wallet-selector-text-color, var(--text-color));margin-top:10px}.complete-desc{flex:1;text-align:center;margin-top:10px}.complete-desc .content{font-size:14px;width:300px;margin:40px auto 0}.nws-modal-wrapper .nws-modal .connecting-wrapper-err{height:100%}*{box-sizing:border-box}html{--bg: #fff;--fg: #25282A;--gray: #888;--royal: #0072CE;--blue: #6AD1E3;--primary: #D1CCBD;--secondary: var(--royal);--tertiary: #FF585D;background-color:var(--bg);color:var(--fg);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:calc(.65em + .7vw);line-height:1.3}html ::selection{background:var(--secondary);color:var(--bg)}@media (prefers-color-scheme: dark){html{--bg: #25282A;--fg: #fff;--secondary: var(--blue)}html ::selection{background:var(--secondary);color:var(--fg)}}body{margin:0 auto;padding:0 1em;max-width:40em}fieldset{border:none;margin:0;padding:0}.highlight{align-items:center;display:flex;margin-bottom:.5em;width:100%}.highlight label{margin-right:.5em}.highlight input{caret-color:var(--secondary)}label{color:var(--gray)}button,.highlight{border-radius:5px;border-color:var(--primary);border:.1em solid var(--primary);padding:.5em 1em}button:hover,.highlight:hover,button:focus,.highlight:focus,button:focus-within,.highlight:focus-within{border-color:var(--secondary)}input{border:none;flex:1}input:read-only{color:var(--primary)}input[type=number]{text-align:center;border-bottom:.1em solid var(--primary);margin:0 1em;width:4em;padding-left:.5em}input[type=number]:hover,input[type=number]:focus{border-color:var(--secondary)}input[type=checkbox]{margin:0 1em}button,input{background:transparent;color:inherit;cursor:pointer;font:inherit;outline:none}button{position:relative;transition:top 50ms}button:hover,button:focus{top:-1px}button:active{background:var(--secondary);border-color:var(--secondary);top:1px}.is-premium{border-left:.25em solid var(--secondary);padding-left:.25em;margin-left:-.5em}.title-container{display:flex;align-items:center;justify-content:space-between} diff --git a/styles.f403c2e934357859.css b/styles.f403c2e934357859.css new file mode 100644 index 000000000..9651dc043 --- /dev/null +++ b/styles.f403c2e934357859.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&display=swap";#near-wallet-selector-modal{--backdrop-bg: #26262630;--heading-color: #222222;--text-color: #676767;--sidebar-border-color: #EDEDED;--selected-wallet-bg: #4F7CD1;--selected-wallet-bg-hover: transparent;--wallet-option-border-color: #A7A7A730;--wallet-option-bg-hover: #6494ee3d;--wallet-option-outline-color: #6494EE;--content-bg: #FAFAFA;--change-path-bg: #EDEDED;--home-button-bg: #EDEDED;--confirm-button-bg: #5F8AFA;--confirm-button-bg-hover: #5AA6FF;--error: #DB5555;--close-button-bg-color: #EDEDED;--close-button-fill-icon-color: #9F9F9F;--spinner-color: #676767;--bottom-section: #ececec;--mobile-text: #3e3e3e;--connected-green: #47E586;--gradient-dark-icon: radial-gradient(297.59% 179.46% at 91.67% -25%, #AEC2EA 0%, #95D1E4 100%);--get-wallet-option-bg-color: #F8F9FA;--get-wallet-option-bg-color-hover: #6494ee3d;--get-wallet-option-border-color: #C1C1C1;--get-wallet-outline-color: #6494EE;--get-wallet-option-box-shadow: 0px 2px 2px rgba(17, 22, 24, .04);--secondary-button-bg-color: #4F7CD129;--secondary-button-border-color: #4F7CD129;--secondary-button-text-color: #4F7CD1;--what-wallet-icon-color: #FFFFFF;--deprecated-icon-bg-color: #D7E2F7;--deprecated-icon-bg-color-selected: #4F7CD1}#near-wallet-selector-modal .dark-theme{--backdrop-bg: #26262630;--heading-color: #FFFFFF;--text-color: #C1C1C1;--sidebar-border-color: #313030;--selected-wallet-bg: #4F7CD1;--selected-wallet-bg-hover: #262626CC;--wallet-option-border-color: #A7A7A730;--wallet-option-bg-hover: #4f7cd13d;--wallet-option-outline-color: #4F7CD1;--content-bg: #232323;--change-path-bg: #161616;--home-button-bg: #313030;--confirm-button-bg: #5F8AFA;--confirm-button-bg-hover: #5AA6FF;--error: #DB5555;--close-button-bg-color: #313030;--close-button-fill-icon-color: #C1C1C1;--spinner-color: #FFFFFF;--bottom-section: #131313;--mobile-text: #c1c1c1;--connected-green: #47E586;--gradient-dark-icon: radial-gradient(124.37% 124.37% at 91.67% -25%, #112140 0%, #262B35 100%);--get-wallet-option-bg-color: #0000001F;--get-wallet-option-bg-color-hover: #4f7cd13d;--get-wallet-option-border-color: #313030;--get-wallet-outline-color: #4F7CD1;--get-wallet-option-box-shadow: 0px 2px 2px rgba(17, 22, 24, .04);--secondary-button-bg-color: #4F7CD129;--secondary-button-border-color: #4F7CD1;--secondary-button-text-color: #FFFFFF;--what-wallet-icon-color: #568FFC;--deprecated-icon-bg-color: #2F394E;--deprecated-icon-bg-color-selected: #4F7CD1}@media (prefers-color-scheme: dark){#near-wallet-selector-modal{--backdrop-bg: #26262630;--heading-color: #FFFFFF;--text-color: #C1C1C1;--sidebar-border-color: #313030;--selected-wallet-bg: #4F7CD1;--selected-wallet-bg-hover: #262626CC;--wallet-option-border-color: #A7A7A730;--wallet-option-bg-hover: #4f7cd13d;--wallet-option-outline-color: #4F7CD1;--content-bg: #232323;--change-path-bg: #161616;--home-button-bg: #313030;--confirm-button-bg: #5F8AFA;--confirm-button-bg-hover: #5AA6FF;--error: #DB5555;--close-button-bg-color: #313030;--close-button-fill-icon-color: #C1C1C1;--spinner-color: #FFFFFF;--bottom-section: #131313;--mobile-text: #c1c1c1;--connected-green: #47E586;--gradient-dark-icon: radial-gradient(124.37% 124.37% at 91.67% -25%, #112140 0%, #262B35 100%);--get-wallet-option-bg-color: #0000001F;--get-wallet-option-bg-color-hover: #4f7cd13d;--get-wallet-option-border-color: #313030;--get-wallet-outline-color: #4F7CD1;--get-wallet-option-box-shadow: 0px 2px 2px rgba(17, 22, 24, .04);--secondary-button-bg-color: #4F7CD129;--secondary-button-border-color:#4F7CD1;--secondary-button-text-color: #FFFFFF;--what-wallet-icon-color: #568FFC;--deprecated-icon-bg-color: #2F394E;--deprecated-icon-bg-color-selected: #4F7CD1}}.nws-modal-wrapper{position:fixed;inset:0;opacity:0;visibility:hidden;color:var(--wallet-selector-text-color, var(--text-color));font-family:Manrope,sans-serif;font-weight:500;z-index:80;display:flex;justify-content:center;align-items:center}.nws-modal-wrapper .nws-modal-overlay{background:var(--wallet-selector-backdrop-bg, var(--backdrop-bg));height:100%;width:100%;position:absolute}.nws-modal-wrapper .nws-modal{background:var(--wallet-selector-content-bg, var(--content-bg));width:100%;max-width:812px;height:555px;border-radius:16px;position:absolute;left:50%;transform:translate(-50%);transition:visibility 0s linear 0s,opacity .25s 0s,transform .25s;background-color:var(--wallet-selector-content-bg, var(--content-bg));overflow-y:auto;font-size:16px;line-height:1.6;overflow:hidden;display:inline-flex}.nws-modal-wrapper .nws-modal *{box-sizing:border-box}.nws-modal-wrapper .nws-modal button{padding:.5em 1em;cursor:pointer;border:none}.nws-modal-wrapper .nws-modal .modal-left{width:35%;border-right:1px solid var(--wallet-selector-sidebar-border-color, var(--sidebar-border-color));padding:32px 24px;height:100%;overflow:auto}.nws-modal-wrapper .nws-modal .modal-left .modal-left-title h2{margin-top:0;margin-bottom:20px;font-size:18px;font-weight:700;color:var(--wallet-selector-heading-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .modal-left::-webkit-scrollbar{width:10px}.nws-modal-wrapper .nws-modal .wallet-options-wrapper{margin-bottom:20px}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .description{margin-top:0;margin-bottom:0}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list{margin:0;list-style-type:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.single-wallet{display:flex;flex-wrap:nowrap;flex-direction:row;align-content:center;align-items:center;justify-content:space-between;width:100%;column-gap:24px;padding:12px;cursor:pointer}.single-wallet:focus-within{outline:var(--wallet-option-outline-color) solid 2px}.single-wallet .icon{height:48px;width:auto}.single-wallet .icon img{width:100%;height:auto;max-width:48px}.single-wallet .content{width:50%}.single-wallet .content .name{font-family:inherit;font-style:normal;font-weight:700;font-size:14px;line-height:24px;color:#fff}.single-wallet .content .description{font-family:inherit;font-style:normal;font-weight:700;font-size:14px;line-height:150%}.single-wallet .button-get{margin-left:auto;margin-right:0}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar{border-radius:8px;justify-content:flex-start;column-gap:12px;cursor:pointer}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar:hover{background-color:var(--wallet-selector-wallet-option-bg-hover, var(--wallet-option-bg-hover))}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet{padding:12px;background-color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg));outline:none}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet .content .title{color:#fff}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.deprecated-wallet .icon,.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.deprecated-wallet .title{opacity:.4}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.deprecated-wallet{position:relative}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .warning-triangle{display:flex;position:absolute;top:2px;left:42px;background:var(--content-bg);border-top-left-radius:63px;border-bottom-left-radius:10px}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar:hover .warning-triangle{background-color:var(--deprecated-icon-bg-color)}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.selected-wallet.sidebar .warning-triangle{background-color:var(--deprecated-icon-bg-color-selected)}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .icon{width:40px;height:40px;background-color:#fff;padding:5px;border-radius:5px;position:relative}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.connected-wallet .icon:before{content:"";display:block;width:10px;height:10px;background-color:var(--connected-green);border-radius:50%;position:absolute;top:-8px;right:-8px}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.connected-wallet .icon:before{border:3px solid var(--wallet-selector-content-bg, var(--content-bg))}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet.connected-wallet .icon:before{border:3px solid var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg))}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .content{height:32px;width:auto}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .content .title{font-style:normal;font-weight:500;font-size:14px;line-height:32px;align-items:center;color:var(--wallet-selector-heading-color, var(--heading-color));margin-left:10px}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .content .description{display:none}.nws-modal-wrapper .nws-modal .modal-right{width:65%;padding:32px;overflow:auto}.nws-modal-wrapper .nws-modal .modal-right::-webkit-scrollbar{width:10px}.nws-modal-wrapper .nws-modal .wallet-home-wrapper .get-wallet-wrapper,.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper,.nws-modal-wrapper .nws-modal .connecting-wrapper,.nws-modal-wrapper .nws-modal .wallet-not-installed-wrapper,.nws-modal-wrapper .nws-modal .switch-network-message-wrapper{margin-top:91px;padding:0 28px}.nws-modal-wrapper .nws-modal .connecting-wrapper-err{margin-top:45px;padding:0 28px}.nws-modal-wrapper .nws-modal .wallet-home-wrapper .get-wallet-wrapper{margin:20px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}.nws-modal-wrapper .nws-modal .modal-right .wallet-what{display:flex;align-content:center;flex-direction:row;align-items:flex-start;width:100%;gap:32px;justify-content:flex-start;flex-wrap:nowrap}.nws-modal-wrapper .nws-modal .modal-right .wallet-what+.wallet-what{margin-top:50px}.nws-modal-wrapper .nws-modal .modal-right .wallet-what .icon-side{width:56px;height:56px;padding:8px;background:var(--gradient-dark-icon);border-radius:12px;color:var(--what-wallet-icon-color)}.nws-modal-wrapper .nws-modal .modal-right .wallet-what .icon-side svg{opacity:.7}.nws-modal-wrapper .nws-modal .modal-right .wallet-what .content-side{width:100%}.nws-modal-wrapper .nws-modal .modal-right .wallet-what .content-side h3{margin:0 auto 8px 0;font-family:inherit;font-style:normal;font-weight:700;font-size:16px;line-height:24px;color:var(--wallet-selector-text-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .modal-right .wallet-what .content-side p{margin:0;font-family:inherit;font-style:normal;font-weight:400;font-size:14px;line-height:150%;word-break:break-word}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-header h3.middleTitle{text-align:center;margin:4px auto;font-size:18px;color:var(--wallet-selector-heading-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body.get-wallet-body{padding-left:32px;padding-right:0;row-gap:16px;margin-top:64px}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton{background-color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg));font:inherit;border-radius:4px;color:#fff;font-weight:700;font-size:14px;line-height:24px;border-color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg));display:block;margin:25px auto 12px;border:.1em solid var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg))}.nws-modal-wrapper .nws-modal .nws-modal-body button.get-wallet{margin:4px 0;background-color:var(--wallet-selector-home-button-bg, var(--home-button-bg));border-radius:4px;padding:8px 24px;border-width:0;font-style:normal;font-weight:700;font-size:14px;line-height:24px;font-family:inherit;color:#6494ee}.nws-modal-wrapper .nws-modal .nws-modal-header{width:100%;display:flex;flex:1;align-items:flex-start;justify-content:flex-start}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button{display:flex;justify-content:center;align-items:center;border:0;cursor:pointer;height:32px;width:32px;padding:0;background-color:var(--wallet-selector-close-button-bg-color, var(--close-button-bg-color));border-radius:50px}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button svg{fill:var(--wallet-selector-close-button-fill-icon-color, var(--close-button-fill-icon-color))}.nws-modal-wrapper .nws-modal .back-button{background:transparent;width:32px;height:32px;border-radius:50%;display:block;border:none;padding:4px}.nws-modal-wrapper .nws-modal .nws-modal-header-wrapper{display:flex;align-items:center}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button:active{background:transparent}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button svg{pointer-events:none}.nws-modal-wrapper .nws-modal .nws-modal-header h2{margin-top:0;margin-bottom:20px;font-size:18px;font-weight:700;color:var(--wallet-selector-heading-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .action-buttons{display:flex;justify-content:space-between;align-items:center}.nws-modal-wrapper .nws-modal .lang-selector-wrapper{position:absolute;bottom:15px;right:50px;display:none}.nws-modal-wrapper .nws-modal .lang-selector{appearance:none;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyLjc1IDE5LjI1TDE2IDEyLjc1TDE5LjI1IDE5LjI1IiBzdHJva2U9IiNDMUMxQzEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE0IDE3LjI1SDE4IiBzdHJva2U9IiNDMUMxQzEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTQuNzUgNi43NUgxMy4yNSIgc3Ryb2tlPSIjQzFDMUMxIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik05IDYuNVY0Ljc1IiBzdHJva2U9IiNDMUMxQzEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTExLjI1IDYuNzVDMTEuMjUgNi43NSAxMS4yNSA5LjI1IDkuMjUgMTEuMjVDNy4yNSAxMy4yNSA0Ljc1IDEzLjI1IDQuNzUgMTMuMjUiIHN0cm9rZT0iI0MxQzFDMSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMTIuMjUgMTMuMjVDMTIuMjUgMTMuMjUgOS43NSAxMy4yNSA3Ljc1IDExLjI1QzcuMzQ1NTEgMTAuODQ1NSA2Ljc1IDkuNzUgNi43NSA5Ljc1IiBzdHJva2U9IiNDMUMxQzEiIHN0cm9rZS13aWR0aD0iMS41IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==) 5px center / 20px 20px no-repeat transparent;border:0;cursor:pointer;font-size:16px;height:32px;outline:none;padding-right:54px;position:relative;-webkit-user-select:none;user-select:none;width:54px;z-index:1;text-indent:54px}.nws-modal-wrapper .nws-modal .lang-selector-wrapper:after{content:"";border-color:#72727a;border-style:solid;border-width:2px 2px 0 0;display:inline-block;position:absolute;right:10px;top:calc(50% - 10px);transform:rotate(135deg) translateY(-50%);height:7px;width:7px}.nws-modal-wrapper .nws-modal .switch-network-message-wrapper .content .network-id{color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg))}.nws-modal-wrapper .nws-modal .derivation-path-wrapper{padding:0 26px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-image{display:flex;justify-content:center;margin-top:53px;margin-bottom:40px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-description{font-size:14px;text-align:center}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-description p{margin:14px 0}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-description .specify-path{color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg));cursor:pointer}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .derivation-path-list{display:flex;justify-content:center;flex-direction:column;margin-bottom:16px}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper{display:flex;justify-content:center;margin-top:91px}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper .display-path{background:var(--home-button-bg);color:#606060;padding:16px;border-radius:8px;letter-spacing:1px;font-weight:700}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper .change-path{background:var(--change-path-bg);display:flex;justify-content:space-between;align-items:center;margin-left:10px;width:63px;padding:0 5px;border-radius:8px}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper .change-path .path-value{width:100%;text-align:center;font-weight:700}.nws-modal-wrapper .nws-modal .specify-path-wrapper p{margin:14px}.nws-modal-wrapper .nws-modal .specify-path-wrapper .path-description{font-size:14px;margin-top:24px;text-align:center}.nws-modal-wrapper .nws-modal .specify-path-wrapper .what-link{font-size:14px;text-align:center;color:var(--selected-wallet-bg);cursor:pointer}.nws-modal-wrapper .nws-modal .specify-path-wrapper .what-link a{text-decoration:none;color:var(--selected-wallet-bg);font-size:14px}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper .change-path .buttons-wrapper{display:flex;flex-direction:column}.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper .change-path .buttons-wrapper button{padding:0;width:23px;background-color:var(--home-button-bg);border:none}.nws-modal-wrapper .nws-modal .no-accounts-found-wrapper{margin-top:50px;font-size:14px}.nws-modal-wrapper .nws-modal .enter-custom-account{margin-top:20px}.nws-modal-wrapper .nws-modal .enter-custom-account p{text-align:center;font-size:14px}.nws-modal-wrapper .nws-modal .enter-custom-account .input-wrapper{display:flex;justify-content:center;margin-top:90px}.nws-modal-wrapper .nws-modal .enter-custom-account .input-wrapper input{text-align:center;color:var(--wallet-selector-heading-color, var(--heading-color));border:1px solid var(--confirm-button-bg-hover);padding:6px 8px;border-radius:50px}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper p{font-size:14px;text-align:center;margin-top:20px}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .button-wrapper{display:flex;justify-content:center}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .button-wrapper button{color:var(--selected-wallet-bg);font-weight:600;background-color:transparent;border-radius:20px;font-size:14px;border:1px solid var(--selected-wallet-bg);width:78px;padding:6px 8px}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .form{margin-top:96px}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control{display:flex;flex-direction:column;margin-bottom:16px;padding:10px;color:var(--text-color)}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control .account{border-bottom:1px solid var(--sidebar-border-color);padding:16px 0;color:var(--wallet-selector-heading-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control .account input[type=checkbox]{width:25px;transform:scale(1.7);padding:10px}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control label{color:inherit}.nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .action-buttons{justify-content:flex-end}.nws-modal-wrapper .nws-modal .overview-wrapper p{font-size:14px;text-align:center}.nws-modal-wrapper .nws-modal .overview-wrapper .accounts{margin-top:96px}.nws-modal-wrapper .nws-modal .overview-wrapper .account{border-bottom:1px solid var(--sidebar-border-color);padding:16px 0;color:var(--wallet-selector-heading-color, var(--heading-color))}.nws-modal-wrapper .nws-modal .connecting-wrapper .content{display:flex;flex-direction:column;align-items:center}.nws-modal-wrapper .wallet-not-installed-wrapper .refresh-link{color:#5f8afa;cursor:pointer}.nws-modal-wrapper .wallet-not-installed-wrapper .wallet-data{display:flex;align-items:center}.nws-modal-wrapper .wallet-not-installed-wrapper .wallet-data p{margin:0 0 0 10px}.nws-modal-wrapper .wallet-not-installed-wrapper p{margin:16px 0}.nws-modal-wrapper .wallet-not-installed-wrapper .wallet-data .wallet-icon-box{width:40px;height:40px}.nws-modal-wrapper .wallet-not-installed-wrapper .wallet-data .wallet-icon-box img{width:100%;height:auto}.open{opacity:1;visibility:visible;transition:visibility 0s linear 0s,opacity .25s 0s}.nws-modal-wrapper .spinner{margin-right:10px;--size: 160px;--border: 6px;width:var(--size);height:var(--size);border-radius:50%;position:relative;display:flex;align-items:center;justify-content:center}.nws-modal-wrapper .spinner .icon{width:calc(var(--size) / 1.2);height:calc(var(--size) / 1.2);border:1px solid rgba(0,0,0,.05);border-radius:50%;box-shadow:#0000000d 0 10px 20px}.nws-modal-wrapper .spinner img{width:100%;height:auto}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 600px){.nws-modal-wrapper .nws-modal-wrapper .nws-modal{width:250px}.nws-modal-wrapper .nws-modal-wrapper .nws-modal .derivation-path-wrapper .derivation-path-list input{max-width:140px}.nws-modal-wrapper .nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control{flex-direction:column}.nws-modal-wrapper .nws-modal-wrapper .nws-modal .choose-ledger-account-form-wrapper .nws-form-control select{text-align:center}.nws-modal-wrapper .nws-modal .wallet-home-wrapper .get-wallet-wrapper{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}}.nws-modal-wrapper .nws-modal-wrapper.dark-theme .spinner .icon{box-shadow:0 10px 20px #ffffff0d}@media (prefers-color-scheme: dark){.nws-modal-wrapper .spinner .icon{box-shadow:0 10px 20px #ffffff0d}}@keyframes outAnimation{0%{opacity:1}to{opacity:0;visibility:hidden}}.connecting-wrapper{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:center;justify-content:flex-start}.connecting-wrapper .content .icon{width:80px;height:80px;background-color:#fff;border-radius:10px;padding:10px;position:relative}.connecting-wrapper .content .icon .green-dot{position:absolute;width:30px;height:30px;background-color:var(--connected-green);top:-10px;right:-10px;border-radius:50%;border:5px solid var(--wallet-selector-content-bg, var(--content-bg))}.connecting-wrapper .content .icon img{width:100%;height:auto}.connecting-wrapper .content h3{margin:16px 0}.connecting-wrapper .content .connecting-name{font-style:normal;font-weight:700;font-size:16px;line-height:24px;display:flex;align-items:center;text-align:center;color:var(--wallet-selector-heading-color, var(--heading-color))}.connecting-wrapper .content .connecting-message{font-size:14px;margin-top:16px}.connecting-wrapper .content .connecting-details{font-style:normal;font-weight:500;font-size:14px;line-height:24px;display:flex;align-items:center;margin-top:40px}.connecting-wrapper .content .connecting-details span{color:var(--wallet-selector-selected-wallet-bg, var(--selected-wallet-bg))}.connecting-wrapper .content .connecting-details .spinner{width:25px;height:auto;animation:spinner 2s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection button{padding:10px 24px;gap:8px;background:var(--secondary-button-bg-color);border:1px solid var(--secondary-button-border-color);border-radius:4px;font-style:normal;font-weight:700;font-size:14px;line-height:24px;color:var(--secondary-button-text-color)}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection .error-wrapper{vertical-align:middle;align-items:center;display:flex;flex-wrap:nowrap;justify-content:center;flex-direction:column;column-gap:12px;font-style:normal;font-weight:500;font-size:14px;line-height:150%;text-align:center}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection .error{color:#ce5a6f;vertical-align:middle;align-items:center;display:flex;flex-wrap:nowrap;justify-content:center;flex-direction:row;column-gap:12px;font-style:normal;font-weight:500;font-size:14px;line-height:150%;text-align:center}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection .error-wrapper .error svg{color:var(--wallet-selector-content-bg,var(--content-bg))}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection .error-wrapper p{word-break:break-word;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden;margin:14px 0}.nws-modal-wrapper .nws-modal .nws-modal-body .alert-message .connection .success{color:#4fd98f}.nws-modal-wrapper .nws-modal .connecting-wrapper .content{padding:25px}.connecting-wrapper .content .connecting-details{margin-top:20px}.connecting-wrapper .wallet-connected-success{display:flex;align-items:center}.connecting-wrapper .wallet-connected-success svg{color:var(--content-bg)}.connecting-wrapper .wallet-connected-success span{font-size:14px;margin-left:10px;color:var(--wallet-selector-connected-green, var(--connected-green))}.single-wallet-get{display:flex;flex-wrap:wrap;flex-direction:column;align-items:center;justify-content:space-between;width:100%;flex-grow:1;padding:14px;height:100%;margin:0 auto auto;align-content:center;border:1px solid var(--get-wallet-option-border-color);box-shadow:var(--get-wallet-option-box-shadow);border-radius:8px;position:relative;background-color:var(--get-wallet-option-bg-color);cursor:pointer}.single-wallet-get:hover{background:var(--get-wallet-option-bg-color-hover)}.single-wallet-get:focus-within{outline:var(--get-wallet-outline-color) solid 2px}.single-wallet-get .icon{min-width:32px;max-height:32px;margin-bottom:8px;width:32px;height:32px;background-color:#fff;padding:5px;border-radius:5px;position:relative}.single-wallet-get .icon img{width:100%;height:auto;max-width:48px}.single-wallet-get .title{font-family:inherit;font-style:normal;font-weight:500;font-size:14px;line-height:24px;align-items:center;color:var(--heading-color);text-align:center}.single-wallet-get .type{font-weight:400;font-size:10px;line-height:12px;margin-top:0;color:var(--text-color);text-align:center}.single-wallet-get .small-icon{position:absolute;top:8px;right:8px}.single-wallet-get .small-icon svg{color:#4c5155}.single-wallet-get:hover .small-icon svg{color:#4f7cd1}.single-wallet-get .description{font-family:inherit;font-style:normal;font-weight:400;font-size:14px;line-height:150%;align-items:center}.single-wallet-get .button-get{margin-left:auto;margin-right:0}.connected-flag{color:var(--connected-green);border:1px solid var(--connected-green);border-radius:50px;padding:3px 10px;display:flex;align-items:center}.connected-flag:before{content:"";display:block;width:10px;height:10px;border-radius:50%;background-color:var(--connected-green);margin-right:5px}.scan-qr-code{display:flex;flex-direction:column;align-items:center;justify-content:space-between;height:100%}.scan-qr-code .qr-code>div:first-of-type{padding:20px;margin-bottom:20px;border-radius:16px;background:#fff}.scan-qr-code .qr-code{height:calc(100% - 200px);border:1px solid var(--wallet-selector-content-bg, var(--content-bg));border-radius:4px;text-align:center;margin-top:64px}.scan-qr-code .qr-code svg{width:239px;height:239px}.scan-qr-code .qr-code .copy-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;text-align:center;color:var(--selected-wallet-bg);font-size:14px}.scan-qr-code .qr-code .copy-btn svg{margin-right:5px;width:24px;height:24px}.scan-qr-code .qr-code .notification{font-size:14px}.scan-qr-code .footer{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;bottom:0;font-size:14px}.scan-qr-code .footer .btn{background:var(--secondary-button-bg-color);color:var(--secondary-button-text-color);border:1px solid var(--secondary-button-border-color);border-radius:4px;font-weight:700;font-size:14px;line-height:24px;padding:8px 24px}@media (min-width: 577px){.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-mobile{display:none}.scan-qr-code .footer{position:absolute}}@media (min-width: 769px){.button-spacing{margin:90px}}@media (max-width: 768px){.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper{margin-top:45px}.button-spacing{margin:45px}.nws-modal-wrapper .nws-modal .modal-left{width:40%;border-right:1px solid var(--wallet-selector-sidebar-border-color, var(--sidebar-border-color));padding:32px 16px;height:100%;max-height:70vh;overflow:auto}.nws-modal-wrapper .nws-modal .modal-right{width:60%;padding:32px 16px;overflow:auto}.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper{padding:0 0 0 10px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-image{margin-top:30px;margin-bottom:35px}}@media (max-width: 576px){.nws-modal-wrapper .nws-modal .wallet-home-wrapper .get-wallet-wrapper,.nws-modal-wrapper .nws-modal .wallet-home-wrapper .wallet-info-wrapper,.nws-modal-wrapper .nws-modal .connecting-wrapper,.nws-modal-wrapper .nws-modal .wallet-not-installed-wrapper,.nws-modal-wrapper .nws-modal .switch-network-message-wrapper{margin-top:20px}.nws-modal-wrapper .nws-modal .modal-left .modal-left-title h2{text-align:center}.nws-modal-wrapper .wallet-not-installed-wrapper>p{margin:20px 0 30px;max-width:500px}.nws-modal-wrapper .nws-modal .nws-modal-body button.get-wallet{background-color:var(--wallet-selector-home-button-bg, var(--content-bg))}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-hide{display:none}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .what-wallet-mobile p{font-size:14px;text-align:center;margin:auto}.nws-modal-wrapper .nws-modal{width:100%;display:block;overflow:auto;bottom:0;height:500px;background:var(--wallet-selector-mobile-bottom-section, var(--bottom-section));border-radius:16px 16px 0 0}.nws-modal-wrapper .nws-modal .modal-left{width:100%;background-color:var(--wallet-selector-content-bg, var(--content-bg));height:auto;padding:32px 12px}.nws-modal-wrapper .nws-modal .modal-left .nws-modal-body{display:flex;overflow:auto}.nws-modal-wrapper .nws-modal .modal-left .nws-modal-body .wallet-options-wrapper{margin:auto}.nws-modal-wrapper .nws-modal .modal-right{width:100%;background-color:var(--wallet-selector-mobile-bottom-section, var(--bottom-section))}.nws-modal-wrapper .nws-modal .connecting-wrapper .content{padding-top:0}.connecting-wrapper .content .icon .green-dot{border-color:var(--wallet-selector-mobile-bottom-section, var(--bottom-section))}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-header h3.middleTitle{text-align:center;font-size:16px;margin:4px auto}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-header h3.middleTitle.-open{padding-right:32px}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body .content{font-size:14px;text-align:center;color:var(--mobile-text);margin:0}.nws-modal-wrapper .nws-modal .modal-right .nws-modal-body{margin-top:10px;padding:0}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton{margin:25px auto 12px}.nws-modal-wrapper .nws-modal .modal-header{display:block;font-size:18px;text-align:center}.nws-modal-wrapper .nws-modal .nws-modal-header .close-button{position:absolute;right:30px;top:30px}.nws-modal-wrapper .nws-modal .nws-modal-header h2{font-size:18px;text-align:center}.nws-modal-wrapper .nws-modal .wallet-options-wrapper{margin-bottom:0}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .description{display:none}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list{display:flex;overflow:auto;padding-block:10px;grid-gap:0;gap:0}.nws-modal-wrapper .nws-modal .info{display:none;width:90px}.single-wallet{display:block;min-width:76px;max-width:76px}.single-wallet.sidebar .icon{width:56px;height:56px;margin:auto}.single-wallet.sidebar .content{width:auto}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .content .title{font-size:12px;line-height:16px;margin-top:10px;text-align:center;margin-left:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.single-wallet.wallet-connect,.single-wallet.my-near-wallet{word-break:break-word}.single-wallet-get:hover{background-color:#4f7cd129}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-image,.nws-modal-wrapper .specify-path-wrapper .change-path-wrapper{margin-top:30px;margin-bottom:30px}.nws-modal-wrapper .nws-modal .derivation-path-wrapper .enter-derivation-path .ledger-description>p{max-width:450px;margin-left:auto;margin-right:auto}.nws-modal-wrapper ::-webkit-scrollbar{height:4px;width:4px;background:var(--backdrop-bg)}.nws-modal-wrapper ::-webkit-scrollbar-thumb:horizontal{background:var(--close-button-fill-icon-color);border-radius:10px}}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .import-content{width:auto}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet .import-content .title,.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar.selected-wallet .import-content .import-type{color:#fff}.nws-modal-wrapper .nws-modal .wallet-options-wrapper .options-list .single-wallet.sidebar .import-content .title{font-size:14px;color:var(--wallet-selector-heading-color, var(--heading-color));margin-left:10px}.import-content .import-type{font-size:10px;margin-left:10px;margin-top:2px;font-weight:400}.nws-modal-wrapper .nws-modal .modal-right .middleContainer{display:flex;flex-direction:column;align-content:center;width:100%}.nws-modal-wrapper .nws-modal .modal-right .middleContainer p{margin:0;text-align:center;font-weight:400;font-size:14px}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton:disabled,.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton[disabled]{cursor:not-allowed;background-color:var(--wallet-selector-home-button-bg, var(--home-button-bg));color:#606060;border:1px solid transparent}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton.account-export-button{width:300px;margin:0 auto}.nws-modal-wrapper .nws-modal .nws-modal-body button.middleButton.account-export-button.secondary{background:var( --secondary-button-bg-color);border:1px solid var(--secondary-button-border-color);border-radius:4px;color:var(--secondary-button-text-color);margin-bottom:10px}.checkbox{position:relative;display:flex;margin:10px}.checkbox label{position:relative;display:block;padding-left:40px;margin-bottom:0;cursor:pointer;color:var(--wallet-selector-heading-color, var(--heading-color))}.checkbox label:before{content:"";position:absolute;left:0;top:-2px;margin:4px;width:18px;height:18px;transition:transform .28s ease;border-radius:3px;border:2px solid #C1C1C1}.checkbox label:after{content:"";display:block;width:10px;height:5px;border-bottom:2px solid #4FD98F;border-left:2px solid #4FD98F;transform:rotate(-45deg) scale(0);transition:transform ease .25s;position:absolute;top:8px;left:10px}.checkbox input[type=checkbox]{width:auto;opacity:0;position:absolute;left:0;margin-left:-20px;margin-top:0}.checkbox input[type=checkbox]:checked+label:before{border:2px solid #4FD98F;background-color:#4fd98f4d}.checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.checkbox input[type=checkbox]:focus+label:before{outline:0}.checkbox input[type=checkbox]:disabled+label{color:var(--wallet-selector-text-color, var(--text-color));cursor:not-allowed;display:flex;flex-direction:column}.checkbox input[type=checkbox]:disabled+label>span.error{color:var(--wallet-selector-error, var(--error));font-size:10px}.checkbox input[type=checkbox]:disabled+label>span.warning{color:#e9b870;font-size:10px}.checkbox input[type=checkbox]:disabled+label:before{border:2px solid #606060}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy{position:relative;cursor:copy;background-color:var(--wallet-selector-content-bg, var(--content-bg));display:block;margin:0 auto;border-radius:8px;border:1px solid var(--wallet-option-border-color, var(--sidebar-border-color));padding:0;filter:brightness(95%)}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy>.copy-success{position:absolute;left:50%;transform:translate(-50%);text-align:center;background-color:#8decc6;color:#005a46;border-radius:4px;padding:6px 8px;font-size:13px;top:-30px;opacity:0;pointer-events:none;transition:.2s;font-weight:400}.nws-modal-wrapper .nws-modal .nws-modal-body .click-to-copy>.copy-success.show{top:-40px;opacity:1}.account-export-body{height:100%;display:flex;flex-direction:column}.account-export{height:100%;margin-top:0!important;padding:0!important}.account-export .content{width:100%;height:100%;padding:25px 0 0!important;display:flex;flex-direction:column;align-items:center}.account-export .content .account-selection-spinner{width:80px;margin:70px auto auto}.account-export .filler{flex:1}.account-export .account-selection{display:flex;flex-direction:column;align-items:center;justify-content:space-between;width:100%;max-height:200px;min-height:50px;overflow-y:auto;overflow-x:hidden;margin:20px 0}.account-export .account-selection-container{display:flex;flex:1;flex-direction:column}.account-export .account-select-all{width:100%;text-align:left;cursor:pointer;color:var( --wallet-option-outline-color, var(--outline-color));font-size:14px}.account-export .account-unavailable{width:100%;color:var(--wallet-selector-text-color, var(--text-color));font-size:14px;text-align:left}.account-export .account-selection .account-selection-row{display:flex;flex-direction:row;align-items:center;width:100%;border-bottom:1px solid rgba(60,60,60,.22)}.account-export .account-selection .account-selection-row label{display:flex;flex-direction:column;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;width:399px}.account-export .checkbox .label{font-size:14px}.account-export .passphrase-title{font-size:14px;text-align:center;font-weight:300;color:var(--wallet-selector-text-color, var(--text-color));margin:40px 0 30px}.account-export .passphrase-text{display:flex;flex-direction:row;align-items:flex-start;background:transparent;word-break:break-word;text-align:center;filter:blur(4px);padding:20px;border-radius:5px}.account-export .passphrase-text:hover{filter:none}.account-export .passphrase-check-container{margin-bottom:20px}.account-export .passphrase-label{font-size:10px;cursor:copy;color:var(--wallet-selector-text-color, var(--text-color));margin-top:10px}.complete-desc{flex:1;text-align:center;margin-top:10px}.complete-desc .content{font-size:14px;width:300px;margin:40px auto 0}.nws-modal-wrapper .nws-modal .connecting-wrapper-err{height:100%}*{box-sizing:border-box}html{--bg: #fff;--fg: #25282A;--gray: #888;--royal: #0072CE;--blue: #6AD1E3;--primary: #D1CCBD;--secondary: var(--royal);--tertiary: #FF585D;background-color:var(--bg);color:var(--fg);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;font-size:calc(.65em + .7vw);line-height:1.3}html ::selection{background:var(--secondary);color:var(--bg)}@media (prefers-color-scheme: dark){html{--bg: #25282A;--fg: #fff;--secondary: var(--blue)}html ::selection{background:var(--secondary);color:var(--fg)}}body{margin:0 auto;padding:0 1em;max-width:40em}fieldset{border:none;margin:0;padding:0}.highlight{align-items:center;display:flex;margin-bottom:.5em;width:100%}.highlight label{margin-right:.5em}.highlight input{caret-color:var(--secondary)}label{color:var(--gray)}button,.highlight{border-radius:5px;border-color:var(--primary);border:.1em solid var(--primary);padding:.5em 1em}button:hover,.highlight:hover,button:focus,.highlight:focus,button:focus-within,.highlight:focus-within{border-color:var(--secondary)}input{border:none;flex:1}input:read-only{color:var(--primary)}input[type=number]{text-align:center;border-bottom:.1em solid var(--primary);margin:0 1em;width:4em;padding-left:.5em}input[type=number]:hover,input[type=number]:focus{border-color:var(--secondary)}input[type=checkbox]{margin:0 1em}button,input{background:transparent;color:inherit;cursor:pointer;font:inherit;outline:none}button{position:relative;transition:top 50ms}button:hover,button:focus{top:-1px}button:active{background:var(--secondary);border-color:var(--secondary);top:1px}.is-premium{border-left:.25em solid var(--secondary);padding-left:.25em;margin-left:-.5em}.title-container{display:flex;align-items:center;justify-content:space-between}