diff --git a/404.html b/404.html index b4bf997f..2b2e474f 100644 --- a/404.html +++ b/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +

404

This page could not be found.

\ No newline at end of file diff --git a/404/index.html b/404/index.html index b4bf997f..2b2e474f 100644 --- a/404/index.html +++ b/404/index.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +

404

This page could not be found.

\ No newline at end of file diff --git a/_next/static/zvmQiaHM751CP8nY95_ka/_buildManifest.js b/_next/static/YTOLPbk6QroXC848zGajW/_buildManifest.js similarity index 78% rename from _next/static/zvmQiaHM751CP8nY95_ka/_buildManifest.js rename to _next/static/YTOLPbk6QroXC848zGajW/_buildManifest.js index 3ef435e6..857dfd36 100644 --- a/_next/static/zvmQiaHM751CP8nY95_ka/_buildManifest.js +++ b/_next/static/YTOLPbk6QroXC848zGajW/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(a,s,d){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/959-e8a0c6e4bd48e870.js","static/chunks/pages/index-d6a5418e2471f4cc.js"],"/_error":["static/chunks/pages/_error-3f6d1c55bb8051ab.js"],"/dashboard":["static/chunks/pages/dashboard-b1c88f6ce0a32e86.js"],"/dashboard/domain":[a,"static/chunks/pages/dashboard/domain-cac5589a98b93b13.js"],"/dashboard/function":[a,s,d,"static/chunks/pages/dashboard/function-627f0bc0aa349e94.js"],"/dashboard/instance":[a,s,d,"static/chunks/pages/dashboard/instance-e14b5838edf01203.js"],"/dashboard/manage":["static/chunks/505-fb3bad9cf4b7c7a0.js","static/chunks/pages/dashboard/manage-bffddaba35fc231e.js"],"/dashboard/ssh":[a,"static/chunks/pages/dashboard/ssh-196d808aae1312b5.js"],"/dashboard/volume":[a,s,"static/chunks/pages/dashboard/volume-ea729dd6fe6958c7.js"],sortedPages:["/","/_app","/_error","/dashboard","/dashboard/domain","/dashboard/function","/dashboard/instance","/dashboard/manage","/dashboard/ssh","/dashboard/volume"]}}("static/chunks/312-c3d55ed23e746361.js","static/chunks/55-9e62c603b32691e8.js","static/chunks/253-d47f4590c2cdf1ee.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(a,s,d){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/959-e8a0c6e4bd48e870.js","static/chunks/pages/index-d6a5418e2471f4cc.js"],"/_error":["static/chunks/pages/_error-3f6d1c55bb8051ab.js"],"/dashboard":["static/chunks/pages/dashboard-b1c88f6ce0a32e86.js"],"/dashboard/domain":[a,"static/chunks/pages/dashboard/domain-cac5589a98b93b13.js"],"/dashboard/function":[a,s,d,"static/chunks/pages/dashboard/function-c44e92275c55f329.js"],"/dashboard/instance":[a,s,d,"static/chunks/pages/dashboard/instance-609017f39ef681ab.js"],"/dashboard/manage":["static/chunks/505-fb3bad9cf4b7c7a0.js","static/chunks/pages/dashboard/manage-bffddaba35fc231e.js"],"/dashboard/ssh":[a,"static/chunks/pages/dashboard/ssh-196d808aae1312b5.js"],"/dashboard/volume":[a,s,"static/chunks/pages/dashboard/volume-ea729dd6fe6958c7.js"],sortedPages:["/","/_app","/_error","/dashboard","/dashboard/domain","/dashboard/function","/dashboard/instance","/dashboard/manage","/dashboard/ssh","/dashboard/volume"]}}("static/chunks/312-c3d55ed23e746361.js","static/chunks/55-6181269db7d27fc3.js","static/chunks/253-d47f4590c2cdf1ee.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/zvmQiaHM751CP8nY95_ka/_ssgManifest.js b/_next/static/YTOLPbk6QroXC848zGajW/_ssgManifest.js similarity index 100% rename from _next/static/zvmQiaHM751CP8nY95_ka/_ssgManifest.js rename to _next/static/YTOLPbk6QroXC848zGajW/_ssgManifest.js diff --git a/_next/static/chunks/55-6181269db7d27fc3.js b/_next/static/chunks/55-6181269db7d27fc3.js new file mode 100644 index 00000000..212db11b --- /dev/null +++ b/_next/static/chunks/55-6181269db7d27fc3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55],{2915:function(e,n,t){t.d(n,{Z:function(){return d}});var i=t(85893),a=t(19521),l=t(3837),o=t(87531);function d(e){let{children:n,variant:t="default"}=e;return(0,i.jsx)(i.Fragment,{children:"default"===t?(0,i.jsx)(l.X2,{xs:12,gap:"0",children:(0,i.jsx)(l.JX,{xs:12,lg:10,lgOffset:2,xl:8,xlOffset:3,xxl:6,xxlOffset:4,children:(0,i.jsx)(o.Z,{children:(0,i.jsx)(r,{children:n})})})}):(0,i.jsx)(l.X2,{xs:12,gap:"0",children:(0,i.jsx)(l.JX,{xs:12,xl:8,xlOffset:3,children:(0,i.jsx)(o.Z,{children:(0,i.jsx)(s,{children:n})})})})})}var r=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1m0nz8e-0"})({marginLeft:"auto",marginRight:"auto",maxWidth:"715px"}),s=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1m0nz8e-1"})({marginLeft:"auto",marginRight:"auto",maxWidth:"961px"})},3860:function(e,n,t){t.d(n,{Z:function(){return d}});var i=t(85893),a=t(19521),l=t(3837);let o=a.ZP.span.attrs((0,l.PT)("tp-info")).withConfig({displayName:"styles__StyledLabel",componentId:"sc-19wpeec-0"})(["vertical-align:top;color:#fff;"]);function d(e){let{children:n,number:t,as:a="h1",type:l="h5",color:d="main1",disabled:c=!1,label:m,...p}=e;return(0,i.jsxs)(a,{style:{lineHeight:"1rem",margin:0},children:[(0,i.jsxs)("span",{className:c?"unavailable-content":"",children:[(0,i.jsxs)(r,{className:"tp-body1 fs-xl text-base0",children:[String(t).padStart(2,"0"),"/\xa0"]}),(0,i.jsx)(s,{forwardedAs:"span",type:l,color:d,...p,children:n})]}),m&&(0,i.jsx)(o,{type:l,children:m})]})}var r=(0,a.ZP)("span").withConfig({displayName:"cmp___StyledSpan",componentId:"sc-1s7saq-0"})({display:"inline"}),s=(0,a.ZP)(l.DU).withConfig({displayName:"cmp___StyledTextGradient",componentId:"sc-1s7saq-1"})({display:"inline"})},31477:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(85893),a=t(19521),l=t(67294),o=t(3837);let d=a.ZP.input.withConfig({displayName:"styles__StyledHiddenFileInput",componentId:"sc-vome1k-0"})(["display:none;"]);var r=t(34853);let s=(0,l.memo)((0,l.forwardRef)((e,n)=>{let{onChange:t,accept:a,value:s,children:c,error:p}=e,u=(0,l.useRef)(null),f=(0,l.useCallback)(()=>{u.current&&u.current.click()},[]),h=(0,l.useCallback)(()=>{t(void 0)},[t]),g=(0,l.useCallback)(e=>{let n=e.target,{files:i}=n;if(i){let e=i[0];t(e)}},[t]);return(0,i.jsxs)("div",{tabIndex:-1,ref:n,children:[s?(0,i.jsxs)(o.zx,{onClick:h,type:"button",color:"main2",kind:"neon",size:"regular",variant:"tertiary",children:[(0,r.zN)(s.name)," ",(0,i.jsx)(m,{name:"trash"})]}):(0,i.jsx)(o.zx,{onClick:f,type:"button",color:"main0",kind:"neon",size:"regular",variant:"primary",children:c}),p&&(0,i.jsx)(o.Xq,{error:p}),(0,i.jsx)(d,{type:"file",ref:u,onChange:g,accept:a})]})}));s.displayName="HiddenFileInput";var c=s,m=(0,a.ZP)(o.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1pig7lr-0"})({marginLeft:"1.25rem"})},38478:function(e,n,t){t.d(n,{Z:function(){return y}});var i=t(85893),a=t(19521),l=t(34853),o=t(3837);let d=a.ZP.div.withConfig({displayName:"styles__StyledHoldingSummaryLine",componentId:"sc-ejcp3t-0"})(["",""],e=>{let{isHeader:n}=e;return(0,a.iv)([""," grid-template-columns:1fr 2fr 1fr;grid-auto-rows:max-content;opacity:",";margin-bottom:",";align-items:stretch;& > *{"," width:100%;border-bottom:1px solid #666;&:first-child{","}&:not(:first-child){","}&:last-child{border-bottom-style:dashed;}}"],{display:"grid",padding:"0px"},n?.5:1,n?"1.5rem":"0",{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"},{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",fontSize:"0.75rem",lineHeight:"1rem"},{display:"flex",flexDirection:"column",alignItems:"flex-end",justifyContent:"center"})}),r=a.ZP.span.attrs((0,o.PT)("tp-info")).withConfig({displayName:"styles__GreyLabel",componentId:"sc-ejcp3t-1"})(["color:rgba(255,255,255,0.3);"]);a.ZP.span.attrs((0,o.PT)("tp-info text-main0")).withConfig({displayName:"styles__BlueLabel",componentId:"sc-ejcp3t-2"})([""]);var s=t(67294),c=t(33358),m=t(49875),p=t(39261),u=t(59925),f=t(11912),h=t(2915);let g=s.memo(e=>{let{type:n,specs:t,cost:a}=e,{cpu:o,ram:r,storage:m}=t,p=(0,s.useMemo)(()=>"".concat(o,"x86-64bit"),[o]),u=(0,s.useMemo)(()=>"".concat((0,l.Fx)(r,{from:"MiB",to:"GiB",displayUnit:!1}),"GB-RAM"),[r]),f=(0,s.useMemo)(()=>"".concat((0,l.Fx)(m,{from:"MiB",to:"GiB",displayUnit:!1}),"GB-HDD"),[m]),h=(0,s.useMemo)(()=>"".concat(p,".").concat(u).concat(n===c.py.Instance?".".concat(f):""),[p,u,f,n]);return(0,i.jsxs)(d,{children:[(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:c.K_[n].toUpperCase()})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:h})}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[(0,l.RK)(a)," ALEPH"]})})]})});g.displayName="HoldingRequirementsSpecsLine";let x=s.memo(e=>{let{volume:n,cost:t,specs:a}=e,o=u.l.getVolumeSize(n);if(!t)return(0,i.jsx)(i.Fragment,{});let r=!!t.discount,s=!t.cost;return(0,i.jsxs)(d,{children:[(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:["STORAGE",(0,i.jsx)(j,{children:n.volumeType===u.z.Persistent?"PERSISTENT":"VOLUME"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:(0,l.eB)(o,"MiB")})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:r?(0,i.jsxs)(f.Z,{plain:!0,align:"left",my:"bottom-left",at:"bottom-right",tooltipContent:(0,i.jsx)(_,{children:(0,i.jsx)("div",{className:"tp-body1 fs-md",children:s?(0,i.jsxs)(i.Fragment,{children:["The cost displayed for the added storage is"," ",(0,i.jsxs)("span",{className:"text-main0",children:[(0,l.RK)(t.cost)," ALEPH"]})," ","as this resource is already included in your selected package at no additional charge."]}):(0,i.jsxs)(i.Fragment,{children:["Good news! The displayed price is lower than usual due to a discount of"," ",(0,i.jsxs)("span",{className:"text-main0",children:[(0,l.RK)(t.price-t.cost)," ","ALEPH"]}),a&&(0,i.jsxs)(i.Fragment,{children:[" for ",(0,i.jsx)("span",{className:"text-main0",children:(0,l.Fx)(a.storage,{from:"MiB",to:"GiB",displayUnit:!0})})," ","included in your package."]})]})})}),children:[(0,l.RK)(t.cost)," ALEPH"]}):(0,i.jsxs)(i.Fragment,{children:[(0,l.RK)(t.cost)," ALEPH"]})})})]})});x.displayName="HoldingRequirementsVolumeLine";let v=s.memo(e=>{let{domain:n}=e;return(0,i.jsxs)(d,{children:[(0,i.jsx)("div",{children:"CUSTOM DOMAIN"}),(0,i.jsx)("div",{children:n.name}),(0,i.jsx)("div",{children:"-"})]})});function y(e){let{address:n,unlockedAmount:t,type:a,specs:o,volumes:r,domains:f,isPersistent:y=a===c.py.Instance,button:j,description:_}=e;r=null==r?void 0:r.filter(e=>!e.isFake);let{computeTotalCost:Z,perVolumeCost:T,totalCost:k}=(0,s.useMemo)(()=>{switch(a){case c.py.Program:return p.L.getCost({specs:o,volumes:r,isPersistent:y});case c.py.Instance:return m.u.getCost({specs:o,volumes:r});case c.py.Volume:return{...u.l.getCost({volumes:r}),computeTotalCost:0}}},[y,o,a,r]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w,{}),(0,i.jsx)(b,{className:"fx-noise-light",children:(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(N,{forwardedAs:"h2",type:"h5",children:"Estimated holding requirements"}),_&&(0,i.jsx)(C,{children:(0,i.jsx)("p",{className:"text-main2",children:_})}),(0,i.jsx)(P,{children:(0,i.jsxs)(S,{children:[(0,i.jsxs)(d,{isHeader:!0,children:[(0,i.jsx)("div",{children:"UNLOCKED"}),(0,i.jsxs)("div",{className:"tp-body1",children:["current wallet ",(0,l.zN)(n)]}),(0,i.jsxs)("div",{children:[(0,l.RK)(t)," ALEPH"]})]}),o&&(0,i.jsx)(g,{type:a,specs:o,isPersistent:y,perVolumeCost:T,cost:Z}),r&&r.map((e,n)=>(0,i.jsx)(x,{volume:e,specs:o,cost:T[n]},e.volumeType+n)),a===c.py.Program&&(0,i.jsxs)(d,{children:[(0,i.jsx)("div",{children:"TYPE"}),(0,i.jsx)("div",{children:y?"persistent":"on-demand"}),(0,i.jsx)("div",{children:"-"})]}),f&&f.map(e=>(0,i.jsx)(v,{domain:e},e.name)),(0,i.jsxs)(d,{children:[(0,i.jsx)("div",{}),(0,i.jsx)("div",{className:"tp-body2",children:"Total"}),(0,i.jsx)("div",{children:(0,i.jsxs)("span",{className:"text-main1",children:[(0,l.RK)(k)," ALEPH"]})})]})]})}),j&&(0,i.jsx)(I,{children:j})]})})]})}v.displayName="HoldingRequirementsDomainLine";var j=(0,a.ZP)(r).withConfig({displayName:"cmp___StyledGreyLabel",componentId:"sc-1kffrjv-0"})({marginLeft:"0.5rem"}),_=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1kffrjv-1"})({textAlign:"left"}),w=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1kffrjv-2"})({"@media (min-width: 768px)":{marginTop:"8rem"}}),b=(0,a.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-1kffrjv-3"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"6rem",paddingTop:"1.5rem","@media (min-width: 768px)":{marginTop:"auto",paddingBottom:"8rem",paddingTop:"4rem"}}),N=(0,a.ZP)(o.DU).withConfig({displayName:"cmp___StyledTextGradient",componentId:"sc-1kffrjv-4"})({marginBottom:"0.25rem"}),C=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1kffrjv-5"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),P=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1kffrjv-6"})({marginTop:"1.75rem",marginBottom:"1.75rem"}),S=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1kffrjv-7"})({maxWidth:"100%",overflow:"auto"}),I=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1kffrjv-8"})({marginTop:"1.75rem",textAlign:"center"})},11912:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(85893),a=t(19521),l=t(67294),o=t(3837);let d=(0,a.ZP)(o.zx).attrs(e=>({...e,forwardedAs:"span",onClick:e=>e.preventDefault(),kind:"neon",size:"big",variant:"text-only",color:"main0"})).withConfig({displayName:"styles__StyledInfoTooltipButton",componentId:"sc-15cvlnj-0"})(()=>[{cursor:"help !important"}]);function r(e){let{children:n,tooltipContent:t,plain:a,align:d="right",...r}=e,[u,f]=(0,l.useState)(!1);(0,l.useEffect)(()=>{f(!0)},[]);let h=(0,l.useRef)(null),g=(0,o._K)("md"),x=(0,i.jsx)(s,{name:"info-circle",$_css:"left"===d?{order:"-1"}:""});return(0,i.jsxs)(i.Fragment,{children:[a?(0,i.jsxs)(c,{ref:h,children:[n,x]}):(0,i.jsxs)(m,{ref:h,children:[n,x]}),u&&(0,i.jsx)(p,{...r,targetRef:h,content:t,$_css2:g?{position:"fixed !important",left:"0px !important",top:"0px !important",zIndex:"20 !important",margin:"1.5rem",height:"calc(100% - 3rem) !important",width:"calc(100% - 3rem) !important",maxWidth:"100% !important",transform:"none !important"}:{}})]})}var s=(0,a.ZP)(o.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1jqd2c1-0"})(["",""],e=>e.$_css),c=(0,a.ZP)("span").withConfig({displayName:"cmp___StyledSpan",componentId:"sc-1jqd2c1-1"})({display:"inline-flex",cursor:"help",alignItems:"center",gap:"0.625rem"}),m=(0,a.ZP)(d).withConfig({displayName:"cmp___StyledStyledInfoTooltipButton",componentId:"sc-1jqd2c1-2"})({display:"inline-flex",alignItems:"center",gap:"0.625rem"}),p=(0,a.ZP)(o.u).withConfig({displayName:"cmp___StyledTooltip",componentId:"sc-1jqd2c1-3"})(["",""],e=>e.$_css2)},70641:function(e,n,t){t.d(n,{Z:function(){return o}});var i=t(3837),a=t(19521);let l=a.ZP.div.attrs((0,i.PT)("fx-noise-light")).withConfig({displayName:"styles__NoisyContainer",componentId:"sc-1ql0ilg-0"})(["",""],{borderRadius:"1.5rem",padding:"1.5rem"});var o=l},15598:function(e,n,t){t.d(n,{nx:function(){return p}});var i=t(85893),a=t(19521),l=t(3837),o=t(67294),d=t(98117),r=t(59925),s=t(70641),c=t(31477);let m=o.memo(e=>{let{onRemove:n}=e;return(0,i.jsx)(x,{children:(0,i.jsx)(l.zx,{type:"button",onClick:n,color:"main2",variant:"secondary",kind:"neon",size:"regular",children:"Remove"})})});m.displayName="RemoveVolume";let p=o.memo(e=>{let{isStandAlone:n,fileCtrl:t,mountPathCtrl:a,useLatestCtrl:o,volumeSize:r,handleRemove:p}=(0,d.Yl)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{children:"Create and configure new volumes for your web3 function by either uploading a dependency file or a squashfs volume. Volumes play a crucial role in managing dependencies and providing a volume within your application."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(y,{children:(0,i.jsxs)(c.Z,{...t.field,...t.fieldState,children:["Upload squashfs volume ",(0,i.jsx)(j,{name:"arrow-up"})]})}),!n&&(0,i.jsx)(_,{children:(0,i.jsx)(l.oi,{...a.field,...a.fieldState,label:"Mount",placeholder:"/mount/opt"})}),t.field.value&&(0,i.jsx)(w,{children:(0,i.jsx)(l.oi,{label:"Size",name:"size",value:r,disabled:!0})}),!n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{children:(0,i.jsx)(l.XZ,{...o.field,...o.fieldState,label:"Always update to the latest version"})}),p&&(0,i.jsx)(m,{onRemove:p})]})]})]})});p.displayName="AddNewVolume";let u=o.memo(e=>{let{refHashCtrl:n,mountPathCtrl:t,useLatestCtrl:a,handleRemove:o}=(0,d.Ox)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N,{children:"Link existing volumes to your web3 function by pasting the reference hash associated with each volume. Volumes are an essential component for managing dependencies within your application."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)("div",{children:(0,i.jsx)(l.oi,{...t.field,...t.fieldState,label:"Mount",placeholder:"/mount/opt"})}),(0,i.jsx)(C,{children:(0,i.jsx)(l.oi,{...n.field,...n.fieldState,label:"Item hash",placeholder:"3335ad270a571b..."})}),(0,i.jsx)(P,{children:(0,i.jsx)(l.XZ,{...a.field,...a.fieldState,checked:!!a.field.value,label:"Always update to the latest version"})}),o&&(0,i.jsx)(m,{onRemove:o})]})]})});u.displayName="AddExistingVolume";let f=o.memo(e=>{let{nameCtrl:n,mountPathCtrl:t,sizeCtrl:a,sizeValue:o,isFake:r,sizeHandleChange:c,handleRemove:p}=(0,d.BB)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S,{children:"Create and configure persistent storage for your web3 functions, enabling your application to maintain data across multiple invocations or sessions. You can set up a customized storage solution tailored to your application's requirements."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)("div",{children:(0,i.jsx)(l.oi,{...n.field,...n.fieldState,disabled:r,label:"Volume name",placeholder:"Redis volume"})}),(0,i.jsx)(I,{children:(0,i.jsx)(l.oi,{...t.field,...t.fieldState,disabled:r,label:"Mount",placeholder:"/mount/opt"})}),(0,i.jsx)(Z,{children:(0,i.jsx)(l.oi,{...a.field,...a.fieldState,disabled:r,value:o,onChange:c,type:"number",label:"Size (GB)",placeholder:"0"})}),!r&&p&&(0,i.jsx)(m,{onRemove:p})]})]})});f.displayName="AddPersistentVolume";let h={[r.z.New]:p,[r.z.Existing]:u,[r.z.Persistent]:f},g=o.memo(e=>{let{volumeTypeCtrl:n,isFake:t,defaultValue:a,...s}=(0,d.Kn)(e),c=n.field.value,m=(0,o.useMemo)(()=>h[c],[c]),p=(0,o.useMemo)(()=>t?[{id:r.z.Persistent,name:"System Volume"}]:[{id:r.z.New,name:"New volume"},{id:r.z.Existing,name:"Existing volume"},{id:r.z.Persistent,name:"Persistent Storage"}],[t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(T,{children:(0,i.jsx)(l.mQ,{selected:c,align:"left",onTabChange:n.field.onChange,tabs:p})}),(0,i.jsx)("div",{role:"tabpanel",children:(0,i.jsx)(m,{...s,defaultValue:a})})]})});g.displayName="AddVolume",n.ZP=g;var x=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-de6qwa-0"})({marginTop:"1rem",paddingTop:"1.5rem",textAlign:"right"}),v=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-de6qwa-1"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),y=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-de6qwa-2"})({paddingTop:"1rem",paddingBottom:"1rem"}),j=(0,a.ZP)(l.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-de6qwa-3"})({marginLeft:"1rem"}),_=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-de6qwa-4"})({marginTop:"1rem"}),w=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-de6qwa-5"})({marginTop:"1rem"}),b=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-de6qwa-6"})({marginTop:"1rem",paddingTop:"1rem",paddingBottom:"1rem"}),N=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-de6qwa-7"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),C=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-de6qwa-8"})({marginTop:"1rem"}),P=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-de6qwa-9"})({marginTop:"1rem",paddingTop:"1rem",paddingBottom:"1rem"}),S=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP3",componentId:"sc-de6qwa-10"})({marginBottom:"1.5rem"}),I=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-de6qwa-11"})({marginTop:"1rem"}),Z=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv9",componentId:"sc-de6qwa-12"})({marginTop:"1rem"}),T=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv10",componentId:"sc-de6qwa-13"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0.75rem",paddingTop:"1.5rem"})},53871:function(e,n,t){t.d(n,{l:function(){return r},Z:function(){return s}});var i=t(85893),a=t(19521);let l=a.ZP.form.withConfig({displayName:"styles__StyledForm",componentId:"sc-faebcb-0"})(["",""],{display:"flex",flex:"1 1 0%",flexDirection:"column"});var o=t(3837),d=t(2915);let r=e=>{let{children:n,onSubmit:t,errors:a}=e;return(0,i.jsxs)(l,{onSubmit:t,children:[n,(0,i.jsx)(d.Z,{children:(null==a?void 0:a.root)&&Object.values(a.root).map(e=>(0,i.jsx)(o.Xq,{error:e},e+""))})]})};var s=r},78512:function(e,n,t){t.d(n,{Z:function(){return o}});var i=t(67294),a=t(11163),l=t(36470);function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",[n]=(0,l.mr)(),t=(0,a.useRouter)();(0,i.useEffect)(()=>{n.account||t.replace(e)})}},10159:function(e,n,t){t.d(n,{c:function(){return d}});var i=t(67294),a=t(47291),l=t(87536),o=t(1604);function d(e){let{onSubmit:n,...t}=e,d=(0,l.cI)(t),[r,{onLoad:s,onSuccess:c,onError:m}]=(0,a.g)(),p=(0,i.useCallback)(async e=>{try{s();let t=await n(e);c(t)}catch(n){let e=n instanceof o.jm?Error("Validation error, check highlighted form fields"):(null==n?void 0:n.cause)||n;d.setError("root.serverError",{...e,message:null==e?void 0:e.message}),m(e)}},[d,m,s,n,c]),u=(0,i.useCallback)(async e=>{let n;if(console.log(e),!n){let t=function e(n){let[t]=Object.entries(n);if(!t)return;let[i,a]=t;if(Array.isArray(a)){let n=a[a.length-1];return e(n)}return[i,a]}(e);if(t){let[e,i]=t,a="string"==typeof i?i:(null==i?void 0:i.message)?": ".concat(i.message):(null==i?void 0:i.type)?': "'.concat(null==i?void 0:i.type,'" validation not satisfied'):"";n=Error('Error on field "'.concat(e,'"').concat(a))}}n||(n=Error("Validation error")),m(n)},[m]),f=(0,i.useMemo)(()=>d.handleSubmit(p,u),[d,p,u]);return{...d,requestState:r,handleSubmit:f}}},47291:function(e,n,t){t.d(n,{g:function(){return l}});var i=t(67294),a=t(3837);function l(){let{onSuccess:e,onError:n,onLoad:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=(0,a.lm)(),[o,d]=(0,i.useState)({data:null,loading:!1,error:null}),r=(0,i.useCallback)(n=>{function t(){l&&l.add({variant:"success",title:"Operation complete"})}return d({data:n,loading:!1,error:null}),e?e(n,t):t()},[l,e]),s=(0,i.useCallback)(e=>{function t(e){var n;let t=e.message,i=null===(n=null==e?void 0:e.cause)||void 0===n?void 0:n.message;l&&l.add({variant:"error",title:"Error",text:t,detail:i})}return d({data:null,loading:!1,error:e}),n?n(e,t):t(e)},[n,l]),c=(0,i.useCallback)(()=>{d({data:null,loading:!0,error:null}),t&&t()},[t]);return[o,{onSuccess:r,onError:s,onLoad:c}]}},98117:function(e,n,t){t.d(n,{BB:function(){return c},Kn:function(){return m},Ox:function(){return s},Yl:function(){return r},Yz:function(){return d}});var i=t(67294),a=t(34853),l=t(59925),o=t(87536);let d={volumeType:l.z.New};function r(e){let{name:n="",index:t,control:d,defaultValue:r,onRemove:s}=e,c=void 0===t?n:"".concat(n,".").concat(t),m=(0,o.bc)({control:d,name:"".concat(c,".file"),defaultValue:null==r?void 0:r.file}),p=(0,o.bc)({control:d,name:"".concat(c,".mountPath"),defaultValue:null==r?void 0:r.mountPath}),u=(0,o.bc)({control:d,name:"".concat(c,".useLatest"),defaultValue:null==r?void 0:r.useLatest}),{value:f}=m.field,h=(0,i.useMemo)(()=>{let e=l.l.getVolumeSize({volumeType:l.z.New,file:f});return(0,a.eB)(e,"MiB")},[f]);return{isStandAlone:void 0===t,fileCtrl:m,mountPathCtrl:p,useLatestCtrl:u,volumeSize:h,handleRemove:s}}function s(e){let{name:n="",index:t,control:i,defaultValue:a,onRemove:l}=e,d=(0,o.bc)({control:i,name:"".concat(n,".").concat(t,".refHash"),defaultValue:null==a?void 0:a.refHash}),r=(0,o.bc)({control:i,name:"".concat(n,".").concat(t,".mountPath"),defaultValue:null==a?void 0:a.mountPath}),s=(0,o.bc)({control:i,name:"".concat(n,".").concat(t,".useLatest"),defaultValue:null==a?void 0:a.useLatest});return{refHashCtrl:d,mountPathCtrl:r,useLatestCtrl:s,handleRemove:l}}function c(e){let{name:n="",index:t,control:l,defaultValue:d,onRemove:r}=e,s=(0,o.bc)({control:l,name:"".concat(n,".").concat(t,".name"),defaultValue:null==d?void 0:d.name}),c=(0,o.bc)({control:l,name:"".concat(n,".").concat(t,".mountPath"),defaultValue:null==d?void 0:d.mountPath}),m=(0,o.bc)({control:l,name:"".concat(n,".").concat(t,".size"),defaultValue:null==d?void 0:d.size}),p=(null==d?void 0:d.isFake)||!1,u=(0,i.useCallback)(e=>{let n=Number(e.target.value),t=(0,a.Fx)(n,{from:"GiB",to:"MiB",displayUnit:!1});m.field.onChange(t)},[m.field]),f=(0,i.useMemo)(()=>m.field.value?(0,a.Fx)(m.field.value,{from:"MiB",to:"GiB",displayUnit:!1}):void 0,[m.field]);return{nameCtrl:s,mountPathCtrl:c,sizeCtrl:m,sizeValue:f,isFake:p,sizeHandleChange:u,handleRemove:r}}function m(e){let{name:n="volumes",index:t,control:a,defaultValue:d,onRemove:r}=e,s=void 0===t?n:"".concat(n,".").concat(t),c=(0,o.bc)({control:a,name:"".concat(s,".volumeType"),defaultValue:l.z.New}),m=(null==d?void 0:d.isFake)||!1,p=(0,i.useCallback)(()=>{r&&r(t)},[t,r]);return{name:n,index:t,control:a,volumeTypeCtrl:c,defaultValue:d,isFake:m,onRemove:p}}}}]); \ No newline at end of file diff --git a/_next/static/chunks/55-9e62c603b32691e8.js b/_next/static/chunks/55-9e62c603b32691e8.js deleted file mode 100644 index 5022431b..00000000 --- a/_next/static/chunks/55-9e62c603b32691e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[55],{2915:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(85893),a=t(19521),o=t(3837),l=t(87531);function r(e){let{children:n,variant:t="default"}=e;return(0,i.jsx)(i.Fragment,{children:"default"===t?(0,i.jsx)(o.X2,{xs:12,gap:"0",children:(0,i.jsx)(o.JX,{xs:12,lg:10,lgOffset:2,xl:8,xlOffset:3,xxl:6,xxlOffset:4,children:(0,i.jsx)(l.Z,{children:(0,i.jsx)(d,{children:n})})})}):(0,i.jsx)(o.X2,{xs:12,gap:"0",children:(0,i.jsx)(o.JX,{xs:12,xl:8,xlOffset:3,children:(0,i.jsx)(l.Z,{children:(0,i.jsx)(s,{children:n})})})})})}var d=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1m0nz8e-0"})({marginLeft:"auto",marginRight:"auto",maxWidth:"715px"}),s=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1m0nz8e-1"})({marginLeft:"auto",marginRight:"auto",maxWidth:"961px"})},3860:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(85893),a=t(19521),o=t(3837);let l=a.ZP.span.attrs((0,o.PT)("tp-info")).withConfig({displayName:"styles__StyledLabel",componentId:"sc-19wpeec-0"})(["vertical-align:top;color:#fff;"]);function r(e){let{children:n,number:t,as:a="h1",type:o="h5",color:r="main1",disabled:c=!1,label:m,...p}=e;return(0,i.jsxs)(a,{style:{lineHeight:"1rem",margin:0},children:[(0,i.jsxs)("span",{className:c?"unavailable-content":"",children:[(0,i.jsxs)(d,{className:"tp-body1 fs-xl text-base0",children:[String(t).padStart(2,"0"),"/\xa0"]}),(0,i.jsx)(s,{forwardedAs:"span",type:o,color:r,...p,children:n})]}),m&&(0,i.jsx)(l,{type:o,children:m})]})}var d=(0,a.ZP)("span").withConfig({displayName:"cmp___StyledSpan",componentId:"sc-1s7saq-0"})({display:"inline"}),s=(0,a.ZP)(o.DU).withConfig({displayName:"cmp___StyledTextGradient",componentId:"sc-1s7saq-1"})({display:"inline"})},31477:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(85893),a=t(19521),o=t(67294),l=t(3837);let r=a.ZP.input.withConfig({displayName:"styles__StyledHiddenFileInput",componentId:"sc-vome1k-0"})(["display:none;"]);var d=t(34853);let s=(0,o.memo)((0,o.forwardRef)((e,n)=>{let{onChange:t,accept:a,value:s,children:c,error:p}=e,u=(0,o.useRef)(null),f=(0,o.useCallback)(()=>{u.current&&u.current.click()},[]),h=(0,o.useCallback)(()=>{t(void 0)},[t]),g=(0,o.useCallback)(e=>{let n=e.target,{files:i}=n;if(i){let e=i[0];t(e)}},[t]);return(0,i.jsxs)("div",{tabIndex:-1,ref:n,children:[s?(0,i.jsxs)(l.zx,{onClick:h,type:"button",color:"main2",kind:"neon",size:"regular",variant:"tertiary",children:[(0,d.zN)(s.name)," ",(0,i.jsx)(m,{name:"trash"})]}):(0,i.jsx)(l.zx,{onClick:f,type:"button",color:"main0",kind:"neon",size:"regular",variant:"primary",children:c}),p&&(0,i.jsx)(l.Xq,{error:p}),(0,i.jsx)(r,{type:"file",ref:u,onChange:g,accept:a})]})}));s.displayName="HiddenFileInput";var c=s,m=(0,a.ZP)(l.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1pig7lr-0"})({marginLeft:"1.25rem"})},38478:function(e,n,t){t.d(n,{Z:function(){return y}});var i=t(85893),a=t(19521),o=t(34853),l=t(3837);let r=a.ZP.div.withConfig({displayName:"styles__StyledHoldingSummaryLine",componentId:"sc-ejcp3t-0"})(["",""],e=>{let{isHeader:n}=e;return(0,a.iv)([""," grid-template-columns:1fr 2fr 1fr;grid-auto-rows:max-content;opacity:",";margin-bottom:",";align-items:stretch;& > *{"," width:100%;border-bottom:1px solid #666;&:first-child{","}&:not(:first-child){","}&:last-child{border-bottom-style:dashed;}}"],{display:"grid",padding:"0px"},n?.5:1,n?"1.5rem":"0",{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"},{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",fontSize:"0.75rem",lineHeight:"1rem"},{display:"flex",flexDirection:"column",alignItems:"flex-end",justifyContent:"center"})}),d=a.ZP.span.attrs((0,l.PT)("tp-info")).withConfig({displayName:"styles__GreyLabel",componentId:"sc-ejcp3t-1"})(["color:rgba(255,255,255,0.3);"]);a.ZP.span.attrs((0,l.PT)("tp-info text-main0")).withConfig({displayName:"styles__BlueLabel",componentId:"sc-ejcp3t-2"})([""]);var s=t(67294),c=t(33358),m=t(49875),p=t(39261),u=t(59925),f=t(11912),h=t(2915);let g=s.memo(e=>{let{type:n,specs:t,cost:a}=e,{cpu:l,ram:d,storage:m}=t,p=(0,s.useMemo)(()=>"".concat(l,"x86-64bit"),[l]),u=(0,s.useMemo)(()=>"".concat((0,o.Fx)(d,{from:"MiB",to:"GiB",displayUnit:!1}),"GB-RAM"),[d]),f=(0,s.useMemo)(()=>"".concat((0,o.Fx)(m,{from:"MiB",to:"GiB",displayUnit:!1}),"GB-HDD"),[m]),h=(0,s.useMemo)(()=>"".concat(p,".").concat(u).concat(n===c.py.Instance?".".concat(f):""),[p,u,f,n]);return(0,i.jsxs)(r,{children:[(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:c.K_[n].toUpperCase()})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:h})}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[(0,o.RK)(a)," ALEPH"]})})]})});g.displayName="HoldingRequirementsSpecsLine";let x=s.memo(e=>{let{volume:n,cost:t,specs:a}=e,l=u.l.getVolumeSize(n);if(!t)return(0,i.jsx)(i.Fragment,{});let d=!!t.discount,s=!t.cost;return(0,i.jsxs)(r,{children:[(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:["STORAGE",(0,i.jsx)(j,{children:n.volumeType===u.z.Persistent?"PERSISTENT":"VOLUME"})]})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:(0,o.eB)(l,"MiB")})}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{children:d?(0,i.jsxs)(f.Z,{plain:!0,align:"left",my:"bottom-left",at:"bottom-right",tooltipContent:(0,i.jsx)(_,{children:(0,i.jsx)("div",{className:"tp-body1 fs-md",children:s?(0,i.jsxs)(i.Fragment,{children:["The cost displayed for the added storage is"," ",(0,i.jsxs)("span",{className:"text-main0",children:[(0,o.RK)(t.cost)," ALEPH"]})," ","as this resource is already included in your selected package at no additional charge."]}):(0,i.jsxs)(i.Fragment,{children:["Good news! The displayed price is lower than usual due to a discount of"," ",(0,i.jsxs)("span",{className:"text-main0",children:[(0,o.RK)(t.price-t.cost)," ","ALEPH"]}),a&&(0,i.jsxs)(i.Fragment,{children:[" for ",(0,i.jsx)("span",{className:"text-main0",children:(0,o.Fx)(a.storage,{from:"MiB",to:"GiB",displayUnit:!0})})," ","included in your package."]})]})})}),children:[(0,o.RK)(t.cost)," ALEPH"]}):(0,i.jsxs)(i.Fragment,{children:[(0,o.RK)(t.cost)," ALEPH"]})})})]})});x.displayName="HoldingRequirementsVolumeLine";let v=s.memo(e=>{let{domain:n}=e;return(0,i.jsxs)(r,{children:[(0,i.jsx)("div",{children:"CUSTOM DOMAIN"}),(0,i.jsx)("div",{children:n.name}),(0,i.jsx)("div",{children:"-"})]})});function y(e){let{address:n,unlockedAmount:t,type:a,specs:l,volumes:d,domains:f,isPersistent:y=a===c.py.Instance,button:j,description:_}=e,{computeTotalCost:Z,perVolumeCost:T,totalCost:k}=(0,s.useMemo)(()=>{switch(a){case c.py.Program:return p.L.getCost({specs:l,volumes:d,isPersistent:y});case c.py.Instance:return m.u.getCost({specs:l,volumes:d});case c.py.Volume:return{...u.l.getCost({volumes:d}),computeTotalCost:0}}},[y,l,a,d]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w,{}),(0,i.jsx)(b,{className:"fx-noise-light",children:(0,i.jsxs)(h.Z,{children:[(0,i.jsx)(N,{forwardedAs:"h2",type:"h5",children:"Estimated holding requirements"}),_&&(0,i.jsx)(C,{children:(0,i.jsx)("p",{className:"text-main2",children:_})}),(0,i.jsx)(P,{children:(0,i.jsxs)(S,{children:[(0,i.jsxs)(r,{isHeader:!0,children:[(0,i.jsx)("div",{children:"UNLOCKED"}),(0,i.jsxs)("div",{className:"tp-body1",children:["current wallet ",(0,o.zN)(n)]}),(0,i.jsxs)("div",{children:[(0,o.RK)(t)," ALEPH"]})]}),l&&(0,i.jsx)(g,{type:a,specs:l,isPersistent:y,perVolumeCost:T,cost:Z}),d&&d.map((e,n)=>(0,i.jsx)(x,{volume:e,specs:l,cost:T[n]},e.volumeType+n)),a===c.py.Program&&(0,i.jsxs)(r,{children:[(0,i.jsx)("div",{children:"TYPE"}),(0,i.jsx)("div",{children:y?"persistent":"on-demand"}),(0,i.jsx)("div",{children:"-"})]}),f&&f.map(e=>(0,i.jsx)(v,{domain:e},e.name)),(0,i.jsxs)(r,{children:[(0,i.jsx)("div",{}),(0,i.jsx)("div",{className:"tp-body2",children:"Total"}),(0,i.jsx)("div",{children:(0,i.jsxs)("span",{className:"text-main1",children:[(0,o.RK)(k)," ALEPH"]})})]})]})}),j&&(0,i.jsx)(I,{children:j})]})})]})}v.displayName="HoldingRequirementsDomainLine";var j=(0,a.ZP)(d).withConfig({displayName:"cmp___StyledGreyLabel",componentId:"sc-1kffrjv-0"})({marginLeft:"0.5rem"}),_=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1kffrjv-1"})({textAlign:"left"}),w=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1kffrjv-2"})({"@media (min-width: 768px)":{marginTop:"8rem"}}),b=(0,a.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-1kffrjv-3"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"6rem",paddingTop:"1.5rem","@media (min-width: 768px)":{marginTop:"auto",paddingBottom:"8rem",paddingTop:"4rem"}}),N=(0,a.ZP)(l.DU).withConfig({displayName:"cmp___StyledTextGradient",componentId:"sc-1kffrjv-4"})({marginBottom:"0.25rem"}),C=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1kffrjv-5"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),P=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1kffrjv-6"})({marginTop:"1.75rem",marginBottom:"1.75rem"}),S=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1kffrjv-7"})({maxWidth:"100%",overflow:"auto"}),I=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1kffrjv-8"})({marginTop:"1.75rem",textAlign:"center"})},11912:function(e,n,t){t.d(n,{Z:function(){return d}});var i=t(85893),a=t(19521),o=t(67294),l=t(3837);let r=(0,a.ZP)(l.zx).attrs(e=>({...e,forwardedAs:"span",onClick:e=>e.preventDefault(),kind:"neon",size:"big",variant:"text-only",color:"main0"})).withConfig({displayName:"styles__StyledInfoTooltipButton",componentId:"sc-15cvlnj-0"})(()=>[{cursor:"help !important"}]);function d(e){let{children:n,tooltipContent:t,plain:a,align:r="right",...d}=e,[u,f]=(0,o.useState)(!1);(0,o.useEffect)(()=>{f(!0)},[]);let h=(0,o.useRef)(null),g=(0,l._K)("md"),x=(0,i.jsx)(s,{name:"info-circle",$_css:"left"===r?{order:"-1"}:""});return(0,i.jsxs)(i.Fragment,{children:[a?(0,i.jsxs)(c,{ref:h,children:[n,x]}):(0,i.jsxs)(m,{ref:h,children:[n,x]}),u&&(0,i.jsx)(p,{...d,targetRef:h,content:t,$_css2:g?{position:"fixed !important",left:"0px !important",top:"0px !important",zIndex:"20 !important",margin:"1.5rem",height:"calc(100% - 3rem) !important",width:"calc(100% - 3rem) !important",maxWidth:"100% !important",transform:"none !important"}:{}})]})}var s=(0,a.ZP)(l.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1jqd2c1-0"})(["",""],e=>e.$_css),c=(0,a.ZP)("span").withConfig({displayName:"cmp___StyledSpan",componentId:"sc-1jqd2c1-1"})({display:"inline-flex",cursor:"help",alignItems:"center",gap:"0.625rem"}),m=(0,a.ZP)(r).withConfig({displayName:"cmp___StyledStyledInfoTooltipButton",componentId:"sc-1jqd2c1-2"})({display:"inline-flex",alignItems:"center",gap:"0.625rem"}),p=(0,a.ZP)(l.u).withConfig({displayName:"cmp___StyledTooltip",componentId:"sc-1jqd2c1-3"})(["",""],e=>e.$_css2)},70641:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(3837),a=t(19521);let o=a.ZP.div.attrs((0,i.PT)("fx-noise-light")).withConfig({displayName:"styles__NoisyContainer",componentId:"sc-1ql0ilg-0"})(["",""],{borderRadius:"1.5rem",padding:"1.5rem"});var l=o},15598:function(e,n,t){t.d(n,{nx:function(){return p}});var i=t(85893),a=t(19521),o=t(3837),l=t(67294),r=t(98117),d=t(59925),s=t(70641),c=t(31477);let m=l.memo(e=>{let{onRemove:n}=e;return(0,i.jsx)(x,{children:(0,i.jsx)(o.zx,{type:"button",onClick:n,color:"main2",variant:"secondary",kind:"neon",size:"regular",children:"Remove"})})});m.displayName="RemoveVolume";let p=l.memo(e=>{let{isStandAlone:n,fileCtrl:t,mountPathCtrl:a,useLatestCtrl:l,volumeSize:d,handleRemove:p}=(0,r.Yl)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(v,{children:"Create and configure new volumes for your web3 function by either uploading a dependency file or a squashfs volume. Volumes play a crucial role in managing dependencies and providing a volume within your application."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(y,{children:(0,i.jsxs)(c.Z,{...t.field,...t.fieldState,children:["Upload squashfs volume ",(0,i.jsx)(j,{name:"arrow-up"})]})}),!n&&(0,i.jsx)(_,{children:(0,i.jsx)(o.oi,{...a.field,...a.fieldState,label:"Mount",placeholder:"/mount/opt"})}),t.field.value&&(0,i.jsx)(w,{children:(0,i.jsx)(o.oi,{label:"Size",name:"size",value:d,disabled:!0})}),!n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{children:(0,i.jsx)(o.XZ,{...l.field,...l.fieldState,label:"Always update to the latest version"})}),p&&(0,i.jsx)(m,{onRemove:p})]})]})]})});p.displayName="AddNewVolume";let u=l.memo(e=>{let{refHashCtrl:n,mountPathCtrl:t,useLatestCtrl:a,handleRemove:l}=(0,r.Ox)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N,{children:"Link existing volumes to your web3 function by pasting the reference hash associated with each volume. Volumes are an essential component for managing dependencies within your application."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)("div",{children:(0,i.jsx)(o.oi,{...t.field,...t.fieldState,label:"Mount",placeholder:"/mount/opt"})}),(0,i.jsx)(C,{children:(0,i.jsx)(o.oi,{...n.field,...n.fieldState,label:"Item hash",placeholder:"3335ad270a571b..."})}),(0,i.jsx)(P,{children:(0,i.jsx)(o.XZ,{...a.field,...a.fieldState,checked:!!a.field.value,label:"Always update to the latest version"})}),l&&(0,i.jsx)(m,{onRemove:l})]})]})});u.displayName="AddExistingVolume";let f=l.memo(e=>{let{nameCtrl:n,mountPathCtrl:t,sizeCtrl:a,sizeValue:l,sizeHandleChange:d,handleRemove:c}=(0,r.BB)(e);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(S,{children:"Create and configure persistent storage for your web3 functions, enabling your application to maintain data across multiple invocations or sessions. You can set up a customized storage solution tailored to your application's requirements."}),(0,i.jsxs)(s.Z,{children:[(0,i.jsx)("div",{children:(0,i.jsx)(o.oi,{...n.field,...n.fieldState,label:"Volume name",placeholder:"Redis volume"})}),(0,i.jsx)(I,{children:(0,i.jsx)(o.oi,{...t.field,...t.fieldState,label:"Mount",placeholder:"/mount/opt"})}),(0,i.jsx)(Z,{children:(0,i.jsx)(o.oi,{...a.field,...a.fieldState,value:l,onChange:d,type:"number",label:"Size (GB)",placeholder:"0"})}),c&&(0,i.jsx)(m,{onRemove:c})]})]})});f.displayName="AddPersistentVolume";let h={[d.z.New]:p,[d.z.Existing]:u,[d.z.Persistent]:f},g=l.memo(e=>{let{volumeTypeCtrl:n,...t}=(0,r.Kn)(e),a=n.field.value,s=(0,l.useMemo)(()=>h[a],[a]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(T,{children:(0,i.jsx)(o.mQ,{selected:a,align:"left",onTabChange:n.field.onChange,tabs:[{id:d.z.New,name:"New volume"},{id:d.z.Existing,name:"Existing volume"},{id:d.z.Persistent,name:"Persistent Storage"}]})}),(0,i.jsx)("div",{role:"tabpanel",children:(0,i.jsx)(s,{...t})})]})});g.displayName="AddVolume",n.ZP=g;var x=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-de6qwa-0"})({marginTop:"1rem",paddingTop:"1.5rem",textAlign:"right"}),v=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-de6qwa-1"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),y=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-de6qwa-2"})({paddingTop:"1rem",paddingBottom:"1rem"}),j=(0,a.ZP)(o.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-de6qwa-3"})({marginLeft:"1rem"}),_=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-de6qwa-4"})({marginTop:"1rem"}),w=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-de6qwa-5"})({marginTop:"1rem"}),b=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-de6qwa-6"})({marginTop:"1rem",paddingTop:"1rem",paddingBottom:"1rem"}),N=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-de6qwa-7"})({marginBottom:"1.5rem",marginTop:"0.25rem"}),C=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-de6qwa-8"})({marginTop:"1rem"}),P=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-de6qwa-9"})({marginTop:"1rem",paddingTop:"1rem",paddingBottom:"1rem"}),S=(0,a.ZP)("p").withConfig({displayName:"cmp___StyledP3",componentId:"sc-de6qwa-10"})({marginBottom:"1.5rem"}),I=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-de6qwa-11"})({marginTop:"1rem"}),Z=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv9",componentId:"sc-de6qwa-12"})({marginTop:"1rem"}),T=(0,a.ZP)("div").withConfig({displayName:"cmp___StyledDiv10",componentId:"sc-de6qwa-13"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0.75rem",paddingTop:"1.5rem"})},53871:function(e,n,t){t.d(n,{l:function(){return d},Z:function(){return s}});var i=t(85893),a=t(19521);let o=a.ZP.form.withConfig({displayName:"styles__StyledForm",componentId:"sc-faebcb-0"})(["",""],{display:"flex",flex:"1 1 0%",flexDirection:"column"});var l=t(3837),r=t(2915);let d=e=>{let{children:n,onSubmit:t,errors:a}=e;return(0,i.jsxs)(o,{onSubmit:t,children:[n,(0,i.jsx)(r.Z,{children:(null==a?void 0:a.root)&&Object.values(a.root).map(e=>(0,i.jsx)(l.Xq,{error:e},e+""))})]})};var s=d},78512:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(67294),a=t(11163),o=t(36470);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",[n]=(0,o.mr)(),t=(0,a.useRouter)();(0,i.useEffect)(()=>{n.account||t.replace(e)})}},10159:function(e,n,t){t.d(n,{c:function(){return r}});var i=t(67294),a=t(47291),o=t(87536),l=t(1604);function r(e){let{onSubmit:n,...t}=e,r=(0,o.cI)(t),[d,{onLoad:s,onSuccess:c,onError:m}]=(0,a.g)(),p=(0,i.useCallback)(async e=>{try{s();let t=await n(e);c(t)}catch(n){let e=n instanceof l.jm?Error("Validation error, check highlighted form fields"):(null==n?void 0:n.cause)||n;r.setError("root.serverError",{...e,message:null==e?void 0:e.message}),m(e)}},[r,m,s,n,c]),u=(0,i.useCallback)(async e=>{let n;if(console.log(e),!n){let t=function e(n){let[t]=Object.entries(n);if(!t)return;let[i,a]=t;if(Array.isArray(a)){let n=a[a.length-1];return e(n)}return[i,a]}(e);if(t){let[e,i]=t,a="string"==typeof i?i:(null==i?void 0:i.message)?": ".concat(i.message):(null==i?void 0:i.type)?': "'.concat(null==i?void 0:i.type,'" validation not satisfied'):"";n=Error('Error on field "'.concat(e,'"').concat(a))}}n||(n=Error("Validation error")),m(n)},[m]),f=(0,i.useMemo)(()=>r.handleSubmit(p,u),[r,p,u]);return{...r,requestState:d,handleSubmit:f}}},47291:function(e,n,t){t.d(n,{g:function(){return o}});var i=t(67294),a=t(3837);function o(){let{onSuccess:e,onError:n,onLoad:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(0,a.lm)(),[l,r]=(0,i.useState)({data:null,loading:!1,error:null}),d=(0,i.useCallback)(n=>{function t(){o&&o.add({variant:"success",title:"Operation complete"})}return r({data:n,loading:!1,error:null}),e?e(n,t):t()},[o,e]),s=(0,i.useCallback)(e=>{function t(e){var n;let t=e.message,i=null===(n=null==e?void 0:e.cause)||void 0===n?void 0:n.message;o&&o.add({variant:"error",title:"Error",text:t,detail:i})}return r({data:null,loading:!1,error:e}),n?n(e,t):t(e)},[n,o]),c=(0,i.useCallback)(()=>{r({data:null,loading:!0,error:null}),t&&t()},[t]);return[l,{onSuccess:d,onError:s,onLoad:c}]}},98117:function(e,n,t){t.d(n,{BB:function(){return c},Kn:function(){return m},Ox:function(){return s},Yl:function(){return d},Yz:function(){return r}});var i=t(67294),a=t(34853),o=t(59925),l=t(87536);let r={volumeType:o.z.New};function d(e){let{name:n="",index:t,control:r,defaultValue:d,onRemove:s}=e,c=void 0===t?n:"".concat(n,".").concat(t),m=(0,l.bc)({control:r,name:"".concat(c,".file"),defaultValue:null==d?void 0:d.file}),p=(0,l.bc)({control:r,name:"".concat(c,".mountPath"),defaultValue:null==d?void 0:d.mountPath}),u=(0,l.bc)({control:r,name:"".concat(c,".useLatest"),defaultValue:null==d?void 0:d.useLatest}),{value:f}=m.field,h=(0,i.useMemo)(()=>{let e=o.l.getVolumeSize({volumeType:o.z.New,file:f});return(0,a.eB)(e,"MiB")},[f]);return{isStandAlone:void 0===t,fileCtrl:m,mountPathCtrl:p,useLatestCtrl:u,volumeSize:h,handleRemove:s}}function s(e){let{name:n="",index:t,control:i,defaultValue:a,onRemove:o}=e,r=(0,l.bc)({control:i,name:"".concat(n,".").concat(t,".refHash"),defaultValue:null==a?void 0:a.refHash}),d=(0,l.bc)({control:i,name:"".concat(n,".").concat(t,".mountPath"),defaultValue:null==a?void 0:a.mountPath}),s=(0,l.bc)({control:i,name:"".concat(n,".").concat(t,".useLatest"),defaultValue:null==a?void 0:a.useLatest});return{refHashCtrl:r,mountPathCtrl:d,useLatestCtrl:s,handleRemove:o}}function c(e){let{name:n="",index:t,control:o,defaultValue:r,onRemove:d}=e,s=(0,l.bc)({control:o,name:"".concat(n,".").concat(t,".name"),defaultValue:null==r?void 0:r.name}),c=(0,l.bc)({control:o,name:"".concat(n,".").concat(t,".mountPath"),defaultValue:null==r?void 0:r.mountPath}),m=(0,l.bc)({control:o,name:"".concat(n,".").concat(t,".size"),defaultValue:null==r?void 0:r.size}),p=(0,i.useCallback)(e=>{let n=Number(e.target.value),t=(0,a.Fx)(n,{from:"GiB",to:"MiB",displayUnit:!1});m.field.onChange(t)},[m.field]),u=(0,i.useMemo)(()=>m.field.value?(0,a.Fx)(m.field.value,{from:"MiB",to:"GiB",displayUnit:!1}):void 0,[m.field]);return{nameCtrl:s,mountPathCtrl:c,sizeCtrl:m,sizeValue:u,sizeHandleChange:p,handleRemove:d}}function m(e){let{name:n="volumes",index:t,control:a,onRemove:r}=e,d=void 0===t?n:"".concat(n,".").concat(t),s=(0,l.bc)({control:a,name:"".concat(d,".volumeType"),defaultValue:o.z.New}),c=(0,i.useCallback)(()=>{r&&r(t)},[t,r]);return{name:n,index:t,control:a,volumeTypeCtrl:s,onRemove:c}}}}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/_app-ce166d89c3c2e47a.js b/_next/static/chunks/pages/_app-efb4b61121b599d7.js similarity index 93% rename from _next/static/chunks/pages/_app-ce166d89c3c2e47a.js rename to _next/static/chunks/pages/_app-efb4b61121b599d7.js index 7a6bab87..2603d275 100644 --- a/_next/static/chunks/pages/_app-ce166d89c3c2e47a.js +++ b/_next/static/chunks/pages/_app-efb4b61121b599d7.js @@ -380,7 +380,7 @@ ${ei.item_hash}`)}es.any=ey,es.GetVerificationBuffer=eC},16863:function(ei,es,ef * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ef="function"==typeof Symbol&&Symbol.for,eu=ef?Symbol.for("react.element"):60103,ed=ef?Symbol.for("react.portal"):60106,em=ef?Symbol.for("react.fragment"):60107,eH=ef?Symbol.for("react.strict_mode"):60108,ez=ef?Symbol.for("react.profiler"):60114,eV=ef?Symbol.for("react.provider"):60109,eM=ef?Symbol.for("react.context"):60110,eg=ef?Symbol.for("react.async_mode"):60111,eL=ef?Symbol.for("react.concurrent_mode"):60111,eb=ef?Symbol.for("react.forward_ref"):60112,ey=ef?Symbol.for("react.suspense"):60113,eC=ef?Symbol.for("react.suspense_list"):60120,ex=ef?Symbol.for("react.memo"):60115,ew=ef?Symbol.for("react.lazy"):60116,eN=ef?Symbol.for("react.block"):60121,eS=ef?Symbol.for("react.fundamental"):60117,eA=ef?Symbol.for("react.responder"):60118,e_=ef?Symbol.for("react.scope"):60119;function eE(ei){if("object"==typeof ei&&null!==ei){var es=ei.$$typeof;switch(es){case eu:switch(ei=ei.type){case eg:case eL:case em:case ez:case eH:case ey:return ei;default:switch(ei=ei&&ei.$$typeof){case eM:case eb:case ew:case ex:case eV:return ei;default:return es}}case ed:return es}}}function eP(ei){return eE(ei)===eL}es.AsyncMode=eg,es.ConcurrentMode=eL,es.ContextConsumer=eM,es.ContextProvider=eV,es.Element=eu,es.ForwardRef=eb,es.Fragment=em,es.Lazy=ew,es.Memo=ex,es.Portal=ed,es.Profiler=ez,es.StrictMode=eH,es.Suspense=ey,es.isAsyncMode=function(ei){return eP(ei)||eE(ei)===eg},es.isConcurrentMode=eP,es.isContextConsumer=function(ei){return eE(ei)===eM},es.isContextProvider=function(ei){return eE(ei)===eV},es.isElement=function(ei){return"object"==typeof ei&&null!==ei&&ei.$$typeof===eu},es.isForwardRef=function(ei){return eE(ei)===eb},es.isFragment=function(ei){return eE(ei)===em},es.isLazy=function(ei){return eE(ei)===ew},es.isMemo=function(ei){return eE(ei)===ex},es.isPortal=function(ei){return eE(ei)===ed},es.isProfiler=function(ei){return eE(ei)===ez},es.isStrictMode=function(ei){return eE(ei)===eH},es.isSuspense=function(ei){return eE(ei)===ey},es.isValidElementType=function(ei){return"string"==typeof ei||"function"==typeof ei||ei===em||ei===eL||ei===ez||ei===eH||ei===ey||ei===eC||"object"==typeof ei&&null!==ei&&(ei.$$typeof===ew||ei.$$typeof===ex||ei.$$typeof===eV||ei.$$typeof===eM||ei.$$typeof===eb||ei.$$typeof===eS||ei.$$typeof===eA||ei.$$typeof===e_||ei.$$typeof===eN)},es.typeOf=eE},21296:function(ei,es,ef){"use strict";ei.exports=ef(96103)},80645:function(ei,es){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */es.read=function(ei,es,ef,eu,ed){var em,eH,ez=8*ed-eu-1,eV=(1<>1,eg=-7,eL=ef?ed-1:0,eb=ef?-1:1,ey=ei[es+eL];for(eL+=eb,em=ey&(1<<-eg)-1,ey>>=-eg,eg+=ez;eg>0;em=256*em+ei[es+eL],eL+=eb,eg-=8);for(eH=em&(1<<-eg)-1,em>>=-eg,eg+=eu;eg>0;eH=256*eH+ei[es+eL],eL+=eb,eg-=8);if(0===em)em=1-eM;else{if(em===eV)return eH?NaN:(ey?-1:1)*(1/0);eH+=Math.pow(2,eu),em-=eM}return(ey?-1:1)*eH*Math.pow(2,em-eu)},es.write=function(ei,es,ef,eu,ed,em){var eH,ez,eV,eM=8*em-ed-1,eg=(1<>1,eb=23===ed?5960464477539062e-23:0,ey=eu?0:em-1,eC=eu?1:-1,ex=es<0||0===es&&1/es<0?1:0;for(isNaN(es=Math.abs(es))||es===1/0?(ez=isNaN(es)?1:0,eH=eg):(eH=Math.floor(Math.log(es)/Math.LN2),es*(eV=Math.pow(2,-eH))<1&&(eH--,eV*=2),eH+eL>=1?es+=eb/eV:es+=eb*Math.pow(2,1-eL),es*eV>=2&&(eH++,eV/=2),eH+eL>=eg?(ez=0,eH=eg):eH+eL>=1?(ez=(es*eV-1)*Math.pow(2,ed),eH+=eL):(ez=es*Math.pow(2,eL-1)*Math.pow(2,ed),eH=0));ed>=8;ei[ef+ey]=255&ez,ey+=eC,ez/=256,ed-=8);for(eH=eH<0;ei[ef+ey]=255&eH,ey+=eC,eH/=256,eM-=8);ei[ef+ey-eC]|=128*ex}},35717:function(ei){"function"==typeof Object.create?ei.exports=function(ei,es){es&&(ei.super_=es,ei.prototype=Object.create(es.prototype,{constructor:{value:ei,enumerable:!1,writable:!0,configurable:!0}}))}:ei.exports=function(ei,es){if(es){ei.super_=es;var ef=function(){};ef.prototype=es.prototype,ei.prototype=new ef,ei.prototype.constructor=ei}}},82584:function(ei,es,ef){"use strict";var eu=ef(96410)(),ed=ef(21924)("Object.prototype.toString"),em=function(ei){return(!eu||!ei||"object"!=typeof ei||!(Symbol.toStringTag in ei))&&"[object Arguments]"===ed(ei)},eH=function(ei){return!!em(ei)||null!==ei&&"object"==typeof ei&&"number"==typeof ei.length&&ei.length>=0&&"[object Array]"!==ed(ei)&&"[object Function]"===ed(ei.callee)},ez=function(){return em(arguments)}();em.isLegacyArguments=eH,ei.exports=ez?em:eH},95320:function(ei){"use strict";var es,ef,eu=Function.prototype.toString,ed="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof ed&&"function"==typeof Object.defineProperty)try{es=Object.defineProperty({},"length",{get:function(){throw ef}}),ef={},ed(function(){throw 42},null,es)}catch(ei){ei!==ef&&(ed=null)}else ed=null;var em=/^\s*class\b/,eH=function(ei){try{var es=eu.call(ei);return em.test(es)}catch(ei){return!1}},ez=function(ei){try{if(eH(ei))return!1;return eu.call(ei),!0}catch(ei){return!1}},eV=Object.prototype.toString,eM="[object Object]",eg="[object Function]",eL="[object GeneratorFunction]",eb="[object HTMLAllCollection]",ey="[object HTML document.all class]",eC="[object HTMLCollection]",ex="function"==typeof Symbol&&!!Symbol.toStringTag,ew=!(0 in[,]),eN=function(){return!1};if("object"==typeof document){var eS=document.all;eV.call(eS)===eV.call(document.all)&&(eN=function(ei){if((ew||!ei)&&(void 0===ei||"object"==typeof ei))try{var es=eV.call(ei);return(es===eb||es===ey||es===eC||es===eM)&&null==ei("")}catch(ei){}return!1})}ei.exports=ed?function(ei){if(eN(ei))return!0;if(!ei||"function"!=typeof ei&&"object"!=typeof ei)return!1;try{ed(ei,null,es)}catch(ei){if(ei!==ef)return!1}return!eH(ei)&&ez(ei)}:function(ei){if(eN(ei))return!0;if(!ei||"function"!=typeof ei&&"object"!=typeof ei)return!1;if(ex)return ez(ei);if(eH(ei))return!1;var es=eV.call(ei);return!!(es===eg||es===eL||/^\[object HTML/.test(es))&&ez(ei)}},48662:function(ei,es,ef){"use strict";var eu,ed=Object.prototype.toString,em=Function.prototype.toString,eH=/^\s*(?:function)?\*/,ez=ef(96410)(),eV=Object.getPrototypeOf,eM=function(){if(!ez)return!1;try{return Function("return function*() {}")()}catch(ei){}};ei.exports=function(ei){if("function"!=typeof ei)return!1;if(eH.test(em.call(ei)))return!0;if(!ez)return"[object GeneratorFunction]"===ed.call(ei);if(!eV)return!1;if(void 0===eu){var es=eM();eu=!!es&&eV(es)}return eV(ei)===eu}},23944:function(ei){ei.exports=function(ei){if("string"!=typeof ei)throw Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof ei+", while checking isHexPrefixed.");return"0x"===ei.slice(0,2)}},98611:function(ei){"use strict";ei.exports=function(ei){return ei!=ei}},20360:function(ei,es,ef){"use strict";var eu=ef(55559),ed=ef(4289),em=ef(98611),eH=ef(29415),ez=ef(23194),eV=eu(eH(),Number);ed(eV,{getPolyfill:eH,implementation:em,shim:ez}),ei.exports=eV},29415:function(ei,es,ef){"use strict";var eu=ef(98611);ei.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:eu}},23194:function(ei,es,ef){"use strict";var eu=ef(4289),ed=ef(29415);ei.exports=function(){var ei=ed();return eu(Number,{isNaN:ei},{isNaN:function(){return Number.isNaN!==ei}}),ei}},85692:function(ei,es,ef){"use strict";var eu=ef(94029),ed=ef(63083),em=ef(21924),eH=em("Object.prototype.toString"),ez=ef(96410)(),eV=ef(27296),eM="undefined"==typeof globalThis?ef.g:globalThis,eg=ed(),eL=em("Array.prototype.indexOf",!0)||function(ei,es){for(var ef=0;ef-1)}},31198:function(ei,es,ef){"use strict";let eu=ef(64667).v4,ed=ef(17741),em=function(ei,es){if(!(this instanceof em))return new em(ei,es);es||(es={}),this.options={reviver:void 0!==es.reviver?es.reviver:null,replacer:void 0!==es.replacer?es.replacer:null,generator:void 0!==es.generator?es.generator:function(){return eu()},version:void 0!==es.version?es.version:2,notificationIdNull:"boolean"==typeof es.notificationIdNull&&es.notificationIdNull},this.callServer=ei};ei.exports=em,em.prototype.request=function(ei,es,ef,eu){let em;let eH=this,ez=null,eV=Array.isArray(ei)&&"function"==typeof es;if(1===this.options.version&&eV)throw TypeError("JSON-RPC 1.0 does not support batching");let eM=!eV&&ei&&"object"==typeof ei&&"function"==typeof es;if(eV||eM)eu=es,ez=ei;else{"function"==typeof ef&&(eu=ef,ef=void 0);let em="function"==typeof eu;try{ez=ed(ei,es,ef,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(ei){if(em)return eu(ei);throw ei}if(!em)return ez}try{em=JSON.stringify(ez,this.options.replacer)}catch(ei){return eu(ei)}return this.callServer(em,function(ei,es){eH._parseResponse(ei,es,eu)}),ez},em.prototype._parseResponse=function(ei,es,ef){let eu;if(ei){ef(ei);return}if(!es)return ef();try{eu=JSON.parse(es,this.options.reviver)}catch(ei){return ef(ei)}if(3===ef.length){if(!Array.isArray(eu))return ef(null,eu.error,eu.result);{let ei=function(ei){return void 0!==ei.error},es=function(es){return!ei(es)};return ef(null,eu.filter(ei),eu.filter(es))}}ef(null,eu)}},17741:function(ei,es,ef){"use strict";let eu=ef(64667).v4,ed=function(ei,es,ef,ed){if("string"!=typeof ei)throw TypeError(ei+" must be a string");ed=ed||{};let em="number"==typeof ed.version?ed.version:2;if(1!==em&&2!==em)throw TypeError(em+" must be 1 or 2");let eH={method:ei};if(2===em&&(eH.jsonrpc="2.0"),es){if("object"!=typeof es&&!Array.isArray(es))throw TypeError(es+" must be an object, array or omitted");eH.params=es}if(void 0===ef){let ei="function"==typeof ed.generator?ed.generator:function(){return eu()};eH.id=ei(eH,ed)}else 2===em&&null===ef?ed.notificationIdNull&&(eH.id=null):eH.id=ef;return eH};ei.exports=ed},64667:function(ei,es,ef){"use strict";ef.d(es,{v4:function(){return eL}});var eu,ed=new Uint8Array(16);function em(){if(!eu&&!(eu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return eu(ed)}for(var eH=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ez=function(ei){return"string"==typeof ei&&eH.test(ei)},eV=[],eM=0;eM<256;++eM)eV.push((eM+256).toString(16).substr(1));var eg=function(ei){var es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,ef=(eV[ei[es+0]]+eV[ei[es+1]]+eV[ei[es+2]]+eV[ei[es+3]]+"-"+eV[ei[es+4]]+eV[ei[es+5]]+"-"+eV[ei[es+6]]+eV[ei[es+7]]+"-"+eV[ei[es+8]]+eV[ei[es+9]]+"-"+eV[ei[es+10]]+eV[ei[es+11]]+eV[ei[es+12]]+eV[ei[es+13]]+eV[ei[es+14]]+eV[ei[es+15]]).toLowerCase();if(!ez(ef))throw TypeError("Stringified UUID is invalid");return ef},eL=function(ei,es,ef){var eu=(ei=ei||{}).random||(ei.rng||em)();if(eu[6]=15&eu[6]|64,eu[8]=63&eu[8]|128,es){ef=ef||0;for(var ed=0;ed<16;++ed)es[ef+ed]=eu[ed];return es}return eg(eu)}},91094:function(ei,es,ef){var eu,ed=ef(83454);!function(){"use strict";var em="input is invalid type",eH="finalize already called",ez="object"==typeof window,eV=ez?window:{};eV.JS_SHA3_NO_WINDOW&&(ez=!1);var eM=!ez&&"object"==typeof self;!eV.JS_SHA3_NO_NODE_JS&&"object"==typeof ed&&ed.versions&&ed.versions.node?eV=ef.g:eM&&(eV=self);var eg=!eV.JS_SHA3_NO_COMMON_JS&&ei.exports,eL=ef.amdO,eb=!eV.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ey="0123456789abcdef".split(""),eC=[31,7936,2031616,520093696],ex=[4,1024,262144,67108864],ew=[1,256,65536,16777216],eN=[6,1536,393216,100663296],eS=[0,8,16,24],eA=[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],e_=[224,256,384,512],eE=[128,256],eP=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136};(eV.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ei){return"[object Array]"===Object.prototype.toString.call(ei)}),eb&&(eV.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ei){return"object"==typeof ei&&ei.buffer&&ei.buffer.constructor===ArrayBuffer});for(var eT=function(ei,es,ef){return function(eu){return new eY(ei,es,ei).update(eu)[ef]()}},eI=function(ei,es,ef){return function(eu,ed){return new eY(ei,es,ed).update(eu)[ef]()}},eR=function(ei,es,ef){return function(es,eu,ed,em){return eU["cshake"+ei].update(es,eu,ed,em)[ef]()}},eO=function(ei,es,ef){return function(es,eu,ed,em){return eU["kmac"+ei].update(es,eu,ed,em)[ef]()}},ej=function(ei,es,ef,eu){for(var ed=0;ed>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ef>>5,this.extraBytes=(31&ef)>>3;for(var eu=0;eu<50;++eu)this.s[eu]=0}function eX(ei,es,ef){eY.call(this,ei,es,ef)}eY.prototype.update=function(ei){if(this.finalized)throw Error(eH);var es,ef=typeof ei;if("string"!==ef){if("object"===ef){if(null===ei)throw Error(em);if(eb&&ei.constructor===ArrayBuffer)ei=new Uint8Array(ei);else if(!Array.isArray(ei)&&(!eb||!ArrayBuffer.isView(ei)))throw Error(em)}else throw Error(em);es=!0}for(var eu,ed,ez=this.blocks,eV=this.byteCount,eM=ei.length,eg=this.blockCount,eL=0,ey=this.s;eL>2]|=ei[eL]<>2]|=ed<>2]|=(192|ed>>6)<>2]|=(128|63&ed)<=57344?(ez[eu>>2]|=(224|ed>>12)<>2]|=(128|ed>>6&63)<>2]|=(128|63&ed)<>2]|=(240|ed>>18)<>2]|=(128|ed>>12&63)<>2]|=(128|ed>>6&63)<>2]|=(128|63&ed)<=eV){for(this.start=eu-eV,this.block=ez[eg],eu=0;eu>=8,ef=255&ei;ef>0;)ed.unshift(ef),ei>>=8,ef=255&ei,++eu;return es?ed.push(eu):ed.unshift(eu),this.update(ed),ed.length},eY.prototype.encodeString=function(ei){var es,ef=typeof ei;if("string"!==ef){if("object"===ef){if(null===ei)throw Error(em);if(eb&&ei.constructor===ArrayBuffer)ei=new Uint8Array(ei);else if(!Array.isArray(ei)&&(!eb||!ArrayBuffer.isView(ei)))throw Error(em)}else throw Error(em);es=!0}var eu=0,ed=ei.length;if(es)eu=ed;else for(var eH=0;eH=57344?eu+=3:(ez=65536+((1023&ez)<<10|1023&ei.charCodeAt(++eH)),eu+=4)}return eu+=this.encode(8*eu),this.update(ei),eu},eY.prototype.bytepad=function(ei,es){for(var ef=this.encode(es),eu=0;eu>2]|=this.padding[3&es],this.lastByteIndex===this.byteCount)for(es=1,ei[0]=ei[ef];es>4&15]+ey[15&ei]+ey[ei>>12&15]+ey[ei>>8&15]+ey[ei>>20&15]+ey[ei>>16&15]+ey[ei>>28&15]+ey[ei>>24&15];eH%es==0&&(eQ(ef),em=0)}return ed&&(ez+=ey[(ei=ef[em])>>4&15]+ey[15&ei],ed>1&&(ez+=ey[ei>>12&15]+ey[ei>>8&15]),ed>2&&(ez+=ey[ei>>20&15]+ey[ei>>16&15])),ez},eY.prototype.arrayBuffer=function(){this.finalize();var ei,es=this.blockCount,ef=this.s,eu=this.outputBlocks,ed=this.extraBytes,em=0,eH=0,ez=this.outputBits>>3;ei=new ArrayBuffer(ed?eu+1<<2:ez);for(var eV=new Uint32Array(ei);eH>8&255,eV[ei+2]=es>>16&255,eV[ei+3]=es>>24&255;ez%ef==0&&eQ(eu)}return em&&(ei=ez<<2,es=eu[eH],eV[ei]=255&es,em>1&&(eV[ei+1]=es>>8&255),em>2&&(eV[ei+2]=es>>16&255)),eV},eX.prototype=new eY,eX.prototype.finalize=function(){return this.encode(this.outputBits,!0),eY.prototype.finalize.call(this)};var eQ=function(ei){var es,ef,eu,ed,em,eH,ez,eV,eM,eg,eL,eb,ey,eC,ex,ew,eN,eS,e_,eE,eP,eB,eT,eI,eR,eO,ej,eD,eF,eU,eq,eZ,eG,eW,eK,e$,eJ,eY,eX,eQ,e1,e2,e4,e3,e6,e0,e8,e5,e7,e9,cc,ci,co,cs,cf,cu,cd,cm,cH,cz,cV,cM,cg;for(eu=0;eu<48;eu+=2)ed=ei[0]^ei[10]^ei[20]^ei[30]^ei[40],em=ei[1]^ei[11]^ei[21]^ei[31]^ei[41],eH=ei[2]^ei[12]^ei[22]^ei[32]^ei[42],ez=ei[3]^ei[13]^ei[23]^ei[33]^ei[43],eV=ei[4]^ei[14]^ei[24]^ei[34]^ei[44],eM=ei[5]^ei[15]^ei[25]^ei[35]^ei[45],eg=ei[6]^ei[16]^ei[26]^ei[36]^ei[46],eL=ei[7]^ei[17]^ei[27]^ei[37]^ei[47],eb=ei[8]^ei[18]^ei[28]^ei[38]^ei[48],ey=ei[9]^ei[19]^ei[29]^ei[39]^ei[49],es=eb^(eH<<1|ez>>>31),ef=ey^(ez<<1|eH>>>31),ei[0]^=es,ei[1]^=ef,ei[10]^=es,ei[11]^=ef,ei[20]^=es,ei[21]^=ef,ei[30]^=es,ei[31]^=ef,ei[40]^=es,ei[41]^=ef,es=ed^(eV<<1|eM>>>31),ef=em^(eM<<1|eV>>>31),ei[2]^=es,ei[3]^=ef,ei[12]^=es,ei[13]^=ef,ei[22]^=es,ei[23]^=ef,ei[32]^=es,ei[33]^=ef,ei[42]^=es,ei[43]^=ef,es=eH^(eg<<1|eL>>>31),ef=ez^(eL<<1|eg>>>31),ei[4]^=es,ei[5]^=ef,ei[14]^=es,ei[15]^=ef,ei[24]^=es,ei[25]^=ef,ei[34]^=es,ei[35]^=ef,ei[44]^=es,ei[45]^=ef,es=eV^(eb<<1|ey>>>31),ef=eM^(ey<<1|eb>>>31),ei[6]^=es,ei[7]^=ef,ei[16]^=es,ei[17]^=ef,ei[26]^=es,ei[27]^=ef,ei[36]^=es,ei[37]^=ef,ei[46]^=es,ei[47]^=ef,es=eg^(ed<<1|em>>>31),ef=eL^(em<<1|ed>>>31),ei[8]^=es,ei[9]^=ef,ei[18]^=es,ei[19]^=ef,ei[28]^=es,ei[29]^=ef,ei[38]^=es,ei[39]^=ef,ei[48]^=es,ei[49]^=ef,eC=ei[0],ex=ei[1],e0=ei[11]<<4|ei[10]>>>28,e8=ei[10]<<4|ei[11]>>>28,eD=ei[20]<<3|ei[21]>>>29,eF=ei[21]<<3|ei[20]>>>29,cz=ei[31]<<9|ei[30]>>>23,cV=ei[30]<<9|ei[31]>>>23,e2=ei[40]<<18|ei[41]>>>14,e4=ei[41]<<18|ei[40]>>>14,eW=ei[2]<<1|ei[3]>>>31,eK=ei[3]<<1|ei[2]>>>31,ew=ei[13]<<12|ei[12]>>>20,eN=ei[12]<<12|ei[13]>>>20,e5=ei[22]<<10|ei[23]>>>22,e7=ei[23]<<10|ei[22]>>>22,eU=ei[33]<<13|ei[32]>>>19,eq=ei[32]<<13|ei[33]>>>19,cM=ei[42]<<2|ei[43]>>>30,cg=ei[43]<<2|ei[42]>>>30,cs=ei[5]<<30|ei[4]>>>2,cf=ei[4]<<30|ei[5]>>>2,e$=ei[14]<<6|ei[15]>>>26,eJ=ei[15]<<6|ei[14]>>>26,eS=ei[25]<<11|ei[24]>>>21,e_=ei[24]<<11|ei[25]>>>21,e9=ei[34]<<15|ei[35]>>>17,cc=ei[35]<<15|ei[34]>>>17,eZ=ei[45]<<29|ei[44]>>>3,eG=ei[44]<<29|ei[45]>>>3,eI=ei[6]<<28|ei[7]>>>4,eR=ei[7]<<28|ei[6]>>>4,cu=ei[17]<<23|ei[16]>>>9,cd=ei[16]<<23|ei[17]>>>9,eY=ei[26]<<25|ei[27]>>>7,eX=ei[27]<<25|ei[26]>>>7,eE=ei[36]<<21|ei[37]>>>11,eP=ei[37]<<21|ei[36]>>>11,ci=ei[47]<<24|ei[46]>>>8,co=ei[46]<<24|ei[47]>>>8,e3=ei[8]<<27|ei[9]>>>5,e6=ei[9]<<27|ei[8]>>>5,eO=ei[18]<<20|ei[19]>>>12,ej=ei[19]<<20|ei[18]>>>12,cm=ei[29]<<7|ei[28]>>>25,cH=ei[28]<<7|ei[29]>>>25,eQ=ei[38]<<8|ei[39]>>>24,e1=ei[39]<<8|ei[38]>>>24,eB=ei[48]<<14|ei[49]>>>18,eT=ei[49]<<14|ei[48]>>>18,ei[0]=eC^~ew&eS,ei[1]=ex^~eN&e_,ei[10]=eI^~eO&eD,ei[11]=eR^~ej&eF,ei[20]=eW^~e$&eY,ei[21]=eK^~eJ&eX,ei[30]=e3^~e0&e5,ei[31]=e6^~e8&e7,ei[40]=cs^~cu&cm,ei[41]=cf^~cd&cH,ei[2]=ew^~eS&eE,ei[3]=eN^~e_&eP,ei[12]=eO^~eD&eU,ei[13]=ej^~eF&eq,ei[22]=e$^~eY&eQ,ei[23]=eJ^~eX&e1,ei[32]=e0^~e5&e9,ei[33]=e8^~e7&cc,ei[42]=cu^~cm&cz,ei[43]=cd^~cH&cV,ei[4]=eS^~eE&eB,ei[5]=e_^~eP&eT,ei[14]=eD^~eU&eZ,ei[15]=eF^~eq&eG,ei[24]=eY^~eQ&e2,ei[25]=eX^~e1&e4,ei[34]=e5^~e9&ci,ei[35]=e7^~cc&co,ei[44]=cm^~cz&cM,ei[45]=cH^~cV&cg,ei[6]=eE^~eB&eC,ei[7]=eP^~eT&ex,ei[16]=eU^~eZ&eI,ei[17]=eq^~eG&eR,ei[26]=eQ^~e2&eW,ei[27]=e1^~e4&eK,ei[36]=e9^~ci&e3,ei[37]=cc^~co&e6,ei[46]=cz^~cM&cs,ei[47]=cV^~cg&cf,ei[8]=eB^~eC&ew,ei[9]=eT^~ex&eN,ei[18]=eZ^~eI&eO,ei[19]=eG^~eR&ej,ei[28]=e2^~eW&e$,ei[29]=e4^~eK&eJ,ei[38]=ci^~e3&e0,ei[39]=co^~e6&e8,ei[48]=cM^~cs&cu,ei[49]=cg^~cf&cd,ei[0]^=eA[eu],ei[1]^=eA[eu+1]};if(eg)ei.exports=eU;else{for(eZ=0;eZclass es extends ed{constructor(es,ef,eu,ed,em){super(em),this._rate=es,this._capacity=ef,this._delimitedSuffix=eu,this._hashBitLength=ed,this._options=em,this._state=new ei,this._state.initialize(es,ef),this._finalized=!1}_transform(ei,es,ef){let eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)}_flush(ei){let es=null;try{this.push(this.digest())}catch(ei){es=ei}ei(es)}update(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Digest already called");return eu.isBuffer(ei)||(ei=eu.from(ei,es)),this._state.absorb(ei),this}digest(ei){if(this._finalized)throw Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let es=this._state.squeeze(this._hashBitLength/8);return void 0!==ei&&(es=es.toString(ei)),this._resetState(),es}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let ei=new es(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(ei._state),ei._finalized=this._finalized,ei}}},5675:function(ei,es,ef){var eu=ef(48764).Buffer;let{Transform:ed}=ef(88473);ei.exports=ei=>class es extends ed{constructor(es,ef,eu,ed){super(ed),this._rate=es,this._capacity=ef,this._delimitedSuffix=eu,this._options=ed,this._state=new ei,this._state.initialize(es,ef),this._finalized=!1}_transform(ei,es,ef){let eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)}_flush(){}_read(ei){this.push(this.squeeze(ei))}update(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Squeeze already called");return eu.isBuffer(ei)||(ei=eu.from(ei,es)),this._state.absorb(ei),this}squeeze(ei,es){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let ef=this._state.squeeze(ei);return void 0!==es&&(ef=ef.toString(es)),ef}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let ei=new es(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(ei._state),ei._finalized=this._finalized,ei}}},34040:function(ei,es){let ef=[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];es.p1600=function(ei){for(let es=0;es<24;++es){let eu=ei[0]^ei[10]^ei[20]^ei[30]^ei[40],ed=ei[1]^ei[11]^ei[21]^ei[31]^ei[41],em=ei[2]^ei[12]^ei[22]^ei[32]^ei[42],eH=ei[3]^ei[13]^ei[23]^ei[33]^ei[43],ez=ei[4]^ei[14]^ei[24]^ei[34]^ei[44],eV=ei[5]^ei[15]^ei[25]^ei[35]^ei[45],eM=ei[6]^ei[16]^ei[26]^ei[36]^ei[46],eg=ei[7]^ei[17]^ei[27]^ei[37]^ei[47],eL=ei[8]^ei[18]^ei[28]^ei[38]^ei[48],eb=ei[9]^ei[19]^ei[29]^ei[39]^ei[49],ey=eL^(em<<1|eH>>>31),eC=eb^(eH<<1|em>>>31),ex=ei[0]^ey,ew=ei[1]^eC,eN=ei[10]^ey,eS=ei[11]^eC,eA=ei[20]^ey,e_=ei[21]^eC,eE=ei[30]^ey,eP=ei[31]^eC,eB=ei[40]^ey,eT=ei[41]^eC;ey=eu^(ez<<1|eV>>>31),eC=ed^(eV<<1|ez>>>31);let eI=ei[2]^ey,eR=ei[3]^eC,eO=ei[12]^ey,ej=ei[13]^eC,eD=ei[22]^ey,eF=ei[23]^eC,eU=ei[32]^ey,eq=ei[33]^eC,eZ=ei[42]^ey,eG=ei[43]^eC;ey=em^(eM<<1|eg>>>31),eC=eH^(eg<<1|eM>>>31);let eW=ei[4]^ey,eK=ei[5]^eC,e$=ei[14]^ey,eJ=ei[15]^eC,eY=ei[24]^ey,eX=ei[25]^eC,eQ=ei[34]^ey,e1=ei[35]^eC,e2=ei[44]^ey,e4=ei[45]^eC;ey=ez^(eL<<1|eb>>>31),eC=eV^(eb<<1|eL>>>31);let e3=ei[6]^ey,e6=ei[7]^eC,e0=ei[16]^ey,e8=ei[17]^eC,e5=ei[26]^ey,e7=ei[27]^eC,e9=ei[36]^ey,cc=ei[37]^eC,ci=ei[46]^ey,co=ei[47]^eC;ey=eM^(eu<<1|ed>>>31),eC=eg^(ed<<1|eu>>>31);let cs=ei[8]^ey,cf=ei[9]^eC,cu=ei[18]^ey,cd=ei[19]^eC,cm=ei[28]^ey,cH=ei[29]^eC,cz=ei[38]^ey,cV=ei[39]^eC,cM=ei[48]^ey,cg=ei[49]^eC,cL=ex,cy=ew,cC=eS<<4|eN>>>28,cx=eN<<4|eS>>>28,cw=eA<<3|e_>>>29,ck=e_<<3|eA>>>29,cN=eP<<9|eE>>>23,cS=eE<<9|eP>>>23,cA=eB<<18|eT>>>14,c_=eT<<18|eB>>>14,cE=eI<<1|eR>>>31,cP=eR<<1|eI>>>31,cB=ej<<12|eO>>>20,cT=eO<<12|ej>>>20,cI=eD<<10|eF>>>22,cR=eF<<10|eD>>>22,cO=eq<<13|eU>>>19,cj=eU<<13|eq>>>19,cD=eZ<<2|eG>>>30,cF=eG<<2|eZ>>>30,cU=eK<<30|eW>>>2,cq=eW<<30|eK>>>2,cZ=e$<<6|eJ>>>26,cG=eJ<<6|e$>>>26,cW=eX<<11|eY>>>21,cK=eY<<11|eX>>>21,c$=eQ<<15|e1>>>17,cJ=e1<<15|eQ>>>17,cY=e4<<29|e2>>>3,cX=e2<<29|e4>>>3,cQ=e3<<28|e6>>>4,tc=e6<<28|e3>>>4,ta=e8<<23|e0>>>9,tf=e0<<23|e8>>>9,tu=e5<<25|e7>>>7,td=e7<<25|e5>>>7,tm=e9<<21|cc>>>11,tp=cc<<21|e9>>>11,tH=co<<24|ci>>>8,tz=ci<<24|co>>>8,tV=cs<<27|cf>>>5,tv=cf<<27|cs>>>5,tM=cu<<20|cd>>>12,tg=cd<<20|cu>>>12,tL=cH<<7|cm>>>25,tb=cm<<7|cH>>>25,tC=cz<<8|cV>>>24,tw=cV<<8|cz>>>24,tN=cM<<14|cg>>>18,tS=cg<<14|cM>>>18;ei[0]=cL^~cB&cW,ei[1]=cy^~cT&cK,ei[10]=cQ^~tM&cw,ei[11]=tc^~tg&ck,ei[20]=cE^~cZ&tu,ei[21]=cP^~cG&td,ei[30]=tV^~cC&cI,ei[31]=tv^~cx&cR,ei[40]=cU^~ta&tL,ei[41]=cq^~tf&tb,ei[2]=cB^~cW&tm,ei[3]=cT^~cK&tp,ei[12]=tM^~cw&cO,ei[13]=tg^~ck&cj,ei[22]=cZ^~tu&tC,ei[23]=cG^~td&tw,ei[32]=cC^~cI&c$,ei[33]=cx^~cR&cJ,ei[42]=ta^~tL&cN,ei[43]=tf^~tb&cS,ei[4]=cW^~tm&tN,ei[5]=cK^~tp&tS,ei[14]=cw^~cO&cY,ei[15]=ck^~cj&cX,ei[24]=tu^~tC&cA,ei[25]=td^~tw&c_,ei[34]=cI^~c$&tH,ei[35]=cR^~cJ&tz,ei[44]=tL^~cN&cD,ei[45]=tb^~cS&cF,ei[6]=tm^~tN&cL,ei[7]=tp^~tS&cy,ei[16]=cO^~cY&cQ,ei[17]=cj^~cX&tc,ei[26]=tC^~cA&cE,ei[27]=tw^~c_&cP,ei[36]=c$^~tH&tV,ei[37]=cJ^~tz&tv,ei[46]=cN^~cD&cU,ei[47]=cS^~cF&cq,ei[8]=tN^~cL&cB,ei[9]=tS^~cy&cT,ei[18]=cY^~cQ&tM,ei[19]=cX^~tc&tg,ei[28]=cA^~cE&cZ,ei[29]=c_^~cP&cG,ei[38]=tH^~tV&cC,ei[39]=tz^~tv&cx,ei[48]=cD^~cU&ta,ei[49]=cF^~cq&tf,ei[0]^=ef[2*es],ei[1]^=ef[2*es+1]}}},79653:function(ei,es,ef){var eu=ef(48764).Buffer;let ed=ef(34040);function em(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}em.prototype.initialize=function(ei,es){for(let ei=0;ei<50;++ei)this.state[ei]=0;this.blockSize=ei/8,this.count=0,this.squeezing=!1},em.prototype.absorb=function(ei){for(let es=0;es>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(ed.p1600(this.state),this.count=0);return es},em.prototype.copy=function(ei){for(let es=0;es<50;++es)ei.state[es]=this.state[es];ei.blockSize=this.blockSize,ei.count=this.count,ei.squeezing=this.squeezing},ei.exports=em},62318:function(ei,es,ef){"use strict";var eu=ef(35717),ed=ef(3349),em=ef(89509).Buffer,eH=Array(16);function ez(){ed.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function eV(ei,es){return ei<>>32-es}function eM(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&ef|~es&eu)+ed+em|0,eH)+es|0}function eg(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&eu|ef&~eu)+ed+em|0,eH)+es|0}function eL(ei,es,ef,eu,ed,em,eH){return eV(ei+(es^ef^eu)+ed+em|0,eH)+es|0}function eb(ei,es,ef,eu,ed,em,eH){return eV(ei+(ef^(es|~eu))+ed+em|0,eH)+es|0}eu(ez,ed),ez.prototype._update=function(){for(var ei=eH,es=0;es<16;++es)ei[es]=this._block.readInt32LE(4*es);var ef=this._a,eu=this._b,ed=this._c,em=this._d;ef=eM(ef,eu,ed,em,ei[0],3614090360,7),em=eM(em,ef,eu,ed,ei[1],3905402710,12),ed=eM(ed,em,ef,eu,ei[2],606105819,17),eu=eM(eu,ed,em,ef,ei[3],3250441966,22),ef=eM(ef,eu,ed,em,ei[4],4118548399,7),em=eM(em,ef,eu,ed,ei[5],1200080426,12),ed=eM(ed,em,ef,eu,ei[6],2821735955,17),eu=eM(eu,ed,em,ef,ei[7],4249261313,22),ef=eM(ef,eu,ed,em,ei[8],1770035416,7),em=eM(em,ef,eu,ed,ei[9],2336552879,12),ed=eM(ed,em,ef,eu,ei[10],4294925233,17),eu=eM(eu,ed,em,ef,ei[11],2304563134,22),ef=eM(ef,eu,ed,em,ei[12],1804603682,7),em=eM(em,ef,eu,ed,ei[13],4254626195,12),ed=eM(ed,em,ef,eu,ei[14],2792965006,17),eu=eM(eu,ed,em,ef,ei[15],1236535329,22),ef=eg(ef,eu,ed,em,ei[1],4129170786,5),em=eg(em,ef,eu,ed,ei[6],3225465664,9),ed=eg(ed,em,ef,eu,ei[11],643717713,14),eu=eg(eu,ed,em,ef,ei[0],3921069994,20),ef=eg(ef,eu,ed,em,ei[5],3593408605,5),em=eg(em,ef,eu,ed,ei[10],38016083,9),ed=eg(ed,em,ef,eu,ei[15],3634488961,14),eu=eg(eu,ed,em,ef,ei[4],3889429448,20),ef=eg(ef,eu,ed,em,ei[9],568446438,5),em=eg(em,ef,eu,ed,ei[14],3275163606,9),ed=eg(ed,em,ef,eu,ei[3],4107603335,14),eu=eg(eu,ed,em,ef,ei[8],1163531501,20),ef=eg(ef,eu,ed,em,ei[13],2850285829,5),em=eg(em,ef,eu,ed,ei[2],4243563512,9),ed=eg(ed,em,ef,eu,ei[7],1735328473,14),eu=eg(eu,ed,em,ef,ei[12],2368359562,20),ef=eL(ef,eu,ed,em,ei[5],4294588738,4),em=eL(em,ef,eu,ed,ei[8],2272392833,11),ed=eL(ed,em,ef,eu,ei[11],1839030562,16),eu=eL(eu,ed,em,ef,ei[14],4259657740,23),ef=eL(ef,eu,ed,em,ei[1],2763975236,4),em=eL(em,ef,eu,ed,ei[4],1272893353,11),ed=eL(ed,em,ef,eu,ei[7],4139469664,16),eu=eL(eu,ed,em,ef,ei[10],3200236656,23),ef=eL(ef,eu,ed,em,ei[13],681279174,4),em=eL(em,ef,eu,ed,ei[0],3936430074,11),ed=eL(ed,em,ef,eu,ei[3],3572445317,16),eu=eL(eu,ed,em,ef,ei[6],76029189,23),ef=eL(ef,eu,ed,em,ei[9],3654602809,4),em=eL(em,ef,eu,ed,ei[12],3873151461,11),ed=eL(ed,em,ef,eu,ei[15],530742520,16),eu=eL(eu,ed,em,ef,ei[2],3299628645,23),ef=eb(ef,eu,ed,em,ei[0],4096336452,6),em=eb(em,ef,eu,ed,ei[7],1126891415,10),ed=eb(ed,em,ef,eu,ei[14],2878612391,15),eu=eb(eu,ed,em,ef,ei[5],4237533241,21),ef=eb(ef,eu,ed,em,ei[12],1700485571,6),em=eb(em,ef,eu,ed,ei[3],2399980690,10),ed=eb(ed,em,ef,eu,ei[10],4293915773,15),eu=eb(eu,ed,em,ef,ei[1],2240044497,21),ef=eb(ef,eu,ed,em,ei[8],1873313359,6),em=eb(em,ef,eu,ed,ei[15],4264355552,10),ed=eb(ed,em,ef,eu,ei[6],2734768916,15),eu=eb(eu,ed,em,ef,ei[13],1309151649,21),ef=eb(ef,eu,ed,em,ei[4],4149444226,6),em=eb(em,ef,eu,ed,ei[11],3174756917,10),ed=eb(ed,em,ef,eu,ei[2],718787259,15),eu=eb(eu,ed,em,ef,ei[9],3951481745,21),this._a=this._a+ef|0,this._b=this._b+eu|0,this._c=this._c+ed|0,this._d=this._d+em|0},ez.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 ei=em.allocUnsafe(16);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei},ei.exports=ez},79746:function(ei){function es(ei,es){if(!ei)throw Error(es||"Assertion failed")}ei.exports=es,es.equal=function(ei,es,ef){if(ei!=es)throw Error(ef||"Assertion failed: "+ei+" != "+es)}},34504:function(ei,es){"use strict";var ef=es;function eu(ei,es){if(Array.isArray(ei))return ei.slice();if(!ei)return[];var ef=[];if("string"!=typeof ei){for(var eu=0;eu>8,eH=255&ed;em?ef.push(em,eH):ef.push(eH)}return ef}function ed(ei){return 1===ei.length?"0"+ei:ei}function em(ei){for(var es="",ef=0;efei.toUpperCase(),ey=(0,em.useMemo)(()=>{if(eg)return[];let ei=eV.pathname.split("/").filter(ei=>""!==ei).map((ei,ed,em)=>{let eH=null==es?void 0:es[ei];if(ed===em.length-1){let[,es]=eV.asPath.split("#"),ed=ef||(eH?"object"==typeof eH?eH[es]:eH:eb(ei));return(0,eu.jsx)("span",{children:ed},ei)}let ez=eH||eb(ei);return(0,eu.jsx)(eM(),{href:String("../").repeat(em.length-(ed+1))+ei,children:ez},ei)});return ed&&ei.unshift((0,eu.jsx)(eM(),{href:"/",children:(null==es?void 0:es["/"])||"HOME"},"home")),ei},[eV.pathname,eV.asPath,ef,es,eg,ed]);return eg?null:(0,eu.jsx)(eL,{navLinks:ey,...ez})}var eL=(0,ed.ZP)(ez.aG).withConfig({displayName:"cmp___StyledBreadcrumb",componentId:"sc-1pse81j-0"})({paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 768px)":{paddingLeft:"4rem",paddingRight:"4rem"}})},87531:function(ei,es,ef){"use strict";ef.d(es,{Z:function(){return em}});var eu=ef(19521);let ed=eu.ZP.div.withConfig({displayName:"styles__StyledContainer",componentId:"sc-ex4pya-0"})(["",""],ei=>{let{theme:es}=ei;return(0,eu.iv)([""," box-sizing:border-box;width:100%;margin:0 auto;max-width:","rem;"],{paddingLeft:"1.5rem",paddingRight:"1.5rem","@media (min-width: 768px)":{paddingLeft:"4rem",paddingRight:"4rem"}},es.breakpoint.xxl+12.5)});var em=ed},36470:function(ei,es,ef){"use strict";ef.d(es,{WE:function(){return ez},mr:function(){return eV}});var eu=ef(85893),ed=ef(67294),em=ef(48847);let eH=(0,ed.createContext)([em.E3,()=>null]);function ez(ei){let{children:es}=ei,[ef,ez]=(0,ed.useReducer)(em.I6,em.E3);return(0,eu.jsx)(eH.Provider,{value:[ef,ez],children:es})}function eV(){return(0,ed.useContext)(eH)}},65526:function(ei,es,ef){"use strict";ef.d(es,{Y:function(){return ez}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(22733);class ez{async getAll(){try{let ei=await eu.aggregate.Get({address:this.account.address,keys:[this.key]});return this.parseAggregate(ei)}catch(ei){return[]}}async get(ei){let es=await this.getAll();return es.find(es=>es.id===ei)}async add(ei,es){ei=Array.isArray(ei)?ei:[ei],ei=await this.parseDomains(ei,es);try{if(!ei.length)return[];let es=ei.reduce((ei,es)=>{let{name:ef,ref:eu,target:ed,programType:eH}=es,ez={message_id:eu,programType:eH,type:ed};return ed===em.vs.Program&&(ez.programType=es.programType||em.py.Instance),ei[ef]=ez,ei},{}),ef=await eu.aggregate.Publish({account:this.account,key:this.key,channel:this.channel,content:es});return this.parseNewAggregate(ef)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;let es={[ei]:null};try{await eu.aggregate.Publish({account:this.account,key:this.key,channel:this.channel,content:es})}catch(ei){throw ed.Z.RequestFailed(ei)}}async checkStatus(ei){let es=await fetch("https://api.dns.public.aleph.sh/domain/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ei.name,owner:this.account.address,target:ei.target})}),ef=await es.json();return ef}async parseDomains(ei){let es=!(arguments.length>1)||void 0===arguments[1]||arguments[1];ei=ez.addManySchema.parse(ei);let ef=await this.getAll(),eu=new Set(ef.map(ei=>ei.name));return es?ei.map(ei=>{if(!eu.has(ei.name))return ei;throw Error("Domain name already used by another resource: ".concat(ei.name))}):ei.filter(ei=>!eu.has(ei.name))}parseAggregate(ei){let es=ei[this.key];return this.parseAggregateItems(es)}parseNewAggregate(ei){let es=ei.content.content;return this.parseAggregateItems(es)}parseAggregateItems(ei){return Object.entries(ei).filter(ei=>{let[,es]=ei;return null!==es}).map(ei=>{let[es,ef]=ei;return this.parseAggregateItem(es,ef)})}parseAggregateItem(ei,es){let{message_id:ef,type:eu}=es,ed={type:em.py.Domain,id:ei,name:ei,target:eu,ref:ef,confirmed:!0};return eu===em.vs.Program&&(ed.programType=es.programType||em.py.Instance),ed}constructor(ei,es=em.T4,ef=em.fM){this.account=ei,this.key=es,this.channel=ef}}(()=>{ez.addSchema=eH.CJ})(),(()=>{ez.addManySchema=eH.I})()},94443:function(ei,es,ef){"use strict";ef.d(es,{E:function(){return em}});var eu=ef(59925),ed=ef(33358);class em{parseEnvVars(ei){if(ei&&0!==ei.length)return Object.fromEntries(ei.map(ei=>{let{name:es,value:ef}=ei;return[es,ef]}))}async parseDomains(ei,es){if(!es||0===es.length)return[];let ef=es.map(es=>({...es,ref:ei}));return this.domainManager.add(ef,!1)}async parseVolumes(ei){if(!ei||0===(ei=Array.isArray(ei)?ei:[ei]).length)return;let es=await this.volumeManager.add(ei),ef=ei.map((ei,ef)=>ei.volumeType===eu.z.New?{...ei,volumeType:eu.z.Existing,refHash:es[ef].id}:ei);return ef.map(ei=>{if(ei.volumeType===eu.z.Persistent){let{mountPath:es,size:ef,name:eu}=ei;return{persistence:"host",mount:es,size_mib:ef,name:eu}}let{refHash:es,mountPath:ef,useLatest:ed=!1}=ei;return{ref:es,mount:ef,use_latest:ed}})}parseSpecs(ei){return{vcpus:ei.cpu,memory:ei.ram}}parseMetadata(){let ei=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Untitled",es=arguments.length>1?arguments[1]:void 0,ef={name:ei};return es&&es.length>0&&(ef.tags=es),ef}constructor(ei,es,ef){this.account=ei,this.volumeManager=es,this.domainManager=ef}}(()=>{em.getExecutableCost=ei=>{let{type:es,isPersistent:ef,specs:em,capabilities:eH={},volumes:ez=[]}=ei;if(!em)return{computeTotalCost:0,volumeTotalCost:0,perVolumeCost:[],totalCost:0};ef=es===ed.py.Instance||ef;let eV=ef?2e3:200,eM=Object.values(eH).reduce((ei,es)=>ei+Number(es),1),eg=eV*em.cpu*eM,eL=es===ed.py.Instance?0:em.storage,{perVolumeCost:eb,totalCost:ey}=eu.l.getCost({volumes:ez,sizeDiscount:eL}),eC=ey+eg;return{computeTotalCost:eg,perVolumeCost:eb,volumeTotalCost:ey,totalCost:eC}}})()},49875:function(ei,es,ef){"use strict";ef.d(es,{u:function(){return eg}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(57492),eV=ef(94443),eM=ef(22733);class eg extends eV.E{async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:ez.MessageType.instance,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:ez.MessageType.instance,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){try{let es=await this.parseInstance(ei),ef=await eu.instance.publish(es),[ed]=await this.parseMessages([ef]);return await this.parseDomains(ed.id,ei.domains),ed}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async checkStatus(ei){let es=await fetch("https://scheduler.api.aleph.sh/api/v0/allocation/".concat(ei.id));if(404===es.status)return;let ef=await es.json();return ef}async parseInstance(ei){ei=eg.addSchema.parse(ei);let{account:es,channel:ef}=this,{envVars:eu,specs:ed,image:em,sshKeys:eH,name:ez,tags:eV}=ei,eM=this.parseEnvVars(eu),eL=this.parseSpecs(ed),eb=this.parseMetadata(ez,eV),ey=await this.parseSSHKeys(eH),eC=await this.parseVolumes(ei.volumes);return{account:es,channel:ef,variables:eM,resources:eL,metadata:eb,image:em,authorized_keys:ey,volumes:eC}}async parseSSHKeys(ei){if(!ei||0===ei.length)return;let es=ei.filter(ei=>ei.isNew&&ei.isSelected);return await this.sshKeyManager.add(es,!1),ei.filter(ei=>ei.isSelected).map(ei=>{let{key:es}=ei;return es})}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>{let ef=ei.content.volumes.reduce((ei,ef)=>ei+("size_mib"in ef?ef.size_mib:es[ef.ref]),0);return{id:ei.item_hash,...ei.content,type:em.py.Instance,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),size:ef,confirmed:!!ei.confirmed}})}constructor(ei,es,ef,eu,ed,eH=em.Dl){super(ei,es,ef),this.account=ei,this.volumeManager=es,this.domainManager=ef,this.sshKeyManager=eu,this.fileManager=ed,this.channel=eH}}(()=>{eg.addSchema=eM.OC})(),(()=>{eg.getCost=ei=>eV.E.getExecutableCost({...ei,type:em.py.Instance})})()},39261:function(ei,es,ef){"use strict";ef.d(es,{L:function(){return eb}});var eu=ef(67572),ed=ef(70714),em=ef(81287),eH=ef(33358),ez=ef(34853),eV=ef(57492),eM=ef(94443),eg=ef(94818),eL=ef(22733);class eb extends eM.E{async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:eV.MessageType.program,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:eV.MessageType.program,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){try{let es=await this.parseProgram(ei);console.log("programMessage",es);let ef=await eu.program.publish(es),[ed]=await this.parseMessages([ef]);return await this.parseDomains(ed.id,ei.domains),ed}catch(ei){throw em.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw em.Z.RequestFailed(ei)}}async download(ei){let es=ei.code.ref,ef=await this.messageManager.get(es),eu=ef.content.item_hash,ed=await fetch("".concat(eH.Sd).concat(eu)),em=await ed.blob();return(0,ez.lm)(em,"VM_".concat(ei.id.slice(-12),".zip"))}async parseCode(ei){if("text"===ei.type)return{entrypoint:"main:app",file:new Blob([ei.text],{type:"text/plain"}),encoding:ed.Encoding.plain};if("file"===ei.type){let es;if(!ei.file)throw Error("Invalid function code file");let ef=ei.file.name;if(ef.endsWith(".zip"))es=ed.Encoding.zip;else if(ef.endsWith(".sqsh"))es=ed.Encoding.squashfs;else throw Error("Invalid function code file");return{entrypoint:ei.entrypoint,file:ei.file,encoding:es}}throw Error("Invalid function code type")}async parseProgram(ei){ei=eb.addSchema.parse(ei);let{account:es,channel:ef}=this,{name:eu,tags:ed,isPersistent:em,envVars:eH,specs:ez}=ei,eV=this.parseEnvVars(eH),{memory:eM,vcpus:eg}=this.parseSpecs(ez),eL=this.parseMetadata(eu,ed),ey=this.parseRuntime(ei.runtime),eC=await this.parseVolumes(ei.volumes),{file:ex,entrypoint:ew,encoding:eN}=await this.parseCode(ei.code);return{account:es,channel:ef,runtime:ey,isPersistent:em,entrypoint:ew,file:ex,variables:eV,memory:eM,vcpus:eg,volumes:eC,metadata:eL,encoding:eN}}parseRuntime(ei){let es=ei.id!==eg.W.Custom?ei.id:ei.custom;return es}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>{let ef=ei.content.volumes.reduce((ei,ef)=>ei+("size_mib"in ef?ef.size_mib:es[ef.ref]),0);return{id:ei.item_hash,...ei.content,type:eH.py.Program,url:(0,ez.DI)(ei),urlVM:"".concat(eH.gC).concat(ei.item_hash),date:(0,ez._3)(ei.time),size:ef,confirmed:!!ei.confirmed}})}constructor(ei,es,ef,eu,ed,em=eH.d1){super(ei,es,ef),this.account=ei,this.volumeManager=es,this.domainManager=ef,this.messageManager=eu,this.fileManager=ed,this.channel=em}}(()=>{eb.addSchema=eL._G})(),(()=>{eb.getCost=ei=>eM.E.getExecutableCost({...ei,type:eH.py.Program})})()},94818:function(ei,es,ef){"use strict";var eu;ef.d(es,{J:function(){return ed},W:function(){return eu}}),function(ei){ei.Runtime1="bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4",ei.Runtime2="bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4 ",ei.Custom="custom"}(eu||(eu={}));let ed={[eu.Runtime1]:{id:eu.Runtime1,name:"Official runtime with Debian 11, Python 3.9 & Node.js 14",dist:"debian"},[eu.Runtime2]:{id:eu.Runtime2,name:"Official min. runtime for binaries x86_64 (Rust, Go, ...)",dist:"debian"},[eu.Custom]:{id:eu.Custom,name:"Custom runtime",dist:"ubuntu"}}},61941:function(ei,es,ef){"use strict";ef.d(es,{X:function(){return eV}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(22733);class eV{async getAll(){try{let ei=await eu.post.Get({addresses:[this.account.address],types:[this.type],channels:[this.channel]});return this.parsePosts(ei.posts)}catch(ei){return[]}}async get(ei){let es=await eu.post.Get({addresses:[this.account.address],types:[this.type],channels:[this.channel],hashes:[ei]}),[ef]=this.parsePosts(es.posts);return ef}async getByValues(ei){let es=await this.getAll();return ei.map(ei=>es.find(es=>es.key===ei))}async add(ei,es){ei=Array.isArray(ei)?ei:[ei],ei=await this.parseSSHKeys(ei,es);try{let es=await Promise.all(ei.map(ei=>{let{key:es,label:ef}=ei;return eu.post.Publish({account:this.account,postType:this.type,channel:this.channel,content:{key:es,label:ef}})}));return this.parseNewPosts(es)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async parseSSHKeys(ei){let es=!(arguments.length>1)||void 0===arguments[1]||arguments[1];ei=eV.addManySchema.parse(ei);let ef=await this.getAll(),eu=new Set(ef.map(ei=>ei.key));return es?ei.map(ei=>{if(!eu.has(ei.key))return ei;throw Error("SSH key already exists on your collection: ".concat(ei.label||ei.key))}):ei.filter(ei=>!eu.has(ei.key))}parsePosts(ei){return ei.map(ei=>this.parsePost(ei,ei.content))}parseNewPosts(ei){return ei.map(ei=>this.parsePost(ei,ei.content.content))}parseNewPost(ei){return this.parsePost(ei,ei.content.content)}parsePost(ei,es){return{type:em.py.SSHKey,id:ei.item_hash,...es,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),confirmed:!!ei.confirmed}}constructor(ei,es=em.Wt,ef=em.GI){this.account=ei,this.type=es,this.channel=ef}}(()=>{eV.addSchema=ez.ve})(),(()=>{eV.addManySchema=ez.K7})()},59925:function(ei,es,ef){"use strict";ef.d(es,{l:function(){return eM},z:function(){return em.lf}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(57492),eV=ef(22733);class eM{static getVolumeSize(ei){if(ei.volumeType===em.lf.New){var es;return(0,eH.Fx)((null==ei?void 0:null===(es=ei.file)||void 0===es?void 0:es.size)||0,{from:"B",to:"MiB"})}return ei.size||0}static getVolumeMiBPrice(ei){return ei.volumeType!==em.lf.New||ei.mountPath?20:1/3}static getPerVolumeCost(ei){let{volumes:es=[],sizeDiscount:ef=0,exclude:eu=[em.lf.Existing]}=ei;return es.map(ei=>{let es=eu.includes(ei.volumeType),ed=this.getVolumeSize(ei)||0,em=this.getVolumeMiBPrice(ei);if(es)return{size:ed,price:0,discount:0,cost:0};let eH=ed;ef>0&&(eH<=ef?(ef-=eH,eH=0):(eH-=ef,ef=0));let ez=ed>0?1-eH/ed:0,eV=ed*em,eM=eH*em;return{size:ed,price:eV,discount:ez,cost:eM}},[])}static getCost(ei){let es=this.getPerVolumeCost(ei),ef=Math.ceil(Object.values(es).reduce((ei,es)=>ei+es.cost,0));return{perVolumeCost:es,totalCost:ef}}async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:ez.MessageType.store,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:ez.MessageType.store,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){ei=Array.isArray(ei)?ei:[ei];let es=this.parseNewVolumes(ei);if(0===es.length)return[];try{let{account:ei,channel:ef}=this,ed=await Promise.all(es.map(async es=>{let{file:ed}=es;return eu.store.Publish({account:ei,channel:ef,fileObject:ed})}));return await this.parseMessages(ed)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async download(ei){ei="string"==typeof ei?ei:ei.id;let es=await fetch("".concat(em.Sd).concat(ei)),ef=await es.blob();return(0,eH.lm)(ef,"Volume_".concat(ei.slice(-12),".sqsh"))}parseNewVolumes(ei){let es=ei.filter(ei=>ei.volumeType===em.lf.New&&!!ei.file);return ei=eM.addManySchema.parse(es),es}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>this.parseMessage(ei,ei.content,es))}parseMessage(ei,es,ef){return{id:ei.item_hash,...es,type:em.py.Volume,volumeType:em.lf.Existing,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),size:ef[ei.item_hash],confirmed:!!ei.confirmed}}constructor(ei,es,ef=em.yk){this.account=ei,this.fileManager=es,this.channel=ef}}(()=>{eM.addSchema=eV.wy})(),(()=>{eM.addManySchema=eV.iq})()},33358:function(ei,es,ef){"use strict";var eu,ed,em;ef.d(es,{Dl:function(){return ey},GI:function(){return eb},K_:function(){return eN},Sd:function(){return ez},T4:function(){return eV},Wt:function(){return eM},d1:function(){return eC},fM:function(){return ex},gC:function(){return eH},lf:function(){return em},py:function(){return eu},sT:function(){return eg},sv:function(){return ew},vs:function(){return ed},yk:function(){return eL}});let eH="https://aleph.sh/vm/",ez="https://api2.aleph.im/api/v0/storage/raw/",eV="domains",eM="ALEPH-SSH",eg="ALEPH-CLOUDSOLUTIONS",eL=eg,eb=eg,ey=eg,eC=eg,ex=eg,ew={"/":"SOLUTIONS","/dashboard/function":"SETUP NEW FUNCTION","/dashboard/volume":"SETUP NEW VOLUME"};!function(ei){ei.Volume="volume",ei.Program="program",ei.Instance="instance",ei.SSHKey="sshKey",ei.Domain="domain"}(eu||(eu={})),function(ei){ei.IPFS="ipfs",ei.Program="program",ei.Instance="instance"}(ed||(ed={})),function(ei){ei.New="new",ei.Existing="existing",ei.Persistent="persistent"}(em||(em={}));let eN={[eu.Volume]:"Volume",[eu.Program]:"Function",[eu.Instance]:"Instance",[eu.SSHKey]:"SSH Key",[eu.Domain]:"Domain"}},81287:function(ei,es){"use strict";es.Z={ChainNotYetSupported:Error("Chain is not yet supported"),RequestTimeout:Error("Request timed out"),RequestFailed:ei=>Error("Request failed",{cause:ei})}},22733:function(ei,es,ef){"use strict";ef.d(es,{CJ:function(){return ew},I:function(){return eN},K7:function(){return ex},OC:function(){return eY},_G:function(){return eJ},iq:function(){return eA},ve:function(){return eC},wy:function(){return eS}});var eu=ef(1604),ed=ef(33358),em=ef(34853);let eH=eu.z.string().trim().min(1,{message:"Required field"}),ez=eu.z.string().trim().optional(),eV=eH.regex(/^[0-9a-f]{64}$/,{message:"Invalid hash"}),eM=eH.regex(/^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9\-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$/,{message:"Invalid domain format"}),eg=eH.regex(/^(\/[^\/ ]*)+\/?$/,{message:"Invalid path"}),eL=eu.z.custom(ei=>ei instanceof File,"Required file").refine(ei=>"application/zip"===ei.type&&ei.name.endsWith(".zip")||ei.name.endsWith(".sqsh")||ei.name.endsWith(".squashfs"),{message:"only .zip, .sqsh and .squashfs formats are valid"}).refine(ei=>ei.size>0,{message:"File size should be greater than 0"}),eb=eu.z.custom(ei=>ei instanceof File,"Required file").refine(ei=>(console.log(ei),"application/zip"===ei.type&&ei.name.endsWith(".zip")||ei.name.endsWith(".sqsh")||ei.name.endsWith(".squashfs")),{message:"only .zip, .sqsh and .squashfs formats are valid"}).refine(ei=>ei.size>0,{message:"File size should be greater than 0"}),ey=eu.z.enum([ed.py.Instance,ed.py.Program]),eC=eu.z.object({key:eH,label:ez}),ex=eu.z.array(eC),ew=eu.z.object({name:eM,target:eu.z.enum([ed.vs.IPFS,ed.vs.Program,ed.vs.Instance]),programType:ey,ref:eV}),eN=eu.z.array(ew),eS=eu.z.object({volumeType:eu.z.literal(ed.lf.New),file:eL}),eA=eu.z.array(eS),e_=eS.extend({mountPath:eg,useLatest:eu.z.coerce.boolean()}),eE=eu.z.object({volumeType:eu.z.literal(ed.lf.Existing),refHash:eV,mountPath:eg,useLatest:eu.z.coerce.boolean()}),eP=eu.z.object({volumeType:eu.z.literal(ed.lf.Persistent),name:eH,mountPath:eg,size:eu.z.number().gt(0)}),eB=eu.z.discriminatedUnion("volumeType",[e_,eE,eP]),eT=eu.z.array(eB),eI=ew.extend({ref:ez}),eR=eu.z.array(eI),eO=eu.z.object({name:eH,value:eH}),ej=eu.z.array(eO),eD=eu.z.object({lang:eu.z.enum(["python","javascript"])}),eF=eu.z.discriminatedUnion("type",[eD.extend({type:eu.z.literal("file"),file:eb,entrypoint:eH}),eD.extend({type:eu.z.literal("text"),text:eH})]),eU=eu.z.object({name:eH,tags:eu.z.array(eu.z.string().trim()).optional()}),eq=eC.extend({isSelected:eu.z.boolean(),isNew:eu.z.boolean()}),eZ=eu.z.array(eq).refine(ei=>ei.some(ei=>ei.isSelected),{message:"At least one ssh key should be add and selected",path:["0.isSelected"]}),eG=eu.z.coerce.boolean(),eW=eu.z.object({id:eu.z.union([eV,eu.z.literal("custom")]),custom:ez}).superRefine((ei,es)=>{let{id:ef,custom:eu}=ei,{addIssue:ed}=es;if("custom"!==ef)return!0;let em=eV.safeParse(eu,{path:["custom"]});em.success||em.error.issues.forEach(ei=>ed(ei))}),eK=eV,e$=eu.z.object({cpu:eu.z.union([eu.z.literal(1),eu.z.literal(2),eu.z.literal(4),eu.z.literal(6),eu.z.literal(8),eu.z.literal(12)]),ram:eu.z.number().gt(0),storage:eu.z.number().gt(0)}).refine(ei=>{let{cpu:es,ram:ef}=ei;return ef===(0,em.Fx)(2*es,{from:"GiB",to:"MiB"})},{message:"Invalid specs"}).refine(ei=>{let{cpu:es,storage:ef}=ei;return ef===(0,em.Fx)(20*es,{from:"GiB",to:"MiB"})||ef===(0,em.Fx)(2*es,{from:"GiB",to:"MiB"})},{message:"Invalid specs"}),eJ=eu.z.object({code:eF,runtime:eW,isPersistent:eG,volumes:eT,specs:e$,envVars:ej,domains:eR}).merge(eU),eY=eu.z.object({image:eK,volumes:eT,specs:e$,envVars:ej,sshKeys:eZ,domains:eR}).merge(eU)},48847:function(ei,es,ef){"use strict";ef.d(es,{MF:function(){return eu},E3:function(){return ex},I6:function(){return e_}});var eu,ed=ef(61941),em=ef(59925),eH=ef(49875),ez=ef(39261),eV=ef(33358),eM=ef(34853);class eg{async getAll(){let{address:ei}=this.account,es={address:ei,total_size:0,files:[]};try{let ef=await fetch("https://api2.aleph.im/api/v0/addresses/".concat(ei,"/files")),eu=await ef.json()||es;return this.parseSizesMap(eu.files),eu}catch(ei){return console.error(ei),es}}async getSizesMap(){let ei=await this.mutex.acquire();try{this.lastFetch+6e4(ei[es.item_hash]=(0,eM.Fx)(es.size,{from:"B",to:"MiB"}),ei),{})}constructor(ei,es=eV.sT){this.account=ei,this.channel=es,this.sizesMapCache={},this.lastFetch=0,this.mutex=new eM.WU}}var eL=ef(67572),eb=ef(81287);class ey{async get(ei){try{let es=await eL.any.GetMessage({hash:ei});return es}catch(ei){throw eb.Z.RequestFailed(ei)}}async del(ei){try{let es=await eL.forget.Publish({account:this.account,hashes:[ei.item_hash],channel:ei.channel});return es}catch(ei){throw eb.Z.RequestFailed(ei)}}constructor(ei,es=eV.sT){this.account=ei,this.channel=es}}var eC=ef(65526);!function(ei){ei[ei.connect=0]="connect",ei[ei.disconnect=1]="disconnect",ei[ei.setAccountBalance=2]="setAccountBalance",ei[ei.setAccountFiles=3]="setAccountFiles",ei[ei.setAccountSSHKeys=4]="setAccountSSHKeys",ei[ei.addAccountSSHKey=5]="addAccountSSHKey",ei[ei.delAccountSSHKey=6]="delAccountSSHKey",ei[ei.setAccountFunctions=7]="setAccountFunctions",ei[ei.addAccountFunction=8]="addAccountFunction",ei[ei.delAccountFunction=9]="delAccountFunction",ei[ei.setAccountVolumes=10]="setAccountVolumes",ei[ei.addAccountVolume=11]="addAccountVolume",ei[ei.delAccountVolume=12]="delAccountVolume",ei[ei.setAccountInstances=13]="setAccountInstances",ei[ei.addAccountInstance=14]="addAccountInstance",ei[ei.delAccountInstance=15]="delAccountInstance",ei[ei.setAccountDomains=16]="setAccountDomains",ei[ei.addAccountDomain=17]="addAccountDomain",ei[ei.delAccountDomain=18]="delAccountDomain"}(eu||(eu={}));let ex={account:void 0,accountBalance:void 0,accountInstances:void 0,accountFunctions:void 0,accountVolumes:void 0,accountFiles:void 0,accountSSHKeys:void 0,accountDomains:void 0,fileManager:void 0,messageManager:void 0,sshKeyManager:void 0,domainManager:void 0,volumeManager:void 0,programManager:void 0,instanceManager:void 0};function ew(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],ef=new Map(es.map(ei=>[ei.id,ei]));for(let es of ei)ef.set(es.id,es);return Array.from(ef.values())}function eN(ei,es){return ew([ei],es)}function eS(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return es.filter(es=>es.id!==ei)}function eA(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],ef=es.filter(ei=>!ei.confirmed);return ew(ei,ef)}let e_=function(){let ei=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ex,{type:es,payload:ef}=arguments.length>1?arguments[1]:void 0;switch(es){case eu.connect:{let{account:es}=ef,eu=new eg(es),eV=new ey(es),eM=new ed.X(es),eL=new eC.Y(es),eb=new em.l(es,eu),ex=new ez.L(es,eb,eL,eV,eu),ew=new eH.u(es,eb,eL,eM,eu);return{...ei,account:es,fileManager:eu,messageManager:eV,sshKeyManager:eM,domainManager:eL,volumeManager:eb,programManager:ex,instanceManager:ew}}case eu.disconnect:return{...ei,account:void 0,fileManager:void 0,messageManager:void 0,sshKeyManager:void 0,domainManager:void 0,volumeManager:void 0,programManager:void 0,instanceManager:void 0};case eu.setAccountBalance:return{...ei,accountBalance:ef.balance};case eu.setAccountFiles:return{...ei,accountFiles:ef.accountFiles};case eu.setAccountSSHKeys:{let es=eA(ef.accountSSHKeys,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.addAccountSSHKey:{let es=eN(ef.accountSSHKey,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.delAccountSSHKey:{let es=eS(ef.id,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.setAccountFunctions:{let es=eA(ef.accountFunctions,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.addAccountFunction:{let es=eN(ef.accountFunction,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.delAccountFunction:{let es=eS(ef.id,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.setAccountVolumes:{let es=eA(ef.accountVolumes,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.addAccountVolume:{let es=eN(ef.accountVolume,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.delAccountVolume:{let es=eS(ef.id,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.setAccountInstances:{let es=eA(ef.accountInstances,ei.accountInstances);return{...ei,accountInstances:es}}case eu.addAccountInstance:{let es=eN(ef.accountInstance,ei.accountInstances);return{...ei,accountInstances:es}}case eu.delAccountInstance:{let es=eS(ef.id,ei.accountInstances);return{...ei,accountInstances:es}}case eu.setAccountDomains:{let es=eA(ef.accountDomains,ei.accountDomains);return{...ei,accountDomains:es}}case eu.addAccountDomain:{let es=eN(ef.accountDomain,ei.accountDomains);return{...ei,accountDomains:es}}case eu.delAccountDomain:{let es=eS(ef.id,ei.accountDomains);return{...ei,accountDomains:es}}default:return ei}}},34853:function(ei,es,ef){"use strict";ef.d(es,{DI:function(){return ew},Eb:function(){return eV},Fx:function(){return eb},Py:function(){return eI},RK:function(){return ex},WU:function(){return eO},_3:function(){return eN},bs:function(){return eH},eB:function(){return eC},f6:function(){return eM},gE:function(){return eB},lm:function(){return eS},w2:function(){return eT},zN:function(){return ez}});var eu=ef(81287),ed=ef(57492),em=ef(33358);let eH=function(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,ef=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ei.length<=es||ei.length<=ef?ei:"".concat(ei.slice(0,es),"...").concat(ef>0?ei.slice(-ef):"")},ez=ei=>eH(ei,6,4),eV=async ei=>{try{let es=await fetch("https://api2.aleph.im/api/v0/addresses/".concat(ei,"/balance"));if(404===es.status)return 0;let{balance:ef}=await es.json();return ef}catch(ei){throw eu.Z.RequestFailed(ei)}},eM=async ei=>{try{let es=await fetch("https://balance1.api.aleph.cloud/solana/".concat(ei)),{balance:ef}=await es.json();return ef}catch(ei){throw eu.Z.RequestFailed(ei)}},eg={B:1,kB:1e3,MB:1e6,GB:1e9,TB:1e12,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776},eL={B:"B",kB:"kB",MB:"MB",GB:"GB",TB:"TB",KiB:"kB",MiB:"MB",GiB:"GB",TiB:"TB"};function eb(ei,es){let{from:ef="MiB",to:eu="GiB",displayUnit:ed=!1}=es,em=ei*eg[ef]/eg[eu];return ed?"".concat(em.toFixed(2)," ").concat(eL[eu]):em}function ey(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["B","KiB","MiB","GiB","TiB"],ef="B";for(let eu of es){if(ei1&&void 0!==arguments[1]?arguments[1]:"B";if(void 0===ei)return"n/a";if(0===ei)return"-";let ef=eb(ei,{from:es,to:"B"}),eu=ey(ef);return eb(ei,{from:es,to:eu,displayUnit:!0})}let ex=ei=>void 0===ei?"n/a":0===ei?ei:ei<1e3?ei.toFixed(1):ei<1e6?(ei/1e3).toFixed(1)+"K":ei<1e9?(ei/1e6).toFixed(1)+"M":(ei/1e9).toFixed(1)+"B",ew=ei=>{let{item_hash:es,chain:ef,sender:eu,type:ed}=ei;return"https://explorer.aleph.im/address/".concat(ef,"/").concat(eu,"/message/").concat(ed,"/").concat(es)},eN=ei=>{let[es,ef]=new Date(1e3*ei).toISOString().split("T"),[eu]=ef.split(".");return"".concat(es," ").concat(eu)},eS=(ei,es)=>{let ef=document.createElement("a");ef.href=window.URL.createObjectURL(ei),ef.download=es,ef.click()},eA=ei=>ei.type===ed.MessageType.store,e_=ei=>ei.type===ed.MessageType.program,eE=ei=>ei.type===ed.MessageType.instance,eP=ei=>ei.type===ed.MessageType.post;function eB(ei){if(eA(ei))return em.py.Volume;if(e_(ei))return em.py.Program;if(eE(ei))return em.py.Instance;if(eP(ei))return em.py.SSHKey;throw Error("Unknown type")}function eT(ei){return ei.hasOwnProperty("persistence")}function eI(ei){return ei.hasOwnProperty("ephemeral")}class eR{constructor(){this.promise=new Promise((ei,es)=>{this.resolve=ei,this.reject=es})}}class eO{async acquire(){let ei=new eR,es=this.queue;return this.queue=this.queue.then(()=>ei.promise),this.count++,await es,()=>{this.count--,ei.resolve()}}constructor(){this.queue=Promise.resolve(),this.count=0}}},6477:function(ei,es,ef){"use strict";ef.d(es,{$:function(){return ex}});var eu=ef(36470),ed=ef(57492),em=ef(24566),eH=ef(74931),ez=ef(34853),eV=ef(81287);let eM=(ei,es)=>{switch(ei){case ed.Chain.ETH:return(0,em.GetAccountFromProvider)(es);case ed.Chain.SOL:return(0,eH.GetAccountFromProvider)(es);default:throw eV.Z.ChainNotYetSupported}},eg=async ei=>{switch(ei.GetChain()){case ed.Chain.ETH:return(0,ez.Eb)(ei.address);case ed.Chain.SOL:return(0,ez.f6)(ei.address);default:throw eV.Z.ChainNotYetSupported}};var eL=ef(48847),eb=ef(3837),ey=ef(67294),eC=ef(5678);function ex(){let[ei,es]=(0,eu.mr)(),ef=(0,eb.lm)(),[em,eH]=(0,eC.Xs)("keepAccountAlive",!1),ez=(0,ey.useCallback)(ei=>{ef&&ef.add({variant:"error",title:"Error",text:ei})},[ef]),eV=(0,ey.useCallback)(async ei=>{let ef=await eg(ei);es({type:eL.MF.setAccountBalance,payload:{balance:ef}})},[es]),ex=(0,ey.useCallback)(async()=>{let ei;try{ei=await eM(ed.Chain.ETH,null==window?void 0:window.ethereum)}catch(ei){ez("You need an Ethereum wallet to use Aleph.im.")}if(ei)return eH(!0),await Promise.all([eV(ei)]).catch(ei=>{ez(ei.message)}),es({type:eL.MF.connect,payload:{account:ei}}),ei},[eH,eV,es,ez]),ew=(0,ey.useCallback)(async()=>{eH(!1),es({type:eL.MF.disconnect,payload:null})},[es,eH]),{account:eN}=ei,eS=!!(null==eN?void 0:eN.address),eA=(0,ey.useCallback)(async()=>{!eS&&em&&await ex()},[eS,em,ex]);return{connect:ex,disconnect:ew,isConnected:eS,account:eN,tryReconnect:eA}}},27234:function(ei,es,ef){"use strict";ef.r(es),ef.d(es,{default:function(){return cu}});var eu=ef(85893);ef(69416);var ed=ef(23636);ef(53119);var em=ef(19521),eH=ef(3837),ez=ef(67294),eV=ef(87531);let eM=em.ZP.footer.withConfig({displayName:"styles__StyledFooter",componentId:"sc-1l7mq5x-0"})([""," background-color:#00000033;box-sizing:border-box;width:100%;"],{paddingTop:"3rem",paddingBottom:"3rem","@media (min-width: 768px)":{paddingTop:"3rem",paddingBottom:"3rem"}}),eg=(0,em.ZP)(eH.zx).attrs(ei=>({...ei,kind:"neon",variant:"tertiary",color:"main0",size:"big"})).withConfig({displayName:"styles__StyledButton",componentId:"sc-1l7mq5x-1"})(()=>[{marginBottom:"1.5rem !important",display:"block !important",":last-child":{marginBottom:"0px !important"}}]),eL=em.ZP.a.attrs(ei=>({...(0,eH.PT)("tp-nav")(ei),href:ei.href||"#"})).withConfig({displayName:"styles__StyledLink",componentId:"sc-1l7mq5x-2"})(["",""],ei=>{let{theme:es}=ei;return(0,em.iv)(["display:block;cursor:pointer;font-weight:700;white-space:nowrap;color:",";text-decoration:none;&:last-child{margin-bottom:0;}"],es.color.text)}),eb=(0,em.ZP)(eH.JO).attrs(ei=>({...ei,size:"lg"})).withConfig({displayName:"styles__StyledIcon",componentId:"sc-1l7mq5x-3"})(()=>[{marginRight:"0.625rem"}]),ey=(0,em.ZP)(eH.JO).attrs(ei=>({...ei,size:"lg"})).withConfig({displayName:"styles__StyledIcon2",componentId:"sc-1l7mq5x-4"})(()=>[{marginLeft:"0.625rem"}]),eC=ei=>{let{small:es=!1}=ei;return(0,eu.jsx)(eM,{children:(0,eu.jsx)(eV.Z,{children:es?(0,eu.jsxs)(eH.X2,{xs:1,md:2,lg:3,xsGap:"3rem",lgGap:"0",children:[(0,eu.jsx)(eH.JX,{xs:1,md:2,lg:1,children:(0,eu.jsx)(ew,{children:(0,eu.jsx)(eH.TR,{size:28})})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)(eN,{children:[(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://docs.aleph.im",children:["Documentation",(0,eu.jsx)(ey,{name:"external-link-square-alt"})]})}),(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://t.me/alephim",children:["Telegram Developers",(0,eu.jsx)(ey,{name:"external-link-square-alt"})]})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)(eS,{children:[(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://twitter.com/aleph_im",children:[(0,eu.jsx)(eb,{name:"twitter"}),"Twitter"]})}),(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://medium.com/aleph-im",children:[(0,eu.jsx)(eb,{name:"medium"}),"Medium"]})})]})})]}):(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(eA,{children:(0,eu.jsx)(eH.TR,{size:55})}),(0,eu.jsx)(e_,{children:(0,eu.jsxs)(eH.X2,{xs:1,md:2,lg:4,xsGap:"3rem",mdGap:"1.5rem",children:[(0,eu.jsxs)(eH.JX,{children:[(0,eu.jsx)(eg,{children:"Work with us"}),(0,eu.jsx)(eg,{children:"Try our dApps"}),(0,eu.jsx)(eg,{children:"Start a project"})]}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eE,{children:(0,eu.jsx)(eL,{children:"Solutions"})}),(0,eu.jsx)(eP,{children:(0,eu.jsx)(eL,{children:"Roadmap"})}),(0,eu.jsx)(eB,{children:(0,eu.jsx)(eL,{children:"Indexing"})}),(0,eu.jsx)(eT,{children:(0,eu.jsx)(eL,{children:"Demo's"})}),(0,eu.jsx)(eI,{children:(0,eu.jsx)(eL,{children:"Team"})}),(0,eu.jsx)(eR,{children:(0,eu.jsx)(eL,{children:"Developers"})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eO,{children:(0,eu.jsx)(eL,{children:"Jobs"})}),(0,eu.jsx)(ej,{children:(0,eu.jsx)(eL,{children:"Whitepaper"})}),(0,eu.jsx)(eD,{children:(0,eu.jsx)(eL,{children:"Token"})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eF,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://twitter.com/aleph_im",children:[(0,eu.jsx)(eb,{name:"twitter"}),"Twitter"]})}),(0,eu.jsx)(eU,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://t.me/alephim",children:[(0,eu.jsx)(eb,{name:"telegram"}),"Telegram"]})}),(0,eu.jsx)(eq,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://medium.com/aleph-im",children:[(0,eu.jsx)(eb,{name:"medium"}),"Medium"]})})]})})]})})]})})})};var ex=eC,ew=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1m9qt74-0"})({display:"flex",alignItems:"center","@media (min-width: 1024px)":{justifyContent:"flex-start"}}),eN=(0,em.ZP)("ul").withConfig({displayName:"cmp___StyledUl",componentId:"sc-1m9qt74-1"})({display:"flex",flexDirection:"column",gap:"1.5rem","@media (min-width: 768px)":{flexDirection:"row",alignItems:"center"},"@media (min-width: 1024px)":{justifyContent:"center"}}),eS=(0,em.ZP)("ul").withConfig({displayName:"cmp___StyledUl2",componentId:"sc-1m9qt74-2"})({display:"flex",alignItems:"center",gap:"1.5rem","@media (min-width: 768px)":{justifyContent:"flex-end"}}),eA=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1m9qt74-3"})({marginBottom:"3rem"}),e_=(0,em.ZP)("nav").withConfig({displayName:"cmp___StyledNav",componentId:"sc-1m9qt74-4"})({margin:"0px"}),eE=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi",componentId:"sc-1m9qt74-5"})({marginBottom:"1.5rem"}),eP=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi2",componentId:"sc-1m9qt74-6"})({marginBottom:"1.5rem"}),eB=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi3",componentId:"sc-1m9qt74-7"})({marginBottom:"1.5rem"}),eT=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi4",componentId:"sc-1m9qt74-8"})({marginBottom:"1.5rem"}),eI=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi5",componentId:"sc-1m9qt74-9"})({marginBottom:"1.5rem"}),eR=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi6",componentId:"sc-1m9qt74-10"})({marginBottom:"0px"}),eO=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi7",componentId:"sc-1m9qt74-11"})({marginBottom:"1.5rem"}),ej=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi8",componentId:"sc-1m9qt74-12"})({marginBottom:"1.5rem"}),eD=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi9",componentId:"sc-1m9qt74-13"})({marginBottom:"0px"}),eF=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi10",componentId:"sc-1m9qt74-14"})({marginBottom:"1.5rem"}),eU=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi11",componentId:"sc-1m9qt74-15"})({marginBottom:"1.5rem"}),eq=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi12",componentId:"sc-1m9qt74-16"})({marginBottom:"0px"});let eZ=(0,em.vJ)([" body,#__next{display:flex;flex-direction:column;min-height:100vh;}.unavailable-content{opacity:0.3;filter:grayscale(1);pointer-events:none;}textarea{width:100%;background:linear-gradient(to bottom,#FFFFFF33,transparent);border-radius:5px;padding:5px;border:1px solid #FFFFFF33;color:inherit;}table{max-width:100%;overflow:auto;}"]);var eG=ef(41664),eW=ef.n(eG);let eK=em.ZP.header.withConfig({displayName:"styles__StyledHeader",componentId:"sc-1uc7qj0-0"})(["font-size:inherit;line-height:inherit;box-sizing:border-box;width:100%;margin:0;position:sticky;top:0;z-index:10;"]),e$=(0,em.ZP)(eH.wp).withConfig({displayName:"styles__StyledNavbar",componentId:"sc-1uc7qj0-1"})(["position:relative;"]),eJ=(0,em.ZP)(eH.zx).attrs(ei=>({...ei,color:"main0",kind:"neon",size:"regular",variant:"tertiary"})).withConfig({displayName:"styles__StyledButton",componentId:"sc-1uc7qj0-2"})(["display:block;&:last-child{margin-bottom:0;}"]);var eY=ef(34853),eX=ef(11163),eQ=ef(36470),e1=ef(6477),e2=ef(5678);function e4(){let{connect:ei,disconnect:es,isConnected:ef,account:eu}=(0,e1.$)(),ed=(0,em.Fg)(),[eH]=(0,eQ.mr)(),eV=(0,eX.useRouter)(),[eM,eg]=(0,e2.Xs)("keepAccountAlive",!1);(0,ez.useEffect)(()=>{(async()=>{!eu&&eM&&eC()})()},[eu,eM]);let eL=ei=>eV.pathname===ei,{accountBalance:eb}=eH,ey=(0,ez.useCallback)(async()=>{if(ef)eg(!1),await es(),eV.push("/");else{eg(!0);let es=await ei();if(!es)return;eV.push("/dashboard")}ew(!1)},[ei,es,ef,eV]),eC=(0,ez.useCallback)(async()=>{if(ef)await es();else{let es=await ei();if(!es)return}},[ei,es,ef,eu]),[ex,ew]=(0,ez.useState)(!1);return{theme:ed,handleConnect:ey,account:eu,isOnPath:eL,displayWalletPicker:ex,setDisplayWalletPicker:ew,accountBalance:eb}}let e3=()=>{let{theme:ei,handleConnect:es,account:ef,isOnPath:ed,displayWalletPicker:em,setDisplayWalletPicker:eV,accountBalance:eM}=e4(),eg=(0,ez.useRef)(null);(0,e2.t$)(eg,()=>{em&&eV(!1)});let eL=()=>{eV(!em)};return(0,eu.jsx)(eK,{children:(0,eu.jsxs)(e$,{logo:(0,eu.jsx)(eW(),{href:"/",children:(0,eu.jsx)(eH.TR,{})}),mobileTopContent:ef?(0,eu.jsx)(eH.zx,{variant:"secondary",color:"main1",kind:"neon",size:"regular",children:(0,eu.jsx)(eH.JO,{name:"meteor",size:"md",color:ei.color.main1})}):(0,eu.jsx)(eJ,{onClick:es,children:(0,eu.jsx)(eH.JO,{name:"meteor",size:"md",color:ei.color.main0})}),children:[(0,eu.jsxs)(eH.o8,{withSlash:!0,children:[(0,eu.jsx)(eH.iV,{isActive:ed("/"),children:(0,eu.jsx)(eW(),{href:"/",children:"Solutions"},"solutions")}),(0,eu.jsx)(eH.iV,{isActive:ed("/dashboard"),children:(0,eu.jsx)(eW(),{href:"/dashboard",children:"Dashboard"},"dashboard")})]}),(0,eu.jsxs)(eH.o8,{onlyDesktop:!0,children:[(0,eu.jsx)(eH.iV,{children:(0,eu.jsx)(eJ,{forwardedAs:"button",disabled:!0,children:(0,eu.jsx)(eH.JO,{name:"ethereum"})},"link")}),(0,eu.jsx)(e0,{children:(0,eu.jsxs)(eH.iV,{children:[ef?(0,eu.jsxs)(eH.zx,{as:"button",variant:"secondary",color:"main1",kind:"neon",size:"regular",onClick:eL,children:[(0,eY.zN)(ef.address)," ",(0,eu.jsx)(e8,{name:"meteor",size:"lg",color:ei.color.main1})]}):(0,eu.jsxs)(eH.zx,{as:"button",variant:"tertiary",color:"main0",kind:"neon",size:"regular",onClick:eL,children:["Connect"," ",(0,eu.jsx)(e5,{name:"meteor",size:"lg",color:ei.color.main0})]}),(0,eu.jsx)(e7,{ref:eg,children:em&&(0,eu.jsx)(eH.nd,{networks:[{icon:"ethereum",name:"Ethereum",wallets:[{color:"orange",icon:"circle",name:"Metamask",provider:()=>window.ethereum}]}],onConnect:es,onDisconnect:es,address:null==ef?void 0:ef.address,addressHref:"https://etherscan.io/address/".concat(null==ef?void 0:ef.address),balance:eM,size:"regular"})})]})})]})]})})};var e6=e3,e0=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-m0h8p1-0"})({position:"relative"}),e8=(0,em.ZP)(eH.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-m0h8p1-1"})({marginLeft:"0.625rem"}),e5=(0,em.ZP)(eH.JO).withConfig({displayName:"cmp___StyledIcon2",componentId:"sc-m0h8p1-2"})({marginLeft:"0.625rem"}),e7=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-m0h8p1-3"})({position:"absolute",right:"0px",marginTop:"2.5rem"});function e9(ei){let{children:es}=ei,[ef,ed]=(0,ez.useState)(!0);return(0,ez.useEffect)(()=>ed(!1),[]),ef?(0,eu.jsx)(eu.Fragment,{children:es}):(0,eu.jsx)(eH.P_,{max:10,timeout:2e3,children:es})}var cc=ef(36001),ci=ef(33358);let co=em.ZP.main.withConfig({displayName:"styles__StyledMain",componentId:"sc-4lx0v5-0"})(["",""],{display:"flex",flex:"1 1 0%",flexDirection:"column"}),cs=ei=>{let{children:es}=ei;return(0,eu.jsx)(co,{children:es})};var cf=cs;function cu(ei){let{Component:es,pageProps:ef}=ei,ed=(0,eX.useRouter)(),ez="/dashboard/manage"!==ed.pathname;return(0,eu.jsxs)(em.f6,{theme:eH.np.dark,children:[(0,eu.jsx)(eH.nz,{}),(0,eu.jsx)(eZ,{}),(0,eu.jsx)(eQ.WE,{children:(0,eu.jsxs)(e9,{children:[(0,eu.jsx)(e6,{}),(0,eu.jsxs)(cf,{children:[ez&&(0,eu.jsx)(cc.Z,{names:ci.sv}),(0,eu.jsx)(es,{...ef})]}),(0,eu.jsx)(ex,{small:!0})]})})]})}ed.vc.autoAddCss=!1},81516:function(ei,es){"use strict";function ef(ei,es,ef,eu){return!1}Object.defineProperty(es,"__esModule",{value:!0}),es.getDomainLocale=ef,("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},95569:function(ei,es,ef){"use strict";Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var eu=ef(92648).Z,ed=ef(17273).Z,em=eu(ef(67294)),eH=ef(14532),ez=ef(83353),eV=ef(61410),eM=ef(79064),eg=ef(370),eL=ef(69955),eb=ef(24224),ey=ef(80508),eC=ef(81516),ex=ef(64266);let ew=new Set;function eN(ei,es,ef,eu,ed){if(ed||ez.isLocalURL(es)){if(!eu.bypassPrefetchedCheck){let ed=void 0!==eu.locale?eu.locale:"locale"in ei?ei.locale:void 0,em=es+"%"+ef+"%"+ed;if(ew.has(em))return;ew.add(em)}Promise.resolve(ei.prefetch(es,ef,eu)).catch(ei=>{})}}function eS(ei){let es=ei.currentTarget,ef=es.getAttribute("target");return ef&&"_self"!==ef||ei.metaKey||ei.ctrlKey||ei.shiftKey||ei.altKey||ei.nativeEvent&&2===ei.nativeEvent.which}function eA(ei,es,ef,eu,ed,eH,eV,eM,eg,eL){let{nodeName:eb}=ei.currentTarget,ey="A"===eb.toUpperCase();if(ey&&(eS(ei)||!eg&&!ez.isLocalURL(ef)))return;ei.preventDefault();let eC=()=>{"beforePopState"in es?es[ed?"replace":"push"](ef,eu,{shallow:eH,locale:eM,scroll:eV}):es[ed?"replace":"push"](eu||ef,{forceOptimisticNavigation:!eL})};eg?em.default.startTransition(eC):eC()}function e_(ei){return"string"==typeof ei?ei:eV.formatUrl(ei)}let eE=em.default.forwardRef(function(ei,es){let ef,eu;let{href:ez,as:eV,children:ew,prefetch:eS,passHref:eE,replace:eP,shallow:eB,scroll:eT,locale:eI,onClick:eR,onMouseEnter:eO,onTouchStart:ej,legacyBehavior:eD=!1}=ei,eF=ed(ei,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);ef=ew,eD&&("string"==typeof ef||"number"==typeof ef)&&(ef=em.default.createElement("a",null,ef));let eU=!1!==eS,eq=em.default.useContext(eL.RouterContext),eZ=em.default.useContext(eb.AppRouterContext),eG=null!=eq?eq:eZ,eW=!eq,{href:eK,as:e$}=em.default.useMemo(()=>{if(!eq){let ei=e_(ez);return{href:ei,as:eV?e_(eV):ei}}let[ei,es]=eH.resolveHref(eq,ez,!0);return{href:ei,as:eV?eH.resolveHref(eq,eV):es||ei}},[eq,ez,eV]),eJ=em.default.useRef(eK),eY=em.default.useRef(e$);eD&&(eu=em.default.Children.only(ef));let eX=eD?eu&&"object"==typeof eu&&eu.ref:es,[eQ,e1,e2]=ey.useIntersection({rootMargin:"200px"}),e4=em.default.useCallback(ei=>{(eY.current!==e$||eJ.current!==eK)&&(e2(),eY.current=e$,eJ.current=eK),eQ(ei),eX&&("function"==typeof eX?eX(ei):"object"==typeof eX&&(eX.current=ei))},[e$,eX,eK,e2,eQ]);em.default.useEffect(()=>{eG&&e1&&eU&&eN(eG,eK,e$,{locale:eI},eW)},[e$,eK,e1,eI,eU,null==eq?void 0:eq.locale,eG,eW]);let e3={ref:e4,onClick(ei){eD||"function"!=typeof eR||eR(ei),eD&&eu.props&&"function"==typeof eu.props.onClick&&eu.props.onClick(ei),eG&&!ei.defaultPrevented&&eA(ei,eG,eK,e$,eP,eB,eT,eI,eW,eU)},onMouseEnter(ei){eD||"function"!=typeof eO||eO(ei),eD&&eu.props&&"function"==typeof eu.props.onMouseEnter&&eu.props.onMouseEnter(ei),eG&&(eU||!eW)&&eN(eG,eK,e$,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},eW)},onTouchStart(ei){eD||"function"!=typeof ej||ej(ei),eD&&eu.props&&"function"==typeof eu.props.onTouchStart&&eu.props.onTouchStart(ei),eG&&(eU||!eW)&&eN(eG,eK,e$,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},eW)}};if(eM.isAbsoluteUrl(e$))e3.href=e$;else if(!eD||eE||"a"===eu.type&&!("href"in eu.props)){let ei=void 0!==eI?eI:null==eq?void 0:eq.locale,es=(null==eq?void 0:eq.isLocaleDomain)&&eC.getDomainLocale(e$,ei,null==eq?void 0:eq.locales,null==eq?void 0:eq.domainLocales);e3.href=es||ex.addBasePath(eg.addLocale(e$,ei,null==eq?void 0:eq.defaultLocale))}return eD?em.default.cloneElement(eu,e3):em.default.createElement("a",Object.assign({},eF,e3),ef)});var eP=eE;es.default=eP,("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},80508:function(ei,es,ef){"use strict";Object.defineProperty(es,"__esModule",{value:!0}),es.useIntersection=eg;var eu=ef(67294),ed=ef(10029);let em="function"==typeof IntersectionObserver,eH=new Map,ez=[];function eV(ei){let es;let ef={root:ei.root||null,margin:ei.rootMargin||""},eu=ez.find(ei=>ei.root===ef.root&&ei.margin===ef.margin);if(eu&&(es=eH.get(eu)))return es;let ed=new Map,em=new IntersectionObserver(ei=>{ei.forEach(ei=>{let es=ed.get(ei.target),ef=ei.isIntersecting||ei.intersectionRatio>0;es&&ef&&es(ef)})},ei);return es={id:ef,observer:em,elements:ed},ez.push(ef),eH.set(ef,es),es}function eM(ei,es,ef){let{id:eu,observer:ed,elements:em}=eV(ef);return em.set(ei,es),ed.observe(ei),function(){if(em.delete(ei),ed.unobserve(ei),0===em.size){ed.disconnect(),eH.delete(eu);let ei=ez.findIndex(ei=>ei.root===eu.root&&ei.margin===eu.margin);ei>-1&&ez.splice(ei,1)}}}function eg(ei){let{rootRef:es,rootMargin:ef,disabled:eH}=ei,ez=eH||!em,[eV,eg]=eu.useState(!1),eL=eu.useRef(null),eb=eu.useCallback(ei=>{eL.current=ei},[]);eu.useEffect(()=>{if(em){if(ez||eV)return;let ei=eL.current;if(ei&&ei.tagName){let eu=eM(ei,ei=>ei&&eg(ei),{root:null==es?void 0:es.current,rootMargin:ef});return eu}}else if(!eV){let ei=ed.requestIdleCallback(()=>eg(!0));return()=>ed.cancelIdleCallback(ei)}},[ez,ef,es,eV,eL.current]);let ey=eu.useCallback(()=>{eg(!1)},[]);return[eb,eV,ey]}("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},42474:function(ei,es,ef){var eu="/",ed=ef(48764).Buffer,em=ef(83454);!function(){var es={7160:function(ei,es,ef){var eu=es;eu.bignum=ef(711),eu.define=ef(495).define,eu.base=ef(853),eu.constants=ef(7335),eu.decoders=ef(6701),eu.encoders=ef(3418)},495:function(ei,es,ef){var eu=ef(7160),ed=ef(3782);function em(ei,es){this.name=ei,this.body=es,this.decoders={},this.encoders={}}es.define=function(ei,es){return new em(ei,es)},em.prototype._createNamed=function(ei){var es;try{es=ef(6144).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(ei){es=function(ei){this._initNamed(ei)}}return ed(es,ei),es.prototype._initNamed=function(es){ei.call(this,es)},new es(this)},em.prototype._getDecoder=function(ei){return ei=ei||"der",this.decoders.hasOwnProperty(ei)||(this.decoders[ei]=this._createNamed(eu.decoders[ei])),this.decoders[ei]},em.prototype.decode=function(ei,es,ef){return this._getDecoder(es).decode(ei,ef)},em.prototype._getEncoder=function(ei){return ei=ei||"der",this.encoders.hasOwnProperty(ei)||(this.encoders[ei]=this._createNamed(eu.encoders[ei])),this.encoders[ei]},em.prototype.encode=function(ei,es,ef){return this._getEncoder(es).encode(ei,ef)}},6483:function(ei,es,ef){var eu=ef(3782),ed=ef(853).Reporter,em=ef(4300).Buffer;function eH(ei,es){if(ed.call(this,es),!em.isBuffer(ei)){this.error("Input not Buffer");return}this.base=ei,this.offset=0,this.length=ei.length}function ez(ei,es){if(Array.isArray(ei))this.length=0,this.value=ei.map(function(ei){return ei instanceof ez||(ei=new ez(ei,es)),this.length+=ei.length,ei},this);else if("number"==typeof ei){if(!(0<=ei&&ei<=255))return es.error("non-byte EncoderBuffer value");this.value=ei,this.length=1}else if("string"==typeof ei)this.value=ei,this.length=em.byteLength(ei);else{if(!em.isBuffer(ei))return es.error("Unsupported type: "+typeof ei);this.value=ei,this.length=ei.length}}eu(eH,ed),es.C=eH,eH.prototype.save=function(){return{offset:this.offset,reporter:ed.prototype.save.call(this)}},eH.prototype.restore=function(ei){var es=new eH(this.base);return es.offset=ei.offset,es.length=this.offset,this.offset=ei.offset,ed.prototype.restore.call(this,ei.reporter),es},eH.prototype.isEmpty=function(){return this.offset===this.length},eH.prototype.readUInt8=function(ei){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(ei||"DecoderBuffer overrun")},eH.prototype.skip=function(ei,es){if(!(this.offset+ei<=this.length))return this.error(es||"DecoderBuffer overrun");var ef=new eH(this.base);return ef._reporterState=this._reporterState,ef.offset=this.offset,ef.length=this.offset+ei,this.offset+=ei,ef},eH.prototype.raw=function(ei){return this.base.slice(ei?ei.offset:this.offset,this.length)},es.R=ez,ez.prototype.join=function(ei,es){return ei||(ei=new em(this.length)),es||(es=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(ef){ef.join(ei,es),es+=ef.length}):("number"==typeof this.value?ei[es]=this.value:"string"==typeof this.value?ei.write(this.value,es):em.isBuffer(this.value)&&this.value.copy(ei,es),es+=this.length)),ei}},853:function(ei,es,ef){var eu=es;eu.Reporter=ef(1293).b,eu.DecoderBuffer=ef(6483).C,eu.EncoderBuffer=ef(6483).R,eu.Node=ef(9374)},9374:function(ei,es,ef){var eu=ef(853).Reporter,ed=ef(853).EncoderBuffer,em=ef(853).DecoderBuffer,eH=ef(3523),ez=["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"],eV=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(ez),eM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function eg(ei,es){var ef={};this._baseState=ef,ef.enc=ei,ef.parent=es||null,ef.children=null,ef.tag=null,ef.args=null,ef.reverseArgs=null,ef.choice=null,ef.optional=!1,ef.any=!1,ef.obj=!1,ef.use=null,ef.useDecoder=null,ef.key=null,ef.default=null,ef.explicit=null,ef.implicit=null,ef.contains=null,ef.parent||(ef.children=[],this._wrap())}ei.exports=eg;var eL=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];eg.prototype.clone=function(){var ei=this._baseState,es={};eL.forEach(function(ef){es[ef]=ei[ef]});var ef=new this.constructor(es.parent);return ef._baseState=es,ef},eg.prototype._wrap=function(){var ei=this._baseState;eV.forEach(function(es){this[es]=function(){var ef=new this.constructor(this);return ei.children.push(ef),ef[es].apply(ef,arguments)}},this)},eg.prototype._init=function(ei){var es=this._baseState;eH(null===es.parent),ei.call(this),es.children=es.children.filter(function(ei){return ei._baseState.parent===this},this),eH.equal(es.children.length,1,"Root node can have only one child")},eg.prototype._useArgs=function(ei){var es=this._baseState,ef=ei.filter(function(ei){return ei instanceof this.constructor},this);ei=ei.filter(function(ei){return!(ei instanceof this.constructor)},this),0!==ef.length&&(eH(null===es.children),es.children=ef,ef.forEach(function(ei){ei._baseState.parent=this},this)),0!==ei.length&&(eH(null===es.args),es.args=ei,es.reverseArgs=ei.map(function(ei){if("object"!=typeof ei||ei.constructor!==Object)return ei;var es={};return Object.keys(ei).forEach(function(ef){ef==(0|ef)&&(ef|=0),es[ei[ef]]=ef}),es}))},eM.forEach(function(ei){eg.prototype[ei]=function(){throw Error(ei+" not implemented for encoding: "+this._baseState.enc)}}),ez.forEach(function(ei){eg.prototype[ei]=function(){var es=this._baseState,ef=Array.prototype.slice.call(arguments);return eH(null===es.tag),es.tag=ei,this._useArgs(ef),this}}),eg.prototype.use=function(ei){eH(ei);var es=this._baseState;return eH(null===es.use),es.use=ei,this},eg.prototype.optional=function(){return this._baseState.optional=!0,this},eg.prototype.def=function(ei){var es=this._baseState;return eH(null===es.default),es.default=ei,es.optional=!0,this},eg.prototype.explicit=function(ei){var es=this._baseState;return eH(null===es.explicit&&null===es.implicit),es.explicit=ei,this},eg.prototype.implicit=function(ei){var es=this._baseState;return eH(null===es.explicit&&null===es.implicit),es.implicit=ei,this},eg.prototype.obj=function(){var ei=this._baseState,es=Array.prototype.slice.call(arguments);return ei.obj=!0,0!==es.length&&this._useArgs(es),this},eg.prototype.key=function(ei){var es=this._baseState;return eH(null===es.key),es.key=ei,this},eg.prototype.any=function(){return this._baseState.any=!0,this},eg.prototype.choice=function(ei){var es=this._baseState;return eH(null===es.choice),es.choice=ei,this._useArgs(Object.keys(ei).map(function(es){return ei[es]})),this},eg.prototype.contains=function(ei){var es=this._baseState;return eH(null===es.use),es.contains=ei,this},eg.prototype._decode=function(ei,es){var ef,eu=this._baseState;if(null===eu.parent)return ei.wrapResult(eu.children[0]._decode(ei,es));var ed=eu.default,eH=!0,ez=null;if(null!==eu.key&&(ez=ei.enterKey(eu.key)),eu.optional){var eV=null;if(null!==eu.explicit?eV=eu.explicit:null!==eu.implicit?eV=eu.implicit:null!==eu.tag&&(eV=eu.tag),null!==eV||eu.any){if(eH=this._peekTag(ei,eV,eu.any),ei.isError(eH))return eH}else{var eM=ei.save();try{null===eu.choice?this._decodeGeneric(eu.tag,ei,es):this._decodeChoice(ei,es),eH=!0}catch(ei){eH=!1}ei.restore(eM)}}if(eu.obj&&eH&&(ef=ei.enterObject()),eH){if(null!==eu.explicit){var eg=this._decodeTag(ei,eu.explicit);if(ei.isError(eg))return eg;ei=eg}var eL=ei.offset;if(null===eu.use&&null===eu.choice){if(eu.any)var eM=ei.save();var eb=this._decodeTag(ei,null!==eu.implicit?eu.implicit:eu.tag,eu.any);if(ei.isError(eb))return eb;eu.any?ed=ei.raw(eM):ei=eb}if(es&&es.track&&null!==eu.tag&&es.track(ei.path(),eL,ei.length,"tagged"),es&&es.track&&null!==eu.tag&&es.track(ei.path(),ei.offset,ei.length,"content"),eu.any||(ed=null===eu.choice?this._decodeGeneric(eu.tag,ei,es):this._decodeChoice(ei,es)),ei.isError(ed))return ed;if(eu.any||null!==eu.choice||null===eu.children||eu.children.forEach(function(ef){ef._decode(ei,es)}),eu.contains&&("octstr"===eu.tag||"bitstr"===eu.tag)){var ey=new em(ed);ed=this._getUse(eu.contains,ei._reporterState.obj)._decode(ey,es)}}return eu.obj&&eH&&(ed=ei.leaveObject(ef)),null!==eu.key&&(null!==ed||!0===eH)?ei.leaveKey(ez,eu.key,ed):null!==ez&&ei.exitKey(ez),ed},eg.prototype._decodeGeneric=function(ei,es,ef){var eu=this._baseState;if("seq"===ei||"set"===ei)return null;if("seqof"===ei||"setof"===ei)return this._decodeList(es,ei,eu.args[0],ef);if(/str$/.test(ei))return this._decodeStr(es,ei,ef);if("objid"===ei&&eu.args)return this._decodeObjid(es,eu.args[0],eu.args[1],ef);if("objid"===ei)return this._decodeObjid(es,null,null,ef);if("gentime"===ei||"utctime"===ei)return this._decodeTime(es,ei,ef);if("null_"===ei)return this._decodeNull(es,ef);if("bool"===ei)return this._decodeBool(es,ef);else if("objDesc"===ei)return this._decodeStr(es,ei,ef);else if("int"===ei||"enum"===ei)return this._decodeInt(es,eu.args&&eu.args[0],ef);return null!==eu.use?this._getUse(eu.use,es._reporterState.obj)._decode(es,ef):es.error("unknown tag: "+ei)},eg.prototype._getUse=function(ei,es){var ef=this._baseState;return ef.useDecoder=this._use(ei,es),eH(null===ef.useDecoder._baseState.parent),ef.useDecoder=ef.useDecoder._baseState.children[0],ef.implicit!==ef.useDecoder._baseState.implicit&&(ef.useDecoder=ef.useDecoder.clone(),ef.useDecoder._baseState.implicit=ef.implicit),ef.useDecoder},eg.prototype._decodeChoice=function(ei,es){var ef=this._baseState,eu=null,ed=!1;return(Object.keys(ef.choice).some(function(em){var eH=ei.save(),ez=ef.choice[em];try{var eV=ez._decode(ei,es);if(ei.isError(eV))return!1;eu={type:em,value:eV},ed=!0}catch(es){return ei.restore(eH),!1}return!0},this),ed)?eu:ei.error("Choice not matched")},eg.prototype._createEncoderBuffer=function(ei){return new ed(ei,this.reporter)},eg.prototype._encode=function(ei,es,ef){var eu=this._baseState;if(null===eu.default||eu.default!==ei){var ed=this._encodeValue(ei,es,ef);if(void 0!==ed&&!this._skipDefault(ed,es,ef))return ed}},eg.prototype._encodeValue=function(ei,es,ef){var ed,em=this._baseState;if(null===em.parent)return em.children[0]._encode(ei,es||new eu);var ed=null;if(this.reporter=es,em.optional&&void 0===ei){if(null===em.default)return;ei=em.default}var eH=null,ez=!1;if(em.any)ed=this._createEncoderBuffer(ei);else if(em.choice)ed=this._encodeChoice(ei,es);else if(em.contains)eH=this._getUse(em.contains,ef)._encode(ei,es),ez=!0;else if(em.children)eH=em.children.map(function(ef){if("null_"===ef._baseState.tag)return ef._encode(null,es,ei);if(null===ef._baseState.key)return es.error("Child should have a key");var eu=es.enterKey(ef._baseState.key);if("object"!=typeof ei)return es.error("Child expected, but input is not object");var ed=ef._encode(ei[ef._baseState.key],es,ei);return es.leaveKey(eu),ed},this).filter(function(ei){return ei}),eH=this._createEncoderBuffer(eH);else if("seqof"===em.tag||"setof"===em.tag){if(!(em.args&&1===em.args.length))return es.error("Too many args for : "+em.tag);if(!Array.isArray(ei))return es.error("seqof/setof, but data is not Array");var eV=this.clone();eV._baseState.implicit=null,eH=this._createEncoderBuffer(ei.map(function(ef){var eu=this._baseState;return this._getUse(eu.args[0],ei)._encode(ef,es)},eV))}else null!==em.use?ed=this._getUse(em.use,ef)._encode(ei,es):(eH=this._encodePrimitive(em.tag,ei),ez=!0);if(!em.any&&null===em.choice){var eM=null!==em.implicit?em.implicit:em.tag,eg=null===em.implicit?"universal":"context";null===eM?null===em.use&&es.error("Tag could be omitted only for .use()"):null===em.use&&(ed=this._encodeComposite(eM,ez,eg,eH))}return null!==em.explicit&&(ed=this._encodeComposite(em.explicit,!1,"context",ed)),ed},eg.prototype._encodeChoice=function(ei,es){var ef=this._baseState,eu=ef.choice[ei.type];return eu||eH(!1,ei.type+" not found in "+JSON.stringify(Object.keys(ef.choice))),eu._encode(ei.value,es)},eg.prototype._encodePrimitive=function(ei,es){var ef=this._baseState;if(/str$/.test(ei))return this._encodeStr(es,ei);if("objid"===ei&&ef.args)return this._encodeObjid(es,ef.reverseArgs[0],ef.args[1]);if("objid"===ei)return this._encodeObjid(es,null,null);if("gentime"===ei||"utctime"===ei)return this._encodeTime(es,ei);if("null_"===ei)return this._encodeNull();if("int"===ei||"enum"===ei)return this._encodeInt(es,ef.args&&ef.reverseArgs[0]);if("bool"===ei)return this._encodeBool(es);else if("objDesc"===ei)return this._encodeStr(es,ei);else throw Error("Unsupported tag: "+ei)},eg.prototype._isNumstr=function(ei){return/^[0-9 ]*$/.test(ei)},eg.prototype._isPrintstr=function(ei){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(ei)}},1293:function(ei,es,ef){var eu=ef(3782);function ed(ei){this._reporterState={obj:null,path:[],options:ei||{},errors:[]}}function em(ei,es){this.path=ei,this.rethrow(es)}es.b=ed,ed.prototype.isError=function(ei){return ei instanceof em},ed.prototype.save=function(){var ei=this._reporterState;return{obj:ei.obj,pathLen:ei.path.length}},ed.prototype.restore=function(ei){var es=this._reporterState;es.obj=ei.obj,es.path=es.path.slice(0,ei.pathLen)},ed.prototype.enterKey=function(ei){return this._reporterState.path.push(ei)},ed.prototype.exitKey=function(ei){var es=this._reporterState;es.path=es.path.slice(0,ei-1)},ed.prototype.leaveKey=function(ei,es,ef){var eu=this._reporterState;this.exitKey(ei),null!==eu.obj&&(eu.obj[es]=ef)},ed.prototype.path=function(){return this._reporterState.path.join("/")},ed.prototype.enterObject=function(){var ei=this._reporterState,es=ei.obj;return ei.obj={},es},ed.prototype.leaveObject=function(ei){var es=this._reporterState,ef=es.obj;return es.obj=ei,ef},ed.prototype.error=function(ei){var es,ef=this._reporterState,eu=ei instanceof em;if(es=eu?ei:new em(ef.path.map(function(ei){return"["+JSON.stringify(ei)+"]"}).join(""),ei.message||ei,ei.stack),!ef.options.partial)throw es;return eu||ef.errors.push(es),es},ed.prototype.wrapResult=function(ei){var es=this._reporterState;return es.options.partial?{result:this.isError(ei)?null:ei,errors:es.errors}:ei},eu(em,Error),em.prototype.rethrow=function(ei){if(this.message=ei+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,em),!this.stack)try{throw Error(this.message)}catch(ei){this.stack=ei.stack}return this}},9791:function(ei,es,ef){var eu=ef(7335);es.tagClass={0:"universal",1:"application",2:"context",3:"private"},es.tagClassByName=eu._reverse(es.tagClass),es.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"},es.tagByName=eu._reverse(es.tag)},7335:function(ei,es,ef){var eu=es;eu._reverse=function(ei){var es={};return Object.keys(ei).forEach(function(ef){(0|ef)==ef&&(ef|=0),es[ei[ef]]=ef}),es},eu.der=ef(9791)},2259:function(ei,es,ef){var eu=ef(3782),ed=ef(7160),em=ed.base,eH=ed.bignum,ez=ed.constants.der;function eV(ei){this.enc="der",this.name=ei.name,this.entity=ei,this.tree=new eM,this.tree._init(ei.body)}function eM(ei){em.Node.call(this,"der",ei)}function eg(ei,es){var ef=ei.readUInt8(es);if(ei.isError(ef))return ef;var eu=ez.tagClass[ef>>6],ed=(32&ef)==0;if((31&ef)==31){var em=ef;for(ef=0;(128&em)==128;){if(em=ei.readUInt8(es),ei.isError(em))return em;ef<<=7,ef|=127&em}}else ef&=31;var eH=ez.tag[ef];return{cls:eu,primitive:ed,tag:ef,tagStr:eH}}function eL(ei,es,ef){var eu=ei.readUInt8(ef);if(ei.isError(eu))return eu;if(!es&&128===eu)return null;if((128&eu)==0)return eu;var ed=127&eu;if(ed>4)return ei.error("length octect is too long");eu=0;for(var em=0;em=31?eu.error("Multi-octet tag encoding unsupported"):(es||(ed|=32),ed|=ez.tagClassByName[ef||"universal"]<<6)}ei.exports=eV,eV.prototype.encode=function(ei,es){return this.tree._encode(ei,es).join()},eu(eM,eH.Node),eM.prototype._encodeComposite=function(ei,es,ef,eu){var em=eL(ei,es,ef,this.reporter);if(eu.length<128){var eH=new ed(2);return eH[0]=em,eH[1]=eu.length,this._createEncoderBuffer([eH,eu])}for(var ez=1,eV=eu.length;eV>=256;eV>>=8)ez++;var eH=new ed(2+ez);eH[0]=em,eH[1]=128|ez;for(var eV=1+ez,eM=eu.length;eM>0;eV--,eM>>=8)eH[eV]=255&eM;return this._createEncoderBuffer([eH,eu])},eM.prototype._encodeStr=function(ei,es){if("bitstr"===es)return this._createEncoderBuffer([0|ei.unused,ei.data]);if("bmpstr"===es){for(var ef=new ed(2*ei.length),eu=0;eu=40)return this.reporter.error("Second objid identifier OOB");ei.splice(0,2,40*ei[0]+ei[1])}for(var em=0,eu=0;eu=128;eH>>=7)em++}for(var ez=new ed(em),eV=ez.length-1,eu=ei.length-1;eu>=0;eu--){var eH=ei[eu];for(ez[eV--]=127&eH;(eH>>=7)>0;)ez[eV--]=128|127&eH}return this._createEncoderBuffer(ez)},eM.prototype._encodeTime=function(ei,es){var ef,eu=new Date(ei);return"gentime"===es?ef=[eg(eu.getFullYear()),eg(eu.getUTCMonth()+1),eg(eu.getUTCDate()),eg(eu.getUTCHours()),eg(eu.getUTCMinutes()),eg(eu.getUTCSeconds()),"Z"].join(""):"utctime"===es?ef=[eg(eu.getFullYear()%100),eg(eu.getUTCMonth()+1),eg(eu.getUTCDate()),eg(eu.getUTCHours()),eg(eu.getUTCMinutes()),eg(eu.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+es+" time is not supported yet"),this._encodeStr(ef,"octstr")},eM.prototype._encodeNull=function(){return this._createEncoderBuffer("")},eM.prototype._encodeInt=function(ei,es){if("string"==typeof ei){if(!es)return this.reporter.error("String int or enum given, but no values map");if(!es.hasOwnProperty(ei))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(ei));ei=es[ei]}if("number"!=typeof ei&&!ed.isBuffer(ei)){var ef=ei.toArray();!ei.sign&&128&ef[0]&&ef.unshift(0),ei=new ed(ef)}if(ed.isBuffer(ei)){var eu=ei.length;0===ei.length&&eu++;var em=new ed(eu);return ei.copy(em),0===ei.length&&(em[0]=0),this._createEncoderBuffer(em)}if(ei<128)return this._createEncoderBuffer(ei);if(ei<256)return this._createEncoderBuffer([0,ei]);for(var eu=1,eH=ei;eH>=256;eH>>=8)eu++;for(var em=Array(eu),eH=em.length-1;eH>=0;eH--)em[eH]=255&ei,ei>>=8;return 128&em[0]&&em.unshift(0),this._createEncoderBuffer(new ed(em))},eM.prototype._encodeBool=function(ei){return this._createEncoderBuffer(ei?255:0)},eM.prototype._use=function(ei,es){return"function"==typeof ei&&(ei=ei(es)),ei._getEncoder("der").tree},eM.prototype._skipDefault=function(ei,es,ef){var eu,ed=this._baseState;if(null===ed.default)return!1;var em=ei.join();if(void 0===ed.defaultBuffer&&(ed.defaultBuffer=this._encodeValue(ed.default,es,ef).join()),em.length!==ed.defaultBuffer.length)return!1;for(eu=0;eu=49&&eH<=54?eu|=eH-49+10:eH>=17&&eH<=22?eu|=eH-17+10:eu|=15&eH}return eu}function ez(ei,es,ef,eu){for(var ed=0,em=Math.min(ei.length,ef),eH=es;eH=49?ed+=ez-49+10:ez>=17?ed+=ez-17+10:ed+=ez}return ed}em.isBN=function(ei){return ei instanceof em||null!==ei&&"object"==typeof ei&&ei.constructor.wordSize===em.wordSize&&Array.isArray(ei.words)},em.max=function(ei,es){return ei.cmp(es)>0?ei:es},em.min=function(ei,es){return 0>ei.cmp(es)?ei:es},em.prototype._init=function(ei,es,ef){if("number"==typeof ei)return this._initNumber(ei,es,ef);if("object"==typeof ei)return this._initArray(ei,es,ef);"hex"===es&&(es=16),eu(es===(0|es)&&es>=2&&es<=36);var ed=0;"-"===(ei=ei.toString().replace(/\s+/g,""))[0]&&ed++,16===es?this._parseHex(ei,ed):this._parseBase(ei,es,ed),"-"===ei[0]&&(this.negative=1),this.strip(),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initNumber=function(ei,es,ef){ei<0&&(this.negative=1,ei=-ei),ei<67108864?(this.words=[67108863&ei],this.length=1):ei<4503599627370496?(this.words=[67108863&ei,ei/67108864&67108863],this.length=2):(eu(ei<9007199254740992),this.words=[67108863&ei,ei/67108864&67108863,1],this.length=3),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initArray=function(ei,es,ef){if(eu("number"==typeof ei.length),ei.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(ei.length/3),this.words=Array(this.length);for(var ed,em,eH=0;eH=0;eH-=3)em=ei[eH]|ei[eH-1]<<8|ei[eH-2]<<16,this.words[ed]|=em<>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);else if("le"===ef)for(eH=0,ed=0;eH>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);return this.strip()},em.prototype._parseHex=function(ei,es){this.length=Math.ceil((ei.length-es)/6),this.words=Array(this.length);for(var ef,eu,ed=0;ed=es;ed-=6)eu=eH(ei,ed,ed+6),this.words[ef]|=eu<>>26-em&4194303,(em+=24)>=26&&(em-=26,ef++);ed+6!==es&&(eu=eH(ei,es,ed+6),this.words[ef]|=eu<>>26-em&4194303),this.strip()},em.prototype._parseBase=function(ei,es,ef){this.words=[0],this.length=1;for(var eu=0,ed=1;ed<=67108863;ed*=es)eu++;eu--,ed=ed/es|0;for(var em=ei.length-ef,eH=em%eu,eV=Math.min(em,em-eH)+ef,eM=0,eg=ef;eg1&&0===this.words[this.length-1];)this.length--;return this._normSign()},em.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},em.prototype.inspect=function(){return(this.red?""};var eV,eM=["","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"],eg=[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],eL=[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 eb(ei){for(var es=Array(ei.bitLength()),ef=0;ef>>ed}return es}function ey(ei,es,ef){ef.negative=es.negative^ei.negative;var eu=ei.length+es.length|0;ef.length=eu,eu=eu-1|0;var ed=0|ei.words[0],em=0|es.words[0],eH=ed*em,ez=67108863&eH,eV=eH/67108864|0;ef.words[0]=ez;for(var eM=1;eM>>26,eL=67108863&eV,eb=Math.min(eM,es.length-1),ey=Math.max(0,eM-ei.length+1);ey<=eb;ey++){var eC=eM-ey|0;eg+=(eH=(ed=0|ei.words[eC])*(em=0|es.words[ey])+eL)/67108864|0,eL=67108863&eH}ef.words[eM]=0|eL,eV=0|eg}return 0!==eV?ef.words[eM]=0|eV:ef.length--,ef.strip()}em.prototype.toString=function(ei,es){if(es=0|es||1,16===(ei=ei||10)||"hex"===ei){ef="";for(var ef,ed=0,em=0,eH=0;eH>>24-ed&16777215)||eH!==this.length-1?eM[6-eV.length]+eV+ef:eV+ef,(ed+=2)>=26&&(ed-=26,eH--)}for(0!==em&&(ef=em.toString(16)+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}if(ei===(0|ei)&&ei>=2&&ei<=36){var eb=eg[ei],ey=eL[ei];ef="";var eC=this.clone();for(eC.negative=0;!eC.isZero();){var ex=eC.modn(ey).toString(ei);ef=(eC=eC.idivn(ey)).isZero()?ex+ef:eM[eb-ex.length]+ex+ef}for(this.isZero()&&(ef="0"+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}eu(!1,"Base should be between 2 and 36")},em.prototype.toNumber=function(){var ei=this.words[0];return 2===this.length?ei+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ei+=4503599627370496+67108864*this.words[1]:this.length>2&&eu(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ei:ei},em.prototype.toJSON=function(){return this.toString(16)},em.prototype.toBuffer=function(ei,es){return eu(void 0!==eV),this.toArrayLike(eV,ei,es)},em.prototype.toArray=function(ei,es){return this.toArrayLike(Array,ei,es)},em.prototype.toArrayLike=function(ei,es,ef){var ed,em,eH=this.byteLength(),ez=ef||Math.max(1,eH);eu(eH<=ez,"byte array longer than desired length"),eu(ez>0,"Requested array length <= 0"),this.strip();var eV="le"===es,eM=new ei(ez),eg=this.clone();if(eV){for(em=0;!eg.isZero();em++)ed=eg.andln(255),eg.iushrn(8),eM[em]=ed;for(;em=4096&&(ef+=13,es>>>=13),es>=64&&(ef+=7,es>>>=7),es>=8&&(ef+=4,es>>>=4),es>=2&&(ef+=2,es>>>=2),ef+es},em.prototype._zeroBits=function(ei){if(0===ei)return 26;var es=ei,ef=0;return(8191&es)==0&&(ef+=13,es>>>=13),(127&es)==0&&(ef+=7,es>>>=7),(15&es)==0&&(ef+=4,es>>>=4),(3&es)==0&&(ef+=2,es>>>=2),(1&es)==0&&ef++,ef},em.prototype.bitLength=function(){var ei=this.words[this.length-1],es=this._countBits(ei);return(this.length-1)*26+es},em.prototype.zeroBits=function(){if(this.isZero())return 0;for(var ei=0,es=0;esei.length?this.clone().ior(ei):ei.clone().ior(this)},em.prototype.uor=function(ei){return this.length>ei.length?this.clone().iuor(ei):ei.clone().iuor(this)},em.prototype.iuand=function(ei){var es;es=this.length>ei.length?ei:this;for(var ef=0;efei.length?this.clone().iand(ei):ei.clone().iand(this)},em.prototype.uand=function(ei){return this.length>ei.length?this.clone().iuand(ei):ei.clone().iuand(this)},em.prototype.iuxor=function(ei){this.length>ei.length?(es=this,ef=ei):(es=ei,ef=this);for(var es,ef,eu=0;euei.length?this.clone().ixor(ei):ei.clone().ixor(this)},em.prototype.uxor=function(ei){return this.length>ei.length?this.clone().iuxor(ei):ei.clone().iuxor(this)},em.prototype.inotn=function(ei){eu("number"==typeof ei&&ei>=0);var es=0|Math.ceil(ei/26),ef=ei%26;this._expand(es),ef>0&&es--;for(var ed=0;ed0&&(this.words[ed]=~this.words[ed]&67108863>>26-ef),this.strip()},em.prototype.notn=function(ei){return this.clone().inotn(ei)},em.prototype.setn=function(ei,es){eu("number"==typeof ei&&ei>=0);var ef=ei/26|0,ed=ei%26;return this._expand(ef+1),es?this.words[ef]=this.words[ef]|1<ei.length?(ef=this,eu=ei):(ef=ei,eu=this);for(var es,ef,eu,ed=0,em=0;em>>26;for(;0!==ed&&em>>26;if(this.length=ef.length,0!==ed)this.words[this.length]=ed,this.length++;else if(ef!==this)for(;emei.length?this.clone().iadd(ei):ei.clone().iadd(this)},em.prototype.isub=function(ei){if(0!==ei.negative){ei.negative=0;var es,ef,eu=this.iadd(ei);return ei.negative=1,eu._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(ei),this.negative=1,this._normSign();var ed=this.cmp(ei);if(0===ed)return this.negative=0,this.length=1,this.words[0]=0,this;ed>0?(es=this,ef=ei):(es=ei,ef=this);for(var em=0,eH=0;eH>26,this.words[eH]=67108863&eu;for(;0!==em&&eH>26,this.words[eH]=67108863&eu;if(0===em&&eH>>13,ey=0|eH[1],eC=8191&ey,ex=ey>>>13,ew=0|eH[2],eN=8191&ew,eS=ew>>>13,eA=0|eH[3],e_=8191&eA,eE=eA>>>13,eP=0|eH[4],eB=8191&eP,eT=eP>>>13,eI=0|eH[5],eR=8191&eI,eO=eI>>>13,ej=0|eH[6],eD=8191&ej,eF=ej>>>13,eU=0|eH[7],eq=8191&eU,eZ=eU>>>13,eG=0|eH[8],eW=8191&eG,eK=eG>>>13,e$=0|eH[9],eJ=8191&e$,eY=e$>>>13,eX=0|ez[0],eQ=8191&eX,e1=eX>>>13,e2=0|ez[1],e4=8191&e2,e3=e2>>>13,e6=0|ez[2],e0=8191&e6,e8=e6>>>13,e5=0|ez[3],e7=8191&e5,e9=e5>>>13,cc=0|ez[4],ci=8191&cc,co=cc>>>13,cs=0|ez[5],cf=8191&cs,cu=cs>>>13,cd=0|ez[6],cm=8191&cd,cH=cd>>>13,cz=0|ez[7],cV=8191&cz,cM=cz>>>13,cg=0|ez[8],cL=8191&cg,cy=cg>>>13,cC=0|ez[9],cx=8191&cC,cw=cC>>>13;ef.negative=ei.negative^es.negative,ef.length=19;var ck=(eM+(eu=Math.imul(eL,eQ))|0)+((8191&(ed=(ed=Math.imul(eL,e1))+Math.imul(eb,eQ)|0))<<13)|0;eM=((em=Math.imul(eb,e1))+(ed>>>13)|0)+(ck>>>26)|0,ck&=67108863,eu=Math.imul(eC,eQ),ed=(ed=Math.imul(eC,e1))+Math.imul(ex,eQ)|0,em=Math.imul(ex,e1);var cN=(eM+(eu=eu+Math.imul(eL,e4)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e3)|0)+Math.imul(eb,e4)|0))<<13)|0;eM=((em=em+Math.imul(eb,e3)|0)+(ed>>>13)|0)+(cN>>>26)|0,cN&=67108863,eu=Math.imul(eN,eQ),ed=(ed=Math.imul(eN,e1))+Math.imul(eS,eQ)|0,em=Math.imul(eS,e1),eu=eu+Math.imul(eC,e4)|0,ed=(ed=ed+Math.imul(eC,e3)|0)+Math.imul(ex,e4)|0,em=em+Math.imul(ex,e3)|0;var cS=(eM+(eu=eu+Math.imul(eL,e0)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e8)|0)+Math.imul(eb,e0)|0))<<13)|0;eM=((em=em+Math.imul(eb,e8)|0)+(ed>>>13)|0)+(cS>>>26)|0,cS&=67108863,eu=Math.imul(e_,eQ),ed=(ed=Math.imul(e_,e1))+Math.imul(eE,eQ)|0,em=Math.imul(eE,e1),eu=eu+Math.imul(eN,e4)|0,ed=(ed=ed+Math.imul(eN,e3)|0)+Math.imul(eS,e4)|0,em=em+Math.imul(eS,e3)|0,eu=eu+Math.imul(eC,e0)|0,ed=(ed=ed+Math.imul(eC,e8)|0)+Math.imul(ex,e0)|0,em=em+Math.imul(ex,e8)|0;var cA=(eM+(eu=eu+Math.imul(eL,e7)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e9)|0)+Math.imul(eb,e7)|0))<<13)|0;eM=((em=em+Math.imul(eb,e9)|0)+(ed>>>13)|0)+(cA>>>26)|0,cA&=67108863,eu=Math.imul(eB,eQ),ed=(ed=Math.imul(eB,e1))+Math.imul(eT,eQ)|0,em=Math.imul(eT,e1),eu=eu+Math.imul(e_,e4)|0,ed=(ed=ed+Math.imul(e_,e3)|0)+Math.imul(eE,e4)|0,em=em+Math.imul(eE,e3)|0,eu=eu+Math.imul(eN,e0)|0,ed=(ed=ed+Math.imul(eN,e8)|0)+Math.imul(eS,e0)|0,em=em+Math.imul(eS,e8)|0,eu=eu+Math.imul(eC,e7)|0,ed=(ed=ed+Math.imul(eC,e9)|0)+Math.imul(ex,e7)|0,em=em+Math.imul(ex,e9)|0;var c_=(eM+(eu=eu+Math.imul(eL,ci)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,co)|0)+Math.imul(eb,ci)|0))<<13)|0;eM=((em=em+Math.imul(eb,co)|0)+(ed>>>13)|0)+(c_>>>26)|0,c_&=67108863,eu=Math.imul(eR,eQ),ed=(ed=Math.imul(eR,e1))+Math.imul(eO,eQ)|0,em=Math.imul(eO,e1),eu=eu+Math.imul(eB,e4)|0,ed=(ed=ed+Math.imul(eB,e3)|0)+Math.imul(eT,e4)|0,em=em+Math.imul(eT,e3)|0,eu=eu+Math.imul(e_,e0)|0,ed=(ed=ed+Math.imul(e_,e8)|0)+Math.imul(eE,e0)|0,em=em+Math.imul(eE,e8)|0,eu=eu+Math.imul(eN,e7)|0,ed=(ed=ed+Math.imul(eN,e9)|0)+Math.imul(eS,e7)|0,em=em+Math.imul(eS,e9)|0,eu=eu+Math.imul(eC,ci)|0,ed=(ed=ed+Math.imul(eC,co)|0)+Math.imul(ex,ci)|0,em=em+Math.imul(ex,co)|0;var cE=(eM+(eu=eu+Math.imul(eL,cf)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cu)|0)+Math.imul(eb,cf)|0))<<13)|0;eM=((em=em+Math.imul(eb,cu)|0)+(ed>>>13)|0)+(cE>>>26)|0,cE&=67108863,eu=Math.imul(eD,eQ),ed=(ed=Math.imul(eD,e1))+Math.imul(eF,eQ)|0,em=Math.imul(eF,e1),eu=eu+Math.imul(eR,e4)|0,ed=(ed=ed+Math.imul(eR,e3)|0)+Math.imul(eO,e4)|0,em=em+Math.imul(eO,e3)|0,eu=eu+Math.imul(eB,e0)|0,ed=(ed=ed+Math.imul(eB,e8)|0)+Math.imul(eT,e0)|0,em=em+Math.imul(eT,e8)|0,eu=eu+Math.imul(e_,e7)|0,ed=(ed=ed+Math.imul(e_,e9)|0)+Math.imul(eE,e7)|0,em=em+Math.imul(eE,e9)|0,eu=eu+Math.imul(eN,ci)|0,ed=(ed=ed+Math.imul(eN,co)|0)+Math.imul(eS,ci)|0,em=em+Math.imul(eS,co)|0,eu=eu+Math.imul(eC,cf)|0,ed=(ed=ed+Math.imul(eC,cu)|0)+Math.imul(ex,cf)|0,em=em+Math.imul(ex,cu)|0;var cP=(eM+(eu=eu+Math.imul(eL,cm)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cH)|0)+Math.imul(eb,cm)|0))<<13)|0;eM=((em=em+Math.imul(eb,cH)|0)+(ed>>>13)|0)+(cP>>>26)|0,cP&=67108863,eu=Math.imul(eq,eQ),ed=(ed=Math.imul(eq,e1))+Math.imul(eZ,eQ)|0,em=Math.imul(eZ,e1),eu=eu+Math.imul(eD,e4)|0,ed=(ed=ed+Math.imul(eD,e3)|0)+Math.imul(eF,e4)|0,em=em+Math.imul(eF,e3)|0,eu=eu+Math.imul(eR,e0)|0,ed=(ed=ed+Math.imul(eR,e8)|0)+Math.imul(eO,e0)|0,em=em+Math.imul(eO,e8)|0,eu=eu+Math.imul(eB,e7)|0,ed=(ed=ed+Math.imul(eB,e9)|0)+Math.imul(eT,e7)|0,em=em+Math.imul(eT,e9)|0,eu=eu+Math.imul(e_,ci)|0,ed=(ed=ed+Math.imul(e_,co)|0)+Math.imul(eE,ci)|0,em=em+Math.imul(eE,co)|0,eu=eu+Math.imul(eN,cf)|0,ed=(ed=ed+Math.imul(eN,cu)|0)+Math.imul(eS,cf)|0,em=em+Math.imul(eS,cu)|0,eu=eu+Math.imul(eC,cm)|0,ed=(ed=ed+Math.imul(eC,cH)|0)+Math.imul(ex,cm)|0,em=em+Math.imul(ex,cH)|0;var cB=(eM+(eu=eu+Math.imul(eL,cV)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cM)|0)+Math.imul(eb,cV)|0))<<13)|0;eM=((em=em+Math.imul(eb,cM)|0)+(ed>>>13)|0)+(cB>>>26)|0,cB&=67108863,eu=Math.imul(eW,eQ),ed=(ed=Math.imul(eW,e1))+Math.imul(eK,eQ)|0,em=Math.imul(eK,e1),eu=eu+Math.imul(eq,e4)|0,ed=(ed=ed+Math.imul(eq,e3)|0)+Math.imul(eZ,e4)|0,em=em+Math.imul(eZ,e3)|0,eu=eu+Math.imul(eD,e0)|0,ed=(ed=ed+Math.imul(eD,e8)|0)+Math.imul(eF,e0)|0,em=em+Math.imul(eF,e8)|0,eu=eu+Math.imul(eR,e7)|0,ed=(ed=ed+Math.imul(eR,e9)|0)+Math.imul(eO,e7)|0,em=em+Math.imul(eO,e9)|0,eu=eu+Math.imul(eB,ci)|0,ed=(ed=ed+Math.imul(eB,co)|0)+Math.imul(eT,ci)|0,em=em+Math.imul(eT,co)|0,eu=eu+Math.imul(e_,cf)|0,ed=(ed=ed+Math.imul(e_,cu)|0)+Math.imul(eE,cf)|0,em=em+Math.imul(eE,cu)|0,eu=eu+Math.imul(eN,cm)|0,ed=(ed=ed+Math.imul(eN,cH)|0)+Math.imul(eS,cm)|0,em=em+Math.imul(eS,cH)|0,eu=eu+Math.imul(eC,cV)|0,ed=(ed=ed+Math.imul(eC,cM)|0)+Math.imul(ex,cV)|0,em=em+Math.imul(ex,cM)|0;var cT=(eM+(eu=eu+Math.imul(eL,cL)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cy)|0)+Math.imul(eb,cL)|0))<<13)|0;eM=((em=em+Math.imul(eb,cy)|0)+(ed>>>13)|0)+(cT>>>26)|0,cT&=67108863,eu=Math.imul(eJ,eQ),ed=(ed=Math.imul(eJ,e1))+Math.imul(eY,eQ)|0,em=Math.imul(eY,e1),eu=eu+Math.imul(eW,e4)|0,ed=(ed=ed+Math.imul(eW,e3)|0)+Math.imul(eK,e4)|0,em=em+Math.imul(eK,e3)|0,eu=eu+Math.imul(eq,e0)|0,ed=(ed=ed+Math.imul(eq,e8)|0)+Math.imul(eZ,e0)|0,em=em+Math.imul(eZ,e8)|0,eu=eu+Math.imul(eD,e7)|0,ed=(ed=ed+Math.imul(eD,e9)|0)+Math.imul(eF,e7)|0,em=em+Math.imul(eF,e9)|0,eu=eu+Math.imul(eR,ci)|0,ed=(ed=ed+Math.imul(eR,co)|0)+Math.imul(eO,ci)|0,em=em+Math.imul(eO,co)|0,eu=eu+Math.imul(eB,cf)|0,ed=(ed=ed+Math.imul(eB,cu)|0)+Math.imul(eT,cf)|0,em=em+Math.imul(eT,cu)|0,eu=eu+Math.imul(e_,cm)|0,ed=(ed=ed+Math.imul(e_,cH)|0)+Math.imul(eE,cm)|0,em=em+Math.imul(eE,cH)|0,eu=eu+Math.imul(eN,cV)|0,ed=(ed=ed+Math.imul(eN,cM)|0)+Math.imul(eS,cV)|0,em=em+Math.imul(eS,cM)|0,eu=eu+Math.imul(eC,cL)|0,ed=(ed=ed+Math.imul(eC,cy)|0)+Math.imul(ex,cL)|0,em=em+Math.imul(ex,cy)|0;var cI=(eM+(eu=eu+Math.imul(eL,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cw)|0)+Math.imul(eb,cx)|0))<<13)|0;eM=((em=em+Math.imul(eb,cw)|0)+(ed>>>13)|0)+(cI>>>26)|0,cI&=67108863,eu=Math.imul(eJ,e4),ed=(ed=Math.imul(eJ,e3))+Math.imul(eY,e4)|0,em=Math.imul(eY,e3),eu=eu+Math.imul(eW,e0)|0,ed=(ed=ed+Math.imul(eW,e8)|0)+Math.imul(eK,e0)|0,em=em+Math.imul(eK,e8)|0,eu=eu+Math.imul(eq,e7)|0,ed=(ed=ed+Math.imul(eq,e9)|0)+Math.imul(eZ,e7)|0,em=em+Math.imul(eZ,e9)|0,eu=eu+Math.imul(eD,ci)|0,ed=(ed=ed+Math.imul(eD,co)|0)+Math.imul(eF,ci)|0,em=em+Math.imul(eF,co)|0,eu=eu+Math.imul(eR,cf)|0,ed=(ed=ed+Math.imul(eR,cu)|0)+Math.imul(eO,cf)|0,em=em+Math.imul(eO,cu)|0,eu=eu+Math.imul(eB,cm)|0,ed=(ed=ed+Math.imul(eB,cH)|0)+Math.imul(eT,cm)|0,em=em+Math.imul(eT,cH)|0,eu=eu+Math.imul(e_,cV)|0,ed=(ed=ed+Math.imul(e_,cM)|0)+Math.imul(eE,cV)|0,em=em+Math.imul(eE,cM)|0,eu=eu+Math.imul(eN,cL)|0,ed=(ed=ed+Math.imul(eN,cy)|0)+Math.imul(eS,cL)|0,em=em+Math.imul(eS,cy)|0;var cR=(eM+(eu=eu+Math.imul(eC,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eC,cw)|0)+Math.imul(ex,cx)|0))<<13)|0;eM=((em=em+Math.imul(ex,cw)|0)+(ed>>>13)|0)+(cR>>>26)|0,cR&=67108863,eu=Math.imul(eJ,e0),ed=(ed=Math.imul(eJ,e8))+Math.imul(eY,e0)|0,em=Math.imul(eY,e8),eu=eu+Math.imul(eW,e7)|0,ed=(ed=ed+Math.imul(eW,e9)|0)+Math.imul(eK,e7)|0,em=em+Math.imul(eK,e9)|0,eu=eu+Math.imul(eq,ci)|0,ed=(ed=ed+Math.imul(eq,co)|0)+Math.imul(eZ,ci)|0,em=em+Math.imul(eZ,co)|0,eu=eu+Math.imul(eD,cf)|0,ed=(ed=ed+Math.imul(eD,cu)|0)+Math.imul(eF,cf)|0,em=em+Math.imul(eF,cu)|0,eu=eu+Math.imul(eR,cm)|0,ed=(ed=ed+Math.imul(eR,cH)|0)+Math.imul(eO,cm)|0,em=em+Math.imul(eO,cH)|0,eu=eu+Math.imul(eB,cV)|0,ed=(ed=ed+Math.imul(eB,cM)|0)+Math.imul(eT,cV)|0,em=em+Math.imul(eT,cM)|0,eu=eu+Math.imul(e_,cL)|0,ed=(ed=ed+Math.imul(e_,cy)|0)+Math.imul(eE,cL)|0,em=em+Math.imul(eE,cy)|0;var cO=(eM+(eu=eu+Math.imul(eN,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eN,cw)|0)+Math.imul(eS,cx)|0))<<13)|0;eM=((em=em+Math.imul(eS,cw)|0)+(ed>>>13)|0)+(cO>>>26)|0,cO&=67108863,eu=Math.imul(eJ,e7),ed=(ed=Math.imul(eJ,e9))+Math.imul(eY,e7)|0,em=Math.imul(eY,e9),eu=eu+Math.imul(eW,ci)|0,ed=(ed=ed+Math.imul(eW,co)|0)+Math.imul(eK,ci)|0,em=em+Math.imul(eK,co)|0,eu=eu+Math.imul(eq,cf)|0,ed=(ed=ed+Math.imul(eq,cu)|0)+Math.imul(eZ,cf)|0,em=em+Math.imul(eZ,cu)|0,eu=eu+Math.imul(eD,cm)|0,ed=(ed=ed+Math.imul(eD,cH)|0)+Math.imul(eF,cm)|0,em=em+Math.imul(eF,cH)|0,eu=eu+Math.imul(eR,cV)|0,ed=(ed=ed+Math.imul(eR,cM)|0)+Math.imul(eO,cV)|0,em=em+Math.imul(eO,cM)|0,eu=eu+Math.imul(eB,cL)|0,ed=(ed=ed+Math.imul(eB,cy)|0)+Math.imul(eT,cL)|0,em=em+Math.imul(eT,cy)|0;var cj=(eM+(eu=eu+Math.imul(e_,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(e_,cw)|0)+Math.imul(eE,cx)|0))<<13)|0;eM=((em=em+Math.imul(eE,cw)|0)+(ed>>>13)|0)+(cj>>>26)|0,cj&=67108863,eu=Math.imul(eJ,ci),ed=(ed=Math.imul(eJ,co))+Math.imul(eY,ci)|0,em=Math.imul(eY,co),eu=eu+Math.imul(eW,cf)|0,ed=(ed=ed+Math.imul(eW,cu)|0)+Math.imul(eK,cf)|0,em=em+Math.imul(eK,cu)|0,eu=eu+Math.imul(eq,cm)|0,ed=(ed=ed+Math.imul(eq,cH)|0)+Math.imul(eZ,cm)|0,em=em+Math.imul(eZ,cH)|0,eu=eu+Math.imul(eD,cV)|0,ed=(ed=ed+Math.imul(eD,cM)|0)+Math.imul(eF,cV)|0,em=em+Math.imul(eF,cM)|0,eu=eu+Math.imul(eR,cL)|0,ed=(ed=ed+Math.imul(eR,cy)|0)+Math.imul(eO,cL)|0,em=em+Math.imul(eO,cy)|0;var cD=(eM+(eu=eu+Math.imul(eB,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eB,cw)|0)+Math.imul(eT,cx)|0))<<13)|0;eM=((em=em+Math.imul(eT,cw)|0)+(ed>>>13)|0)+(cD>>>26)|0,cD&=67108863,eu=Math.imul(eJ,cf),ed=(ed=Math.imul(eJ,cu))+Math.imul(eY,cf)|0,em=Math.imul(eY,cu),eu=eu+Math.imul(eW,cm)|0,ed=(ed=ed+Math.imul(eW,cH)|0)+Math.imul(eK,cm)|0,em=em+Math.imul(eK,cH)|0,eu=eu+Math.imul(eq,cV)|0,ed=(ed=ed+Math.imul(eq,cM)|0)+Math.imul(eZ,cV)|0,em=em+Math.imul(eZ,cM)|0,eu=eu+Math.imul(eD,cL)|0,ed=(ed=ed+Math.imul(eD,cy)|0)+Math.imul(eF,cL)|0,em=em+Math.imul(eF,cy)|0;var cF=(eM+(eu=eu+Math.imul(eR,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eR,cw)|0)+Math.imul(eO,cx)|0))<<13)|0;eM=((em=em+Math.imul(eO,cw)|0)+(ed>>>13)|0)+(cF>>>26)|0,cF&=67108863,eu=Math.imul(eJ,cm),ed=(ed=Math.imul(eJ,cH))+Math.imul(eY,cm)|0,em=Math.imul(eY,cH),eu=eu+Math.imul(eW,cV)|0,ed=(ed=ed+Math.imul(eW,cM)|0)+Math.imul(eK,cV)|0,em=em+Math.imul(eK,cM)|0,eu=eu+Math.imul(eq,cL)|0,ed=(ed=ed+Math.imul(eq,cy)|0)+Math.imul(eZ,cL)|0,em=em+Math.imul(eZ,cy)|0;var cU=(eM+(eu=eu+Math.imul(eD,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eD,cw)|0)+Math.imul(eF,cx)|0))<<13)|0;eM=((em=em+Math.imul(eF,cw)|0)+(ed>>>13)|0)+(cU>>>26)|0,cU&=67108863,eu=Math.imul(eJ,cV),ed=(ed=Math.imul(eJ,cM))+Math.imul(eY,cV)|0,em=Math.imul(eY,cM),eu=eu+Math.imul(eW,cL)|0,ed=(ed=ed+Math.imul(eW,cy)|0)+Math.imul(eK,cL)|0,em=em+Math.imul(eK,cy)|0;var cq=(eM+(eu=eu+Math.imul(eq,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eq,cw)|0)+Math.imul(eZ,cx)|0))<<13)|0;eM=((em=em+Math.imul(eZ,cw)|0)+(ed>>>13)|0)+(cq>>>26)|0,cq&=67108863,eu=Math.imul(eJ,cL),ed=(ed=Math.imul(eJ,cy))+Math.imul(eY,cL)|0,em=Math.imul(eY,cy);var cZ=(eM+(eu=eu+Math.imul(eW,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eW,cw)|0)+Math.imul(eK,cx)|0))<<13)|0;eM=((em=em+Math.imul(eK,cw)|0)+(ed>>>13)|0)+(cZ>>>26)|0,cZ&=67108863;var cG=(eM+(eu=Math.imul(eJ,cx))|0)+((8191&(ed=(ed=Math.imul(eJ,cw))+Math.imul(eY,cx)|0))<<13)|0;return eM=((em=Math.imul(eY,cw))+(ed>>>13)|0)+(cG>>>26)|0,cG&=67108863,eV[0]=ck,eV[1]=cN,eV[2]=cS,eV[3]=cA,eV[4]=c_,eV[5]=cE,eV[6]=cP,eV[7]=cB,eV[8]=cT,eV[9]=cI,eV[10]=cR,eV[11]=cO,eV[12]=cj,eV[13]=cD,eV[14]=cF,eV[15]=cU,eV[16]=cq,eV[17]=cZ,eV[18]=cG,0!==eM&&(eV[19]=eM,ef.length++),ef};function ex(ei,es,ef){ef.negative=es.negative^ei.negative,ef.length=ei.length+es.length;for(var eu=0,ed=0,em=0;em>>26)|0)>>>26,eH&=67108863}ef.words[em]=ez,eu=eH,eH=ed}return 0!==eu?ef.words[em]=eu:ef.length--,ef.strip()}function ew(ei,es,ef){return(new eN).mulp(ei,es,ef)}function eN(ei,es){this.x=ei,this.y=es}Math.imul||(eC=ey),em.prototype.mulTo=function(ei,es){var ef=this.length+ei.length;return 10===this.length&&10===ei.length?eC(this,ei,es):ef<63?ey(this,ei,es):ef<1024?ex(this,ei,es):ew(this,ei,es)},eN.prototype.makeRBT=function(ei){for(var es=Array(ei),ef=em.prototype._countBits(ei)-1,eu=0;eu>=1;return eu},eN.prototype.permute=function(ei,es,ef,eu,ed,em){for(var eH=0;eH>>=1)ed++;return 1<>>=13,ef[2*eH+1]=8191&em,em>>>=13;for(eH=2*es;eH>=26,es+=(ed/67108864|0)+(em>>>26),this.words[ef]=67108863&em}return 0!==es&&(this.words[ef]=es,this.length++),this},em.prototype.muln=function(ei){return this.clone().imuln(ei)},em.prototype.sqr=function(){return this.mul(this)},em.prototype.isqr=function(){return this.imul(this.clone())},em.prototype.pow=function(ei){var es=eb(ei);if(0===es.length)return new em(1);for(var ef=this,eu=0;eu=0);var es,ef=ei%26,ed=(ei-ef)/26,em=67108863>>>26-ef<<26-ef;if(0!==ef){var eH=0;for(es=0;es>>26-ef}eH&&(this.words[es]=eH,this.length++)}if(0!==ed){for(es=this.length-1;es>=0;es--)this.words[es+ed]=this.words[es];for(es=0;es=0),ed=es?(es-es%26)/26:0;var ed,em=ei%26,eH=Math.min((ei-em)/26,this.length),ez=67108863^67108863>>>em<eH)for(this.length-=eH,eM=0;eM=0&&(0!==eg||eM>=ed);eM--){var eL=0|this.words[eM];this.words[eM]=eg<<26-em|eL>>>em,eg=eL&ez}return eV&&0!==eg&&(eV.words[eV.length++]=eg),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},em.prototype.ishrn=function(ei,es,ef){return eu(0===this.negative),this.iushrn(ei,es,ef)},em.prototype.shln=function(ei){return this.clone().ishln(ei)},em.prototype.ushln=function(ei){return this.clone().iushln(ei)},em.prototype.shrn=function(ei){return this.clone().ishrn(ei)},em.prototype.ushrn=function(ei){return this.clone().iushrn(ei)},em.prototype.testn=function(ei){eu("number"==typeof ei&&ei>=0);var es=ei%26,ef=(ei-es)/26,ed=1<=0);var es=ei%26,ef=(ei-es)/26;if(eu(0===this.negative,"imaskn works only with positive numbers"),this.length<=ef)return this;if(0!==es&&ef++,this.length=Math.min(ef,this.length),0!==es){var ed=67108863^67108863>>>es<=67108864;es++)this.words[es]-=67108864,es===this.length-1?this.words[es+1]=1:this.words[es+1]++;return this.length=Math.max(this.length,es+1),this},em.prototype.isubn=function(ei){if(eu("number"==typeof ei),eu(ei<67108864),ei<0)return this.iaddn(-ei);if(0!==this.negative)return this.negative=0,this.iaddn(ei),this.negative=1,this;if(this.words[0]-=ei,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var es=0;es>26)-(eV/67108864|0),this.words[ed+ef]=67108863&em}for(;ed>26,this.words[ed+ef]=67108863&em;if(0===ez)return this.strip();for(eu(-1===ez),ez=0,ed=0;ed>26,this.words[ed]=67108863&em;return this.negative=1,this.strip()},em.prototype._wordDiv=function(ei,es){var ef,eu=this.length-ei.length,ed=this.clone(),eH=ei,ez=0|eH.words[eH.length-1];0!=(eu=26-this._countBits(ez))&&(eH=eH.ushln(eu),ed.iushln(eu),ez=0|eH.words[eH.length-1]);var eV=ed.length-eH.length;if("mod"!==es){(ef=new em(null)).length=eV+1,ef.words=Array(ef.length);for(var eM=0;eM=0;eL--){var eb=(0|ed.words[eH.length+eL])*67108864+(0|ed.words[eH.length+eL-1]);for(eb=Math.min(eb/ez|0,67108863),ed._ishlnsubmul(eH,eb,eL);0!==ed.negative;)eb--,ed.negative=0,ed._ishlnsubmul(eH,1,eL),ed.isZero()||(ed.negative^=1);ef&&(ef.words[eL]=eb)}return ef&&ef.strip(),ed.strip(),"div"!==es&&0!==eu&&ed.iushrn(eu),{div:ef||null,mod:ed}},em.prototype.divmod=function(ei,es,ef){var ed,eH,ez;return(eu(!ei.isZero()),this.isZero())?{div:new em(0),mod:new em(0)}:0!==this.negative&&0===ei.negative?(ez=this.neg().divmod(ei,es),"mod"!==es&&(ed=ez.div.neg()),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.iadd(ei)),{div:ed,mod:eH}):0===this.negative&&0!==ei.negative?(ez=this.divmod(ei.neg(),es),"mod"!==es&&(ed=ez.div.neg()),{div:ed,mod:ez.mod}):(this.negative&ei.negative)!=0?(ez=this.neg().divmod(ei.neg(),es),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.isub(ei)),{div:ez.div,mod:eH}):ei.length>this.length||0>this.cmp(ei)?{div:new em(0),mod:this}:1===ei.length?"div"===es?{div:this.divn(ei.words[0]),mod:null}:"mod"===es?{div:null,mod:new em(this.modn(ei.words[0]))}:{div:this.divn(ei.words[0]),mod:new em(this.modn(ei.words[0]))}:this._wordDiv(ei,es)},em.prototype.div=function(ei){return this.divmod(ei,"div",!1).div},em.prototype.mod=function(ei){return this.divmod(ei,"mod",!1).mod},em.prototype.umod=function(ei){return this.divmod(ei,"mod",!0).mod},em.prototype.divRound=function(ei){var es=this.divmod(ei);if(es.mod.isZero())return es.div;var ef=0!==es.div.negative?es.mod.isub(ei):es.mod,eu=ei.ushrn(1),ed=ei.andln(1),em=ef.cmp(eu);return em<0||1===ed&&0===em?es.div:0!==es.div.negative?es.div.isubn(1):es.div.iaddn(1)},em.prototype.modn=function(ei){eu(ei<=67108863);for(var es=67108864%ei,ef=0,ed=this.length-1;ed>=0;ed--)ef=(es*ef+(0|this.words[ed]))%ei;return ef},em.prototype.idivn=function(ei){eu(ei<=67108863);for(var es=0,ef=this.length-1;ef>=0;ef--){var ed=(0|this.words[ef])+67108864*es;this.words[ef]=ed/ei|0,es=ed%ei}return this.strip()},em.prototype.divn=function(ei){return this.clone().idivn(ei)},em.prototype.egcd=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es=this,ef=ei.clone();es=0!==es.negative?es.umod(ei):es.clone();for(var ed=new em(1),eH=new em(0),ez=new em(0),eV=new em(1),eM=0;es.isEven()&&ef.isEven();)es.iushrn(1),ef.iushrn(1),++eM;for(var eg=ef.clone(),eL=es.clone();!es.isZero();){for(var eb=0,ey=1;(es.words[0]&ey)==0&&eb<26;++eb,ey<<=1);if(eb>0)for(es.iushrn(eb);eb-- >0;)(ed.isOdd()||eH.isOdd())&&(ed.iadd(eg),eH.isub(eL)),ed.iushrn(1),eH.iushrn(1);for(var eC=0,ex=1;(ef.words[0]&ex)==0&&eC<26;++eC,ex<<=1);if(eC>0)for(ef.iushrn(eC);eC-- >0;)(ez.isOdd()||eV.isOdd())&&(ez.iadd(eg),eV.isub(eL)),ez.iushrn(1),eV.iushrn(1);es.cmp(ef)>=0?(es.isub(ef),ed.isub(ez),eH.isub(eV)):(ef.isub(es),ez.isub(ed),eV.isub(eH))}return{a:ez,b:eV,gcd:ef.iushln(eM)}},em.prototype._invmp=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es,ef=this,ed=ei.clone();ef=0!==ef.negative?ef.umod(ei):ef.clone();for(var eH=new em(1),ez=new em(0),eV=ed.clone();ef.cmpn(1)>0&&ed.cmpn(1)>0;){for(var eM=0,eg=1;(ef.words[0]&eg)==0&&eM<26;++eM,eg<<=1);if(eM>0)for(ef.iushrn(eM);eM-- >0;)eH.isOdd()&&eH.iadd(eV),eH.iushrn(1);for(var eL=0,eb=1;(ed.words[0]&eb)==0&&eL<26;++eL,eb<<=1);if(eL>0)for(ed.iushrn(eL);eL-- >0;)ez.isOdd()&&ez.iadd(eV),ez.iushrn(1);ef.cmp(ed)>=0?(ef.isub(ed),eH.isub(ez)):(ed.isub(ef),ez.isub(eH))}return 0>(es=0===ef.cmpn(1)?eH:ez).cmpn(0)&&es.iadd(ei),es},em.prototype.gcd=function(ei){if(this.isZero())return ei.abs();if(ei.isZero())return this.abs();var es=this.clone(),ef=ei.clone();es.negative=0,ef.negative=0;for(var eu=0;es.isEven()&&ef.isEven();eu++)es.iushrn(1),ef.iushrn(1);for(;;){for(;es.isEven();)es.iushrn(1);for(;ef.isEven();)ef.iushrn(1);var ed=es.cmp(ef);if(ed<0){var em=es;es=ef,ef=em}else if(0===ed||0===ef.cmpn(1))break;es.isub(ef)}return ef.iushln(eu)},em.prototype.invm=function(ei){return this.egcd(ei).a.umod(ei)},em.prototype.isEven=function(){return(1&this.words[0])==0},em.prototype.isOdd=function(){return(1&this.words[0])==1},em.prototype.andln=function(ei){return this.words[0]&ei},em.prototype.bincn=function(ei){eu("number"==typeof ei);var es=ei%26,ef=(ei-es)/26,ed=1<>>26,ez&=67108863,this.words[eH]=ez}return 0!==em&&(this.words[eH]=em,this.length++),this},em.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},em.prototype.cmpn=function(ei){var es,ef=ei<0;if(0!==this.negative&&!ef)return -1;if(0===this.negative&&ef)return 1;if(this.strip(),this.length>1)es=1;else{ef&&(ei=-ei),eu(ei<=67108863,"Number is too big");var ed=0|this.words[0];es=ed===ei?0:edei.length)return 1;if(this.length=0;ef--){var eu=0|this.words[ef],ed=0|ei.words[ef];if(eu!==ed){eued&&(es=1);break}}return es},em.prototype.gtn=function(ei){return 1===this.cmpn(ei)},em.prototype.gt=function(ei){return 1===this.cmp(ei)},em.prototype.gten=function(ei){return this.cmpn(ei)>=0},em.prototype.gte=function(ei){return this.cmp(ei)>=0},em.prototype.ltn=function(ei){return -1===this.cmpn(ei)},em.prototype.lt=function(ei){return -1===this.cmp(ei)},em.prototype.lten=function(ei){return 0>=this.cmpn(ei)},em.prototype.lte=function(ei){return 0>=this.cmp(ei)},em.prototype.eqn=function(ei){return 0===this.cmpn(ei)},em.prototype.eq=function(ei){return 0===this.cmp(ei)},em.red=function(ei){return new eT(ei)},em.prototype.toRed=function(ei){return eu(!this.red,"Already a number in reduction context"),eu(0===this.negative,"red works only with positives"),ei.convertTo(this)._forceRed(ei)},em.prototype.fromRed=function(){return eu(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},em.prototype._forceRed=function(ei){return this.red=ei,this},em.prototype.forceRed=function(ei){return eu(!this.red,"Already a number in reduction context"),this._forceRed(ei)},em.prototype.redAdd=function(ei){return eu(this.red,"redAdd works only with red numbers"),this.red.add(this,ei)},em.prototype.redIAdd=function(ei){return eu(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,ei)},em.prototype.redSub=function(ei){return eu(this.red,"redSub works only with red numbers"),this.red.sub(this,ei)},em.prototype.redISub=function(ei){return eu(this.red,"redISub works only with red numbers"),this.red.isub(this,ei)},em.prototype.redShl=function(ei){return eu(this.red,"redShl works only with red numbers"),this.red.shl(this,ei)},em.prototype.redMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.mul(this,ei)},em.prototype.redIMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.imul(this,ei)},em.prototype.redSqr=function(){return eu(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},em.prototype.redISqr=function(){return eu(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},em.prototype.redSqrt=function(){return eu(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},em.prototype.redInvm=function(){return eu(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},em.prototype.redNeg=function(){return eu(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},em.prototype.redPow=function(ei){return eu(this.red&&!ei.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,ei)};var eS={k256:null,p224:null,p192:null,p25519:null};function eA(ei,es){this.name=ei,this.p=new em(es,16),this.n=this.p.bitLength(),this.k=new em(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function e_(){eA.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function eE(){eA.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function eP(){eA.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function eB(){eA.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function eT(ei){if("string"==typeof ei){var es=em._prime(ei);this.m=es.p,this.prime=es}else eu(ei.gtn(1),"modulus must be greater than 1"),this.m=ei,this.prime=null}function eI(ei){eT.call(this,ei),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new em(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)}eA.prototype._tmp=function(){var ei=new em(null);return ei.words=Array(Math.ceil(this.n/13)),ei},eA.prototype.ireduce=function(ei){var es,ef=ei;do this.split(ef,this.tmp),es=(ef=(ef=this.imulK(ef)).iadd(this.tmp)).bitLength();while(es>this.n);var eu=es0?ef.isub(this.p):void 0!==ef.strip?ef.strip():ef._strip(),ef},eA.prototype.split=function(ei,es){ei.iushrn(this.n,0,es)},eA.prototype.imulK=function(ei){return ei.imul(this.k)},ed(e_,eA),e_.prototype.split=function(ei,es){for(var ef=4194303,eu=Math.min(ei.length,9),ed=0;ed>>22,em=eH}em>>>=22,ei.words[ed-10]=em,0===em&&ei.length>10?ei.length-=10:ei.length-=9},e_.prototype.imulK=function(ei){ei.words[ei.length]=0,ei.words[ei.length+1]=0,ei.length+=2;for(var es=0,ef=0;ef>>=26,ei.words[ef]=ed,es=eu}return 0!==es&&(ei.words[ei.length++]=es),ei},em._prime=function(ei){var es;if(eS[ei])return eS[ei];if("k256"===ei)es=new e_;else if("p224"===ei)es=new eE;else if("p192"===ei)es=new eP;else if("p25519"===ei)es=new eB;else throw Error("Unknown prime "+ei);return eS[ei]=es,es},eT.prototype._verify1=function(ei){eu(0===ei.negative,"red works only with positives"),eu(ei.red,"red works only with red numbers")},eT.prototype._verify2=function(ei,es){eu((ei.negative|es.negative)==0,"red works only with positives"),eu(ei.red&&ei.red===es.red,"red works only with red numbers")},eT.prototype.imod=function(ei){return this.prime?this.prime.ireduce(ei)._forceRed(this):ei.umod(this.m)._forceRed(this)},eT.prototype.neg=function(ei){return ei.isZero()?ei.clone():this.m.sub(ei)._forceRed(this)},eT.prototype.add=function(ei,es){this._verify2(ei,es);var ef=ei.add(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef._forceRed(this)},eT.prototype.iadd=function(ei,es){this._verify2(ei,es);var ef=ei.iadd(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef},eT.prototype.sub=function(ei,es){this._verify2(ei,es);var ef=ei.sub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef._forceRed(this)},eT.prototype.isub=function(ei,es){this._verify2(ei,es);var ef=ei.isub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef},eT.prototype.shl=function(ei,es){return this._verify1(ei),this.imod(ei.ushln(es))},eT.prototype.imul=function(ei,es){return this._verify2(ei,es),this.imod(ei.imul(es))},eT.prototype.mul=function(ei,es){return this._verify2(ei,es),this.imod(ei.mul(es))},eT.prototype.isqr=function(ei){return this.imul(ei,ei.clone())},eT.prototype.sqr=function(ei){return this.mul(ei,ei)},eT.prototype.sqrt=function(ei){if(ei.isZero())return ei.clone();var es=this.m.andln(3);if(eu(es%2==1),3===es){var ef=this.m.add(new em(1)).iushrn(2);return this.pow(ei,ef)}for(var ed=this.m.subn(1),eH=0;!ed.isZero()&&0===ed.andln(1);)eH++,ed.iushrn(1);eu(!ed.isZero());var ez=new em(1).toRed(this),eV=ez.redNeg(),eM=this.m.subn(1).iushrn(1),eg=this.m.bitLength();for(eg=new em(2*eg*eg).toRed(this);0!==this.pow(eg,eM).cmp(eV);)eg.redIAdd(eV);for(var eL=this.pow(eg,ed),eb=this.pow(ei,ed.addn(1).iushrn(1)),ey=this.pow(ei,ed),eC=eH;0!==ey.cmp(ez);){for(var ex=ey,ew=0;0!==ex.cmp(ez);ew++)ex=ex.redSqr();eu(ew=0;ed--){for(var eg=es.words[ed],eL=eM-1;eL>=0;eL--){var eb=eg>>eL&1;if(eH!==eu[0]&&(eH=this.sqr(eH)),0===eb&&0===ez){eV=0;continue}ez<<=1,ez|=eb,(++eV===ef||0===ed&&0===eL)&&(eH=this.mul(eH,eu[ez]),eV=0,ez=0)}eM=26}return eH},eT.prototype.convertTo=function(ei){var es=ei.umod(this.m);return es===ei?es.clone():es},eT.prototype.convertFrom=function(ei){var es=ei.clone();return es.red=null,es},em.mont=function(ei){return new eI(ei)},ed(eI,eT),eI.prototype.convertTo=function(ei){return this.imod(ei.ushln(this.shift))},eI.prototype.convertFrom=function(ei){var es=this.imod(ei.mul(this.rinv));return es.red=null,es},eI.prototype.imul=function(ei,es){if(ei.isZero()||es.isZero())return ei.words[0]=0,ei.length=1,ei;var ef=ei.imul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),em=ed;return ed.cmp(this.m)>=0?em=ed.isub(this.m):0>ed.cmpn(0)&&(em=ed.iadd(this.m)),em._forceRed(this)},eI.prototype.mul=function(ei,es){if(ei.isZero()||es.isZero())return new em(0)._forceRed(this);var ef=ei.mul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),eH=ed;return ed.cmp(this.m)>=0?eH=ed.isub(this.m):0>ed.cmpn(0)&&(eH=ed.iadd(this.m)),eH._forceRed(this)},eI.prototype.invm=function(ei){return this.imod(ei._invmp(this.m).mul(this.r2))._forceRed(this)}}(ei=ef.nmd(ei),this)},1670:function(ei,es,ef){!function(ei,es){"use strict";function eu(ei,es){if(!ei)throw Error(es||"Assertion failed")}function ed(ei,es){ei.super_=es;var ef=function(){};ef.prototype=es.prototype,ei.prototype=new ef,ei.prototype.constructor=ei}function em(ei,es,ef){if(em.isBN(ei))return ei;this.negative=0,this.words=null,this.length=0,this.red=null,null!==ei&&(("le"===es||"be"===es)&&(ef=es,es=10),this._init(ei||0,es||10,ef||"be"))}"object"==typeof ei?ei.exports=em:es.BN=em,em.BN=em,em.wordSize=26;try{eg=ef(4300).Buffer}catch(ei){}function eH(ei,es,ef){for(var ed=0,em=Math.min(ei.length,ef),eH=0,ez=es;ez=49&&eM<=54?eM-49+10:eM>=17&&eM<=22?eM-17+10:eM,eH|=eV}return eu(!(240&eH),"Invalid character in "+ei),ed}function ez(ei,es,ef,ed){for(var em=0,eH=0,ez=Math.min(ei.length,ef),eV=es;eV=49?eM-49+10:eM>=17?eM-17+10:eM,eu(eM>=0&&eH"}em.isBN=function(ei){return ei instanceof em||null!==ei&&"object"==typeof ei&&ei.constructor.wordSize===em.wordSize&&Array.isArray(ei.words)},em.max=function(ei,es){return ei.cmp(es)>0?ei:es},em.min=function(ei,es){return 0>ei.cmp(es)?ei:es},em.prototype._init=function(ei,es,ef){if("number"==typeof ei)return this._initNumber(ei,es,ef);if("object"==typeof ei)return this._initArray(ei,es,ef);"hex"===es&&(es=16),eu(es===(0|es)&&es>=2&&es<=36);var ed=0;"-"===(ei=ei.toString().replace(/\s+/g,""))[0]&&ed++,16===es?this._parseHex(ei,ed):this._parseBase(ei,es,ed),"-"===ei[0]&&(this.negative=1),this._strip(),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initNumber=function(ei,es,ef){ei<0&&(this.negative=1,ei=-ei),ei<67108864?(this.words=[67108863&ei],this.length=1):ei<4503599627370496?(this.words=[67108863&ei,ei/67108864&67108863],this.length=2):(eu(ei<9007199254740992),this.words=[67108863&ei,ei/67108864&67108863,1],this.length=3),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initArray=function(ei,es,ef){if(eu("number"==typeof ei.length),ei.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(ei.length/3),this.words=Array(this.length);for(var ed,em,eH=0;eH=0;eH-=3)em=ei[eH]|ei[eH-1]<<8|ei[eH-2]<<16,this.words[ed]|=em<>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);else if("le"===ef)for(eH=0,ed=0;eH>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);return this._strip()},em.prototype._parseHex=function(ei,es){this.length=Math.ceil((ei.length-es)/6),this.words=Array(this.length);for(var ef,eu,ed=0;ed=es;ed-=6)eu=eH(ei,ed,ed+6),this.words[ef]|=eu<>>26-em&4194303,(em+=24)>=26&&(em-=26,ef++);ed+6!==es&&(eu=eH(ei,es,ed+6),this.words[ef]|=eu<>>26-em&4194303),this._strip()},em.prototype._parseBase=function(ei,es,ef){this.words=[0],this.length=1;for(var eu=0,ed=1;ed<=67108863;ed*=es)eu++;eu--,ed=ed/es|0;for(var em=ei.length-ef,eH=em%eu,eV=Math.min(em,em-eH)+ef,eM=0,eg=ef;eg1&&0===this.words[this.length-1];)this.length--;return this._normSign()},em.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?em.prototype[Symbol.for("nodejs.util.inspect.custom")]=eM:em.prototype.inspect=eM;var eg,eL=["","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"],eb=[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],ey=[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];em.prototype.toString=function(ei,es){if(es=0|es||1,16===(ei=ei||10)||"hex"===ei){ef="";for(var ef,ed=0,em=0,eH=0;eH>>24-ed&16777215)||eH!==this.length-1?eL[6-eV.length]+eV+ef:eV+ef,(ed+=2)>=26&&(ed-=26,eH--)}for(0!==em&&(ef=em.toString(16)+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}if(ei===(0|ei)&&ei>=2&&ei<=36){var eM=eb[ei],eg=ey[ei];ef="";var eC=this.clone();for(eC.negative=0;!eC.isZero();){var ex=eC.modrn(eg).toString(ei);ef=(eC=eC.idivn(eg)).isZero()?ex+ef:eL[eM-ex.length]+ex+ef}for(this.isZero()&&(ef="0"+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}eu(!1,"Base should be between 2 and 36")},em.prototype.toNumber=function(){var ei=this.words[0];return 2===this.length?ei+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ei+=4503599627370496+67108864*this.words[1]:this.length>2&&eu(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ei:ei},em.prototype.toJSON=function(){return this.toString(16,2)},eg&&(em.prototype.toBuffer=function(ei,es){return this.toArrayLike(eg,ei,es)}),em.prototype.toArray=function(ei,es){return this.toArrayLike(Array,ei,es)};var eC=function(ei,es){return ei.allocUnsafe?ei.allocUnsafe(es):new ei(es)};function ex(ei){for(var es=Array(ei.bitLength()),ef=0;ef>>ed&1}return es}function ew(ei,es,ef){ef.negative=es.negative^ei.negative;var eu=ei.length+es.length|0;ef.length=eu,eu=eu-1|0;var ed=0|ei.words[0],em=0|es.words[0],eH=ed*em,ez=67108863&eH,eV=eH/67108864|0;ef.words[0]=ez;for(var eM=1;eM>>26,eL=67108863&eV,eb=Math.min(eM,es.length-1),ey=Math.max(0,eM-ei.length+1);ey<=eb;ey++){var eC=eM-ey|0;eg+=(eH=(ed=0|ei.words[eC])*(em=0|es.words[ey])+eL)/67108864|0,eL=67108863&eH}ef.words[eM]=0|eL,eV=0|eg}return 0!==eV?ef.words[eM]=0|eV:ef.length--,ef._strip()}em.prototype.toArrayLike=function(ei,es,ef){this._strip();var ed=this.byteLength(),em=ef||Math.max(1,ed);eu(ed<=em,"byte array longer than desired length"),eu(em>0,"Requested array length <= 0");var eH=eC(ei,em);return this["_toArrayLike"+("le"===es?"LE":"BE")](eH,ed),eH},em.prototype._toArrayLikeLE=function(ei,es){for(var ef=0,eu=0,ed=0,em=0;ed>8&255),ef>16&255),6===em?(ef>24&255),eu=0,em=0):(eu=eH>>>24,em+=2)}if(ef=0&&(ei[ef--]=eH>>8&255),ef>=0&&(ei[ef--]=eH>>16&255),6===em?(ef>=0&&(ei[ef--]=eH>>24&255),eu=0,em=0):(eu=eH>>>24,em+=2)}if(ef>=0)for(ei[ef--]=eu;ef>=0;)ei[ef--]=0},Math.clz32?em.prototype._countBits=function(ei){return 32-Math.clz32(ei)}:em.prototype._countBits=function(ei){var es=ei,ef=0;return es>=4096&&(ef+=13,es>>>=13),es>=64&&(ef+=7,es>>>=7),es>=8&&(ef+=4,es>>>=4),es>=2&&(ef+=2,es>>>=2),ef+es},em.prototype._zeroBits=function(ei){if(0===ei)return 26;var es=ei,ef=0;return(8191&es)==0&&(ef+=13,es>>>=13),(127&es)==0&&(ef+=7,es>>>=7),(15&es)==0&&(ef+=4,es>>>=4),(3&es)==0&&(ef+=2,es>>>=2),(1&es)==0&&ef++,ef},em.prototype.bitLength=function(){var ei=this.words[this.length-1],es=this._countBits(ei);return(this.length-1)*26+es},em.prototype.zeroBits=function(){if(this.isZero())return 0;for(var ei=0,es=0;esei.length?this.clone().ior(ei):ei.clone().ior(this)},em.prototype.uor=function(ei){return this.length>ei.length?this.clone().iuor(ei):ei.clone().iuor(this)},em.prototype.iuand=function(ei){var es;es=this.length>ei.length?ei:this;for(var ef=0;efei.length?this.clone().iand(ei):ei.clone().iand(this)},em.prototype.uand=function(ei){return this.length>ei.length?this.clone().iuand(ei):ei.clone().iuand(this)},em.prototype.iuxor=function(ei){this.length>ei.length?(es=this,ef=ei):(es=ei,ef=this);for(var es,ef,eu=0;euei.length?this.clone().ixor(ei):ei.clone().ixor(this)},em.prototype.uxor=function(ei){return this.length>ei.length?this.clone().iuxor(ei):ei.clone().iuxor(this)},em.prototype.inotn=function(ei){eu("number"==typeof ei&&ei>=0);var es=0|Math.ceil(ei/26),ef=ei%26;this._expand(es),ef>0&&es--;for(var ed=0;ed0&&(this.words[ed]=~this.words[ed]&67108863>>26-ef),this._strip()},em.prototype.notn=function(ei){return this.clone().inotn(ei)},em.prototype.setn=function(ei,es){eu("number"==typeof ei&&ei>=0);var ef=ei/26|0,ed=ei%26;return this._expand(ef+1),es?this.words[ef]=this.words[ef]|1<ei.length?(ef=this,eu=ei):(ef=ei,eu=this);for(var es,ef,eu,ed=0,em=0;em>>26;for(;0!==ed&&em>>26;if(this.length=ef.length,0!==ed)this.words[this.length]=ed,this.length++;else if(ef!==this)for(;emei.length?this.clone().iadd(ei):ei.clone().iadd(this)},em.prototype.isub=function(ei){if(0!==ei.negative){ei.negative=0;var es,ef,eu=this.iadd(ei);return ei.negative=1,eu._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(ei),this.negative=1,this._normSign();var ed=this.cmp(ei);if(0===ed)return this.negative=0,this.length=1,this.words[0]=0,this;ed>0?(es=this,ef=ei):(es=ei,ef=this);for(var em=0,eH=0;eH>26,this.words[eH]=67108863&eu;for(;0!==em&&eH>26,this.words[eH]=67108863&eu;if(0===em&&eH>>13,ey=0|eH[1],eC=8191&ey,ex=ey>>>13,ew=0|eH[2],eN=8191&ew,eS=ew>>>13,eA=0|eH[3],e_=8191&eA,eE=eA>>>13,eP=0|eH[4],eB=8191&eP,eT=eP>>>13,eI=0|eH[5],eR=8191&eI,eO=eI>>>13,ej=0|eH[6],eD=8191&ej,eF=ej>>>13,eU=0|eH[7],eq=8191&eU,eZ=eU>>>13,eG=0|eH[8],eW=8191&eG,eK=eG>>>13,e$=0|eH[9],eJ=8191&e$,eY=e$>>>13,eX=0|ez[0],eQ=8191&eX,e1=eX>>>13,e2=0|ez[1],e4=8191&e2,e3=e2>>>13,e6=0|ez[2],e0=8191&e6,e8=e6>>>13,e5=0|ez[3],e7=8191&e5,e9=e5>>>13,cc=0|ez[4],ci=8191&cc,co=cc>>>13,cs=0|ez[5],cf=8191&cs,cu=cs>>>13,cd=0|ez[6],cm=8191&cd,cH=cd>>>13,cz=0|ez[7],cV=8191&cz,cM=cz>>>13,cg=0|ez[8],cL=8191&cg,cy=cg>>>13,cC=0|ez[9],cx=8191&cC,cw=cC>>>13;ef.negative=ei.negative^es.negative,ef.length=19;var ck=(eM+(eu=Math.imul(eL,eQ))|0)+((8191&(ed=(ed=Math.imul(eL,e1))+Math.imul(eb,eQ)|0))<<13)|0;eM=((em=Math.imul(eb,e1))+(ed>>>13)|0)+(ck>>>26)|0,ck&=67108863,eu=Math.imul(eC,eQ),ed=(ed=Math.imul(eC,e1))+Math.imul(ex,eQ)|0,em=Math.imul(ex,e1);var cN=(eM+(eu=eu+Math.imul(eL,e4)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e3)|0)+Math.imul(eb,e4)|0))<<13)|0;eM=((em=em+Math.imul(eb,e3)|0)+(ed>>>13)|0)+(cN>>>26)|0,cN&=67108863,eu=Math.imul(eN,eQ),ed=(ed=Math.imul(eN,e1))+Math.imul(eS,eQ)|0,em=Math.imul(eS,e1),eu=eu+Math.imul(eC,e4)|0,ed=(ed=ed+Math.imul(eC,e3)|0)+Math.imul(ex,e4)|0,em=em+Math.imul(ex,e3)|0;var cS=(eM+(eu=eu+Math.imul(eL,e0)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e8)|0)+Math.imul(eb,e0)|0))<<13)|0;eM=((em=em+Math.imul(eb,e8)|0)+(ed>>>13)|0)+(cS>>>26)|0,cS&=67108863,eu=Math.imul(e_,eQ),ed=(ed=Math.imul(e_,e1))+Math.imul(eE,eQ)|0,em=Math.imul(eE,e1),eu=eu+Math.imul(eN,e4)|0,ed=(ed=ed+Math.imul(eN,e3)|0)+Math.imul(eS,e4)|0,em=em+Math.imul(eS,e3)|0,eu=eu+Math.imul(eC,e0)|0,ed=(ed=ed+Math.imul(eC,e8)|0)+Math.imul(ex,e0)|0,em=em+Math.imul(ex,e8)|0;var cA=(eM+(eu=eu+Math.imul(eL,e7)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e9)|0)+Math.imul(eb,e7)|0))<<13)|0;eM=((em=em+Math.imul(eb,e9)|0)+(ed>>>13)|0)+(cA>>>26)|0,cA&=67108863,eu=Math.imul(eB,eQ),ed=(ed=Math.imul(eB,e1))+Math.imul(eT,eQ)|0,em=Math.imul(eT,e1),eu=eu+Math.imul(e_,e4)|0,ed=(ed=ed+Math.imul(e_,e3)|0)+Math.imul(eE,e4)|0,em=em+Math.imul(eE,e3)|0,eu=eu+Math.imul(eN,e0)|0,ed=(ed=ed+Math.imul(eN,e8)|0)+Math.imul(eS,e0)|0,em=em+Math.imul(eS,e8)|0,eu=eu+Math.imul(eC,e7)|0,ed=(ed=ed+Math.imul(eC,e9)|0)+Math.imul(ex,e7)|0,em=em+Math.imul(ex,e9)|0;var c_=(eM+(eu=eu+Math.imul(eL,ci)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,co)|0)+Math.imul(eb,ci)|0))<<13)|0;eM=((em=em+Math.imul(eb,co)|0)+(ed>>>13)|0)+(c_>>>26)|0,c_&=67108863,eu=Math.imul(eR,eQ),ed=(ed=Math.imul(eR,e1))+Math.imul(eO,eQ)|0,em=Math.imul(eO,e1),eu=eu+Math.imul(eB,e4)|0,ed=(ed=ed+Math.imul(eB,e3)|0)+Math.imul(eT,e4)|0,em=em+Math.imul(eT,e3)|0,eu=eu+Math.imul(e_,e0)|0,ed=(ed=ed+Math.imul(e_,e8)|0)+Math.imul(eE,e0)|0,em=em+Math.imul(eE,e8)|0,eu=eu+Math.imul(eN,e7)|0,ed=(ed=ed+Math.imul(eN,e9)|0)+Math.imul(eS,e7)|0,em=em+Math.imul(eS,e9)|0,eu=eu+Math.imul(eC,ci)|0,ed=(ed=ed+Math.imul(eC,co)|0)+Math.imul(ex,ci)|0,em=em+Math.imul(ex,co)|0;var cE=(eM+(eu=eu+Math.imul(eL,cf)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cu)|0)+Math.imul(eb,cf)|0))<<13)|0;eM=((em=em+Math.imul(eb,cu)|0)+(ed>>>13)|0)+(cE>>>26)|0,cE&=67108863,eu=Math.imul(eD,eQ),ed=(ed=Math.imul(eD,e1))+Math.imul(eF,eQ)|0,em=Math.imul(eF,e1),eu=eu+Math.imul(eR,e4)|0,ed=(ed=ed+Math.imul(eR,e3)|0)+Math.imul(eO,e4)|0,em=em+Math.imul(eO,e3)|0,eu=eu+Math.imul(eB,e0)|0,ed=(ed=ed+Math.imul(eB,e8)|0)+Math.imul(eT,e0)|0,em=em+Math.imul(eT,e8)|0,eu=eu+Math.imul(e_,e7)|0,ed=(ed=ed+Math.imul(e_,e9)|0)+Math.imul(eE,e7)|0,em=em+Math.imul(eE,e9)|0,eu=eu+Math.imul(eN,ci)|0,ed=(ed=ed+Math.imul(eN,co)|0)+Math.imul(eS,ci)|0,em=em+Math.imul(eS,co)|0,eu=eu+Math.imul(eC,cf)|0,ed=(ed=ed+Math.imul(eC,cu)|0)+Math.imul(ex,cf)|0,em=em+Math.imul(ex,cu)|0;var cP=(eM+(eu=eu+Math.imul(eL,cm)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cH)|0)+Math.imul(eb,cm)|0))<<13)|0;eM=((em=em+Math.imul(eb,cH)|0)+(ed>>>13)|0)+(cP>>>26)|0,cP&=67108863,eu=Math.imul(eq,eQ),ed=(ed=Math.imul(eq,e1))+Math.imul(eZ,eQ)|0,em=Math.imul(eZ,e1),eu=eu+Math.imul(eD,e4)|0,ed=(ed=ed+Math.imul(eD,e3)|0)+Math.imul(eF,e4)|0,em=em+Math.imul(eF,e3)|0,eu=eu+Math.imul(eR,e0)|0,ed=(ed=ed+Math.imul(eR,e8)|0)+Math.imul(eO,e0)|0,em=em+Math.imul(eO,e8)|0,eu=eu+Math.imul(eB,e7)|0,ed=(ed=ed+Math.imul(eB,e9)|0)+Math.imul(eT,e7)|0,em=em+Math.imul(eT,e9)|0,eu=eu+Math.imul(e_,ci)|0,ed=(ed=ed+Math.imul(e_,co)|0)+Math.imul(eE,ci)|0,em=em+Math.imul(eE,co)|0,eu=eu+Math.imul(eN,cf)|0,ed=(ed=ed+Math.imul(eN,cu)|0)+Math.imul(eS,cf)|0,em=em+Math.imul(eS,cu)|0,eu=eu+Math.imul(eC,cm)|0,ed=(ed=ed+Math.imul(eC,cH)|0)+Math.imul(ex,cm)|0,em=em+Math.imul(ex,cH)|0;var cB=(eM+(eu=eu+Math.imul(eL,cV)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cM)|0)+Math.imul(eb,cV)|0))<<13)|0;eM=((em=em+Math.imul(eb,cM)|0)+(ed>>>13)|0)+(cB>>>26)|0,cB&=67108863,eu=Math.imul(eW,eQ),ed=(ed=Math.imul(eW,e1))+Math.imul(eK,eQ)|0,em=Math.imul(eK,e1),eu=eu+Math.imul(eq,e4)|0,ed=(ed=ed+Math.imul(eq,e3)|0)+Math.imul(eZ,e4)|0,em=em+Math.imul(eZ,e3)|0,eu=eu+Math.imul(eD,e0)|0,ed=(ed=ed+Math.imul(eD,e8)|0)+Math.imul(eF,e0)|0,em=em+Math.imul(eF,e8)|0,eu=eu+Math.imul(eR,e7)|0,ed=(ed=ed+Math.imul(eR,e9)|0)+Math.imul(eO,e7)|0,em=em+Math.imul(eO,e9)|0,eu=eu+Math.imul(eB,ci)|0,ed=(ed=ed+Math.imul(eB,co)|0)+Math.imul(eT,ci)|0,em=em+Math.imul(eT,co)|0,eu=eu+Math.imul(e_,cf)|0,ed=(ed=ed+Math.imul(e_,cu)|0)+Math.imul(eE,cf)|0,em=em+Math.imul(eE,cu)|0,eu=eu+Math.imul(eN,cm)|0,ed=(ed=ed+Math.imul(eN,cH)|0)+Math.imul(eS,cm)|0,em=em+Math.imul(eS,cH)|0,eu=eu+Math.imul(eC,cV)|0,ed=(ed=ed+Math.imul(eC,cM)|0)+Math.imul(ex,cV)|0,em=em+Math.imul(ex,cM)|0;var cT=(eM+(eu=eu+Math.imul(eL,cL)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cy)|0)+Math.imul(eb,cL)|0))<<13)|0;eM=((em=em+Math.imul(eb,cy)|0)+(ed>>>13)|0)+(cT>>>26)|0,cT&=67108863,eu=Math.imul(eJ,eQ),ed=(ed=Math.imul(eJ,e1))+Math.imul(eY,eQ)|0,em=Math.imul(eY,e1),eu=eu+Math.imul(eW,e4)|0,ed=(ed=ed+Math.imul(eW,e3)|0)+Math.imul(eK,e4)|0,em=em+Math.imul(eK,e3)|0,eu=eu+Math.imul(eq,e0)|0,ed=(ed=ed+Math.imul(eq,e8)|0)+Math.imul(eZ,e0)|0,em=em+Math.imul(eZ,e8)|0,eu=eu+Math.imul(eD,e7)|0,ed=(ed=ed+Math.imul(eD,e9)|0)+Math.imul(eF,e7)|0,em=em+Math.imul(eF,e9)|0,eu=eu+Math.imul(eR,ci)|0,ed=(ed=ed+Math.imul(eR,co)|0)+Math.imul(eO,ci)|0,em=em+Math.imul(eO,co)|0,eu=eu+Math.imul(eB,cf)|0,ed=(ed=ed+Math.imul(eB,cu)|0)+Math.imul(eT,cf)|0,em=em+Math.imul(eT,cu)|0,eu=eu+Math.imul(e_,cm)|0,ed=(ed=ed+Math.imul(e_,cH)|0)+Math.imul(eE,cm)|0,em=em+Math.imul(eE,cH)|0,eu=eu+Math.imul(eN,cV)|0,ed=(ed=ed+Math.imul(eN,cM)|0)+Math.imul(eS,cV)|0,em=em+Math.imul(eS,cM)|0,eu=eu+Math.imul(eC,cL)|0,ed=(ed=ed+Math.imul(eC,cy)|0)+Math.imul(ex,cL)|0,em=em+Math.imul(ex,cy)|0;var cI=(eM+(eu=eu+Math.imul(eL,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cw)|0)+Math.imul(eb,cx)|0))<<13)|0;eM=((em=em+Math.imul(eb,cw)|0)+(ed>>>13)|0)+(cI>>>26)|0,cI&=67108863,eu=Math.imul(eJ,e4),ed=(ed=Math.imul(eJ,e3))+Math.imul(eY,e4)|0,em=Math.imul(eY,e3),eu=eu+Math.imul(eW,e0)|0,ed=(ed=ed+Math.imul(eW,e8)|0)+Math.imul(eK,e0)|0,em=em+Math.imul(eK,e8)|0,eu=eu+Math.imul(eq,e7)|0,ed=(ed=ed+Math.imul(eq,e9)|0)+Math.imul(eZ,e7)|0,em=em+Math.imul(eZ,e9)|0,eu=eu+Math.imul(eD,ci)|0,ed=(ed=ed+Math.imul(eD,co)|0)+Math.imul(eF,ci)|0,em=em+Math.imul(eF,co)|0,eu=eu+Math.imul(eR,cf)|0,ed=(ed=ed+Math.imul(eR,cu)|0)+Math.imul(eO,cf)|0,em=em+Math.imul(eO,cu)|0,eu=eu+Math.imul(eB,cm)|0,ed=(ed=ed+Math.imul(eB,cH)|0)+Math.imul(eT,cm)|0,em=em+Math.imul(eT,cH)|0,eu=eu+Math.imul(e_,cV)|0,ed=(ed=ed+Math.imul(e_,cM)|0)+Math.imul(eE,cV)|0,em=em+Math.imul(eE,cM)|0,eu=eu+Math.imul(eN,cL)|0,ed=(ed=ed+Math.imul(eN,cy)|0)+Math.imul(eS,cL)|0,em=em+Math.imul(eS,cy)|0;var cR=(eM+(eu=eu+Math.imul(eC,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eC,cw)|0)+Math.imul(ex,cx)|0))<<13)|0;eM=((em=em+Math.imul(ex,cw)|0)+(ed>>>13)|0)+(cR>>>26)|0,cR&=67108863,eu=Math.imul(eJ,e0),ed=(ed=Math.imul(eJ,e8))+Math.imul(eY,e0)|0,em=Math.imul(eY,e8),eu=eu+Math.imul(eW,e7)|0,ed=(ed=ed+Math.imul(eW,e9)|0)+Math.imul(eK,e7)|0,em=em+Math.imul(eK,e9)|0,eu=eu+Math.imul(eq,ci)|0,ed=(ed=ed+Math.imul(eq,co)|0)+Math.imul(eZ,ci)|0,em=em+Math.imul(eZ,co)|0,eu=eu+Math.imul(eD,cf)|0,ed=(ed=ed+Math.imul(eD,cu)|0)+Math.imul(eF,cf)|0,em=em+Math.imul(eF,cu)|0,eu=eu+Math.imul(eR,cm)|0,ed=(ed=ed+Math.imul(eR,cH)|0)+Math.imul(eO,cm)|0,em=em+Math.imul(eO,cH)|0,eu=eu+Math.imul(eB,cV)|0,ed=(ed=ed+Math.imul(eB,cM)|0)+Math.imul(eT,cV)|0,em=em+Math.imul(eT,cM)|0,eu=eu+Math.imul(e_,cL)|0,ed=(ed=ed+Math.imul(e_,cy)|0)+Math.imul(eE,cL)|0,em=em+Math.imul(eE,cy)|0;var cO=(eM+(eu=eu+Math.imul(eN,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eN,cw)|0)+Math.imul(eS,cx)|0))<<13)|0;eM=((em=em+Math.imul(eS,cw)|0)+(ed>>>13)|0)+(cO>>>26)|0,cO&=67108863,eu=Math.imul(eJ,e7),ed=(ed=Math.imul(eJ,e9))+Math.imul(eY,e7)|0,em=Math.imul(eY,e9),eu=eu+Math.imul(eW,ci)|0,ed=(ed=ed+Math.imul(eW,co)|0)+Math.imul(eK,ci)|0,em=em+Math.imul(eK,co)|0,eu=eu+Math.imul(eq,cf)|0,ed=(ed=ed+Math.imul(eq,cu)|0)+Math.imul(eZ,cf)|0,em=em+Math.imul(eZ,cu)|0,eu=eu+Math.imul(eD,cm)|0,ed=(ed=ed+Math.imul(eD,cH)|0)+Math.imul(eF,cm)|0,em=em+Math.imul(eF,cH)|0,eu=eu+Math.imul(eR,cV)|0,ed=(ed=ed+Math.imul(eR,cM)|0)+Math.imul(eO,cV)|0,em=em+Math.imul(eO,cM)|0,eu=eu+Math.imul(eB,cL)|0,ed=(ed=ed+Math.imul(eB,cy)|0)+Math.imul(eT,cL)|0,em=em+Math.imul(eT,cy)|0;var cj=(eM+(eu=eu+Math.imul(e_,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(e_,cw)|0)+Math.imul(eE,cx)|0))<<13)|0;eM=((em=em+Math.imul(eE,cw)|0)+(ed>>>13)|0)+(cj>>>26)|0,cj&=67108863,eu=Math.imul(eJ,ci),ed=(ed=Math.imul(eJ,co))+Math.imul(eY,ci)|0,em=Math.imul(eY,co),eu=eu+Math.imul(eW,cf)|0,ed=(ed=ed+Math.imul(eW,cu)|0)+Math.imul(eK,cf)|0,em=em+Math.imul(eK,cu)|0,eu=eu+Math.imul(eq,cm)|0,ed=(ed=ed+Math.imul(eq,cH)|0)+Math.imul(eZ,cm)|0,em=em+Math.imul(eZ,cH)|0,eu=eu+Math.imul(eD,cV)|0,ed=(ed=ed+Math.imul(eD,cM)|0)+Math.imul(eF,cV)|0,em=em+Math.imul(eF,cM)|0,eu=eu+Math.imul(eR,cL)|0,ed=(ed=ed+Math.imul(eR,cy)|0)+Math.imul(eO,cL)|0,em=em+Math.imul(eO,cy)|0;var cD=(eM+(eu=eu+Math.imul(eB,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eB,cw)|0)+Math.imul(eT,cx)|0))<<13)|0;eM=((em=em+Math.imul(eT,cw)|0)+(ed>>>13)|0)+(cD>>>26)|0,cD&=67108863,eu=Math.imul(eJ,cf),ed=(ed=Math.imul(eJ,cu))+Math.imul(eY,cf)|0,em=Math.imul(eY,cu),eu=eu+Math.imul(eW,cm)|0,ed=(ed=ed+Math.imul(eW,cH)|0)+Math.imul(eK,cm)|0,em=em+Math.imul(eK,cH)|0,eu=eu+Math.imul(eq,cV)|0,ed=(ed=ed+Math.imul(eq,cM)|0)+Math.imul(eZ,cV)|0,em=em+Math.imul(eZ,cM)|0,eu=eu+Math.imul(eD,cL)|0,ed=(ed=ed+Math.imul(eD,cy)|0)+Math.imul(eF,cL)|0,em=em+Math.imul(eF,cy)|0;var cF=(eM+(eu=eu+Math.imul(eR,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eR,cw)|0)+Math.imul(eO,cx)|0))<<13)|0;eM=((em=em+Math.imul(eO,cw)|0)+(ed>>>13)|0)+(cF>>>26)|0,cF&=67108863,eu=Math.imul(eJ,cm),ed=(ed=Math.imul(eJ,cH))+Math.imul(eY,cm)|0,em=Math.imul(eY,cH),eu=eu+Math.imul(eW,cV)|0,ed=(ed=ed+Math.imul(eW,cM)|0)+Math.imul(eK,cV)|0,em=em+Math.imul(eK,cM)|0,eu=eu+Math.imul(eq,cL)|0,ed=(ed=ed+Math.imul(eq,cy)|0)+Math.imul(eZ,cL)|0,em=em+Math.imul(eZ,cy)|0;var cU=(eM+(eu=eu+Math.imul(eD,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eD,cw)|0)+Math.imul(eF,cx)|0))<<13)|0;eM=((em=em+Math.imul(eF,cw)|0)+(ed>>>13)|0)+(cU>>>26)|0,cU&=67108863,eu=Math.imul(eJ,cV),ed=(ed=Math.imul(eJ,cM))+Math.imul(eY,cV)|0,em=Math.imul(eY,cM),eu=eu+Math.imul(eW,cL)|0,ed=(ed=ed+Math.imul(eW,cy)|0)+Math.imul(eK,cL)|0,em=em+Math.imul(eK,cy)|0;var cq=(eM+(eu=eu+Math.imul(eq,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eq,cw)|0)+Math.imul(eZ,cx)|0))<<13)|0;eM=((em=em+Math.imul(eZ,cw)|0)+(ed>>>13)|0)+(cq>>>26)|0,cq&=67108863,eu=Math.imul(eJ,cL),ed=(ed=Math.imul(eJ,cy))+Math.imul(eY,cL)|0,em=Math.imul(eY,cy);var cZ=(eM+(eu=eu+Math.imul(eW,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eW,cw)|0)+Math.imul(eK,cx)|0))<<13)|0;eM=((em=em+Math.imul(eK,cw)|0)+(ed>>>13)|0)+(cZ>>>26)|0,cZ&=67108863;var cG=(eM+(eu=Math.imul(eJ,cx))|0)+((8191&(ed=(ed=Math.imul(eJ,cw))+Math.imul(eY,cx)|0))<<13)|0;return eM=((em=Math.imul(eY,cw))+(ed>>>13)|0)+(cG>>>26)|0,cG&=67108863,eV[0]=ck,eV[1]=cN,eV[2]=cS,eV[3]=cA,eV[4]=c_,eV[5]=cE,eV[6]=cP,eV[7]=cB,eV[8]=cT,eV[9]=cI,eV[10]=cR,eV[11]=cO,eV[12]=cj,eV[13]=cD,eV[14]=cF,eV[15]=cU,eV[16]=cq,eV[17]=cZ,eV[18]=cG,0!==eM&&(eV[19]=eM,ef.length++),ef};function eS(ei,es,ef){ef.negative=es.negative^ei.negative,ef.length=ei.length+es.length;for(var eu=0,ed=0,em=0;em>>26)|0)>>>26,eH&=67108863}ef.words[em]=ez,eu=eH,eH=ed}return 0!==eu?ef.words[em]=eu:ef.length--,ef._strip()}function eA(ei,es,ef){return eS(ei,es,ef)}function e_(ei,es){this.x=ei,this.y=es}Math.imul||(eN=ew),em.prototype.mulTo=function(ei,es){var ef=this.length+ei.length;return 10===this.length&&10===ei.length?eN(this,ei,es):ef<63?ew(this,ei,es):ef<1024?eS(this,ei,es):eA(this,ei,es)},e_.prototype.makeRBT=function(ei){for(var es=Array(ei),ef=em.prototype._countBits(ei)-1,eu=0;eu>=1;return eu},e_.prototype.permute=function(ei,es,ef,eu,ed,em){for(var eH=0;eH>>=1)ed++;return 1<>>=13,ef[2*eH+1]=8191&em,em>>>=13;for(eH=2*es;eH>=26,ef+=(em/67108864|0)+(eH>>>26),this.words[ed]=67108863&eH}return 0!==ef&&(this.words[ed]=ef,this.length++),es?this.ineg():this},em.prototype.muln=function(ei){return this.clone().imuln(ei)},em.prototype.sqr=function(){return this.mul(this)},em.prototype.isqr=function(){return this.imul(this.clone())},em.prototype.pow=function(ei){var es=ex(ei);if(0===es.length)return new em(1);for(var ef=this,eu=0;eu=0);var es,ef=ei%26,ed=(ei-ef)/26,em=67108863>>>26-ef<<26-ef;if(0!==ef){var eH=0;for(es=0;es>>26-ef}eH&&(this.words[es]=eH,this.length++)}if(0!==ed){for(es=this.length-1;es>=0;es--)this.words[es+ed]=this.words[es];for(es=0;es=0),ed=es?(es-es%26)/26:0;var ed,em=ei%26,eH=Math.min((ei-em)/26,this.length),ez=67108863^67108863>>>em<eH)for(this.length-=eH,eM=0;eM=0&&(0!==eg||eM>=ed);eM--){var eL=0|this.words[eM];this.words[eM]=eg<<26-em|eL>>>em,eg=eL&ez}return eV&&0!==eg&&(eV.words[eV.length++]=eg),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},em.prototype.ishrn=function(ei,es,ef){return eu(0===this.negative),this.iushrn(ei,es,ef)},em.prototype.shln=function(ei){return this.clone().ishln(ei)},em.prototype.ushln=function(ei){return this.clone().iushln(ei)},em.prototype.shrn=function(ei){return this.clone().ishrn(ei)},em.prototype.ushrn=function(ei){return this.clone().iushrn(ei)},em.prototype.testn=function(ei){eu("number"==typeof ei&&ei>=0);var es=ei%26,ef=(ei-es)/26,ed=1<=0);var es=ei%26,ef=(ei-es)/26;if(eu(0===this.negative,"imaskn works only with positive numbers"),this.length<=ef)return this;if(0!==es&&ef++,this.length=Math.min(ef,this.length),0!==es){var ed=67108863^67108863>>>es<=67108864;es++)this.words[es]-=67108864,es===this.length-1?this.words[es+1]=1:this.words[es+1]++;return this.length=Math.max(this.length,es+1),this},em.prototype.isubn=function(ei){if(eu("number"==typeof ei),eu(ei<67108864),ei<0)return this.iaddn(-ei);if(0!==this.negative)return this.negative=0,this.iaddn(ei),this.negative=1,this;if(this.words[0]-=ei,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var es=0;es>26)-(eV/67108864|0),this.words[ed+ef]=67108863&em}for(;ed>26,this.words[ed+ef]=67108863&em;if(0===ez)return this._strip();for(eu(-1===ez),ez=0,ed=0;ed>26,this.words[ed]=67108863&em;return this.negative=1,this._strip()},em.prototype._wordDiv=function(ei,es){var ef,eu=this.length-ei.length,ed=this.clone(),eH=ei,ez=0|eH.words[eH.length-1];0!=(eu=26-this._countBits(ez))&&(eH=eH.ushln(eu),ed.iushln(eu),ez=0|eH.words[eH.length-1]);var eV=ed.length-eH.length;if("mod"!==es){(ef=new em(null)).length=eV+1,ef.words=Array(ef.length);for(var eM=0;eM=0;eL--){var eb=(0|ed.words[eH.length+eL])*67108864+(0|ed.words[eH.length+eL-1]);for(eb=Math.min(eb/ez|0,67108863),ed._ishlnsubmul(eH,eb,eL);0!==ed.negative;)eb--,ed.negative=0,ed._ishlnsubmul(eH,1,eL),ed.isZero()||(ed.negative^=1);ef&&(ef.words[eL]=eb)}return ef&&ef._strip(),ed._strip(),"div"!==es&&0!==eu&&ed.iushrn(eu),{div:ef||null,mod:ed}},em.prototype.divmod=function(ei,es,ef){var ed,eH,ez;return(eu(!ei.isZero()),this.isZero())?{div:new em(0),mod:new em(0)}:0!==this.negative&&0===ei.negative?(ez=this.neg().divmod(ei,es),"mod"!==es&&(ed=ez.div.neg()),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.iadd(ei)),{div:ed,mod:eH}):0===this.negative&&0!==ei.negative?(ez=this.divmod(ei.neg(),es),"mod"!==es&&(ed=ez.div.neg()),{div:ed,mod:ez.mod}):(this.negative&ei.negative)!=0?(ez=this.neg().divmod(ei.neg(),es),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.isub(ei)),{div:ez.div,mod:eH}):ei.length>this.length||0>this.cmp(ei)?{div:new em(0),mod:this}:1===ei.length?"div"===es?{div:this.divn(ei.words[0]),mod:null}:"mod"===es?{div:null,mod:new em(this.modrn(ei.words[0]))}:{div:this.divn(ei.words[0]),mod:new em(this.modrn(ei.words[0]))}:this._wordDiv(ei,es)},em.prototype.div=function(ei){return this.divmod(ei,"div",!1).div},em.prototype.mod=function(ei){return this.divmod(ei,"mod",!1).mod},em.prototype.umod=function(ei){return this.divmod(ei,"mod",!0).mod},em.prototype.divRound=function(ei){var es=this.divmod(ei);if(es.mod.isZero())return es.div;var ef=0!==es.div.negative?es.mod.isub(ei):es.mod,eu=ei.ushrn(1),ed=ei.andln(1),em=ef.cmp(eu);return em<0||1===ed&&0===em?es.div:0!==es.div.negative?es.div.isubn(1):es.div.iaddn(1)},em.prototype.modrn=function(ei){var es=ei<0;es&&(ei=-ei),eu(ei<=67108863);for(var ef=67108864%ei,ed=0,em=this.length-1;em>=0;em--)ed=(ef*ed+(0|this.words[em]))%ei;return es?-ed:ed},em.prototype.modn=function(ei){return this.modrn(ei)},em.prototype.idivn=function(ei){var es=ei<0;es&&(ei=-ei),eu(ei<=67108863);for(var ef=0,ed=this.length-1;ed>=0;ed--){var em=(0|this.words[ed])+67108864*ef;this.words[ed]=em/ei|0,ef=em%ei}return this._strip(),es?this.ineg():this},em.prototype.divn=function(ei){return this.clone().idivn(ei)},em.prototype.egcd=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es=this,ef=ei.clone();es=0!==es.negative?es.umod(ei):es.clone();for(var ed=new em(1),eH=new em(0),ez=new em(0),eV=new em(1),eM=0;es.isEven()&&ef.isEven();)es.iushrn(1),ef.iushrn(1),++eM;for(var eg=ef.clone(),eL=es.clone();!es.isZero();){for(var eb=0,ey=1;(es.words[0]&ey)==0&&eb<26;++eb,ey<<=1);if(eb>0)for(es.iushrn(eb);eb-- >0;)(ed.isOdd()||eH.isOdd())&&(ed.iadd(eg),eH.isub(eL)),ed.iushrn(1),eH.iushrn(1);for(var eC=0,ex=1;(ef.words[0]&ex)==0&&eC<26;++eC,ex<<=1);if(eC>0)for(ef.iushrn(eC);eC-- >0;)(ez.isOdd()||eV.isOdd())&&(ez.iadd(eg),eV.isub(eL)),ez.iushrn(1),eV.iushrn(1);es.cmp(ef)>=0?(es.isub(ef),ed.isub(ez),eH.isub(eV)):(ef.isub(es),ez.isub(ed),eV.isub(eH))}return{a:ez,b:eV,gcd:ef.iushln(eM)}},em.prototype._invmp=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es,ef=this,ed=ei.clone();ef=0!==ef.negative?ef.umod(ei):ef.clone();for(var eH=new em(1),ez=new em(0),eV=ed.clone();ef.cmpn(1)>0&&ed.cmpn(1)>0;){for(var eM=0,eg=1;(ef.words[0]&eg)==0&&eM<26;++eM,eg<<=1);if(eM>0)for(ef.iushrn(eM);eM-- >0;)eH.isOdd()&&eH.iadd(eV),eH.iushrn(1);for(var eL=0,eb=1;(ed.words[0]&eb)==0&&eL<26;++eL,eb<<=1);if(eL>0)for(ed.iushrn(eL);eL-- >0;)ez.isOdd()&&ez.iadd(eV),ez.iushrn(1);ef.cmp(ed)>=0?(ef.isub(ed),eH.isub(ez)):(ed.isub(ef),ez.isub(eH))}return 0>(es=0===ef.cmpn(1)?eH:ez).cmpn(0)&&es.iadd(ei),es},em.prototype.gcd=function(ei){if(this.isZero())return ei.abs();if(ei.isZero())return this.abs();var es=this.clone(),ef=ei.clone();es.negative=0,ef.negative=0;for(var eu=0;es.isEven()&&ef.isEven();eu++)es.iushrn(1),ef.iushrn(1);for(;;){for(;es.isEven();)es.iushrn(1);for(;ef.isEven();)ef.iushrn(1);var ed=es.cmp(ef);if(ed<0){var em=es;es=ef,ef=em}else if(0===ed||0===ef.cmpn(1))break;es.isub(ef)}return ef.iushln(eu)},em.prototype.invm=function(ei){return this.egcd(ei).a.umod(ei)},em.prototype.isEven=function(){return(1&this.words[0])==0},em.prototype.isOdd=function(){return(1&this.words[0])==1},em.prototype.andln=function(ei){return this.words[0]&ei},em.prototype.bincn=function(ei){eu("number"==typeof ei);var es=ei%26,ef=(ei-es)/26,ed=1<>>26,ez&=67108863,this.words[eH]=ez}return 0!==em&&(this.words[eH]=em,this.length++),this},em.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},em.prototype.cmpn=function(ei){var es,ef=ei<0;if(0!==this.negative&&!ef)return -1;if(0===this.negative&&ef)return 1;if(this._strip(),this.length>1)es=1;else{ef&&(ei=-ei),eu(ei<=67108863,"Number is too big");var ed=0|this.words[0];es=ed===ei?0:edei.length)return 1;if(this.length=0;ef--){var eu=0|this.words[ef],ed=0|ei.words[ef];if(eu!==ed){eued&&(es=1);break}}return es},em.prototype.gtn=function(ei){return 1===this.cmpn(ei)},em.prototype.gt=function(ei){return 1===this.cmp(ei)},em.prototype.gten=function(ei){return this.cmpn(ei)>=0},em.prototype.gte=function(ei){return this.cmp(ei)>=0},em.prototype.ltn=function(ei){return -1===this.cmpn(ei)},em.prototype.lt=function(ei){return -1===this.cmp(ei)},em.prototype.lten=function(ei){return 0>=this.cmpn(ei)},em.prototype.lte=function(ei){return 0>=this.cmp(ei)},em.prototype.eqn=function(ei){return 0===this.cmpn(ei)},em.prototype.eq=function(ei){return 0===this.cmp(ei)},em.red=function(ei){return new eO(ei)},em.prototype.toRed=function(ei){return eu(!this.red,"Already a number in reduction context"),eu(0===this.negative,"red works only with positives"),ei.convertTo(this)._forceRed(ei)},em.prototype.fromRed=function(){return eu(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},em.prototype._forceRed=function(ei){return this.red=ei,this},em.prototype.forceRed=function(ei){return eu(!this.red,"Already a number in reduction context"),this._forceRed(ei)},em.prototype.redAdd=function(ei){return eu(this.red,"redAdd works only with red numbers"),this.red.add(this,ei)},em.prototype.redIAdd=function(ei){return eu(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,ei)},em.prototype.redSub=function(ei){return eu(this.red,"redSub works only with red numbers"),this.red.sub(this,ei)},em.prototype.redISub=function(ei){return eu(this.red,"redISub works only with red numbers"),this.red.isub(this,ei)},em.prototype.redShl=function(ei){return eu(this.red,"redShl works only with red numbers"),this.red.shl(this,ei)},em.prototype.redMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.mul(this,ei)},em.prototype.redIMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.imul(this,ei)},em.prototype.redSqr=function(){return eu(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},em.prototype.redISqr=function(){return eu(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},em.prototype.redSqrt=function(){return eu(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},em.prototype.redInvm=function(){return eu(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},em.prototype.redNeg=function(){return eu(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},em.prototype.redPow=function(ei){return eu(this.red&&!ei.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,ei)};var eE={k256:null,p224:null,p192:null,p25519:null};function eP(ei,es){this.name=ei,this.p=new em(es,16),this.n=this.p.bitLength(),this.k=new em(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function eB(){eP.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function eT(){eP.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function eI(){eP.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function eR(){eP.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function eO(ei){if("string"==typeof ei){var es=em._prime(ei);this.m=es.p,this.prime=es}else eu(ei.gtn(1),"modulus must be greater than 1"),this.m=ei,this.prime=null}function ej(ei){eO.call(this,ei),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new em(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)}eP.prototype._tmp=function(){var ei=new em(null);return ei.words=Array(Math.ceil(this.n/13)),ei},eP.prototype.ireduce=function(ei){var es,ef=ei;do this.split(ef,this.tmp),es=(ef=(ef=this.imulK(ef)).iadd(this.tmp)).bitLength();while(es>this.n);var eu=es0?ef.isub(this.p):void 0!==ef.strip?ef.strip():ef._strip(),ef},eP.prototype.split=function(ei,es){ei.iushrn(this.n,0,es)},eP.prototype.imulK=function(ei){return ei.imul(this.k)},ed(eB,eP),eB.prototype.split=function(ei,es){for(var ef=4194303,eu=Math.min(ei.length,9),ed=0;ed>>22,em=eH}em>>>=22,ei.words[ed-10]=em,0===em&&ei.length>10?ei.length-=10:ei.length-=9},eB.prototype.imulK=function(ei){ei.words[ei.length]=0,ei.words[ei.length+1]=0,ei.length+=2;for(var es=0,ef=0;ef>>=26,ei.words[ef]=ed,es=eu}return 0!==es&&(ei.words[ei.length++]=es),ei},em._prime=function(ei){var es;if(eE[ei])return eE[ei];if("k256"===ei)es=new eB;else if("p224"===ei)es=new eT;else if("p192"===ei)es=new eI;else if("p25519"===ei)es=new eR;else throw Error("Unknown prime "+ei);return eE[ei]=es,es},eO.prototype._verify1=function(ei){eu(0===ei.negative,"red works only with positives"),eu(ei.red,"red works only with red numbers")},eO.prototype._verify2=function(ei,es){eu((ei.negative|es.negative)==0,"red works only with positives"),eu(ei.red&&ei.red===es.red,"red works only with red numbers")},eO.prototype.imod=function(ei){return this.prime?this.prime.ireduce(ei)._forceRed(this):(eV(ei,ei.umod(this.m)._forceRed(this)),ei)},eO.prototype.neg=function(ei){return ei.isZero()?ei.clone():this.m.sub(ei)._forceRed(this)},eO.prototype.add=function(ei,es){this._verify2(ei,es);var ef=ei.add(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef._forceRed(this)},eO.prototype.iadd=function(ei,es){this._verify2(ei,es);var ef=ei.iadd(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef},eO.prototype.sub=function(ei,es){this._verify2(ei,es);var ef=ei.sub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef._forceRed(this)},eO.prototype.isub=function(ei,es){this._verify2(ei,es);var ef=ei.isub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef},eO.prototype.shl=function(ei,es){return this._verify1(ei),this.imod(ei.ushln(es))},eO.prototype.imul=function(ei,es){return this._verify2(ei,es),this.imod(ei.imul(es))},eO.prototype.mul=function(ei,es){return this._verify2(ei,es),this.imod(ei.mul(es))},eO.prototype.isqr=function(ei){return this.imul(ei,ei.clone())},eO.prototype.sqr=function(ei){return this.mul(ei,ei)},eO.prototype.sqrt=function(ei){if(ei.isZero())return ei.clone();var es=this.m.andln(3);if(eu(es%2==1),3===es){var ef=this.m.add(new em(1)).iushrn(2);return this.pow(ei,ef)}for(var ed=this.m.subn(1),eH=0;!ed.isZero()&&0===ed.andln(1);)eH++,ed.iushrn(1);eu(!ed.isZero());var ez=new em(1).toRed(this),eV=ez.redNeg(),eM=this.m.subn(1).iushrn(1),eg=this.m.bitLength();for(eg=new em(2*eg*eg).toRed(this);0!==this.pow(eg,eM).cmp(eV);)eg.redIAdd(eV);for(var eL=this.pow(eg,ed),eb=this.pow(ei,ed.addn(1).iushrn(1)),ey=this.pow(ei,ed),eC=eH;0!==ey.cmp(ez);){for(var ex=ey,ew=0;0!==ex.cmp(ez);ew++)ex=ex.redSqr();eu(ew=0;ed--){for(var eg=es.words[ed],eL=eM-1;eL>=0;eL--){var eb=eg>>eL&1;if(eH!==eu[0]&&(eH=this.sqr(eH)),0===eb&&0===ez){eV=0;continue}ez<<=1,ez|=eb,(++eV===ef||0===ed&&0===eL)&&(eH=this.mul(eH,eu[ez]),eV=0,ez=0)}eM=26}return eH},eO.prototype.convertTo=function(ei){var es=ei.umod(this.m);return es===ei?es.clone():es},eO.prototype.convertFrom=function(ei){var es=ei.clone();return es.red=null,es},em.mont=function(ei){return new ej(ei)},ed(ej,eO),ej.prototype.convertTo=function(ei){return this.imod(ei.ushln(this.shift))},ej.prototype.convertFrom=function(ei){var es=this.imod(ei.mul(this.rinv));return es.red=null,es},ej.prototype.imul=function(ei,es){if(ei.isZero()||es.isZero())return ei.words[0]=0,ei.length=1,ei;var ef=ei.imul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),em=ed;return ed.cmp(this.m)>=0?em=ed.isub(this.m):0>ed.cmpn(0)&&(em=ed.iadd(this.m)),em._forceRed(this)},ej.prototype.mul=function(ei,es){if(ei.isZero()||es.isZero())return new em(0)._forceRed(this);var ef=ei.mul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),eH=ed;return ed.cmp(this.m)>=0?eH=ed.isub(this.m):0>ed.cmpn(0)&&(eH=ed.iadd(this.m)),eH._forceRed(this)},ej.prototype.invm=function(ei){return this.imod(ei._invmp(this.m).mul(this.r2))._forceRed(this)}}(ei=ef.nmd(ei),this)},3500:function(ei,es,ef){var eu;function ed(ei){this.rand=ei}if(ei.exports=function(ei){return eu||(eu=new ed(null)),eu.generate(ei)},ei.exports.Rand=ed,ed.prototype.generate=function(ei){return this._rand(ei)},ed.prototype._rand=function(ei){if(this.rand.getBytes)return this.rand.getBytes(ei);for(var es=new Uint8Array(ei),ef=0;ef>>24]^eg[eC>>>16&255]^eL[ex>>>8&255]^eb[255&ew]^es[eN++],eH=eM[eC>>>24]^eg[ex>>>16&255]^eL[ew>>>8&255]^eb[255&ey]^es[eN++],ez=eM[ex>>>24]^eg[ew>>>16&255]^eL[ey>>>8&255]^eb[255&eC]^es[eN++],eV=eM[ew>>>24]^eg[ey>>>16&255]^eL[eC>>>8&255]^eb[255&ex]^es[eN++],ey=em,eC=eH,ex=ez,ew=eV;return em=(eu[ey>>>24]<<24|eu[eC>>>16&255]<<16|eu[ex>>>8&255]<<8|eu[255&ew])^es[eN++],eH=(eu[eC>>>24]<<24|eu[ex>>>16&255]<<16|eu[ew>>>8&255]<<8|eu[255&ey])^es[eN++],[em>>>=0,eH>>>=0,ez=((eu[ex>>>24]<<24|eu[ew>>>16&255]<<16|eu[ey>>>8&255]<<8|eu[255&eC])^es[eN++])>>>0,eV=((eu[ew>>>24]<<24|eu[ey>>>16&255]<<16|eu[eC>>>8&255]<<8|eu[255&ex])^es[eN++])>>>0]}var ez=[0,1,2,4,8,16,32,64,128,27,54],eV=function(){for(var ei=Array(256),es=0;es<256;es++)es<128?ei[es]=es<<1:ei[es]=es<<1^283;for(var ef=[],eu=[],ed=[[],[],[],[]],em=[[],[],[],[]],eH=0,ez=0,eV=0;eV<256;++eV){var eM=ez^ez<<1^ez<<2^ez<<3^ez<<4;eM=eM>>>8^255&eM^99,ef[eH]=eM,eu[eM]=eH;var eg=ei[eH],eL=ei[eg],eb=ei[eL],ey=257*ei[eM]^16843008*eM;ed[0][eH]=ey<<24|ey>>>8,ed[1][eH]=ey<<16|ey>>>16,ed[2][eH]=ey<<8|ey>>>24,ed[3][eH]=ey,ey=16843009*eb^65537*eL^257*eg^16843008*eH,em[0][eM]=ey<<24|ey>>>8,em[1][eM]=ey<<16|ey>>>16,em[2][eM]=ey<<8|ey>>>24,em[3][eM]=ey,0===eH?eH=ez=1:(eH=eg^ei[ei[ei[eb^eg]]],ez^=ei[ei[ez]])}return{SBOX:ef,INV_SBOX:eu,SUB_MIX:ed,INV_SUB_MIX:em}}();function eM(ei){this._key=ed(ei),this._reset()}eM.blockSize=16,eM.keySize=32,eM.prototype.blockSize=eM.blockSize,eM.prototype.keySize=eM.keySize,eM.prototype._reset=function(){for(var ei=this._key,es=ei.length,ef=es+6,eu=(ef+1)*4,ed=[],em=0;em>>24,eH=(eV.SBOX[eH>>>24]<<24|eV.SBOX[eH>>>16&255]<<16|eV.SBOX[eH>>>8&255]<<8|eV.SBOX[255&eH])^ez[em/es|0]<<24):es>6&&em%es==4&&(eH=eV.SBOX[eH>>>24]<<24|eV.SBOX[eH>>>16&255]<<16|eV.SBOX[eH>>>8&255]<<8|eV.SBOX[255&eH]),ed[em]=ed[em-es]^eH}for(var eM=[],eg=0;eg>>24]]^eV.INV_SUB_MIX[1][eV.SBOX[eb>>>16&255]]^eV.INV_SUB_MIX[2][eV.SBOX[eb>>>8&255]]^eV.INV_SUB_MIX[3][eV.SBOX[255&eb]]}this._nRounds=ef,this._keySchedule=ed,this._invKeySchedule=eM},eM.prototype.encryptBlockRaw=function(ei){return eH(ei=ed(ei),this._keySchedule,eV.SUB_MIX,eV.SBOX,this._nRounds)},eM.prototype.encryptBlock=function(ei){var es=this.encryptBlockRaw(ei),ef=eu.allocUnsafe(16);return ef.writeUInt32BE(es[0],0),ef.writeUInt32BE(es[1],4),ef.writeUInt32BE(es[2],8),ef.writeUInt32BE(es[3],12),ef},eM.prototype.decryptBlock=function(ei){var es=(ei=ed(ei))[1];ei[1]=ei[3],ei[3]=es;var ef=eH(ei,this._invKeySchedule,eV.INV_SUB_MIX,eV.INV_SBOX,this._nRounds),em=eu.allocUnsafe(16);return em.writeUInt32BE(ef[0],0),em.writeUInt32BE(ef[3],4),em.writeUInt32BE(ef[2],8),em.writeUInt32BE(ef[1],12),em},eM.prototype.scrub=function(){em(this._keySchedule),em(this._invKeySchedule),em(this._key)},ei.exports.AES=eM},6624:function(ei,es,ef){var eu=ef(1387),ed=ef(6911).Buffer,em=ef(1043),eH=ef(3782),ez=ef(7225),eV=ef(4734),eM=ef(598);function eg(ei,es){var ef=0;ei.length!==es.length&&ef++;for(var eu=Math.min(ei.length,es.length),ed=0;ed16)throw Error("unable to decrypt data");for(var ef=-1;++ef16)return es=this.cache.slice(0,16),this.cache=this.cache.slice(16),es}else if(this.cache.length>=16)return es=this.cache.slice(0,16),this.cache=this.cache.slice(16),es;return null},eL.prototype.flush=function(){if(this.cache.length)return this.cache},es.createDecipher=eC,es.createDecipheriv=ey},2:function(ei,es,ef){var eu=ef(6370),ed=ef(6624),em=ef(6911).Buffer,eH=ef(126),ez=ef(1043),eV=ef(1387),eM=ef(8368);function eg(ei,es,ef){ez.call(this),this._cache=new eb,this._cipher=new eV.AES(es),this._prev=em.from(ef),this._mode=ei,this._autopadding=!0}ef(3782)(eg,ez),eg.prototype._update=function(ei){this._cache.add(ei);for(var es,ef,eu=[];es=this._cache.get();)ef=this._mode.encrypt(this,es),eu.push(ef);return em.concat(eu)};var eL=em.alloc(16,16);function eb(){this.cache=em.allocUnsafe(0)}function ey(ei,es,ef){var ez=eu[ei.toLowerCase()];if(!ez)throw TypeError("invalid suite type");if("string"==typeof es&&(es=em.from(es)),es.length!==ez.key/8)throw TypeError("invalid key length "+es.length);if("string"==typeof ef&&(ef=em.from(ef)),"GCM"!==ez.mode&&ef.length!==ez.iv)throw TypeError("invalid iv length "+ef.length);return"stream"===ez.type?new eH(ez.module,es,ef):"auth"===ez.type?new ed(ez.module,es,ef):new eg(ez.module,es,ef)}function eC(ei,es){var ef=eu[ei.toLowerCase()];if(!ef)throw TypeError("invalid suite type");var ed=eM(es,!1,ef.key,ef.iv);return ey(ei,ed.key,ed.iv)}eg.prototype._final=function(){var ei=this._cache.flush();if(this._autopadding)return ei=this._mode.encrypt(this,ei),this._cipher.scrub(),ei;if(!ei.equals(eL))throw this._cipher.scrub(),Error("data not multiple of block length")},eg.prototype.setAutoPadding=function(ei){return this._autopadding=!!ei,this},eb.prototype.add=function(ei){this.cache=em.concat([this.cache,ei])},eb.prototype.get=function(){if(this.cache.length>15){var ei=this.cache.slice(0,16);return this.cache=this.cache.slice(16),ei}return null},eb.prototype.flush=function(){for(var ei=16-this.cache.length,es=em.allocUnsafe(ei),ef=-1;++ef>>0,0),es.writeUInt32BE(ei[1]>>>0,4),es.writeUInt32BE(ei[2]>>>0,8),es.writeUInt32BE(ei[3]>>>0,12),es}function ez(ei){this.h=ei,this.state=eu.alloc(16,0),this.cache=eu.allocUnsafe(0)}ez.prototype.ghash=function(ei){for(var es=-1;++es0;ei--)ef[ei]=ef[ei]>>>1|(1&ef[ei-1])<<31;ef[0]=ef[0]>>>1,es&&(ef[0]=-520093696^ef[0])}this.state=eH(eu)},ez.prototype.update=function(ei){var es;for(this.cache=eu.concat([this.cache,ei]);this.cache.length>=16;)es=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(es)},ez.prototype.final=function(ei,es){return this.cache.length&&this.ghash(eu.concat([this.cache,ed],16)),this.ghash(eH([0,ei,0,es])),this.state},ei.exports=ez},598:function(ei){function es(ei){for(var es,ef=ei.length;ef--;)if(255===(es=ei.readUInt8(ef)))ei.writeUInt8(0,ef);else{es++,ei.writeUInt8(es,ef);break}}ei.exports=es},9825:function(ei,es,ef){var eu=ef(4734);es.encrypt=function(ei,es){var ef=eu(es,ei._prev);return ei._prev=ei._cipher.encryptBlock(ef),ei._prev},es.decrypt=function(ei,es){var ef=ei._prev;return ei._prev=es,eu(ei._cipher.decryptBlock(es),ef)}},321:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(4734);function em(ei,es,ef){var em=es.length,eH=ed(es,ei._cache);return ei._cache=ei._cache.slice(em),ei._prev=eu.concat([ei._prev,ef?es:eH]),eH}es.encrypt=function(ei,es,ef){for(var ed,eH=eu.allocUnsafe(0);es.length;)if(0===ei._cache.length&&(ei._cache=ei._cipher.encryptBlock(ei._prev),ei._prev=eu.allocUnsafe(0)),ei._cache.length<=es.length)ed=ei._cache.length,eH=eu.concat([eH,em(ei,es.slice(0,ed),ef)]),es=es.slice(ed);else{eH=eu.concat([eH,em(ei,es,ef)]);break}return eH}},3147:function(ei,es,ef){var eu=ef(6911).Buffer;function ed(ei,es,ef){for(var eu,ed,eH,ez=-1,eV=8,eM=0;++ez>ez%8,ei._prev=em(ei._prev,ef?ed:eH);return eM}function em(ei,es){var ef=ei.length,ed=-1,em=eu.allocUnsafe(ei.length);for(ei=eu.concat([ei,eu.from([es])]);++ed>7;return em}es.encrypt=function(ei,es,ef){for(var em=es.length,eH=eu.allocUnsafe(em),ez=-1;++ez=0||!ef.umod(ei.prime1)||!ef.umod(ei.prime2);)ef=new eu(em(es));return ef}ei.exports=ez,ez.getr=eV},9276:function(ei,es,ef){ei.exports=ef(2908)},4078:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(9739),em=ef(3726),eH=ef(3782),ez=ef(9807),eV=ef(4013),eM=ef(2908);function eg(ei){em.Writable.call(this);var es=eM[ei];if(!es)throw Error("Unknown message digest");this._hashType=es.hash,this._hash=ed(es.hash),this._tag=es.id,this._signType=es.sign}function eL(ei){em.Writable.call(this);var es=eM[ei];if(!es)throw Error("Unknown message digest");this._hash=ed(es.hash),this._tag=es.id,this._signType=es.sign}function eb(ei){return new eg(ei)}function ey(ei){return new eL(ei)}Object.keys(eM).forEach(function(ei){eM[ei].id=eu.from(eM[ei].id,"hex"),eM[ei.toLowerCase()]=eM[ei]}),eH(eg,em.Writable),eg.prototype._write=function(ei,es,ef){this._hash.update(ei),ef()},eg.prototype.update=function(ei,es){return"string"==typeof ei&&(ei=eu.from(ei,es)),this._hash.update(ei),this},eg.prototype.sign=function(ei,es){this.end();var ef=ez(this._hash.digest(),ei,this._hashType,this._signType,this._tag);return es?ef.toString(es):ef},eH(eL,em.Writable),eL.prototype._write=function(ei,es,ef){this._hash.update(ei),ef()},eL.prototype.update=function(ei,es){return"string"==typeof ei&&(ei=eu.from(ei,es)),this._hash.update(ei),this},eL.prototype.verify=function(ei,es,ef){return"string"==typeof es&&(es=eu.from(es,ef)),this.end(),eV(es,this._hash.digest(),ei,this._signType,this._tag)},ei.exports={Sign:eb,Verify:ey,createSign:eb,createVerify:ey}},9807:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(4873),em=ef(7166),eH=ef(949).ec,ez=ef(1670),eV=ef(9902),eM=ef(9267);function eg(ei,es,ef,ed,eH){var ez=eV(es);if(ez.curve){if("ecdsa"!==ed&&"ecdsa/rsa"!==ed)throw Error("wrong private key type");return eL(ei,ez)}if("dsa"===ez.type){if("dsa"!==ed)throw Error("wrong private key type");return eb(ei,ez,ef)}if("rsa"!==ed&&"ecdsa/rsa"!==ed)throw Error("wrong private key type");ei=eu.concat([eH,ei]);for(var eM=ez.modulus.byteLength(),eg=[0,1];ei.length+eg.length+10&&ef.ishrn(eu),ef}function ew(ei,es){ei=(ei=ex(ei,es)).mod(es);var ef=eu.from(ei.toArray());if(ef.length=ei.cmpn(0)||ei.cmp(es)>=es)throw Error("invalid sig")}ei.exports=eV},4734:function(ei){ei.exports=function(ei,es){for(var ef=Math.min(ei.length,es.length),eu=new ed(ef),em=0;emef?es=("rmd160"===ei?new eV:eM(ei)).update(es).digest():es.lengthez?es=ei(es):es.length0;eu--)es+=this._buffer(ei,es),ef+=this._flushBuffer(ed,ef);return es+=this._buffer(ei,es),ed},ed.prototype.final=function(ei){var es,ef;return(ei&&(es=this.update(ei)),ef="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),es)?es.concat(ef):ef},ed.prototype._pad=function(ei,es){if(0===es)return!1;for(;es>>1];ef=em.r28shl(ef,ez),ed=em.r28shl(ed,ez),em.pc2(ef,ed,ei.keys,eH)}},eV.prototype._update=function(ei,es,ef,eu){var ed=this._desState,eH=em.readUInt32BE(ei,es),ez=em.readUInt32BE(ei,es+4);em.ip(eH,ez,ed.tmp,0),eH=ed.tmp[0],ez=ed.tmp[1],"encrypt"===this.type?this._encrypt(ed,eH,ez,ed.tmp,0):this._decrypt(ed,eH,ez,ed.tmp,0),eH=ed.tmp[0],ez=ed.tmp[1],em.writeUInt32BE(ef,eH,eu),em.writeUInt32BE(ef,ez,eu+4)},eV.prototype._pad=function(ei,es){for(var ef=ei.length-es,eu=es;eu>>0,eH=ey}em.rip(ez,eH,eu,ed)},eV.prototype._decrypt=function(ei,es,ef,eu,ed){for(var eH=ef,ez=es,eV=ei.keys.length-2;eV>=0;eV-=2){var eM=ei.keys[eV],eg=ei.keys[eV+1];em.expand(eH,ei.tmp,0),eM^=ei.tmp[0],eg^=ei.tmp[1];var eL=em.substitute(eM,eg),eb=em.permute(eL),ey=eH;eH=(ez^eb)>>>0,ez=ey}em.rip(eH,ez,eu,ed)}},6159:function(ei,es,ef){"use strict";var eu=ef(3523),ed=ef(3782),em=ef(9876),eH=ef(1016);function ez(ei,es){eu.equal(es.length,24,"Invalid key length");var ef=es.slice(0,8),ed=es.slice(8,16),em=es.slice(16,24);"encrypt"===ei?this.ciphers=[eH.create({type:"encrypt",key:ef}),eH.create({type:"decrypt",key:ed}),eH.create({type:"encrypt",key:em})]:this.ciphers=[eH.create({type:"decrypt",key:em}),eH.create({type:"encrypt",key:ed}),eH.create({type:"decrypt",key:ef})]}function eV(ei){em.call(this,ei);var es=new ez(this.type,this.options.key);this._edeState=es}ed(eV,em),ei.exports=eV,eV.create=function(ei){return new eV(ei)},eV.prototype._update=function(ei,es,ef,eu){var ed=this._edeState;ed.ciphers[0]._update(ei,es,ef,eu),ed.ciphers[1]._update(ef,eu,ef,eu),ed.ciphers[2]._update(ef,eu,ef,eu)},eV.prototype._pad=eH.prototype._pad,eV.prototype._unpad=eH.prototype._unpad},5334:function(ei,es){"use strict";es.readUInt32BE=function(ei,es){return(ei[0+es]<<24|ei[1+es]<<16|ei[2+es]<<8|ei[3+es])>>>0},es.writeUInt32BE=function(ei,es,ef){ei[0+ef]=es>>>24,ei[1+ef]=es>>>16&255,ei[2+ef]=es>>>8&255,ei[3+ef]=255&es},es.ip=function(ei,es,ef,eu){for(var ed=0,em=0,eH=6;eH>=0;eH-=2){for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=ei>>>ez+eH&1}for(var eH=6;eH>=0;eH-=2){for(var ez=1;ez<=25;ez+=8)em<<=1,em|=es>>>ez+eH&1;for(var ez=1;ez<=25;ez+=8)em<<=1,em|=ei>>>ez+eH&1}ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.rip=function(ei,es,ef,eu){for(var ed=0,em=0,eH=0;eH<4;eH++)for(var ez=24;ez>=0;ez-=8)ed<<=1,ed|=es>>>ez+eH&1,ed<<=1,ed|=ei>>>ez+eH&1;for(var eH=4;eH<8;eH++)for(var ez=24;ez>=0;ez-=8)em<<=1,em|=es>>>ez+eH&1,em<<=1,em|=ei>>>ez+eH&1;ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.pc1=function(ei,es,ef,eu){for(var ed=0,em=0,eH=7;eH>=5;eH--){for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=ei>>ez+eH&1}for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>ez+eH&1;for(var eH=1;eH<=3;eH++){for(var ez=0;ez<=24;ez+=8)em<<=1,em|=es>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)em<<=1,em|=ei>>ez+eH&1}for(var ez=0;ez<=24;ez+=8)em<<=1,em|=ei>>ez+eH&1;ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.r28shl=function(ei,es){return ei<>>28-es};var ef=[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];es.pc2=function(ei,es,eu,ed){for(var em=0,eH=0,ez=ef.length>>>1,eV=0;eV>>ef[eV]&1;for(var eV=ez;eV>>ef[eV]&1;eu[ed+0]=em>>>0,eu[ed+1]=eH>>>0},es.expand=function(ei,es,ef){var eu=0,ed=0;eu=(1&ei)<<5|ei>>>27;for(var em=23;em>=15;em-=4)eu<<=6,eu|=ei>>>em&63;for(var em=11;em>=3;em-=4)ed|=ei>>>em&63,ed<<=6;ed|=(31&ei)<<1|ei>>>31,es[ef+0]=eu>>>0,es[ef+1]=ed>>>0};var eu=[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];es.substitute=function(ei,es){for(var ef=0,ed=0;ed<4;ed++){var em=ei>>>18-6*ed&63,eH=eu[64*ed+em];ef<<=4,ef|=eH}for(var ed=0;ed<4;ed++){var em=es>>>18-6*ed&63,eH=eu[256+64*ed+em];ef<<=4,ef|=eH}return ef>>>0};var ed=[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];es.permute=function(ei){for(var es=0,ef=0;ef>>ed[ef]&1;return es>>>0},es.padSplit=function(ei,es,ef){for(var eu=ei.toString(2);eu.lengthei;)ef.ishrn(1);if(ef.isEven()&&ef.iadd(ez),ef.testn(1)||ef.iadd(eV),es.cmp(eV)){if(!es.cmp(eM))for(;ef.mod(eg).cmp(eL);)ef.iadd(ey)}else for(;ef.mod(em).cmp(eb);)ef.iadd(ey);if(ew(eC=ef.shrn(1))&&ew(ef)&&eN(eC)&&eN(ef)&&eH.test(eC)&&eH.test(ef))return ef}}},949:function(ei,es,ef){"use strict";var eu=es;eu.version=ef(2531).i8,eu.utils=ef(4401),eu.rand=ef(3500),eu.curve=ef(9359),eu.curves=ef(6226),eu.ec=ef(4088),eu.eddsa=ef(8511)},2727:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401),em=ed.getNAF,eH=ed.getJSF,ez=ed.assert;function eV(ei,es){this.type=ei,this.p=new eu(es.p,16),this.red=es.prime?eu.red(es.prime):eu.mont(this.p),this.zero=new eu(0).toRed(this.red),this.one=new eu(1).toRed(this.red),this.two=new eu(2).toRed(this.red),this.n=es.n&&new eu(es.n,16),this.g=es.g&&this.pointFromJSON(es.g,es.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var ef=this.n&&this.p.div(this.n);!ef||ef.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function eM(ei,es){this.curve=ei,this.type=es,this.precomputed=null}ei.exports=eV,eV.prototype.point=function(){throw Error("Not implemented")},eV.prototype.validate=function(){throw Error("Not implemented")},eV.prototype._fixedNafMul=function(ei,es){ez(ei.precomputed);var ef=ei._getDoubles(),eu=em(es,1,this._bitLength),ed=(1<=eV;es--)eM=(eM<<1)+eu[es];eH.push(eM)}for(var eg=this.jpoint(null,null,null),eL=this.jpoint(null,null,null),eb=ed;eb>0;eb--){for(var eV=0;eV=0;eM--){for(var es=0;eM>=0&&0===eH[eM];eM--)es++;if(eM>=0&&es++,eV=eV.dblp(es),eM<0)break;var eg=eH[eM];ez(0!==eg),eV="affine"===ei.type?eg>0?eV.mixedAdd(ed[eg-1>>1]):eV.mixedAdd(ed[-eg-1>>1].neg()):eg>0?eV.add(ed[eg-1>>1]):eV.add(ed[-eg-1>>1].neg())}return"affine"===ei.type?eV.toP():eV},eV.prototype._wnafMulAdd=function(ei,es,ef,eu,ed){for(var ez=this._wnafT1,eV=this._wnafT2,eM=this._wnafT3,eg=0,eL=0;eL=1;eL-=2){var eC=eL-1,ex=eL;if(1!==ez[eC]||1!==ez[ex]){eM[eC]=em(ef[eC],ez[eC],this._bitLength),eM[ex]=em(ef[ex],ez[ex],this._bitLength),eg=Math.max(eM[eC].length,eg),eg=Math.max(eM[ex].length,eg);continue}var ew=[es[eC],null,null,es[ex]];0===es[eC].y.cmp(es[ex].y)?(ew[1]=es[eC].add(es[ex]),ew[2]=es[eC].toJ().mixedAdd(es[ex].neg())):0===es[eC].y.cmp(es[ex].y.redNeg())?(ew[1]=es[eC].toJ().mixedAdd(es[ex]),ew[2]=es[eC].add(es[ex].neg())):(ew[1]=es[eC].toJ().mixedAdd(es[ex]),ew[2]=es[eC].toJ().mixedAdd(es[ex].neg()));var eN=[-3,-1,-5,-7,0,7,5,1,3],eS=eH(ef[eC],ef[ex]);eg=Math.max(eS[0].length,eg),eM[eC]=Array(eg),eM[ex]=Array(eg);for(var eA=0;eA=0;eL--){for(var eT=0;eL>=0;){for(var eI=!0,eA=0;eA=0&&eT++,eP=eP.dblp(eT),eL<0)break;for(var eA=0;eA0?eb=eV[eA][eR-1>>1]:eR<0&&(eb=eV[eA][-eR-1>>1].neg()),eP="affine"===eb.type?eP.mixedAdd(eb):eP.add(eb))}}for(var eL=0;eL=Math.ceil((ei.bitLength()+1)/es.step)},eM.prototype._getDoubles=function(ei,es){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var ef=[this],eu=this,ed=0;ed":""},eM.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},eM.prototype._extDbl=function(){var ei=this.x.redSqr(),es=this.y.redSqr(),ef=this.z.redSqr();ef=ef.redIAdd(ef);var eu=this.curve._mulA(ei),ed=this.x.redAdd(this.y).redSqr().redISub(ei).redISub(es),em=eu.redAdd(es),eH=em.redSub(ef),ez=eu.redSub(es),eV=ed.redMul(eH),eM=em.redMul(ez),eg=ed.redMul(ez),eL=eH.redMul(em);return this.curve.point(eV,eM,eL,eg)},eM.prototype._projDbl=function(){var ei,es,ef,eu=this.x.redAdd(this.y).redSqr(),ed=this.x.redSqr(),em=this.y.redSqr();if(this.curve.twisted){var eH=this.curve._mulA(ed),ez=eH.redAdd(em);if(this.zOne)ei=eu.redSub(ed).redSub(em).redMul(ez.redSub(this.curve.two)),es=ez.redMul(eH.redSub(em)),ef=ez.redSqr().redSub(ez).redSub(ez);else{var eV=this.z.redSqr(),eM=ez.redSub(eV).redISub(eV);ei=eu.redSub(ed).redISub(em).redMul(eM),es=ez.redMul(eH.redSub(em)),ef=ez.redMul(eM)}}else{var eH=ed.redAdd(em),eV=this.curve._mulC(this.z).redSqr(),eM=eH.redSub(eV).redSub(eV);ei=this.curve._mulC(eu.redISub(eH)).redMul(eM),es=this.curve._mulC(eH).redMul(ed.redISub(em)),ef=eH.redMul(eM)}return this.curve.point(ei,es,ef)},eM.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},eM.prototype._extAdd=function(ei){var es=this.y.redSub(this.x).redMul(ei.y.redSub(ei.x)),ef=this.y.redAdd(this.x).redMul(ei.y.redAdd(ei.x)),eu=this.t.redMul(this.curve.dd).redMul(ei.t),ed=this.z.redMul(ei.z.redAdd(ei.z)),em=ef.redSub(es),eH=ed.redSub(eu),ez=ed.redAdd(eu),eV=ef.redAdd(es),eM=em.redMul(eH),eg=ez.redMul(eV),eL=em.redMul(eV),eb=eH.redMul(ez);return this.curve.point(eM,eg,eb,eL)},eM.prototype._projAdd=function(ei){var es,ef,eu=this.z.redMul(ei.z),ed=eu.redSqr(),em=this.x.redMul(ei.x),eH=this.y.redMul(ei.y),ez=this.curve.d.redMul(em).redMul(eH),eV=ed.redSub(ez),eM=ed.redAdd(ez),eg=this.x.redAdd(this.y).redMul(ei.x.redAdd(ei.y)).redISub(em).redISub(eH),eL=eu.redMul(eV).redMul(eg);return this.curve.twisted?(es=eu.redMul(eM).redMul(eH.redSub(this.curve._mulA(em))),ef=eV.redMul(eM)):(es=eu.redMul(eM).redMul(eH.redSub(em)),ef=this.curve._mulC(eV).redMul(eM)),this.curve.point(eL,es,ef)},eM.prototype.add=function(ei){return this.isInfinity()?ei:ei.isInfinity()?this:this.curve.extended?this._extAdd(ei):this._projAdd(ei)},eM.prototype.mul=function(ei){return this._hasDoubles(ei)?this.curve._fixedNafMul(this,ei):this.curve._wnafMul(this,ei)},eM.prototype.mulAdd=function(ei,es,ef){return this.curve._wnafMulAdd(1,[this,es],[ei,ef],2,!1)},eM.prototype.jmulAdd=function(ei,es,ef){return this.curve._wnafMulAdd(1,[this,es],[ei,ef],2,!0)},eM.prototype.normalize=function(){if(this.zOne)return this;var ei=this.z.redInvm();return this.x=this.x.redMul(ei),this.y=this.y.redMul(ei),this.t&&(this.t=this.t.redMul(ei)),this.z=this.curve.one,this.zOne=!0,this},eM.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},eM.prototype.getX=function(){return this.normalize(),this.x.fromRed()},eM.prototype.getY=function(){return this.normalize(),this.y.fromRed()},eM.prototype.eq=function(ei){return this===ei||0===this.getX().cmp(ei.getX())&&0===this.getY().cmp(ei.getY())},eM.prototype.eqXToP=function(ei){var es=ei.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(es))return!0;for(var ef=ei.clone(),eu=this.curve.redN.redMul(this.z);;){if(ef.iadd(this.curve.n),ef.cmp(this.curve.p)>=0)return!1;if(es.redIAdd(eu),0===this.x.cmp(es))return!0}},eM.prototype.toP=eM.prototype.normalize,eM.prototype.mixedAdd=eM.prototype.add},9359:function(ei,es,ef){"use strict";var eu=es;eu.base=ef(2727),eu.short=ef(4720),eu.mont=ef(6653),eu.edwards=ef(2705)},6653:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(3782),em=ef(2727),eH=ef(4401);function ez(ei){em.call(this,"mont",ei),this.a=new eu(ei.a,16).toRed(this.red),this.b=new eu(ei.b,16).toRed(this.red),this.i4=new eu(4).toRed(this.red).redInvm(),this.two=new eu(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function eV(ei,es,ef){em.BasePoint.call(this,ei,"projective"),null===es&&null===ef?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new eu(es,16),this.z=new eu(ef,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}ed(ez,em),ei.exports=ez,ez.prototype.validate=function(ei){var es=ei.normalize().x,ef=es.redSqr(),eu=ef.redMul(es).redAdd(ef.redMul(this.a)).redAdd(es);return 0===eu.redSqrt().redSqr().cmp(eu)},ed(eV,em.BasePoint),ez.prototype.decodePoint=function(ei,es){return this.point(eH.toArray(ei,es),1)},ez.prototype.point=function(ei,es){return new eV(this,ei,es)},ez.prototype.pointFromJSON=function(ei){return eV.fromJSON(this,ei)},eV.prototype.precompute=function(){},eV.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},eV.fromJSON=function(ei,es){return new eV(ei,es[0],es[1]||ei.one)},eV.prototype.inspect=function(){return this.isInfinity()?"":""},eV.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},eV.prototype.dbl=function(){var ei=this.x.redAdd(this.z).redSqr(),es=this.x.redSub(this.z).redSqr(),ef=ei.redSub(es),eu=ei.redMul(es),ed=ef.redMul(es.redAdd(this.curve.a24.redMul(ef)));return this.curve.point(eu,ed)},eV.prototype.add=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.diffAdd=function(ei,es){var ef=this.x.redAdd(this.z),eu=this.x.redSub(this.z),ed=ei.x.redAdd(ei.z),em=ei.x.redSub(ei.z).redMul(ef),eH=ed.redMul(eu),ez=es.z.redMul(em.redAdd(eH).redSqr()),eV=es.x.redMul(em.redISub(eH).redSqr());return this.curve.point(ez,eV)},eV.prototype.mul=function(ei){for(var es=ei.clone(),ef=this,eu=this.curve.point(null,null),ed=this,em=[];0!==es.cmpn(0);es.iushrn(1))em.push(es.andln(1));for(var eH=em.length-1;eH>=0;eH--)0===em[eH]?(ef=ef.diffAdd(eu,ed),eu=eu.dbl()):(eu=ef.diffAdd(eu,ed),ef=ef.dbl());return eu},eV.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.eq=function(ei){return 0===this.getX().cmp(ei.getX())},eV.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},eV.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},4720:function(ei,es,ef){"use strict";var eu=ef(4401),ed=ef(711),em=ef(3782),eH=ef(2727),ez=eu.assert;function eV(ei){eH.call(this,"short",ei),this.a=new ed(ei.a,16).toRed(this.red),this.b=new ed(ei.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(ei),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function eM(ei,es,ef,eu){eH.BasePoint.call(this,ei,"affine"),null===es&&null===ef?(this.x=null,this.y=null,this.inf=!0):(this.x=new ed(es,16),this.y=new ed(ef,16),eu&&(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 eg(ei,es,ef,eu){eH.BasePoint.call(this,ei,"jacobian"),null===es&&null===ef&&null===eu?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ed(0)):(this.x=new ed(es,16),this.y=new ed(ef,16),this.z=new ed(eu,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}em(eV,eH),ei.exports=eV,eV.prototype._getEndomorphism=function(ei){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(ei.beta)es=new ed(ei.beta,16).toRed(this.red);else{var es,ef,eu,em=this._getEndoRoots(this.p);es=(es=0>em[0].cmp(em[1])?em[0]:em[1]).toRed(this.red)}if(ei.lambda)ef=new ed(ei.lambda,16);else{var eH=this._getEndoRoots(this.n);0===this.g.mul(eH[0]).x.cmp(this.g.x.redMul(es))?ef=eH[0]:(ef=eH[1],ez(0===this.g.mul(ef).x.cmp(this.g.x.redMul(es))))}return eu=ei.basis?ei.basis.map(function(ei){return{a:new ed(ei.a,16),b:new ed(ei.b,16)}}):this._getEndoBasis(ef),{beta:es,lambda:ef,basis:eu}}},eV.prototype._getEndoRoots=function(ei){var es=ei===this.p?this.red:ed.mont(ei),ef=new ed(2).toRed(es).redInvm(),eu=ef.redNeg(),em=new ed(3).toRed(es).redNeg().redSqrt().redMul(ef);return[eu.redAdd(em).fromRed(),eu.redSub(em).fromRed()]},eV.prototype._getEndoBasis=function(ei){for(var es,ef,eu,em,eH,ez,eV,eM,eg,eL=this.n.ushrn(Math.floor(this.n.bitLength()/2)),eb=ei,ey=this.n.clone(),eC=new ed(1),ex=new ed(0),ew=new ed(0),eN=new ed(1),eS=0;0!==eb.cmpn(0);){var eA=ey.div(eb);eM=ey.sub(eA.mul(eb)),eg=ew.sub(eA.mul(eC));var e_=eN.sub(eA.mul(ex));if(!eu&&0>eM.cmp(eL))es=eV.neg(),ef=eC,eu=eM.neg(),em=eg;else if(eu&&2==++eS)break;eV=eM,ey=eb,eb=eM,ew=eC,eC=eg,eN=ex,ex=e_}eH=eM.neg(),ez=eg;var eE=eu.sqr().add(em.sqr());return eH.sqr().add(ez.sqr()).cmp(eE)>=0&&(eH=es,ez=ef),eu.negative&&(eu=eu.neg(),em=em.neg()),eH.negative&&(eH=eH.neg(),ez=ez.neg()),[{a:eu,b:em},{a:eH,b:ez}]},eV.prototype._endoSplit=function(ei){var es=this.endo.basis,ef=es[0],eu=es[1],ed=eu.b.mul(ei).divRound(this.n),em=ef.b.neg().mul(ei).divRound(this.n),eH=ed.mul(ef.a),ez=em.mul(eu.a),eV=ed.mul(ef.b),eM=em.mul(eu.b);return{k1:ei.sub(eH).sub(ez),k2:eV.add(eM).neg()}},eV.prototype.pointFromX=function(ei,es){(ei=new ed(ei,16)).red||(ei=ei.toRed(this.red));var ef=ei.redSqr().redMul(ei).redIAdd(ei.redMul(this.a)).redIAdd(this.b),eu=ef.redSqrt();if(0!==eu.redSqr().redSub(ef).cmp(this.zero))throw Error("invalid point");var em=eu.fromRed().isOdd();return(es&&!em||!es&&em)&&(eu=eu.redNeg()),this.point(ei,eu)},eV.prototype.validate=function(ei){if(ei.inf)return!0;var es=ei.x,ef=ei.y,eu=this.a.redMul(es),ed=es.redSqr().redMul(es).redIAdd(eu).redIAdd(this.b);return 0===ef.redSqr().redISub(ed).cmpn(0)},eV.prototype._endoWnafMulAdd=function(ei,es,ef){for(var eu=this._endoWnafT1,ed=this._endoWnafT2,em=0;em":""},eM.prototype.isInfinity=function(){return this.inf},eM.prototype.add=function(ei){if(this.inf)return ei;if(ei.inf)return this;if(this.eq(ei))return this.dbl();if(this.neg().eq(ei)||0===this.x.cmp(ei.x))return this.curve.point(null,null);var es=this.y.redSub(ei.y);0!==es.cmpn(0)&&(es=es.redMul(this.x.redSub(ei.x).redInvm()));var ef=es.redSqr().redISub(this.x).redISub(ei.x),eu=es.redMul(this.x.redSub(ef)).redISub(this.y);return this.curve.point(ef,eu)},eM.prototype.dbl=function(){if(this.inf)return this;var ei=this.y.redAdd(this.y);if(0===ei.cmpn(0))return this.curve.point(null,null);var es=this.curve.a,ef=this.x.redSqr(),eu=ei.redInvm(),ed=ef.redAdd(ef).redIAdd(ef).redIAdd(es).redMul(eu),em=ed.redSqr().redISub(this.x.redAdd(this.x)),eH=ed.redMul(this.x.redSub(em)).redISub(this.y);return this.curve.point(em,eH)},eM.prototype.getX=function(){return this.x.fromRed()},eM.prototype.getY=function(){return this.y.fromRed()},eM.prototype.mul=function(ei){return(ei=new ed(ei,16),this.isInfinity())?this:this._hasDoubles(ei)?this.curve._fixedNafMul(this,ei):this.curve.endo?this.curve._endoWnafMulAdd([this],[ei]):this.curve._wnafMul(this,ei)},eM.prototype.mulAdd=function(ei,es,ef){var eu=[this,es],ed=[ei,ef];return this.curve.endo?this.curve._endoWnafMulAdd(eu,ed):this.curve._wnafMulAdd(1,eu,ed,2)},eM.prototype.jmulAdd=function(ei,es,ef){var eu=[this,es],ed=[ei,ef];return this.curve.endo?this.curve._endoWnafMulAdd(eu,ed,!0):this.curve._wnafMulAdd(1,eu,ed,2,!0)},eM.prototype.eq=function(ei){return this===ei||this.inf===ei.inf&&(this.inf||0===this.x.cmp(ei.x)&&0===this.y.cmp(ei.y))},eM.prototype.neg=function(ei){if(this.inf)return this;var es=this.curve.point(this.x,this.y.redNeg());if(ei&&this.precomputed){var ef=this.precomputed,eu=function(ei){return ei.neg()};es.precomputed={naf:ef.naf&&{wnd:ef.naf.wnd,points:ef.naf.points.map(eu)},doubles:ef.doubles&&{step:ef.doubles.step,points:ef.doubles.points.map(eu)}}}return es},eM.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},em(eg,eH.BasePoint),eV.prototype.jpoint=function(ei,es,ef){return new eg(this,ei,es,ef)},eg.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var ei=this.z.redInvm(),es=ei.redSqr(),ef=this.x.redMul(es),eu=this.y.redMul(es).redMul(ei);return this.curve.point(ef,eu)},eg.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},eg.prototype.add=function(ei){if(this.isInfinity())return ei;if(ei.isInfinity())return this;var es=ei.z.redSqr(),ef=this.z.redSqr(),eu=this.x.redMul(es),ed=ei.x.redMul(ef),em=this.y.redMul(es.redMul(ei.z)),eH=ei.y.redMul(ef.redMul(this.z)),ez=eu.redSub(ed),eV=em.redSub(eH);if(0===ez.cmpn(0))return 0!==eV.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eM=ez.redSqr(),eg=eM.redMul(ez),eL=eu.redMul(eM),eb=eV.redSqr().redIAdd(eg).redISub(eL).redISub(eL),ey=eV.redMul(eL.redISub(eb)).redISub(em.redMul(eg)),eC=this.z.redMul(ei.z).redMul(ez);return this.curve.jpoint(eb,ey,eC)},eg.prototype.mixedAdd=function(ei){if(this.isInfinity())return ei.toJ();if(ei.isInfinity())return this;var es=this.z.redSqr(),ef=this.x,eu=ei.x.redMul(es),ed=this.y,em=ei.y.redMul(es).redMul(this.z),eH=ef.redSub(eu),ez=ed.redSub(em);if(0===eH.cmpn(0))return 0!==ez.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eV=eH.redSqr(),eM=eV.redMul(eH),eg=ef.redMul(eV),eL=ez.redSqr().redIAdd(eM).redISub(eg).redISub(eg),eb=ez.redMul(eg.redISub(eL)).redISub(ed.redMul(eM)),ey=this.z.redMul(eH);return this.curve.jpoint(eL,eb,ey)},eg.prototype.dblp=function(ei){if(0===ei||this.isInfinity())return this;if(!ei)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var es=this,ef=0;ef=0)return!1;if(ef.redIAdd(ed),0===this.x.cmp(ef))return!0}},eg.prototype.inspect=function(){return this.isInfinity()?"":""},eg.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6226:function(ei,es,ef){"use strict";var eu,ed=es,em=ef(7028),eH=ef(9359),ez=ef(4401).assert;function eV(ei){"short"===ei.type?this.curve=new eH.short(ei):"edwards"===ei.type?this.curve=new eH.edwards(ei):this.curve=new eH.mont(ei),this.g=this.curve.g,this.n=this.curve.n,this.hash=ei.hash,ez(this.g.validate(),"Invalid curve"),ez(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function eM(ei,es){Object.defineProperty(ed,ei,{configurable:!0,enumerable:!0,get:function(){var ef=new eV(es);return Object.defineProperty(ed,ei,{configurable:!0,enumerable:!0,value:ef}),ef}})}ed.PresetCurve=eV,eM("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:em.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),eM("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:em.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),eM("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:em.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),eM("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:em.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"]}),eM("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:em.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"]}),eM("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:em.sha256,gRed:!1,g:["9"]}),eM("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:em.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{eu=ef(9702)}catch(ei){eu=void 0}eM("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:em.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",eu]})},4088:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4910),em=ef(4401),eH=ef(6226),ez=ef(3500),eV=em.assert,eM=ef(4724),eg=ef(7526);function eL(ei){if(!(this instanceof eL))return new eL(ei);"string"==typeof ei&&(eV(eH.hasOwnProperty(ei),"Unknown curve "+ei),ei=eH[ei]),ei instanceof eH.PresetCurve&&(ei={curve:ei}),this.curve=ei.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=ei.curve.g,this.g.precompute(ei.curve.n.bitLength()+1),this.hash=ei.hash||ei.curve.hash}ei.exports=eL,eL.prototype.keyPair=function(ei){return new eM(this,ei)},eL.prototype.keyFromPrivate=function(ei,es){return eM.fromPrivate(this,ei,es)},eL.prototype.keyFromPublic=function(ei,es){return eM.fromPublic(this,ei,es)},eL.prototype.genKeyPair=function(ei){ei||(ei={});for(var es=new ed({hash:this.hash,pers:ei.pers,persEnc:ei.persEnc||"utf8",entropy:ei.entropy||ez(this.hash.hmacStrength),entropyEnc:ei.entropy&&ei.entropyEnc||"utf8",nonce:this.n.toArray()}),ef=this.n.byteLength(),em=this.n.sub(new eu(2));;){var eH=new eu(es.generate(ef));if(!(eH.cmp(em)>0))return eH.iaddn(1),this.keyFromPrivate(eH)}},eL.prototype._truncateToN=function(ei,es){var ef=8*ei.byteLength()-this.n.bitLength();return(ef>0&&(ei=ei.ushrn(ef)),!es&&ei.cmp(this.n)>=0)?ei.sub(this.n):ei},eL.prototype.sign=function(ei,es,ef,em){"object"==typeof ef&&(em=ef,ef=null),em||(em={}),es=this.keyFromPrivate(es,ef),ei=this._truncateToN(new eu(ei,16));for(var eH=this.n.byteLength(),ez=es.getPrivate().toArray("be",eH),eV=ei.toArray("be",eH),eM=new ed({hash:this.hash,entropy:ez,nonce:eV,pers:em.pers,persEnc:em.persEnc||"utf8"}),eL=this.n.sub(new eu(1)),eb=0;;eb++){var ey=em.k?em.k(eb):new eu(eM.generate(this.n.byteLength()));if(!(0>=(ey=this._truncateToN(ey,!0)).cmpn(1)||ey.cmp(eL)>=0)){var eC=this.g.mul(ey);if(!eC.isInfinity()){var ex=eC.getX(),ew=ex.umod(this.n);if(0!==ew.cmpn(0)){var eN=ey.invm(this.n).mul(ew.mul(es.getPrivate()).iadd(ei));if(0!==(eN=eN.umod(this.n)).cmpn(0)){var eS=(eC.getY().isOdd()?1:0)|(0!==ex.cmp(ew)?2:0);return em.canonical&&eN.cmp(this.nh)>0&&(eN=this.n.sub(eN),eS^=1),new eg({r:ew,s:eN,recoveryParam:eS})}}}}}},eL.prototype.verify=function(ei,es,ef,ed){ei=this._truncateToN(new eu(ei,16)),ef=this.keyFromPublic(ef,ed);var em=(es=new eg(es,"hex")).r,eH=es.s;if(0>em.cmpn(1)||em.cmp(this.n)>=0||0>eH.cmpn(1)||eH.cmp(this.n)>=0)return!1;var ez=eH.invm(this.n),eV=ez.mul(ei).umod(this.n),eM=ez.mul(em).umod(this.n);if(!this.curve._maxwellTrick){var eL=this.g.mulAdd(eV,ef.getPublic(),eM);return!eL.isInfinity()&&0===eL.getX().umod(this.n).cmp(em)}var eL=this.g.jmulAdd(eV,ef.getPublic(),eM);return!eL.isInfinity()&&eL.eqXToP(em)},eL.prototype.recoverPubKey=function(ei,es,ef,ed){eV((3&ef)===ef,"The recovery param is more than two bits"),es=new eg(es,ed);var em=this.n,eH=new eu(ei),ez=es.r,eM=es.s,eL=1&ef,eb=ef>>1;if(ez.cmp(this.curve.p.umod(this.curve.n))>=0&&eb)throw Error("Unable to find sencond key candinate");ez=eb?this.curve.pointFromX(ez.add(this.curve.n),eL):this.curve.pointFromX(ez,eL);var ey=es.r.invm(em),eC=em.sub(eH).mul(ey).umod(em),ex=eM.mul(ey).umod(em);return this.g.mulAdd(eC,ez,ex)},eL.prototype.getKeyRecoveryParam=function(ei,es,ef,eu){if(null!==(es=new eg(es,eu)).recoveryParam)return es.recoveryParam;for(var ed,em=0;em<4;em++){try{ed=this.recoverPubKey(ei,es,em)}catch(ei){continue}if(ed.eq(ef))return em}throw Error("Unable to find valid recovery factor")}},4724:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401).assert;function em(ei,es){this.ec=ei,this.priv=null,this.pub=null,es.priv&&this._importPrivate(es.priv,es.privEnc),es.pub&&this._importPublic(es.pub,es.pubEnc)}ei.exports=em,em.fromPublic=function(ei,es,ef){return es instanceof em?es:new em(ei,{pub:es,pubEnc:ef})},em.fromPrivate=function(ei,es,ef){return es instanceof em?es:new em(ei,{priv:es,privEnc:ef})},em.prototype.validate=function(){var ei=this.getPublic();return ei.isInfinity()?{result:!1,reason:"Invalid public key"}:ei.validate()?ei.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"}},em.prototype.getPublic=function(ei,es){return("string"==typeof ei&&(es=ei,ei=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),es)?this.pub.encode(es,ei):this.pub},em.prototype.getPrivate=function(ei){return"hex"===ei?this.priv.toString(16,2):this.priv},em.prototype._importPrivate=function(ei,es){this.priv=new eu(ei,es||16),this.priv=this.priv.umod(this.ec.curve.n)},em.prototype._importPublic=function(ei,es){if(ei.x||ei.y){"mont"===this.ec.curve.type?ed(ei.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&ed(ei.x&&ei.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(ei.x,ei.y);return}this.pub=this.ec.curve.decodePoint(ei,es)},em.prototype.derive=function(ei){return ei.mul(this.priv).getX()},em.prototype.sign=function(ei,es,ef){return this.ec.sign(ei,this,es,ef)},em.prototype.verify=function(ei,es){return this.ec.verify(ei,es,this)},em.prototype.inspect=function(){return""}},7526:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401),em=ed.assert;function eH(ei,es){if(ei instanceof eH)return ei;this._importDER(ei,es)||(em(ei.r&&ei.s,"Signature without r or s"),this.r=new eu(ei.r,16),this.s=new eu(ei.s,16),void 0===ei.recoveryParam?this.recoveryParam=null:this.recoveryParam=ei.recoveryParam)}function ez(){this.place=0}function eV(ei,es){var ef=ei[es.place++];if(!(128&ef))return ef;var eu=15&ef;if(0===eu||eu>4)return!1;for(var ed=0,em=0,eH=es.place;em>>=0;return!(ed<=127)&&(es.place=eH,ed)}function eM(ei){for(var es=0,ef=ei.length-1;!ei[es]&&!(128&ei[es+1])&&es>>3);for(ei.push(128|ef);--ef;)ei.push(es>>>(ef<<3)&255);ei.push(es)}ei.exports=eH,eH.prototype._importDER=function(ei,es){ei=ed.toArray(ei,es);var ef=new ez;if(48!==ei[ef.place++])return!1;var em=eV(ei,ef);if(!1===em||em+ef.place!==ei.length||2!==ei[ef.place++])return!1;var eH=eV(ei,ef);if(!1===eH)return!1;var eM=ei.slice(ef.place,eH+ef.place);if(ef.place+=eH,2!==ei[ef.place++])return!1;var eg=eV(ei,ef);if(!1===eg||ei.length!==eg+ef.place)return!1;var eL=ei.slice(ef.place,eg+ef.place);if(0===eM[0]){if(!(128&eM[1]))return!1;eM=eM.slice(1)}if(0===eL[0]){if(!(128&eL[1]))return!1;eL=eL.slice(1)}return this.r=new eu(eM),this.s=new eu(eL),this.recoveryParam=null,!0},eH.prototype.toDER=function(ei){var es=this.r.toArray(),ef=this.s.toArray();for(128&es[0]&&(es=[0].concat(es)),128&ef[0]&&(ef=[0].concat(ef)),es=eM(es),ef=eM(ef);!ef[0]&&!(128&ef[1]);)ef=ef.slice(1);var eu=[2];eg(eu,es.length),(eu=eu.concat(es)).push(2),eg(eu,ef.length);var em=eu.concat(ef),eH=[48];return eg(eH,em.length),eH=eH.concat(em),ed.encode(eH,ei)}},8511:function(ei,es,ef){"use strict";var eu=ef(7028),ed=ef(6226),em=ef(4401),eH=em.assert,ez=em.parseBytes,eV=ef(9917),eM=ef(9314);function eg(ei){if(eH("ed25519"===ei,"only tested with ed25519 so far"),!(this instanceof eg))return new eg(ei);var ei=ed[ei].curve;this.curve=ei,this.g=ei.g,this.g.precompute(ei.n.bitLength()+1),this.pointClass=ei.point().constructor,this.encodingLength=Math.ceil(ei.n.bitLength()/8),this.hash=eu.sha512}ei.exports=eg,eg.prototype.sign=function(ei,es){ei=ez(ei);var ef=this.keyFromSecret(es),eu=this.hashInt(ef.messagePrefix(),ei),ed=this.g.mul(eu),em=this.encodePoint(ed),eH=this.hashInt(em,ef.pubBytes(),ei).mul(ef.priv()),eV=eu.add(eH).umod(this.curve.n);return this.makeSignature({R:ed,S:eV,Rencoded:em})},eg.prototype.verify=function(ei,es,ef){ei=ez(ei),es=this.makeSignature(es);var eu=this.keyFromPublic(ef),ed=this.hashInt(es.Rencoded(),eu.pubBytes(),ei),em=this.g.mul(es.S());return es.R().add(eu.pub().mul(ed)).eq(em)},eg.prototype.hashInt=function(){for(var ei=this.hash(),es=0;es(ed>>1)-1?(ed>>1)-eV:eV,em.isubn(ez)):ez=0,eu[eH]=ez,em.iushrn(1)}return eu}function eV(ei,es){var ef=[[],[]];ei=ei.clone(),es=es.clone();for(var eu=0,ed=0;ei.cmpn(-eu)>0||es.cmpn(-ed)>0;){var em,eH,ez=ei.andln(3)+eu&3,eV=es.andln(3)+ed&3;if(3===ez&&(ez=-1),3===eV&&(eV=-1),(1&ez)==0)em=0;else{var eM=ei.andln(7)+eu&7;em=(3===eM||5===eM)&&2===eV?-ez:ez}if(ef[0].push(em),(1&eV)==0)eH=0;else{var eM=es.andln(7)+ed&7;eH=(3===eM||5===eM)&&2===ez?-eV:eV}ef[1].push(eH),2*eu===em+1&&(eu=1-eu),2*ed===eH+1&&(ed=1-ed),ei.iushrn(1),es.iushrn(1)}return ef}function eM(ei,es,ef){var eu="_"+es;ei.prototype[es]=function(){return void 0!==this[eu]?this[eu]:this[eu]=ef.call(this)}}function eg(ei){return"string"==typeof ei?eu.toArray(ei,"hex"):ei}function eL(ei){return new ed(ei,"hex","le")}eu.assert=em,eu.toArray=eH.toArray,eu.zero2=eH.zero2,eu.toHex=eH.toHex,eu.encode=eH.encode,eu.getNAF=ez,eu.getJSF=eV,eu.cachedProperty=eM,eu.parseBytes=eg,eu.intFromLE=eL},8368:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(3533);function em(ei,es,ef,em){if(eu.isBuffer(ei)||(ei=eu.from(ei,"binary")),es&&(eu.isBuffer(es)||(es=eu.from(es,"binary")),8!==es.length))throw RangeError("salt should be Buffer with 8 byte length");for(var eH=ef/8,ez=eu.alloc(eH),eV=eu.alloc(em||0),eM=eu.alloc(0);eH>0||em>0;){var eg=new ed;eg.update(eM),eg.update(ei),es&&eg.update(es),eM=eg.digest();var eL=0;if(eH>0){var eb=ez.length-eH;eL=Math.min(eH,eM.length),eM.copy(ez,eb,0,eL),eH-=eL}if(eL0){var ey=eV.length-em,eC=Math.min(em,eM.length-eL);eM.copy(eV,ey,eL,eL+eC),em-=eC}}return eM.fill(0),{key:ez,iv:eV}}ei.exports=em},9029:function(ei,es,ef){"use strict";var eu=ef(6911).Buffer,ed=ef(3726).Transform;function em(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError(es+" must be a string or a buffer")}function eH(ei){ed.call(this),this._block=eu.allocUnsafe(ei),this._blockSize=ei,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}ef(3782)(eH,ed),eH.prototype._transform=function(ei,es,ef){var eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)},eH.prototype._flush=function(ei){var es=null;try{this.push(this.digest())}catch(ei){es=ei}ei(es)},eH.prototype.update=function(ei,es){if(em(ei,"Data"),this._finalized)throw Error("Digest already called");eu.isBuffer(ei)||(ei=eu.from(ei,es));for(var ef=this._block,ed=0;this._blockOffset+ei.length-ed>=this._blockSize;){for(var eH=this._blockOffset;eH0;++ez)this._length[ez]+=eV,(eV=this._length[ez]/4294967296|0)>0&&(this._length[ez]-=4294967296*eV);return this},eH.prototype._update=function(){throw Error("_update is not implemented")},eH.prototype.digest=function(ei){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var es=this._digest();void 0!==ei&&(es=es.toString(ei)),this._block.fill(0),this._blockOffset=0;for(var ef=0;ef<4;++ef)this._length[ef]=0;return es},eH.prototype._digest=function(){throw Error("_digest is not implemented")},ei.exports=eH},7028:function(ei,es,ef){var eu=es;eu.utils=ef(263),eu.common=ef(1330),eu.sha=ef(301),eu.ripemd=ef(3079),eu.hmac=ef(3092),eu.sha1=eu.sha.sha1,eu.sha256=eu.sha.sha256,eu.sha224=eu.sha.sha224,eu.sha384=eu.sha.sha384,eu.sha512=eu.sha.sha512,eu.ripemd160=eu.ripemd.ripemd160},1330:function(ei,es,ef){"use strict";var eu=ef(263),ed=ef(3523);function em(){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}es.BlockHash=em,em.prototype.update=function(ei,es){if(ei=eu.toArray(ei,es),this.pending?this.pending=this.pending.concat(ei):this.pending=ei,this.pendingTotal+=ei.length,this.pending.length>=this._delta8){var ef=(ei=this.pending).length%this._delta8;this.pending=ei.slice(ei.length-ef,ei.length),0===this.pending.length&&(this.pending=null),ei=eu.join32(ei,0,ei.length-ef,this.endian);for(var ed=0;ed>>24&255,eu[ed++]=ei>>>16&255,eu[ed++]=ei>>>8&255,eu[ed++]=255&ei}else for(em=8,eu[ed++]=255&ei,eu[ed++]=ei>>>8&255,eu[ed++]=ei>>>16&255,eu[ed++]=ei>>>24&255,eu[ed++]=0,eu[ed++]=0,eu[ed++]=0,eu[ed++]=0;emthis.blockSize&&(ei=(new this.Hash).update(ei).digest()),ed(ei.length<=this.blockSize);for(var es=ei.length;es>>3}function eL(ei){return eu(ei,17)^eu(ei,19)^ei>>>10}es.ft_1=ed,es.ch32=em,es.maj32=eH,es.p32=ez,es.s0_256=eV,es.s1_256=eM,es.g0_256=eg,es.g1_256=eL},263:function(ei,es,ef){"use strict";var eu=ef(3523),ed=ef(3782);function em(ei,es){return(64512&ei.charCodeAt(es))==55296&&!(es<0)&&!(es+1>=ei.length)&&(64512&ei.charCodeAt(es+1))==56320}function eH(ei,es){if(Array.isArray(ei))return ei.slice();if(!ei)return[];var ef=[];if("string"==typeof ei){if(es){if("hex"===es)for((ei=ei.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(ei="0"+ei),ed=0;ed>6|192,ef[eu++]=63&eH|128):em(ei,ed)?(eH=65536+((1023&eH)<<10)+(1023&ei.charCodeAt(++ed)),ef[eu++]=eH>>18|240,ef[eu++]=eH>>12&63|128,ef[eu++]=eH>>6&63|128,ef[eu++]=63&eH|128):(ef[eu++]=eH>>12|224,ef[eu++]=eH>>6&63|128,ef[eu++]=63&eH|128)}}else for(ed=0;ed>>24|ei>>>8&65280|ei<<8&16711680|(255&ei)<<24)>>>0}function eM(ei,es){for(var ef="",eu=0;eu>>0;return ez}function ey(ei,es){for(var ef=Array(4*ei.length),eu=0,ed=0;eu>>24,ef[ed+1]=em>>>16&255,ef[ed+2]=em>>>8&255,ef[ed+3]=255&em):(ef[ed+3]=em>>>24,ef[ed+2]=em>>>16&255,ef[ed+1]=em>>>8&255,ef[ed]=255&em)}return ef}function eC(ei,es){return ei>>>es|ei<<32-es}function ex(ei,es){return ei<>>32-es}function ew(ei,es){return ei+es>>>0}function eN(ei,es,ef){return ei+es+ef>>>0}function eS(ei,es,ef,eu){return ei+es+ef+eu>>>0}function eA(ei,es,ef,eu,ed){return ei+es+ef+eu+ed>>>0}function e_(ei,es,ef,eu){var ed=ei[es],em=eu+ei[es+1]>>>0,eH=(em>>0,ei[es+1]=em}function eE(ei,es,ef,eu){return(es+eu>>>0>>0}function eP(ei,es,ef,eu){return es+eu>>>0}function eB(ei,es,ef,eu,ed,em,eH,ez){var eV,eM=es;return ei+ef+ed+eH+(eV=0+((eM=eM+eu>>>0)>>0)>>0)>>0}function eT(ei,es,ef,eu,ed,em,eH,ez){return es+eu+em+ez>>>0}function eI(ei,es,ef,eu,ed,em,eH,ez,eV,eM){var eg,eL=es;return ei+ef+ed+eH+eV+(eg=0+((eL=eL+eu>>>0)>>0)>>0)>>0)>>0}function eR(ei,es,ef,eu,ed,em,eH,ez,eV,eM){return es+eu+em+ez+eM>>>0}function eO(ei,es,ef){return(es<<32-ef|ei>>>ef)>>>0}function ej(ei,es,ef){return(ei<<32-ef|es>>>ef)>>>0}function eD(ei,es,ef){return ei>>>ef}function eF(ei,es,ef){return(ei<<32-ef|es>>>ef)>>>0}es.inherits=ed,es.toArray=eH,es.toHex=ez,es.htonl=eV,es.toHex32=eM,es.zero2=eg,es.zero8=eL,es.join32=eb,es.split32=ey,es.rotr32=eC,es.rotl32=ex,es.sum32=ew,es.sum32_3=eN,es.sum32_4=eS,es.sum32_5=eA,es.sum64=e_,es.sum64_hi=eE,es.sum64_lo=eP,es.sum64_4_hi=eB,es.sum64_4_lo=eT,es.sum64_5_hi=eI,es.sum64_5_lo=eR,es.rotr64_hi=eO,es.rotr64_lo=ej,es.shr64_hi=eD,es.shr64_lo=eF},4910:function(ei,es,ef){"use strict";var eu=ef(7028),ed=ef(6545),em=ef(3523);function eH(ei){if(!(this instanceof eH))return new eH(ei);this.hash=ei.hash,this.predResist=!!ei.predResist,this.outLen=this.hash.outSize,this.minEntropy=ei.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var es=ed.toArray(ei.entropy,ei.entropyEnc||"hex"),ef=ed.toArray(ei.nonce,ei.nonceEnc||"hex"),eu=ed.toArray(ei.pers,ei.persEnc||"hex");em(es.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(es,ef,eu)}ei.exports=eH,eH.prototype._init=function(ei,es,ef){var eu=ei.concat(es).concat(ef);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var ed=0;ed=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(ei.concat(ef||[])),this._reseed=1},eH.prototype.generate=function(ei,es,ef,eu){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof es&&(eu=ef,ef=es,es=null),ef&&(ef=ed.toArray(ef,eu||"hex"),this._update(ef));for(var em=[];em.length>>32-es}function eM(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&ef|~es&eu)+ed+em|0,eH)+es|0}function eg(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&eu|ef&~eu)+ed+em|0,eH)+es|0}function eL(ei,es,ef,eu,ed,em,eH){return eV(ei+(es^ef^eu)+ed+em|0,eH)+es|0}function eb(ei,es,ef,eu,ed,em,eH){return eV(ei+(ef^(es|~eu))+ed+em|0,eH)+es|0}eu(ez,ed),ez.prototype._update=function(){for(var ei=eH,es=0;es<16;++es)ei[es]=this._block.readInt32LE(4*es);var ef=this._a,eu=this._b,ed=this._c,em=this._d;ef=eM(ef,eu,ed,em,ei[0],3614090360,7),em=eM(em,ef,eu,ed,ei[1],3905402710,12),ed=eM(ed,em,ef,eu,ei[2],606105819,17),eu=eM(eu,ed,em,ef,ei[3],3250441966,22),ef=eM(ef,eu,ed,em,ei[4],4118548399,7),em=eM(em,ef,eu,ed,ei[5],1200080426,12),ed=eM(ed,em,ef,eu,ei[6],2821735955,17),eu=eM(eu,ed,em,ef,ei[7],4249261313,22),ef=eM(ef,eu,ed,em,ei[8],1770035416,7),em=eM(em,ef,eu,ed,ei[9],2336552879,12),ed=eM(ed,em,ef,eu,ei[10],4294925233,17),eu=eM(eu,ed,em,ef,ei[11],2304563134,22),ef=eM(ef,eu,ed,em,ei[12],1804603682,7),em=eM(em,ef,eu,ed,ei[13],4254626195,12),ed=eM(ed,em,ef,eu,ei[14],2792965006,17),eu=eM(eu,ed,em,ef,ei[15],1236535329,22),ef=eg(ef,eu,ed,em,ei[1],4129170786,5),em=eg(em,ef,eu,ed,ei[6],3225465664,9),ed=eg(ed,em,ef,eu,ei[11],643717713,14),eu=eg(eu,ed,em,ef,ei[0],3921069994,20),ef=eg(ef,eu,ed,em,ei[5],3593408605,5),em=eg(em,ef,eu,ed,ei[10],38016083,9),ed=eg(ed,em,ef,eu,ei[15],3634488961,14),eu=eg(eu,ed,em,ef,ei[4],3889429448,20),ef=eg(ef,eu,ed,em,ei[9],568446438,5),em=eg(em,ef,eu,ed,ei[14],3275163606,9),ed=eg(ed,em,ef,eu,ei[3],4107603335,14),eu=eg(eu,ed,em,ef,ei[8],1163531501,20),ef=eg(ef,eu,ed,em,ei[13],2850285829,5),em=eg(em,ef,eu,ed,ei[2],4243563512,9),ed=eg(ed,em,ef,eu,ei[7],1735328473,14),eu=eg(eu,ed,em,ef,ei[12],2368359562,20),ef=eL(ef,eu,ed,em,ei[5],4294588738,4),em=eL(em,ef,eu,ed,ei[8],2272392833,11),ed=eL(ed,em,ef,eu,ei[11],1839030562,16),eu=eL(eu,ed,em,ef,ei[14],4259657740,23),ef=eL(ef,eu,ed,em,ei[1],2763975236,4),em=eL(em,ef,eu,ed,ei[4],1272893353,11),ed=eL(ed,em,ef,eu,ei[7],4139469664,16),eu=eL(eu,ed,em,ef,ei[10],3200236656,23),ef=eL(ef,eu,ed,em,ei[13],681279174,4),em=eL(em,ef,eu,ed,ei[0],3936430074,11),ed=eL(ed,em,ef,eu,ei[3],3572445317,16),eu=eL(eu,ed,em,ef,ei[6],76029189,23),ef=eL(ef,eu,ed,em,ei[9],3654602809,4),em=eL(em,ef,eu,ed,ei[12],3873151461,11),ed=eL(ed,em,ef,eu,ei[15],530742520,16),eu=eL(eu,ed,em,ef,ei[2],3299628645,23),ef=eb(ef,eu,ed,em,ei[0],4096336452,6),em=eb(em,ef,eu,ed,ei[7],1126891415,10),ed=eb(ed,em,ef,eu,ei[14],2878612391,15),eu=eb(eu,ed,em,ef,ei[5],4237533241,21),ef=eb(ef,eu,ed,em,ei[12],1700485571,6),em=eb(em,ef,eu,ed,ei[3],2399980690,10),ed=eb(ed,em,ef,eu,ei[10],4293915773,15),eu=eb(eu,ed,em,ef,ei[1],2240044497,21),ef=eb(ef,eu,ed,em,ei[8],1873313359,6),em=eb(em,ef,eu,ed,ei[15],4264355552,10),ed=eb(ed,em,ef,eu,ei[6],2734768916,15),eu=eb(eu,ed,em,ef,ei[13],1309151649,21),ef=eb(ef,eu,ed,em,ei[4],4149444226,6),em=eb(em,ef,eu,ed,ei[11],3174756917,10),ed=eb(ed,em,ef,eu,ei[2],718787259,15),eu=eb(eu,ed,em,ef,ei[9],3951481745,21),this._a=this._a+ef|0,this._b=this._b+eu|0,this._c=this._c+ed|0,this._d=this._d+em|0},ez.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 ei=em.allocUnsafe(16);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei},ei.exports=ez},1354:function(ei,es,ef){var eu=ef(711),ed=ef(3500);function em(ei){this.rand=ei||new ed.Rand}ei.exports=em,em.create=function(ei){return new em(ei)},em.prototype._randbelow=function(ei){var es=Math.ceil(ei.bitLength()/8);do var ef=new eu(this.rand.generate(es));while(ef.cmp(ei)>=0);return ef},em.prototype._randrange=function(ei,es){var ef=es.sub(ei);return ei.add(this._randbelow(ef))},em.prototype.test=function(ei,es,ef){var ed=ei.bitLength(),em=eu.mont(ei),eH=new eu(1).toRed(em);es||(es=Math.max(1,ed/48|0));for(var ez=ei.subn(1),eV=0;!ez.testn(eV);eV++);for(var eM=ei.shrn(eV),eg=ez.toRed(em),eL=!0;es>0;es--){var eb=this._randrange(new eu(2),ez);ef&&ef(eb);var ey=eb.toRed(em).redPow(eM);if(0!==ey.cmp(eH)&&0!==ey.cmp(eg)){for(var eC=1;eC0;es--){var eg=this._randrange(new eu(2),eH),eL=ei.gcd(eg);if(0!==eL.cmpn(1))return eL;var eb=eg.toRed(ed).redPow(eV);if(0!==eb.cmp(em)&&0!==eb.cmp(eM)){for(var ey=1;ey>8,eH=255&ed;em?ef.push(em,eH):ef.push(eH)}return ef}function ed(ei){return 1===ei.length?"0"+ei:ei}function em(ei){for(var es="",ef=0;efes||ef!=ef)throw TypeError("Bad key length")}},2127:function(ei,es,ef){var eu={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},ed=ef(4873),em=ef(6911).Buffer,eH=ef(5349),ez=ef(7007),eV=ef(5407);function eM(ei,es,ef,eM,eg){eH(ef,eM),ei=eV(ei,ez,"Password"),es=eV(es,ez,"Salt"),eg=eg||"sha1";var eL=em.allocUnsafe(eM),eb=em.allocUnsafe(es.length+4);es.copy(eb,0,0,es.length);for(var ey=0,eC=eu[eg],ex=Math.ceil(eM/eC),ew=1;ew<=ex;ew++){eb.writeUInt32BE(ew,es.length);for(var eN=ed(eg,ei).update(eb).digest(),eS=eN,eA=1;eA=es.length){em++;break}var eH=es.slice(2,ed-1);if(("0002"!==eu.toString("hex")&&!ef||"0001"!==eu.toString("hex")&&ef)&&em++,eH.length<8&&em++,em)throw Error("decryption error");return es.slice(ed)}function ey(ei,es){ei=eg.from(ei),es=eg.from(es);var ef=0,eu=ei.length;ei.length!==es.length&&(ef++,eu=Math.min(ei.length,es.length));for(var ed=-1;++edey||new eH(es).cmp(eV.modulus)>=0)throw Error("decryption error");em=ef?eM(new eH(es),eV):ez(es,eV);var eC=eg.alloc(ey-em.length);if(em=eg.concat([eC,em],ey),4===ed)return eL(eV,em);if(1===ed)return eb(eV,em,ef);if(3===ed)return em;throw Error("unknown padding")}},3995:function(ei,es,ef){var eu=ef(9902),ed=ef(7223),em=ef(9739),eH=ef(5520),ez=ef(6386),eV=ef(711),eM=ef(1607),eg=ef(7166),eL=ef(6911).Buffer;function eb(ei,es){var ef=ei.modulus.byteLength(),eu=es.length,eM=em("sha1").update(eL.alloc(0)).digest(),eg=eM.length,eb=2*eg;if(eu>ef-eb-2)throw Error("message too long");var ey=eL.alloc(ef-eu-eb-2),eC=ef-eg-1,ex=ed(eg),ew=ez(eL.concat([eM,ey,eL.alloc(1,1),es],eC),eH(ex,eC)),eN=ez(ex,eH(ew,eg));return new eV(eL.concat([eL.alloc(1),eN,ew],ef))}function ey(ei,es,ef){var eu,ed=es.length,em=ei.modulus.byteLength();if(ed>em-11)throw Error("message too long");return eu=ef?eL.alloc(em-ed-3,255):eC(em-ed-3),new eV(eL.concat([eL.from([0,ef?1:2]),eu,eL.alloc(1),es],em))}function eC(ei){for(var es,ef=eL.allocUnsafe(ei),eu=0,em=ed(2*ei),eH=0;eu=0)throw Error("data too long for modulus")}else throw Error("unknown padding");return ef?eg(em,eH):eM(em,eH)}},1607:function(ei,es,ef){var eu=ef(711),ed=ef(6911).Buffer;function em(ei,es){return ed.from(ei.toRed(eu.mont(es.modulus)).redPow(new eu(es.publicExponent)).fromRed().toArray())}ei.exports=em},6386:function(ei){ei.exports=function(ei,es){for(var ef=ei.length,eu=-1;++eueH)throw RangeError("requested too many random bytes");var ef=eV.allocUnsafe(ei);if(ei>0){if(ei>ed)for(var eu=0;eueg||ei<0)throw TypeError("offset must be a uint32");if(ei>eV||ei>es)throw RangeError("offset out of range")}function eb(ei,es,ef){if("number"!=typeof ei||ei!=ei)throw TypeError("size must be a number");if(ei>eg||ei<0)throw TypeError("size must be a uint32");if(ei+es>ef||ei>eV)throw RangeError("buffer too small")}function ey(ei,es,eu,ed){if(!ez.isBuffer(ei)&&!(ei instanceof ef.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof es)ed=es,es=0,eu=ei.length;else if("function"==typeof eu)ed=eu,eu=ei.length-es;else if("function"!=typeof ed)throw TypeError('"cb" argument must be a function');return eL(es,ei.length),eb(eu,es,ei.length),eC(ei,es,eu,ed)}function eC(ei,es,ef,eu){var ed=ei.buffer,eH=new Uint8Array(ed,es,ef);if(eM.getRandomValues(eH),eu){em.nextTick(function(){eu(null,ei)});return}return ei}function ex(ei,es,eu){if(void 0===es&&(es=0),!ez.isBuffer(ei)&&!(ei instanceof ef.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');return eL(es,ei.length),void 0===eu&&(eu=ei.length-es),eb(eu,es,ei.length),eC(ei,es,eu)}eM&&eM.getRandomValues?(es.randomFill=ey,es.randomFillSync=ex):(es.randomFill=ed,es.randomFillSync=ed)},4646:function(ei){"use strict";let es={};function ef(ei,ef,eu){function ed(ei,es,eu){return"string"==typeof ef?ef:ef(ei,es,eu)}eu||(eu=Error);class em extends eu{constructor(ei,es,ef){super(ed(ei,es,ef))}}em.prototype.name=eu.name,em.prototype.code=ei,es[ei]=em}function eu(ei,es){if(!Array.isArray(ei))return`of ${es} ${String(ei)}`;{let ef=ei.length;return(ei=ei.map(ei=>String(ei)),ef>2)?`one of ${es} ${ei.slice(0,ef-1).join(", ")}, or `+ei[ef-1]:2===ef?`one of ${es} ${ei[0]} or ${ei[1]}`:`of ${es} ${ei[0]}`}}function ed(ei,es,ef){return ei.substr(!ef||ef<0?0:+ef,es.length)===es}function em(ei,es,ef){return(void 0===ef||ef>ei.length)&&(ef=ei.length),ei.substring(ef-es.length,ef)===es}function eH(ei,es,ef){return"number"!=typeof ef&&(ef=0),!(ef+es.length>ei.length)&&-1!==ei.indexOf(es,ef)}ef("ERR_INVALID_OPT_VALUE",function(ei,es){return'The value "'+es+'" is invalid for option "'+ei+'"'},TypeError),ef("ERR_INVALID_ARG_TYPE",function(ei,es,ef){let ez,eV;if("string"==typeof es&&ed(es,"not ")?(ez="must not be",es=es.replace(/^not /,"")):ez="must be",em(ei," argument"))eV=`The ${ei} ${ez} ${eu(es,"type")}`;else{let ef=eH(ei,".")?"property":"argument";eV=`The "${ei}" ${ef} ${ez} ${eu(es,"type")}`}return eV+`. Received type ${typeof ef}`},TypeError),ef("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ef("ERR_METHOD_NOT_IMPLEMENTED",function(ei){return"The "+ei+" method is not implemented"}),ef("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ef("ERR_STREAM_DESTROYED",function(ei){return"Cannot call "+ei+" after a stream was destroyed"}),ef("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ef("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ef("ERR_STREAM_WRITE_AFTER_END","write after end"),ef("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ef("ERR_UNKNOWN_ENCODING",function(ei){return"Unknown encoding: "+ei},TypeError),ef("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ei.exports.q=es},2403:function(ei,es,ef){"use strict";var eu=Object.keys||function(ei){var es=[];for(var ef in ei)es.push(ef);return es};ei.exports=eg;var ed=ef(1709),eH=ef(7337);ef(3782)(eg,ed);for(var ez=eu(eH.prototype),eV=0;eV0){if("string"==typeof es||ez.objectMode||Object.getPrototypeOf(es)===eb.prototype||(es=eC(es)),eu)ez.endEmitted?eI(ei,new eT):eU(ei,ez,es,!0);else if(ez.ended)eI(ei,new eP);else{if(ez.destroyed)return!1;ez.reading=!1,ez.decoder&&!ef?(es=ez.decoder.write(es),ez.objectMode||0!==es.length?eU(ei,ez,es,!1):eY(ei,ez)):eU(ei,ez,es,!1)}}else eu||(ez.reading=!1,eY(ei,ez));return!ez.ended&&(ez.length=eZ?ei=eZ:(ei--,ei|=ei>>>1,ei|=ei>>>2,ei|=ei>>>4,ei|=ei>>>8,ei|=ei>>>16,ei++),ei}function eW(ei,es){return ei<=0||0===es.length&&es.ended?0:es.objectMode?1:ei!=ei?es.flowing&&es.length?es.buffer.head.data.length:es.length:(ei>es.highWaterMark&&(es.highWaterMark=eG(ei)),ei<=es.length)?ei:es.ended?es.length:(es.needReadable=!0,0)}function eK(ei,es){if(eH("onEofChunk"),!es.ended){if(es.decoder){var ef=es.decoder.end();ef&&ef.length&&(es.buffer.push(ef),es.length+=es.objectMode?1:ef.length)}es.ended=!0,es.sync?e$(ei):(es.needReadable=!1,es.emittedReadable||(es.emittedReadable=!0,eJ(ei)))}}function e$(ei){var es=ei._readableState;eH("emitReadable",es.needReadable,es.emittedReadable),es.needReadable=!1,es.emittedReadable||(eH("emitReadable",es.flowing),es.emittedReadable=!0,em.nextTick(eJ,ei))}function eJ(ei){var es=ei._readableState;eH("emitReadable_",es.destroyed,es.length,es.ended),!es.destroyed&&(es.length||es.ended)&&(ei.emit("readable"),es.emittedReadable=!1),es.needReadable=!es.flowing&&!es.ended&&es.length<=es.highWaterMark,e6(ei)}function eY(ei,es){es.readingMore||(es.readingMore=!0,em.nextTick(eX,ei,es))}function eX(ei,es){for(;!es.reading&&!es.ended&&(es.length0,es.resumeScheduled&&!es.paused?es.flowing=!0:ei.listenerCount("data")>0&&ei.resume()}function e2(ei){eH("readable nexttick read 0"),ei.read(0)}function e4(ei,es){es.resumeScheduled||(es.resumeScheduled=!0,em.nextTick(e3,ei,es))}function e3(ei,es){eH("resume",es.reading),es.reading||ei.read(0),es.resumeScheduled=!1,ei.emit("resume"),e6(ei),es.flowing&&!es.reading&&ei.read(0)}function e6(ei){var es=ei._readableState;for(eH("flow",es.flowing);es.flowing&&null!==ei.read(););}function e0(ei,es){var ef;return 0===es.length?null:(es.objectMode?ef=es.buffer.shift():!ei||ei>=es.length?(ef=es.decoder?es.buffer.join(""):1===es.buffer.length?es.buffer.first():es.buffer.concat(es.length),es.buffer.clear()):ef=es.buffer.consume(ei,es.decoder),ef)}function e8(ei){var es=ei._readableState;eH("endReadable",es.endEmitted),es.endEmitted||(es.ended=!0,em.nextTick(e5,es,ei))}function e5(ei,es){if(eH("endReadableNT",ei.endEmitted,ei.length),!ei.endEmitted&&0===ei.length&&(ei.endEmitted=!0,es.readable=!1,es.emit("end"),ei.autoDestroy)){var ef=es._writableState;(!ef||ef.autoDestroy&&ef.finished)&&es.destroy()}}function e7(ei,es){for(var ef=0,eu=ei.length;ef=ef.highWaterMark:ef.length>0)||ef.ended))return eH("read: emitReadable",ef.length,ef.ended),0===ef.length&&ef.ended?e8(this):e$(this),null;if(0===(ei=eW(ei,ef))&&ef.ended)return 0===ef.length&&e8(this),null;var ed=ef.needReadable;return eH("need readable",ed),(0===ef.length||ef.length-ei0?e0(ei,ef):null)?(ef.needReadable=ef.length<=ef.highWaterMark,ei=0):(ef.length-=ei,ef.awaitDrain=0),0===ef.length&&(ef.ended||(ef.needReadable=!0),eu!==ei&&ef.ended&&e8(this)),null!==es&&this.emit("data",es),es},eD.prototype._read=function(ei){eI(this,new eB("_read()"))},eD.prototype.pipe=function(ei,es){var ef=this,eu=this._readableState;switch(eu.pipesCount){case 0:eu.pipes=ei;break;case 1:eu.pipes=[eu.pipes,ei];break;default:eu.pipes.push(ei)}eu.pipesCount+=1,eH("pipe count=%d opts=%j",eu.pipesCount,es);var ed=es&&!1===es.end||ei===em.stdout||ei===em.stderr?eN:eV;function ez(ei,es){eH("onunpipe"),ei===ef&&es&&!1===es.hasUnpiped&&(es.hasUnpiped=!0,eb())}function eV(){eH("onend"),ei.end()}eu.endEmitted?em.nextTick(ed):ef.once("end",ed),ei.on("unpipe",ez);var eM=eQ(ef);ei.on("drain",eM);var eL=!1;function eb(){eH("cleanup"),ei.removeListener("close",ex),ei.removeListener("finish",ew),ei.removeListener("drain",eM),ei.removeListener("error",eC),ei.removeListener("unpipe",ez),ef.removeListener("end",eV),ef.removeListener("end",eN),ef.removeListener("data",ey),eL=!0,eu.awaitDrain&&(!ei._writableState||ei._writableState.needDrain)&&eM()}function ey(es){eH("ondata");var ed=ei.write(es);eH("dest.write",ed),!1===ed&&((1===eu.pipesCount&&eu.pipes===ei||eu.pipesCount>1&&-1!==e7(eu.pipes,ei))&&!eL&&(eH("false write response, pause",eu.awaitDrain),eu.awaitDrain++),ef.pause())}function eC(es){eH("onerror",es),eN(),ei.removeListener("error",eC),0===eg(ei,"error")&&eI(ei,es)}function ex(){ei.removeListener("finish",ew),eN()}function ew(){eH("onfinish"),ei.removeListener("close",ex),eN()}function eN(){eH("unpipe"),ef.unpipe(ei)}return ef.on("data",ey),eO(ei,"error",eC),ei.once("close",ex),ei.once("finish",ew),ei.emit("pipe",ef),eu.flowing||(eH("pipe resume"),ef.resume()),ei},eD.prototype.unpipe=function(ei){var es=this._readableState,ef={hasUnpiped:!1};if(0===es.pipesCount)return this;if(1===es.pipesCount)return ei&&ei!==es.pipes||(ei||(ei=es.pipes),es.pipes=null,es.pipesCount=0,es.flowing=!1,ei&&ei.emit("unpipe",this,ef)),this;if(!ei){var eu=es.pipes,ed=es.pipesCount;es.pipes=null,es.pipesCount=0,es.flowing=!1;for(var em=0;em0,!1!==eu.flowing&&this.resume()):"readable"!==ei||eu.endEmitted||eu.readableListening||(eu.readableListening=eu.needReadable=!0,eu.flowing=!1,eu.emittedReadable=!1,eH("on readable",eu.length,eu.reading),eu.length?e$(this):eu.reading||em.nextTick(e2,this)),ef},eD.prototype.addListener=eD.prototype.on,eD.prototype.removeListener=function(ei,es){var ef=eL.prototype.removeListener.call(this,ei,es);return"readable"===ei&&em.nextTick(e1,this),ef},eD.prototype.removeAllListeners=function(ei){var es=eL.prototype.removeAllListeners.apply(this,arguments);return("readable"===ei||void 0===ei)&&em.nextTick(e1,this),es},eD.prototype.resume=function(){var ei=this._readableState;return ei.flowing||(eH("resume"),ei.flowing=!ei.readableListening,e4(this,ei)),ei.paused=!1,this},eD.prototype.pause=function(){return eH("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eH("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},eD.prototype.wrap=function(ei){var es=this,ef=this._readableState,eu=!1;for(var ed in ei.on("end",function(){if(eH("wrapped end"),ef.decoder&&!ef.ended){var ei=ef.decoder.end();ei&&ei.length&&es.push(ei)}es.push(null)}),ei.on("data",function(ed){eH("wrapped data"),ef.decoder&&(ed=ef.decoder.write(ed)),(!ef.objectMode||null!=ed)&&(ef.objectMode||ed&&ed.length)&&(es.push(ed)||(eu=!0,ei.pause()))}),ei)void 0===this[ed]&&"function"==typeof ei[ed]&&(this[ed]=function(es){return function(){return ei[es].apply(ei,arguments)}}(ed));for(var em=0;em-1))throw new eT(ei);return this._writableState.defaultEncoding=ei,this},Object.defineProperty(ej.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ej.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ej.prototype._write=function(ei,es,ef){ef(new eS("_write()"))},ej.prototype._writev=null,ej.prototype.end=function(ei,es,ef){var eu=this._writableState;return"function"==typeof ei?(ef=ei,ei=null,es=null):"function"==typeof es&&(ef=es,es=null),null!=ei&&this.write(ei,es),eu.corked&&(eu.corked=1,this.uncork()),eu.ending||e4(this,eu,ef),this},Object.defineProperty(ej.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ej.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ei){this._writableState&&(this._writableState.destroyed=ei)}}),ej.prototype.destroy=eC.destroy,ej.prototype._undestroy=eC.undestroy,ej.prototype._destroy=function(ei,es){es(ei)}},6871:function(ei,es,ef){"use strict";function eu(ei,es,ef){return es in ei?Object.defineProperty(ei,es,{value:ef,enumerable:!0,configurable:!0,writable:!0}):ei[es]=ef,ei}var ed,eH=ef(9698),ez=Symbol("lastResolve"),eV=Symbol("lastReject"),eM=Symbol("error"),eg=Symbol("ended"),eL=Symbol("lastPromise"),eb=Symbol("handlePromise"),ey=Symbol("stream");function eC(ei,es){return{value:ei,done:es}}function ex(ei){var es=ei[ez];if(null!==es){var ef=ei[ey].read();null!==ef&&(ei[eL]=null,ei[ez]=null,ei[eV]=null,es(eC(ef,!1)))}}function ew(ei){em.nextTick(ex,ei)}function eN(ei,es){return function(ef,eu){ei.then(function(){if(es[eg]){ef(eC(void 0,!0));return}es[eb](ef,eu)},eu)}}var eS=Object.getPrototypeOf(function(){}),eA=Object.setPrototypeOf((eu(ed={get stream(){return this[ey]},next:function(){var ei,es=this,ef=this[eM];if(null!==ef)return Promise.reject(ef);if(this[eg])return Promise.resolve(eC(void 0,!0));if(this[ey].destroyed)return new Promise(function(ei,ef){em.nextTick(function(){es[eM]?ef(es[eM]):ei(eC(void 0,!0))})});var eu=this[eL];if(eu)ei=new Promise(eN(eu,this));else{var ed=this[ey].read();if(null!==ed)return Promise.resolve(eC(ed,!1));ei=new Promise(this[eb])}return this[eL]=ei,ei}},Symbol.asyncIterator,function(){return this}),eu(ed,"return",function(){var ei=this;return new Promise(function(es,ef){ei[ey].destroy(null,function(ei){if(ei){ef(ei);return}es(eC(void 0,!0))})})}),ed),eS),e_=function(ei){var es,ef=Object.create(eA,(eu(es={},ey,{value:ei,writable:!0}),eu(es,ez,{value:null,writable:!0}),eu(es,eV,{value:null,writable:!0}),eu(es,eM,{value:null,writable:!0}),eu(es,eg,{value:ei._readableState.endEmitted,writable:!0}),eu(es,eb,{value:function(ei,es){var eu=ef[ey].read();eu?(ef[eL]=null,ef[ez]=null,ef[eV]=null,ei(eC(eu,!1))):(ef[ez]=ei,ef[eV]=es)},writable:!0}),es));return ef[eL]=null,eH(ei,function(ei){if(ei&&"ERR_STREAM_PREMATURE_CLOSE"!==ei.code){var es=ef[eV];null!==es&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,es(ei)),ef[eM]=ei;return}var eu=ef[ez];null!==eu&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,eu(eC(void 0,!0))),ef[eg]=!0}),ei.on("readable",ew.bind(null,ef)),ef};ei.exports=e_},4379:function(ei,es,ef){"use strict";function eu(ei,es){var ef=Object.keys(ei);if(Object.getOwnPropertySymbols){var eu=Object.getOwnPropertySymbols(ei);es&&(eu=eu.filter(function(es){return Object.getOwnPropertyDescriptor(ei,es).enumerable})),ef.push.apply(ef,eu)}return ef}function ed(ei){for(var es=1;es0?this.tail.next=es:this.head=es,this.tail=es,++this.length}},{key:"unshift",value:function(ei){var es={data:ei,next:this.head};0===this.length&&(this.tail=es),this.head=es,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ei=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ei}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(ei){if(0===this.length)return"";for(var es=this.head,ef=""+es.data;es=es.next;)ef+=ei+es.data;return ef}},{key:"concat",value:function(ei){if(0===this.length)return eM.alloc(0);for(var es=eM.allocUnsafe(ei>>>0),ef=this.head,eu=0;ef;)eb(ef.data,es,eu),eu+=ef.data.length,ef=ef.next;return es}},{key:"consume",value:function(ei,es){var ef;return eied.length?ed.length:ei;if(em===ed.length?eu+=ed:eu+=ed.slice(0,ei),0==(ei-=em)){em===ed.length?(++ef,es.next?this.head=es.next:this.head=this.tail=null):(this.head=es,es.data=ed.slice(em));break}++ef}return this.length-=ef,eu}},{key:"_getBuffer",value:function(ei){var es=eM.allocUnsafe(ei),ef=this.head,eu=1;for(ef.data.copy(es),ei-=ef.data.length;ef=ef.next;){var ed=ef.data,em=ei>ed.length?ed.length:ei;if(ed.copy(es,es.length-ei,0,em),0==(ei-=em)){em===ed.length?(++eu,ef.next?this.head=ef.next:this.head=this.tail=null):(this.head=ef,ef.data=ed.slice(em));break}++eu}return this.length-=eu,es}},{key:eL,value:function(ei,es){return eg(this,ed({},es,{depth:0,customInspect:!1}))}}]),ei}()},7025:function(ei){"use strict";function es(ei,es){var ed=this,ez=this._readableState&&this._readableState.destroyed,eV=this._writableState&&this._writableState.destroyed;return ez||eV?(es?es(ei):ei&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,em.nextTick(eH,this,ei)):em.nextTick(eH,this,ei)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ei||null,function(ei){!es&&ei?ed._writableState?ed._writableState.errorEmitted?em.nextTick(eu,ed):(ed._writableState.errorEmitted=!0,em.nextTick(ef,ed,ei)):em.nextTick(ef,ed,ei):es?(em.nextTick(eu,ed),es(ei)):em.nextTick(eu,ed)}),this)}function ef(ei,es){eH(ei,es),eu(ei)}function eu(ei){(!ei._writableState||ei._writableState.emitClose)&&(!ei._readableState||ei._readableState.emitClose)&&ei.emit("close")}function ed(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function eH(ei,es){ei.emit("error",es)}function ez(ei,es){var ef=ei._readableState,eu=ei._writableState;ef&&ef.autoDestroy||eu&&eu.autoDestroy?ei.destroy(es):ei.emit("error",es)}ei.exports={destroy:es,undestroy:ed,errorOrDestroy:ez}},9698:function(ei,es,ef){"use strict";var eu=ef(4646).q.ERR_STREAM_PREMATURE_CLOSE;function ed(ei){var es=!1;return function(){if(!es){es=!0;for(var ef=arguments.length,eu=Array(ef),ed=0;ed0,function(es){ei||(ei=es),es&&em.forEach(eL),eH||(em.forEach(eL),ed(ei))})});return ef.reduce(eb)}ei.exports=eC},6776:function(ei,es,ef){"use strict";var eu=ef(4646).q.ERR_INVALID_OPT_VALUE;function ed(ei,es,ef){return null!=ei.highWaterMark?ei.highWaterMark:es?ei[ef]:null}function em(ei,es,ef,em){var eH=ed(es,em,ef);if(null!=eH){if(!(isFinite(eH)&&Math.floor(eH)===eH)||eH<0){var ez=em?ef:"highWaterMark";throw new eu(ez,eH)}return Math.floor(eH)}return ei.objectMode?16:16384}ei.exports={getHighWaterMark:em}},4678:function(ei,es,ef){ei.exports=ef(2781)},3726:function(ei,es,ef){var eu=ef(2781);"disable"===em.env.READABLE_STREAM&&eu?(ei.exports=eu.Readable,Object.assign(ei.exports,eu),ei.exports.Stream=eu):((es=ei.exports=ef(1709)).Stream=eu||es,es.Readable=es,es.Writable=ef(7337),es.Duplex=ef(2403),es.Transform=ef(1170),es.PassThrough=ef(7889),es.finished=ef(9698),es.pipeline=ef(8442))},3225:function(ei,es,ef){"use strict";var eu=ef(4300).Buffer,ed=ef(3782),em=ef(9029),eH=Array(16),ez=[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],eV=[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],eM=[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],eg=[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],eL=[0,1518500249,1859775393,2400959708,2840853838],eb=[1352829926,1548603684,1836072691,2053994217,0];function ey(){em.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function eC(ei,es){return ei<>>32-es}function ex(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es^ef^eu)+em+eH|0,ez)+ed|0}function ew(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es&ef|~es&eu)+em+eH|0,ez)+ed|0}function eN(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+((es|~ef)^eu)+em+eH|0,ez)+ed|0}function eS(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es&eu|ef&~eu)+em+eH|0,ez)+ed|0}function eA(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es^(ef|~eu))+em+eH|0,ez)+ed|0}ed(ey,em),ey.prototype._update=function(){for(var ei,es,ef=eH,eu=0;eu<16;++eu)ef[eu]=this._block.readInt32LE(4*eu);for(var ed=0|this._a,em=0|this._b,ey=0|this._c,e_=0|this._d,eE=0|this._e,eP=0|this._a,eB=0|this._b,eT=0|this._c,eI=0|this._d,eR=0|this._e,eO=0;eO<80;eO+=1)eO<16?(ei=ex(ed,em,ey,e_,eE,ef[ez[eO]],eL[0],eM[eO]),es=eA(eP,eB,eT,eI,eR,ef[eV[eO]],eb[0],eg[eO])):eO<32?(ei=ew(ed,em,ey,e_,eE,ef[ez[eO]],eL[1],eM[eO]),es=eS(eP,eB,eT,eI,eR,ef[eV[eO]],eb[1],eg[eO])):eO<48?(ei=eN(ed,em,ey,e_,eE,ef[ez[eO]],eL[2],eM[eO]),es=eN(eP,eB,eT,eI,eR,ef[eV[eO]],eb[2],eg[eO])):eO<64?(ei=eS(ed,em,ey,e_,eE,ef[ez[eO]],eL[3],eM[eO]),es=ew(eP,eB,eT,eI,eR,ef[eV[eO]],eb[3],eg[eO])):(ei=eA(ed,em,ey,e_,eE,ef[ez[eO]],eL[4],eM[eO]),es=ex(eP,eB,eT,eI,eR,ef[eV[eO]],eb[4],eg[eO])),ed=eE,eE=e_,e_=eC(ey,10),ey=em,em=ei,eP=eR,eR=eI,eI=eC(eT,10),eT=eB,eB=es;var ej=this._b+ey+eI|0;this._b=this._c+e_+eR|0,this._c=this._d+eE+eP|0,this._d=this._e+ed+eB|0,this._e=this._a+em+eT|0,this._a=ej},ey.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 ei=eu.alloc?eu.alloc(20):new eu(20);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei.writeInt32LE(this._e,16),ei},ei.exports=ey},5055:function(ei,es,ef){var eu=ef(4300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},6911:function(ei,es,ef){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var eu=ef(4300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},2858:function(ei,es,ef){var eu=ef(6911).Buffer;function ed(ei,es){this._block=eu.alloc(ei),this._finalSize=es,this._blockSize=ei,this._len=0}ed.prototype.update=function(ei,es){"string"==typeof ei&&(es=es||"utf8",ei=eu.from(ei,es));for(var ef=this._block,ed=this._blockSize,em=ei.length,eH=this._len,ez=0;ez=this._finalSize&&(this._update(this._block),this._block.fill(0));var ef=8*this._len;if(ef<=4294967295)this._block.writeUInt32BE(ef,this._blockSize-4);else{var eu=(4294967295&ef)>>>0,ed=(ef-eu)/4294967296;this._block.writeUInt32BE(ed,this._blockSize-8),this._block.writeUInt32BE(eu,this._blockSize-4)}this._update(this._block);var em=this._hash();return ei?em.toString(ei):em},ed.prototype._update=function(){throw Error("_update must be implemented by subclass")},ei.exports=ed},4371:function(ei,es,ef){var eu=ei.exports=function(ei){var es=eu[ei=ei.toLowerCase()];if(!es)throw Error(ei+" is not supported (we accept pull requests)");return new es};eu.sha=ef(4018),eu.sha1=ef(4179),eu.sha224=ef(532),eu.sha256=ef(1843),eu.sha384=ef(7455),eu.sha512=ef(9934)},4018:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[1518500249,1859775393,-1894007588,-899497514],ez=Array(80);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei){return ei<<5|ei>>>27}function eg(ei){return ei<<30|ei>>>2}function eL(ei,es,ef,eu){return 0===ei?es&ef|~es&eu:2===ei?es&ef|es&eu|ef&eu:es^ef^eu}eu(eV,ed),eV.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0;eV<16;++eV)es[eV]=ei.readInt32BE(4*eV);for(;eV<80;++eV)es[eV]=es[eV-3]^es[eV-8]^es[eV-14]^es[eV-16];for(var eb=0;eb<80;++eb){var ey=~~(eb/20),eC=eM(ef)+eL(ey,eu,ed,em)+ez+es[eb]+eH[ey]|0;ez=em,em=ed,ed=eg(eu),eu=ef,ef=eC}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(20);return ei.writeInt32BE(0|this._a,0),ei.writeInt32BE(0|this._b,4),ei.writeInt32BE(0|this._c,8),ei.writeInt32BE(0|this._d,12),ei.writeInt32BE(0|this._e,16),ei},ei.exports=eV},4179:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[1518500249,1859775393,-1894007588,-899497514],ez=Array(80);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei){return ei<<1|ei>>>31}function eg(ei){return ei<<5|ei>>>27}function eL(ei){return ei<<30|ei>>>2}function eb(ei,es,ef,eu){return 0===ei?es&ef|~es&eu:2===ei?es&ef|es&eu|ef&eu:es^ef^eu}eu(eV,ed),eV.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0;eV<16;++eV)es[eV]=ei.readInt32BE(4*eV);for(;eV<80;++eV)es[eV]=eM(es[eV-3]^es[eV-8]^es[eV-14]^es[eV-16]);for(var ey=0;ey<80;++ey){var eC=~~(ey/20),ex=eg(ef)+eb(eC,eu,ed,em)+ez+es[ey]+eH[eC]|0;ez=em,em=ed,ed=eL(eu),eu=ef,ef=ex}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(20);return ei.writeInt32BE(0|this._a,0),ei.writeInt32BE(0|this._b,4),ei.writeInt32BE(0|this._c,8),ei.writeInt32BE(0|this._d,12),ei.writeInt32BE(0|this._e,16),ei},ei.exports=eV},532:function(ei,es,ef){var eu=ef(3782),ed=ef(1843),em=ef(2858),eH=ef(6911).Buffer,ez=Array(64);function eV(){this.init(),this._w=ez,em.call(this,64,56)}eu(eV,ed),eV.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},eV.prototype._hash=function(){var ei=eH.allocUnsafe(28);return ei.writeInt32BE(this._a,0),ei.writeInt32BE(this._b,4),ei.writeInt32BE(this._c,8),ei.writeInt32BE(this._d,12),ei.writeInt32BE(this._e,16),ei.writeInt32BE(this._f,20),ei.writeInt32BE(this._g,24),ei},ei.exports=eV},1843:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[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],ez=Array(64);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei,es,ef){return ef^ei&(es^ef)}function eg(ei,es,ef){return ei&es|ef&(ei|es)}function eL(ei){return(ei>>>2|ei<<30)^(ei>>>13|ei<<19)^(ei>>>22|ei<<10)}function eb(ei){return(ei>>>6|ei<<26)^(ei>>>11|ei<<21)^(ei>>>25|ei<<7)}function ey(ei){return(ei>>>7|ei<<25)^(ei>>>18|ei<<14)^ei>>>3}function eC(ei){return(ei>>>17|ei<<15)^(ei>>>19|ei<<13)^ei>>>10}eu(eV,ed),eV.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},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0|this._f,ex=0|this._g,ew=0|this._h,eN=0;eN<16;++eN)es[eN]=ei.readInt32BE(4*eN);for(;eN<64;++eN)es[eN]=eC(es[eN-2])+es[eN-7]+ey(es[eN-15])+es[eN-16]|0;for(var eS=0;eS<64;++eS){var eA=ew+eb(ez)+eM(ez,eV,ex)+eH[eS]+es[eS]|0,e_=eL(ef)+eg(ef,eu,ed)|0;ew=ex,ex=eV,eV=ez,ez=em+eA|0,em=ed,ed=eu,eu=ef,ef=eA+e_|0}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0,this._f=eV+this._f|0,this._g=ex+this._g|0,this._h=ew+this._h|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(32);return ei.writeInt32BE(this._a,0),ei.writeInt32BE(this._b,4),ei.writeInt32BE(this._c,8),ei.writeInt32BE(this._d,12),ei.writeInt32BE(this._e,16),ei.writeInt32BE(this._f,20),ei.writeInt32BE(this._g,24),ei.writeInt32BE(this._h,28),ei},ei.exports=eV},7455:function(ei,es,ef){var eu=ef(3782),ed=ef(9934),em=ef(2858),eH=ef(6911).Buffer,ez=Array(160);function eV(){this.init(),this._w=ez,em.call(this,128,112)}eu(eV,ed),eV.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},eV.prototype._hash=function(){var ei=eH.allocUnsafe(48);function es(es,ef,eu){ei.writeInt32BE(es,eu),ei.writeInt32BE(ef,eu+4)}return es(this._ah,this._al,0),es(this._bh,this._bl,8),es(this._ch,this._cl,16),es(this._dh,this._dl,24),es(this._eh,this._el,32),es(this._fh,this._fl,40),ei},ei.exports=eV},9934:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[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],ez=Array(160);function eV(){this.init(),this._w=ez,ed.call(this,128,112)}function eM(ei,es,ef){return ef^ei&(es^ef)}function eg(ei,es,ef){return ei&es|ef&(ei|es)}function eL(ei,es){return(ei>>>28|es<<4)^(es>>>2|ei<<30)^(es>>>7|ei<<25)}function eb(ei,es){return(ei>>>14|es<<18)^(ei>>>18|es<<14)^(es>>>9|ei<<23)}function ey(ei,es){return(ei>>>1|es<<31)^(ei>>>8|es<<24)^ei>>>7}function eC(ei,es){return(ei>>>1|es<<31)^(ei>>>8|es<<24)^(ei>>>7|es<<25)}function ex(ei,es){return(ei>>>19|es<<13)^(es>>>29|ei<<3)^ei>>>6}function ew(ei,es){return(ei>>>19|es<<13)^(es>>>29|ei<<3)^(ei>>>6|es<<26)}function eN(ei,es){return ei>>>0>>0?1:0}eu(eV,ed),eV.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},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._ah,eu=0|this._bh,ed=0|this._ch,em=0|this._dh,ez=0|this._eh,eV=0|this._fh,eS=0|this._gh,eA=0|this._hh,e_=0|this._al,eE=0|this._bl,eP=0|this._cl,eB=0|this._dl,eT=0|this._el,eI=0|this._fl,eR=0|this._gl,eO=0|this._hl,ej=0;ej<32;ej+=2)es[ej]=ei.readInt32BE(4*ej),es[ej+1]=ei.readInt32BE(4*ej+4);for(;ej<160;ej+=2){var eD=es[ej-30],eF=es[ej-30+1],eU=ey(eD,eF),eq=eC(eF,eD);eD=es[ej-4],eF=es[ej-4+1];var eZ=ex(eD,eF),eG=ew(eF,eD),eW=es[ej-14],eK=es[ej-14+1],e$=es[ej-32],eJ=es[ej-32+1],eY=eq+eK|0,eX=eU+eW+eN(eY,eq)|0;eX=(eX=eX+eZ+eN(eY=eY+eG|0,eG)|0)+e$+eN(eY=eY+eJ|0,eJ)|0,es[ej]=eX,es[ej+1]=eY}for(var eQ=0;eQ<160;eQ+=2){eX=es[eQ],eY=es[eQ+1];var e1=eg(ef,eu,ed),e2=eg(e_,eE,eP),e4=eL(ef,e_),e3=eL(e_,ef),e6=eb(ez,eT),e0=eb(eT,ez),e8=eH[eQ],e5=eH[eQ+1],e7=eM(ez,eV,eS),e9=eM(eT,eI,eR),cc=eO+e0|0,ci=eA+e6+eN(cc,eO)|0;ci=(ci=(ci=ci+e7+eN(cc=cc+e9|0,e9)|0)+e8+eN(cc=cc+e5|0,e5)|0)+eX+eN(cc=cc+eY|0,eY)|0;var co=e3+e2|0,cs=e4+e1+eN(co,e3)|0;eA=eS,eO=eR,eS=eV,eR=eI,eV=ez,eI=eT,ez=em+ci+eN(eT=eB+cc|0,eB)|0,em=ed,eB=eP,ed=eu,eP=eE,eu=ef,eE=e_,ef=ci+cs+eN(e_=cc+co|0,cc)|0}this._al=this._al+e_|0,this._bl=this._bl+eE|0,this._cl=this._cl+eP|0,this._dl=this._dl+eB|0,this._el=this._el+eT|0,this._fl=this._fl+eI|0,this._gl=this._gl+eR|0,this._hl=this._hl+eO|0,this._ah=this._ah+ef+eN(this._al,e_)|0,this._bh=this._bh+eu+eN(this._bl,eE)|0,this._ch=this._ch+ed+eN(this._cl,eP)|0,this._dh=this._dh+em+eN(this._dl,eB)|0,this._eh=this._eh+ez+eN(this._el,eT)|0,this._fh=this._fh+eV+eN(this._fl,eI)|0,this._gh=this._gh+eS+eN(this._gl,eR)|0,this._hh=this._hh+eA+eN(this._hl,eO)|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(64);function es(es,ef,eu){ei.writeInt32BE(es,eu),ei.writeInt32BE(ef,eu+4)}return es(this._ah,this._al,0),es(this._bh,this._bl,8),es(this._ch,this._cl,16),es(this._dh,this._dl,24),es(this._eh,this._el,32),es(this._fh,this._fl,40),es(this._gh,this._gl,48),es(this._hh,this._hl,56),ei},ei.exports=eV},3704:function(ei,es,ef){"use strict";var eu=ef(5055).Buffer,ed=eu.isEncoding||function(ei){switch((ei=""+ei)&&ei.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 em(ei){var es;if(!ei)return"utf8";for(;;)switch(ei){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 ei;default:if(es)return;ei=(""+ei).toLowerCase(),es=!0}}function eH(ei){var es=em(ei);if("string"!=typeof es&&(eu.isEncoding===ed||!ed(ei)))throw Error("Unknown encoding: "+ei);return es||ei}function ez(ei){var es;switch(this.encoding=eH(ei),this.encoding){case"utf16le":this.text=eC,this.end=ex,es=4;break;case"utf8":this.fillLast=eL,es=4;break;case"base64":this.text=ew,this.end=eN,es=3;break;default:this.write=eS,this.end=eA;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=eu.allocUnsafe(es)}function eV(ei){return ei<=127?0:ei>>5==6?2:ei>>4==14?3:ei>>3==30?4:ei>>6==2?-1:-2}function eM(ei,es,ef){var eu=es.length-1;if(eu=0?(ed>0&&(ei.lastNeed=ed-1),ed):--eu=0?(ed>0&&(ei.lastNeed=ed-2),ed):--eu=0?(ed>0&&(2===ed?ed=0:ei.lastNeed=ed-3),ed):0}function eg(ei,es,ef){if((192&es[0])!=128)return ei.lastNeed=0,"�";if(ei.lastNeed>1&&es.length>1){if((192&es[1])!=128)return ei.lastNeed=1,"�";if(ei.lastNeed>2&&es.length>2&&(192&es[2])!=128)return ei.lastNeed=2,"�"}}function eL(ei){var es=this.lastTotal-this.lastNeed,ef=eg(this,ei,es);return void 0!==ef?ef:this.lastNeed<=ei.length?(ei.copy(this.lastChar,es,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(ei.copy(this.lastChar,es,0,ei.length),this.lastNeed-=ei.length)}function eb(ei,es){var ef=eM(this,ei,es);if(!this.lastNeed)return ei.toString("utf8",es);this.lastTotal=ef;var eu=ei.length-(ef-this.lastNeed);return ei.copy(this.lastChar,0,eu),ei.toString("utf8",es,eu)}function ey(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+"�":es}function eC(ei,es){if((ei.length-es)%2==0){var ef=ei.toString("utf16le",es);if(ef){var eu=ef.charCodeAt(ef.length-1);if(eu>=55296&&eu<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1],ef.slice(0,-1)}return ef}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ei[ei.length-1],ei.toString("utf16le",es,ei.length-1)}function ex(ei){var es=ei&&ei.length?this.write(ei):"";if(this.lastNeed){var ef=this.lastTotal-this.lastNeed;return es+this.lastChar.toString("utf16le",0,ef)}return es}function ew(ei,es){var ef=(ei.length-es)%3;return 0===ef?ei.toString("base64",es):(this.lastNeed=3-ef,this.lastTotal=3,1===ef?this.lastChar[0]=ei[ei.length-1]:(this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1]),ei.toString("base64",es,ei.length-ef))}function eN(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+this.lastChar.toString("base64",0,3-this.lastNeed):es}function eS(ei){return ei.toString(this.encoding)}function eA(ei){return ei&&ei.length?this.write(ei):""}es.s=ez,ez.prototype.write=function(ei){var es,ef;if(0===ei.length)return"";if(this.lastNeed){if(void 0===(es=this.fillLast(ei)))return"";ef=this.lastNeed,this.lastNeed=0}else ef=0;return ef1)for(var ef=1;efString(ei)),ef>2)?`one of ${es} ${ei.slice(0,ef-1).join(", ")}, or `+ei[ef-1]:2===ef?`one of ${es} ${ei[0]} or ${ei[1]}`:`of ${es} ${ei[0]}`}}function ed(ei,es,ef){return ei.substr(!ef||ef<0?0:+ef,es.length)===es}function em(ei,es,ef){return(void 0===ef||ef>ei.length)&&(ef=ei.length),ei.substring(ef-es.length,ef)===es}function eH(ei,es,ef){return"number"!=typeof ef&&(ef=0),!(ef+es.length>ei.length)&&-1!==ei.indexOf(es,ef)}ef("ERR_INVALID_OPT_VALUE",function(ei,es){return'The value "'+es+'" is invalid for option "'+ei+'"'},TypeError),ef("ERR_INVALID_ARG_TYPE",function(ei,es,ef){let ez,eV;if("string"==typeof es&&ed(es,"not ")?(ez="must not be",es=es.replace(/^not /,"")):ez="must be",em(ei," argument"))eV=`The ${ei} ${ez} ${eu(es,"type")}`;else{let ef=eH(ei,".")?"property":"argument";eV=`The "${ei}" ${ef} ${ez} ${eu(es,"type")}`}return eV+`. Received type ${typeof ef}`},TypeError),ef("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ef("ERR_METHOD_NOT_IMPLEMENTED",function(ei){return"The "+ei+" method is not implemented"}),ef("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ef("ERR_STREAM_DESTROYED",function(ei){return"Cannot call "+ei+" after a stream was destroyed"}),ef("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ef("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ef("ERR_STREAM_WRITE_AFTER_END","write after end"),ef("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ef("ERR_UNKNOWN_ENCODING",function(ei){return"Unknown encoding: "+ei},TypeError),ef("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ei.exports.q=es},403:function(ei,es,ef){"use strict";var eu=Object.keys||function(ei){var es=[];for(var ef in ei)es.push(ef);return es};ei.exports=eg;var em=ef(709),eH=ef(337);ef(782)(eg,em);for(var ez=eu(eH.prototype),eV=0;eV0){if("string"==typeof es||ez.objectMode||Object.getPrototypeOf(es)===eb.prototype||(es=eC(es)),eu)ez.endEmitted?eI(ei,new eT):eU(ei,ez,es,!0);else if(ez.ended)eI(ei,new eP);else{if(ez.destroyed)return!1;ez.reading=!1,ez.decoder&&!ef?(es=ez.decoder.write(es),ez.objectMode||0!==es.length?eU(ei,ez,es,!1):eY(ei,ez)):eU(ei,ez,es,!1)}}else eu||(ez.reading=!1,eY(ei,ez));return!ez.ended&&(ez.length=eZ?ei=eZ:(ei--,ei|=ei>>>1,ei|=ei>>>2,ei|=ei>>>4,ei|=ei>>>8,ei|=ei>>>16,ei++),ei}function eW(ei,es){return ei<=0||0===es.length&&es.ended?0:es.objectMode?1:ei!=ei?es.flowing&&es.length?es.buffer.head.data.length:es.length:(ei>es.highWaterMark&&(es.highWaterMark=eG(ei)),ei<=es.length)?ei:es.ended?es.length:(es.needReadable=!0,0)}function eK(ei,es){if(eH("onEofChunk"),!es.ended){if(es.decoder){var ef=es.decoder.end();ef&&ef.length&&(es.buffer.push(ef),es.length+=es.objectMode?1:ef.length)}es.ended=!0,es.sync?e$(ei):(es.needReadable=!1,es.emittedReadable||(es.emittedReadable=!0,eJ(ei)))}}function e$(ei){var es=ei._readableState;eH("emitReadable",es.needReadable,es.emittedReadable),es.needReadable=!1,es.emittedReadable||(eH("emitReadable",es.flowing),es.emittedReadable=!0,ed.nextTick(eJ,ei))}function eJ(ei){var es=ei._readableState;eH("emitReadable_",es.destroyed,es.length,es.ended),!es.destroyed&&(es.length||es.ended)&&(ei.emit("readable"),es.emittedReadable=!1),es.needReadable=!es.flowing&&!es.ended&&es.length<=es.highWaterMark,e6(ei)}function eY(ei,es){es.readingMore||(es.readingMore=!0,ed.nextTick(eX,ei,es))}function eX(ei,es){for(;!es.reading&&!es.ended&&(es.length0,es.resumeScheduled&&!es.paused?es.flowing=!0:ei.listenerCount("data")>0&&ei.resume()}function e2(ei){eH("readable nexttick read 0"),ei.read(0)}function e4(ei,es){es.resumeScheduled||(es.resumeScheduled=!0,ed.nextTick(e3,ei,es))}function e3(ei,es){eH("resume",es.reading),es.reading||ei.read(0),es.resumeScheduled=!1,ei.emit("resume"),e6(ei),es.flowing&&!es.reading&&ei.read(0)}function e6(ei){var es=ei._readableState;for(eH("flow",es.flowing);es.flowing&&null!==ei.read(););}function e0(ei,es){var ef;return 0===es.length?null:(es.objectMode?ef=es.buffer.shift():!ei||ei>=es.length?(ef=es.decoder?es.buffer.join(""):1===es.buffer.length?es.buffer.first():es.buffer.concat(es.length),es.buffer.clear()):ef=es.buffer.consume(ei,es.decoder),ef)}function e8(ei){var es=ei._readableState;eH("endReadable",es.endEmitted),es.endEmitted||(es.ended=!0,ed.nextTick(e5,es,ei))}function e5(ei,es){if(eH("endReadableNT",ei.endEmitted,ei.length),!ei.endEmitted&&0===ei.length&&(ei.endEmitted=!0,es.readable=!1,es.emit("end"),ei.autoDestroy)){var ef=es._writableState;(!ef||ef.autoDestroy&&ef.finished)&&es.destroy()}}function e7(ei,es){for(var ef=0,eu=ei.length;ef=ef.highWaterMark:ef.length>0)||ef.ended))return eH("read: emitReadable",ef.length,ef.ended),0===ef.length&&ef.ended?e8(this):e$(this),null;if(0===(ei=eW(ei,ef))&&ef.ended)return 0===ef.length&&e8(this),null;var ed=ef.needReadable;return eH("need readable",ed),(0===ef.length||ef.length-ei0?e0(ei,ef):null)?(ef.needReadable=ef.length<=ef.highWaterMark,ei=0):(ef.length-=ei,ef.awaitDrain=0),0===ef.length&&(ef.ended||(ef.needReadable=!0),eu!==ei&&ef.ended&&e8(this)),null!==es&&this.emit("data",es),es},eD.prototype._read=function(ei){eI(this,new eB("_read()"))},eD.prototype.pipe=function(ei,es){var ef=this,eu=this._readableState;switch(eu.pipesCount){case 0:eu.pipes=ei;break;case 1:eu.pipes=[eu.pipes,ei];break;default:eu.pipes.push(ei)}eu.pipesCount+=1,eH("pipe count=%d opts=%j",eu.pipesCount,es);var em=es&&!1===es.end||ei===ed.stdout||ei===ed.stderr?eN:eV;function ez(ei,es){eH("onunpipe"),ei===ef&&es&&!1===es.hasUnpiped&&(es.hasUnpiped=!0,eb())}function eV(){eH("onend"),ei.end()}eu.endEmitted?ed.nextTick(em):ef.once("end",em),ei.on("unpipe",ez);var eM=eQ(ef);ei.on("drain",eM);var eL=!1;function eb(){eH("cleanup"),ei.removeListener("close",ex),ei.removeListener("finish",ew),ei.removeListener("drain",eM),ei.removeListener("error",eC),ei.removeListener("unpipe",ez),ef.removeListener("end",eV),ef.removeListener("end",eN),ef.removeListener("data",ey),eL=!0,eu.awaitDrain&&(!ei._writableState||ei._writableState.needDrain)&&eM()}function ey(es){eH("ondata");var ed=ei.write(es);eH("dest.write",ed),!1===ed&&((1===eu.pipesCount&&eu.pipes===ei||eu.pipesCount>1&&-1!==e7(eu.pipes,ei))&&!eL&&(eH("false write response, pause",eu.awaitDrain),eu.awaitDrain++),ef.pause())}function eC(es){eH("onerror",es),eN(),ei.removeListener("error",eC),0===eg(ei,"error")&&eI(ei,es)}function ex(){ei.removeListener("finish",ew),eN()}function ew(){eH("onfinish"),ei.removeListener("close",ex),eN()}function eN(){eH("unpipe"),ef.unpipe(ei)}return ef.on("data",ey),eO(ei,"error",eC),ei.once("close",ex),ei.once("finish",ew),ei.emit("pipe",ef),eu.flowing||(eH("pipe resume"),ef.resume()),ei},eD.prototype.unpipe=function(ei){var es=this._readableState,ef={hasUnpiped:!1};if(0===es.pipesCount)return this;if(1===es.pipesCount)return ei&&ei!==es.pipes||(ei||(ei=es.pipes),es.pipes=null,es.pipesCount=0,es.flowing=!1,ei&&ei.emit("unpipe",this,ef)),this;if(!ei){var eu=es.pipes,ed=es.pipesCount;es.pipes=null,es.pipesCount=0,es.flowing=!1;for(var em=0;em0,!1!==eu.flowing&&this.resume()):"readable"!==ei||eu.endEmitted||eu.readableListening||(eu.readableListening=eu.needReadable=!0,eu.flowing=!1,eu.emittedReadable=!1,eH("on readable",eu.length,eu.reading),eu.length?e$(this):eu.reading||ed.nextTick(e2,this)),ef},eD.prototype.addListener=eD.prototype.on,eD.prototype.removeListener=function(ei,es){var ef=eL.prototype.removeListener.call(this,ei,es);return"readable"===ei&&ed.nextTick(e1,this),ef},eD.prototype.removeAllListeners=function(ei){var es=eL.prototype.removeAllListeners.apply(this,arguments);return("readable"===ei||void 0===ei)&&ed.nextTick(e1,this),es},eD.prototype.resume=function(){var ei=this._readableState;return ei.flowing||(eH("resume"),ei.flowing=!ei.readableListening,e4(this,ei)),ei.paused=!1,this},eD.prototype.pause=function(){return eH("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eH("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},eD.prototype.wrap=function(ei){var es=this,ef=this._readableState,eu=!1;for(var ed in ei.on("end",function(){if(eH("wrapped end"),ef.decoder&&!ef.ended){var ei=ef.decoder.end();ei&&ei.length&&es.push(ei)}es.push(null)}),ei.on("data",function(ed){eH("wrapped data"),ef.decoder&&(ed=ef.decoder.write(ed)),(!ef.objectMode||null!=ed)&&(ef.objectMode||ed&&ed.length)&&(es.push(ed)||(eu=!0,ei.pause()))}),ei)void 0===this[ed]&&"function"==typeof ei[ed]&&(this[ed]=function(es){return function(){return ei[es].apply(ei,arguments)}}(ed));for(var em=0;em-1))throw new eT(ei);return this._writableState.defaultEncoding=ei,this},Object.defineProperty(ej.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ej.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ej.prototype._write=function(ei,es,ef){ef(new eS("_write()"))},ej.prototype._writev=null,ej.prototype.end=function(ei,es,ef){var eu=this._writableState;return"function"==typeof ei?(ef=ei,ei=null,es=null):"function"==typeof es&&(ef=es,es=null),null!=ei&&this.write(ei,es),eu.corked&&(eu.corked=1,this.uncork()),eu.ending||e4(this,eu,ef),this},Object.defineProperty(ej.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ej.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ei){this._writableState&&(this._writableState.destroyed=ei)}}),ej.prototype.destroy=eC.destroy,ej.prototype._undestroy=eC.undestroy,ej.prototype._destroy=function(ei,es){es(ei)}},871:function(ei,es,ef){"use strict";function eu(ei,es,ef){return es in ei?Object.defineProperty(ei,es,{value:ef,enumerable:!0,configurable:!0,writable:!0}):ei[es]=ef,ei}var em,eH=ef(698),ez=Symbol("lastResolve"),eV=Symbol("lastReject"),eM=Symbol("error"),eg=Symbol("ended"),eL=Symbol("lastPromise"),eb=Symbol("handlePromise"),ey=Symbol("stream");function eC(ei,es){return{value:ei,done:es}}function ex(ei){var es=ei[ez];if(null!==es){var ef=ei[ey].read();null!==ef&&(ei[eL]=null,ei[ez]=null,ei[eV]=null,es(eC(ef,!1)))}}function ew(ei){ed.nextTick(ex,ei)}function eN(ei,es){return function(ef,eu){ei.then(function(){if(es[eg]){ef(eC(void 0,!0));return}es[eb](ef,eu)},eu)}}var eS=Object.getPrototypeOf(function(){}),eA=Object.setPrototypeOf((eu(em={get stream(){return this[ey]},next:function(){var ei,es=this,ef=this[eM];if(null!==ef)return Promise.reject(ef);if(this[eg])return Promise.resolve(eC(void 0,!0));if(this[ey].destroyed)return new Promise(function(ei,ef){ed.nextTick(function(){es[eM]?ef(es[eM]):ei(eC(void 0,!0))})});var eu=this[eL];if(eu)ei=new Promise(eN(eu,this));else{var em=this[ey].read();if(null!==em)return Promise.resolve(eC(em,!1));ei=new Promise(this[eb])}return this[eL]=ei,ei}},Symbol.asyncIterator,function(){return this}),eu(em,"return",function(){var ei=this;return new Promise(function(es,ef){ei[ey].destroy(null,function(ei){if(ei){ef(ei);return}es(eC(void 0,!0))})})}),em),eS),e_=function(ei){var es,ef=Object.create(eA,(eu(es={},ey,{value:ei,writable:!0}),eu(es,ez,{value:null,writable:!0}),eu(es,eV,{value:null,writable:!0}),eu(es,eM,{value:null,writable:!0}),eu(es,eg,{value:ei._readableState.endEmitted,writable:!0}),eu(es,eb,{value:function(ei,es){var eu=ef[ey].read();eu?(ef[eL]=null,ef[ez]=null,ef[eV]=null,ei(eC(eu,!1))):(ef[ez]=ei,ef[eV]=es)},writable:!0}),es));return ef[eL]=null,eH(ei,function(ei){if(ei&&"ERR_STREAM_PREMATURE_CLOSE"!==ei.code){var es=ef[eV];null!==es&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,es(ei)),ef[eM]=ei;return}var eu=ef[ez];null!==eu&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,eu(eC(void 0,!0))),ef[eg]=!0}),ei.on("readable",ew.bind(null,ef)),ef};ei.exports=e_},379:function(ei,es,ef){"use strict";function eu(ei,es){var ef=Object.keys(ei);if(Object.getOwnPropertySymbols){var eu=Object.getOwnPropertySymbols(ei);es&&(eu=eu.filter(function(es){return Object.getOwnPropertyDescriptor(ei,es).enumerable})),ef.push.apply(ef,eu)}return ef}function ed(ei){for(var es=1;es0?this.tail.next=es:this.head=es,this.tail=es,++this.length}},{key:"unshift",value:function(ei){var es={data:ei,next:this.head};0===this.length&&(this.tail=es),this.head=es,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ei=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ei}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(ei){if(0===this.length)return"";for(var es=this.head,ef=""+es.data;es=es.next;)ef+=ei+es.data;return ef}},{key:"concat",value:function(ei){if(0===this.length)return eM.alloc(0);for(var es=eM.allocUnsafe(ei>>>0),ef=this.head,eu=0;ef;)eb(ef.data,es,eu),eu+=ef.data.length,ef=ef.next;return es}},{key:"consume",value:function(ei,es){var ef;return eied.length?ed.length:ei;if(em===ed.length?eu+=ed:eu+=ed.slice(0,ei),0==(ei-=em)){em===ed.length?(++ef,es.next?this.head=es.next:this.head=this.tail=null):(this.head=es,es.data=ed.slice(em));break}++ef}return this.length-=ef,eu}},{key:"_getBuffer",value:function(ei){var es=eM.allocUnsafe(ei),ef=this.head,eu=1;for(ef.data.copy(es),ei-=ef.data.length;ef=ef.next;){var ed=ef.data,em=ei>ed.length?ed.length:ei;if(ed.copy(es,es.length-ei,0,em),0==(ei-=em)){em===ed.length?(++eu,ef.next?this.head=ef.next:this.head=this.tail=null):(this.head=ef,ef.data=ed.slice(em));break}++eu}return this.length-=eu,es}},{key:eL,value:function(ei,es){return eg(this,ed({},es,{depth:0,customInspect:!1}))}}]),ei}()},25:function(ei){"use strict";function es(ei,es){var em=this,ez=this._readableState&&this._readableState.destroyed,eV=this._writableState&&this._writableState.destroyed;return ez||eV?(es?es(ei):ei&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ed.nextTick(eH,this,ei)):ed.nextTick(eH,this,ei)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ei||null,function(ei){!es&&ei?em._writableState?em._writableState.errorEmitted?ed.nextTick(eu,em):(em._writableState.errorEmitted=!0,ed.nextTick(ef,em,ei)):ed.nextTick(ef,em,ei):es?(ed.nextTick(eu,em),es(ei)):ed.nextTick(eu,em)}),this)}function ef(ei,es){eH(ei,es),eu(ei)}function eu(ei){(!ei._writableState||ei._writableState.emitClose)&&(!ei._readableState||ei._readableState.emitClose)&&ei.emit("close")}function em(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function eH(ei,es){ei.emit("error",es)}function ez(ei,es){var ef=ei._readableState,eu=ei._writableState;ef&&ef.autoDestroy||eu&&eu.autoDestroy?ei.destroy(es):ei.emit("error",es)}ei.exports={destroy:es,undestroy:em,errorOrDestroy:ez}},698:function(ei,es,ef){"use strict";var eu=ef(646).q.ERR_STREAM_PREMATURE_CLOSE;function ed(ei){var es=!1;return function(){if(!es){es=!0;for(var ef=arguments.length,eu=Array(ef),ed=0;ed0,function(es){ei||(ei=es),es&&em.forEach(eL),eH||(em.forEach(eL),ed(ei))})});return ef.reduce(eb)}ei.exports=eC},776:function(ei,es,ef){"use strict";var eu=ef(646).q.ERR_INVALID_OPT_VALUE;function ed(ei,es,ef){return null!=ei.highWaterMark?ei.highWaterMark:es?ei[ef]:null}function em(ei,es,ef,em){var eH=ed(es,em,ef);if(null!=eH){if(!(isFinite(eH)&&Math.floor(eH)===eH)||eH<0){var ez=em?ef:"highWaterMark";throw new eu(ez,eH)}return Math.floor(eH)}return ei.objectMode?16:16384}ei.exports={getHighWaterMark:em}},678:function(ei,es,ef){ei.exports=ef(781)},55:function(ei,es,ef){var eu=ef(300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},173:function(ei,es,ef){ei.exports=ed;var eu=ef(361).EventEmitter;function ed(){eu.call(this)}ef(782)(ed,eu),ed.Readable=ef(709),ed.Writable=ef(337),ed.Duplex=ef(403),ed.Transform=ef(170),ed.PassThrough=ef(889),ed.finished=ef(698),ed.pipeline=ef(442),ed.Stream=ed,ed.prototype.pipe=function(ei,es){var ef=this;function ed(es){ei.writable&&!1===ei.write(es)&&ef.pause&&ef.pause()}function em(){ef.readable&&ef.resume&&ef.resume()}ef.on("data",ed),ei.on("drain",em),ei._isStdio||es&&!1===es.end||(ef.on("end",ez),ef.on("close",eV));var eH=!1;function ez(){eH||(eH=!0,ei.end())}function eV(){eH||(eH=!0,"function"==typeof ei.destroy&&ei.destroy())}function eM(ei){if(eg(),0===eu.listenerCount(this,"error"))throw ei}function eg(){ef.removeListener("data",ed),ei.removeListener("drain",em),ef.removeListener("end",ez),ef.removeListener("close",eV),ef.removeListener("error",eM),ei.removeListener("error",eM),ef.removeListener("end",eg),ef.removeListener("close",eg),ei.removeListener("close",eg)}return ef.on("error",eM),ei.on("error",eM),ef.on("end",eg),ef.on("close",eg),ei.on("close",eg),ei.emit("pipe",ef),ei}},704:function(ei,es,ef){"use strict";var eu=ef(55).Buffer,ed=eu.isEncoding||function(ei){switch((ei=""+ei)&&ei.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 em(ei){var es;if(!ei)return"utf8";for(;;)switch(ei){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 ei;default:if(es)return;ei=(""+ei).toLowerCase(),es=!0}}function eH(ei){var es=em(ei);if("string"!=typeof es&&(eu.isEncoding===ed||!ed(ei)))throw Error("Unknown encoding: "+ei);return es||ei}function ez(ei){var es;switch(this.encoding=eH(ei),this.encoding){case"utf16le":this.text=eC,this.end=ex,es=4;break;case"utf8":this.fillLast=eL,es=4;break;case"base64":this.text=ew,this.end=eN,es=3;break;default:this.write=eS,this.end=eA;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=eu.allocUnsafe(es)}function eV(ei){return ei<=127?0:ei>>5==6?2:ei>>4==14?3:ei>>3==30?4:ei>>6==2?-1:-2}function eM(ei,es,ef){var eu=es.length-1;if(eu=0?(ed>0&&(ei.lastNeed=ed-1),ed):--eu=0?(ed>0&&(ei.lastNeed=ed-2),ed):--eu=0?(ed>0&&(2===ed?ed=0:ei.lastNeed=ed-3),ed):0}function eg(ei,es,ef){if((192&es[0])!=128)return ei.lastNeed=0,"�";if(ei.lastNeed>1&&es.length>1){if((192&es[1])!=128)return ei.lastNeed=1,"�";if(ei.lastNeed>2&&es.length>2&&(192&es[2])!=128)return ei.lastNeed=2,"�"}}function eL(ei){var es=this.lastTotal-this.lastNeed,ef=eg(this,ei,es);return void 0!==ef?ef:this.lastNeed<=ei.length?(ei.copy(this.lastChar,es,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(ei.copy(this.lastChar,es,0,ei.length),this.lastNeed-=ei.length)}function eb(ei,es){var ef=eM(this,ei,es);if(!this.lastNeed)return ei.toString("utf8",es);this.lastTotal=ef;var eu=ei.length-(ef-this.lastNeed);return ei.copy(this.lastChar,0,eu),ei.toString("utf8",es,eu)}function ey(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+"�":es}function eC(ei,es){if((ei.length-es)%2==0){var ef=ei.toString("utf16le",es);if(ef){var eu=ef.charCodeAt(ef.length-1);if(eu>=55296&&eu<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1],ef.slice(0,-1)}return ef}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ei[ei.length-1],ei.toString("utf16le",es,ei.length-1)}function ex(ei){var es=ei&&ei.length?this.write(ei):"";if(this.lastNeed){var ef=this.lastTotal-this.lastNeed;return es+this.lastChar.toString("utf16le",0,ef)}return es}function ew(ei,es){var ef=(ei.length-es)%3;return 0===ef?ei.toString("base64",es):(this.lastNeed=3-ef,this.lastTotal=3,1===ef?this.lastChar[0]=ei[ei.length-1]:(this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1]),ei.toString("base64",es,ei.length-ef))}function eN(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+this.lastChar.toString("base64",0,3-this.lastNeed):es}function eS(ei){return ei.toString(this.encoding)}function eA(ei){return ei&&ei.length?this.write(ei):""}es.s=ez,ez.prototype.write=function(ei){var es,ef;if(0===ei.length)return"";if(this.lastNeed){if(void 0===(es=this.fillLast(ei)))return"";ef=this.lastNeed,this.lastNeed=0}else ef=0;return ef0&&!ed.call(ei,0))for(var ey=0;ey0)for(var ex=0;ex=0&&"[object Function]"===es.call(ei.callee)),eu}},92703:function(ei,es,ef){"use strict";var eu=ef(50414);function ed(){}function em(){}em.resetWarningCache=ed,ei.exports=function(){function ei(ei,es,ef,ed,em,eH){if(eH!==eu){var ez=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ez.name="Invariant Violation",ez}}function es(){return ei}ei.isRequired=ei;var ef={array:ei,bigint:ei,bool:ei,func:ei,number:ei,object:ei,string:ei,symbol:ei,any:ei,arrayOf:es,element:ei,elementType:ei,instanceOf:es,node:ei,objectOf:es,oneOf:es,oneOfType:es,shape:es,exact:es,checkPropTypes:em,resetWarningCache:ed};return ef.PropTypes=ef,ef}},45697:function(ei,es,ef){ei.exports=ef(92703)()},50414:function(ei){"use strict";var es="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ei.exports=es},61798:function(ei,es,ef){"use strict";var eu=ef(83454),ed=65536,em=4294967295;function eH(){throw Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var ez=ef(89509).Buffer,eV=ef.g.crypto||ef.g.msCrypto;function eM(ei,es){if(ei>em)throw RangeError("requested too many random bytes");var ef=ez.allocUnsafe(ei);if(ei>0){if(ei>ed)for(var eH=0;eH */es.read=function(ei,es,ef,eu,ed){var em,eH,ez=8*ed-eu-1,eV=(1<>1,eg=-7,eL=ef?ed-1:0,eb=ef?-1:1,ey=ei[es+eL];for(eL+=eb,em=ey&(1<<-eg)-1,ey>>=-eg,eg+=ez;eg>0;em=256*em+ei[es+eL],eL+=eb,eg-=8);for(eH=em&(1<<-eg)-1,em>>=-eg,eg+=eu;eg>0;eH=256*eH+ei[es+eL],eL+=eb,eg-=8);if(0===em)em=1-eM;else{if(em===eV)return eH?NaN:(ey?-1:1)*(1/0);eH+=Math.pow(2,eu),em-=eM}return(ey?-1:1)*eH*Math.pow(2,em-eu)},es.write=function(ei,es,ef,eu,ed,em){var eH,ez,eV,eM=8*em-ed-1,eg=(1<>1,eb=23===ed?5960464477539062e-23:0,ey=eu?0:em-1,eC=eu?1:-1,ex=es<0||0===es&&1/es<0?1:0;for(isNaN(es=Math.abs(es))||es===1/0?(ez=isNaN(es)?1:0,eH=eg):(eH=Math.floor(Math.log(es)/Math.LN2),es*(eV=Math.pow(2,-eH))<1&&(eH--,eV*=2),eH+eL>=1?es+=eb/eV:es+=eb*Math.pow(2,1-eL),es*eV>=2&&(eH++,eV/=2),eH+eL>=eg?(ez=0,eH=eg):eH+eL>=1?(ez=(es*eV-1)*Math.pow(2,ed),eH+=eL):(ez=es*Math.pow(2,eL-1)*Math.pow(2,ed),eH=0));ed>=8;ei[ef+ey]=255&ez,ey+=eC,ez/=256,ed-=8);for(eH=eH<0;ei[ef+ey]=255&eH,ey+=eC,eH/=256,eM-=8);ei[ef+ey-eC]|=128*ex}},35717:function(ei){"function"==typeof Object.create?ei.exports=function(ei,es){es&&(ei.super_=es,ei.prototype=Object.create(es.prototype,{constructor:{value:ei,enumerable:!1,writable:!0,configurable:!0}}))}:ei.exports=function(ei,es){if(es){ei.super_=es;var ef=function(){};ef.prototype=es.prototype,ei.prototype=new ef,ei.prototype.constructor=ei}}},82584:function(ei,es,ef){"use strict";var eu=ef(96410)(),ed=ef(21924)("Object.prototype.toString"),em=function(ei){return(!eu||!ei||"object"!=typeof ei||!(Symbol.toStringTag in ei))&&"[object Arguments]"===ed(ei)},eH=function(ei){return!!em(ei)||null!==ei&&"object"==typeof ei&&"number"==typeof ei.length&&ei.length>=0&&"[object Array]"!==ed(ei)&&"[object Function]"===ed(ei.callee)},ez=function(){return em(arguments)}();em.isLegacyArguments=eH,ei.exports=ez?em:eH},95320:function(ei){"use strict";var es,ef,eu=Function.prototype.toString,ed="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof ed&&"function"==typeof Object.defineProperty)try{es=Object.defineProperty({},"length",{get:function(){throw ef}}),ef={},ed(function(){throw 42},null,es)}catch(ei){ei!==ef&&(ed=null)}else ed=null;var em=/^\s*class\b/,eH=function(ei){try{var es=eu.call(ei);return em.test(es)}catch(ei){return!1}},ez=function(ei){try{if(eH(ei))return!1;return eu.call(ei),!0}catch(ei){return!1}},eV=Object.prototype.toString,eM="[object Object]",eg="[object Function]",eL="[object GeneratorFunction]",eb="[object HTMLAllCollection]",ey="[object HTML document.all class]",eC="[object HTMLCollection]",ex="function"==typeof Symbol&&!!Symbol.toStringTag,ew=!(0 in[,]),eN=function(){return!1};if("object"==typeof document){var eS=document.all;eV.call(eS)===eV.call(document.all)&&(eN=function(ei){if((ew||!ei)&&(void 0===ei||"object"==typeof ei))try{var es=eV.call(ei);return(es===eb||es===ey||es===eC||es===eM)&&null==ei("")}catch(ei){}return!1})}ei.exports=ed?function(ei){if(eN(ei))return!0;if(!ei||"function"!=typeof ei&&"object"!=typeof ei)return!1;try{ed(ei,null,es)}catch(ei){if(ei!==ef)return!1}return!eH(ei)&&ez(ei)}:function(ei){if(eN(ei))return!0;if(!ei||"function"!=typeof ei&&"object"!=typeof ei)return!1;if(ex)return ez(ei);if(eH(ei))return!1;var es=eV.call(ei);return!!(es===eg||es===eL||/^\[object HTML/.test(es))&&ez(ei)}},48662:function(ei,es,ef){"use strict";var eu,ed=Object.prototype.toString,em=Function.prototype.toString,eH=/^\s*(?:function)?\*/,ez=ef(96410)(),eV=Object.getPrototypeOf,eM=function(){if(!ez)return!1;try{return Function("return function*() {}")()}catch(ei){}};ei.exports=function(ei){if("function"!=typeof ei)return!1;if(eH.test(em.call(ei)))return!0;if(!ez)return"[object GeneratorFunction]"===ed.call(ei);if(!eV)return!1;if(void 0===eu){var es=eM();eu=!!es&&eV(es)}return eV(ei)===eu}},23944:function(ei){ei.exports=function(ei){if("string"!=typeof ei)throw Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof ei+", while checking isHexPrefixed.");return"0x"===ei.slice(0,2)}},98611:function(ei){"use strict";ei.exports=function(ei){return ei!=ei}},20360:function(ei,es,ef){"use strict";var eu=ef(55559),ed=ef(4289),em=ef(98611),eH=ef(29415),ez=ef(23194),eV=eu(eH(),Number);ed(eV,{getPolyfill:eH,implementation:em,shim:ez}),ei.exports=eV},29415:function(ei,es,ef){"use strict";var eu=ef(98611);ei.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:eu}},23194:function(ei,es,ef){"use strict";var eu=ef(4289),ed=ef(29415);ei.exports=function(){var ei=ed();return eu(Number,{isNaN:ei},{isNaN:function(){return Number.isNaN!==ei}}),ei}},85692:function(ei,es,ef){"use strict";var eu=ef(94029),ed=ef(63083),em=ef(21924),eH=em("Object.prototype.toString"),ez=ef(96410)(),eV=ef(27296),eM="undefined"==typeof globalThis?ef.g:globalThis,eg=ed(),eL=em("Array.prototype.indexOf",!0)||function(ei,es){for(var ef=0;ef-1)}},31198:function(ei,es,ef){"use strict";let eu=ef(64667).v4,ed=ef(17741),em=function(ei,es){if(!(this instanceof em))return new em(ei,es);es||(es={}),this.options={reviver:void 0!==es.reviver?es.reviver:null,replacer:void 0!==es.replacer?es.replacer:null,generator:void 0!==es.generator?es.generator:function(){return eu()},version:void 0!==es.version?es.version:2,notificationIdNull:"boolean"==typeof es.notificationIdNull&&es.notificationIdNull},this.callServer=ei};ei.exports=em,em.prototype.request=function(ei,es,ef,eu){let em;let eH=this,ez=null,eV=Array.isArray(ei)&&"function"==typeof es;if(1===this.options.version&&eV)throw TypeError("JSON-RPC 1.0 does not support batching");let eM=!eV&&ei&&"object"==typeof ei&&"function"==typeof es;if(eV||eM)eu=es,ez=ei;else{"function"==typeof ef&&(eu=ef,ef=void 0);let em="function"==typeof eu;try{ez=ed(ei,es,ef,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(ei){if(em)return eu(ei);throw ei}if(!em)return ez}try{em=JSON.stringify(ez,this.options.replacer)}catch(ei){return eu(ei)}return this.callServer(em,function(ei,es){eH._parseResponse(ei,es,eu)}),ez},em.prototype._parseResponse=function(ei,es,ef){let eu;if(ei){ef(ei);return}if(!es)return ef();try{eu=JSON.parse(es,this.options.reviver)}catch(ei){return ef(ei)}if(3===ef.length){if(!Array.isArray(eu))return ef(null,eu.error,eu.result);{let ei=function(ei){return void 0!==ei.error},es=function(es){return!ei(es)};return ef(null,eu.filter(ei),eu.filter(es))}}ef(null,eu)}},17741:function(ei,es,ef){"use strict";let eu=ef(64667).v4,ed=function(ei,es,ef,ed){if("string"!=typeof ei)throw TypeError(ei+" must be a string");ed=ed||{};let em="number"==typeof ed.version?ed.version:2;if(1!==em&&2!==em)throw TypeError(em+" must be 1 or 2");let eH={method:ei};if(2===em&&(eH.jsonrpc="2.0"),es){if("object"!=typeof es&&!Array.isArray(es))throw TypeError(es+" must be an object, array or omitted");eH.params=es}if(void 0===ef){let ei="function"==typeof ed.generator?ed.generator:function(){return eu()};eH.id=ei(eH,ed)}else 2===em&&null===ef?ed.notificationIdNull&&(eH.id=null):eH.id=ef;return eH};ei.exports=ed},64667:function(ei,es,ef){"use strict";ef.d(es,{v4:function(){return eL}});var eu,ed=new Uint8Array(16);function em(){if(!eu&&!(eu="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return eu(ed)}for(var eH=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ez=function(ei){return"string"==typeof ei&&eH.test(ei)},eV=[],eM=0;eM<256;++eM)eV.push((eM+256).toString(16).substr(1));var eg=function(ei){var es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,ef=(eV[ei[es+0]]+eV[ei[es+1]]+eV[ei[es+2]]+eV[ei[es+3]]+"-"+eV[ei[es+4]]+eV[ei[es+5]]+"-"+eV[ei[es+6]]+eV[ei[es+7]]+"-"+eV[ei[es+8]]+eV[ei[es+9]]+"-"+eV[ei[es+10]]+eV[ei[es+11]]+eV[ei[es+12]]+eV[ei[es+13]]+eV[ei[es+14]]+eV[ei[es+15]]).toLowerCase();if(!ez(ef))throw TypeError("Stringified UUID is invalid");return ef},eL=function(ei,es,ef){var eu=(ei=ei||{}).random||(ei.rng||em)();if(eu[6]=15&eu[6]|64,eu[8]=63&eu[8]|128,es){ef=ef||0;for(var ed=0;ed<16;++ed)es[ef+ed]=eu[ed];return es}return eg(eu)}},91094:function(ei,es,ef){var eu,ed=ef(83454);!function(){"use strict";var em="input is invalid type",eH="finalize already called",ez="object"==typeof window,eV=ez?window:{};eV.JS_SHA3_NO_WINDOW&&(ez=!1);var eM=!ez&&"object"==typeof self;!eV.JS_SHA3_NO_NODE_JS&&"object"==typeof ed&&ed.versions&&ed.versions.node?eV=ef.g:eM&&(eV=self);var eg=!eV.JS_SHA3_NO_COMMON_JS&&ei.exports,eL=ef.amdO,eb=!eV.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ey="0123456789abcdef".split(""),eC=[31,7936,2031616,520093696],ex=[4,1024,262144,67108864],ew=[1,256,65536,16777216],eN=[6,1536,393216,100663296],eS=[0,8,16,24],eA=[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],e_=[224,256,384,512],eE=[128,256],eP=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136};(eV.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(ei){return"[object Array]"===Object.prototype.toString.call(ei)}),eb&&(eV.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(ei){return"object"==typeof ei&&ei.buffer&&ei.buffer.constructor===ArrayBuffer});for(var eT=function(ei,es,ef){return function(eu){return new eY(ei,es,ei).update(eu)[ef]()}},eI=function(ei,es,ef){return function(eu,ed){return new eY(ei,es,ed).update(eu)[ef]()}},eR=function(ei,es,ef){return function(es,eu,ed,em){return eU["cshake"+ei].update(es,eu,ed,em)[ef]()}},eO=function(ei,es,ef){return function(es,eu,ed,em){return eU["kmac"+ei].update(es,eu,ed,em)[ef]()}},ej=function(ei,es,ef,eu){for(var ed=0;ed>5,this.byteCount=this.blockCount<<2,this.outputBlocks=ef>>5,this.extraBytes=(31&ef)>>3;for(var eu=0;eu<50;++eu)this.s[eu]=0}function eX(ei,es,ef){eY.call(this,ei,es,ef)}eY.prototype.update=function(ei){if(this.finalized)throw Error(eH);var es,ef=typeof ei;if("string"!==ef){if("object"===ef){if(null===ei)throw Error(em);if(eb&&ei.constructor===ArrayBuffer)ei=new Uint8Array(ei);else if(!Array.isArray(ei)&&(!eb||!ArrayBuffer.isView(ei)))throw Error(em)}else throw Error(em);es=!0}for(var eu,ed,ez=this.blocks,eV=this.byteCount,eM=ei.length,eg=this.blockCount,eL=0,ey=this.s;eL>2]|=ei[eL]<>2]|=ed<>2]|=(192|ed>>6)<>2]|=(128|63&ed)<=57344?(ez[eu>>2]|=(224|ed>>12)<>2]|=(128|ed>>6&63)<>2]|=(128|63&ed)<>2]|=(240|ed>>18)<>2]|=(128|ed>>12&63)<>2]|=(128|ed>>6&63)<>2]|=(128|63&ed)<=eV){for(this.start=eu-eV,this.block=ez[eg],eu=0;eu>=8,ef=255&ei;ef>0;)ed.unshift(ef),ei>>=8,ef=255&ei,++eu;return es?ed.push(eu):ed.unshift(eu),this.update(ed),ed.length},eY.prototype.encodeString=function(ei){var es,ef=typeof ei;if("string"!==ef){if("object"===ef){if(null===ei)throw Error(em);if(eb&&ei.constructor===ArrayBuffer)ei=new Uint8Array(ei);else if(!Array.isArray(ei)&&(!eb||!ArrayBuffer.isView(ei)))throw Error(em)}else throw Error(em);es=!0}var eu=0,ed=ei.length;if(es)eu=ed;else for(var eH=0;eH=57344?eu+=3:(ez=65536+((1023&ez)<<10|1023&ei.charCodeAt(++eH)),eu+=4)}return eu+=this.encode(8*eu),this.update(ei),eu},eY.prototype.bytepad=function(ei,es){for(var ef=this.encode(es),eu=0;eu>2]|=this.padding[3&es],this.lastByteIndex===this.byteCount)for(es=1,ei[0]=ei[ef];es>4&15]+ey[15&ei]+ey[ei>>12&15]+ey[ei>>8&15]+ey[ei>>20&15]+ey[ei>>16&15]+ey[ei>>28&15]+ey[ei>>24&15];eH%es==0&&(eQ(ef),em=0)}return ed&&(ez+=ey[(ei=ef[em])>>4&15]+ey[15&ei],ed>1&&(ez+=ey[ei>>12&15]+ey[ei>>8&15]),ed>2&&(ez+=ey[ei>>20&15]+ey[ei>>16&15])),ez},eY.prototype.arrayBuffer=function(){this.finalize();var ei,es=this.blockCount,ef=this.s,eu=this.outputBlocks,ed=this.extraBytes,em=0,eH=0,ez=this.outputBits>>3;ei=new ArrayBuffer(ed?eu+1<<2:ez);for(var eV=new Uint32Array(ei);eH>8&255,eV[ei+2]=es>>16&255,eV[ei+3]=es>>24&255;ez%ef==0&&eQ(eu)}return em&&(ei=ez<<2,es=eu[eH],eV[ei]=255&es,em>1&&(eV[ei+1]=es>>8&255),em>2&&(eV[ei+2]=es>>16&255)),eV},eX.prototype=new eY,eX.prototype.finalize=function(){return this.encode(this.outputBits,!0),eY.prototype.finalize.call(this)};var eQ=function(ei){var es,ef,eu,ed,em,eH,ez,eV,eM,eg,eL,eb,ey,eC,ex,ew,eN,eS,e_,eE,eP,eB,eT,eI,eR,eO,ej,eD,eF,eU,eq,eZ,eG,eW,eK,e$,eJ,eY,eX,eQ,e1,e2,e4,e3,e6,e0,e8,e5,e7,e9,cc,ci,co,cs,cf,cu,cd,cm,cH,cz,cV,cM,cg;for(eu=0;eu<48;eu+=2)ed=ei[0]^ei[10]^ei[20]^ei[30]^ei[40],em=ei[1]^ei[11]^ei[21]^ei[31]^ei[41],eH=ei[2]^ei[12]^ei[22]^ei[32]^ei[42],ez=ei[3]^ei[13]^ei[23]^ei[33]^ei[43],eV=ei[4]^ei[14]^ei[24]^ei[34]^ei[44],eM=ei[5]^ei[15]^ei[25]^ei[35]^ei[45],eg=ei[6]^ei[16]^ei[26]^ei[36]^ei[46],eL=ei[7]^ei[17]^ei[27]^ei[37]^ei[47],eb=ei[8]^ei[18]^ei[28]^ei[38]^ei[48],ey=ei[9]^ei[19]^ei[29]^ei[39]^ei[49],es=eb^(eH<<1|ez>>>31),ef=ey^(ez<<1|eH>>>31),ei[0]^=es,ei[1]^=ef,ei[10]^=es,ei[11]^=ef,ei[20]^=es,ei[21]^=ef,ei[30]^=es,ei[31]^=ef,ei[40]^=es,ei[41]^=ef,es=ed^(eV<<1|eM>>>31),ef=em^(eM<<1|eV>>>31),ei[2]^=es,ei[3]^=ef,ei[12]^=es,ei[13]^=ef,ei[22]^=es,ei[23]^=ef,ei[32]^=es,ei[33]^=ef,ei[42]^=es,ei[43]^=ef,es=eH^(eg<<1|eL>>>31),ef=ez^(eL<<1|eg>>>31),ei[4]^=es,ei[5]^=ef,ei[14]^=es,ei[15]^=ef,ei[24]^=es,ei[25]^=ef,ei[34]^=es,ei[35]^=ef,ei[44]^=es,ei[45]^=ef,es=eV^(eb<<1|ey>>>31),ef=eM^(ey<<1|eb>>>31),ei[6]^=es,ei[7]^=ef,ei[16]^=es,ei[17]^=ef,ei[26]^=es,ei[27]^=ef,ei[36]^=es,ei[37]^=ef,ei[46]^=es,ei[47]^=ef,es=eg^(ed<<1|em>>>31),ef=eL^(em<<1|ed>>>31),ei[8]^=es,ei[9]^=ef,ei[18]^=es,ei[19]^=ef,ei[28]^=es,ei[29]^=ef,ei[38]^=es,ei[39]^=ef,ei[48]^=es,ei[49]^=ef,eC=ei[0],ex=ei[1],e0=ei[11]<<4|ei[10]>>>28,e8=ei[10]<<4|ei[11]>>>28,eD=ei[20]<<3|ei[21]>>>29,eF=ei[21]<<3|ei[20]>>>29,cz=ei[31]<<9|ei[30]>>>23,cV=ei[30]<<9|ei[31]>>>23,e2=ei[40]<<18|ei[41]>>>14,e4=ei[41]<<18|ei[40]>>>14,eW=ei[2]<<1|ei[3]>>>31,eK=ei[3]<<1|ei[2]>>>31,ew=ei[13]<<12|ei[12]>>>20,eN=ei[12]<<12|ei[13]>>>20,e5=ei[22]<<10|ei[23]>>>22,e7=ei[23]<<10|ei[22]>>>22,eU=ei[33]<<13|ei[32]>>>19,eq=ei[32]<<13|ei[33]>>>19,cM=ei[42]<<2|ei[43]>>>30,cg=ei[43]<<2|ei[42]>>>30,cs=ei[5]<<30|ei[4]>>>2,cf=ei[4]<<30|ei[5]>>>2,e$=ei[14]<<6|ei[15]>>>26,eJ=ei[15]<<6|ei[14]>>>26,eS=ei[25]<<11|ei[24]>>>21,e_=ei[24]<<11|ei[25]>>>21,e9=ei[34]<<15|ei[35]>>>17,cc=ei[35]<<15|ei[34]>>>17,eZ=ei[45]<<29|ei[44]>>>3,eG=ei[44]<<29|ei[45]>>>3,eI=ei[6]<<28|ei[7]>>>4,eR=ei[7]<<28|ei[6]>>>4,cu=ei[17]<<23|ei[16]>>>9,cd=ei[16]<<23|ei[17]>>>9,eY=ei[26]<<25|ei[27]>>>7,eX=ei[27]<<25|ei[26]>>>7,eE=ei[36]<<21|ei[37]>>>11,eP=ei[37]<<21|ei[36]>>>11,ci=ei[47]<<24|ei[46]>>>8,co=ei[46]<<24|ei[47]>>>8,e3=ei[8]<<27|ei[9]>>>5,e6=ei[9]<<27|ei[8]>>>5,eO=ei[18]<<20|ei[19]>>>12,ej=ei[19]<<20|ei[18]>>>12,cm=ei[29]<<7|ei[28]>>>25,cH=ei[28]<<7|ei[29]>>>25,eQ=ei[38]<<8|ei[39]>>>24,e1=ei[39]<<8|ei[38]>>>24,eB=ei[48]<<14|ei[49]>>>18,eT=ei[49]<<14|ei[48]>>>18,ei[0]=eC^~ew&eS,ei[1]=ex^~eN&e_,ei[10]=eI^~eO&eD,ei[11]=eR^~ej&eF,ei[20]=eW^~e$&eY,ei[21]=eK^~eJ&eX,ei[30]=e3^~e0&e5,ei[31]=e6^~e8&e7,ei[40]=cs^~cu&cm,ei[41]=cf^~cd&cH,ei[2]=ew^~eS&eE,ei[3]=eN^~e_&eP,ei[12]=eO^~eD&eU,ei[13]=ej^~eF&eq,ei[22]=e$^~eY&eQ,ei[23]=eJ^~eX&e1,ei[32]=e0^~e5&e9,ei[33]=e8^~e7&cc,ei[42]=cu^~cm&cz,ei[43]=cd^~cH&cV,ei[4]=eS^~eE&eB,ei[5]=e_^~eP&eT,ei[14]=eD^~eU&eZ,ei[15]=eF^~eq&eG,ei[24]=eY^~eQ&e2,ei[25]=eX^~e1&e4,ei[34]=e5^~e9&ci,ei[35]=e7^~cc&co,ei[44]=cm^~cz&cM,ei[45]=cH^~cV&cg,ei[6]=eE^~eB&eC,ei[7]=eP^~eT&ex,ei[16]=eU^~eZ&eI,ei[17]=eq^~eG&eR,ei[26]=eQ^~e2&eW,ei[27]=e1^~e4&eK,ei[36]=e9^~ci&e3,ei[37]=cc^~co&e6,ei[46]=cz^~cM&cs,ei[47]=cV^~cg&cf,ei[8]=eB^~eC&ew,ei[9]=eT^~ex&eN,ei[18]=eZ^~eI&eO,ei[19]=eG^~eR&ej,ei[28]=e2^~eW&e$,ei[29]=e4^~eK&eJ,ei[38]=ci^~e3&e0,ei[39]=co^~e6&e8,ei[48]=cM^~cs&cu,ei[49]=cg^~cf&cd,ei[0]^=eA[eu],ei[1]^=eA[eu+1]};if(eg)ei.exports=eU;else{for(eZ=0;eZclass es extends ed{constructor(es,ef,eu,ed,em){super(em),this._rate=es,this._capacity=ef,this._delimitedSuffix=eu,this._hashBitLength=ed,this._options=em,this._state=new ei,this._state.initialize(es,ef),this._finalized=!1}_transform(ei,es,ef){let eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)}_flush(ei){let es=null;try{this.push(this.digest())}catch(ei){es=ei}ei(es)}update(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Digest already called");return eu.isBuffer(ei)||(ei=eu.from(ei,es)),this._state.absorb(ei),this}digest(ei){if(this._finalized)throw Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let es=this._state.squeeze(this._hashBitLength/8);return void 0!==ei&&(es=es.toString(ei)),this._resetState(),es}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let ei=new es(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(ei._state),ei._finalized=this._finalized,ei}}},5675:function(ei,es,ef){var eu=ef(48764).Buffer;let{Transform:ed}=ef(88473);ei.exports=ei=>class es extends ed{constructor(es,ef,eu,ed){super(ed),this._rate=es,this._capacity=ef,this._delimitedSuffix=eu,this._options=ed,this._state=new ei,this._state.initialize(es,ef),this._finalized=!1}_transform(ei,es,ef){let eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)}_flush(){}_read(ei){this.push(this.squeeze(ei))}update(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Squeeze already called");return eu.isBuffer(ei)||(ei=eu.from(ei,es)),this._state.absorb(ei),this}squeeze(ei,es){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let ef=this._state.squeeze(ei);return void 0!==es&&(ef=ef.toString(es)),ef}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let ei=new es(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(ei._state),ei._finalized=this._finalized,ei}}},34040:function(ei,es){let ef=[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];es.p1600=function(ei){for(let es=0;es<24;++es){let eu=ei[0]^ei[10]^ei[20]^ei[30]^ei[40],ed=ei[1]^ei[11]^ei[21]^ei[31]^ei[41],em=ei[2]^ei[12]^ei[22]^ei[32]^ei[42],eH=ei[3]^ei[13]^ei[23]^ei[33]^ei[43],ez=ei[4]^ei[14]^ei[24]^ei[34]^ei[44],eV=ei[5]^ei[15]^ei[25]^ei[35]^ei[45],eM=ei[6]^ei[16]^ei[26]^ei[36]^ei[46],eg=ei[7]^ei[17]^ei[27]^ei[37]^ei[47],eL=ei[8]^ei[18]^ei[28]^ei[38]^ei[48],eb=ei[9]^ei[19]^ei[29]^ei[39]^ei[49],ey=eL^(em<<1|eH>>>31),eC=eb^(eH<<1|em>>>31),ex=ei[0]^ey,ew=ei[1]^eC,eN=ei[10]^ey,eS=ei[11]^eC,eA=ei[20]^ey,e_=ei[21]^eC,eE=ei[30]^ey,eP=ei[31]^eC,eB=ei[40]^ey,eT=ei[41]^eC;ey=eu^(ez<<1|eV>>>31),eC=ed^(eV<<1|ez>>>31);let eI=ei[2]^ey,eR=ei[3]^eC,eO=ei[12]^ey,ej=ei[13]^eC,eD=ei[22]^ey,eF=ei[23]^eC,eU=ei[32]^ey,eq=ei[33]^eC,eZ=ei[42]^ey,eG=ei[43]^eC;ey=em^(eM<<1|eg>>>31),eC=eH^(eg<<1|eM>>>31);let eW=ei[4]^ey,eK=ei[5]^eC,e$=ei[14]^ey,eJ=ei[15]^eC,eY=ei[24]^ey,eX=ei[25]^eC,eQ=ei[34]^ey,e1=ei[35]^eC,e2=ei[44]^ey,e4=ei[45]^eC;ey=ez^(eL<<1|eb>>>31),eC=eV^(eb<<1|eL>>>31);let e3=ei[6]^ey,e6=ei[7]^eC,e0=ei[16]^ey,e8=ei[17]^eC,e5=ei[26]^ey,e7=ei[27]^eC,e9=ei[36]^ey,cc=ei[37]^eC,ci=ei[46]^ey,co=ei[47]^eC;ey=eM^(eu<<1|ed>>>31),eC=eg^(ed<<1|eu>>>31);let cs=ei[8]^ey,cf=ei[9]^eC,cu=ei[18]^ey,cd=ei[19]^eC,cm=ei[28]^ey,cH=ei[29]^eC,cz=ei[38]^ey,cV=ei[39]^eC,cM=ei[48]^ey,cg=ei[49]^eC,cL=ex,cy=ew,cC=eS<<4|eN>>>28,cx=eN<<4|eS>>>28,cw=eA<<3|e_>>>29,ck=e_<<3|eA>>>29,cN=eP<<9|eE>>>23,cS=eE<<9|eP>>>23,cA=eB<<18|eT>>>14,c_=eT<<18|eB>>>14,cE=eI<<1|eR>>>31,cP=eR<<1|eI>>>31,cB=ej<<12|eO>>>20,cT=eO<<12|ej>>>20,cI=eD<<10|eF>>>22,cR=eF<<10|eD>>>22,cO=eq<<13|eU>>>19,cj=eU<<13|eq>>>19,cD=eZ<<2|eG>>>30,cF=eG<<2|eZ>>>30,cU=eK<<30|eW>>>2,cq=eW<<30|eK>>>2,cZ=e$<<6|eJ>>>26,cG=eJ<<6|e$>>>26,cW=eX<<11|eY>>>21,cK=eY<<11|eX>>>21,c$=eQ<<15|e1>>>17,cJ=e1<<15|eQ>>>17,cY=e4<<29|e2>>>3,cX=e2<<29|e4>>>3,cQ=e3<<28|e6>>>4,tc=e6<<28|e3>>>4,ta=e8<<23|e0>>>9,tf=e0<<23|e8>>>9,tu=e5<<25|e7>>>7,td=e7<<25|e5>>>7,tm=e9<<21|cc>>>11,tp=cc<<21|e9>>>11,tH=co<<24|ci>>>8,tz=ci<<24|co>>>8,tV=cs<<27|cf>>>5,tv=cf<<27|cs>>>5,tM=cu<<20|cd>>>12,tg=cd<<20|cu>>>12,tL=cH<<7|cm>>>25,tb=cm<<7|cH>>>25,tC=cz<<8|cV>>>24,tw=cV<<8|cz>>>24,tN=cM<<14|cg>>>18,tS=cg<<14|cM>>>18;ei[0]=cL^~cB&cW,ei[1]=cy^~cT&cK,ei[10]=cQ^~tM&cw,ei[11]=tc^~tg&ck,ei[20]=cE^~cZ&tu,ei[21]=cP^~cG&td,ei[30]=tV^~cC&cI,ei[31]=tv^~cx&cR,ei[40]=cU^~ta&tL,ei[41]=cq^~tf&tb,ei[2]=cB^~cW&tm,ei[3]=cT^~cK&tp,ei[12]=tM^~cw&cO,ei[13]=tg^~ck&cj,ei[22]=cZ^~tu&tC,ei[23]=cG^~td&tw,ei[32]=cC^~cI&c$,ei[33]=cx^~cR&cJ,ei[42]=ta^~tL&cN,ei[43]=tf^~tb&cS,ei[4]=cW^~tm&tN,ei[5]=cK^~tp&tS,ei[14]=cw^~cO&cY,ei[15]=ck^~cj&cX,ei[24]=tu^~tC&cA,ei[25]=td^~tw&c_,ei[34]=cI^~c$&tH,ei[35]=cR^~cJ&tz,ei[44]=tL^~cN&cD,ei[45]=tb^~cS&cF,ei[6]=tm^~tN&cL,ei[7]=tp^~tS&cy,ei[16]=cO^~cY&cQ,ei[17]=cj^~cX&tc,ei[26]=tC^~cA&cE,ei[27]=tw^~c_&cP,ei[36]=c$^~tH&tV,ei[37]=cJ^~tz&tv,ei[46]=cN^~cD&cU,ei[47]=cS^~cF&cq,ei[8]=tN^~cL&cB,ei[9]=tS^~cy&cT,ei[18]=cY^~cQ&tM,ei[19]=cX^~tc&tg,ei[28]=cA^~cE&cZ,ei[29]=c_^~cP&cG,ei[38]=tH^~tV&cC,ei[39]=tz^~tv&cx,ei[48]=cD^~cU&ta,ei[49]=cF^~cq&tf,ei[0]^=ef[2*es],ei[1]^=ef[2*es+1]}}},79653:function(ei,es,ef){var eu=ef(48764).Buffer;let ed=ef(34040);function em(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}em.prototype.initialize=function(ei,es){for(let ei=0;ei<50;++ei)this.state[ei]=0;this.blockSize=ei/8,this.count=0,this.squeezing=!1},em.prototype.absorb=function(ei){for(let es=0;es>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(ed.p1600(this.state),this.count=0);return es},em.prototype.copy=function(ei){for(let es=0;es<50;++es)ei.state[es]=this.state[es];ei.blockSize=this.blockSize,ei.count=this.count,ei.squeezing=this.squeezing},ei.exports=em},62318:function(ei,es,ef){"use strict";var eu=ef(35717),ed=ef(3349),em=ef(89509).Buffer,eH=Array(16);function ez(){ed.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function eV(ei,es){return ei<>>32-es}function eM(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&ef|~es&eu)+ed+em|0,eH)+es|0}function eg(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&eu|ef&~eu)+ed+em|0,eH)+es|0}function eL(ei,es,ef,eu,ed,em,eH){return eV(ei+(es^ef^eu)+ed+em|0,eH)+es|0}function eb(ei,es,ef,eu,ed,em,eH){return eV(ei+(ef^(es|~eu))+ed+em|0,eH)+es|0}eu(ez,ed),ez.prototype._update=function(){for(var ei=eH,es=0;es<16;++es)ei[es]=this._block.readInt32LE(4*es);var ef=this._a,eu=this._b,ed=this._c,em=this._d;ef=eM(ef,eu,ed,em,ei[0],3614090360,7),em=eM(em,ef,eu,ed,ei[1],3905402710,12),ed=eM(ed,em,ef,eu,ei[2],606105819,17),eu=eM(eu,ed,em,ef,ei[3],3250441966,22),ef=eM(ef,eu,ed,em,ei[4],4118548399,7),em=eM(em,ef,eu,ed,ei[5],1200080426,12),ed=eM(ed,em,ef,eu,ei[6],2821735955,17),eu=eM(eu,ed,em,ef,ei[7],4249261313,22),ef=eM(ef,eu,ed,em,ei[8],1770035416,7),em=eM(em,ef,eu,ed,ei[9],2336552879,12),ed=eM(ed,em,ef,eu,ei[10],4294925233,17),eu=eM(eu,ed,em,ef,ei[11],2304563134,22),ef=eM(ef,eu,ed,em,ei[12],1804603682,7),em=eM(em,ef,eu,ed,ei[13],4254626195,12),ed=eM(ed,em,ef,eu,ei[14],2792965006,17),eu=eM(eu,ed,em,ef,ei[15],1236535329,22),ef=eg(ef,eu,ed,em,ei[1],4129170786,5),em=eg(em,ef,eu,ed,ei[6],3225465664,9),ed=eg(ed,em,ef,eu,ei[11],643717713,14),eu=eg(eu,ed,em,ef,ei[0],3921069994,20),ef=eg(ef,eu,ed,em,ei[5],3593408605,5),em=eg(em,ef,eu,ed,ei[10],38016083,9),ed=eg(ed,em,ef,eu,ei[15],3634488961,14),eu=eg(eu,ed,em,ef,ei[4],3889429448,20),ef=eg(ef,eu,ed,em,ei[9],568446438,5),em=eg(em,ef,eu,ed,ei[14],3275163606,9),ed=eg(ed,em,ef,eu,ei[3],4107603335,14),eu=eg(eu,ed,em,ef,ei[8],1163531501,20),ef=eg(ef,eu,ed,em,ei[13],2850285829,5),em=eg(em,ef,eu,ed,ei[2],4243563512,9),ed=eg(ed,em,ef,eu,ei[7],1735328473,14),eu=eg(eu,ed,em,ef,ei[12],2368359562,20),ef=eL(ef,eu,ed,em,ei[5],4294588738,4),em=eL(em,ef,eu,ed,ei[8],2272392833,11),ed=eL(ed,em,ef,eu,ei[11],1839030562,16),eu=eL(eu,ed,em,ef,ei[14],4259657740,23),ef=eL(ef,eu,ed,em,ei[1],2763975236,4),em=eL(em,ef,eu,ed,ei[4],1272893353,11),ed=eL(ed,em,ef,eu,ei[7],4139469664,16),eu=eL(eu,ed,em,ef,ei[10],3200236656,23),ef=eL(ef,eu,ed,em,ei[13],681279174,4),em=eL(em,ef,eu,ed,ei[0],3936430074,11),ed=eL(ed,em,ef,eu,ei[3],3572445317,16),eu=eL(eu,ed,em,ef,ei[6],76029189,23),ef=eL(ef,eu,ed,em,ei[9],3654602809,4),em=eL(em,ef,eu,ed,ei[12],3873151461,11),ed=eL(ed,em,ef,eu,ei[15],530742520,16),eu=eL(eu,ed,em,ef,ei[2],3299628645,23),ef=eb(ef,eu,ed,em,ei[0],4096336452,6),em=eb(em,ef,eu,ed,ei[7],1126891415,10),ed=eb(ed,em,ef,eu,ei[14],2878612391,15),eu=eb(eu,ed,em,ef,ei[5],4237533241,21),ef=eb(ef,eu,ed,em,ei[12],1700485571,6),em=eb(em,ef,eu,ed,ei[3],2399980690,10),ed=eb(ed,em,ef,eu,ei[10],4293915773,15),eu=eb(eu,ed,em,ef,ei[1],2240044497,21),ef=eb(ef,eu,ed,em,ei[8],1873313359,6),em=eb(em,ef,eu,ed,ei[15],4264355552,10),ed=eb(ed,em,ef,eu,ei[6],2734768916,15),eu=eb(eu,ed,em,ef,ei[13],1309151649,21),ef=eb(ef,eu,ed,em,ei[4],4149444226,6),em=eb(em,ef,eu,ed,ei[11],3174756917,10),ed=eb(ed,em,ef,eu,ei[2],718787259,15),eu=eb(eu,ed,em,ef,ei[9],3951481745,21),this._a=this._a+ef|0,this._b=this._b+eu|0,this._c=this._c+ed|0,this._d=this._d+em|0},ez.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 ei=em.allocUnsafe(16);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei},ei.exports=ez},79746:function(ei){function es(ei,es){if(!ei)throw Error(es||"Assertion failed")}ei.exports=es,es.equal=function(ei,es,ef){if(ei!=es)throw Error(ef||"Assertion failed: "+ei+" != "+es)}},34504:function(ei,es){"use strict";var ef=es;function eu(ei,es){if(Array.isArray(ei))return ei.slice();if(!ei)return[];var ef=[];if("string"!=typeof ei){for(var eu=0;eu>8,eH=255&ed;em?ef.push(em,eH):ef.push(eH)}return ef}function ed(ei){return 1===ei.length?"0"+ei:ei}function em(ei){for(var es="",ef=0;efei.toUpperCase(),ey=(0,em.useMemo)(()=>{if(eg)return[];let ei=eV.pathname.split("/").filter(ei=>""!==ei).map((ei,ed,em)=>{let eH=null==es?void 0:es[ei];if(ed===em.length-1){let[,es]=eV.asPath.split("#"),ed=ef||(eH?"object"==typeof eH?eH[es]:eH:eb(ei));return(0,eu.jsx)("span",{children:ed},ei)}let ez=eH||eb(ei);return(0,eu.jsx)(eM(),{href:String("../").repeat(em.length-(ed+1))+ei,children:ez},ei)});return ed&&ei.unshift((0,eu.jsx)(eM(),{href:"/",children:(null==es?void 0:es["/"])||"HOME"},"home")),ei},[eV.pathname,eV.asPath,ef,es,eg,ed]);return eg?null:(0,eu.jsx)(eL,{navLinks:ey,...ez})}var eL=(0,ed.ZP)(ez.aG).withConfig({displayName:"cmp___StyledBreadcrumb",componentId:"sc-1pse81j-0"})({paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem","@media (min-width: 768px)":{paddingLeft:"4rem",paddingRight:"4rem"}})},87531:function(ei,es,ef){"use strict";ef.d(es,{Z:function(){return em}});var eu=ef(19521);let ed=eu.ZP.div.withConfig({displayName:"styles__StyledContainer",componentId:"sc-ex4pya-0"})(["",""],ei=>{let{theme:es}=ei;return(0,eu.iv)([""," box-sizing:border-box;width:100%;margin:0 auto;max-width:","rem;"],{paddingLeft:"1.5rem",paddingRight:"1.5rem","@media (min-width: 768px)":{paddingLeft:"4rem",paddingRight:"4rem"}},es.breakpoint.xxl+12.5)});var em=ed},36470:function(ei,es,ef){"use strict";ef.d(es,{WE:function(){return ez},mr:function(){return eV}});var eu=ef(85893),ed=ef(67294),em=ef(48847);let eH=(0,ed.createContext)([em.E3,()=>null]);function ez(ei){let{children:es}=ei,[ef,ez]=(0,ed.useReducer)(em.I6,em.E3);return(0,eu.jsx)(eH.Provider,{value:[ef,ez],children:es})}function eV(){return(0,ed.useContext)(eH)}},65526:function(ei,es,ef){"use strict";ef.d(es,{Y:function(){return ez}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(22733);class ez{async getAll(){try{let ei=await eu.aggregate.Get({address:this.account.address,keys:[this.key]});return this.parseAggregate(ei)}catch(ei){return[]}}async get(ei){let es=await this.getAll();return es.find(es=>es.id===ei)}async add(ei,es){ei=Array.isArray(ei)?ei:[ei],ei=await this.parseDomains(ei,es);try{if(!ei.length)return[];let es=ei.reduce((ei,es)=>{let{name:ef,ref:eu,target:ed,programType:eH}=es,ez={message_id:eu,programType:eH,type:ed};return ed===em.vs.Program&&(ez.programType=es.programType||em.py.Instance),ei[ef]=ez,ei},{}),ef=await eu.aggregate.Publish({account:this.account,key:this.key,channel:this.channel,content:es});return this.parseNewAggregate(ef)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;let es={[ei]:null};try{await eu.aggregate.Publish({account:this.account,key:this.key,channel:this.channel,content:es})}catch(ei){throw ed.Z.RequestFailed(ei)}}async checkStatus(ei){let es=await fetch("https://api.dns.public.aleph.sh/domain/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:ei.name,owner:this.account.address,target:ei.target})}),ef=await es.json();return ef}async parseDomains(ei){let es=!(arguments.length>1)||void 0===arguments[1]||arguments[1];ei=ez.addManySchema.parse(ei);let ef=await this.getAll(),eu=new Set(ef.map(ei=>ei.name));return es?ei.map(ei=>{if(!eu.has(ei.name))return ei;throw Error("Domain name already used by another resource: ".concat(ei.name))}):ei.filter(ei=>!eu.has(ei.name))}parseAggregate(ei){let es=ei[this.key];return this.parseAggregateItems(es)}parseNewAggregate(ei){let es=ei.content.content;return this.parseAggregateItems(es)}parseAggregateItems(ei){return Object.entries(ei).filter(ei=>{let[,es]=ei;return null!==es}).map(ei=>{let[es,ef]=ei;return this.parseAggregateItem(es,ef)})}parseAggregateItem(ei,es){let{message_id:ef,type:eu}=es,ed={type:em.py.Domain,id:ei,name:ei,target:eu,ref:ef,confirmed:!0};return eu===em.vs.Program&&(ed.programType=es.programType||em.py.Instance),ed}constructor(ei,es=em.T4,ef=em.fM){this.account=ei,this.key=es,this.channel=ef}}(()=>{ez.addSchema=eH.CJ})(),(()=>{ez.addManySchema=eH.I})()},94443:function(ei,es,ef){"use strict";ef.d(es,{E:function(){return em}});var eu=ef(59925),ed=ef(33358);class em{parseEnvVars(ei){if(ei&&0!==ei.length)return Object.fromEntries(ei.map(ei=>{let{name:es,value:ef}=ei;return[es,ef]}))}async parseDomains(ei,es){if(!es||0===es.length)return[];let ef=es.map(es=>({...es,ref:ei}));return this.domainManager.add(ef,!1)}async parseVolumes(ei){if(!ei||0===(ei=Array.isArray(ei)?ei:[ei]).length)return;let es=await this.volumeManager.add(ei),ef=ei.map((ei,ef)=>ei.volumeType===eu.z.New?{...ei,volumeType:eu.z.Existing,refHash:es[ef].id}:ei);return ef.map(ei=>{if(ei.volumeType===eu.z.Persistent){let{mountPath:es,size:ef,name:eu}=ei;return{persistence:"host",mount:es,size_mib:ef,name:eu}}let{refHash:es,mountPath:ef,useLatest:ed=!1}=ei;return{ref:es,mount:ef,use_latest:ed}})}parseSpecs(ei){return{vcpus:ei.cpu,memory:ei.ram}}parseMetadata(){let ei=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Untitled",es=arguments.length>1?arguments[1]:void 0,ef={name:ei};return es&&es.length>0&&(ef.tags=es),ef}constructor(ei,es,ef){this.account=ei,this.volumeManager=es,this.domainManager=ef}}(()=>{em.getExecutableCost=ei=>{let{type:es,isPersistent:ef,specs:em,capabilities:eH={},volumes:ez=[]}=ei;if(!em)return{computeTotalCost:0,volumeTotalCost:0,perVolumeCost:[],totalCost:0};ef=es===ed.py.Instance||ef;let eV=ef?2e3:200,eM=Object.values(eH).reduce((ei,es)=>ei+Number(es),1),eg=eV*em.cpu*eM,eL=es===ed.py.Instance?0:em.storage,{perVolumeCost:eb,totalCost:ey}=eu.l.getCost({volumes:ez,sizeDiscount:eL}),eC=ey+eg;return{computeTotalCost:eg,perVolumeCost:eb,volumeTotalCost:ey,totalCost:eC}}})()},49875:function(ei,es,ef){"use strict";ef.d(es,{u:function(){return eg}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(57492),eV=ef(94443),eM=ef(22733);class eg extends eV.E{async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:ez.MessageType.instance,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:ez.MessageType.instance,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){try{let es=await this.parseInstance(ei),ef=await eu.instance.publish(es),[ed]=await this.parseMessages([ef]);return await this.parseDomains(ed.id,ei.domains),ed}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async checkStatus(ei){let es=await fetch("https://scheduler.api.aleph.sh/api/v0/allocation/".concat(ei.id));if(404===es.status)return;let ef=await es.json();return ef}async parseInstance(ei){ei=eg.addSchema.parse(ei);let{account:es,channel:ef}=this,{envVars:eu,specs:ed,image:em,sshKeys:eH,name:ez,tags:eV}=ei,eM=this.parseEnvVars(eu),eL=this.parseSpecs(ed),eb=this.parseMetadata(ez,eV),ey=await this.parseSSHKeys(eH),eC=await this.parseVolumes(ei.volumes);return{account:es,channel:ef,variables:eM,resources:eL,metadata:eb,image:em,authorized_keys:ey,volumes:eC}}async parseVolumes(ei){if(ei)return ei=(ei=Array.isArray(ei)?ei:[ei]).filter(ei=>!ei.isFake),super.parseVolumes(ei)}async parseSSHKeys(ei){if(!ei||0===ei.length)return;let es=ei.filter(ei=>ei.isNew&&ei.isSelected);return await this.sshKeyManager.add(es,!1),ei.filter(ei=>ei.isSelected).map(ei=>{let{key:es}=ei;return es})}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>{let ef=ei.content.volumes.reduce((ei,ef)=>ei+("size_mib"in ef?ef.size_mib:es[ef.ref]),0);return{id:ei.item_hash,...ei.content,type:em.py.Instance,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),size:ef,confirmed:!!ei.confirmed}})}constructor(ei,es,ef,eu,ed,eH=em.Dl){super(ei,es,ef),this.account=ei,this.volumeManager=es,this.domainManager=ef,this.sshKeyManager=eu,this.fileManager=ed,this.channel=eH}}(()=>{eg.addSchema=eM.OC})(),(()=>{eg.getCost=ei=>eV.E.getExecutableCost({...ei,type:em.py.Instance})})()},39261:function(ei,es,ef){"use strict";ef.d(es,{L:function(){return eb}});var eu=ef(67572),ed=ef(70714),em=ef(81287),eH=ef(33358),ez=ef(34853),eV=ef(57492),eM=ef(94443),eg=ef(94818),eL=ef(22733);class eb extends eM.E{async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:eV.MessageType.program,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:eV.MessageType.program,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){try{let es=await this.parseProgram(ei);console.log("programMessage",es);let ef=await eu.program.publish(es),[ed]=await this.parseMessages([ef]);return await this.parseDomains(ed.id,ei.domains),ed}catch(ei){throw em.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw em.Z.RequestFailed(ei)}}async download(ei){let es=ei.code.ref,ef=await this.messageManager.get(es),eu=ef.content.item_hash,ed=await fetch("".concat(eH.Sd).concat(eu)),em=await ed.blob();return(0,ez.lm)(em,"VM_".concat(ei.id.slice(-12),".zip"))}async parseCode(ei){if("text"===ei.type)return{entrypoint:"main:app",file:new Blob([ei.text],{type:"text/plain"}),encoding:ed.Encoding.plain};if("file"===ei.type){let es;if(!ei.file)throw Error("Invalid function code file");let ef=ei.file.name;if(ef.endsWith(".zip"))es=ed.Encoding.zip;else if(ef.endsWith(".sqsh"))es=ed.Encoding.squashfs;else throw Error("Invalid function code file");return{entrypoint:ei.entrypoint,file:ei.file,encoding:es}}throw Error("Invalid function code type")}async parseProgram(ei){ei=eb.addSchema.parse(ei);let{account:es,channel:ef}=this,{name:eu,tags:ed,isPersistent:em,envVars:eH,specs:ez}=ei,eV=this.parseEnvVars(eH),{memory:eM,vcpus:eg}=this.parseSpecs(ez),eL=this.parseMetadata(eu,ed),ey=this.parseRuntime(ei.runtime),eC=await this.parseVolumes(ei.volumes),{file:ex,entrypoint:ew,encoding:eN}=await this.parseCode(ei.code);return{account:es,channel:ef,runtime:ey,isPersistent:em,entrypoint:ew,file:ex,variables:eV,memory:eM,vcpus:eg,volumes:eC,metadata:eL,encoding:eN}}parseRuntime(ei){let es=ei.id!==eg.W.Custom?ei.id:ei.custom;return es}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>{let ef=ei.content.volumes.reduce((ei,ef)=>ei+("size_mib"in ef?ef.size_mib:es[ef.ref]),0);return{id:ei.item_hash,...ei.content,type:eH.py.Program,url:(0,ez.DI)(ei),urlVM:"".concat(eH.gC).concat(ei.item_hash),date:(0,ez._3)(ei.time),size:ef,confirmed:!!ei.confirmed}})}constructor(ei,es,ef,eu,ed,em=eH.d1){super(ei,es,ef),this.account=ei,this.volumeManager=es,this.domainManager=ef,this.messageManager=eu,this.fileManager=ed,this.channel=em}}(()=>{eb.addSchema=eL._G})(),(()=>{eb.getCost=ei=>eM.E.getExecutableCost({...ei,type:eH.py.Program})})()},94818:function(ei,es,ef){"use strict";var eu;ef.d(es,{J:function(){return ed},W:function(){return eu}}),function(ei){ei.Runtime1="bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4",ei.Runtime2="bd79839bf96e595a06da5ac0b6ba51dea6f7e2591bb913deccded04d831d29f4 ",ei.Custom="custom"}(eu||(eu={}));let ed={[eu.Runtime1]:{id:eu.Runtime1,name:"Official runtime with Debian 11, Python 3.9 & Node.js 14",dist:"debian"},[eu.Runtime2]:{id:eu.Runtime2,name:"Official min. runtime for binaries x86_64 (Rust, Go, ...)",dist:"debian"},[eu.Custom]:{id:eu.Custom,name:"Custom runtime",dist:"ubuntu"}}},61941:function(ei,es,ef){"use strict";ef.d(es,{X:function(){return eV}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(22733);class eV{async getAll(){try{let ei=await eu.post.Get({addresses:[this.account.address],types:[this.type],channels:[this.channel]});return this.parsePosts(ei.posts)}catch(ei){return[]}}async get(ei){let es=await eu.post.Get({addresses:[this.account.address],types:[this.type],channels:[this.channel],hashes:[ei]}),[ef]=this.parsePosts(es.posts);return ef}async getByValues(ei){let es=await this.getAll();return ei.map(ei=>es.find(es=>es.key===ei))}async add(ei,es){ei=Array.isArray(ei)?ei:[ei],ei=await this.parseSSHKeys(ei,es);try{let es=await Promise.all(ei.map(ei=>{let{key:es,label:ef}=ei;return eu.post.Publish({account:this.account,postType:this.type,channel:this.channel,content:{key:es,label:ef}})}));return this.parseNewPosts(es)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async parseSSHKeys(ei){let es=!(arguments.length>1)||void 0===arguments[1]||arguments[1];ei=eV.addManySchema.parse(ei);let ef=await this.getAll(),eu=new Set(ef.map(ei=>ei.key));return es?ei.map(ei=>{if(!eu.has(ei.key))return ei;throw Error("SSH key already exists on your collection: ".concat(ei.label||ei.key))}):ei.filter(ei=>!eu.has(ei.key))}parsePosts(ei){return ei.map(ei=>this.parsePost(ei,ei.content))}parseNewPosts(ei){return ei.map(ei=>this.parsePost(ei,ei.content.content))}parseNewPost(ei){return this.parsePost(ei,ei.content.content)}parsePost(ei,es){return{type:em.py.SSHKey,id:ei.item_hash,...es,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),confirmed:!!ei.confirmed}}constructor(ei,es=em.Wt,ef=em.GI){this.account=ei,this.type=es,this.channel=ef}}(()=>{eV.addSchema=ez.ve})(),(()=>{eV.addManySchema=ez.K7})()},59925:function(ei,es,ef){"use strict";ef.d(es,{l:function(){return eM},z:function(){return em.lf}});var eu=ef(67572),ed=ef(81287),em=ef(33358),eH=ef(34853),ez=ef(57492),eV=ef(22733);class eM{static getVolumeSize(ei){if(ei.volumeType===em.lf.New){var es;return(0,eH.Fx)((null==ei?void 0:null===(es=ei.file)||void 0===es?void 0:es.size)||0,{from:"B",to:"MiB"})}return ei.size||0}static getVolumeMiBPrice(ei){return ei.volumeType!==em.lf.New||ei.mountPath?20:1/3}static getPerVolumeCost(ei){let{volumes:es=[],sizeDiscount:ef=0,exclude:eu=[em.lf.Existing]}=ei;return es.map(ei=>{let es=eu.includes(ei.volumeType),ed=this.getVolumeSize(ei)||0,em=this.getVolumeMiBPrice(ei);if(es)return{size:ed,price:0,discount:0,cost:0};let eH=ed;ef>0&&(eH<=ef?(ef-=eH,eH=0):(eH-=ef,ef=0));let ez=ed>0?1-eH/ed:0,eV=ed*em,eM=eH*em;return{size:ed,price:eV,discount:ez,cost:eM}},[])}static getCost(ei){let es=this.getPerVolumeCost(ei),ef=Math.ceil(Object.values(es).reduce((ei,es)=>ei+es.cost,0));return{perVolumeCost:es,totalCost:ef}}async getAll(){try{let ei=await eu.any.GetMessages({addresses:[this.account.address],messageType:ez.MessageType.store,channels:[this.channel]});return await this.parseMessages(ei.messages)}catch(ei){return[]}}async get(ei){let es=await eu.any.GetMessage({hash:ei,messageType:ez.MessageType.store,channel:this.channel}),[ef]=await this.parseMessages([es]);return ef}async add(ei){ei=Array.isArray(ei)?ei:[ei];let es=this.parseNewVolumes(ei);if(0===es.length)return[];try{let{account:ei,channel:ef}=this,ed=await Promise.all(es.map(async es=>{let{file:ed}=es;return eu.store.Publish({account:ei,channel:ef,fileObject:ed})}));return await this.parseMessages(ed)}catch(ei){throw ed.Z.RequestFailed(ei)}}async del(ei){ei="string"==typeof ei?ei:ei.id;try{await eu.forget.Publish({account:this.account,channel:this.channel,hashes:[ei]})}catch(ei){throw ed.Z.RequestFailed(ei)}}async download(ei){ei="string"==typeof ei?ei:ei.id;let es=await fetch("".concat(em.Sd).concat(ei)),ef=await es.blob();return(0,eH.lm)(ef,"Volume_".concat(ei.slice(-12),".sqsh"))}parseNewVolumes(ei){let es=ei.filter(ei=>ei.volumeType===em.lf.New&&!!ei.file);return ei=eM.addManySchema.parse(es),es}async parseMessages(ei){let es=await this.fileManager.getSizesMap();return ei.filter(ei=>{let{content:es}=ei;return void 0!==es}).map(ei=>this.parseMessage(ei,ei.content,es))}parseMessage(ei,es,ef){return{id:ei.item_hash,...es,type:em.py.Volume,volumeType:em.lf.Existing,url:(0,eH.DI)(ei),date:(0,eH._3)(ei.time),size:ef[ei.item_hash],confirmed:!!ei.confirmed}}constructor(ei,es,ef=em.yk){this.account=ei,this.fileManager=es,this.channel=ef}}(()=>{eM.addSchema=eV.wy})(),(()=>{eM.addManySchema=eV.iq})()},33358:function(ei,es,ef){"use strict";var eu,ed,em;ef.d(es,{Dl:function(){return ey},GI:function(){return eb},K_:function(){return eN},Sd:function(){return ez},T4:function(){return eV},Wt:function(){return eM},d1:function(){return eC},fM:function(){return ex},gC:function(){return eH},lf:function(){return em},py:function(){return eu},sT:function(){return eg},sv:function(){return ew},vs:function(){return ed},yk:function(){return eL}});let eH="https://aleph.sh/vm/",ez="https://api2.aleph.im/api/v0/storage/raw/",eV="domains",eM="ALEPH-SSH",eg="ALEPH-CLOUDSOLUTIONS",eL=eg,eb=eg,ey=eg,eC=eg,ex=eg,ew={"/":"SOLUTIONS","/dashboard/function":"SETUP NEW FUNCTION","/dashboard/volume":"SETUP NEW VOLUME"};!function(ei){ei.Volume="volume",ei.Program="program",ei.Instance="instance",ei.SSHKey="sshKey",ei.Domain="domain"}(eu||(eu={})),function(ei){ei.IPFS="ipfs",ei.Program="program",ei.Instance="instance"}(ed||(ed={})),function(ei){ei.New="new",ei.Existing="existing",ei.Persistent="persistent"}(em||(em={}));let eN={[eu.Volume]:"Volume",[eu.Program]:"Function",[eu.Instance]:"Instance",[eu.SSHKey]:"SSH Key",[eu.Domain]:"Domain"}},81287:function(ei,es){"use strict";es.Z={ChainNotYetSupported:Error("Chain is not yet supported"),RequestTimeout:Error("Request timed out"),RequestFailed:ei=>Error("Request failed",{cause:ei})}},22733:function(ei,es,ef){"use strict";ef.d(es,{CJ:function(){return ew},I:function(){return eN},K7:function(){return ex},OC:function(){return eY},_G:function(){return eJ},iq:function(){return eA},ve:function(){return eC},wy:function(){return eS}});var eu=ef(1604),ed=ef(33358),em=ef(34853);let eH=eu.z.string().trim().min(1,{message:"Required field"}),ez=eu.z.string().trim().optional(),eV=eH.regex(/^[0-9a-f]{64}$/,{message:"Invalid hash"}),eM=eH.regex(/^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9\-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$/,{message:"Invalid domain format"}),eg=eH.regex(/^(\/[^\/ ]*)+\/?$/,{message:"Invalid path"}),eL=eu.z.custom(ei=>ei instanceof File,"Required file").refine(ei=>"application/zip"===ei.type&&ei.name.endsWith(".zip")||ei.name.endsWith(".sqsh")||ei.name.endsWith(".squashfs"),{message:"only .zip, .sqsh and .squashfs formats are valid"}).refine(ei=>ei.size>0,{message:"File size should be greater than 0"}),eb=eu.z.custom(ei=>ei instanceof File,"Required file").refine(ei=>(console.log(ei),"application/zip"===ei.type&&ei.name.endsWith(".zip")||ei.name.endsWith(".sqsh")||ei.name.endsWith(".squashfs")),{message:"only .zip, .sqsh and .squashfs formats are valid"}).refine(ei=>ei.size>0,{message:"File size should be greater than 0"}),ey=eu.z.enum([ed.py.Instance,ed.py.Program]),eC=eu.z.object({key:eH,label:ez}),ex=eu.z.array(eC),ew=eu.z.object({name:eM,target:eu.z.enum([ed.vs.IPFS,ed.vs.Program,ed.vs.Instance]),programType:ey,ref:eV}),eN=eu.z.array(ew),eS=eu.z.object({volumeType:eu.z.literal(ed.lf.New),file:eL}),eA=eu.z.array(eS),e_=eS.extend({mountPath:eg,useLatest:eu.z.coerce.boolean(),isFake:eu.z.boolean().optional()}),eE=eu.z.object({volumeType:eu.z.literal(ed.lf.Existing),refHash:eV,mountPath:eg,useLatest:eu.z.coerce.boolean(),isFake:eu.z.boolean().optional()}),eP=eu.z.object({volumeType:eu.z.literal(ed.lf.Persistent),name:eH,mountPath:eg,size:eu.z.number().gt(0),isFake:eu.z.boolean().optional()}),eB=eu.z.discriminatedUnion("volumeType",[e_,eE,eP]),eT=eu.z.array(eB),eI=ew.extend({ref:ez}),eR=eu.z.array(eI),eO=eu.z.object({name:eH,value:eH}),ej=eu.z.array(eO),eD=eu.z.object({lang:eu.z.enum(["python","javascript"])}),eF=eu.z.discriminatedUnion("type",[eD.extend({type:eu.z.literal("file"),file:eb,entrypoint:eH}),eD.extend({type:eu.z.literal("text"),text:eH})]),eU=eu.z.object({name:eH,tags:eu.z.array(eu.z.string().trim()).optional()}),eq=eC.extend({isSelected:eu.z.boolean(),isNew:eu.z.boolean()}),eZ=eu.z.array(eq).refine(ei=>ei.some(ei=>ei.isSelected),{message:"At least one ssh key should be add and selected",path:["0.isSelected"]}),eG=eu.z.coerce.boolean(),eW=eu.z.object({id:eu.z.union([eV,eu.z.literal("custom")]),custom:ez}).superRefine((ei,es)=>{let{id:ef,custom:eu}=ei,{addIssue:ed}=es;if("custom"!==ef)return!0;let em=eV.safeParse(eu,{path:["custom"]});em.success||em.error.issues.forEach(ei=>ed(ei))}),eK=eV,e$=eu.z.object({cpu:eu.z.union([eu.z.literal(1),eu.z.literal(2),eu.z.literal(4),eu.z.literal(6),eu.z.literal(8),eu.z.literal(12)]),ram:eu.z.number().gt(0),storage:eu.z.number().gt(0)}).refine(ei=>{let{cpu:es,ram:ef}=ei;return ef===(0,em.Fx)(2*es,{from:"GiB",to:"MiB"})},{message:"Invalid specs"}).refine(ei=>{let{cpu:es,storage:ef}=ei;return ef===(0,em.Fx)(20*es,{from:"GiB",to:"MiB"})||ef===(0,em.Fx)(2*es,{from:"GiB",to:"MiB"})},{message:"Invalid specs"}),eJ=eu.z.object({code:eF,runtime:eW,isPersistent:eG,volumes:eT,specs:e$,envVars:ej,domains:eR}).merge(eU),eY=eu.z.object({image:eK,volumes:eT,specs:e$,envVars:ej,sshKeys:eZ,domains:eR}).merge(eU)},48847:function(ei,es,ef){"use strict";ef.d(es,{MF:function(){return eu},E3:function(){return ex},I6:function(){return e_}});var eu,ed=ef(61941),em=ef(59925),eH=ef(49875),ez=ef(39261),eV=ef(33358),eM=ef(34853);class eg{async getAll(){let{address:ei}=this.account,es={address:ei,total_size:0,files:[]};try{let ef=await fetch("https://api2.aleph.im/api/v0/addresses/".concat(ei,"/files")),eu=await ef.json()||es;return this.parseSizesMap(eu.files),eu}catch(ei){return console.error(ei),es}}async getSizesMap(){let ei=await this.mutex.acquire();try{this.lastFetch+6e4(ei[es.item_hash]=(0,eM.Fx)(es.size,{from:"B",to:"MiB"}),ei),{})}constructor(ei,es=eV.sT){this.account=ei,this.channel=es,this.sizesMapCache={},this.lastFetch=0,this.mutex=new eM.WU}}var eL=ef(67572),eb=ef(81287);class ey{async get(ei){try{let es=await eL.any.GetMessage({hash:ei});return es}catch(ei){throw eb.Z.RequestFailed(ei)}}async del(ei){try{let es=await eL.forget.Publish({account:this.account,hashes:[ei.item_hash],channel:ei.channel});return es}catch(ei){throw eb.Z.RequestFailed(ei)}}constructor(ei,es=eV.sT){this.account=ei,this.channel=es}}var eC=ef(65526);!function(ei){ei[ei.connect=0]="connect",ei[ei.disconnect=1]="disconnect",ei[ei.setAccountBalance=2]="setAccountBalance",ei[ei.setAccountFiles=3]="setAccountFiles",ei[ei.setAccountSSHKeys=4]="setAccountSSHKeys",ei[ei.addAccountSSHKey=5]="addAccountSSHKey",ei[ei.delAccountSSHKey=6]="delAccountSSHKey",ei[ei.setAccountFunctions=7]="setAccountFunctions",ei[ei.addAccountFunction=8]="addAccountFunction",ei[ei.delAccountFunction=9]="delAccountFunction",ei[ei.setAccountVolumes=10]="setAccountVolumes",ei[ei.addAccountVolume=11]="addAccountVolume",ei[ei.delAccountVolume=12]="delAccountVolume",ei[ei.setAccountInstances=13]="setAccountInstances",ei[ei.addAccountInstance=14]="addAccountInstance",ei[ei.delAccountInstance=15]="delAccountInstance",ei[ei.setAccountDomains=16]="setAccountDomains",ei[ei.addAccountDomain=17]="addAccountDomain",ei[ei.delAccountDomain=18]="delAccountDomain"}(eu||(eu={}));let ex={account:void 0,accountBalance:void 0,accountInstances:void 0,accountFunctions:void 0,accountVolumes:void 0,accountFiles:void 0,accountSSHKeys:void 0,accountDomains:void 0,fileManager:void 0,messageManager:void 0,sshKeyManager:void 0,domainManager:void 0,volumeManager:void 0,programManager:void 0,instanceManager:void 0};function ew(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],ef=new Map(es.map(ei=>[ei.id,ei]));for(let es of ei)ef.set(es.id,es);return Array.from(ef.values())}function eN(ei,es){return ew([ei],es)}function eS(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return es.filter(es=>es.id!==ei)}function eA(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],ef=es.filter(ei=>!ei.confirmed);return ew(ei,ef)}let e_=function(){let ei=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ex,{type:es,payload:ef}=arguments.length>1?arguments[1]:void 0;switch(es){case eu.connect:{let{account:es}=ef,eu=new eg(es),eV=new ey(es),eM=new ed.X(es),eL=new eC.Y(es),eb=new em.l(es,eu),ex=new ez.L(es,eb,eL,eV,eu),ew=new eH.u(es,eb,eL,eM,eu);return{...ei,account:es,fileManager:eu,messageManager:eV,sshKeyManager:eM,domainManager:eL,volumeManager:eb,programManager:ex,instanceManager:ew}}case eu.disconnect:return{...ei,account:void 0,fileManager:void 0,messageManager:void 0,sshKeyManager:void 0,domainManager:void 0,volumeManager:void 0,programManager:void 0,instanceManager:void 0};case eu.setAccountBalance:return{...ei,accountBalance:ef.balance};case eu.setAccountFiles:return{...ei,accountFiles:ef.accountFiles};case eu.setAccountSSHKeys:{let es=eA(ef.accountSSHKeys,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.addAccountSSHKey:{let es=eN(ef.accountSSHKey,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.delAccountSSHKey:{let es=eS(ef.id,ei.accountSSHKeys);return{...ei,accountSSHKeys:es}}case eu.setAccountFunctions:{let es=eA(ef.accountFunctions,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.addAccountFunction:{let es=eN(ef.accountFunction,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.delAccountFunction:{let es=eS(ef.id,ei.accountFunctions);return{...ei,accountFunctions:es}}case eu.setAccountVolumes:{let es=eA(ef.accountVolumes,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.addAccountVolume:{let es=eN(ef.accountVolume,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.delAccountVolume:{let es=eS(ef.id,ei.accountVolumes);return{...ei,accountVolumes:es}}case eu.setAccountInstances:{let es=eA(ef.accountInstances,ei.accountInstances);return{...ei,accountInstances:es}}case eu.addAccountInstance:{let es=eN(ef.accountInstance,ei.accountInstances);return{...ei,accountInstances:es}}case eu.delAccountInstance:{let es=eS(ef.id,ei.accountInstances);return{...ei,accountInstances:es}}case eu.setAccountDomains:{let es=eA(ef.accountDomains,ei.accountDomains);return{...ei,accountDomains:es}}case eu.addAccountDomain:{let es=eN(ef.accountDomain,ei.accountDomains);return{...ei,accountDomains:es}}case eu.delAccountDomain:{let es=eS(ef.id,ei.accountDomains);return{...ei,accountDomains:es}}default:return ei}}},34853:function(ei,es,ef){"use strict";ef.d(es,{DI:function(){return ew},Eb:function(){return eV},Fx:function(){return eb},Py:function(){return eI},RK:function(){return ex},WU:function(){return eO},_3:function(){return eN},bs:function(){return eH},eB:function(){return eC},f6:function(){return eM},gE:function(){return eB},lm:function(){return eS},w2:function(){return eT},zN:function(){return ez}});var eu=ef(81287),ed=ef(57492),em=ef(33358);let eH=function(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,ef=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ei.length<=es||ei.length<=ef?ei:"".concat(ei.slice(0,es),"...").concat(ef>0?ei.slice(-ef):"")},ez=ei=>eH(ei,6,4),eV=async ei=>{try{let es=await fetch("https://api2.aleph.im/api/v0/addresses/".concat(ei,"/balance"));if(404===es.status)return 0;let{balance:ef}=await es.json();return ef}catch(ei){throw eu.Z.RequestFailed(ei)}},eM=async ei=>{try{let es=await fetch("https://balance1.api.aleph.cloud/solana/".concat(ei)),{balance:ef}=await es.json();return ef}catch(ei){throw eu.Z.RequestFailed(ei)}},eg={B:1,kB:1e3,MB:1e6,GB:1e9,TB:1e12,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776},eL={B:"B",kB:"kB",MB:"MB",GB:"GB",TB:"TB",KiB:"kB",MiB:"MB",GiB:"GB",TiB:"TB"};function eb(ei,es){let{from:ef="MiB",to:eu="GiB",displayUnit:ed=!1}=es,em=ei*eg[ef]/eg[eu];return ed?"".concat(em.toFixed(2)," ").concat(eL[eu]):em}function ey(ei){let es=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["B","KiB","MiB","GiB","TiB"],ef="B";for(let eu of es){if(ei1&&void 0!==arguments[1]?arguments[1]:"B";if(void 0===ei)return"n/a";if(0===ei)return"-";let ef=eb(ei,{from:es,to:"B"}),eu=ey(ef);return eb(ei,{from:es,to:eu,displayUnit:!0})}let ex=ei=>void 0===ei?"n/a":0===ei?ei:ei<1e3?ei.toFixed(1):ei<1e6?(ei/1e3).toFixed(1)+"K":ei<1e9?(ei/1e6).toFixed(1)+"M":(ei/1e9).toFixed(1)+"B",ew=ei=>{let{item_hash:es,chain:ef,sender:eu,type:ed}=ei;return"https://explorer.aleph.im/address/".concat(ef,"/").concat(eu,"/message/").concat(ed,"/").concat(es)},eN=ei=>{let[es,ef]=new Date(1e3*ei).toISOString().split("T"),[eu]=ef.split(".");return"".concat(es," ").concat(eu)},eS=(ei,es)=>{let ef=document.createElement("a");ef.href=window.URL.createObjectURL(ei),ef.download=es,ef.click()},eA=ei=>ei.type===ed.MessageType.store,e_=ei=>ei.type===ed.MessageType.program,eE=ei=>ei.type===ed.MessageType.instance,eP=ei=>ei.type===ed.MessageType.post;function eB(ei){if(eA(ei))return em.py.Volume;if(e_(ei))return em.py.Program;if(eE(ei))return em.py.Instance;if(eP(ei))return em.py.SSHKey;throw Error("Unknown type")}function eT(ei){return ei.hasOwnProperty("persistence")}function eI(ei){return ei.hasOwnProperty("ephemeral")}class eR{constructor(){this.promise=new Promise((ei,es)=>{this.resolve=ei,this.reject=es})}}class eO{async acquire(){let ei=new eR,es=this.queue;return this.queue=this.queue.then(()=>ei.promise),this.count++,await es,()=>{this.count--,ei.resolve()}}constructor(){this.queue=Promise.resolve(),this.count=0}}},6477:function(ei,es,ef){"use strict";ef.d(es,{$:function(){return ex}});var eu=ef(36470),ed=ef(57492),em=ef(24566),eH=ef(74931),ez=ef(34853),eV=ef(81287);let eM=(ei,es)=>{switch(ei){case ed.Chain.ETH:return(0,em.GetAccountFromProvider)(es);case ed.Chain.SOL:return(0,eH.GetAccountFromProvider)(es);default:throw eV.Z.ChainNotYetSupported}},eg=async ei=>{switch(ei.GetChain()){case ed.Chain.ETH:return(0,ez.Eb)(ei.address);case ed.Chain.SOL:return(0,ez.f6)(ei.address);default:throw eV.Z.ChainNotYetSupported}};var eL=ef(48847),eb=ef(3837),ey=ef(67294),eC=ef(5678);function ex(){let[ei,es]=(0,eu.mr)(),ef=(0,eb.lm)(),[em,eH]=(0,eC.Xs)("keepAccountAlive",!1),ez=(0,ey.useCallback)(ei=>{ef&&ef.add({variant:"error",title:"Error",text:ei})},[ef]),eV=(0,ey.useCallback)(async ei=>{let ef=await eg(ei);es({type:eL.MF.setAccountBalance,payload:{balance:ef}})},[es]),ex=(0,ey.useCallback)(async()=>{let ei;try{ei=await eM(ed.Chain.ETH,null==window?void 0:window.ethereum)}catch(ei){ez("You need an Ethereum wallet to use Aleph.im.")}if(ei)return eH(!0),await Promise.all([eV(ei)]).catch(ei=>{ez(ei.message)}),es({type:eL.MF.connect,payload:{account:ei}}),ei},[eH,eV,es,ez]),ew=(0,ey.useCallback)(async()=>{eH(!1),es({type:eL.MF.disconnect,payload:null})},[es,eH]),{account:eN}=ei,eS=!!(null==eN?void 0:eN.address),eA=(0,ey.useCallback)(async()=>{!eS&&em&&await ex()},[eS,em,ex]);return{connect:ex,disconnect:ew,isConnected:eS,account:eN,tryReconnect:eA}}},27234:function(ei,es,ef){"use strict";ef.r(es),ef.d(es,{default:function(){return cu}});var eu=ef(85893);ef(69416);var ed=ef(23636);ef(53119);var em=ef(19521),eH=ef(3837),ez=ef(67294),eV=ef(87531);let eM=em.ZP.footer.withConfig({displayName:"styles__StyledFooter",componentId:"sc-1l7mq5x-0"})([""," background-color:#00000033;box-sizing:border-box;width:100%;"],{paddingTop:"3rem",paddingBottom:"3rem","@media (min-width: 768px)":{paddingTop:"3rem",paddingBottom:"3rem"}}),eg=(0,em.ZP)(eH.zx).attrs(ei=>({...ei,kind:"neon",variant:"tertiary",color:"main0",size:"big"})).withConfig({displayName:"styles__StyledButton",componentId:"sc-1l7mq5x-1"})(()=>[{marginBottom:"1.5rem !important",display:"block !important",":last-child":{marginBottom:"0px !important"}}]),eL=em.ZP.a.attrs(ei=>({...(0,eH.PT)("tp-nav")(ei),href:ei.href||"#"})).withConfig({displayName:"styles__StyledLink",componentId:"sc-1l7mq5x-2"})(["",""],ei=>{let{theme:es}=ei;return(0,em.iv)(["display:block;cursor:pointer;font-weight:700;white-space:nowrap;color:",";text-decoration:none;&:last-child{margin-bottom:0;}"],es.color.text)}),eb=(0,em.ZP)(eH.JO).attrs(ei=>({...ei,size:"lg"})).withConfig({displayName:"styles__StyledIcon",componentId:"sc-1l7mq5x-3"})(()=>[{marginRight:"0.625rem"}]),ey=(0,em.ZP)(eH.JO).attrs(ei=>({...ei,size:"lg"})).withConfig({displayName:"styles__StyledIcon2",componentId:"sc-1l7mq5x-4"})(()=>[{marginLeft:"0.625rem"}]),eC=ei=>{let{small:es=!1}=ei;return(0,eu.jsx)(eM,{children:(0,eu.jsx)(eV.Z,{children:es?(0,eu.jsxs)(eH.X2,{xs:1,md:2,lg:3,xsGap:"3rem",lgGap:"0",children:[(0,eu.jsx)(eH.JX,{xs:1,md:2,lg:1,children:(0,eu.jsx)(ew,{children:(0,eu.jsx)(eH.TR,{size:28})})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)(eN,{children:[(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://docs.aleph.im",children:["Documentation",(0,eu.jsx)(ey,{name:"external-link-square-alt"})]})}),(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://t.me/alephim",children:["Telegram Developers",(0,eu.jsx)(ey,{name:"external-link-square-alt"})]})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)(eS,{children:[(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://twitter.com/aleph_im",children:[(0,eu.jsx)(eb,{name:"twitter"}),"Twitter"]})}),(0,eu.jsx)("li",{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://medium.com/aleph-im",children:[(0,eu.jsx)(eb,{name:"medium"}),"Medium"]})})]})})]}):(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(eA,{children:(0,eu.jsx)(eH.TR,{size:55})}),(0,eu.jsx)(e_,{children:(0,eu.jsxs)(eH.X2,{xs:1,md:2,lg:4,xsGap:"3rem",mdGap:"1.5rem",children:[(0,eu.jsxs)(eH.JX,{children:[(0,eu.jsx)(eg,{children:"Work with us"}),(0,eu.jsx)(eg,{children:"Try our dApps"}),(0,eu.jsx)(eg,{children:"Start a project"})]}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eE,{children:(0,eu.jsx)(eL,{children:"Solutions"})}),(0,eu.jsx)(eP,{children:(0,eu.jsx)(eL,{children:"Roadmap"})}),(0,eu.jsx)(eB,{children:(0,eu.jsx)(eL,{children:"Indexing"})}),(0,eu.jsx)(eT,{children:(0,eu.jsx)(eL,{children:"Demo's"})}),(0,eu.jsx)(eI,{children:(0,eu.jsx)(eL,{children:"Team"})}),(0,eu.jsx)(eR,{children:(0,eu.jsx)(eL,{children:"Developers"})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eO,{children:(0,eu.jsx)(eL,{children:"Jobs"})}),(0,eu.jsx)(ej,{children:(0,eu.jsx)(eL,{children:"Whitepaper"})}),(0,eu.jsx)(eD,{children:(0,eu.jsx)(eL,{children:"Token"})})]})}),(0,eu.jsx)(eH.JX,{children:(0,eu.jsxs)("ul",{children:[(0,eu.jsx)(eF,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://twitter.com/aleph_im",children:[(0,eu.jsx)(eb,{name:"twitter"}),"Twitter"]})}),(0,eu.jsx)(eU,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://t.me/alephim",children:[(0,eu.jsx)(eb,{name:"telegram"}),"Telegram"]})}),(0,eu.jsx)(eq,{children:(0,eu.jsxs)(eL,{target:"_blank",href:"https://medium.com/aleph-im",children:[(0,eu.jsx)(eb,{name:"medium"}),"Medium"]})})]})})]})})]})})})};var ex=eC,ew=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1m9qt74-0"})({display:"flex",alignItems:"center","@media (min-width: 1024px)":{justifyContent:"flex-start"}}),eN=(0,em.ZP)("ul").withConfig({displayName:"cmp___StyledUl",componentId:"sc-1m9qt74-1"})({display:"flex",flexDirection:"column",gap:"1.5rem","@media (min-width: 768px)":{flexDirection:"row",alignItems:"center"},"@media (min-width: 1024px)":{justifyContent:"center"}}),eS=(0,em.ZP)("ul").withConfig({displayName:"cmp___StyledUl2",componentId:"sc-1m9qt74-2"})({display:"flex",alignItems:"center",gap:"1.5rem","@media (min-width: 768px)":{justifyContent:"flex-end"}}),eA=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1m9qt74-3"})({marginBottom:"3rem"}),e_=(0,em.ZP)("nav").withConfig({displayName:"cmp___StyledNav",componentId:"sc-1m9qt74-4"})({margin:"0px"}),eE=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi",componentId:"sc-1m9qt74-5"})({marginBottom:"1.5rem"}),eP=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi2",componentId:"sc-1m9qt74-6"})({marginBottom:"1.5rem"}),eB=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi3",componentId:"sc-1m9qt74-7"})({marginBottom:"1.5rem"}),eT=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi4",componentId:"sc-1m9qt74-8"})({marginBottom:"1.5rem"}),eI=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi5",componentId:"sc-1m9qt74-9"})({marginBottom:"1.5rem"}),eR=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi6",componentId:"sc-1m9qt74-10"})({marginBottom:"0px"}),eO=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi7",componentId:"sc-1m9qt74-11"})({marginBottom:"1.5rem"}),ej=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi8",componentId:"sc-1m9qt74-12"})({marginBottom:"1.5rem"}),eD=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi9",componentId:"sc-1m9qt74-13"})({marginBottom:"0px"}),eF=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi10",componentId:"sc-1m9qt74-14"})({marginBottom:"1.5rem"}),eU=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi11",componentId:"sc-1m9qt74-15"})({marginBottom:"1.5rem"}),eq=(0,em.ZP)("li").withConfig({displayName:"cmp___StyledLi12",componentId:"sc-1m9qt74-16"})({marginBottom:"0px"});let eZ=(0,em.vJ)([" body,#__next{display:flex;flex-direction:column;min-height:100vh;}.unavailable-content{opacity:0.3;filter:grayscale(1);pointer-events:none;}textarea{width:100%;background:linear-gradient(to bottom,#FFFFFF33,transparent);border-radius:5px;padding:5px;border:1px solid #FFFFFF33;color:inherit;}table{max-width:100%;overflow:auto;}"]);var eG=ef(41664),eW=ef.n(eG);let eK=em.ZP.header.withConfig({displayName:"styles__StyledHeader",componentId:"sc-1uc7qj0-0"})(["font-size:inherit;line-height:inherit;box-sizing:border-box;width:100%;margin:0;position:sticky;top:0;z-index:10;"]),e$=(0,em.ZP)(eH.wp).withConfig({displayName:"styles__StyledNavbar",componentId:"sc-1uc7qj0-1"})(["position:relative;"]),eJ=(0,em.ZP)(eH.zx).attrs(ei=>({...ei,color:"main0",kind:"neon",size:"regular",variant:"tertiary"})).withConfig({displayName:"styles__StyledButton",componentId:"sc-1uc7qj0-2"})(["display:block;&:last-child{margin-bottom:0;}"]);var eY=ef(34853),eX=ef(11163),eQ=ef(36470),e1=ef(6477),e2=ef(5678);function e4(){let{connect:ei,disconnect:es,isConnected:ef,account:eu}=(0,e1.$)(),ed=(0,em.Fg)(),[eH]=(0,eQ.mr)(),eV=(0,eX.useRouter)(),[eM,eg]=(0,e2.Xs)("keepAccountAlive",!1);(0,ez.useEffect)(()=>{(async()=>{!eu&&eM&&eC()})()},[eu,eM]);let eL=ei=>eV.pathname===ei,{accountBalance:eb}=eH,ey=(0,ez.useCallback)(async()=>{if(ef)eg(!1),await es(),eV.push("/");else{eg(!0);let es=await ei();if(!es)return;eV.push("/dashboard")}ew(!1)},[ei,es,ef,eV]),eC=(0,ez.useCallback)(async()=>{if(ef)await es();else{let es=await ei();if(!es)return}},[ei,es,ef,eu]),[ex,ew]=(0,ez.useState)(!1);return{theme:ed,handleConnect:ey,account:eu,isOnPath:eL,displayWalletPicker:ex,setDisplayWalletPicker:ew,accountBalance:eb}}let e3=()=>{let{theme:ei,handleConnect:es,account:ef,isOnPath:ed,displayWalletPicker:em,setDisplayWalletPicker:eV,accountBalance:eM}=e4(),eg=(0,ez.useRef)(null);(0,e2.t$)(eg,()=>{em&&eV(!1)});let eL=()=>{eV(!em)};return(0,eu.jsx)(eK,{children:(0,eu.jsxs)(e$,{logo:(0,eu.jsx)(eW(),{href:"/",children:(0,eu.jsx)(eH.TR,{})}),mobileTopContent:ef?(0,eu.jsx)(eH.zx,{variant:"secondary",color:"main1",kind:"neon",size:"regular",children:(0,eu.jsx)(eH.JO,{name:"meteor",size:"md",color:ei.color.main1})}):(0,eu.jsx)(eJ,{onClick:es,children:(0,eu.jsx)(eH.JO,{name:"meteor",size:"md",color:ei.color.main0})}),children:[(0,eu.jsxs)(eH.o8,{withSlash:!0,children:[(0,eu.jsx)(eH.iV,{isActive:ed("/"),children:(0,eu.jsx)(eW(),{href:"/",children:"Solutions"},"solutions")}),(0,eu.jsx)(eH.iV,{isActive:ed("/dashboard"),children:(0,eu.jsx)(eW(),{href:"/dashboard",children:"Dashboard"},"dashboard")})]}),(0,eu.jsxs)(eH.o8,{onlyDesktop:!0,children:[(0,eu.jsx)(eH.iV,{children:(0,eu.jsx)(eJ,{forwardedAs:"button",disabled:!0,children:(0,eu.jsx)(eH.JO,{name:"ethereum"})},"link")}),(0,eu.jsx)(e0,{children:(0,eu.jsxs)(eH.iV,{children:[ef?(0,eu.jsxs)(eH.zx,{as:"button",variant:"secondary",color:"main1",kind:"neon",size:"regular",onClick:eL,children:[(0,eY.zN)(ef.address)," ",(0,eu.jsx)(e8,{name:"meteor",size:"lg",color:ei.color.main1})]}):(0,eu.jsxs)(eH.zx,{as:"button",variant:"tertiary",color:"main0",kind:"neon",size:"regular",onClick:eL,children:["Connect"," ",(0,eu.jsx)(e5,{name:"meteor",size:"lg",color:ei.color.main0})]}),(0,eu.jsx)(e7,{ref:eg,children:em&&(0,eu.jsx)(eH.nd,{networks:[{icon:"ethereum",name:"Ethereum",wallets:[{color:"orange",icon:"circle",name:"Metamask",provider:()=>window.ethereum}]}],onConnect:es,onDisconnect:es,address:null==ef?void 0:ef.address,addressHref:"https://etherscan.io/address/".concat(null==ef?void 0:ef.address),balance:eM,size:"regular"})})]})})]})]})})};var e6=e3,e0=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-m0h8p1-0"})({position:"relative"}),e8=(0,em.ZP)(eH.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-m0h8p1-1"})({marginLeft:"0.625rem"}),e5=(0,em.ZP)(eH.JO).withConfig({displayName:"cmp___StyledIcon2",componentId:"sc-m0h8p1-2"})({marginLeft:"0.625rem"}),e7=(0,em.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-m0h8p1-3"})({position:"absolute",right:"0px",marginTop:"2.5rem"});function e9(ei){let{children:es}=ei,[ef,ed]=(0,ez.useState)(!0);return(0,ez.useEffect)(()=>ed(!1),[]),ef?(0,eu.jsx)(eu.Fragment,{children:es}):(0,eu.jsx)(eH.P_,{max:10,timeout:2e3,children:es})}var cc=ef(36001),ci=ef(33358);let co=em.ZP.main.withConfig({displayName:"styles__StyledMain",componentId:"sc-4lx0v5-0"})(["",""],{display:"flex",flex:"1 1 0%",flexDirection:"column"}),cs=ei=>{let{children:es}=ei;return(0,eu.jsx)(co,{children:es})};var cf=cs;function cu(ei){let{Component:es,pageProps:ef}=ei,ed=(0,eX.useRouter)(),ez="/dashboard/manage"!==ed.pathname;return(0,eu.jsxs)(em.f6,{theme:eH.np.dark,children:[(0,eu.jsx)(eH.nz,{}),(0,eu.jsx)(eZ,{}),(0,eu.jsx)(eQ.WE,{children:(0,eu.jsxs)(e9,{children:[(0,eu.jsx)(e6,{}),(0,eu.jsxs)(cf,{children:[ez&&(0,eu.jsx)(cc.Z,{names:ci.sv}),(0,eu.jsx)(es,{...ef})]}),(0,eu.jsx)(ex,{small:!0})]})})]})}ed.vc.autoAddCss=!1},81516:function(ei,es){"use strict";function ef(ei,es,ef,eu){return!1}Object.defineProperty(es,"__esModule",{value:!0}),es.getDomainLocale=ef,("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},95569:function(ei,es,ef){"use strict";Object.defineProperty(es,"__esModule",{value:!0}),es.default=void 0;var eu=ef(92648).Z,ed=ef(17273).Z,em=eu(ef(67294)),eH=ef(14532),ez=ef(83353),eV=ef(61410),eM=ef(79064),eg=ef(370),eL=ef(69955),eb=ef(24224),ey=ef(80508),eC=ef(81516),ex=ef(64266);let ew=new Set;function eN(ei,es,ef,eu,ed){if(ed||ez.isLocalURL(es)){if(!eu.bypassPrefetchedCheck){let ed=void 0!==eu.locale?eu.locale:"locale"in ei?ei.locale:void 0,em=es+"%"+ef+"%"+ed;if(ew.has(em))return;ew.add(em)}Promise.resolve(ei.prefetch(es,ef,eu)).catch(ei=>{})}}function eS(ei){let es=ei.currentTarget,ef=es.getAttribute("target");return ef&&"_self"!==ef||ei.metaKey||ei.ctrlKey||ei.shiftKey||ei.altKey||ei.nativeEvent&&2===ei.nativeEvent.which}function eA(ei,es,ef,eu,ed,eH,eV,eM,eg,eL){let{nodeName:eb}=ei.currentTarget,ey="A"===eb.toUpperCase();if(ey&&(eS(ei)||!eg&&!ez.isLocalURL(ef)))return;ei.preventDefault();let eC=()=>{"beforePopState"in es?es[ed?"replace":"push"](ef,eu,{shallow:eH,locale:eM,scroll:eV}):es[ed?"replace":"push"](eu||ef,{forceOptimisticNavigation:!eL})};eg?em.default.startTransition(eC):eC()}function e_(ei){return"string"==typeof ei?ei:eV.formatUrl(ei)}let eE=em.default.forwardRef(function(ei,es){let ef,eu;let{href:ez,as:eV,children:ew,prefetch:eS,passHref:eE,replace:eP,shallow:eB,scroll:eT,locale:eI,onClick:eR,onMouseEnter:eO,onTouchStart:ej,legacyBehavior:eD=!1}=ei,eF=ed(ei,["href","as","children","prefetch","passHref","replace","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);ef=ew,eD&&("string"==typeof ef||"number"==typeof ef)&&(ef=em.default.createElement("a",null,ef));let eU=!1!==eS,eq=em.default.useContext(eL.RouterContext),eZ=em.default.useContext(eb.AppRouterContext),eG=null!=eq?eq:eZ,eW=!eq,{href:eK,as:e$}=em.default.useMemo(()=>{if(!eq){let ei=e_(ez);return{href:ei,as:eV?e_(eV):ei}}let[ei,es]=eH.resolveHref(eq,ez,!0);return{href:ei,as:eV?eH.resolveHref(eq,eV):es||ei}},[eq,ez,eV]),eJ=em.default.useRef(eK),eY=em.default.useRef(e$);eD&&(eu=em.default.Children.only(ef));let eX=eD?eu&&"object"==typeof eu&&eu.ref:es,[eQ,e1,e2]=ey.useIntersection({rootMargin:"200px"}),e4=em.default.useCallback(ei=>{(eY.current!==e$||eJ.current!==eK)&&(e2(),eY.current=e$,eJ.current=eK),eQ(ei),eX&&("function"==typeof eX?eX(ei):"object"==typeof eX&&(eX.current=ei))},[e$,eX,eK,e2,eQ]);em.default.useEffect(()=>{eG&&e1&&eU&&eN(eG,eK,e$,{locale:eI},eW)},[e$,eK,e1,eI,eU,null==eq?void 0:eq.locale,eG,eW]);let e3={ref:e4,onClick(ei){eD||"function"!=typeof eR||eR(ei),eD&&eu.props&&"function"==typeof eu.props.onClick&&eu.props.onClick(ei),eG&&!ei.defaultPrevented&&eA(ei,eG,eK,e$,eP,eB,eT,eI,eW,eU)},onMouseEnter(ei){eD||"function"!=typeof eO||eO(ei),eD&&eu.props&&"function"==typeof eu.props.onMouseEnter&&eu.props.onMouseEnter(ei),eG&&(eU||!eW)&&eN(eG,eK,e$,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},eW)},onTouchStart(ei){eD||"function"!=typeof ej||ej(ei),eD&&eu.props&&"function"==typeof eu.props.onTouchStart&&eu.props.onTouchStart(ei),eG&&(eU||!eW)&&eN(eG,eK,e$,{locale:eI,priority:!0,bypassPrefetchedCheck:!0},eW)}};if(eM.isAbsoluteUrl(e$))e3.href=e$;else if(!eD||eE||"a"===eu.type&&!("href"in eu.props)){let ei=void 0!==eI?eI:null==eq?void 0:eq.locale,es=(null==eq?void 0:eq.isLocaleDomain)&&eC.getDomainLocale(e$,ei,null==eq?void 0:eq.locales,null==eq?void 0:eq.domainLocales);e3.href=es||ex.addBasePath(eg.addLocale(e$,ei,null==eq?void 0:eq.defaultLocale))}return eD?em.default.cloneElement(eu,e3):em.default.createElement("a",Object.assign({},eF,e3),ef)});var eP=eE;es.default=eP,("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},80508:function(ei,es,ef){"use strict";Object.defineProperty(es,"__esModule",{value:!0}),es.useIntersection=eg;var eu=ef(67294),ed=ef(10029);let em="function"==typeof IntersectionObserver,eH=new Map,ez=[];function eV(ei){let es;let ef={root:ei.root||null,margin:ei.rootMargin||""},eu=ez.find(ei=>ei.root===ef.root&&ei.margin===ef.margin);if(eu&&(es=eH.get(eu)))return es;let ed=new Map,em=new IntersectionObserver(ei=>{ei.forEach(ei=>{let es=ed.get(ei.target),ef=ei.isIntersecting||ei.intersectionRatio>0;es&&ef&&es(ef)})},ei);return es={id:ef,observer:em,elements:ed},ez.push(ef),eH.set(ef,es),es}function eM(ei,es,ef){let{id:eu,observer:ed,elements:em}=eV(ef);return em.set(ei,es),ed.observe(ei),function(){if(em.delete(ei),ed.unobserve(ei),0===em.size){ed.disconnect(),eH.delete(eu);let ei=ez.findIndex(ei=>ei.root===eu.root&&ei.margin===eu.margin);ei>-1&&ez.splice(ei,1)}}}function eg(ei){let{rootRef:es,rootMargin:ef,disabled:eH}=ei,ez=eH||!em,[eV,eg]=eu.useState(!1),eL=eu.useRef(null),eb=eu.useCallback(ei=>{eL.current=ei},[]);eu.useEffect(()=>{if(em){if(ez||eV)return;let ei=eL.current;if(ei&&ei.tagName){let eu=eM(ei,ei=>ei&&eg(ei),{root:null==es?void 0:es.current,rootMargin:ef});return eu}}else if(!eV){let ei=ed.requestIdleCallback(()=>eg(!0));return()=>ed.cancelIdleCallback(ei)}},[ez,ef,es,eV,eL.current]);let ey=eu.useCallback(()=>{eg(!1)},[]);return[eb,eV,ey]}("function"==typeof es.default||"object"==typeof es.default&&null!==es.default)&&void 0===es.default.__esModule&&(Object.defineProperty(es.default,"__esModule",{value:!0}),Object.assign(es.default,es),ei.exports=es.default)},42474:function(ei,es,ef){var eu="/",ed=ef(48764).Buffer,em=ef(83454);!function(){var es={7160:function(ei,es,ef){var eu=es;eu.bignum=ef(711),eu.define=ef(495).define,eu.base=ef(853),eu.constants=ef(7335),eu.decoders=ef(6701),eu.encoders=ef(3418)},495:function(ei,es,ef){var eu=ef(7160),ed=ef(3782);function em(ei,es){this.name=ei,this.body=es,this.decoders={},this.encoders={}}es.define=function(ei,es){return new em(ei,es)},em.prototype._createNamed=function(ei){var es;try{es=ef(6144).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(ei){es=function(ei){this._initNamed(ei)}}return ed(es,ei),es.prototype._initNamed=function(es){ei.call(this,es)},new es(this)},em.prototype._getDecoder=function(ei){return ei=ei||"der",this.decoders.hasOwnProperty(ei)||(this.decoders[ei]=this._createNamed(eu.decoders[ei])),this.decoders[ei]},em.prototype.decode=function(ei,es,ef){return this._getDecoder(es).decode(ei,ef)},em.prototype._getEncoder=function(ei){return ei=ei||"der",this.encoders.hasOwnProperty(ei)||(this.encoders[ei]=this._createNamed(eu.encoders[ei])),this.encoders[ei]},em.prototype.encode=function(ei,es,ef){return this._getEncoder(es).encode(ei,ef)}},6483:function(ei,es,ef){var eu=ef(3782),ed=ef(853).Reporter,em=ef(4300).Buffer;function eH(ei,es){if(ed.call(this,es),!em.isBuffer(ei)){this.error("Input not Buffer");return}this.base=ei,this.offset=0,this.length=ei.length}function ez(ei,es){if(Array.isArray(ei))this.length=0,this.value=ei.map(function(ei){return ei instanceof ez||(ei=new ez(ei,es)),this.length+=ei.length,ei},this);else if("number"==typeof ei){if(!(0<=ei&&ei<=255))return es.error("non-byte EncoderBuffer value");this.value=ei,this.length=1}else if("string"==typeof ei)this.value=ei,this.length=em.byteLength(ei);else{if(!em.isBuffer(ei))return es.error("Unsupported type: "+typeof ei);this.value=ei,this.length=ei.length}}eu(eH,ed),es.C=eH,eH.prototype.save=function(){return{offset:this.offset,reporter:ed.prototype.save.call(this)}},eH.prototype.restore=function(ei){var es=new eH(this.base);return es.offset=ei.offset,es.length=this.offset,this.offset=ei.offset,ed.prototype.restore.call(this,ei.reporter),es},eH.prototype.isEmpty=function(){return this.offset===this.length},eH.prototype.readUInt8=function(ei){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(ei||"DecoderBuffer overrun")},eH.prototype.skip=function(ei,es){if(!(this.offset+ei<=this.length))return this.error(es||"DecoderBuffer overrun");var ef=new eH(this.base);return ef._reporterState=this._reporterState,ef.offset=this.offset,ef.length=this.offset+ei,this.offset+=ei,ef},eH.prototype.raw=function(ei){return this.base.slice(ei?ei.offset:this.offset,this.length)},es.R=ez,ez.prototype.join=function(ei,es){return ei||(ei=new em(this.length)),es||(es=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(ef){ef.join(ei,es),es+=ef.length}):("number"==typeof this.value?ei[es]=this.value:"string"==typeof this.value?ei.write(this.value,es):em.isBuffer(this.value)&&this.value.copy(ei,es),es+=this.length)),ei}},853:function(ei,es,ef){var eu=es;eu.Reporter=ef(1293).b,eu.DecoderBuffer=ef(6483).C,eu.EncoderBuffer=ef(6483).R,eu.Node=ef(9374)},9374:function(ei,es,ef){var eu=ef(853).Reporter,ed=ef(853).EncoderBuffer,em=ef(853).DecoderBuffer,eH=ef(3523),ez=["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"],eV=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(ez),eM=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function eg(ei,es){var ef={};this._baseState=ef,ef.enc=ei,ef.parent=es||null,ef.children=null,ef.tag=null,ef.args=null,ef.reverseArgs=null,ef.choice=null,ef.optional=!1,ef.any=!1,ef.obj=!1,ef.use=null,ef.useDecoder=null,ef.key=null,ef.default=null,ef.explicit=null,ef.implicit=null,ef.contains=null,ef.parent||(ef.children=[],this._wrap())}ei.exports=eg;var eL=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];eg.prototype.clone=function(){var ei=this._baseState,es={};eL.forEach(function(ef){es[ef]=ei[ef]});var ef=new this.constructor(es.parent);return ef._baseState=es,ef},eg.prototype._wrap=function(){var ei=this._baseState;eV.forEach(function(es){this[es]=function(){var ef=new this.constructor(this);return ei.children.push(ef),ef[es].apply(ef,arguments)}},this)},eg.prototype._init=function(ei){var es=this._baseState;eH(null===es.parent),ei.call(this),es.children=es.children.filter(function(ei){return ei._baseState.parent===this},this),eH.equal(es.children.length,1,"Root node can have only one child")},eg.prototype._useArgs=function(ei){var es=this._baseState,ef=ei.filter(function(ei){return ei instanceof this.constructor},this);ei=ei.filter(function(ei){return!(ei instanceof this.constructor)},this),0!==ef.length&&(eH(null===es.children),es.children=ef,ef.forEach(function(ei){ei._baseState.parent=this},this)),0!==ei.length&&(eH(null===es.args),es.args=ei,es.reverseArgs=ei.map(function(ei){if("object"!=typeof ei||ei.constructor!==Object)return ei;var es={};return Object.keys(ei).forEach(function(ef){ef==(0|ef)&&(ef|=0),es[ei[ef]]=ef}),es}))},eM.forEach(function(ei){eg.prototype[ei]=function(){throw Error(ei+" not implemented for encoding: "+this._baseState.enc)}}),ez.forEach(function(ei){eg.prototype[ei]=function(){var es=this._baseState,ef=Array.prototype.slice.call(arguments);return eH(null===es.tag),es.tag=ei,this._useArgs(ef),this}}),eg.prototype.use=function(ei){eH(ei);var es=this._baseState;return eH(null===es.use),es.use=ei,this},eg.prototype.optional=function(){return this._baseState.optional=!0,this},eg.prototype.def=function(ei){var es=this._baseState;return eH(null===es.default),es.default=ei,es.optional=!0,this},eg.prototype.explicit=function(ei){var es=this._baseState;return eH(null===es.explicit&&null===es.implicit),es.explicit=ei,this},eg.prototype.implicit=function(ei){var es=this._baseState;return eH(null===es.explicit&&null===es.implicit),es.implicit=ei,this},eg.prototype.obj=function(){var ei=this._baseState,es=Array.prototype.slice.call(arguments);return ei.obj=!0,0!==es.length&&this._useArgs(es),this},eg.prototype.key=function(ei){var es=this._baseState;return eH(null===es.key),es.key=ei,this},eg.prototype.any=function(){return this._baseState.any=!0,this},eg.prototype.choice=function(ei){var es=this._baseState;return eH(null===es.choice),es.choice=ei,this._useArgs(Object.keys(ei).map(function(es){return ei[es]})),this},eg.prototype.contains=function(ei){var es=this._baseState;return eH(null===es.use),es.contains=ei,this},eg.prototype._decode=function(ei,es){var ef,eu=this._baseState;if(null===eu.parent)return ei.wrapResult(eu.children[0]._decode(ei,es));var ed=eu.default,eH=!0,ez=null;if(null!==eu.key&&(ez=ei.enterKey(eu.key)),eu.optional){var eV=null;if(null!==eu.explicit?eV=eu.explicit:null!==eu.implicit?eV=eu.implicit:null!==eu.tag&&(eV=eu.tag),null!==eV||eu.any){if(eH=this._peekTag(ei,eV,eu.any),ei.isError(eH))return eH}else{var eM=ei.save();try{null===eu.choice?this._decodeGeneric(eu.tag,ei,es):this._decodeChoice(ei,es),eH=!0}catch(ei){eH=!1}ei.restore(eM)}}if(eu.obj&&eH&&(ef=ei.enterObject()),eH){if(null!==eu.explicit){var eg=this._decodeTag(ei,eu.explicit);if(ei.isError(eg))return eg;ei=eg}var eL=ei.offset;if(null===eu.use&&null===eu.choice){if(eu.any)var eM=ei.save();var eb=this._decodeTag(ei,null!==eu.implicit?eu.implicit:eu.tag,eu.any);if(ei.isError(eb))return eb;eu.any?ed=ei.raw(eM):ei=eb}if(es&&es.track&&null!==eu.tag&&es.track(ei.path(),eL,ei.length,"tagged"),es&&es.track&&null!==eu.tag&&es.track(ei.path(),ei.offset,ei.length,"content"),eu.any||(ed=null===eu.choice?this._decodeGeneric(eu.tag,ei,es):this._decodeChoice(ei,es)),ei.isError(ed))return ed;if(eu.any||null!==eu.choice||null===eu.children||eu.children.forEach(function(ef){ef._decode(ei,es)}),eu.contains&&("octstr"===eu.tag||"bitstr"===eu.tag)){var ey=new em(ed);ed=this._getUse(eu.contains,ei._reporterState.obj)._decode(ey,es)}}return eu.obj&&eH&&(ed=ei.leaveObject(ef)),null!==eu.key&&(null!==ed||!0===eH)?ei.leaveKey(ez,eu.key,ed):null!==ez&&ei.exitKey(ez),ed},eg.prototype._decodeGeneric=function(ei,es,ef){var eu=this._baseState;if("seq"===ei||"set"===ei)return null;if("seqof"===ei||"setof"===ei)return this._decodeList(es,ei,eu.args[0],ef);if(/str$/.test(ei))return this._decodeStr(es,ei,ef);if("objid"===ei&&eu.args)return this._decodeObjid(es,eu.args[0],eu.args[1],ef);if("objid"===ei)return this._decodeObjid(es,null,null,ef);if("gentime"===ei||"utctime"===ei)return this._decodeTime(es,ei,ef);if("null_"===ei)return this._decodeNull(es,ef);if("bool"===ei)return this._decodeBool(es,ef);else if("objDesc"===ei)return this._decodeStr(es,ei,ef);else if("int"===ei||"enum"===ei)return this._decodeInt(es,eu.args&&eu.args[0],ef);return null!==eu.use?this._getUse(eu.use,es._reporterState.obj)._decode(es,ef):es.error("unknown tag: "+ei)},eg.prototype._getUse=function(ei,es){var ef=this._baseState;return ef.useDecoder=this._use(ei,es),eH(null===ef.useDecoder._baseState.parent),ef.useDecoder=ef.useDecoder._baseState.children[0],ef.implicit!==ef.useDecoder._baseState.implicit&&(ef.useDecoder=ef.useDecoder.clone(),ef.useDecoder._baseState.implicit=ef.implicit),ef.useDecoder},eg.prototype._decodeChoice=function(ei,es){var ef=this._baseState,eu=null,ed=!1;return(Object.keys(ef.choice).some(function(em){var eH=ei.save(),ez=ef.choice[em];try{var eV=ez._decode(ei,es);if(ei.isError(eV))return!1;eu={type:em,value:eV},ed=!0}catch(es){return ei.restore(eH),!1}return!0},this),ed)?eu:ei.error("Choice not matched")},eg.prototype._createEncoderBuffer=function(ei){return new ed(ei,this.reporter)},eg.prototype._encode=function(ei,es,ef){var eu=this._baseState;if(null===eu.default||eu.default!==ei){var ed=this._encodeValue(ei,es,ef);if(void 0!==ed&&!this._skipDefault(ed,es,ef))return ed}},eg.prototype._encodeValue=function(ei,es,ef){var ed,em=this._baseState;if(null===em.parent)return em.children[0]._encode(ei,es||new eu);var ed=null;if(this.reporter=es,em.optional&&void 0===ei){if(null===em.default)return;ei=em.default}var eH=null,ez=!1;if(em.any)ed=this._createEncoderBuffer(ei);else if(em.choice)ed=this._encodeChoice(ei,es);else if(em.contains)eH=this._getUse(em.contains,ef)._encode(ei,es),ez=!0;else if(em.children)eH=em.children.map(function(ef){if("null_"===ef._baseState.tag)return ef._encode(null,es,ei);if(null===ef._baseState.key)return es.error("Child should have a key");var eu=es.enterKey(ef._baseState.key);if("object"!=typeof ei)return es.error("Child expected, but input is not object");var ed=ef._encode(ei[ef._baseState.key],es,ei);return es.leaveKey(eu),ed},this).filter(function(ei){return ei}),eH=this._createEncoderBuffer(eH);else if("seqof"===em.tag||"setof"===em.tag){if(!(em.args&&1===em.args.length))return es.error("Too many args for : "+em.tag);if(!Array.isArray(ei))return es.error("seqof/setof, but data is not Array");var eV=this.clone();eV._baseState.implicit=null,eH=this._createEncoderBuffer(ei.map(function(ef){var eu=this._baseState;return this._getUse(eu.args[0],ei)._encode(ef,es)},eV))}else null!==em.use?ed=this._getUse(em.use,ef)._encode(ei,es):(eH=this._encodePrimitive(em.tag,ei),ez=!0);if(!em.any&&null===em.choice){var eM=null!==em.implicit?em.implicit:em.tag,eg=null===em.implicit?"universal":"context";null===eM?null===em.use&&es.error("Tag could be omitted only for .use()"):null===em.use&&(ed=this._encodeComposite(eM,ez,eg,eH))}return null!==em.explicit&&(ed=this._encodeComposite(em.explicit,!1,"context",ed)),ed},eg.prototype._encodeChoice=function(ei,es){var ef=this._baseState,eu=ef.choice[ei.type];return eu||eH(!1,ei.type+" not found in "+JSON.stringify(Object.keys(ef.choice))),eu._encode(ei.value,es)},eg.prototype._encodePrimitive=function(ei,es){var ef=this._baseState;if(/str$/.test(ei))return this._encodeStr(es,ei);if("objid"===ei&&ef.args)return this._encodeObjid(es,ef.reverseArgs[0],ef.args[1]);if("objid"===ei)return this._encodeObjid(es,null,null);if("gentime"===ei||"utctime"===ei)return this._encodeTime(es,ei);if("null_"===ei)return this._encodeNull();if("int"===ei||"enum"===ei)return this._encodeInt(es,ef.args&&ef.reverseArgs[0]);if("bool"===ei)return this._encodeBool(es);else if("objDesc"===ei)return this._encodeStr(es,ei);else throw Error("Unsupported tag: "+ei)},eg.prototype._isNumstr=function(ei){return/^[0-9 ]*$/.test(ei)},eg.prototype._isPrintstr=function(ei){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(ei)}},1293:function(ei,es,ef){var eu=ef(3782);function ed(ei){this._reporterState={obj:null,path:[],options:ei||{},errors:[]}}function em(ei,es){this.path=ei,this.rethrow(es)}es.b=ed,ed.prototype.isError=function(ei){return ei instanceof em},ed.prototype.save=function(){var ei=this._reporterState;return{obj:ei.obj,pathLen:ei.path.length}},ed.prototype.restore=function(ei){var es=this._reporterState;es.obj=ei.obj,es.path=es.path.slice(0,ei.pathLen)},ed.prototype.enterKey=function(ei){return this._reporterState.path.push(ei)},ed.prototype.exitKey=function(ei){var es=this._reporterState;es.path=es.path.slice(0,ei-1)},ed.prototype.leaveKey=function(ei,es,ef){var eu=this._reporterState;this.exitKey(ei),null!==eu.obj&&(eu.obj[es]=ef)},ed.prototype.path=function(){return this._reporterState.path.join("/")},ed.prototype.enterObject=function(){var ei=this._reporterState,es=ei.obj;return ei.obj={},es},ed.prototype.leaveObject=function(ei){var es=this._reporterState,ef=es.obj;return es.obj=ei,ef},ed.prototype.error=function(ei){var es,ef=this._reporterState,eu=ei instanceof em;if(es=eu?ei:new em(ef.path.map(function(ei){return"["+JSON.stringify(ei)+"]"}).join(""),ei.message||ei,ei.stack),!ef.options.partial)throw es;return eu||ef.errors.push(es),es},ed.prototype.wrapResult=function(ei){var es=this._reporterState;return es.options.partial?{result:this.isError(ei)?null:ei,errors:es.errors}:ei},eu(em,Error),em.prototype.rethrow=function(ei){if(this.message=ei+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,em),!this.stack)try{throw Error(this.message)}catch(ei){this.stack=ei.stack}return this}},9791:function(ei,es,ef){var eu=ef(7335);es.tagClass={0:"universal",1:"application",2:"context",3:"private"},es.tagClassByName=eu._reverse(es.tagClass),es.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"},es.tagByName=eu._reverse(es.tag)},7335:function(ei,es,ef){var eu=es;eu._reverse=function(ei){var es={};return Object.keys(ei).forEach(function(ef){(0|ef)==ef&&(ef|=0),es[ei[ef]]=ef}),es},eu.der=ef(9791)},2259:function(ei,es,ef){var eu=ef(3782),ed=ef(7160),em=ed.base,eH=ed.bignum,ez=ed.constants.der;function eV(ei){this.enc="der",this.name=ei.name,this.entity=ei,this.tree=new eM,this.tree._init(ei.body)}function eM(ei){em.Node.call(this,"der",ei)}function eg(ei,es){var ef=ei.readUInt8(es);if(ei.isError(ef))return ef;var eu=ez.tagClass[ef>>6],ed=(32&ef)==0;if((31&ef)==31){var em=ef;for(ef=0;(128&em)==128;){if(em=ei.readUInt8(es),ei.isError(em))return em;ef<<=7,ef|=127&em}}else ef&=31;var eH=ez.tag[ef];return{cls:eu,primitive:ed,tag:ef,tagStr:eH}}function eL(ei,es,ef){var eu=ei.readUInt8(ef);if(ei.isError(eu))return eu;if(!es&&128===eu)return null;if((128&eu)==0)return eu;var ed=127&eu;if(ed>4)return ei.error("length octect is too long");eu=0;for(var em=0;em=31?eu.error("Multi-octet tag encoding unsupported"):(es||(ed|=32),ed|=ez.tagClassByName[ef||"universal"]<<6)}ei.exports=eV,eV.prototype.encode=function(ei,es){return this.tree._encode(ei,es).join()},eu(eM,eH.Node),eM.prototype._encodeComposite=function(ei,es,ef,eu){var em=eL(ei,es,ef,this.reporter);if(eu.length<128){var eH=new ed(2);return eH[0]=em,eH[1]=eu.length,this._createEncoderBuffer([eH,eu])}for(var ez=1,eV=eu.length;eV>=256;eV>>=8)ez++;var eH=new ed(2+ez);eH[0]=em,eH[1]=128|ez;for(var eV=1+ez,eM=eu.length;eM>0;eV--,eM>>=8)eH[eV]=255&eM;return this._createEncoderBuffer([eH,eu])},eM.prototype._encodeStr=function(ei,es){if("bitstr"===es)return this._createEncoderBuffer([0|ei.unused,ei.data]);if("bmpstr"===es){for(var ef=new ed(2*ei.length),eu=0;eu=40)return this.reporter.error("Second objid identifier OOB");ei.splice(0,2,40*ei[0]+ei[1])}for(var em=0,eu=0;eu=128;eH>>=7)em++}for(var ez=new ed(em),eV=ez.length-1,eu=ei.length-1;eu>=0;eu--){var eH=ei[eu];for(ez[eV--]=127&eH;(eH>>=7)>0;)ez[eV--]=128|127&eH}return this._createEncoderBuffer(ez)},eM.prototype._encodeTime=function(ei,es){var ef,eu=new Date(ei);return"gentime"===es?ef=[eg(eu.getFullYear()),eg(eu.getUTCMonth()+1),eg(eu.getUTCDate()),eg(eu.getUTCHours()),eg(eu.getUTCMinutes()),eg(eu.getUTCSeconds()),"Z"].join(""):"utctime"===es?ef=[eg(eu.getFullYear()%100),eg(eu.getUTCMonth()+1),eg(eu.getUTCDate()),eg(eu.getUTCHours()),eg(eu.getUTCMinutes()),eg(eu.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+es+" time is not supported yet"),this._encodeStr(ef,"octstr")},eM.prototype._encodeNull=function(){return this._createEncoderBuffer("")},eM.prototype._encodeInt=function(ei,es){if("string"==typeof ei){if(!es)return this.reporter.error("String int or enum given, but no values map");if(!es.hasOwnProperty(ei))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(ei));ei=es[ei]}if("number"!=typeof ei&&!ed.isBuffer(ei)){var ef=ei.toArray();!ei.sign&&128&ef[0]&&ef.unshift(0),ei=new ed(ef)}if(ed.isBuffer(ei)){var eu=ei.length;0===ei.length&&eu++;var em=new ed(eu);return ei.copy(em),0===ei.length&&(em[0]=0),this._createEncoderBuffer(em)}if(ei<128)return this._createEncoderBuffer(ei);if(ei<256)return this._createEncoderBuffer([0,ei]);for(var eu=1,eH=ei;eH>=256;eH>>=8)eu++;for(var em=Array(eu),eH=em.length-1;eH>=0;eH--)em[eH]=255&ei,ei>>=8;return 128&em[0]&&em.unshift(0),this._createEncoderBuffer(new ed(em))},eM.prototype._encodeBool=function(ei){return this._createEncoderBuffer(ei?255:0)},eM.prototype._use=function(ei,es){return"function"==typeof ei&&(ei=ei(es)),ei._getEncoder("der").tree},eM.prototype._skipDefault=function(ei,es,ef){var eu,ed=this._baseState;if(null===ed.default)return!1;var em=ei.join();if(void 0===ed.defaultBuffer&&(ed.defaultBuffer=this._encodeValue(ed.default,es,ef).join()),em.length!==ed.defaultBuffer.length)return!1;for(eu=0;eu=49&&eH<=54?eu|=eH-49+10:eH>=17&&eH<=22?eu|=eH-17+10:eu|=15&eH}return eu}function ez(ei,es,ef,eu){for(var ed=0,em=Math.min(ei.length,ef),eH=es;eH=49?ed+=ez-49+10:ez>=17?ed+=ez-17+10:ed+=ez}return ed}em.isBN=function(ei){return ei instanceof em||null!==ei&&"object"==typeof ei&&ei.constructor.wordSize===em.wordSize&&Array.isArray(ei.words)},em.max=function(ei,es){return ei.cmp(es)>0?ei:es},em.min=function(ei,es){return 0>ei.cmp(es)?ei:es},em.prototype._init=function(ei,es,ef){if("number"==typeof ei)return this._initNumber(ei,es,ef);if("object"==typeof ei)return this._initArray(ei,es,ef);"hex"===es&&(es=16),eu(es===(0|es)&&es>=2&&es<=36);var ed=0;"-"===(ei=ei.toString().replace(/\s+/g,""))[0]&&ed++,16===es?this._parseHex(ei,ed):this._parseBase(ei,es,ed),"-"===ei[0]&&(this.negative=1),this.strip(),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initNumber=function(ei,es,ef){ei<0&&(this.negative=1,ei=-ei),ei<67108864?(this.words=[67108863&ei],this.length=1):ei<4503599627370496?(this.words=[67108863&ei,ei/67108864&67108863],this.length=2):(eu(ei<9007199254740992),this.words=[67108863&ei,ei/67108864&67108863,1],this.length=3),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initArray=function(ei,es,ef){if(eu("number"==typeof ei.length),ei.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(ei.length/3),this.words=Array(this.length);for(var ed,em,eH=0;eH=0;eH-=3)em=ei[eH]|ei[eH-1]<<8|ei[eH-2]<<16,this.words[ed]|=em<>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);else if("le"===ef)for(eH=0,ed=0;eH>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);return this.strip()},em.prototype._parseHex=function(ei,es){this.length=Math.ceil((ei.length-es)/6),this.words=Array(this.length);for(var ef,eu,ed=0;ed=es;ed-=6)eu=eH(ei,ed,ed+6),this.words[ef]|=eu<>>26-em&4194303,(em+=24)>=26&&(em-=26,ef++);ed+6!==es&&(eu=eH(ei,es,ed+6),this.words[ef]|=eu<>>26-em&4194303),this.strip()},em.prototype._parseBase=function(ei,es,ef){this.words=[0],this.length=1;for(var eu=0,ed=1;ed<=67108863;ed*=es)eu++;eu--,ed=ed/es|0;for(var em=ei.length-ef,eH=em%eu,eV=Math.min(em,em-eH)+ef,eM=0,eg=ef;eg1&&0===this.words[this.length-1];)this.length--;return this._normSign()},em.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},em.prototype.inspect=function(){return(this.red?""};var eV,eM=["","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"],eg=[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],eL=[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 eb(ei){for(var es=Array(ei.bitLength()),ef=0;ef>>ed}return es}function ey(ei,es,ef){ef.negative=es.negative^ei.negative;var eu=ei.length+es.length|0;ef.length=eu,eu=eu-1|0;var ed=0|ei.words[0],em=0|es.words[0],eH=ed*em,ez=67108863&eH,eV=eH/67108864|0;ef.words[0]=ez;for(var eM=1;eM>>26,eL=67108863&eV,eb=Math.min(eM,es.length-1),ey=Math.max(0,eM-ei.length+1);ey<=eb;ey++){var eC=eM-ey|0;eg+=(eH=(ed=0|ei.words[eC])*(em=0|es.words[ey])+eL)/67108864|0,eL=67108863&eH}ef.words[eM]=0|eL,eV=0|eg}return 0!==eV?ef.words[eM]=0|eV:ef.length--,ef.strip()}em.prototype.toString=function(ei,es){if(es=0|es||1,16===(ei=ei||10)||"hex"===ei){ef="";for(var ef,ed=0,em=0,eH=0;eH>>24-ed&16777215)||eH!==this.length-1?eM[6-eV.length]+eV+ef:eV+ef,(ed+=2)>=26&&(ed-=26,eH--)}for(0!==em&&(ef=em.toString(16)+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}if(ei===(0|ei)&&ei>=2&&ei<=36){var eb=eg[ei],ey=eL[ei];ef="";var eC=this.clone();for(eC.negative=0;!eC.isZero();){var ex=eC.modn(ey).toString(ei);ef=(eC=eC.idivn(ey)).isZero()?ex+ef:eM[eb-ex.length]+ex+ef}for(this.isZero()&&(ef="0"+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}eu(!1,"Base should be between 2 and 36")},em.prototype.toNumber=function(){var ei=this.words[0];return 2===this.length?ei+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ei+=4503599627370496+67108864*this.words[1]:this.length>2&&eu(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ei:ei},em.prototype.toJSON=function(){return this.toString(16)},em.prototype.toBuffer=function(ei,es){return eu(void 0!==eV),this.toArrayLike(eV,ei,es)},em.prototype.toArray=function(ei,es){return this.toArrayLike(Array,ei,es)},em.prototype.toArrayLike=function(ei,es,ef){var ed,em,eH=this.byteLength(),ez=ef||Math.max(1,eH);eu(eH<=ez,"byte array longer than desired length"),eu(ez>0,"Requested array length <= 0"),this.strip();var eV="le"===es,eM=new ei(ez),eg=this.clone();if(eV){for(em=0;!eg.isZero();em++)ed=eg.andln(255),eg.iushrn(8),eM[em]=ed;for(;em=4096&&(ef+=13,es>>>=13),es>=64&&(ef+=7,es>>>=7),es>=8&&(ef+=4,es>>>=4),es>=2&&(ef+=2,es>>>=2),ef+es},em.prototype._zeroBits=function(ei){if(0===ei)return 26;var es=ei,ef=0;return(8191&es)==0&&(ef+=13,es>>>=13),(127&es)==0&&(ef+=7,es>>>=7),(15&es)==0&&(ef+=4,es>>>=4),(3&es)==0&&(ef+=2,es>>>=2),(1&es)==0&&ef++,ef},em.prototype.bitLength=function(){var ei=this.words[this.length-1],es=this._countBits(ei);return(this.length-1)*26+es},em.prototype.zeroBits=function(){if(this.isZero())return 0;for(var ei=0,es=0;esei.length?this.clone().ior(ei):ei.clone().ior(this)},em.prototype.uor=function(ei){return this.length>ei.length?this.clone().iuor(ei):ei.clone().iuor(this)},em.prototype.iuand=function(ei){var es;es=this.length>ei.length?ei:this;for(var ef=0;efei.length?this.clone().iand(ei):ei.clone().iand(this)},em.prototype.uand=function(ei){return this.length>ei.length?this.clone().iuand(ei):ei.clone().iuand(this)},em.prototype.iuxor=function(ei){this.length>ei.length?(es=this,ef=ei):(es=ei,ef=this);for(var es,ef,eu=0;euei.length?this.clone().ixor(ei):ei.clone().ixor(this)},em.prototype.uxor=function(ei){return this.length>ei.length?this.clone().iuxor(ei):ei.clone().iuxor(this)},em.prototype.inotn=function(ei){eu("number"==typeof ei&&ei>=0);var es=0|Math.ceil(ei/26),ef=ei%26;this._expand(es),ef>0&&es--;for(var ed=0;ed0&&(this.words[ed]=~this.words[ed]&67108863>>26-ef),this.strip()},em.prototype.notn=function(ei){return this.clone().inotn(ei)},em.prototype.setn=function(ei,es){eu("number"==typeof ei&&ei>=0);var ef=ei/26|0,ed=ei%26;return this._expand(ef+1),es?this.words[ef]=this.words[ef]|1<ei.length?(ef=this,eu=ei):(ef=ei,eu=this);for(var es,ef,eu,ed=0,em=0;em>>26;for(;0!==ed&&em>>26;if(this.length=ef.length,0!==ed)this.words[this.length]=ed,this.length++;else if(ef!==this)for(;emei.length?this.clone().iadd(ei):ei.clone().iadd(this)},em.prototype.isub=function(ei){if(0!==ei.negative){ei.negative=0;var es,ef,eu=this.iadd(ei);return ei.negative=1,eu._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(ei),this.negative=1,this._normSign();var ed=this.cmp(ei);if(0===ed)return this.negative=0,this.length=1,this.words[0]=0,this;ed>0?(es=this,ef=ei):(es=ei,ef=this);for(var em=0,eH=0;eH>26,this.words[eH]=67108863&eu;for(;0!==em&&eH>26,this.words[eH]=67108863&eu;if(0===em&&eH>>13,ey=0|eH[1],eC=8191&ey,ex=ey>>>13,ew=0|eH[2],eN=8191&ew,eS=ew>>>13,eA=0|eH[3],e_=8191&eA,eE=eA>>>13,eP=0|eH[4],eB=8191&eP,eT=eP>>>13,eI=0|eH[5],eR=8191&eI,eO=eI>>>13,ej=0|eH[6],eD=8191&ej,eF=ej>>>13,eU=0|eH[7],eq=8191&eU,eZ=eU>>>13,eG=0|eH[8],eW=8191&eG,eK=eG>>>13,e$=0|eH[9],eJ=8191&e$,eY=e$>>>13,eX=0|ez[0],eQ=8191&eX,e1=eX>>>13,e2=0|ez[1],e4=8191&e2,e3=e2>>>13,e6=0|ez[2],e0=8191&e6,e8=e6>>>13,e5=0|ez[3],e7=8191&e5,e9=e5>>>13,cc=0|ez[4],ci=8191&cc,co=cc>>>13,cs=0|ez[5],cf=8191&cs,cu=cs>>>13,cd=0|ez[6],cm=8191&cd,cH=cd>>>13,cz=0|ez[7],cV=8191&cz,cM=cz>>>13,cg=0|ez[8],cL=8191&cg,cy=cg>>>13,cC=0|ez[9],cx=8191&cC,cw=cC>>>13;ef.negative=ei.negative^es.negative,ef.length=19;var ck=(eM+(eu=Math.imul(eL,eQ))|0)+((8191&(ed=(ed=Math.imul(eL,e1))+Math.imul(eb,eQ)|0))<<13)|0;eM=((em=Math.imul(eb,e1))+(ed>>>13)|0)+(ck>>>26)|0,ck&=67108863,eu=Math.imul(eC,eQ),ed=(ed=Math.imul(eC,e1))+Math.imul(ex,eQ)|0,em=Math.imul(ex,e1);var cN=(eM+(eu=eu+Math.imul(eL,e4)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e3)|0)+Math.imul(eb,e4)|0))<<13)|0;eM=((em=em+Math.imul(eb,e3)|0)+(ed>>>13)|0)+(cN>>>26)|0,cN&=67108863,eu=Math.imul(eN,eQ),ed=(ed=Math.imul(eN,e1))+Math.imul(eS,eQ)|0,em=Math.imul(eS,e1),eu=eu+Math.imul(eC,e4)|0,ed=(ed=ed+Math.imul(eC,e3)|0)+Math.imul(ex,e4)|0,em=em+Math.imul(ex,e3)|0;var cS=(eM+(eu=eu+Math.imul(eL,e0)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e8)|0)+Math.imul(eb,e0)|0))<<13)|0;eM=((em=em+Math.imul(eb,e8)|0)+(ed>>>13)|0)+(cS>>>26)|0,cS&=67108863,eu=Math.imul(e_,eQ),ed=(ed=Math.imul(e_,e1))+Math.imul(eE,eQ)|0,em=Math.imul(eE,e1),eu=eu+Math.imul(eN,e4)|0,ed=(ed=ed+Math.imul(eN,e3)|0)+Math.imul(eS,e4)|0,em=em+Math.imul(eS,e3)|0,eu=eu+Math.imul(eC,e0)|0,ed=(ed=ed+Math.imul(eC,e8)|0)+Math.imul(ex,e0)|0,em=em+Math.imul(ex,e8)|0;var cA=(eM+(eu=eu+Math.imul(eL,e7)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e9)|0)+Math.imul(eb,e7)|0))<<13)|0;eM=((em=em+Math.imul(eb,e9)|0)+(ed>>>13)|0)+(cA>>>26)|0,cA&=67108863,eu=Math.imul(eB,eQ),ed=(ed=Math.imul(eB,e1))+Math.imul(eT,eQ)|0,em=Math.imul(eT,e1),eu=eu+Math.imul(e_,e4)|0,ed=(ed=ed+Math.imul(e_,e3)|0)+Math.imul(eE,e4)|0,em=em+Math.imul(eE,e3)|0,eu=eu+Math.imul(eN,e0)|0,ed=(ed=ed+Math.imul(eN,e8)|0)+Math.imul(eS,e0)|0,em=em+Math.imul(eS,e8)|0,eu=eu+Math.imul(eC,e7)|0,ed=(ed=ed+Math.imul(eC,e9)|0)+Math.imul(ex,e7)|0,em=em+Math.imul(ex,e9)|0;var c_=(eM+(eu=eu+Math.imul(eL,ci)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,co)|0)+Math.imul(eb,ci)|0))<<13)|0;eM=((em=em+Math.imul(eb,co)|0)+(ed>>>13)|0)+(c_>>>26)|0,c_&=67108863,eu=Math.imul(eR,eQ),ed=(ed=Math.imul(eR,e1))+Math.imul(eO,eQ)|0,em=Math.imul(eO,e1),eu=eu+Math.imul(eB,e4)|0,ed=(ed=ed+Math.imul(eB,e3)|0)+Math.imul(eT,e4)|0,em=em+Math.imul(eT,e3)|0,eu=eu+Math.imul(e_,e0)|0,ed=(ed=ed+Math.imul(e_,e8)|0)+Math.imul(eE,e0)|0,em=em+Math.imul(eE,e8)|0,eu=eu+Math.imul(eN,e7)|0,ed=(ed=ed+Math.imul(eN,e9)|0)+Math.imul(eS,e7)|0,em=em+Math.imul(eS,e9)|0,eu=eu+Math.imul(eC,ci)|0,ed=(ed=ed+Math.imul(eC,co)|0)+Math.imul(ex,ci)|0,em=em+Math.imul(ex,co)|0;var cE=(eM+(eu=eu+Math.imul(eL,cf)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cu)|0)+Math.imul(eb,cf)|0))<<13)|0;eM=((em=em+Math.imul(eb,cu)|0)+(ed>>>13)|0)+(cE>>>26)|0,cE&=67108863,eu=Math.imul(eD,eQ),ed=(ed=Math.imul(eD,e1))+Math.imul(eF,eQ)|0,em=Math.imul(eF,e1),eu=eu+Math.imul(eR,e4)|0,ed=(ed=ed+Math.imul(eR,e3)|0)+Math.imul(eO,e4)|0,em=em+Math.imul(eO,e3)|0,eu=eu+Math.imul(eB,e0)|0,ed=(ed=ed+Math.imul(eB,e8)|0)+Math.imul(eT,e0)|0,em=em+Math.imul(eT,e8)|0,eu=eu+Math.imul(e_,e7)|0,ed=(ed=ed+Math.imul(e_,e9)|0)+Math.imul(eE,e7)|0,em=em+Math.imul(eE,e9)|0,eu=eu+Math.imul(eN,ci)|0,ed=(ed=ed+Math.imul(eN,co)|0)+Math.imul(eS,ci)|0,em=em+Math.imul(eS,co)|0,eu=eu+Math.imul(eC,cf)|0,ed=(ed=ed+Math.imul(eC,cu)|0)+Math.imul(ex,cf)|0,em=em+Math.imul(ex,cu)|0;var cP=(eM+(eu=eu+Math.imul(eL,cm)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cH)|0)+Math.imul(eb,cm)|0))<<13)|0;eM=((em=em+Math.imul(eb,cH)|0)+(ed>>>13)|0)+(cP>>>26)|0,cP&=67108863,eu=Math.imul(eq,eQ),ed=(ed=Math.imul(eq,e1))+Math.imul(eZ,eQ)|0,em=Math.imul(eZ,e1),eu=eu+Math.imul(eD,e4)|0,ed=(ed=ed+Math.imul(eD,e3)|0)+Math.imul(eF,e4)|0,em=em+Math.imul(eF,e3)|0,eu=eu+Math.imul(eR,e0)|0,ed=(ed=ed+Math.imul(eR,e8)|0)+Math.imul(eO,e0)|0,em=em+Math.imul(eO,e8)|0,eu=eu+Math.imul(eB,e7)|0,ed=(ed=ed+Math.imul(eB,e9)|0)+Math.imul(eT,e7)|0,em=em+Math.imul(eT,e9)|0,eu=eu+Math.imul(e_,ci)|0,ed=(ed=ed+Math.imul(e_,co)|0)+Math.imul(eE,ci)|0,em=em+Math.imul(eE,co)|0,eu=eu+Math.imul(eN,cf)|0,ed=(ed=ed+Math.imul(eN,cu)|0)+Math.imul(eS,cf)|0,em=em+Math.imul(eS,cu)|0,eu=eu+Math.imul(eC,cm)|0,ed=(ed=ed+Math.imul(eC,cH)|0)+Math.imul(ex,cm)|0,em=em+Math.imul(ex,cH)|0;var cB=(eM+(eu=eu+Math.imul(eL,cV)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cM)|0)+Math.imul(eb,cV)|0))<<13)|0;eM=((em=em+Math.imul(eb,cM)|0)+(ed>>>13)|0)+(cB>>>26)|0,cB&=67108863,eu=Math.imul(eW,eQ),ed=(ed=Math.imul(eW,e1))+Math.imul(eK,eQ)|0,em=Math.imul(eK,e1),eu=eu+Math.imul(eq,e4)|0,ed=(ed=ed+Math.imul(eq,e3)|0)+Math.imul(eZ,e4)|0,em=em+Math.imul(eZ,e3)|0,eu=eu+Math.imul(eD,e0)|0,ed=(ed=ed+Math.imul(eD,e8)|0)+Math.imul(eF,e0)|0,em=em+Math.imul(eF,e8)|0,eu=eu+Math.imul(eR,e7)|0,ed=(ed=ed+Math.imul(eR,e9)|0)+Math.imul(eO,e7)|0,em=em+Math.imul(eO,e9)|0,eu=eu+Math.imul(eB,ci)|0,ed=(ed=ed+Math.imul(eB,co)|0)+Math.imul(eT,ci)|0,em=em+Math.imul(eT,co)|0,eu=eu+Math.imul(e_,cf)|0,ed=(ed=ed+Math.imul(e_,cu)|0)+Math.imul(eE,cf)|0,em=em+Math.imul(eE,cu)|0,eu=eu+Math.imul(eN,cm)|0,ed=(ed=ed+Math.imul(eN,cH)|0)+Math.imul(eS,cm)|0,em=em+Math.imul(eS,cH)|0,eu=eu+Math.imul(eC,cV)|0,ed=(ed=ed+Math.imul(eC,cM)|0)+Math.imul(ex,cV)|0,em=em+Math.imul(ex,cM)|0;var cT=(eM+(eu=eu+Math.imul(eL,cL)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cy)|0)+Math.imul(eb,cL)|0))<<13)|0;eM=((em=em+Math.imul(eb,cy)|0)+(ed>>>13)|0)+(cT>>>26)|0,cT&=67108863,eu=Math.imul(eJ,eQ),ed=(ed=Math.imul(eJ,e1))+Math.imul(eY,eQ)|0,em=Math.imul(eY,e1),eu=eu+Math.imul(eW,e4)|0,ed=(ed=ed+Math.imul(eW,e3)|0)+Math.imul(eK,e4)|0,em=em+Math.imul(eK,e3)|0,eu=eu+Math.imul(eq,e0)|0,ed=(ed=ed+Math.imul(eq,e8)|0)+Math.imul(eZ,e0)|0,em=em+Math.imul(eZ,e8)|0,eu=eu+Math.imul(eD,e7)|0,ed=(ed=ed+Math.imul(eD,e9)|0)+Math.imul(eF,e7)|0,em=em+Math.imul(eF,e9)|0,eu=eu+Math.imul(eR,ci)|0,ed=(ed=ed+Math.imul(eR,co)|0)+Math.imul(eO,ci)|0,em=em+Math.imul(eO,co)|0,eu=eu+Math.imul(eB,cf)|0,ed=(ed=ed+Math.imul(eB,cu)|0)+Math.imul(eT,cf)|0,em=em+Math.imul(eT,cu)|0,eu=eu+Math.imul(e_,cm)|0,ed=(ed=ed+Math.imul(e_,cH)|0)+Math.imul(eE,cm)|0,em=em+Math.imul(eE,cH)|0,eu=eu+Math.imul(eN,cV)|0,ed=(ed=ed+Math.imul(eN,cM)|0)+Math.imul(eS,cV)|0,em=em+Math.imul(eS,cM)|0,eu=eu+Math.imul(eC,cL)|0,ed=(ed=ed+Math.imul(eC,cy)|0)+Math.imul(ex,cL)|0,em=em+Math.imul(ex,cy)|0;var cI=(eM+(eu=eu+Math.imul(eL,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cw)|0)+Math.imul(eb,cx)|0))<<13)|0;eM=((em=em+Math.imul(eb,cw)|0)+(ed>>>13)|0)+(cI>>>26)|0,cI&=67108863,eu=Math.imul(eJ,e4),ed=(ed=Math.imul(eJ,e3))+Math.imul(eY,e4)|0,em=Math.imul(eY,e3),eu=eu+Math.imul(eW,e0)|0,ed=(ed=ed+Math.imul(eW,e8)|0)+Math.imul(eK,e0)|0,em=em+Math.imul(eK,e8)|0,eu=eu+Math.imul(eq,e7)|0,ed=(ed=ed+Math.imul(eq,e9)|0)+Math.imul(eZ,e7)|0,em=em+Math.imul(eZ,e9)|0,eu=eu+Math.imul(eD,ci)|0,ed=(ed=ed+Math.imul(eD,co)|0)+Math.imul(eF,ci)|0,em=em+Math.imul(eF,co)|0,eu=eu+Math.imul(eR,cf)|0,ed=(ed=ed+Math.imul(eR,cu)|0)+Math.imul(eO,cf)|0,em=em+Math.imul(eO,cu)|0,eu=eu+Math.imul(eB,cm)|0,ed=(ed=ed+Math.imul(eB,cH)|0)+Math.imul(eT,cm)|0,em=em+Math.imul(eT,cH)|0,eu=eu+Math.imul(e_,cV)|0,ed=(ed=ed+Math.imul(e_,cM)|0)+Math.imul(eE,cV)|0,em=em+Math.imul(eE,cM)|0,eu=eu+Math.imul(eN,cL)|0,ed=(ed=ed+Math.imul(eN,cy)|0)+Math.imul(eS,cL)|0,em=em+Math.imul(eS,cy)|0;var cR=(eM+(eu=eu+Math.imul(eC,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eC,cw)|0)+Math.imul(ex,cx)|0))<<13)|0;eM=((em=em+Math.imul(ex,cw)|0)+(ed>>>13)|0)+(cR>>>26)|0,cR&=67108863,eu=Math.imul(eJ,e0),ed=(ed=Math.imul(eJ,e8))+Math.imul(eY,e0)|0,em=Math.imul(eY,e8),eu=eu+Math.imul(eW,e7)|0,ed=(ed=ed+Math.imul(eW,e9)|0)+Math.imul(eK,e7)|0,em=em+Math.imul(eK,e9)|0,eu=eu+Math.imul(eq,ci)|0,ed=(ed=ed+Math.imul(eq,co)|0)+Math.imul(eZ,ci)|0,em=em+Math.imul(eZ,co)|0,eu=eu+Math.imul(eD,cf)|0,ed=(ed=ed+Math.imul(eD,cu)|0)+Math.imul(eF,cf)|0,em=em+Math.imul(eF,cu)|0,eu=eu+Math.imul(eR,cm)|0,ed=(ed=ed+Math.imul(eR,cH)|0)+Math.imul(eO,cm)|0,em=em+Math.imul(eO,cH)|0,eu=eu+Math.imul(eB,cV)|0,ed=(ed=ed+Math.imul(eB,cM)|0)+Math.imul(eT,cV)|0,em=em+Math.imul(eT,cM)|0,eu=eu+Math.imul(e_,cL)|0,ed=(ed=ed+Math.imul(e_,cy)|0)+Math.imul(eE,cL)|0,em=em+Math.imul(eE,cy)|0;var cO=(eM+(eu=eu+Math.imul(eN,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eN,cw)|0)+Math.imul(eS,cx)|0))<<13)|0;eM=((em=em+Math.imul(eS,cw)|0)+(ed>>>13)|0)+(cO>>>26)|0,cO&=67108863,eu=Math.imul(eJ,e7),ed=(ed=Math.imul(eJ,e9))+Math.imul(eY,e7)|0,em=Math.imul(eY,e9),eu=eu+Math.imul(eW,ci)|0,ed=(ed=ed+Math.imul(eW,co)|0)+Math.imul(eK,ci)|0,em=em+Math.imul(eK,co)|0,eu=eu+Math.imul(eq,cf)|0,ed=(ed=ed+Math.imul(eq,cu)|0)+Math.imul(eZ,cf)|0,em=em+Math.imul(eZ,cu)|0,eu=eu+Math.imul(eD,cm)|0,ed=(ed=ed+Math.imul(eD,cH)|0)+Math.imul(eF,cm)|0,em=em+Math.imul(eF,cH)|0,eu=eu+Math.imul(eR,cV)|0,ed=(ed=ed+Math.imul(eR,cM)|0)+Math.imul(eO,cV)|0,em=em+Math.imul(eO,cM)|0,eu=eu+Math.imul(eB,cL)|0,ed=(ed=ed+Math.imul(eB,cy)|0)+Math.imul(eT,cL)|0,em=em+Math.imul(eT,cy)|0;var cj=(eM+(eu=eu+Math.imul(e_,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(e_,cw)|0)+Math.imul(eE,cx)|0))<<13)|0;eM=((em=em+Math.imul(eE,cw)|0)+(ed>>>13)|0)+(cj>>>26)|0,cj&=67108863,eu=Math.imul(eJ,ci),ed=(ed=Math.imul(eJ,co))+Math.imul(eY,ci)|0,em=Math.imul(eY,co),eu=eu+Math.imul(eW,cf)|0,ed=(ed=ed+Math.imul(eW,cu)|0)+Math.imul(eK,cf)|0,em=em+Math.imul(eK,cu)|0,eu=eu+Math.imul(eq,cm)|0,ed=(ed=ed+Math.imul(eq,cH)|0)+Math.imul(eZ,cm)|0,em=em+Math.imul(eZ,cH)|0,eu=eu+Math.imul(eD,cV)|0,ed=(ed=ed+Math.imul(eD,cM)|0)+Math.imul(eF,cV)|0,em=em+Math.imul(eF,cM)|0,eu=eu+Math.imul(eR,cL)|0,ed=(ed=ed+Math.imul(eR,cy)|0)+Math.imul(eO,cL)|0,em=em+Math.imul(eO,cy)|0;var cD=(eM+(eu=eu+Math.imul(eB,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eB,cw)|0)+Math.imul(eT,cx)|0))<<13)|0;eM=((em=em+Math.imul(eT,cw)|0)+(ed>>>13)|0)+(cD>>>26)|0,cD&=67108863,eu=Math.imul(eJ,cf),ed=(ed=Math.imul(eJ,cu))+Math.imul(eY,cf)|0,em=Math.imul(eY,cu),eu=eu+Math.imul(eW,cm)|0,ed=(ed=ed+Math.imul(eW,cH)|0)+Math.imul(eK,cm)|0,em=em+Math.imul(eK,cH)|0,eu=eu+Math.imul(eq,cV)|0,ed=(ed=ed+Math.imul(eq,cM)|0)+Math.imul(eZ,cV)|0,em=em+Math.imul(eZ,cM)|0,eu=eu+Math.imul(eD,cL)|0,ed=(ed=ed+Math.imul(eD,cy)|0)+Math.imul(eF,cL)|0,em=em+Math.imul(eF,cy)|0;var cF=(eM+(eu=eu+Math.imul(eR,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eR,cw)|0)+Math.imul(eO,cx)|0))<<13)|0;eM=((em=em+Math.imul(eO,cw)|0)+(ed>>>13)|0)+(cF>>>26)|0,cF&=67108863,eu=Math.imul(eJ,cm),ed=(ed=Math.imul(eJ,cH))+Math.imul(eY,cm)|0,em=Math.imul(eY,cH),eu=eu+Math.imul(eW,cV)|0,ed=(ed=ed+Math.imul(eW,cM)|0)+Math.imul(eK,cV)|0,em=em+Math.imul(eK,cM)|0,eu=eu+Math.imul(eq,cL)|0,ed=(ed=ed+Math.imul(eq,cy)|0)+Math.imul(eZ,cL)|0,em=em+Math.imul(eZ,cy)|0;var cU=(eM+(eu=eu+Math.imul(eD,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eD,cw)|0)+Math.imul(eF,cx)|0))<<13)|0;eM=((em=em+Math.imul(eF,cw)|0)+(ed>>>13)|0)+(cU>>>26)|0,cU&=67108863,eu=Math.imul(eJ,cV),ed=(ed=Math.imul(eJ,cM))+Math.imul(eY,cV)|0,em=Math.imul(eY,cM),eu=eu+Math.imul(eW,cL)|0,ed=(ed=ed+Math.imul(eW,cy)|0)+Math.imul(eK,cL)|0,em=em+Math.imul(eK,cy)|0;var cq=(eM+(eu=eu+Math.imul(eq,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eq,cw)|0)+Math.imul(eZ,cx)|0))<<13)|0;eM=((em=em+Math.imul(eZ,cw)|0)+(ed>>>13)|0)+(cq>>>26)|0,cq&=67108863,eu=Math.imul(eJ,cL),ed=(ed=Math.imul(eJ,cy))+Math.imul(eY,cL)|0,em=Math.imul(eY,cy);var cZ=(eM+(eu=eu+Math.imul(eW,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eW,cw)|0)+Math.imul(eK,cx)|0))<<13)|0;eM=((em=em+Math.imul(eK,cw)|0)+(ed>>>13)|0)+(cZ>>>26)|0,cZ&=67108863;var cG=(eM+(eu=Math.imul(eJ,cx))|0)+((8191&(ed=(ed=Math.imul(eJ,cw))+Math.imul(eY,cx)|0))<<13)|0;return eM=((em=Math.imul(eY,cw))+(ed>>>13)|0)+(cG>>>26)|0,cG&=67108863,eV[0]=ck,eV[1]=cN,eV[2]=cS,eV[3]=cA,eV[4]=c_,eV[5]=cE,eV[6]=cP,eV[7]=cB,eV[8]=cT,eV[9]=cI,eV[10]=cR,eV[11]=cO,eV[12]=cj,eV[13]=cD,eV[14]=cF,eV[15]=cU,eV[16]=cq,eV[17]=cZ,eV[18]=cG,0!==eM&&(eV[19]=eM,ef.length++),ef};function ex(ei,es,ef){ef.negative=es.negative^ei.negative,ef.length=ei.length+es.length;for(var eu=0,ed=0,em=0;em>>26)|0)>>>26,eH&=67108863}ef.words[em]=ez,eu=eH,eH=ed}return 0!==eu?ef.words[em]=eu:ef.length--,ef.strip()}function ew(ei,es,ef){return(new eN).mulp(ei,es,ef)}function eN(ei,es){this.x=ei,this.y=es}Math.imul||(eC=ey),em.prototype.mulTo=function(ei,es){var ef=this.length+ei.length;return 10===this.length&&10===ei.length?eC(this,ei,es):ef<63?ey(this,ei,es):ef<1024?ex(this,ei,es):ew(this,ei,es)},eN.prototype.makeRBT=function(ei){for(var es=Array(ei),ef=em.prototype._countBits(ei)-1,eu=0;eu>=1;return eu},eN.prototype.permute=function(ei,es,ef,eu,ed,em){for(var eH=0;eH>>=1)ed++;return 1<>>=13,ef[2*eH+1]=8191&em,em>>>=13;for(eH=2*es;eH>=26,es+=(ed/67108864|0)+(em>>>26),this.words[ef]=67108863&em}return 0!==es&&(this.words[ef]=es,this.length++),this},em.prototype.muln=function(ei){return this.clone().imuln(ei)},em.prototype.sqr=function(){return this.mul(this)},em.prototype.isqr=function(){return this.imul(this.clone())},em.prototype.pow=function(ei){var es=eb(ei);if(0===es.length)return new em(1);for(var ef=this,eu=0;eu=0);var es,ef=ei%26,ed=(ei-ef)/26,em=67108863>>>26-ef<<26-ef;if(0!==ef){var eH=0;for(es=0;es>>26-ef}eH&&(this.words[es]=eH,this.length++)}if(0!==ed){for(es=this.length-1;es>=0;es--)this.words[es+ed]=this.words[es];for(es=0;es=0),ed=es?(es-es%26)/26:0;var ed,em=ei%26,eH=Math.min((ei-em)/26,this.length),ez=67108863^67108863>>>em<eH)for(this.length-=eH,eM=0;eM=0&&(0!==eg||eM>=ed);eM--){var eL=0|this.words[eM];this.words[eM]=eg<<26-em|eL>>>em,eg=eL&ez}return eV&&0!==eg&&(eV.words[eV.length++]=eg),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},em.prototype.ishrn=function(ei,es,ef){return eu(0===this.negative),this.iushrn(ei,es,ef)},em.prototype.shln=function(ei){return this.clone().ishln(ei)},em.prototype.ushln=function(ei){return this.clone().iushln(ei)},em.prototype.shrn=function(ei){return this.clone().ishrn(ei)},em.prototype.ushrn=function(ei){return this.clone().iushrn(ei)},em.prototype.testn=function(ei){eu("number"==typeof ei&&ei>=0);var es=ei%26,ef=(ei-es)/26,ed=1<=0);var es=ei%26,ef=(ei-es)/26;if(eu(0===this.negative,"imaskn works only with positive numbers"),this.length<=ef)return this;if(0!==es&&ef++,this.length=Math.min(ef,this.length),0!==es){var ed=67108863^67108863>>>es<=67108864;es++)this.words[es]-=67108864,es===this.length-1?this.words[es+1]=1:this.words[es+1]++;return this.length=Math.max(this.length,es+1),this},em.prototype.isubn=function(ei){if(eu("number"==typeof ei),eu(ei<67108864),ei<0)return this.iaddn(-ei);if(0!==this.negative)return this.negative=0,this.iaddn(ei),this.negative=1,this;if(this.words[0]-=ei,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var es=0;es>26)-(eV/67108864|0),this.words[ed+ef]=67108863&em}for(;ed>26,this.words[ed+ef]=67108863&em;if(0===ez)return this.strip();for(eu(-1===ez),ez=0,ed=0;ed>26,this.words[ed]=67108863&em;return this.negative=1,this.strip()},em.prototype._wordDiv=function(ei,es){var ef,eu=this.length-ei.length,ed=this.clone(),eH=ei,ez=0|eH.words[eH.length-1];0!=(eu=26-this._countBits(ez))&&(eH=eH.ushln(eu),ed.iushln(eu),ez=0|eH.words[eH.length-1]);var eV=ed.length-eH.length;if("mod"!==es){(ef=new em(null)).length=eV+1,ef.words=Array(ef.length);for(var eM=0;eM=0;eL--){var eb=(0|ed.words[eH.length+eL])*67108864+(0|ed.words[eH.length+eL-1]);for(eb=Math.min(eb/ez|0,67108863),ed._ishlnsubmul(eH,eb,eL);0!==ed.negative;)eb--,ed.negative=0,ed._ishlnsubmul(eH,1,eL),ed.isZero()||(ed.negative^=1);ef&&(ef.words[eL]=eb)}return ef&&ef.strip(),ed.strip(),"div"!==es&&0!==eu&&ed.iushrn(eu),{div:ef||null,mod:ed}},em.prototype.divmod=function(ei,es,ef){var ed,eH,ez;return(eu(!ei.isZero()),this.isZero())?{div:new em(0),mod:new em(0)}:0!==this.negative&&0===ei.negative?(ez=this.neg().divmod(ei,es),"mod"!==es&&(ed=ez.div.neg()),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.iadd(ei)),{div:ed,mod:eH}):0===this.negative&&0!==ei.negative?(ez=this.divmod(ei.neg(),es),"mod"!==es&&(ed=ez.div.neg()),{div:ed,mod:ez.mod}):(this.negative&ei.negative)!=0?(ez=this.neg().divmod(ei.neg(),es),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.isub(ei)),{div:ez.div,mod:eH}):ei.length>this.length||0>this.cmp(ei)?{div:new em(0),mod:this}:1===ei.length?"div"===es?{div:this.divn(ei.words[0]),mod:null}:"mod"===es?{div:null,mod:new em(this.modn(ei.words[0]))}:{div:this.divn(ei.words[0]),mod:new em(this.modn(ei.words[0]))}:this._wordDiv(ei,es)},em.prototype.div=function(ei){return this.divmod(ei,"div",!1).div},em.prototype.mod=function(ei){return this.divmod(ei,"mod",!1).mod},em.prototype.umod=function(ei){return this.divmod(ei,"mod",!0).mod},em.prototype.divRound=function(ei){var es=this.divmod(ei);if(es.mod.isZero())return es.div;var ef=0!==es.div.negative?es.mod.isub(ei):es.mod,eu=ei.ushrn(1),ed=ei.andln(1),em=ef.cmp(eu);return em<0||1===ed&&0===em?es.div:0!==es.div.negative?es.div.isubn(1):es.div.iaddn(1)},em.prototype.modn=function(ei){eu(ei<=67108863);for(var es=67108864%ei,ef=0,ed=this.length-1;ed>=0;ed--)ef=(es*ef+(0|this.words[ed]))%ei;return ef},em.prototype.idivn=function(ei){eu(ei<=67108863);for(var es=0,ef=this.length-1;ef>=0;ef--){var ed=(0|this.words[ef])+67108864*es;this.words[ef]=ed/ei|0,es=ed%ei}return this.strip()},em.prototype.divn=function(ei){return this.clone().idivn(ei)},em.prototype.egcd=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es=this,ef=ei.clone();es=0!==es.negative?es.umod(ei):es.clone();for(var ed=new em(1),eH=new em(0),ez=new em(0),eV=new em(1),eM=0;es.isEven()&&ef.isEven();)es.iushrn(1),ef.iushrn(1),++eM;for(var eg=ef.clone(),eL=es.clone();!es.isZero();){for(var eb=0,ey=1;(es.words[0]&ey)==0&&eb<26;++eb,ey<<=1);if(eb>0)for(es.iushrn(eb);eb-- >0;)(ed.isOdd()||eH.isOdd())&&(ed.iadd(eg),eH.isub(eL)),ed.iushrn(1),eH.iushrn(1);for(var eC=0,ex=1;(ef.words[0]&ex)==0&&eC<26;++eC,ex<<=1);if(eC>0)for(ef.iushrn(eC);eC-- >0;)(ez.isOdd()||eV.isOdd())&&(ez.iadd(eg),eV.isub(eL)),ez.iushrn(1),eV.iushrn(1);es.cmp(ef)>=0?(es.isub(ef),ed.isub(ez),eH.isub(eV)):(ef.isub(es),ez.isub(ed),eV.isub(eH))}return{a:ez,b:eV,gcd:ef.iushln(eM)}},em.prototype._invmp=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es,ef=this,ed=ei.clone();ef=0!==ef.negative?ef.umod(ei):ef.clone();for(var eH=new em(1),ez=new em(0),eV=ed.clone();ef.cmpn(1)>0&&ed.cmpn(1)>0;){for(var eM=0,eg=1;(ef.words[0]&eg)==0&&eM<26;++eM,eg<<=1);if(eM>0)for(ef.iushrn(eM);eM-- >0;)eH.isOdd()&&eH.iadd(eV),eH.iushrn(1);for(var eL=0,eb=1;(ed.words[0]&eb)==0&&eL<26;++eL,eb<<=1);if(eL>0)for(ed.iushrn(eL);eL-- >0;)ez.isOdd()&&ez.iadd(eV),ez.iushrn(1);ef.cmp(ed)>=0?(ef.isub(ed),eH.isub(ez)):(ed.isub(ef),ez.isub(eH))}return 0>(es=0===ef.cmpn(1)?eH:ez).cmpn(0)&&es.iadd(ei),es},em.prototype.gcd=function(ei){if(this.isZero())return ei.abs();if(ei.isZero())return this.abs();var es=this.clone(),ef=ei.clone();es.negative=0,ef.negative=0;for(var eu=0;es.isEven()&&ef.isEven();eu++)es.iushrn(1),ef.iushrn(1);for(;;){for(;es.isEven();)es.iushrn(1);for(;ef.isEven();)ef.iushrn(1);var ed=es.cmp(ef);if(ed<0){var em=es;es=ef,ef=em}else if(0===ed||0===ef.cmpn(1))break;es.isub(ef)}return ef.iushln(eu)},em.prototype.invm=function(ei){return this.egcd(ei).a.umod(ei)},em.prototype.isEven=function(){return(1&this.words[0])==0},em.prototype.isOdd=function(){return(1&this.words[0])==1},em.prototype.andln=function(ei){return this.words[0]&ei},em.prototype.bincn=function(ei){eu("number"==typeof ei);var es=ei%26,ef=(ei-es)/26,ed=1<>>26,ez&=67108863,this.words[eH]=ez}return 0!==em&&(this.words[eH]=em,this.length++),this},em.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},em.prototype.cmpn=function(ei){var es,ef=ei<0;if(0!==this.negative&&!ef)return -1;if(0===this.negative&&ef)return 1;if(this.strip(),this.length>1)es=1;else{ef&&(ei=-ei),eu(ei<=67108863,"Number is too big");var ed=0|this.words[0];es=ed===ei?0:edei.length)return 1;if(this.length=0;ef--){var eu=0|this.words[ef],ed=0|ei.words[ef];if(eu!==ed){eued&&(es=1);break}}return es},em.prototype.gtn=function(ei){return 1===this.cmpn(ei)},em.prototype.gt=function(ei){return 1===this.cmp(ei)},em.prototype.gten=function(ei){return this.cmpn(ei)>=0},em.prototype.gte=function(ei){return this.cmp(ei)>=0},em.prototype.ltn=function(ei){return -1===this.cmpn(ei)},em.prototype.lt=function(ei){return -1===this.cmp(ei)},em.prototype.lten=function(ei){return 0>=this.cmpn(ei)},em.prototype.lte=function(ei){return 0>=this.cmp(ei)},em.prototype.eqn=function(ei){return 0===this.cmpn(ei)},em.prototype.eq=function(ei){return 0===this.cmp(ei)},em.red=function(ei){return new eT(ei)},em.prototype.toRed=function(ei){return eu(!this.red,"Already a number in reduction context"),eu(0===this.negative,"red works only with positives"),ei.convertTo(this)._forceRed(ei)},em.prototype.fromRed=function(){return eu(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},em.prototype._forceRed=function(ei){return this.red=ei,this},em.prototype.forceRed=function(ei){return eu(!this.red,"Already a number in reduction context"),this._forceRed(ei)},em.prototype.redAdd=function(ei){return eu(this.red,"redAdd works only with red numbers"),this.red.add(this,ei)},em.prototype.redIAdd=function(ei){return eu(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,ei)},em.prototype.redSub=function(ei){return eu(this.red,"redSub works only with red numbers"),this.red.sub(this,ei)},em.prototype.redISub=function(ei){return eu(this.red,"redISub works only with red numbers"),this.red.isub(this,ei)},em.prototype.redShl=function(ei){return eu(this.red,"redShl works only with red numbers"),this.red.shl(this,ei)},em.prototype.redMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.mul(this,ei)},em.prototype.redIMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.imul(this,ei)},em.prototype.redSqr=function(){return eu(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},em.prototype.redISqr=function(){return eu(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},em.prototype.redSqrt=function(){return eu(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},em.prototype.redInvm=function(){return eu(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},em.prototype.redNeg=function(){return eu(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},em.prototype.redPow=function(ei){return eu(this.red&&!ei.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,ei)};var eS={k256:null,p224:null,p192:null,p25519:null};function eA(ei,es){this.name=ei,this.p=new em(es,16),this.n=this.p.bitLength(),this.k=new em(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function e_(){eA.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function eE(){eA.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function eP(){eA.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function eB(){eA.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function eT(ei){if("string"==typeof ei){var es=em._prime(ei);this.m=es.p,this.prime=es}else eu(ei.gtn(1),"modulus must be greater than 1"),this.m=ei,this.prime=null}function eI(ei){eT.call(this,ei),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new em(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)}eA.prototype._tmp=function(){var ei=new em(null);return ei.words=Array(Math.ceil(this.n/13)),ei},eA.prototype.ireduce=function(ei){var es,ef=ei;do this.split(ef,this.tmp),es=(ef=(ef=this.imulK(ef)).iadd(this.tmp)).bitLength();while(es>this.n);var eu=es0?ef.isub(this.p):void 0!==ef.strip?ef.strip():ef._strip(),ef},eA.prototype.split=function(ei,es){ei.iushrn(this.n,0,es)},eA.prototype.imulK=function(ei){return ei.imul(this.k)},ed(e_,eA),e_.prototype.split=function(ei,es){for(var ef=4194303,eu=Math.min(ei.length,9),ed=0;ed>>22,em=eH}em>>>=22,ei.words[ed-10]=em,0===em&&ei.length>10?ei.length-=10:ei.length-=9},e_.prototype.imulK=function(ei){ei.words[ei.length]=0,ei.words[ei.length+1]=0,ei.length+=2;for(var es=0,ef=0;ef>>=26,ei.words[ef]=ed,es=eu}return 0!==es&&(ei.words[ei.length++]=es),ei},em._prime=function(ei){var es;if(eS[ei])return eS[ei];if("k256"===ei)es=new e_;else if("p224"===ei)es=new eE;else if("p192"===ei)es=new eP;else if("p25519"===ei)es=new eB;else throw Error("Unknown prime "+ei);return eS[ei]=es,es},eT.prototype._verify1=function(ei){eu(0===ei.negative,"red works only with positives"),eu(ei.red,"red works only with red numbers")},eT.prototype._verify2=function(ei,es){eu((ei.negative|es.negative)==0,"red works only with positives"),eu(ei.red&&ei.red===es.red,"red works only with red numbers")},eT.prototype.imod=function(ei){return this.prime?this.prime.ireduce(ei)._forceRed(this):ei.umod(this.m)._forceRed(this)},eT.prototype.neg=function(ei){return ei.isZero()?ei.clone():this.m.sub(ei)._forceRed(this)},eT.prototype.add=function(ei,es){this._verify2(ei,es);var ef=ei.add(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef._forceRed(this)},eT.prototype.iadd=function(ei,es){this._verify2(ei,es);var ef=ei.iadd(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef},eT.prototype.sub=function(ei,es){this._verify2(ei,es);var ef=ei.sub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef._forceRed(this)},eT.prototype.isub=function(ei,es){this._verify2(ei,es);var ef=ei.isub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef},eT.prototype.shl=function(ei,es){return this._verify1(ei),this.imod(ei.ushln(es))},eT.prototype.imul=function(ei,es){return this._verify2(ei,es),this.imod(ei.imul(es))},eT.prototype.mul=function(ei,es){return this._verify2(ei,es),this.imod(ei.mul(es))},eT.prototype.isqr=function(ei){return this.imul(ei,ei.clone())},eT.prototype.sqr=function(ei){return this.mul(ei,ei)},eT.prototype.sqrt=function(ei){if(ei.isZero())return ei.clone();var es=this.m.andln(3);if(eu(es%2==1),3===es){var ef=this.m.add(new em(1)).iushrn(2);return this.pow(ei,ef)}for(var ed=this.m.subn(1),eH=0;!ed.isZero()&&0===ed.andln(1);)eH++,ed.iushrn(1);eu(!ed.isZero());var ez=new em(1).toRed(this),eV=ez.redNeg(),eM=this.m.subn(1).iushrn(1),eg=this.m.bitLength();for(eg=new em(2*eg*eg).toRed(this);0!==this.pow(eg,eM).cmp(eV);)eg.redIAdd(eV);for(var eL=this.pow(eg,ed),eb=this.pow(ei,ed.addn(1).iushrn(1)),ey=this.pow(ei,ed),eC=eH;0!==ey.cmp(ez);){for(var ex=ey,ew=0;0!==ex.cmp(ez);ew++)ex=ex.redSqr();eu(ew=0;ed--){for(var eg=es.words[ed],eL=eM-1;eL>=0;eL--){var eb=eg>>eL&1;if(eH!==eu[0]&&(eH=this.sqr(eH)),0===eb&&0===ez){eV=0;continue}ez<<=1,ez|=eb,(++eV===ef||0===ed&&0===eL)&&(eH=this.mul(eH,eu[ez]),eV=0,ez=0)}eM=26}return eH},eT.prototype.convertTo=function(ei){var es=ei.umod(this.m);return es===ei?es.clone():es},eT.prototype.convertFrom=function(ei){var es=ei.clone();return es.red=null,es},em.mont=function(ei){return new eI(ei)},ed(eI,eT),eI.prototype.convertTo=function(ei){return this.imod(ei.ushln(this.shift))},eI.prototype.convertFrom=function(ei){var es=this.imod(ei.mul(this.rinv));return es.red=null,es},eI.prototype.imul=function(ei,es){if(ei.isZero()||es.isZero())return ei.words[0]=0,ei.length=1,ei;var ef=ei.imul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),em=ed;return ed.cmp(this.m)>=0?em=ed.isub(this.m):0>ed.cmpn(0)&&(em=ed.iadd(this.m)),em._forceRed(this)},eI.prototype.mul=function(ei,es){if(ei.isZero()||es.isZero())return new em(0)._forceRed(this);var ef=ei.mul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),eH=ed;return ed.cmp(this.m)>=0?eH=ed.isub(this.m):0>ed.cmpn(0)&&(eH=ed.iadd(this.m)),eH._forceRed(this)},eI.prototype.invm=function(ei){return this.imod(ei._invmp(this.m).mul(this.r2))._forceRed(this)}}(ei=ef.nmd(ei),this)},1670:function(ei,es,ef){!function(ei,es){"use strict";function eu(ei,es){if(!ei)throw Error(es||"Assertion failed")}function ed(ei,es){ei.super_=es;var ef=function(){};ef.prototype=es.prototype,ei.prototype=new ef,ei.prototype.constructor=ei}function em(ei,es,ef){if(em.isBN(ei))return ei;this.negative=0,this.words=null,this.length=0,this.red=null,null!==ei&&(("le"===es||"be"===es)&&(ef=es,es=10),this._init(ei||0,es||10,ef||"be"))}"object"==typeof ei?ei.exports=em:es.BN=em,em.BN=em,em.wordSize=26;try{eg=ef(4300).Buffer}catch(ei){}function eH(ei,es,ef){for(var ed=0,em=Math.min(ei.length,ef),eH=0,ez=es;ez=49&&eM<=54?eM-49+10:eM>=17&&eM<=22?eM-17+10:eM,eH|=eV}return eu(!(240&eH),"Invalid character in "+ei),ed}function ez(ei,es,ef,ed){for(var em=0,eH=0,ez=Math.min(ei.length,ef),eV=es;eV=49?eM-49+10:eM>=17?eM-17+10:eM,eu(eM>=0&&eH"}em.isBN=function(ei){return ei instanceof em||null!==ei&&"object"==typeof ei&&ei.constructor.wordSize===em.wordSize&&Array.isArray(ei.words)},em.max=function(ei,es){return ei.cmp(es)>0?ei:es},em.min=function(ei,es){return 0>ei.cmp(es)?ei:es},em.prototype._init=function(ei,es,ef){if("number"==typeof ei)return this._initNumber(ei,es,ef);if("object"==typeof ei)return this._initArray(ei,es,ef);"hex"===es&&(es=16),eu(es===(0|es)&&es>=2&&es<=36);var ed=0;"-"===(ei=ei.toString().replace(/\s+/g,""))[0]&&ed++,16===es?this._parseHex(ei,ed):this._parseBase(ei,es,ed),"-"===ei[0]&&(this.negative=1),this._strip(),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initNumber=function(ei,es,ef){ei<0&&(this.negative=1,ei=-ei),ei<67108864?(this.words=[67108863&ei],this.length=1):ei<4503599627370496?(this.words=[67108863&ei,ei/67108864&67108863],this.length=2):(eu(ei<9007199254740992),this.words=[67108863&ei,ei/67108864&67108863,1],this.length=3),"le"===ef&&this._initArray(this.toArray(),es,ef)},em.prototype._initArray=function(ei,es,ef){if(eu("number"==typeof ei.length),ei.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(ei.length/3),this.words=Array(this.length);for(var ed,em,eH=0;eH=0;eH-=3)em=ei[eH]|ei[eH-1]<<8|ei[eH-2]<<16,this.words[ed]|=em<>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);else if("le"===ef)for(eH=0,ed=0;eH>>26-ez&67108863,(ez+=24)>=26&&(ez-=26,ed++);return this._strip()},em.prototype._parseHex=function(ei,es){this.length=Math.ceil((ei.length-es)/6),this.words=Array(this.length);for(var ef,eu,ed=0;ed=es;ed-=6)eu=eH(ei,ed,ed+6),this.words[ef]|=eu<>>26-em&4194303,(em+=24)>=26&&(em-=26,ef++);ed+6!==es&&(eu=eH(ei,es,ed+6),this.words[ef]|=eu<>>26-em&4194303),this._strip()},em.prototype._parseBase=function(ei,es,ef){this.words=[0],this.length=1;for(var eu=0,ed=1;ed<=67108863;ed*=es)eu++;eu--,ed=ed/es|0;for(var em=ei.length-ef,eH=em%eu,eV=Math.min(em,em-eH)+ef,eM=0,eg=ef;eg1&&0===this.words[this.length-1];)this.length--;return this._normSign()},em.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?em.prototype[Symbol.for("nodejs.util.inspect.custom")]=eM:em.prototype.inspect=eM;var eg,eL=["","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"],eb=[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],ey=[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];em.prototype.toString=function(ei,es){if(es=0|es||1,16===(ei=ei||10)||"hex"===ei){ef="";for(var ef,ed=0,em=0,eH=0;eH>>24-ed&16777215)||eH!==this.length-1?eL[6-eV.length]+eV+ef:eV+ef,(ed+=2)>=26&&(ed-=26,eH--)}for(0!==em&&(ef=em.toString(16)+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}if(ei===(0|ei)&&ei>=2&&ei<=36){var eM=eb[ei],eg=ey[ei];ef="";var eC=this.clone();for(eC.negative=0;!eC.isZero();){var ex=eC.modrn(eg).toString(ei);ef=(eC=eC.idivn(eg)).isZero()?ex+ef:eL[eM-ex.length]+ex+ef}for(this.isZero()&&(ef="0"+ef);ef.length%es!=0;)ef="0"+ef;return 0!==this.negative&&(ef="-"+ef),ef}eu(!1,"Base should be between 2 and 36")},em.prototype.toNumber=function(){var ei=this.words[0];return 2===this.length?ei+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ei+=4503599627370496+67108864*this.words[1]:this.length>2&&eu(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ei:ei},em.prototype.toJSON=function(){return this.toString(16,2)},eg&&(em.prototype.toBuffer=function(ei,es){return this.toArrayLike(eg,ei,es)}),em.prototype.toArray=function(ei,es){return this.toArrayLike(Array,ei,es)};var eC=function(ei,es){return ei.allocUnsafe?ei.allocUnsafe(es):new ei(es)};function ex(ei){for(var es=Array(ei.bitLength()),ef=0;ef>>ed&1}return es}function ew(ei,es,ef){ef.negative=es.negative^ei.negative;var eu=ei.length+es.length|0;ef.length=eu,eu=eu-1|0;var ed=0|ei.words[0],em=0|es.words[0],eH=ed*em,ez=67108863&eH,eV=eH/67108864|0;ef.words[0]=ez;for(var eM=1;eM>>26,eL=67108863&eV,eb=Math.min(eM,es.length-1),ey=Math.max(0,eM-ei.length+1);ey<=eb;ey++){var eC=eM-ey|0;eg+=(eH=(ed=0|ei.words[eC])*(em=0|es.words[ey])+eL)/67108864|0,eL=67108863&eH}ef.words[eM]=0|eL,eV=0|eg}return 0!==eV?ef.words[eM]=0|eV:ef.length--,ef._strip()}em.prototype.toArrayLike=function(ei,es,ef){this._strip();var ed=this.byteLength(),em=ef||Math.max(1,ed);eu(ed<=em,"byte array longer than desired length"),eu(em>0,"Requested array length <= 0");var eH=eC(ei,em);return this["_toArrayLike"+("le"===es?"LE":"BE")](eH,ed),eH},em.prototype._toArrayLikeLE=function(ei,es){for(var ef=0,eu=0,ed=0,em=0;ed>8&255),ef>16&255),6===em?(ef>24&255),eu=0,em=0):(eu=eH>>>24,em+=2)}if(ef=0&&(ei[ef--]=eH>>8&255),ef>=0&&(ei[ef--]=eH>>16&255),6===em?(ef>=0&&(ei[ef--]=eH>>24&255),eu=0,em=0):(eu=eH>>>24,em+=2)}if(ef>=0)for(ei[ef--]=eu;ef>=0;)ei[ef--]=0},Math.clz32?em.prototype._countBits=function(ei){return 32-Math.clz32(ei)}:em.prototype._countBits=function(ei){var es=ei,ef=0;return es>=4096&&(ef+=13,es>>>=13),es>=64&&(ef+=7,es>>>=7),es>=8&&(ef+=4,es>>>=4),es>=2&&(ef+=2,es>>>=2),ef+es},em.prototype._zeroBits=function(ei){if(0===ei)return 26;var es=ei,ef=0;return(8191&es)==0&&(ef+=13,es>>>=13),(127&es)==0&&(ef+=7,es>>>=7),(15&es)==0&&(ef+=4,es>>>=4),(3&es)==0&&(ef+=2,es>>>=2),(1&es)==0&&ef++,ef},em.prototype.bitLength=function(){var ei=this.words[this.length-1],es=this._countBits(ei);return(this.length-1)*26+es},em.prototype.zeroBits=function(){if(this.isZero())return 0;for(var ei=0,es=0;esei.length?this.clone().ior(ei):ei.clone().ior(this)},em.prototype.uor=function(ei){return this.length>ei.length?this.clone().iuor(ei):ei.clone().iuor(this)},em.prototype.iuand=function(ei){var es;es=this.length>ei.length?ei:this;for(var ef=0;efei.length?this.clone().iand(ei):ei.clone().iand(this)},em.prototype.uand=function(ei){return this.length>ei.length?this.clone().iuand(ei):ei.clone().iuand(this)},em.prototype.iuxor=function(ei){this.length>ei.length?(es=this,ef=ei):(es=ei,ef=this);for(var es,ef,eu=0;euei.length?this.clone().ixor(ei):ei.clone().ixor(this)},em.prototype.uxor=function(ei){return this.length>ei.length?this.clone().iuxor(ei):ei.clone().iuxor(this)},em.prototype.inotn=function(ei){eu("number"==typeof ei&&ei>=0);var es=0|Math.ceil(ei/26),ef=ei%26;this._expand(es),ef>0&&es--;for(var ed=0;ed0&&(this.words[ed]=~this.words[ed]&67108863>>26-ef),this._strip()},em.prototype.notn=function(ei){return this.clone().inotn(ei)},em.prototype.setn=function(ei,es){eu("number"==typeof ei&&ei>=0);var ef=ei/26|0,ed=ei%26;return this._expand(ef+1),es?this.words[ef]=this.words[ef]|1<ei.length?(ef=this,eu=ei):(ef=ei,eu=this);for(var es,ef,eu,ed=0,em=0;em>>26;for(;0!==ed&&em>>26;if(this.length=ef.length,0!==ed)this.words[this.length]=ed,this.length++;else if(ef!==this)for(;emei.length?this.clone().iadd(ei):ei.clone().iadd(this)},em.prototype.isub=function(ei){if(0!==ei.negative){ei.negative=0;var es,ef,eu=this.iadd(ei);return ei.negative=1,eu._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(ei),this.negative=1,this._normSign();var ed=this.cmp(ei);if(0===ed)return this.negative=0,this.length=1,this.words[0]=0,this;ed>0?(es=this,ef=ei):(es=ei,ef=this);for(var em=0,eH=0;eH>26,this.words[eH]=67108863&eu;for(;0!==em&&eH>26,this.words[eH]=67108863&eu;if(0===em&&eH>>13,ey=0|eH[1],eC=8191&ey,ex=ey>>>13,ew=0|eH[2],eN=8191&ew,eS=ew>>>13,eA=0|eH[3],e_=8191&eA,eE=eA>>>13,eP=0|eH[4],eB=8191&eP,eT=eP>>>13,eI=0|eH[5],eR=8191&eI,eO=eI>>>13,ej=0|eH[6],eD=8191&ej,eF=ej>>>13,eU=0|eH[7],eq=8191&eU,eZ=eU>>>13,eG=0|eH[8],eW=8191&eG,eK=eG>>>13,e$=0|eH[9],eJ=8191&e$,eY=e$>>>13,eX=0|ez[0],eQ=8191&eX,e1=eX>>>13,e2=0|ez[1],e4=8191&e2,e3=e2>>>13,e6=0|ez[2],e0=8191&e6,e8=e6>>>13,e5=0|ez[3],e7=8191&e5,e9=e5>>>13,cc=0|ez[4],ci=8191&cc,co=cc>>>13,cs=0|ez[5],cf=8191&cs,cu=cs>>>13,cd=0|ez[6],cm=8191&cd,cH=cd>>>13,cz=0|ez[7],cV=8191&cz,cM=cz>>>13,cg=0|ez[8],cL=8191&cg,cy=cg>>>13,cC=0|ez[9],cx=8191&cC,cw=cC>>>13;ef.negative=ei.negative^es.negative,ef.length=19;var ck=(eM+(eu=Math.imul(eL,eQ))|0)+((8191&(ed=(ed=Math.imul(eL,e1))+Math.imul(eb,eQ)|0))<<13)|0;eM=((em=Math.imul(eb,e1))+(ed>>>13)|0)+(ck>>>26)|0,ck&=67108863,eu=Math.imul(eC,eQ),ed=(ed=Math.imul(eC,e1))+Math.imul(ex,eQ)|0,em=Math.imul(ex,e1);var cN=(eM+(eu=eu+Math.imul(eL,e4)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e3)|0)+Math.imul(eb,e4)|0))<<13)|0;eM=((em=em+Math.imul(eb,e3)|0)+(ed>>>13)|0)+(cN>>>26)|0,cN&=67108863,eu=Math.imul(eN,eQ),ed=(ed=Math.imul(eN,e1))+Math.imul(eS,eQ)|0,em=Math.imul(eS,e1),eu=eu+Math.imul(eC,e4)|0,ed=(ed=ed+Math.imul(eC,e3)|0)+Math.imul(ex,e4)|0,em=em+Math.imul(ex,e3)|0;var cS=(eM+(eu=eu+Math.imul(eL,e0)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e8)|0)+Math.imul(eb,e0)|0))<<13)|0;eM=((em=em+Math.imul(eb,e8)|0)+(ed>>>13)|0)+(cS>>>26)|0,cS&=67108863,eu=Math.imul(e_,eQ),ed=(ed=Math.imul(e_,e1))+Math.imul(eE,eQ)|0,em=Math.imul(eE,e1),eu=eu+Math.imul(eN,e4)|0,ed=(ed=ed+Math.imul(eN,e3)|0)+Math.imul(eS,e4)|0,em=em+Math.imul(eS,e3)|0,eu=eu+Math.imul(eC,e0)|0,ed=(ed=ed+Math.imul(eC,e8)|0)+Math.imul(ex,e0)|0,em=em+Math.imul(ex,e8)|0;var cA=(eM+(eu=eu+Math.imul(eL,e7)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,e9)|0)+Math.imul(eb,e7)|0))<<13)|0;eM=((em=em+Math.imul(eb,e9)|0)+(ed>>>13)|0)+(cA>>>26)|0,cA&=67108863,eu=Math.imul(eB,eQ),ed=(ed=Math.imul(eB,e1))+Math.imul(eT,eQ)|0,em=Math.imul(eT,e1),eu=eu+Math.imul(e_,e4)|0,ed=(ed=ed+Math.imul(e_,e3)|0)+Math.imul(eE,e4)|0,em=em+Math.imul(eE,e3)|0,eu=eu+Math.imul(eN,e0)|0,ed=(ed=ed+Math.imul(eN,e8)|0)+Math.imul(eS,e0)|0,em=em+Math.imul(eS,e8)|0,eu=eu+Math.imul(eC,e7)|0,ed=(ed=ed+Math.imul(eC,e9)|0)+Math.imul(ex,e7)|0,em=em+Math.imul(ex,e9)|0;var c_=(eM+(eu=eu+Math.imul(eL,ci)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,co)|0)+Math.imul(eb,ci)|0))<<13)|0;eM=((em=em+Math.imul(eb,co)|0)+(ed>>>13)|0)+(c_>>>26)|0,c_&=67108863,eu=Math.imul(eR,eQ),ed=(ed=Math.imul(eR,e1))+Math.imul(eO,eQ)|0,em=Math.imul(eO,e1),eu=eu+Math.imul(eB,e4)|0,ed=(ed=ed+Math.imul(eB,e3)|0)+Math.imul(eT,e4)|0,em=em+Math.imul(eT,e3)|0,eu=eu+Math.imul(e_,e0)|0,ed=(ed=ed+Math.imul(e_,e8)|0)+Math.imul(eE,e0)|0,em=em+Math.imul(eE,e8)|0,eu=eu+Math.imul(eN,e7)|0,ed=(ed=ed+Math.imul(eN,e9)|0)+Math.imul(eS,e7)|0,em=em+Math.imul(eS,e9)|0,eu=eu+Math.imul(eC,ci)|0,ed=(ed=ed+Math.imul(eC,co)|0)+Math.imul(ex,ci)|0,em=em+Math.imul(ex,co)|0;var cE=(eM+(eu=eu+Math.imul(eL,cf)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cu)|0)+Math.imul(eb,cf)|0))<<13)|0;eM=((em=em+Math.imul(eb,cu)|0)+(ed>>>13)|0)+(cE>>>26)|0,cE&=67108863,eu=Math.imul(eD,eQ),ed=(ed=Math.imul(eD,e1))+Math.imul(eF,eQ)|0,em=Math.imul(eF,e1),eu=eu+Math.imul(eR,e4)|0,ed=(ed=ed+Math.imul(eR,e3)|0)+Math.imul(eO,e4)|0,em=em+Math.imul(eO,e3)|0,eu=eu+Math.imul(eB,e0)|0,ed=(ed=ed+Math.imul(eB,e8)|0)+Math.imul(eT,e0)|0,em=em+Math.imul(eT,e8)|0,eu=eu+Math.imul(e_,e7)|0,ed=(ed=ed+Math.imul(e_,e9)|0)+Math.imul(eE,e7)|0,em=em+Math.imul(eE,e9)|0,eu=eu+Math.imul(eN,ci)|0,ed=(ed=ed+Math.imul(eN,co)|0)+Math.imul(eS,ci)|0,em=em+Math.imul(eS,co)|0,eu=eu+Math.imul(eC,cf)|0,ed=(ed=ed+Math.imul(eC,cu)|0)+Math.imul(ex,cf)|0,em=em+Math.imul(ex,cu)|0;var cP=(eM+(eu=eu+Math.imul(eL,cm)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cH)|0)+Math.imul(eb,cm)|0))<<13)|0;eM=((em=em+Math.imul(eb,cH)|0)+(ed>>>13)|0)+(cP>>>26)|0,cP&=67108863,eu=Math.imul(eq,eQ),ed=(ed=Math.imul(eq,e1))+Math.imul(eZ,eQ)|0,em=Math.imul(eZ,e1),eu=eu+Math.imul(eD,e4)|0,ed=(ed=ed+Math.imul(eD,e3)|0)+Math.imul(eF,e4)|0,em=em+Math.imul(eF,e3)|0,eu=eu+Math.imul(eR,e0)|0,ed=(ed=ed+Math.imul(eR,e8)|0)+Math.imul(eO,e0)|0,em=em+Math.imul(eO,e8)|0,eu=eu+Math.imul(eB,e7)|0,ed=(ed=ed+Math.imul(eB,e9)|0)+Math.imul(eT,e7)|0,em=em+Math.imul(eT,e9)|0,eu=eu+Math.imul(e_,ci)|0,ed=(ed=ed+Math.imul(e_,co)|0)+Math.imul(eE,ci)|0,em=em+Math.imul(eE,co)|0,eu=eu+Math.imul(eN,cf)|0,ed=(ed=ed+Math.imul(eN,cu)|0)+Math.imul(eS,cf)|0,em=em+Math.imul(eS,cu)|0,eu=eu+Math.imul(eC,cm)|0,ed=(ed=ed+Math.imul(eC,cH)|0)+Math.imul(ex,cm)|0,em=em+Math.imul(ex,cH)|0;var cB=(eM+(eu=eu+Math.imul(eL,cV)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cM)|0)+Math.imul(eb,cV)|0))<<13)|0;eM=((em=em+Math.imul(eb,cM)|0)+(ed>>>13)|0)+(cB>>>26)|0,cB&=67108863,eu=Math.imul(eW,eQ),ed=(ed=Math.imul(eW,e1))+Math.imul(eK,eQ)|0,em=Math.imul(eK,e1),eu=eu+Math.imul(eq,e4)|0,ed=(ed=ed+Math.imul(eq,e3)|0)+Math.imul(eZ,e4)|0,em=em+Math.imul(eZ,e3)|0,eu=eu+Math.imul(eD,e0)|0,ed=(ed=ed+Math.imul(eD,e8)|0)+Math.imul(eF,e0)|0,em=em+Math.imul(eF,e8)|0,eu=eu+Math.imul(eR,e7)|0,ed=(ed=ed+Math.imul(eR,e9)|0)+Math.imul(eO,e7)|0,em=em+Math.imul(eO,e9)|0,eu=eu+Math.imul(eB,ci)|0,ed=(ed=ed+Math.imul(eB,co)|0)+Math.imul(eT,ci)|0,em=em+Math.imul(eT,co)|0,eu=eu+Math.imul(e_,cf)|0,ed=(ed=ed+Math.imul(e_,cu)|0)+Math.imul(eE,cf)|0,em=em+Math.imul(eE,cu)|0,eu=eu+Math.imul(eN,cm)|0,ed=(ed=ed+Math.imul(eN,cH)|0)+Math.imul(eS,cm)|0,em=em+Math.imul(eS,cH)|0,eu=eu+Math.imul(eC,cV)|0,ed=(ed=ed+Math.imul(eC,cM)|0)+Math.imul(ex,cV)|0,em=em+Math.imul(ex,cM)|0;var cT=(eM+(eu=eu+Math.imul(eL,cL)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cy)|0)+Math.imul(eb,cL)|0))<<13)|0;eM=((em=em+Math.imul(eb,cy)|0)+(ed>>>13)|0)+(cT>>>26)|0,cT&=67108863,eu=Math.imul(eJ,eQ),ed=(ed=Math.imul(eJ,e1))+Math.imul(eY,eQ)|0,em=Math.imul(eY,e1),eu=eu+Math.imul(eW,e4)|0,ed=(ed=ed+Math.imul(eW,e3)|0)+Math.imul(eK,e4)|0,em=em+Math.imul(eK,e3)|0,eu=eu+Math.imul(eq,e0)|0,ed=(ed=ed+Math.imul(eq,e8)|0)+Math.imul(eZ,e0)|0,em=em+Math.imul(eZ,e8)|0,eu=eu+Math.imul(eD,e7)|0,ed=(ed=ed+Math.imul(eD,e9)|0)+Math.imul(eF,e7)|0,em=em+Math.imul(eF,e9)|0,eu=eu+Math.imul(eR,ci)|0,ed=(ed=ed+Math.imul(eR,co)|0)+Math.imul(eO,ci)|0,em=em+Math.imul(eO,co)|0,eu=eu+Math.imul(eB,cf)|0,ed=(ed=ed+Math.imul(eB,cu)|0)+Math.imul(eT,cf)|0,em=em+Math.imul(eT,cu)|0,eu=eu+Math.imul(e_,cm)|0,ed=(ed=ed+Math.imul(e_,cH)|0)+Math.imul(eE,cm)|0,em=em+Math.imul(eE,cH)|0,eu=eu+Math.imul(eN,cV)|0,ed=(ed=ed+Math.imul(eN,cM)|0)+Math.imul(eS,cV)|0,em=em+Math.imul(eS,cM)|0,eu=eu+Math.imul(eC,cL)|0,ed=(ed=ed+Math.imul(eC,cy)|0)+Math.imul(ex,cL)|0,em=em+Math.imul(ex,cy)|0;var cI=(eM+(eu=eu+Math.imul(eL,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eL,cw)|0)+Math.imul(eb,cx)|0))<<13)|0;eM=((em=em+Math.imul(eb,cw)|0)+(ed>>>13)|0)+(cI>>>26)|0,cI&=67108863,eu=Math.imul(eJ,e4),ed=(ed=Math.imul(eJ,e3))+Math.imul(eY,e4)|0,em=Math.imul(eY,e3),eu=eu+Math.imul(eW,e0)|0,ed=(ed=ed+Math.imul(eW,e8)|0)+Math.imul(eK,e0)|0,em=em+Math.imul(eK,e8)|0,eu=eu+Math.imul(eq,e7)|0,ed=(ed=ed+Math.imul(eq,e9)|0)+Math.imul(eZ,e7)|0,em=em+Math.imul(eZ,e9)|0,eu=eu+Math.imul(eD,ci)|0,ed=(ed=ed+Math.imul(eD,co)|0)+Math.imul(eF,ci)|0,em=em+Math.imul(eF,co)|0,eu=eu+Math.imul(eR,cf)|0,ed=(ed=ed+Math.imul(eR,cu)|0)+Math.imul(eO,cf)|0,em=em+Math.imul(eO,cu)|0,eu=eu+Math.imul(eB,cm)|0,ed=(ed=ed+Math.imul(eB,cH)|0)+Math.imul(eT,cm)|0,em=em+Math.imul(eT,cH)|0,eu=eu+Math.imul(e_,cV)|0,ed=(ed=ed+Math.imul(e_,cM)|0)+Math.imul(eE,cV)|0,em=em+Math.imul(eE,cM)|0,eu=eu+Math.imul(eN,cL)|0,ed=(ed=ed+Math.imul(eN,cy)|0)+Math.imul(eS,cL)|0,em=em+Math.imul(eS,cy)|0;var cR=(eM+(eu=eu+Math.imul(eC,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eC,cw)|0)+Math.imul(ex,cx)|0))<<13)|0;eM=((em=em+Math.imul(ex,cw)|0)+(ed>>>13)|0)+(cR>>>26)|0,cR&=67108863,eu=Math.imul(eJ,e0),ed=(ed=Math.imul(eJ,e8))+Math.imul(eY,e0)|0,em=Math.imul(eY,e8),eu=eu+Math.imul(eW,e7)|0,ed=(ed=ed+Math.imul(eW,e9)|0)+Math.imul(eK,e7)|0,em=em+Math.imul(eK,e9)|0,eu=eu+Math.imul(eq,ci)|0,ed=(ed=ed+Math.imul(eq,co)|0)+Math.imul(eZ,ci)|0,em=em+Math.imul(eZ,co)|0,eu=eu+Math.imul(eD,cf)|0,ed=(ed=ed+Math.imul(eD,cu)|0)+Math.imul(eF,cf)|0,em=em+Math.imul(eF,cu)|0,eu=eu+Math.imul(eR,cm)|0,ed=(ed=ed+Math.imul(eR,cH)|0)+Math.imul(eO,cm)|0,em=em+Math.imul(eO,cH)|0,eu=eu+Math.imul(eB,cV)|0,ed=(ed=ed+Math.imul(eB,cM)|0)+Math.imul(eT,cV)|0,em=em+Math.imul(eT,cM)|0,eu=eu+Math.imul(e_,cL)|0,ed=(ed=ed+Math.imul(e_,cy)|0)+Math.imul(eE,cL)|0,em=em+Math.imul(eE,cy)|0;var cO=(eM+(eu=eu+Math.imul(eN,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eN,cw)|0)+Math.imul(eS,cx)|0))<<13)|0;eM=((em=em+Math.imul(eS,cw)|0)+(ed>>>13)|0)+(cO>>>26)|0,cO&=67108863,eu=Math.imul(eJ,e7),ed=(ed=Math.imul(eJ,e9))+Math.imul(eY,e7)|0,em=Math.imul(eY,e9),eu=eu+Math.imul(eW,ci)|0,ed=(ed=ed+Math.imul(eW,co)|0)+Math.imul(eK,ci)|0,em=em+Math.imul(eK,co)|0,eu=eu+Math.imul(eq,cf)|0,ed=(ed=ed+Math.imul(eq,cu)|0)+Math.imul(eZ,cf)|0,em=em+Math.imul(eZ,cu)|0,eu=eu+Math.imul(eD,cm)|0,ed=(ed=ed+Math.imul(eD,cH)|0)+Math.imul(eF,cm)|0,em=em+Math.imul(eF,cH)|0,eu=eu+Math.imul(eR,cV)|0,ed=(ed=ed+Math.imul(eR,cM)|0)+Math.imul(eO,cV)|0,em=em+Math.imul(eO,cM)|0,eu=eu+Math.imul(eB,cL)|0,ed=(ed=ed+Math.imul(eB,cy)|0)+Math.imul(eT,cL)|0,em=em+Math.imul(eT,cy)|0;var cj=(eM+(eu=eu+Math.imul(e_,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(e_,cw)|0)+Math.imul(eE,cx)|0))<<13)|0;eM=((em=em+Math.imul(eE,cw)|0)+(ed>>>13)|0)+(cj>>>26)|0,cj&=67108863,eu=Math.imul(eJ,ci),ed=(ed=Math.imul(eJ,co))+Math.imul(eY,ci)|0,em=Math.imul(eY,co),eu=eu+Math.imul(eW,cf)|0,ed=(ed=ed+Math.imul(eW,cu)|0)+Math.imul(eK,cf)|0,em=em+Math.imul(eK,cu)|0,eu=eu+Math.imul(eq,cm)|0,ed=(ed=ed+Math.imul(eq,cH)|0)+Math.imul(eZ,cm)|0,em=em+Math.imul(eZ,cH)|0,eu=eu+Math.imul(eD,cV)|0,ed=(ed=ed+Math.imul(eD,cM)|0)+Math.imul(eF,cV)|0,em=em+Math.imul(eF,cM)|0,eu=eu+Math.imul(eR,cL)|0,ed=(ed=ed+Math.imul(eR,cy)|0)+Math.imul(eO,cL)|0,em=em+Math.imul(eO,cy)|0;var cD=(eM+(eu=eu+Math.imul(eB,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eB,cw)|0)+Math.imul(eT,cx)|0))<<13)|0;eM=((em=em+Math.imul(eT,cw)|0)+(ed>>>13)|0)+(cD>>>26)|0,cD&=67108863,eu=Math.imul(eJ,cf),ed=(ed=Math.imul(eJ,cu))+Math.imul(eY,cf)|0,em=Math.imul(eY,cu),eu=eu+Math.imul(eW,cm)|0,ed=(ed=ed+Math.imul(eW,cH)|0)+Math.imul(eK,cm)|0,em=em+Math.imul(eK,cH)|0,eu=eu+Math.imul(eq,cV)|0,ed=(ed=ed+Math.imul(eq,cM)|0)+Math.imul(eZ,cV)|0,em=em+Math.imul(eZ,cM)|0,eu=eu+Math.imul(eD,cL)|0,ed=(ed=ed+Math.imul(eD,cy)|0)+Math.imul(eF,cL)|0,em=em+Math.imul(eF,cy)|0;var cF=(eM+(eu=eu+Math.imul(eR,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eR,cw)|0)+Math.imul(eO,cx)|0))<<13)|0;eM=((em=em+Math.imul(eO,cw)|0)+(ed>>>13)|0)+(cF>>>26)|0,cF&=67108863,eu=Math.imul(eJ,cm),ed=(ed=Math.imul(eJ,cH))+Math.imul(eY,cm)|0,em=Math.imul(eY,cH),eu=eu+Math.imul(eW,cV)|0,ed=(ed=ed+Math.imul(eW,cM)|0)+Math.imul(eK,cV)|0,em=em+Math.imul(eK,cM)|0,eu=eu+Math.imul(eq,cL)|0,ed=(ed=ed+Math.imul(eq,cy)|0)+Math.imul(eZ,cL)|0,em=em+Math.imul(eZ,cy)|0;var cU=(eM+(eu=eu+Math.imul(eD,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eD,cw)|0)+Math.imul(eF,cx)|0))<<13)|0;eM=((em=em+Math.imul(eF,cw)|0)+(ed>>>13)|0)+(cU>>>26)|0,cU&=67108863,eu=Math.imul(eJ,cV),ed=(ed=Math.imul(eJ,cM))+Math.imul(eY,cV)|0,em=Math.imul(eY,cM),eu=eu+Math.imul(eW,cL)|0,ed=(ed=ed+Math.imul(eW,cy)|0)+Math.imul(eK,cL)|0,em=em+Math.imul(eK,cy)|0;var cq=(eM+(eu=eu+Math.imul(eq,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eq,cw)|0)+Math.imul(eZ,cx)|0))<<13)|0;eM=((em=em+Math.imul(eZ,cw)|0)+(ed>>>13)|0)+(cq>>>26)|0,cq&=67108863,eu=Math.imul(eJ,cL),ed=(ed=Math.imul(eJ,cy))+Math.imul(eY,cL)|0,em=Math.imul(eY,cy);var cZ=(eM+(eu=eu+Math.imul(eW,cx)|0)|0)+((8191&(ed=(ed=ed+Math.imul(eW,cw)|0)+Math.imul(eK,cx)|0))<<13)|0;eM=((em=em+Math.imul(eK,cw)|0)+(ed>>>13)|0)+(cZ>>>26)|0,cZ&=67108863;var cG=(eM+(eu=Math.imul(eJ,cx))|0)+((8191&(ed=(ed=Math.imul(eJ,cw))+Math.imul(eY,cx)|0))<<13)|0;return eM=((em=Math.imul(eY,cw))+(ed>>>13)|0)+(cG>>>26)|0,cG&=67108863,eV[0]=ck,eV[1]=cN,eV[2]=cS,eV[3]=cA,eV[4]=c_,eV[5]=cE,eV[6]=cP,eV[7]=cB,eV[8]=cT,eV[9]=cI,eV[10]=cR,eV[11]=cO,eV[12]=cj,eV[13]=cD,eV[14]=cF,eV[15]=cU,eV[16]=cq,eV[17]=cZ,eV[18]=cG,0!==eM&&(eV[19]=eM,ef.length++),ef};function eS(ei,es,ef){ef.negative=es.negative^ei.negative,ef.length=ei.length+es.length;for(var eu=0,ed=0,em=0;em>>26)|0)>>>26,eH&=67108863}ef.words[em]=ez,eu=eH,eH=ed}return 0!==eu?ef.words[em]=eu:ef.length--,ef._strip()}function eA(ei,es,ef){return eS(ei,es,ef)}function e_(ei,es){this.x=ei,this.y=es}Math.imul||(eN=ew),em.prototype.mulTo=function(ei,es){var ef=this.length+ei.length;return 10===this.length&&10===ei.length?eN(this,ei,es):ef<63?ew(this,ei,es):ef<1024?eS(this,ei,es):eA(this,ei,es)},e_.prototype.makeRBT=function(ei){for(var es=Array(ei),ef=em.prototype._countBits(ei)-1,eu=0;eu>=1;return eu},e_.prototype.permute=function(ei,es,ef,eu,ed,em){for(var eH=0;eH>>=1)ed++;return 1<>>=13,ef[2*eH+1]=8191&em,em>>>=13;for(eH=2*es;eH>=26,ef+=(em/67108864|0)+(eH>>>26),this.words[ed]=67108863&eH}return 0!==ef&&(this.words[ed]=ef,this.length++),es?this.ineg():this},em.prototype.muln=function(ei){return this.clone().imuln(ei)},em.prototype.sqr=function(){return this.mul(this)},em.prototype.isqr=function(){return this.imul(this.clone())},em.prototype.pow=function(ei){var es=ex(ei);if(0===es.length)return new em(1);for(var ef=this,eu=0;eu=0);var es,ef=ei%26,ed=(ei-ef)/26,em=67108863>>>26-ef<<26-ef;if(0!==ef){var eH=0;for(es=0;es>>26-ef}eH&&(this.words[es]=eH,this.length++)}if(0!==ed){for(es=this.length-1;es>=0;es--)this.words[es+ed]=this.words[es];for(es=0;es=0),ed=es?(es-es%26)/26:0;var ed,em=ei%26,eH=Math.min((ei-em)/26,this.length),ez=67108863^67108863>>>em<eH)for(this.length-=eH,eM=0;eM=0&&(0!==eg||eM>=ed);eM--){var eL=0|this.words[eM];this.words[eM]=eg<<26-em|eL>>>em,eg=eL&ez}return eV&&0!==eg&&(eV.words[eV.length++]=eg),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},em.prototype.ishrn=function(ei,es,ef){return eu(0===this.negative),this.iushrn(ei,es,ef)},em.prototype.shln=function(ei){return this.clone().ishln(ei)},em.prototype.ushln=function(ei){return this.clone().iushln(ei)},em.prototype.shrn=function(ei){return this.clone().ishrn(ei)},em.prototype.ushrn=function(ei){return this.clone().iushrn(ei)},em.prototype.testn=function(ei){eu("number"==typeof ei&&ei>=0);var es=ei%26,ef=(ei-es)/26,ed=1<=0);var es=ei%26,ef=(ei-es)/26;if(eu(0===this.negative,"imaskn works only with positive numbers"),this.length<=ef)return this;if(0!==es&&ef++,this.length=Math.min(ef,this.length),0!==es){var ed=67108863^67108863>>>es<=67108864;es++)this.words[es]-=67108864,es===this.length-1?this.words[es+1]=1:this.words[es+1]++;return this.length=Math.max(this.length,es+1),this},em.prototype.isubn=function(ei){if(eu("number"==typeof ei),eu(ei<67108864),ei<0)return this.iaddn(-ei);if(0!==this.negative)return this.negative=0,this.iaddn(ei),this.negative=1,this;if(this.words[0]-=ei,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var es=0;es>26)-(eV/67108864|0),this.words[ed+ef]=67108863&em}for(;ed>26,this.words[ed+ef]=67108863&em;if(0===ez)return this._strip();for(eu(-1===ez),ez=0,ed=0;ed>26,this.words[ed]=67108863&em;return this.negative=1,this._strip()},em.prototype._wordDiv=function(ei,es){var ef,eu=this.length-ei.length,ed=this.clone(),eH=ei,ez=0|eH.words[eH.length-1];0!=(eu=26-this._countBits(ez))&&(eH=eH.ushln(eu),ed.iushln(eu),ez=0|eH.words[eH.length-1]);var eV=ed.length-eH.length;if("mod"!==es){(ef=new em(null)).length=eV+1,ef.words=Array(ef.length);for(var eM=0;eM=0;eL--){var eb=(0|ed.words[eH.length+eL])*67108864+(0|ed.words[eH.length+eL-1]);for(eb=Math.min(eb/ez|0,67108863),ed._ishlnsubmul(eH,eb,eL);0!==ed.negative;)eb--,ed.negative=0,ed._ishlnsubmul(eH,1,eL),ed.isZero()||(ed.negative^=1);ef&&(ef.words[eL]=eb)}return ef&&ef._strip(),ed._strip(),"div"!==es&&0!==eu&&ed.iushrn(eu),{div:ef||null,mod:ed}},em.prototype.divmod=function(ei,es,ef){var ed,eH,ez;return(eu(!ei.isZero()),this.isZero())?{div:new em(0),mod:new em(0)}:0!==this.negative&&0===ei.negative?(ez=this.neg().divmod(ei,es),"mod"!==es&&(ed=ez.div.neg()),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.iadd(ei)),{div:ed,mod:eH}):0===this.negative&&0!==ei.negative?(ez=this.divmod(ei.neg(),es),"mod"!==es&&(ed=ez.div.neg()),{div:ed,mod:ez.mod}):(this.negative&ei.negative)!=0?(ez=this.neg().divmod(ei.neg(),es),"div"!==es&&(eH=ez.mod.neg(),ef&&0!==eH.negative&&eH.isub(ei)),{div:ez.div,mod:eH}):ei.length>this.length||0>this.cmp(ei)?{div:new em(0),mod:this}:1===ei.length?"div"===es?{div:this.divn(ei.words[0]),mod:null}:"mod"===es?{div:null,mod:new em(this.modrn(ei.words[0]))}:{div:this.divn(ei.words[0]),mod:new em(this.modrn(ei.words[0]))}:this._wordDiv(ei,es)},em.prototype.div=function(ei){return this.divmod(ei,"div",!1).div},em.prototype.mod=function(ei){return this.divmod(ei,"mod",!1).mod},em.prototype.umod=function(ei){return this.divmod(ei,"mod",!0).mod},em.prototype.divRound=function(ei){var es=this.divmod(ei);if(es.mod.isZero())return es.div;var ef=0!==es.div.negative?es.mod.isub(ei):es.mod,eu=ei.ushrn(1),ed=ei.andln(1),em=ef.cmp(eu);return em<0||1===ed&&0===em?es.div:0!==es.div.negative?es.div.isubn(1):es.div.iaddn(1)},em.prototype.modrn=function(ei){var es=ei<0;es&&(ei=-ei),eu(ei<=67108863);for(var ef=67108864%ei,ed=0,em=this.length-1;em>=0;em--)ed=(ef*ed+(0|this.words[em]))%ei;return es?-ed:ed},em.prototype.modn=function(ei){return this.modrn(ei)},em.prototype.idivn=function(ei){var es=ei<0;es&&(ei=-ei),eu(ei<=67108863);for(var ef=0,ed=this.length-1;ed>=0;ed--){var em=(0|this.words[ed])+67108864*ef;this.words[ed]=em/ei|0,ef=em%ei}return this._strip(),es?this.ineg():this},em.prototype.divn=function(ei){return this.clone().idivn(ei)},em.prototype.egcd=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es=this,ef=ei.clone();es=0!==es.negative?es.umod(ei):es.clone();for(var ed=new em(1),eH=new em(0),ez=new em(0),eV=new em(1),eM=0;es.isEven()&&ef.isEven();)es.iushrn(1),ef.iushrn(1),++eM;for(var eg=ef.clone(),eL=es.clone();!es.isZero();){for(var eb=0,ey=1;(es.words[0]&ey)==0&&eb<26;++eb,ey<<=1);if(eb>0)for(es.iushrn(eb);eb-- >0;)(ed.isOdd()||eH.isOdd())&&(ed.iadd(eg),eH.isub(eL)),ed.iushrn(1),eH.iushrn(1);for(var eC=0,ex=1;(ef.words[0]&ex)==0&&eC<26;++eC,ex<<=1);if(eC>0)for(ef.iushrn(eC);eC-- >0;)(ez.isOdd()||eV.isOdd())&&(ez.iadd(eg),eV.isub(eL)),ez.iushrn(1),eV.iushrn(1);es.cmp(ef)>=0?(es.isub(ef),ed.isub(ez),eH.isub(eV)):(ef.isub(es),ez.isub(ed),eV.isub(eH))}return{a:ez,b:eV,gcd:ef.iushln(eM)}},em.prototype._invmp=function(ei){eu(0===ei.negative),eu(!ei.isZero());var es,ef=this,ed=ei.clone();ef=0!==ef.negative?ef.umod(ei):ef.clone();for(var eH=new em(1),ez=new em(0),eV=ed.clone();ef.cmpn(1)>0&&ed.cmpn(1)>0;){for(var eM=0,eg=1;(ef.words[0]&eg)==0&&eM<26;++eM,eg<<=1);if(eM>0)for(ef.iushrn(eM);eM-- >0;)eH.isOdd()&&eH.iadd(eV),eH.iushrn(1);for(var eL=0,eb=1;(ed.words[0]&eb)==0&&eL<26;++eL,eb<<=1);if(eL>0)for(ed.iushrn(eL);eL-- >0;)ez.isOdd()&&ez.iadd(eV),ez.iushrn(1);ef.cmp(ed)>=0?(ef.isub(ed),eH.isub(ez)):(ed.isub(ef),ez.isub(eH))}return 0>(es=0===ef.cmpn(1)?eH:ez).cmpn(0)&&es.iadd(ei),es},em.prototype.gcd=function(ei){if(this.isZero())return ei.abs();if(ei.isZero())return this.abs();var es=this.clone(),ef=ei.clone();es.negative=0,ef.negative=0;for(var eu=0;es.isEven()&&ef.isEven();eu++)es.iushrn(1),ef.iushrn(1);for(;;){for(;es.isEven();)es.iushrn(1);for(;ef.isEven();)ef.iushrn(1);var ed=es.cmp(ef);if(ed<0){var em=es;es=ef,ef=em}else if(0===ed||0===ef.cmpn(1))break;es.isub(ef)}return ef.iushln(eu)},em.prototype.invm=function(ei){return this.egcd(ei).a.umod(ei)},em.prototype.isEven=function(){return(1&this.words[0])==0},em.prototype.isOdd=function(){return(1&this.words[0])==1},em.prototype.andln=function(ei){return this.words[0]&ei},em.prototype.bincn=function(ei){eu("number"==typeof ei);var es=ei%26,ef=(ei-es)/26,ed=1<>>26,ez&=67108863,this.words[eH]=ez}return 0!==em&&(this.words[eH]=em,this.length++),this},em.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},em.prototype.cmpn=function(ei){var es,ef=ei<0;if(0!==this.negative&&!ef)return -1;if(0===this.negative&&ef)return 1;if(this._strip(),this.length>1)es=1;else{ef&&(ei=-ei),eu(ei<=67108863,"Number is too big");var ed=0|this.words[0];es=ed===ei?0:edei.length)return 1;if(this.length=0;ef--){var eu=0|this.words[ef],ed=0|ei.words[ef];if(eu!==ed){eued&&(es=1);break}}return es},em.prototype.gtn=function(ei){return 1===this.cmpn(ei)},em.prototype.gt=function(ei){return 1===this.cmp(ei)},em.prototype.gten=function(ei){return this.cmpn(ei)>=0},em.prototype.gte=function(ei){return this.cmp(ei)>=0},em.prototype.ltn=function(ei){return -1===this.cmpn(ei)},em.prototype.lt=function(ei){return -1===this.cmp(ei)},em.prototype.lten=function(ei){return 0>=this.cmpn(ei)},em.prototype.lte=function(ei){return 0>=this.cmp(ei)},em.prototype.eqn=function(ei){return 0===this.cmpn(ei)},em.prototype.eq=function(ei){return 0===this.cmp(ei)},em.red=function(ei){return new eO(ei)},em.prototype.toRed=function(ei){return eu(!this.red,"Already a number in reduction context"),eu(0===this.negative,"red works only with positives"),ei.convertTo(this)._forceRed(ei)},em.prototype.fromRed=function(){return eu(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},em.prototype._forceRed=function(ei){return this.red=ei,this},em.prototype.forceRed=function(ei){return eu(!this.red,"Already a number in reduction context"),this._forceRed(ei)},em.prototype.redAdd=function(ei){return eu(this.red,"redAdd works only with red numbers"),this.red.add(this,ei)},em.prototype.redIAdd=function(ei){return eu(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,ei)},em.prototype.redSub=function(ei){return eu(this.red,"redSub works only with red numbers"),this.red.sub(this,ei)},em.prototype.redISub=function(ei){return eu(this.red,"redISub works only with red numbers"),this.red.isub(this,ei)},em.prototype.redShl=function(ei){return eu(this.red,"redShl works only with red numbers"),this.red.shl(this,ei)},em.prototype.redMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.mul(this,ei)},em.prototype.redIMul=function(ei){return eu(this.red,"redMul works only with red numbers"),this.red._verify2(this,ei),this.red.imul(this,ei)},em.prototype.redSqr=function(){return eu(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},em.prototype.redISqr=function(){return eu(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},em.prototype.redSqrt=function(){return eu(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},em.prototype.redInvm=function(){return eu(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},em.prototype.redNeg=function(){return eu(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},em.prototype.redPow=function(ei){return eu(this.red&&!ei.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,ei)};var eE={k256:null,p224:null,p192:null,p25519:null};function eP(ei,es){this.name=ei,this.p=new em(es,16),this.n=this.p.bitLength(),this.k=new em(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function eB(){eP.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function eT(){eP.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function eI(){eP.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function eR(){eP.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function eO(ei){if("string"==typeof ei){var es=em._prime(ei);this.m=es.p,this.prime=es}else eu(ei.gtn(1),"modulus must be greater than 1"),this.m=ei,this.prime=null}function ej(ei){eO.call(this,ei),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new em(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)}eP.prototype._tmp=function(){var ei=new em(null);return ei.words=Array(Math.ceil(this.n/13)),ei},eP.prototype.ireduce=function(ei){var es,ef=ei;do this.split(ef,this.tmp),es=(ef=(ef=this.imulK(ef)).iadd(this.tmp)).bitLength();while(es>this.n);var eu=es0?ef.isub(this.p):void 0!==ef.strip?ef.strip():ef._strip(),ef},eP.prototype.split=function(ei,es){ei.iushrn(this.n,0,es)},eP.prototype.imulK=function(ei){return ei.imul(this.k)},ed(eB,eP),eB.prototype.split=function(ei,es){for(var ef=4194303,eu=Math.min(ei.length,9),ed=0;ed>>22,em=eH}em>>>=22,ei.words[ed-10]=em,0===em&&ei.length>10?ei.length-=10:ei.length-=9},eB.prototype.imulK=function(ei){ei.words[ei.length]=0,ei.words[ei.length+1]=0,ei.length+=2;for(var es=0,ef=0;ef>>=26,ei.words[ef]=ed,es=eu}return 0!==es&&(ei.words[ei.length++]=es),ei},em._prime=function(ei){var es;if(eE[ei])return eE[ei];if("k256"===ei)es=new eB;else if("p224"===ei)es=new eT;else if("p192"===ei)es=new eI;else if("p25519"===ei)es=new eR;else throw Error("Unknown prime "+ei);return eE[ei]=es,es},eO.prototype._verify1=function(ei){eu(0===ei.negative,"red works only with positives"),eu(ei.red,"red works only with red numbers")},eO.prototype._verify2=function(ei,es){eu((ei.negative|es.negative)==0,"red works only with positives"),eu(ei.red&&ei.red===es.red,"red works only with red numbers")},eO.prototype.imod=function(ei){return this.prime?this.prime.ireduce(ei)._forceRed(this):(eV(ei,ei.umod(this.m)._forceRed(this)),ei)},eO.prototype.neg=function(ei){return ei.isZero()?ei.clone():this.m.sub(ei)._forceRed(this)},eO.prototype.add=function(ei,es){this._verify2(ei,es);var ef=ei.add(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef._forceRed(this)},eO.prototype.iadd=function(ei,es){this._verify2(ei,es);var ef=ei.iadd(es);return ef.cmp(this.m)>=0&&ef.isub(this.m),ef},eO.prototype.sub=function(ei,es){this._verify2(ei,es);var ef=ei.sub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef._forceRed(this)},eO.prototype.isub=function(ei,es){this._verify2(ei,es);var ef=ei.isub(es);return 0>ef.cmpn(0)&&ef.iadd(this.m),ef},eO.prototype.shl=function(ei,es){return this._verify1(ei),this.imod(ei.ushln(es))},eO.prototype.imul=function(ei,es){return this._verify2(ei,es),this.imod(ei.imul(es))},eO.prototype.mul=function(ei,es){return this._verify2(ei,es),this.imod(ei.mul(es))},eO.prototype.isqr=function(ei){return this.imul(ei,ei.clone())},eO.prototype.sqr=function(ei){return this.mul(ei,ei)},eO.prototype.sqrt=function(ei){if(ei.isZero())return ei.clone();var es=this.m.andln(3);if(eu(es%2==1),3===es){var ef=this.m.add(new em(1)).iushrn(2);return this.pow(ei,ef)}for(var ed=this.m.subn(1),eH=0;!ed.isZero()&&0===ed.andln(1);)eH++,ed.iushrn(1);eu(!ed.isZero());var ez=new em(1).toRed(this),eV=ez.redNeg(),eM=this.m.subn(1).iushrn(1),eg=this.m.bitLength();for(eg=new em(2*eg*eg).toRed(this);0!==this.pow(eg,eM).cmp(eV);)eg.redIAdd(eV);for(var eL=this.pow(eg,ed),eb=this.pow(ei,ed.addn(1).iushrn(1)),ey=this.pow(ei,ed),eC=eH;0!==ey.cmp(ez);){for(var ex=ey,ew=0;0!==ex.cmp(ez);ew++)ex=ex.redSqr();eu(ew=0;ed--){for(var eg=es.words[ed],eL=eM-1;eL>=0;eL--){var eb=eg>>eL&1;if(eH!==eu[0]&&(eH=this.sqr(eH)),0===eb&&0===ez){eV=0;continue}ez<<=1,ez|=eb,(++eV===ef||0===ed&&0===eL)&&(eH=this.mul(eH,eu[ez]),eV=0,ez=0)}eM=26}return eH},eO.prototype.convertTo=function(ei){var es=ei.umod(this.m);return es===ei?es.clone():es},eO.prototype.convertFrom=function(ei){var es=ei.clone();return es.red=null,es},em.mont=function(ei){return new ej(ei)},ed(ej,eO),ej.prototype.convertTo=function(ei){return this.imod(ei.ushln(this.shift))},ej.prototype.convertFrom=function(ei){var es=this.imod(ei.mul(this.rinv));return es.red=null,es},ej.prototype.imul=function(ei,es){if(ei.isZero()||es.isZero())return ei.words[0]=0,ei.length=1,ei;var ef=ei.imul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),em=ed;return ed.cmp(this.m)>=0?em=ed.isub(this.m):0>ed.cmpn(0)&&(em=ed.iadd(this.m)),em._forceRed(this)},ej.prototype.mul=function(ei,es){if(ei.isZero()||es.isZero())return new em(0)._forceRed(this);var ef=ei.mul(es),eu=ef.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ed=ef.isub(eu).iushrn(this.shift),eH=ed;return ed.cmp(this.m)>=0?eH=ed.isub(this.m):0>ed.cmpn(0)&&(eH=ed.iadd(this.m)),eH._forceRed(this)},ej.prototype.invm=function(ei){return this.imod(ei._invmp(this.m).mul(this.r2))._forceRed(this)}}(ei=ef.nmd(ei),this)},3500:function(ei,es,ef){var eu;function ed(ei){this.rand=ei}if(ei.exports=function(ei){return eu||(eu=new ed(null)),eu.generate(ei)},ei.exports.Rand=ed,ed.prototype.generate=function(ei){return this._rand(ei)},ed.prototype._rand=function(ei){if(this.rand.getBytes)return this.rand.getBytes(ei);for(var es=new Uint8Array(ei),ef=0;ef>>24]^eg[eC>>>16&255]^eL[ex>>>8&255]^eb[255&ew]^es[eN++],eH=eM[eC>>>24]^eg[ex>>>16&255]^eL[ew>>>8&255]^eb[255&ey]^es[eN++],ez=eM[ex>>>24]^eg[ew>>>16&255]^eL[ey>>>8&255]^eb[255&eC]^es[eN++],eV=eM[ew>>>24]^eg[ey>>>16&255]^eL[eC>>>8&255]^eb[255&ex]^es[eN++],ey=em,eC=eH,ex=ez,ew=eV;return em=(eu[ey>>>24]<<24|eu[eC>>>16&255]<<16|eu[ex>>>8&255]<<8|eu[255&ew])^es[eN++],eH=(eu[eC>>>24]<<24|eu[ex>>>16&255]<<16|eu[ew>>>8&255]<<8|eu[255&ey])^es[eN++],[em>>>=0,eH>>>=0,ez=((eu[ex>>>24]<<24|eu[ew>>>16&255]<<16|eu[ey>>>8&255]<<8|eu[255&eC])^es[eN++])>>>0,eV=((eu[ew>>>24]<<24|eu[ey>>>16&255]<<16|eu[eC>>>8&255]<<8|eu[255&ex])^es[eN++])>>>0]}var ez=[0,1,2,4,8,16,32,64,128,27,54],eV=function(){for(var ei=Array(256),es=0;es<256;es++)es<128?ei[es]=es<<1:ei[es]=es<<1^283;for(var ef=[],eu=[],ed=[[],[],[],[]],em=[[],[],[],[]],eH=0,ez=0,eV=0;eV<256;++eV){var eM=ez^ez<<1^ez<<2^ez<<3^ez<<4;eM=eM>>>8^255&eM^99,ef[eH]=eM,eu[eM]=eH;var eg=ei[eH],eL=ei[eg],eb=ei[eL],ey=257*ei[eM]^16843008*eM;ed[0][eH]=ey<<24|ey>>>8,ed[1][eH]=ey<<16|ey>>>16,ed[2][eH]=ey<<8|ey>>>24,ed[3][eH]=ey,ey=16843009*eb^65537*eL^257*eg^16843008*eH,em[0][eM]=ey<<24|ey>>>8,em[1][eM]=ey<<16|ey>>>16,em[2][eM]=ey<<8|ey>>>24,em[3][eM]=ey,0===eH?eH=ez=1:(eH=eg^ei[ei[ei[eb^eg]]],ez^=ei[ei[ez]])}return{SBOX:ef,INV_SBOX:eu,SUB_MIX:ed,INV_SUB_MIX:em}}();function eM(ei){this._key=ed(ei),this._reset()}eM.blockSize=16,eM.keySize=32,eM.prototype.blockSize=eM.blockSize,eM.prototype.keySize=eM.keySize,eM.prototype._reset=function(){for(var ei=this._key,es=ei.length,ef=es+6,eu=(ef+1)*4,ed=[],em=0;em>>24,eH=(eV.SBOX[eH>>>24]<<24|eV.SBOX[eH>>>16&255]<<16|eV.SBOX[eH>>>8&255]<<8|eV.SBOX[255&eH])^ez[em/es|0]<<24):es>6&&em%es==4&&(eH=eV.SBOX[eH>>>24]<<24|eV.SBOX[eH>>>16&255]<<16|eV.SBOX[eH>>>8&255]<<8|eV.SBOX[255&eH]),ed[em]=ed[em-es]^eH}for(var eM=[],eg=0;eg>>24]]^eV.INV_SUB_MIX[1][eV.SBOX[eb>>>16&255]]^eV.INV_SUB_MIX[2][eV.SBOX[eb>>>8&255]]^eV.INV_SUB_MIX[3][eV.SBOX[255&eb]]}this._nRounds=ef,this._keySchedule=ed,this._invKeySchedule=eM},eM.prototype.encryptBlockRaw=function(ei){return eH(ei=ed(ei),this._keySchedule,eV.SUB_MIX,eV.SBOX,this._nRounds)},eM.prototype.encryptBlock=function(ei){var es=this.encryptBlockRaw(ei),ef=eu.allocUnsafe(16);return ef.writeUInt32BE(es[0],0),ef.writeUInt32BE(es[1],4),ef.writeUInt32BE(es[2],8),ef.writeUInt32BE(es[3],12),ef},eM.prototype.decryptBlock=function(ei){var es=(ei=ed(ei))[1];ei[1]=ei[3],ei[3]=es;var ef=eH(ei,this._invKeySchedule,eV.INV_SUB_MIX,eV.INV_SBOX,this._nRounds),em=eu.allocUnsafe(16);return em.writeUInt32BE(ef[0],0),em.writeUInt32BE(ef[3],4),em.writeUInt32BE(ef[2],8),em.writeUInt32BE(ef[1],12),em},eM.prototype.scrub=function(){em(this._keySchedule),em(this._invKeySchedule),em(this._key)},ei.exports.AES=eM},6624:function(ei,es,ef){var eu=ef(1387),ed=ef(6911).Buffer,em=ef(1043),eH=ef(3782),ez=ef(7225),eV=ef(4734),eM=ef(598);function eg(ei,es){var ef=0;ei.length!==es.length&&ef++;for(var eu=Math.min(ei.length,es.length),ed=0;ed16)throw Error("unable to decrypt data");for(var ef=-1;++ef16)return es=this.cache.slice(0,16),this.cache=this.cache.slice(16),es}else if(this.cache.length>=16)return es=this.cache.slice(0,16),this.cache=this.cache.slice(16),es;return null},eL.prototype.flush=function(){if(this.cache.length)return this.cache},es.createDecipher=eC,es.createDecipheriv=ey},2:function(ei,es,ef){var eu=ef(6370),ed=ef(6624),em=ef(6911).Buffer,eH=ef(126),ez=ef(1043),eV=ef(1387),eM=ef(8368);function eg(ei,es,ef){ez.call(this),this._cache=new eb,this._cipher=new eV.AES(es),this._prev=em.from(ef),this._mode=ei,this._autopadding=!0}ef(3782)(eg,ez),eg.prototype._update=function(ei){this._cache.add(ei);for(var es,ef,eu=[];es=this._cache.get();)ef=this._mode.encrypt(this,es),eu.push(ef);return em.concat(eu)};var eL=em.alloc(16,16);function eb(){this.cache=em.allocUnsafe(0)}function ey(ei,es,ef){var ez=eu[ei.toLowerCase()];if(!ez)throw TypeError("invalid suite type");if("string"==typeof es&&(es=em.from(es)),es.length!==ez.key/8)throw TypeError("invalid key length "+es.length);if("string"==typeof ef&&(ef=em.from(ef)),"GCM"!==ez.mode&&ef.length!==ez.iv)throw TypeError("invalid iv length "+ef.length);return"stream"===ez.type?new eH(ez.module,es,ef):"auth"===ez.type?new ed(ez.module,es,ef):new eg(ez.module,es,ef)}function eC(ei,es){var ef=eu[ei.toLowerCase()];if(!ef)throw TypeError("invalid suite type");var ed=eM(es,!1,ef.key,ef.iv);return ey(ei,ed.key,ed.iv)}eg.prototype._final=function(){var ei=this._cache.flush();if(this._autopadding)return ei=this._mode.encrypt(this,ei),this._cipher.scrub(),ei;if(!ei.equals(eL))throw this._cipher.scrub(),Error("data not multiple of block length")},eg.prototype.setAutoPadding=function(ei){return this._autopadding=!!ei,this},eb.prototype.add=function(ei){this.cache=em.concat([this.cache,ei])},eb.prototype.get=function(){if(this.cache.length>15){var ei=this.cache.slice(0,16);return this.cache=this.cache.slice(16),ei}return null},eb.prototype.flush=function(){for(var ei=16-this.cache.length,es=em.allocUnsafe(ei),ef=-1;++ef>>0,0),es.writeUInt32BE(ei[1]>>>0,4),es.writeUInt32BE(ei[2]>>>0,8),es.writeUInt32BE(ei[3]>>>0,12),es}function ez(ei){this.h=ei,this.state=eu.alloc(16,0),this.cache=eu.allocUnsafe(0)}ez.prototype.ghash=function(ei){for(var es=-1;++es0;ei--)ef[ei]=ef[ei]>>>1|(1&ef[ei-1])<<31;ef[0]=ef[0]>>>1,es&&(ef[0]=-520093696^ef[0])}this.state=eH(eu)},ez.prototype.update=function(ei){var es;for(this.cache=eu.concat([this.cache,ei]);this.cache.length>=16;)es=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(es)},ez.prototype.final=function(ei,es){return this.cache.length&&this.ghash(eu.concat([this.cache,ed],16)),this.ghash(eH([0,ei,0,es])),this.state},ei.exports=ez},598:function(ei){function es(ei){for(var es,ef=ei.length;ef--;)if(255===(es=ei.readUInt8(ef)))ei.writeUInt8(0,ef);else{es++,ei.writeUInt8(es,ef);break}}ei.exports=es},9825:function(ei,es,ef){var eu=ef(4734);es.encrypt=function(ei,es){var ef=eu(es,ei._prev);return ei._prev=ei._cipher.encryptBlock(ef),ei._prev},es.decrypt=function(ei,es){var ef=ei._prev;return ei._prev=es,eu(ei._cipher.decryptBlock(es),ef)}},321:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(4734);function em(ei,es,ef){var em=es.length,eH=ed(es,ei._cache);return ei._cache=ei._cache.slice(em),ei._prev=eu.concat([ei._prev,ef?es:eH]),eH}es.encrypt=function(ei,es,ef){for(var ed,eH=eu.allocUnsafe(0);es.length;)if(0===ei._cache.length&&(ei._cache=ei._cipher.encryptBlock(ei._prev),ei._prev=eu.allocUnsafe(0)),ei._cache.length<=es.length)ed=ei._cache.length,eH=eu.concat([eH,em(ei,es.slice(0,ed),ef)]),es=es.slice(ed);else{eH=eu.concat([eH,em(ei,es,ef)]);break}return eH}},3147:function(ei,es,ef){var eu=ef(6911).Buffer;function ed(ei,es,ef){for(var eu,ed,eH,ez=-1,eV=8,eM=0;++ez>ez%8,ei._prev=em(ei._prev,ef?ed:eH);return eM}function em(ei,es){var ef=ei.length,ed=-1,em=eu.allocUnsafe(ei.length);for(ei=eu.concat([ei,eu.from([es])]);++ed>7;return em}es.encrypt=function(ei,es,ef){for(var em=es.length,eH=eu.allocUnsafe(em),ez=-1;++ez=0||!ef.umod(ei.prime1)||!ef.umod(ei.prime2);)ef=new eu(em(es));return ef}ei.exports=ez,ez.getr=eV},9276:function(ei,es,ef){ei.exports=ef(2908)},4078:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(9739),em=ef(3726),eH=ef(3782),ez=ef(9807),eV=ef(4013),eM=ef(2908);function eg(ei){em.Writable.call(this);var es=eM[ei];if(!es)throw Error("Unknown message digest");this._hashType=es.hash,this._hash=ed(es.hash),this._tag=es.id,this._signType=es.sign}function eL(ei){em.Writable.call(this);var es=eM[ei];if(!es)throw Error("Unknown message digest");this._hash=ed(es.hash),this._tag=es.id,this._signType=es.sign}function eb(ei){return new eg(ei)}function ey(ei){return new eL(ei)}Object.keys(eM).forEach(function(ei){eM[ei].id=eu.from(eM[ei].id,"hex"),eM[ei.toLowerCase()]=eM[ei]}),eH(eg,em.Writable),eg.prototype._write=function(ei,es,ef){this._hash.update(ei),ef()},eg.prototype.update=function(ei,es){return"string"==typeof ei&&(ei=eu.from(ei,es)),this._hash.update(ei),this},eg.prototype.sign=function(ei,es){this.end();var ef=ez(this._hash.digest(),ei,this._hashType,this._signType,this._tag);return es?ef.toString(es):ef},eH(eL,em.Writable),eL.prototype._write=function(ei,es,ef){this._hash.update(ei),ef()},eL.prototype.update=function(ei,es){return"string"==typeof ei&&(ei=eu.from(ei,es)),this._hash.update(ei),this},eL.prototype.verify=function(ei,es,ef){return"string"==typeof es&&(es=eu.from(es,ef)),this.end(),eV(es,this._hash.digest(),ei,this._signType,this._tag)},ei.exports={Sign:eb,Verify:ey,createSign:eb,createVerify:ey}},9807:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(4873),em=ef(7166),eH=ef(949).ec,ez=ef(1670),eV=ef(9902),eM=ef(9267);function eg(ei,es,ef,ed,eH){var ez=eV(es);if(ez.curve){if("ecdsa"!==ed&&"ecdsa/rsa"!==ed)throw Error("wrong private key type");return eL(ei,ez)}if("dsa"===ez.type){if("dsa"!==ed)throw Error("wrong private key type");return eb(ei,ez,ef)}if("rsa"!==ed&&"ecdsa/rsa"!==ed)throw Error("wrong private key type");ei=eu.concat([eH,ei]);for(var eM=ez.modulus.byteLength(),eg=[0,1];ei.length+eg.length+10&&ef.ishrn(eu),ef}function ew(ei,es){ei=(ei=ex(ei,es)).mod(es);var ef=eu.from(ei.toArray());if(ef.length=ei.cmpn(0)||ei.cmp(es)>=es)throw Error("invalid sig")}ei.exports=eV},4734:function(ei){ei.exports=function(ei,es){for(var ef=Math.min(ei.length,es.length),eu=new ed(ef),em=0;emef?es=("rmd160"===ei?new eV:eM(ei)).update(es).digest():es.lengthez?es=ei(es):es.length0;eu--)es+=this._buffer(ei,es),ef+=this._flushBuffer(ed,ef);return es+=this._buffer(ei,es),ed},ed.prototype.final=function(ei){var es,ef;return(ei&&(es=this.update(ei)),ef="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),es)?es.concat(ef):ef},ed.prototype._pad=function(ei,es){if(0===es)return!1;for(;es>>1];ef=em.r28shl(ef,ez),ed=em.r28shl(ed,ez),em.pc2(ef,ed,ei.keys,eH)}},eV.prototype._update=function(ei,es,ef,eu){var ed=this._desState,eH=em.readUInt32BE(ei,es),ez=em.readUInt32BE(ei,es+4);em.ip(eH,ez,ed.tmp,0),eH=ed.tmp[0],ez=ed.tmp[1],"encrypt"===this.type?this._encrypt(ed,eH,ez,ed.tmp,0):this._decrypt(ed,eH,ez,ed.tmp,0),eH=ed.tmp[0],ez=ed.tmp[1],em.writeUInt32BE(ef,eH,eu),em.writeUInt32BE(ef,ez,eu+4)},eV.prototype._pad=function(ei,es){for(var ef=ei.length-es,eu=es;eu>>0,eH=ey}em.rip(ez,eH,eu,ed)},eV.prototype._decrypt=function(ei,es,ef,eu,ed){for(var eH=ef,ez=es,eV=ei.keys.length-2;eV>=0;eV-=2){var eM=ei.keys[eV],eg=ei.keys[eV+1];em.expand(eH,ei.tmp,0),eM^=ei.tmp[0],eg^=ei.tmp[1];var eL=em.substitute(eM,eg),eb=em.permute(eL),ey=eH;eH=(ez^eb)>>>0,ez=ey}em.rip(eH,ez,eu,ed)}},6159:function(ei,es,ef){"use strict";var eu=ef(3523),ed=ef(3782),em=ef(9876),eH=ef(1016);function ez(ei,es){eu.equal(es.length,24,"Invalid key length");var ef=es.slice(0,8),ed=es.slice(8,16),em=es.slice(16,24);"encrypt"===ei?this.ciphers=[eH.create({type:"encrypt",key:ef}),eH.create({type:"decrypt",key:ed}),eH.create({type:"encrypt",key:em})]:this.ciphers=[eH.create({type:"decrypt",key:em}),eH.create({type:"encrypt",key:ed}),eH.create({type:"decrypt",key:ef})]}function eV(ei){em.call(this,ei);var es=new ez(this.type,this.options.key);this._edeState=es}ed(eV,em),ei.exports=eV,eV.create=function(ei){return new eV(ei)},eV.prototype._update=function(ei,es,ef,eu){var ed=this._edeState;ed.ciphers[0]._update(ei,es,ef,eu),ed.ciphers[1]._update(ef,eu,ef,eu),ed.ciphers[2]._update(ef,eu,ef,eu)},eV.prototype._pad=eH.prototype._pad,eV.prototype._unpad=eH.prototype._unpad},5334:function(ei,es){"use strict";es.readUInt32BE=function(ei,es){return(ei[0+es]<<24|ei[1+es]<<16|ei[2+es]<<8|ei[3+es])>>>0},es.writeUInt32BE=function(ei,es,ef){ei[0+ef]=es>>>24,ei[1+ef]=es>>>16&255,ei[2+ef]=es>>>8&255,ei[3+ef]=255&es},es.ip=function(ei,es,ef,eu){for(var ed=0,em=0,eH=6;eH>=0;eH-=2){for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=ei>>>ez+eH&1}for(var eH=6;eH>=0;eH-=2){for(var ez=1;ez<=25;ez+=8)em<<=1,em|=es>>>ez+eH&1;for(var ez=1;ez<=25;ez+=8)em<<=1,em|=ei>>>ez+eH&1}ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.rip=function(ei,es,ef,eu){for(var ed=0,em=0,eH=0;eH<4;eH++)for(var ez=24;ez>=0;ez-=8)ed<<=1,ed|=es>>>ez+eH&1,ed<<=1,ed|=ei>>>ez+eH&1;for(var eH=4;eH<8;eH++)for(var ez=24;ez>=0;ez-=8)em<<=1,em|=es>>>ez+eH&1,em<<=1,em|=ei>>>ez+eH&1;ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.pc1=function(ei,es,ef,eu){for(var ed=0,em=0,eH=7;eH>=5;eH--){for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=ei>>ez+eH&1}for(var ez=0;ez<=24;ez+=8)ed<<=1,ed|=es>>ez+eH&1;for(var eH=1;eH<=3;eH++){for(var ez=0;ez<=24;ez+=8)em<<=1,em|=es>>ez+eH&1;for(var ez=0;ez<=24;ez+=8)em<<=1,em|=ei>>ez+eH&1}for(var ez=0;ez<=24;ez+=8)em<<=1,em|=ei>>ez+eH&1;ef[eu+0]=ed>>>0,ef[eu+1]=em>>>0},es.r28shl=function(ei,es){return ei<>>28-es};var ef=[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];es.pc2=function(ei,es,eu,ed){for(var em=0,eH=0,ez=ef.length>>>1,eV=0;eV>>ef[eV]&1;for(var eV=ez;eV>>ef[eV]&1;eu[ed+0]=em>>>0,eu[ed+1]=eH>>>0},es.expand=function(ei,es,ef){var eu=0,ed=0;eu=(1&ei)<<5|ei>>>27;for(var em=23;em>=15;em-=4)eu<<=6,eu|=ei>>>em&63;for(var em=11;em>=3;em-=4)ed|=ei>>>em&63,ed<<=6;ed|=(31&ei)<<1|ei>>>31,es[ef+0]=eu>>>0,es[ef+1]=ed>>>0};var eu=[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];es.substitute=function(ei,es){for(var ef=0,ed=0;ed<4;ed++){var em=ei>>>18-6*ed&63,eH=eu[64*ed+em];ef<<=4,ef|=eH}for(var ed=0;ed<4;ed++){var em=es>>>18-6*ed&63,eH=eu[256+64*ed+em];ef<<=4,ef|=eH}return ef>>>0};var ed=[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];es.permute=function(ei){for(var es=0,ef=0;ef>>ed[ef]&1;return es>>>0},es.padSplit=function(ei,es,ef){for(var eu=ei.toString(2);eu.lengthei;)ef.ishrn(1);if(ef.isEven()&&ef.iadd(ez),ef.testn(1)||ef.iadd(eV),es.cmp(eV)){if(!es.cmp(eM))for(;ef.mod(eg).cmp(eL);)ef.iadd(ey)}else for(;ef.mod(em).cmp(eb);)ef.iadd(ey);if(ew(eC=ef.shrn(1))&&ew(ef)&&eN(eC)&&eN(ef)&&eH.test(eC)&&eH.test(ef))return ef}}},949:function(ei,es,ef){"use strict";var eu=es;eu.version=ef(2531).i8,eu.utils=ef(4401),eu.rand=ef(3500),eu.curve=ef(9359),eu.curves=ef(6226),eu.ec=ef(4088),eu.eddsa=ef(8511)},2727:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401),em=ed.getNAF,eH=ed.getJSF,ez=ed.assert;function eV(ei,es){this.type=ei,this.p=new eu(es.p,16),this.red=es.prime?eu.red(es.prime):eu.mont(this.p),this.zero=new eu(0).toRed(this.red),this.one=new eu(1).toRed(this.red),this.two=new eu(2).toRed(this.red),this.n=es.n&&new eu(es.n,16),this.g=es.g&&this.pointFromJSON(es.g,es.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var ef=this.n&&this.p.div(this.n);!ef||ef.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function eM(ei,es){this.curve=ei,this.type=es,this.precomputed=null}ei.exports=eV,eV.prototype.point=function(){throw Error("Not implemented")},eV.prototype.validate=function(){throw Error("Not implemented")},eV.prototype._fixedNafMul=function(ei,es){ez(ei.precomputed);var ef=ei._getDoubles(),eu=em(es,1,this._bitLength),ed=(1<=eV;es--)eM=(eM<<1)+eu[es];eH.push(eM)}for(var eg=this.jpoint(null,null,null),eL=this.jpoint(null,null,null),eb=ed;eb>0;eb--){for(var eV=0;eV=0;eM--){for(var es=0;eM>=0&&0===eH[eM];eM--)es++;if(eM>=0&&es++,eV=eV.dblp(es),eM<0)break;var eg=eH[eM];ez(0!==eg),eV="affine"===ei.type?eg>0?eV.mixedAdd(ed[eg-1>>1]):eV.mixedAdd(ed[-eg-1>>1].neg()):eg>0?eV.add(ed[eg-1>>1]):eV.add(ed[-eg-1>>1].neg())}return"affine"===ei.type?eV.toP():eV},eV.prototype._wnafMulAdd=function(ei,es,ef,eu,ed){for(var ez=this._wnafT1,eV=this._wnafT2,eM=this._wnafT3,eg=0,eL=0;eL=1;eL-=2){var eC=eL-1,ex=eL;if(1!==ez[eC]||1!==ez[ex]){eM[eC]=em(ef[eC],ez[eC],this._bitLength),eM[ex]=em(ef[ex],ez[ex],this._bitLength),eg=Math.max(eM[eC].length,eg),eg=Math.max(eM[ex].length,eg);continue}var ew=[es[eC],null,null,es[ex]];0===es[eC].y.cmp(es[ex].y)?(ew[1]=es[eC].add(es[ex]),ew[2]=es[eC].toJ().mixedAdd(es[ex].neg())):0===es[eC].y.cmp(es[ex].y.redNeg())?(ew[1]=es[eC].toJ().mixedAdd(es[ex]),ew[2]=es[eC].add(es[ex].neg())):(ew[1]=es[eC].toJ().mixedAdd(es[ex]),ew[2]=es[eC].toJ().mixedAdd(es[ex].neg()));var eN=[-3,-1,-5,-7,0,7,5,1,3],eS=eH(ef[eC],ef[ex]);eg=Math.max(eS[0].length,eg),eM[eC]=Array(eg),eM[ex]=Array(eg);for(var eA=0;eA=0;eL--){for(var eT=0;eL>=0;){for(var eI=!0,eA=0;eA=0&&eT++,eP=eP.dblp(eT),eL<0)break;for(var eA=0;eA0?eb=eV[eA][eR-1>>1]:eR<0&&(eb=eV[eA][-eR-1>>1].neg()),eP="affine"===eb.type?eP.mixedAdd(eb):eP.add(eb))}}for(var eL=0;eL=Math.ceil((ei.bitLength()+1)/es.step)},eM.prototype._getDoubles=function(ei,es){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var ef=[this],eu=this,ed=0;ed":""},eM.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},eM.prototype._extDbl=function(){var ei=this.x.redSqr(),es=this.y.redSqr(),ef=this.z.redSqr();ef=ef.redIAdd(ef);var eu=this.curve._mulA(ei),ed=this.x.redAdd(this.y).redSqr().redISub(ei).redISub(es),em=eu.redAdd(es),eH=em.redSub(ef),ez=eu.redSub(es),eV=ed.redMul(eH),eM=em.redMul(ez),eg=ed.redMul(ez),eL=eH.redMul(em);return this.curve.point(eV,eM,eL,eg)},eM.prototype._projDbl=function(){var ei,es,ef,eu=this.x.redAdd(this.y).redSqr(),ed=this.x.redSqr(),em=this.y.redSqr();if(this.curve.twisted){var eH=this.curve._mulA(ed),ez=eH.redAdd(em);if(this.zOne)ei=eu.redSub(ed).redSub(em).redMul(ez.redSub(this.curve.two)),es=ez.redMul(eH.redSub(em)),ef=ez.redSqr().redSub(ez).redSub(ez);else{var eV=this.z.redSqr(),eM=ez.redSub(eV).redISub(eV);ei=eu.redSub(ed).redISub(em).redMul(eM),es=ez.redMul(eH.redSub(em)),ef=ez.redMul(eM)}}else{var eH=ed.redAdd(em),eV=this.curve._mulC(this.z).redSqr(),eM=eH.redSub(eV).redSub(eV);ei=this.curve._mulC(eu.redISub(eH)).redMul(eM),es=this.curve._mulC(eH).redMul(ed.redISub(em)),ef=eH.redMul(eM)}return this.curve.point(ei,es,ef)},eM.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},eM.prototype._extAdd=function(ei){var es=this.y.redSub(this.x).redMul(ei.y.redSub(ei.x)),ef=this.y.redAdd(this.x).redMul(ei.y.redAdd(ei.x)),eu=this.t.redMul(this.curve.dd).redMul(ei.t),ed=this.z.redMul(ei.z.redAdd(ei.z)),em=ef.redSub(es),eH=ed.redSub(eu),ez=ed.redAdd(eu),eV=ef.redAdd(es),eM=em.redMul(eH),eg=ez.redMul(eV),eL=em.redMul(eV),eb=eH.redMul(ez);return this.curve.point(eM,eg,eb,eL)},eM.prototype._projAdd=function(ei){var es,ef,eu=this.z.redMul(ei.z),ed=eu.redSqr(),em=this.x.redMul(ei.x),eH=this.y.redMul(ei.y),ez=this.curve.d.redMul(em).redMul(eH),eV=ed.redSub(ez),eM=ed.redAdd(ez),eg=this.x.redAdd(this.y).redMul(ei.x.redAdd(ei.y)).redISub(em).redISub(eH),eL=eu.redMul(eV).redMul(eg);return this.curve.twisted?(es=eu.redMul(eM).redMul(eH.redSub(this.curve._mulA(em))),ef=eV.redMul(eM)):(es=eu.redMul(eM).redMul(eH.redSub(em)),ef=this.curve._mulC(eV).redMul(eM)),this.curve.point(eL,es,ef)},eM.prototype.add=function(ei){return this.isInfinity()?ei:ei.isInfinity()?this:this.curve.extended?this._extAdd(ei):this._projAdd(ei)},eM.prototype.mul=function(ei){return this._hasDoubles(ei)?this.curve._fixedNafMul(this,ei):this.curve._wnafMul(this,ei)},eM.prototype.mulAdd=function(ei,es,ef){return this.curve._wnafMulAdd(1,[this,es],[ei,ef],2,!1)},eM.prototype.jmulAdd=function(ei,es,ef){return this.curve._wnafMulAdd(1,[this,es],[ei,ef],2,!0)},eM.prototype.normalize=function(){if(this.zOne)return this;var ei=this.z.redInvm();return this.x=this.x.redMul(ei),this.y=this.y.redMul(ei),this.t&&(this.t=this.t.redMul(ei)),this.z=this.curve.one,this.zOne=!0,this},eM.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},eM.prototype.getX=function(){return this.normalize(),this.x.fromRed()},eM.prototype.getY=function(){return this.normalize(),this.y.fromRed()},eM.prototype.eq=function(ei){return this===ei||0===this.getX().cmp(ei.getX())&&0===this.getY().cmp(ei.getY())},eM.prototype.eqXToP=function(ei){var es=ei.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(es))return!0;for(var ef=ei.clone(),eu=this.curve.redN.redMul(this.z);;){if(ef.iadd(this.curve.n),ef.cmp(this.curve.p)>=0)return!1;if(es.redIAdd(eu),0===this.x.cmp(es))return!0}},eM.prototype.toP=eM.prototype.normalize,eM.prototype.mixedAdd=eM.prototype.add},9359:function(ei,es,ef){"use strict";var eu=es;eu.base=ef(2727),eu.short=ef(4720),eu.mont=ef(6653),eu.edwards=ef(2705)},6653:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(3782),em=ef(2727),eH=ef(4401);function ez(ei){em.call(this,"mont",ei),this.a=new eu(ei.a,16).toRed(this.red),this.b=new eu(ei.b,16).toRed(this.red),this.i4=new eu(4).toRed(this.red).redInvm(),this.two=new eu(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function eV(ei,es,ef){em.BasePoint.call(this,ei,"projective"),null===es&&null===ef?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new eu(es,16),this.z=new eu(ef,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}ed(ez,em),ei.exports=ez,ez.prototype.validate=function(ei){var es=ei.normalize().x,ef=es.redSqr(),eu=ef.redMul(es).redAdd(ef.redMul(this.a)).redAdd(es);return 0===eu.redSqrt().redSqr().cmp(eu)},ed(eV,em.BasePoint),ez.prototype.decodePoint=function(ei,es){return this.point(eH.toArray(ei,es),1)},ez.prototype.point=function(ei,es){return new eV(this,ei,es)},ez.prototype.pointFromJSON=function(ei){return eV.fromJSON(this,ei)},eV.prototype.precompute=function(){},eV.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},eV.fromJSON=function(ei,es){return new eV(ei,es[0],es[1]||ei.one)},eV.prototype.inspect=function(){return this.isInfinity()?"":""},eV.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},eV.prototype.dbl=function(){var ei=this.x.redAdd(this.z).redSqr(),es=this.x.redSub(this.z).redSqr(),ef=ei.redSub(es),eu=ei.redMul(es),ed=ef.redMul(es.redAdd(this.curve.a24.redMul(ef)));return this.curve.point(eu,ed)},eV.prototype.add=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.diffAdd=function(ei,es){var ef=this.x.redAdd(this.z),eu=this.x.redSub(this.z),ed=ei.x.redAdd(ei.z),em=ei.x.redSub(ei.z).redMul(ef),eH=ed.redMul(eu),ez=es.z.redMul(em.redAdd(eH).redSqr()),eV=es.x.redMul(em.redISub(eH).redSqr());return this.curve.point(ez,eV)},eV.prototype.mul=function(ei){for(var es=ei.clone(),ef=this,eu=this.curve.point(null,null),ed=this,em=[];0!==es.cmpn(0);es.iushrn(1))em.push(es.andln(1));for(var eH=em.length-1;eH>=0;eH--)0===em[eH]?(ef=ef.diffAdd(eu,ed),eu=eu.dbl()):(eu=ef.diffAdd(eu,ed),ef=ef.dbl());return eu},eV.prototype.mulAdd=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.jumlAdd=function(){throw Error("Not supported on Montgomery curve")},eV.prototype.eq=function(ei){return 0===this.getX().cmp(ei.getX())},eV.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},eV.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},4720:function(ei,es,ef){"use strict";var eu=ef(4401),ed=ef(711),em=ef(3782),eH=ef(2727),ez=eu.assert;function eV(ei){eH.call(this,"short",ei),this.a=new ed(ei.a,16).toRed(this.red),this.b=new ed(ei.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(ei),this._endoWnafT1=[,,,,],this._endoWnafT2=[,,,,]}function eM(ei,es,ef,eu){eH.BasePoint.call(this,ei,"affine"),null===es&&null===ef?(this.x=null,this.y=null,this.inf=!0):(this.x=new ed(es,16),this.y=new ed(ef,16),eu&&(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 eg(ei,es,ef,eu){eH.BasePoint.call(this,ei,"jacobian"),null===es&&null===ef&&null===eu?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ed(0)):(this.x=new ed(es,16),this.y=new ed(ef,16),this.z=new ed(eu,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}em(eV,eH),ei.exports=eV,eV.prototype._getEndomorphism=function(ei){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){if(ei.beta)es=new ed(ei.beta,16).toRed(this.red);else{var es,ef,eu,em=this._getEndoRoots(this.p);es=(es=0>em[0].cmp(em[1])?em[0]:em[1]).toRed(this.red)}if(ei.lambda)ef=new ed(ei.lambda,16);else{var eH=this._getEndoRoots(this.n);0===this.g.mul(eH[0]).x.cmp(this.g.x.redMul(es))?ef=eH[0]:(ef=eH[1],ez(0===this.g.mul(ef).x.cmp(this.g.x.redMul(es))))}return eu=ei.basis?ei.basis.map(function(ei){return{a:new ed(ei.a,16),b:new ed(ei.b,16)}}):this._getEndoBasis(ef),{beta:es,lambda:ef,basis:eu}}},eV.prototype._getEndoRoots=function(ei){var es=ei===this.p?this.red:ed.mont(ei),ef=new ed(2).toRed(es).redInvm(),eu=ef.redNeg(),em=new ed(3).toRed(es).redNeg().redSqrt().redMul(ef);return[eu.redAdd(em).fromRed(),eu.redSub(em).fromRed()]},eV.prototype._getEndoBasis=function(ei){for(var es,ef,eu,em,eH,ez,eV,eM,eg,eL=this.n.ushrn(Math.floor(this.n.bitLength()/2)),eb=ei,ey=this.n.clone(),eC=new ed(1),ex=new ed(0),ew=new ed(0),eN=new ed(1),eS=0;0!==eb.cmpn(0);){var eA=ey.div(eb);eM=ey.sub(eA.mul(eb)),eg=ew.sub(eA.mul(eC));var e_=eN.sub(eA.mul(ex));if(!eu&&0>eM.cmp(eL))es=eV.neg(),ef=eC,eu=eM.neg(),em=eg;else if(eu&&2==++eS)break;eV=eM,ey=eb,eb=eM,ew=eC,eC=eg,eN=ex,ex=e_}eH=eM.neg(),ez=eg;var eE=eu.sqr().add(em.sqr());return eH.sqr().add(ez.sqr()).cmp(eE)>=0&&(eH=es,ez=ef),eu.negative&&(eu=eu.neg(),em=em.neg()),eH.negative&&(eH=eH.neg(),ez=ez.neg()),[{a:eu,b:em},{a:eH,b:ez}]},eV.prototype._endoSplit=function(ei){var es=this.endo.basis,ef=es[0],eu=es[1],ed=eu.b.mul(ei).divRound(this.n),em=ef.b.neg().mul(ei).divRound(this.n),eH=ed.mul(ef.a),ez=em.mul(eu.a),eV=ed.mul(ef.b),eM=em.mul(eu.b);return{k1:ei.sub(eH).sub(ez),k2:eV.add(eM).neg()}},eV.prototype.pointFromX=function(ei,es){(ei=new ed(ei,16)).red||(ei=ei.toRed(this.red));var ef=ei.redSqr().redMul(ei).redIAdd(ei.redMul(this.a)).redIAdd(this.b),eu=ef.redSqrt();if(0!==eu.redSqr().redSub(ef).cmp(this.zero))throw Error("invalid point");var em=eu.fromRed().isOdd();return(es&&!em||!es&&em)&&(eu=eu.redNeg()),this.point(ei,eu)},eV.prototype.validate=function(ei){if(ei.inf)return!0;var es=ei.x,ef=ei.y,eu=this.a.redMul(es),ed=es.redSqr().redMul(es).redIAdd(eu).redIAdd(this.b);return 0===ef.redSqr().redISub(ed).cmpn(0)},eV.prototype._endoWnafMulAdd=function(ei,es,ef){for(var eu=this._endoWnafT1,ed=this._endoWnafT2,em=0;em":""},eM.prototype.isInfinity=function(){return this.inf},eM.prototype.add=function(ei){if(this.inf)return ei;if(ei.inf)return this;if(this.eq(ei))return this.dbl();if(this.neg().eq(ei)||0===this.x.cmp(ei.x))return this.curve.point(null,null);var es=this.y.redSub(ei.y);0!==es.cmpn(0)&&(es=es.redMul(this.x.redSub(ei.x).redInvm()));var ef=es.redSqr().redISub(this.x).redISub(ei.x),eu=es.redMul(this.x.redSub(ef)).redISub(this.y);return this.curve.point(ef,eu)},eM.prototype.dbl=function(){if(this.inf)return this;var ei=this.y.redAdd(this.y);if(0===ei.cmpn(0))return this.curve.point(null,null);var es=this.curve.a,ef=this.x.redSqr(),eu=ei.redInvm(),ed=ef.redAdd(ef).redIAdd(ef).redIAdd(es).redMul(eu),em=ed.redSqr().redISub(this.x.redAdd(this.x)),eH=ed.redMul(this.x.redSub(em)).redISub(this.y);return this.curve.point(em,eH)},eM.prototype.getX=function(){return this.x.fromRed()},eM.prototype.getY=function(){return this.y.fromRed()},eM.prototype.mul=function(ei){return(ei=new ed(ei,16),this.isInfinity())?this:this._hasDoubles(ei)?this.curve._fixedNafMul(this,ei):this.curve.endo?this.curve._endoWnafMulAdd([this],[ei]):this.curve._wnafMul(this,ei)},eM.prototype.mulAdd=function(ei,es,ef){var eu=[this,es],ed=[ei,ef];return this.curve.endo?this.curve._endoWnafMulAdd(eu,ed):this.curve._wnafMulAdd(1,eu,ed,2)},eM.prototype.jmulAdd=function(ei,es,ef){var eu=[this,es],ed=[ei,ef];return this.curve.endo?this.curve._endoWnafMulAdd(eu,ed,!0):this.curve._wnafMulAdd(1,eu,ed,2,!0)},eM.prototype.eq=function(ei){return this===ei||this.inf===ei.inf&&(this.inf||0===this.x.cmp(ei.x)&&0===this.y.cmp(ei.y))},eM.prototype.neg=function(ei){if(this.inf)return this;var es=this.curve.point(this.x,this.y.redNeg());if(ei&&this.precomputed){var ef=this.precomputed,eu=function(ei){return ei.neg()};es.precomputed={naf:ef.naf&&{wnd:ef.naf.wnd,points:ef.naf.points.map(eu)},doubles:ef.doubles&&{step:ef.doubles.step,points:ef.doubles.points.map(eu)}}}return es},eM.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},em(eg,eH.BasePoint),eV.prototype.jpoint=function(ei,es,ef){return new eg(this,ei,es,ef)},eg.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var ei=this.z.redInvm(),es=ei.redSqr(),ef=this.x.redMul(es),eu=this.y.redMul(es).redMul(ei);return this.curve.point(ef,eu)},eg.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},eg.prototype.add=function(ei){if(this.isInfinity())return ei;if(ei.isInfinity())return this;var es=ei.z.redSqr(),ef=this.z.redSqr(),eu=this.x.redMul(es),ed=ei.x.redMul(ef),em=this.y.redMul(es.redMul(ei.z)),eH=ei.y.redMul(ef.redMul(this.z)),ez=eu.redSub(ed),eV=em.redSub(eH);if(0===ez.cmpn(0))return 0!==eV.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eM=ez.redSqr(),eg=eM.redMul(ez),eL=eu.redMul(eM),eb=eV.redSqr().redIAdd(eg).redISub(eL).redISub(eL),ey=eV.redMul(eL.redISub(eb)).redISub(em.redMul(eg)),eC=this.z.redMul(ei.z).redMul(ez);return this.curve.jpoint(eb,ey,eC)},eg.prototype.mixedAdd=function(ei){if(this.isInfinity())return ei.toJ();if(ei.isInfinity())return this;var es=this.z.redSqr(),ef=this.x,eu=ei.x.redMul(es),ed=this.y,em=ei.y.redMul(es).redMul(this.z),eH=ef.redSub(eu),ez=ed.redSub(em);if(0===eH.cmpn(0))return 0!==ez.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eV=eH.redSqr(),eM=eV.redMul(eH),eg=ef.redMul(eV),eL=ez.redSqr().redIAdd(eM).redISub(eg).redISub(eg),eb=ez.redMul(eg.redISub(eL)).redISub(ed.redMul(eM)),ey=this.z.redMul(eH);return this.curve.jpoint(eL,eb,ey)},eg.prototype.dblp=function(ei){if(0===ei||this.isInfinity())return this;if(!ei)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var es=this,ef=0;ef=0)return!1;if(ef.redIAdd(ed),0===this.x.cmp(ef))return!0}},eg.prototype.inspect=function(){return this.isInfinity()?"":""},eg.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},6226:function(ei,es,ef){"use strict";var eu,ed=es,em=ef(7028),eH=ef(9359),ez=ef(4401).assert;function eV(ei){"short"===ei.type?this.curve=new eH.short(ei):"edwards"===ei.type?this.curve=new eH.edwards(ei):this.curve=new eH.mont(ei),this.g=this.curve.g,this.n=this.curve.n,this.hash=ei.hash,ez(this.g.validate(),"Invalid curve"),ez(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function eM(ei,es){Object.defineProperty(ed,ei,{configurable:!0,enumerable:!0,get:function(){var ef=new eV(es);return Object.defineProperty(ed,ei,{configurable:!0,enumerable:!0,value:ef}),ef}})}ed.PresetCurve=eV,eM("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:em.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),eM("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:em.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),eM("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:em.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),eM("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:em.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"]}),eM("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:em.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"]}),eM("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:em.sha256,gRed:!1,g:["9"]}),eM("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:em.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{eu=ef(9702)}catch(ei){eu=void 0}eM("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:em.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",eu]})},4088:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4910),em=ef(4401),eH=ef(6226),ez=ef(3500),eV=em.assert,eM=ef(4724),eg=ef(7526);function eL(ei){if(!(this instanceof eL))return new eL(ei);"string"==typeof ei&&(eV(eH.hasOwnProperty(ei),"Unknown curve "+ei),ei=eH[ei]),ei instanceof eH.PresetCurve&&(ei={curve:ei}),this.curve=ei.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=ei.curve.g,this.g.precompute(ei.curve.n.bitLength()+1),this.hash=ei.hash||ei.curve.hash}ei.exports=eL,eL.prototype.keyPair=function(ei){return new eM(this,ei)},eL.prototype.keyFromPrivate=function(ei,es){return eM.fromPrivate(this,ei,es)},eL.prototype.keyFromPublic=function(ei,es){return eM.fromPublic(this,ei,es)},eL.prototype.genKeyPair=function(ei){ei||(ei={});for(var es=new ed({hash:this.hash,pers:ei.pers,persEnc:ei.persEnc||"utf8",entropy:ei.entropy||ez(this.hash.hmacStrength),entropyEnc:ei.entropy&&ei.entropyEnc||"utf8",nonce:this.n.toArray()}),ef=this.n.byteLength(),em=this.n.sub(new eu(2));;){var eH=new eu(es.generate(ef));if(!(eH.cmp(em)>0))return eH.iaddn(1),this.keyFromPrivate(eH)}},eL.prototype._truncateToN=function(ei,es){var ef=8*ei.byteLength()-this.n.bitLength();return(ef>0&&(ei=ei.ushrn(ef)),!es&&ei.cmp(this.n)>=0)?ei.sub(this.n):ei},eL.prototype.sign=function(ei,es,ef,em){"object"==typeof ef&&(em=ef,ef=null),em||(em={}),es=this.keyFromPrivate(es,ef),ei=this._truncateToN(new eu(ei,16));for(var eH=this.n.byteLength(),ez=es.getPrivate().toArray("be",eH),eV=ei.toArray("be",eH),eM=new ed({hash:this.hash,entropy:ez,nonce:eV,pers:em.pers,persEnc:em.persEnc||"utf8"}),eL=this.n.sub(new eu(1)),eb=0;;eb++){var ey=em.k?em.k(eb):new eu(eM.generate(this.n.byteLength()));if(!(0>=(ey=this._truncateToN(ey,!0)).cmpn(1)||ey.cmp(eL)>=0)){var eC=this.g.mul(ey);if(!eC.isInfinity()){var ex=eC.getX(),ew=ex.umod(this.n);if(0!==ew.cmpn(0)){var eN=ey.invm(this.n).mul(ew.mul(es.getPrivate()).iadd(ei));if(0!==(eN=eN.umod(this.n)).cmpn(0)){var eS=(eC.getY().isOdd()?1:0)|(0!==ex.cmp(ew)?2:0);return em.canonical&&eN.cmp(this.nh)>0&&(eN=this.n.sub(eN),eS^=1),new eg({r:ew,s:eN,recoveryParam:eS})}}}}}},eL.prototype.verify=function(ei,es,ef,ed){ei=this._truncateToN(new eu(ei,16)),ef=this.keyFromPublic(ef,ed);var em=(es=new eg(es,"hex")).r,eH=es.s;if(0>em.cmpn(1)||em.cmp(this.n)>=0||0>eH.cmpn(1)||eH.cmp(this.n)>=0)return!1;var ez=eH.invm(this.n),eV=ez.mul(ei).umod(this.n),eM=ez.mul(em).umod(this.n);if(!this.curve._maxwellTrick){var eL=this.g.mulAdd(eV,ef.getPublic(),eM);return!eL.isInfinity()&&0===eL.getX().umod(this.n).cmp(em)}var eL=this.g.jmulAdd(eV,ef.getPublic(),eM);return!eL.isInfinity()&&eL.eqXToP(em)},eL.prototype.recoverPubKey=function(ei,es,ef,ed){eV((3&ef)===ef,"The recovery param is more than two bits"),es=new eg(es,ed);var em=this.n,eH=new eu(ei),ez=es.r,eM=es.s,eL=1&ef,eb=ef>>1;if(ez.cmp(this.curve.p.umod(this.curve.n))>=0&&eb)throw Error("Unable to find sencond key candinate");ez=eb?this.curve.pointFromX(ez.add(this.curve.n),eL):this.curve.pointFromX(ez,eL);var ey=es.r.invm(em),eC=em.sub(eH).mul(ey).umod(em),ex=eM.mul(ey).umod(em);return this.g.mulAdd(eC,ez,ex)},eL.prototype.getKeyRecoveryParam=function(ei,es,ef,eu){if(null!==(es=new eg(es,eu)).recoveryParam)return es.recoveryParam;for(var ed,em=0;em<4;em++){try{ed=this.recoverPubKey(ei,es,em)}catch(ei){continue}if(ed.eq(ef))return em}throw Error("Unable to find valid recovery factor")}},4724:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401).assert;function em(ei,es){this.ec=ei,this.priv=null,this.pub=null,es.priv&&this._importPrivate(es.priv,es.privEnc),es.pub&&this._importPublic(es.pub,es.pubEnc)}ei.exports=em,em.fromPublic=function(ei,es,ef){return es instanceof em?es:new em(ei,{pub:es,pubEnc:ef})},em.fromPrivate=function(ei,es,ef){return es instanceof em?es:new em(ei,{priv:es,privEnc:ef})},em.prototype.validate=function(){var ei=this.getPublic();return ei.isInfinity()?{result:!1,reason:"Invalid public key"}:ei.validate()?ei.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"}},em.prototype.getPublic=function(ei,es){return("string"==typeof ei&&(es=ei,ei=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),es)?this.pub.encode(es,ei):this.pub},em.prototype.getPrivate=function(ei){return"hex"===ei?this.priv.toString(16,2):this.priv},em.prototype._importPrivate=function(ei,es){this.priv=new eu(ei,es||16),this.priv=this.priv.umod(this.ec.curve.n)},em.prototype._importPublic=function(ei,es){if(ei.x||ei.y){"mont"===this.ec.curve.type?ed(ei.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&ed(ei.x&&ei.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(ei.x,ei.y);return}this.pub=this.ec.curve.decodePoint(ei,es)},em.prototype.derive=function(ei){return ei.mul(this.priv).getX()},em.prototype.sign=function(ei,es,ef){return this.ec.sign(ei,this,es,ef)},em.prototype.verify=function(ei,es){return this.ec.verify(ei,es,this)},em.prototype.inspect=function(){return""}},7526:function(ei,es,ef){"use strict";var eu=ef(711),ed=ef(4401),em=ed.assert;function eH(ei,es){if(ei instanceof eH)return ei;this._importDER(ei,es)||(em(ei.r&&ei.s,"Signature without r or s"),this.r=new eu(ei.r,16),this.s=new eu(ei.s,16),void 0===ei.recoveryParam?this.recoveryParam=null:this.recoveryParam=ei.recoveryParam)}function ez(){this.place=0}function eV(ei,es){var ef=ei[es.place++];if(!(128&ef))return ef;var eu=15&ef;if(0===eu||eu>4)return!1;for(var ed=0,em=0,eH=es.place;em>>=0;return!(ed<=127)&&(es.place=eH,ed)}function eM(ei){for(var es=0,ef=ei.length-1;!ei[es]&&!(128&ei[es+1])&&es>>3);for(ei.push(128|ef);--ef;)ei.push(es>>>(ef<<3)&255);ei.push(es)}ei.exports=eH,eH.prototype._importDER=function(ei,es){ei=ed.toArray(ei,es);var ef=new ez;if(48!==ei[ef.place++])return!1;var em=eV(ei,ef);if(!1===em||em+ef.place!==ei.length||2!==ei[ef.place++])return!1;var eH=eV(ei,ef);if(!1===eH)return!1;var eM=ei.slice(ef.place,eH+ef.place);if(ef.place+=eH,2!==ei[ef.place++])return!1;var eg=eV(ei,ef);if(!1===eg||ei.length!==eg+ef.place)return!1;var eL=ei.slice(ef.place,eg+ef.place);if(0===eM[0]){if(!(128&eM[1]))return!1;eM=eM.slice(1)}if(0===eL[0]){if(!(128&eL[1]))return!1;eL=eL.slice(1)}return this.r=new eu(eM),this.s=new eu(eL),this.recoveryParam=null,!0},eH.prototype.toDER=function(ei){var es=this.r.toArray(),ef=this.s.toArray();for(128&es[0]&&(es=[0].concat(es)),128&ef[0]&&(ef=[0].concat(ef)),es=eM(es),ef=eM(ef);!ef[0]&&!(128&ef[1]);)ef=ef.slice(1);var eu=[2];eg(eu,es.length),(eu=eu.concat(es)).push(2),eg(eu,ef.length);var em=eu.concat(ef),eH=[48];return eg(eH,em.length),eH=eH.concat(em),ed.encode(eH,ei)}},8511:function(ei,es,ef){"use strict";var eu=ef(7028),ed=ef(6226),em=ef(4401),eH=em.assert,ez=em.parseBytes,eV=ef(9917),eM=ef(9314);function eg(ei){if(eH("ed25519"===ei,"only tested with ed25519 so far"),!(this instanceof eg))return new eg(ei);var ei=ed[ei].curve;this.curve=ei,this.g=ei.g,this.g.precompute(ei.n.bitLength()+1),this.pointClass=ei.point().constructor,this.encodingLength=Math.ceil(ei.n.bitLength()/8),this.hash=eu.sha512}ei.exports=eg,eg.prototype.sign=function(ei,es){ei=ez(ei);var ef=this.keyFromSecret(es),eu=this.hashInt(ef.messagePrefix(),ei),ed=this.g.mul(eu),em=this.encodePoint(ed),eH=this.hashInt(em,ef.pubBytes(),ei).mul(ef.priv()),eV=eu.add(eH).umod(this.curve.n);return this.makeSignature({R:ed,S:eV,Rencoded:em})},eg.prototype.verify=function(ei,es,ef){ei=ez(ei),es=this.makeSignature(es);var eu=this.keyFromPublic(ef),ed=this.hashInt(es.Rencoded(),eu.pubBytes(),ei),em=this.g.mul(es.S());return es.R().add(eu.pub().mul(ed)).eq(em)},eg.prototype.hashInt=function(){for(var ei=this.hash(),es=0;es(ed>>1)-1?(ed>>1)-eV:eV,em.isubn(ez)):ez=0,eu[eH]=ez,em.iushrn(1)}return eu}function eV(ei,es){var ef=[[],[]];ei=ei.clone(),es=es.clone();for(var eu=0,ed=0;ei.cmpn(-eu)>0||es.cmpn(-ed)>0;){var em,eH,ez=ei.andln(3)+eu&3,eV=es.andln(3)+ed&3;if(3===ez&&(ez=-1),3===eV&&(eV=-1),(1&ez)==0)em=0;else{var eM=ei.andln(7)+eu&7;em=(3===eM||5===eM)&&2===eV?-ez:ez}if(ef[0].push(em),(1&eV)==0)eH=0;else{var eM=es.andln(7)+ed&7;eH=(3===eM||5===eM)&&2===ez?-eV:eV}ef[1].push(eH),2*eu===em+1&&(eu=1-eu),2*ed===eH+1&&(ed=1-ed),ei.iushrn(1),es.iushrn(1)}return ef}function eM(ei,es,ef){var eu="_"+es;ei.prototype[es]=function(){return void 0!==this[eu]?this[eu]:this[eu]=ef.call(this)}}function eg(ei){return"string"==typeof ei?eu.toArray(ei,"hex"):ei}function eL(ei){return new ed(ei,"hex","le")}eu.assert=em,eu.toArray=eH.toArray,eu.zero2=eH.zero2,eu.toHex=eH.toHex,eu.encode=eH.encode,eu.getNAF=ez,eu.getJSF=eV,eu.cachedProperty=eM,eu.parseBytes=eg,eu.intFromLE=eL},8368:function(ei,es,ef){var eu=ef(6911).Buffer,ed=ef(3533);function em(ei,es,ef,em){if(eu.isBuffer(ei)||(ei=eu.from(ei,"binary")),es&&(eu.isBuffer(es)||(es=eu.from(es,"binary")),8!==es.length))throw RangeError("salt should be Buffer with 8 byte length");for(var eH=ef/8,ez=eu.alloc(eH),eV=eu.alloc(em||0),eM=eu.alloc(0);eH>0||em>0;){var eg=new ed;eg.update(eM),eg.update(ei),es&&eg.update(es),eM=eg.digest();var eL=0;if(eH>0){var eb=ez.length-eH;eL=Math.min(eH,eM.length),eM.copy(ez,eb,0,eL),eH-=eL}if(eL0){var ey=eV.length-em,eC=Math.min(em,eM.length-eL);eM.copy(eV,ey,eL,eL+eC),em-=eC}}return eM.fill(0),{key:ez,iv:eV}}ei.exports=em},9029:function(ei,es,ef){"use strict";var eu=ef(6911).Buffer,ed=ef(3726).Transform;function em(ei,es){if(!eu.isBuffer(ei)&&"string"!=typeof ei)throw TypeError(es+" must be a string or a buffer")}function eH(ei){ed.call(this),this._block=eu.allocUnsafe(ei),this._blockSize=ei,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}ef(3782)(eH,ed),eH.prototype._transform=function(ei,es,ef){var eu=null;try{this.update(ei,es)}catch(ei){eu=ei}ef(eu)},eH.prototype._flush=function(ei){var es=null;try{this.push(this.digest())}catch(ei){es=ei}ei(es)},eH.prototype.update=function(ei,es){if(em(ei,"Data"),this._finalized)throw Error("Digest already called");eu.isBuffer(ei)||(ei=eu.from(ei,es));for(var ef=this._block,ed=0;this._blockOffset+ei.length-ed>=this._blockSize;){for(var eH=this._blockOffset;eH0;++ez)this._length[ez]+=eV,(eV=this._length[ez]/4294967296|0)>0&&(this._length[ez]-=4294967296*eV);return this},eH.prototype._update=function(){throw Error("_update is not implemented")},eH.prototype.digest=function(ei){if(this._finalized)throw Error("Digest already called");this._finalized=!0;var es=this._digest();void 0!==ei&&(es=es.toString(ei)),this._block.fill(0),this._blockOffset=0;for(var ef=0;ef<4;++ef)this._length[ef]=0;return es},eH.prototype._digest=function(){throw Error("_digest is not implemented")},ei.exports=eH},7028:function(ei,es,ef){var eu=es;eu.utils=ef(263),eu.common=ef(1330),eu.sha=ef(301),eu.ripemd=ef(3079),eu.hmac=ef(3092),eu.sha1=eu.sha.sha1,eu.sha256=eu.sha.sha256,eu.sha224=eu.sha.sha224,eu.sha384=eu.sha.sha384,eu.sha512=eu.sha.sha512,eu.ripemd160=eu.ripemd.ripemd160},1330:function(ei,es,ef){"use strict";var eu=ef(263),ed=ef(3523);function em(){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}es.BlockHash=em,em.prototype.update=function(ei,es){if(ei=eu.toArray(ei,es),this.pending?this.pending=this.pending.concat(ei):this.pending=ei,this.pendingTotal+=ei.length,this.pending.length>=this._delta8){var ef=(ei=this.pending).length%this._delta8;this.pending=ei.slice(ei.length-ef,ei.length),0===this.pending.length&&(this.pending=null),ei=eu.join32(ei,0,ei.length-ef,this.endian);for(var ed=0;ed>>24&255,eu[ed++]=ei>>>16&255,eu[ed++]=ei>>>8&255,eu[ed++]=255&ei}else for(em=8,eu[ed++]=255&ei,eu[ed++]=ei>>>8&255,eu[ed++]=ei>>>16&255,eu[ed++]=ei>>>24&255,eu[ed++]=0,eu[ed++]=0,eu[ed++]=0,eu[ed++]=0;emthis.blockSize&&(ei=(new this.Hash).update(ei).digest()),ed(ei.length<=this.blockSize);for(var es=ei.length;es>>3}function eL(ei){return eu(ei,17)^eu(ei,19)^ei>>>10}es.ft_1=ed,es.ch32=em,es.maj32=eH,es.p32=ez,es.s0_256=eV,es.s1_256=eM,es.g0_256=eg,es.g1_256=eL},263:function(ei,es,ef){"use strict";var eu=ef(3523),ed=ef(3782);function em(ei,es){return(64512&ei.charCodeAt(es))==55296&&!(es<0)&&!(es+1>=ei.length)&&(64512&ei.charCodeAt(es+1))==56320}function eH(ei,es){if(Array.isArray(ei))return ei.slice();if(!ei)return[];var ef=[];if("string"==typeof ei){if(es){if("hex"===es)for((ei=ei.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(ei="0"+ei),ed=0;ed>6|192,ef[eu++]=63&eH|128):em(ei,ed)?(eH=65536+((1023&eH)<<10)+(1023&ei.charCodeAt(++ed)),ef[eu++]=eH>>18|240,ef[eu++]=eH>>12&63|128,ef[eu++]=eH>>6&63|128,ef[eu++]=63&eH|128):(ef[eu++]=eH>>12|224,ef[eu++]=eH>>6&63|128,ef[eu++]=63&eH|128)}}else for(ed=0;ed>>24|ei>>>8&65280|ei<<8&16711680|(255&ei)<<24)>>>0}function eM(ei,es){for(var ef="",eu=0;eu>>0;return ez}function ey(ei,es){for(var ef=Array(4*ei.length),eu=0,ed=0;eu>>24,ef[ed+1]=em>>>16&255,ef[ed+2]=em>>>8&255,ef[ed+3]=255&em):(ef[ed+3]=em>>>24,ef[ed+2]=em>>>16&255,ef[ed+1]=em>>>8&255,ef[ed]=255&em)}return ef}function eC(ei,es){return ei>>>es|ei<<32-es}function ex(ei,es){return ei<>>32-es}function ew(ei,es){return ei+es>>>0}function eN(ei,es,ef){return ei+es+ef>>>0}function eS(ei,es,ef,eu){return ei+es+ef+eu>>>0}function eA(ei,es,ef,eu,ed){return ei+es+ef+eu+ed>>>0}function e_(ei,es,ef,eu){var ed=ei[es],em=eu+ei[es+1]>>>0,eH=(em>>0,ei[es+1]=em}function eE(ei,es,ef,eu){return(es+eu>>>0>>0}function eP(ei,es,ef,eu){return es+eu>>>0}function eB(ei,es,ef,eu,ed,em,eH,ez){var eV,eM=es;return ei+ef+ed+eH+(eV=0+((eM=eM+eu>>>0)>>0)>>0)>>0}function eT(ei,es,ef,eu,ed,em,eH,ez){return es+eu+em+ez>>>0}function eI(ei,es,ef,eu,ed,em,eH,ez,eV,eM){var eg,eL=es;return ei+ef+ed+eH+eV+(eg=0+((eL=eL+eu>>>0)>>0)>>0)>>0)>>0}function eR(ei,es,ef,eu,ed,em,eH,ez,eV,eM){return es+eu+em+ez+eM>>>0}function eO(ei,es,ef){return(es<<32-ef|ei>>>ef)>>>0}function ej(ei,es,ef){return(ei<<32-ef|es>>>ef)>>>0}function eD(ei,es,ef){return ei>>>ef}function eF(ei,es,ef){return(ei<<32-ef|es>>>ef)>>>0}es.inherits=ed,es.toArray=eH,es.toHex=ez,es.htonl=eV,es.toHex32=eM,es.zero2=eg,es.zero8=eL,es.join32=eb,es.split32=ey,es.rotr32=eC,es.rotl32=ex,es.sum32=ew,es.sum32_3=eN,es.sum32_4=eS,es.sum32_5=eA,es.sum64=e_,es.sum64_hi=eE,es.sum64_lo=eP,es.sum64_4_hi=eB,es.sum64_4_lo=eT,es.sum64_5_hi=eI,es.sum64_5_lo=eR,es.rotr64_hi=eO,es.rotr64_lo=ej,es.shr64_hi=eD,es.shr64_lo=eF},4910:function(ei,es,ef){"use strict";var eu=ef(7028),ed=ef(6545),em=ef(3523);function eH(ei){if(!(this instanceof eH))return new eH(ei);this.hash=ei.hash,this.predResist=!!ei.predResist,this.outLen=this.hash.outSize,this.minEntropy=ei.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var es=ed.toArray(ei.entropy,ei.entropyEnc||"hex"),ef=ed.toArray(ei.nonce,ei.nonceEnc||"hex"),eu=ed.toArray(ei.pers,ei.persEnc||"hex");em(es.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(es,ef,eu)}ei.exports=eH,eH.prototype._init=function(ei,es,ef){var eu=ei.concat(es).concat(ef);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var ed=0;ed=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(ei.concat(ef||[])),this._reseed=1},eH.prototype.generate=function(ei,es,ef,eu){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof es&&(eu=ef,ef=es,es=null),ef&&(ef=ed.toArray(ef,eu||"hex"),this._update(ef));for(var em=[];em.length>>32-es}function eM(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&ef|~es&eu)+ed+em|0,eH)+es|0}function eg(ei,es,ef,eu,ed,em,eH){return eV(ei+(es&eu|ef&~eu)+ed+em|0,eH)+es|0}function eL(ei,es,ef,eu,ed,em,eH){return eV(ei+(es^ef^eu)+ed+em|0,eH)+es|0}function eb(ei,es,ef,eu,ed,em,eH){return eV(ei+(ef^(es|~eu))+ed+em|0,eH)+es|0}eu(ez,ed),ez.prototype._update=function(){for(var ei=eH,es=0;es<16;++es)ei[es]=this._block.readInt32LE(4*es);var ef=this._a,eu=this._b,ed=this._c,em=this._d;ef=eM(ef,eu,ed,em,ei[0],3614090360,7),em=eM(em,ef,eu,ed,ei[1],3905402710,12),ed=eM(ed,em,ef,eu,ei[2],606105819,17),eu=eM(eu,ed,em,ef,ei[3],3250441966,22),ef=eM(ef,eu,ed,em,ei[4],4118548399,7),em=eM(em,ef,eu,ed,ei[5],1200080426,12),ed=eM(ed,em,ef,eu,ei[6],2821735955,17),eu=eM(eu,ed,em,ef,ei[7],4249261313,22),ef=eM(ef,eu,ed,em,ei[8],1770035416,7),em=eM(em,ef,eu,ed,ei[9],2336552879,12),ed=eM(ed,em,ef,eu,ei[10],4294925233,17),eu=eM(eu,ed,em,ef,ei[11],2304563134,22),ef=eM(ef,eu,ed,em,ei[12],1804603682,7),em=eM(em,ef,eu,ed,ei[13],4254626195,12),ed=eM(ed,em,ef,eu,ei[14],2792965006,17),eu=eM(eu,ed,em,ef,ei[15],1236535329,22),ef=eg(ef,eu,ed,em,ei[1],4129170786,5),em=eg(em,ef,eu,ed,ei[6],3225465664,9),ed=eg(ed,em,ef,eu,ei[11],643717713,14),eu=eg(eu,ed,em,ef,ei[0],3921069994,20),ef=eg(ef,eu,ed,em,ei[5],3593408605,5),em=eg(em,ef,eu,ed,ei[10],38016083,9),ed=eg(ed,em,ef,eu,ei[15],3634488961,14),eu=eg(eu,ed,em,ef,ei[4],3889429448,20),ef=eg(ef,eu,ed,em,ei[9],568446438,5),em=eg(em,ef,eu,ed,ei[14],3275163606,9),ed=eg(ed,em,ef,eu,ei[3],4107603335,14),eu=eg(eu,ed,em,ef,ei[8],1163531501,20),ef=eg(ef,eu,ed,em,ei[13],2850285829,5),em=eg(em,ef,eu,ed,ei[2],4243563512,9),ed=eg(ed,em,ef,eu,ei[7],1735328473,14),eu=eg(eu,ed,em,ef,ei[12],2368359562,20),ef=eL(ef,eu,ed,em,ei[5],4294588738,4),em=eL(em,ef,eu,ed,ei[8],2272392833,11),ed=eL(ed,em,ef,eu,ei[11],1839030562,16),eu=eL(eu,ed,em,ef,ei[14],4259657740,23),ef=eL(ef,eu,ed,em,ei[1],2763975236,4),em=eL(em,ef,eu,ed,ei[4],1272893353,11),ed=eL(ed,em,ef,eu,ei[7],4139469664,16),eu=eL(eu,ed,em,ef,ei[10],3200236656,23),ef=eL(ef,eu,ed,em,ei[13],681279174,4),em=eL(em,ef,eu,ed,ei[0],3936430074,11),ed=eL(ed,em,ef,eu,ei[3],3572445317,16),eu=eL(eu,ed,em,ef,ei[6],76029189,23),ef=eL(ef,eu,ed,em,ei[9],3654602809,4),em=eL(em,ef,eu,ed,ei[12],3873151461,11),ed=eL(ed,em,ef,eu,ei[15],530742520,16),eu=eL(eu,ed,em,ef,ei[2],3299628645,23),ef=eb(ef,eu,ed,em,ei[0],4096336452,6),em=eb(em,ef,eu,ed,ei[7],1126891415,10),ed=eb(ed,em,ef,eu,ei[14],2878612391,15),eu=eb(eu,ed,em,ef,ei[5],4237533241,21),ef=eb(ef,eu,ed,em,ei[12],1700485571,6),em=eb(em,ef,eu,ed,ei[3],2399980690,10),ed=eb(ed,em,ef,eu,ei[10],4293915773,15),eu=eb(eu,ed,em,ef,ei[1],2240044497,21),ef=eb(ef,eu,ed,em,ei[8],1873313359,6),em=eb(em,ef,eu,ed,ei[15],4264355552,10),ed=eb(ed,em,ef,eu,ei[6],2734768916,15),eu=eb(eu,ed,em,ef,ei[13],1309151649,21),ef=eb(ef,eu,ed,em,ei[4],4149444226,6),em=eb(em,ef,eu,ed,ei[11],3174756917,10),ed=eb(ed,em,ef,eu,ei[2],718787259,15),eu=eb(eu,ed,em,ef,ei[9],3951481745,21),this._a=this._a+ef|0,this._b=this._b+eu|0,this._c=this._c+ed|0,this._d=this._d+em|0},ez.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 ei=em.allocUnsafe(16);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei},ei.exports=ez},1354:function(ei,es,ef){var eu=ef(711),ed=ef(3500);function em(ei){this.rand=ei||new ed.Rand}ei.exports=em,em.create=function(ei){return new em(ei)},em.prototype._randbelow=function(ei){var es=Math.ceil(ei.bitLength()/8);do var ef=new eu(this.rand.generate(es));while(ef.cmp(ei)>=0);return ef},em.prototype._randrange=function(ei,es){var ef=es.sub(ei);return ei.add(this._randbelow(ef))},em.prototype.test=function(ei,es,ef){var ed=ei.bitLength(),em=eu.mont(ei),eH=new eu(1).toRed(em);es||(es=Math.max(1,ed/48|0));for(var ez=ei.subn(1),eV=0;!ez.testn(eV);eV++);for(var eM=ei.shrn(eV),eg=ez.toRed(em),eL=!0;es>0;es--){var eb=this._randrange(new eu(2),ez);ef&&ef(eb);var ey=eb.toRed(em).redPow(eM);if(0!==ey.cmp(eH)&&0!==ey.cmp(eg)){for(var eC=1;eC0;es--){var eg=this._randrange(new eu(2),eH),eL=ei.gcd(eg);if(0!==eL.cmpn(1))return eL;var eb=eg.toRed(ed).redPow(eV);if(0!==eb.cmp(em)&&0!==eb.cmp(eM)){for(var ey=1;ey>8,eH=255&ed;em?ef.push(em,eH):ef.push(eH)}return ef}function ed(ei){return 1===ei.length?"0"+ei:ei}function em(ei){for(var es="",ef=0;efes||ef!=ef)throw TypeError("Bad key length")}},2127:function(ei,es,ef){var eu={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20},ed=ef(4873),em=ef(6911).Buffer,eH=ef(5349),ez=ef(7007),eV=ef(5407);function eM(ei,es,ef,eM,eg){eH(ef,eM),ei=eV(ei,ez,"Password"),es=eV(es,ez,"Salt"),eg=eg||"sha1";var eL=em.allocUnsafe(eM),eb=em.allocUnsafe(es.length+4);es.copy(eb,0,0,es.length);for(var ey=0,eC=eu[eg],ex=Math.ceil(eM/eC),ew=1;ew<=ex;ew++){eb.writeUInt32BE(ew,es.length);for(var eN=ed(eg,ei).update(eb).digest(),eS=eN,eA=1;eA=es.length){em++;break}var eH=es.slice(2,ed-1);if(("0002"!==eu.toString("hex")&&!ef||"0001"!==eu.toString("hex")&&ef)&&em++,eH.length<8&&em++,em)throw Error("decryption error");return es.slice(ed)}function ey(ei,es){ei=eg.from(ei),es=eg.from(es);var ef=0,eu=ei.length;ei.length!==es.length&&(ef++,eu=Math.min(ei.length,es.length));for(var ed=-1;++edey||new eH(es).cmp(eV.modulus)>=0)throw Error("decryption error");em=ef?eM(new eH(es),eV):ez(es,eV);var eC=eg.alloc(ey-em.length);if(em=eg.concat([eC,em],ey),4===ed)return eL(eV,em);if(1===ed)return eb(eV,em,ef);if(3===ed)return em;throw Error("unknown padding")}},3995:function(ei,es,ef){var eu=ef(9902),ed=ef(7223),em=ef(9739),eH=ef(5520),ez=ef(6386),eV=ef(711),eM=ef(1607),eg=ef(7166),eL=ef(6911).Buffer;function eb(ei,es){var ef=ei.modulus.byteLength(),eu=es.length,eM=em("sha1").update(eL.alloc(0)).digest(),eg=eM.length,eb=2*eg;if(eu>ef-eb-2)throw Error("message too long");var ey=eL.alloc(ef-eu-eb-2),eC=ef-eg-1,ex=ed(eg),ew=ez(eL.concat([eM,ey,eL.alloc(1,1),es],eC),eH(ex,eC)),eN=ez(ex,eH(ew,eg));return new eV(eL.concat([eL.alloc(1),eN,ew],ef))}function ey(ei,es,ef){var eu,ed=es.length,em=ei.modulus.byteLength();if(ed>em-11)throw Error("message too long");return eu=ef?eL.alloc(em-ed-3,255):eC(em-ed-3),new eV(eL.concat([eL.from([0,ef?1:2]),eu,eL.alloc(1),es],em))}function eC(ei){for(var es,ef=eL.allocUnsafe(ei),eu=0,em=ed(2*ei),eH=0;eu=0)throw Error("data too long for modulus")}else throw Error("unknown padding");return ef?eg(em,eH):eM(em,eH)}},1607:function(ei,es,ef){var eu=ef(711),ed=ef(6911).Buffer;function em(ei,es){return ed.from(ei.toRed(eu.mont(es.modulus)).redPow(new eu(es.publicExponent)).fromRed().toArray())}ei.exports=em},6386:function(ei){ei.exports=function(ei,es){for(var ef=ei.length,eu=-1;++eueH)throw RangeError("requested too many random bytes");var ef=eV.allocUnsafe(ei);if(ei>0){if(ei>ed)for(var eu=0;eueg||ei<0)throw TypeError("offset must be a uint32");if(ei>eV||ei>es)throw RangeError("offset out of range")}function eb(ei,es,ef){if("number"!=typeof ei||ei!=ei)throw TypeError("size must be a number");if(ei>eg||ei<0)throw TypeError("size must be a uint32");if(ei+es>ef||ei>eV)throw RangeError("buffer too small")}function ey(ei,es,eu,ed){if(!ez.isBuffer(ei)&&!(ei instanceof ef.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof es)ed=es,es=0,eu=ei.length;else if("function"==typeof eu)ed=eu,eu=ei.length-es;else if("function"!=typeof ed)throw TypeError('"cb" argument must be a function');return eL(es,ei.length),eb(eu,es,ei.length),eC(ei,es,eu,ed)}function eC(ei,es,ef,eu){var ed=ei.buffer,eH=new Uint8Array(ed,es,ef);if(eM.getRandomValues(eH),eu){em.nextTick(function(){eu(null,ei)});return}return ei}function ex(ei,es,eu){if(void 0===es&&(es=0),!ez.isBuffer(ei)&&!(ei instanceof ef.g.Uint8Array))throw TypeError('"buf" argument must be a Buffer or Uint8Array');return eL(es,ei.length),void 0===eu&&(eu=ei.length-es),eb(eu,es,ei.length),eC(ei,es,eu)}eM&&eM.getRandomValues?(es.randomFill=ey,es.randomFillSync=ex):(es.randomFill=ed,es.randomFillSync=ed)},4646:function(ei){"use strict";let es={};function ef(ei,ef,eu){function ed(ei,es,eu){return"string"==typeof ef?ef:ef(ei,es,eu)}eu||(eu=Error);class em extends eu{constructor(ei,es,ef){super(ed(ei,es,ef))}}em.prototype.name=eu.name,em.prototype.code=ei,es[ei]=em}function eu(ei,es){if(!Array.isArray(ei))return`of ${es} ${String(ei)}`;{let ef=ei.length;return(ei=ei.map(ei=>String(ei)),ef>2)?`one of ${es} ${ei.slice(0,ef-1).join(", ")}, or `+ei[ef-1]:2===ef?`one of ${es} ${ei[0]} or ${ei[1]}`:`of ${es} ${ei[0]}`}}function ed(ei,es,ef){return ei.substr(!ef||ef<0?0:+ef,es.length)===es}function em(ei,es,ef){return(void 0===ef||ef>ei.length)&&(ef=ei.length),ei.substring(ef-es.length,ef)===es}function eH(ei,es,ef){return"number"!=typeof ef&&(ef=0),!(ef+es.length>ei.length)&&-1!==ei.indexOf(es,ef)}ef("ERR_INVALID_OPT_VALUE",function(ei,es){return'The value "'+es+'" is invalid for option "'+ei+'"'},TypeError),ef("ERR_INVALID_ARG_TYPE",function(ei,es,ef){let ez,eV;if("string"==typeof es&&ed(es,"not ")?(ez="must not be",es=es.replace(/^not /,"")):ez="must be",em(ei," argument"))eV=`The ${ei} ${ez} ${eu(es,"type")}`;else{let ef=eH(ei,".")?"property":"argument";eV=`The "${ei}" ${ef} ${ez} ${eu(es,"type")}`}return eV+`. Received type ${typeof ef}`},TypeError),ef("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ef("ERR_METHOD_NOT_IMPLEMENTED",function(ei){return"The "+ei+" method is not implemented"}),ef("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ef("ERR_STREAM_DESTROYED",function(ei){return"Cannot call "+ei+" after a stream was destroyed"}),ef("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ef("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ef("ERR_STREAM_WRITE_AFTER_END","write after end"),ef("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ef("ERR_UNKNOWN_ENCODING",function(ei){return"Unknown encoding: "+ei},TypeError),ef("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ei.exports.q=es},2403:function(ei,es,ef){"use strict";var eu=Object.keys||function(ei){var es=[];for(var ef in ei)es.push(ef);return es};ei.exports=eg;var ed=ef(1709),eH=ef(7337);ef(3782)(eg,ed);for(var ez=eu(eH.prototype),eV=0;eV0){if("string"==typeof es||ez.objectMode||Object.getPrototypeOf(es)===eb.prototype||(es=eC(es)),eu)ez.endEmitted?eI(ei,new eT):eU(ei,ez,es,!0);else if(ez.ended)eI(ei,new eP);else{if(ez.destroyed)return!1;ez.reading=!1,ez.decoder&&!ef?(es=ez.decoder.write(es),ez.objectMode||0!==es.length?eU(ei,ez,es,!1):eY(ei,ez)):eU(ei,ez,es,!1)}}else eu||(ez.reading=!1,eY(ei,ez));return!ez.ended&&(ez.length=eZ?ei=eZ:(ei--,ei|=ei>>>1,ei|=ei>>>2,ei|=ei>>>4,ei|=ei>>>8,ei|=ei>>>16,ei++),ei}function eW(ei,es){return ei<=0||0===es.length&&es.ended?0:es.objectMode?1:ei!=ei?es.flowing&&es.length?es.buffer.head.data.length:es.length:(ei>es.highWaterMark&&(es.highWaterMark=eG(ei)),ei<=es.length)?ei:es.ended?es.length:(es.needReadable=!0,0)}function eK(ei,es){if(eH("onEofChunk"),!es.ended){if(es.decoder){var ef=es.decoder.end();ef&&ef.length&&(es.buffer.push(ef),es.length+=es.objectMode?1:ef.length)}es.ended=!0,es.sync?e$(ei):(es.needReadable=!1,es.emittedReadable||(es.emittedReadable=!0,eJ(ei)))}}function e$(ei){var es=ei._readableState;eH("emitReadable",es.needReadable,es.emittedReadable),es.needReadable=!1,es.emittedReadable||(eH("emitReadable",es.flowing),es.emittedReadable=!0,em.nextTick(eJ,ei))}function eJ(ei){var es=ei._readableState;eH("emitReadable_",es.destroyed,es.length,es.ended),!es.destroyed&&(es.length||es.ended)&&(ei.emit("readable"),es.emittedReadable=!1),es.needReadable=!es.flowing&&!es.ended&&es.length<=es.highWaterMark,e6(ei)}function eY(ei,es){es.readingMore||(es.readingMore=!0,em.nextTick(eX,ei,es))}function eX(ei,es){for(;!es.reading&&!es.ended&&(es.length0,es.resumeScheduled&&!es.paused?es.flowing=!0:ei.listenerCount("data")>0&&ei.resume()}function e2(ei){eH("readable nexttick read 0"),ei.read(0)}function e4(ei,es){es.resumeScheduled||(es.resumeScheduled=!0,em.nextTick(e3,ei,es))}function e3(ei,es){eH("resume",es.reading),es.reading||ei.read(0),es.resumeScheduled=!1,ei.emit("resume"),e6(ei),es.flowing&&!es.reading&&ei.read(0)}function e6(ei){var es=ei._readableState;for(eH("flow",es.flowing);es.flowing&&null!==ei.read(););}function e0(ei,es){var ef;return 0===es.length?null:(es.objectMode?ef=es.buffer.shift():!ei||ei>=es.length?(ef=es.decoder?es.buffer.join(""):1===es.buffer.length?es.buffer.first():es.buffer.concat(es.length),es.buffer.clear()):ef=es.buffer.consume(ei,es.decoder),ef)}function e8(ei){var es=ei._readableState;eH("endReadable",es.endEmitted),es.endEmitted||(es.ended=!0,em.nextTick(e5,es,ei))}function e5(ei,es){if(eH("endReadableNT",ei.endEmitted,ei.length),!ei.endEmitted&&0===ei.length&&(ei.endEmitted=!0,es.readable=!1,es.emit("end"),ei.autoDestroy)){var ef=es._writableState;(!ef||ef.autoDestroy&&ef.finished)&&es.destroy()}}function e7(ei,es){for(var ef=0,eu=ei.length;ef=ef.highWaterMark:ef.length>0)||ef.ended))return eH("read: emitReadable",ef.length,ef.ended),0===ef.length&&ef.ended?e8(this):e$(this),null;if(0===(ei=eW(ei,ef))&&ef.ended)return 0===ef.length&&e8(this),null;var ed=ef.needReadable;return eH("need readable",ed),(0===ef.length||ef.length-ei0?e0(ei,ef):null)?(ef.needReadable=ef.length<=ef.highWaterMark,ei=0):(ef.length-=ei,ef.awaitDrain=0),0===ef.length&&(ef.ended||(ef.needReadable=!0),eu!==ei&&ef.ended&&e8(this)),null!==es&&this.emit("data",es),es},eD.prototype._read=function(ei){eI(this,new eB("_read()"))},eD.prototype.pipe=function(ei,es){var ef=this,eu=this._readableState;switch(eu.pipesCount){case 0:eu.pipes=ei;break;case 1:eu.pipes=[eu.pipes,ei];break;default:eu.pipes.push(ei)}eu.pipesCount+=1,eH("pipe count=%d opts=%j",eu.pipesCount,es);var ed=es&&!1===es.end||ei===em.stdout||ei===em.stderr?eN:eV;function ez(ei,es){eH("onunpipe"),ei===ef&&es&&!1===es.hasUnpiped&&(es.hasUnpiped=!0,eb())}function eV(){eH("onend"),ei.end()}eu.endEmitted?em.nextTick(ed):ef.once("end",ed),ei.on("unpipe",ez);var eM=eQ(ef);ei.on("drain",eM);var eL=!1;function eb(){eH("cleanup"),ei.removeListener("close",ex),ei.removeListener("finish",ew),ei.removeListener("drain",eM),ei.removeListener("error",eC),ei.removeListener("unpipe",ez),ef.removeListener("end",eV),ef.removeListener("end",eN),ef.removeListener("data",ey),eL=!0,eu.awaitDrain&&(!ei._writableState||ei._writableState.needDrain)&&eM()}function ey(es){eH("ondata");var ed=ei.write(es);eH("dest.write",ed),!1===ed&&((1===eu.pipesCount&&eu.pipes===ei||eu.pipesCount>1&&-1!==e7(eu.pipes,ei))&&!eL&&(eH("false write response, pause",eu.awaitDrain),eu.awaitDrain++),ef.pause())}function eC(es){eH("onerror",es),eN(),ei.removeListener("error",eC),0===eg(ei,"error")&&eI(ei,es)}function ex(){ei.removeListener("finish",ew),eN()}function ew(){eH("onfinish"),ei.removeListener("close",ex),eN()}function eN(){eH("unpipe"),ef.unpipe(ei)}return ef.on("data",ey),eO(ei,"error",eC),ei.once("close",ex),ei.once("finish",ew),ei.emit("pipe",ef),eu.flowing||(eH("pipe resume"),ef.resume()),ei},eD.prototype.unpipe=function(ei){var es=this._readableState,ef={hasUnpiped:!1};if(0===es.pipesCount)return this;if(1===es.pipesCount)return ei&&ei!==es.pipes||(ei||(ei=es.pipes),es.pipes=null,es.pipesCount=0,es.flowing=!1,ei&&ei.emit("unpipe",this,ef)),this;if(!ei){var eu=es.pipes,ed=es.pipesCount;es.pipes=null,es.pipesCount=0,es.flowing=!1;for(var em=0;em0,!1!==eu.flowing&&this.resume()):"readable"!==ei||eu.endEmitted||eu.readableListening||(eu.readableListening=eu.needReadable=!0,eu.flowing=!1,eu.emittedReadable=!1,eH("on readable",eu.length,eu.reading),eu.length?e$(this):eu.reading||em.nextTick(e2,this)),ef},eD.prototype.addListener=eD.prototype.on,eD.prototype.removeListener=function(ei,es){var ef=eL.prototype.removeListener.call(this,ei,es);return"readable"===ei&&em.nextTick(e1,this),ef},eD.prototype.removeAllListeners=function(ei){var es=eL.prototype.removeAllListeners.apply(this,arguments);return("readable"===ei||void 0===ei)&&em.nextTick(e1,this),es},eD.prototype.resume=function(){var ei=this._readableState;return ei.flowing||(eH("resume"),ei.flowing=!ei.readableListening,e4(this,ei)),ei.paused=!1,this},eD.prototype.pause=function(){return eH("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eH("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},eD.prototype.wrap=function(ei){var es=this,ef=this._readableState,eu=!1;for(var ed in ei.on("end",function(){if(eH("wrapped end"),ef.decoder&&!ef.ended){var ei=ef.decoder.end();ei&&ei.length&&es.push(ei)}es.push(null)}),ei.on("data",function(ed){eH("wrapped data"),ef.decoder&&(ed=ef.decoder.write(ed)),(!ef.objectMode||null!=ed)&&(ef.objectMode||ed&&ed.length)&&(es.push(ed)||(eu=!0,ei.pause()))}),ei)void 0===this[ed]&&"function"==typeof ei[ed]&&(this[ed]=function(es){return function(){return ei[es].apply(ei,arguments)}}(ed));for(var em=0;em-1))throw new eT(ei);return this._writableState.defaultEncoding=ei,this},Object.defineProperty(ej.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ej.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ej.prototype._write=function(ei,es,ef){ef(new eS("_write()"))},ej.prototype._writev=null,ej.prototype.end=function(ei,es,ef){var eu=this._writableState;return"function"==typeof ei?(ef=ei,ei=null,es=null):"function"==typeof es&&(ef=es,es=null),null!=ei&&this.write(ei,es),eu.corked&&(eu.corked=1,this.uncork()),eu.ending||e4(this,eu,ef),this},Object.defineProperty(ej.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ej.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ei){this._writableState&&(this._writableState.destroyed=ei)}}),ej.prototype.destroy=eC.destroy,ej.prototype._undestroy=eC.undestroy,ej.prototype._destroy=function(ei,es){es(ei)}},6871:function(ei,es,ef){"use strict";function eu(ei,es,ef){return es in ei?Object.defineProperty(ei,es,{value:ef,enumerable:!0,configurable:!0,writable:!0}):ei[es]=ef,ei}var ed,eH=ef(9698),ez=Symbol("lastResolve"),eV=Symbol("lastReject"),eM=Symbol("error"),eg=Symbol("ended"),eL=Symbol("lastPromise"),eb=Symbol("handlePromise"),ey=Symbol("stream");function eC(ei,es){return{value:ei,done:es}}function ex(ei){var es=ei[ez];if(null!==es){var ef=ei[ey].read();null!==ef&&(ei[eL]=null,ei[ez]=null,ei[eV]=null,es(eC(ef,!1)))}}function ew(ei){em.nextTick(ex,ei)}function eN(ei,es){return function(ef,eu){ei.then(function(){if(es[eg]){ef(eC(void 0,!0));return}es[eb](ef,eu)},eu)}}var eS=Object.getPrototypeOf(function(){}),eA=Object.setPrototypeOf((eu(ed={get stream(){return this[ey]},next:function(){var ei,es=this,ef=this[eM];if(null!==ef)return Promise.reject(ef);if(this[eg])return Promise.resolve(eC(void 0,!0));if(this[ey].destroyed)return new Promise(function(ei,ef){em.nextTick(function(){es[eM]?ef(es[eM]):ei(eC(void 0,!0))})});var eu=this[eL];if(eu)ei=new Promise(eN(eu,this));else{var ed=this[ey].read();if(null!==ed)return Promise.resolve(eC(ed,!1));ei=new Promise(this[eb])}return this[eL]=ei,ei}},Symbol.asyncIterator,function(){return this}),eu(ed,"return",function(){var ei=this;return new Promise(function(es,ef){ei[ey].destroy(null,function(ei){if(ei){ef(ei);return}es(eC(void 0,!0))})})}),ed),eS),e_=function(ei){var es,ef=Object.create(eA,(eu(es={},ey,{value:ei,writable:!0}),eu(es,ez,{value:null,writable:!0}),eu(es,eV,{value:null,writable:!0}),eu(es,eM,{value:null,writable:!0}),eu(es,eg,{value:ei._readableState.endEmitted,writable:!0}),eu(es,eb,{value:function(ei,es){var eu=ef[ey].read();eu?(ef[eL]=null,ef[ez]=null,ef[eV]=null,ei(eC(eu,!1))):(ef[ez]=ei,ef[eV]=es)},writable:!0}),es));return ef[eL]=null,eH(ei,function(ei){if(ei&&"ERR_STREAM_PREMATURE_CLOSE"!==ei.code){var es=ef[eV];null!==es&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,es(ei)),ef[eM]=ei;return}var eu=ef[ez];null!==eu&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,eu(eC(void 0,!0))),ef[eg]=!0}),ei.on("readable",ew.bind(null,ef)),ef};ei.exports=e_},4379:function(ei,es,ef){"use strict";function eu(ei,es){var ef=Object.keys(ei);if(Object.getOwnPropertySymbols){var eu=Object.getOwnPropertySymbols(ei);es&&(eu=eu.filter(function(es){return Object.getOwnPropertyDescriptor(ei,es).enumerable})),ef.push.apply(ef,eu)}return ef}function ed(ei){for(var es=1;es0?this.tail.next=es:this.head=es,this.tail=es,++this.length}},{key:"unshift",value:function(ei){var es={data:ei,next:this.head};0===this.length&&(this.tail=es),this.head=es,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ei=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ei}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(ei){if(0===this.length)return"";for(var es=this.head,ef=""+es.data;es=es.next;)ef+=ei+es.data;return ef}},{key:"concat",value:function(ei){if(0===this.length)return eM.alloc(0);for(var es=eM.allocUnsafe(ei>>>0),ef=this.head,eu=0;ef;)eb(ef.data,es,eu),eu+=ef.data.length,ef=ef.next;return es}},{key:"consume",value:function(ei,es){var ef;return eied.length?ed.length:ei;if(em===ed.length?eu+=ed:eu+=ed.slice(0,ei),0==(ei-=em)){em===ed.length?(++ef,es.next?this.head=es.next:this.head=this.tail=null):(this.head=es,es.data=ed.slice(em));break}++ef}return this.length-=ef,eu}},{key:"_getBuffer",value:function(ei){var es=eM.allocUnsafe(ei),ef=this.head,eu=1;for(ef.data.copy(es),ei-=ef.data.length;ef=ef.next;){var ed=ef.data,em=ei>ed.length?ed.length:ei;if(ed.copy(es,es.length-ei,0,em),0==(ei-=em)){em===ed.length?(++eu,ef.next?this.head=ef.next:this.head=this.tail=null):(this.head=ef,ef.data=ed.slice(em));break}++eu}return this.length-=eu,es}},{key:eL,value:function(ei,es){return eg(this,ed({},es,{depth:0,customInspect:!1}))}}]),ei}()},7025:function(ei){"use strict";function es(ei,es){var ed=this,ez=this._readableState&&this._readableState.destroyed,eV=this._writableState&&this._writableState.destroyed;return ez||eV?(es?es(ei):ei&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,em.nextTick(eH,this,ei)):em.nextTick(eH,this,ei)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ei||null,function(ei){!es&&ei?ed._writableState?ed._writableState.errorEmitted?em.nextTick(eu,ed):(ed._writableState.errorEmitted=!0,em.nextTick(ef,ed,ei)):em.nextTick(ef,ed,ei):es?(em.nextTick(eu,ed),es(ei)):em.nextTick(eu,ed)}),this)}function ef(ei,es){eH(ei,es),eu(ei)}function eu(ei){(!ei._writableState||ei._writableState.emitClose)&&(!ei._readableState||ei._readableState.emitClose)&&ei.emit("close")}function ed(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function eH(ei,es){ei.emit("error",es)}function ez(ei,es){var ef=ei._readableState,eu=ei._writableState;ef&&ef.autoDestroy||eu&&eu.autoDestroy?ei.destroy(es):ei.emit("error",es)}ei.exports={destroy:es,undestroy:ed,errorOrDestroy:ez}},9698:function(ei,es,ef){"use strict";var eu=ef(4646).q.ERR_STREAM_PREMATURE_CLOSE;function ed(ei){var es=!1;return function(){if(!es){es=!0;for(var ef=arguments.length,eu=Array(ef),ed=0;ed0,function(es){ei||(ei=es),es&&em.forEach(eL),eH||(em.forEach(eL),ed(ei))})});return ef.reduce(eb)}ei.exports=eC},6776:function(ei,es,ef){"use strict";var eu=ef(4646).q.ERR_INVALID_OPT_VALUE;function ed(ei,es,ef){return null!=ei.highWaterMark?ei.highWaterMark:es?ei[ef]:null}function em(ei,es,ef,em){var eH=ed(es,em,ef);if(null!=eH){if(!(isFinite(eH)&&Math.floor(eH)===eH)||eH<0){var ez=em?ef:"highWaterMark";throw new eu(ez,eH)}return Math.floor(eH)}return ei.objectMode?16:16384}ei.exports={getHighWaterMark:em}},4678:function(ei,es,ef){ei.exports=ef(2781)},3726:function(ei,es,ef){var eu=ef(2781);"disable"===em.env.READABLE_STREAM&&eu?(ei.exports=eu.Readable,Object.assign(ei.exports,eu),ei.exports.Stream=eu):((es=ei.exports=ef(1709)).Stream=eu||es,es.Readable=es,es.Writable=ef(7337),es.Duplex=ef(2403),es.Transform=ef(1170),es.PassThrough=ef(7889),es.finished=ef(9698),es.pipeline=ef(8442))},3225:function(ei,es,ef){"use strict";var eu=ef(4300).Buffer,ed=ef(3782),em=ef(9029),eH=Array(16),ez=[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],eV=[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],eM=[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],eg=[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],eL=[0,1518500249,1859775393,2400959708,2840853838],eb=[1352829926,1548603684,1836072691,2053994217,0];function ey(){em.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function eC(ei,es){return ei<>>32-es}function ex(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es^ef^eu)+em+eH|0,ez)+ed|0}function ew(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es&ef|~es&eu)+em+eH|0,ez)+ed|0}function eN(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+((es|~ef)^eu)+em+eH|0,ez)+ed|0}function eS(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es&eu|ef&~eu)+em+eH|0,ez)+ed|0}function eA(ei,es,ef,eu,ed,em,eH,ez){return eC(ei+(es^(ef|~eu))+em+eH|0,ez)+ed|0}ed(ey,em),ey.prototype._update=function(){for(var ei,es,ef=eH,eu=0;eu<16;++eu)ef[eu]=this._block.readInt32LE(4*eu);for(var ed=0|this._a,em=0|this._b,ey=0|this._c,e_=0|this._d,eE=0|this._e,eP=0|this._a,eB=0|this._b,eT=0|this._c,eI=0|this._d,eR=0|this._e,eO=0;eO<80;eO+=1)eO<16?(ei=ex(ed,em,ey,e_,eE,ef[ez[eO]],eL[0],eM[eO]),es=eA(eP,eB,eT,eI,eR,ef[eV[eO]],eb[0],eg[eO])):eO<32?(ei=ew(ed,em,ey,e_,eE,ef[ez[eO]],eL[1],eM[eO]),es=eS(eP,eB,eT,eI,eR,ef[eV[eO]],eb[1],eg[eO])):eO<48?(ei=eN(ed,em,ey,e_,eE,ef[ez[eO]],eL[2],eM[eO]),es=eN(eP,eB,eT,eI,eR,ef[eV[eO]],eb[2],eg[eO])):eO<64?(ei=eS(ed,em,ey,e_,eE,ef[ez[eO]],eL[3],eM[eO]),es=ew(eP,eB,eT,eI,eR,ef[eV[eO]],eb[3],eg[eO])):(ei=eA(ed,em,ey,e_,eE,ef[ez[eO]],eL[4],eM[eO]),es=ex(eP,eB,eT,eI,eR,ef[eV[eO]],eb[4],eg[eO])),ed=eE,eE=e_,e_=eC(ey,10),ey=em,em=ei,eP=eR,eR=eI,eI=eC(eT,10),eT=eB,eB=es;var ej=this._b+ey+eI|0;this._b=this._c+e_+eR|0,this._c=this._d+eE+eP|0,this._d=this._e+ed+eB|0,this._e=this._a+em+eT|0,this._a=ej},ey.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 ei=eu.alloc?eu.alloc(20):new eu(20);return ei.writeInt32LE(this._a,0),ei.writeInt32LE(this._b,4),ei.writeInt32LE(this._c,8),ei.writeInt32LE(this._d,12),ei.writeInt32LE(this._e,16),ei},ei.exports=ey},5055:function(ei,es,ef){var eu=ef(4300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},6911:function(ei,es,ef){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var eu=ef(4300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},2858:function(ei,es,ef){var eu=ef(6911).Buffer;function ed(ei,es){this._block=eu.alloc(ei),this._finalSize=es,this._blockSize=ei,this._len=0}ed.prototype.update=function(ei,es){"string"==typeof ei&&(es=es||"utf8",ei=eu.from(ei,es));for(var ef=this._block,ed=this._blockSize,em=ei.length,eH=this._len,ez=0;ez=this._finalSize&&(this._update(this._block),this._block.fill(0));var ef=8*this._len;if(ef<=4294967295)this._block.writeUInt32BE(ef,this._blockSize-4);else{var eu=(4294967295&ef)>>>0,ed=(ef-eu)/4294967296;this._block.writeUInt32BE(ed,this._blockSize-8),this._block.writeUInt32BE(eu,this._blockSize-4)}this._update(this._block);var em=this._hash();return ei?em.toString(ei):em},ed.prototype._update=function(){throw Error("_update must be implemented by subclass")},ei.exports=ed},4371:function(ei,es,ef){var eu=ei.exports=function(ei){var es=eu[ei=ei.toLowerCase()];if(!es)throw Error(ei+" is not supported (we accept pull requests)");return new es};eu.sha=ef(4018),eu.sha1=ef(4179),eu.sha224=ef(532),eu.sha256=ef(1843),eu.sha384=ef(7455),eu.sha512=ef(9934)},4018:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[1518500249,1859775393,-1894007588,-899497514],ez=Array(80);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei){return ei<<5|ei>>>27}function eg(ei){return ei<<30|ei>>>2}function eL(ei,es,ef,eu){return 0===ei?es&ef|~es&eu:2===ei?es&ef|es&eu|ef&eu:es^ef^eu}eu(eV,ed),eV.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0;eV<16;++eV)es[eV]=ei.readInt32BE(4*eV);for(;eV<80;++eV)es[eV]=es[eV-3]^es[eV-8]^es[eV-14]^es[eV-16];for(var eb=0;eb<80;++eb){var ey=~~(eb/20),eC=eM(ef)+eL(ey,eu,ed,em)+ez+es[eb]+eH[ey]|0;ez=em,em=ed,ed=eg(eu),eu=ef,ef=eC}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(20);return ei.writeInt32BE(0|this._a,0),ei.writeInt32BE(0|this._b,4),ei.writeInt32BE(0|this._c,8),ei.writeInt32BE(0|this._d,12),ei.writeInt32BE(0|this._e,16),ei},ei.exports=eV},4179:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[1518500249,1859775393,-1894007588,-899497514],ez=Array(80);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei){return ei<<1|ei>>>31}function eg(ei){return ei<<5|ei>>>27}function eL(ei){return ei<<30|ei>>>2}function eb(ei,es,ef,eu){return 0===ei?es&ef|~es&eu:2===ei?es&ef|es&eu|ef&eu:es^ef^eu}eu(eV,ed),eV.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0;eV<16;++eV)es[eV]=ei.readInt32BE(4*eV);for(;eV<80;++eV)es[eV]=eM(es[eV-3]^es[eV-8]^es[eV-14]^es[eV-16]);for(var ey=0;ey<80;++ey){var eC=~~(ey/20),ex=eg(ef)+eb(eC,eu,ed,em)+ez+es[ey]+eH[eC]|0;ez=em,em=ed,ed=eL(eu),eu=ef,ef=ex}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(20);return ei.writeInt32BE(0|this._a,0),ei.writeInt32BE(0|this._b,4),ei.writeInt32BE(0|this._c,8),ei.writeInt32BE(0|this._d,12),ei.writeInt32BE(0|this._e,16),ei},ei.exports=eV},532:function(ei,es,ef){var eu=ef(3782),ed=ef(1843),em=ef(2858),eH=ef(6911).Buffer,ez=Array(64);function eV(){this.init(),this._w=ez,em.call(this,64,56)}eu(eV,ed),eV.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},eV.prototype._hash=function(){var ei=eH.allocUnsafe(28);return ei.writeInt32BE(this._a,0),ei.writeInt32BE(this._b,4),ei.writeInt32BE(this._c,8),ei.writeInt32BE(this._d,12),ei.writeInt32BE(this._e,16),ei.writeInt32BE(this._f,20),ei.writeInt32BE(this._g,24),ei},ei.exports=eV},1843:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[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],ez=Array(64);function eV(){this.init(),this._w=ez,ed.call(this,64,56)}function eM(ei,es,ef){return ef^ei&(es^ef)}function eg(ei,es,ef){return ei&es|ef&(ei|es)}function eL(ei){return(ei>>>2|ei<<30)^(ei>>>13|ei<<19)^(ei>>>22|ei<<10)}function eb(ei){return(ei>>>6|ei<<26)^(ei>>>11|ei<<21)^(ei>>>25|ei<<7)}function ey(ei){return(ei>>>7|ei<<25)^(ei>>>18|ei<<14)^ei>>>3}function eC(ei){return(ei>>>17|ei<<15)^(ei>>>19|ei<<13)^ei>>>10}eu(eV,ed),eV.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},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._a,eu=0|this._b,ed=0|this._c,em=0|this._d,ez=0|this._e,eV=0|this._f,ex=0|this._g,ew=0|this._h,eN=0;eN<16;++eN)es[eN]=ei.readInt32BE(4*eN);for(;eN<64;++eN)es[eN]=eC(es[eN-2])+es[eN-7]+ey(es[eN-15])+es[eN-16]|0;for(var eS=0;eS<64;++eS){var eA=ew+eb(ez)+eM(ez,eV,ex)+eH[eS]+es[eS]|0,e_=eL(ef)+eg(ef,eu,ed)|0;ew=ex,ex=eV,eV=ez,ez=em+eA|0,em=ed,ed=eu,eu=ef,ef=eA+e_|0}this._a=ef+this._a|0,this._b=eu+this._b|0,this._c=ed+this._c|0,this._d=em+this._d|0,this._e=ez+this._e|0,this._f=eV+this._f|0,this._g=ex+this._g|0,this._h=ew+this._h|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(32);return ei.writeInt32BE(this._a,0),ei.writeInt32BE(this._b,4),ei.writeInt32BE(this._c,8),ei.writeInt32BE(this._d,12),ei.writeInt32BE(this._e,16),ei.writeInt32BE(this._f,20),ei.writeInt32BE(this._g,24),ei.writeInt32BE(this._h,28),ei},ei.exports=eV},7455:function(ei,es,ef){var eu=ef(3782),ed=ef(9934),em=ef(2858),eH=ef(6911).Buffer,ez=Array(160);function eV(){this.init(),this._w=ez,em.call(this,128,112)}eu(eV,ed),eV.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},eV.prototype._hash=function(){var ei=eH.allocUnsafe(48);function es(es,ef,eu){ei.writeInt32BE(es,eu),ei.writeInt32BE(ef,eu+4)}return es(this._ah,this._al,0),es(this._bh,this._bl,8),es(this._ch,this._cl,16),es(this._dh,this._dl,24),es(this._eh,this._el,32),es(this._fh,this._fl,40),ei},ei.exports=eV},9934:function(ei,es,ef){var eu=ef(3782),ed=ef(2858),em=ef(6911).Buffer,eH=[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],ez=Array(160);function eV(){this.init(),this._w=ez,ed.call(this,128,112)}function eM(ei,es,ef){return ef^ei&(es^ef)}function eg(ei,es,ef){return ei&es|ef&(ei|es)}function eL(ei,es){return(ei>>>28|es<<4)^(es>>>2|ei<<30)^(es>>>7|ei<<25)}function eb(ei,es){return(ei>>>14|es<<18)^(ei>>>18|es<<14)^(es>>>9|ei<<23)}function ey(ei,es){return(ei>>>1|es<<31)^(ei>>>8|es<<24)^ei>>>7}function eC(ei,es){return(ei>>>1|es<<31)^(ei>>>8|es<<24)^(ei>>>7|es<<25)}function ex(ei,es){return(ei>>>19|es<<13)^(es>>>29|ei<<3)^ei>>>6}function ew(ei,es){return(ei>>>19|es<<13)^(es>>>29|ei<<3)^(ei>>>6|es<<26)}function eN(ei,es){return ei>>>0>>0?1:0}eu(eV,ed),eV.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},eV.prototype._update=function(ei){for(var es=this._w,ef=0|this._ah,eu=0|this._bh,ed=0|this._ch,em=0|this._dh,ez=0|this._eh,eV=0|this._fh,eS=0|this._gh,eA=0|this._hh,e_=0|this._al,eE=0|this._bl,eP=0|this._cl,eB=0|this._dl,eT=0|this._el,eI=0|this._fl,eR=0|this._gl,eO=0|this._hl,ej=0;ej<32;ej+=2)es[ej]=ei.readInt32BE(4*ej),es[ej+1]=ei.readInt32BE(4*ej+4);for(;ej<160;ej+=2){var eD=es[ej-30],eF=es[ej-30+1],eU=ey(eD,eF),eq=eC(eF,eD);eD=es[ej-4],eF=es[ej-4+1];var eZ=ex(eD,eF),eG=ew(eF,eD),eW=es[ej-14],eK=es[ej-14+1],e$=es[ej-32],eJ=es[ej-32+1],eY=eq+eK|0,eX=eU+eW+eN(eY,eq)|0;eX=(eX=eX+eZ+eN(eY=eY+eG|0,eG)|0)+e$+eN(eY=eY+eJ|0,eJ)|0,es[ej]=eX,es[ej+1]=eY}for(var eQ=0;eQ<160;eQ+=2){eX=es[eQ],eY=es[eQ+1];var e1=eg(ef,eu,ed),e2=eg(e_,eE,eP),e4=eL(ef,e_),e3=eL(e_,ef),e6=eb(ez,eT),e0=eb(eT,ez),e8=eH[eQ],e5=eH[eQ+1],e7=eM(ez,eV,eS),e9=eM(eT,eI,eR),cc=eO+e0|0,ci=eA+e6+eN(cc,eO)|0;ci=(ci=(ci=ci+e7+eN(cc=cc+e9|0,e9)|0)+e8+eN(cc=cc+e5|0,e5)|0)+eX+eN(cc=cc+eY|0,eY)|0;var co=e3+e2|0,cs=e4+e1+eN(co,e3)|0;eA=eS,eO=eR,eS=eV,eR=eI,eV=ez,eI=eT,ez=em+ci+eN(eT=eB+cc|0,eB)|0,em=ed,eB=eP,ed=eu,eP=eE,eu=ef,eE=e_,ef=ci+cs+eN(e_=cc+co|0,cc)|0}this._al=this._al+e_|0,this._bl=this._bl+eE|0,this._cl=this._cl+eP|0,this._dl=this._dl+eB|0,this._el=this._el+eT|0,this._fl=this._fl+eI|0,this._gl=this._gl+eR|0,this._hl=this._hl+eO|0,this._ah=this._ah+ef+eN(this._al,e_)|0,this._bh=this._bh+eu+eN(this._bl,eE)|0,this._ch=this._ch+ed+eN(this._cl,eP)|0,this._dh=this._dh+em+eN(this._dl,eB)|0,this._eh=this._eh+ez+eN(this._el,eT)|0,this._fh=this._fh+eV+eN(this._fl,eI)|0,this._gh=this._gh+eS+eN(this._gl,eR)|0,this._hh=this._hh+eA+eN(this._hl,eO)|0},eV.prototype._hash=function(){var ei=em.allocUnsafe(64);function es(es,ef,eu){ei.writeInt32BE(es,eu),ei.writeInt32BE(ef,eu+4)}return es(this._ah,this._al,0),es(this._bh,this._bl,8),es(this._ch,this._cl,16),es(this._dh,this._dl,24),es(this._eh,this._el,32),es(this._fh,this._fl,40),es(this._gh,this._gl,48),es(this._hh,this._hl,56),ei},ei.exports=eV},3704:function(ei,es,ef){"use strict";var eu=ef(5055).Buffer,ed=eu.isEncoding||function(ei){switch((ei=""+ei)&&ei.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 em(ei){var es;if(!ei)return"utf8";for(;;)switch(ei){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 ei;default:if(es)return;ei=(""+ei).toLowerCase(),es=!0}}function eH(ei){var es=em(ei);if("string"!=typeof es&&(eu.isEncoding===ed||!ed(ei)))throw Error("Unknown encoding: "+ei);return es||ei}function ez(ei){var es;switch(this.encoding=eH(ei),this.encoding){case"utf16le":this.text=eC,this.end=ex,es=4;break;case"utf8":this.fillLast=eL,es=4;break;case"base64":this.text=ew,this.end=eN,es=3;break;default:this.write=eS,this.end=eA;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=eu.allocUnsafe(es)}function eV(ei){return ei<=127?0:ei>>5==6?2:ei>>4==14?3:ei>>3==30?4:ei>>6==2?-1:-2}function eM(ei,es,ef){var eu=es.length-1;if(eu=0?(ed>0&&(ei.lastNeed=ed-1),ed):--eu=0?(ed>0&&(ei.lastNeed=ed-2),ed):--eu=0?(ed>0&&(2===ed?ed=0:ei.lastNeed=ed-3),ed):0}function eg(ei,es,ef){if((192&es[0])!=128)return ei.lastNeed=0,"�";if(ei.lastNeed>1&&es.length>1){if((192&es[1])!=128)return ei.lastNeed=1,"�";if(ei.lastNeed>2&&es.length>2&&(192&es[2])!=128)return ei.lastNeed=2,"�"}}function eL(ei){var es=this.lastTotal-this.lastNeed,ef=eg(this,ei,es);return void 0!==ef?ef:this.lastNeed<=ei.length?(ei.copy(this.lastChar,es,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(ei.copy(this.lastChar,es,0,ei.length),this.lastNeed-=ei.length)}function eb(ei,es){var ef=eM(this,ei,es);if(!this.lastNeed)return ei.toString("utf8",es);this.lastTotal=ef;var eu=ei.length-(ef-this.lastNeed);return ei.copy(this.lastChar,0,eu),ei.toString("utf8",es,eu)}function ey(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+"�":es}function eC(ei,es){if((ei.length-es)%2==0){var ef=ei.toString("utf16le",es);if(ef){var eu=ef.charCodeAt(ef.length-1);if(eu>=55296&&eu<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1],ef.slice(0,-1)}return ef}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ei[ei.length-1],ei.toString("utf16le",es,ei.length-1)}function ex(ei){var es=ei&&ei.length?this.write(ei):"";if(this.lastNeed){var ef=this.lastTotal-this.lastNeed;return es+this.lastChar.toString("utf16le",0,ef)}return es}function ew(ei,es){var ef=(ei.length-es)%3;return 0===ef?ei.toString("base64",es):(this.lastNeed=3-ef,this.lastTotal=3,1===ef?this.lastChar[0]=ei[ei.length-1]:(this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1]),ei.toString("base64",es,ei.length-ef))}function eN(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+this.lastChar.toString("base64",0,3-this.lastNeed):es}function eS(ei){return ei.toString(this.encoding)}function eA(ei){return ei&&ei.length?this.write(ei):""}es.s=ez,ez.prototype.write=function(ei){var es,ef;if(0===ei.length)return"";if(this.lastNeed){if(void 0===(es=this.fillLast(ei)))return"";ef=this.lastNeed,this.lastNeed=0}else ef=0;return ef1)for(var ef=1;efString(ei)),ef>2)?`one of ${es} ${ei.slice(0,ef-1).join(", ")}, or `+ei[ef-1]:2===ef?`one of ${es} ${ei[0]} or ${ei[1]}`:`of ${es} ${ei[0]}`}}function ed(ei,es,ef){return ei.substr(!ef||ef<0?0:+ef,es.length)===es}function em(ei,es,ef){return(void 0===ef||ef>ei.length)&&(ef=ei.length),ei.substring(ef-es.length,ef)===es}function eH(ei,es,ef){return"number"!=typeof ef&&(ef=0),!(ef+es.length>ei.length)&&-1!==ei.indexOf(es,ef)}ef("ERR_INVALID_OPT_VALUE",function(ei,es){return'The value "'+es+'" is invalid for option "'+ei+'"'},TypeError),ef("ERR_INVALID_ARG_TYPE",function(ei,es,ef){let ez,eV;if("string"==typeof es&&ed(es,"not ")?(ez="must not be",es=es.replace(/^not /,"")):ez="must be",em(ei," argument"))eV=`The ${ei} ${ez} ${eu(es,"type")}`;else{let ef=eH(ei,".")?"property":"argument";eV=`The "${ei}" ${ef} ${ez} ${eu(es,"type")}`}return eV+`. Received type ${typeof ef}`},TypeError),ef("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ef("ERR_METHOD_NOT_IMPLEMENTED",function(ei){return"The "+ei+" method is not implemented"}),ef("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ef("ERR_STREAM_DESTROYED",function(ei){return"Cannot call "+ei+" after a stream was destroyed"}),ef("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ef("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ef("ERR_STREAM_WRITE_AFTER_END","write after end"),ef("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ef("ERR_UNKNOWN_ENCODING",function(ei){return"Unknown encoding: "+ei},TypeError),ef("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ei.exports.q=es},403:function(ei,es,ef){"use strict";var eu=Object.keys||function(ei){var es=[];for(var ef in ei)es.push(ef);return es};ei.exports=eg;var em=ef(709),eH=ef(337);ef(782)(eg,em);for(var ez=eu(eH.prototype),eV=0;eV0){if("string"==typeof es||ez.objectMode||Object.getPrototypeOf(es)===eb.prototype||(es=eC(es)),eu)ez.endEmitted?eI(ei,new eT):eU(ei,ez,es,!0);else if(ez.ended)eI(ei,new eP);else{if(ez.destroyed)return!1;ez.reading=!1,ez.decoder&&!ef?(es=ez.decoder.write(es),ez.objectMode||0!==es.length?eU(ei,ez,es,!1):eY(ei,ez)):eU(ei,ez,es,!1)}}else eu||(ez.reading=!1,eY(ei,ez));return!ez.ended&&(ez.length=eZ?ei=eZ:(ei--,ei|=ei>>>1,ei|=ei>>>2,ei|=ei>>>4,ei|=ei>>>8,ei|=ei>>>16,ei++),ei}function eW(ei,es){return ei<=0||0===es.length&&es.ended?0:es.objectMode?1:ei!=ei?es.flowing&&es.length?es.buffer.head.data.length:es.length:(ei>es.highWaterMark&&(es.highWaterMark=eG(ei)),ei<=es.length)?ei:es.ended?es.length:(es.needReadable=!0,0)}function eK(ei,es){if(eH("onEofChunk"),!es.ended){if(es.decoder){var ef=es.decoder.end();ef&&ef.length&&(es.buffer.push(ef),es.length+=es.objectMode?1:ef.length)}es.ended=!0,es.sync?e$(ei):(es.needReadable=!1,es.emittedReadable||(es.emittedReadable=!0,eJ(ei)))}}function e$(ei){var es=ei._readableState;eH("emitReadable",es.needReadable,es.emittedReadable),es.needReadable=!1,es.emittedReadable||(eH("emitReadable",es.flowing),es.emittedReadable=!0,ed.nextTick(eJ,ei))}function eJ(ei){var es=ei._readableState;eH("emitReadable_",es.destroyed,es.length,es.ended),!es.destroyed&&(es.length||es.ended)&&(ei.emit("readable"),es.emittedReadable=!1),es.needReadable=!es.flowing&&!es.ended&&es.length<=es.highWaterMark,e6(ei)}function eY(ei,es){es.readingMore||(es.readingMore=!0,ed.nextTick(eX,ei,es))}function eX(ei,es){for(;!es.reading&&!es.ended&&(es.length0,es.resumeScheduled&&!es.paused?es.flowing=!0:ei.listenerCount("data")>0&&ei.resume()}function e2(ei){eH("readable nexttick read 0"),ei.read(0)}function e4(ei,es){es.resumeScheduled||(es.resumeScheduled=!0,ed.nextTick(e3,ei,es))}function e3(ei,es){eH("resume",es.reading),es.reading||ei.read(0),es.resumeScheduled=!1,ei.emit("resume"),e6(ei),es.flowing&&!es.reading&&ei.read(0)}function e6(ei){var es=ei._readableState;for(eH("flow",es.flowing);es.flowing&&null!==ei.read(););}function e0(ei,es){var ef;return 0===es.length?null:(es.objectMode?ef=es.buffer.shift():!ei||ei>=es.length?(ef=es.decoder?es.buffer.join(""):1===es.buffer.length?es.buffer.first():es.buffer.concat(es.length),es.buffer.clear()):ef=es.buffer.consume(ei,es.decoder),ef)}function e8(ei){var es=ei._readableState;eH("endReadable",es.endEmitted),es.endEmitted||(es.ended=!0,ed.nextTick(e5,es,ei))}function e5(ei,es){if(eH("endReadableNT",ei.endEmitted,ei.length),!ei.endEmitted&&0===ei.length&&(ei.endEmitted=!0,es.readable=!1,es.emit("end"),ei.autoDestroy)){var ef=es._writableState;(!ef||ef.autoDestroy&&ef.finished)&&es.destroy()}}function e7(ei,es){for(var ef=0,eu=ei.length;ef=ef.highWaterMark:ef.length>0)||ef.ended))return eH("read: emitReadable",ef.length,ef.ended),0===ef.length&&ef.ended?e8(this):e$(this),null;if(0===(ei=eW(ei,ef))&&ef.ended)return 0===ef.length&&e8(this),null;var ed=ef.needReadable;return eH("need readable",ed),(0===ef.length||ef.length-ei0?e0(ei,ef):null)?(ef.needReadable=ef.length<=ef.highWaterMark,ei=0):(ef.length-=ei,ef.awaitDrain=0),0===ef.length&&(ef.ended||(ef.needReadable=!0),eu!==ei&&ef.ended&&e8(this)),null!==es&&this.emit("data",es),es},eD.prototype._read=function(ei){eI(this,new eB("_read()"))},eD.prototype.pipe=function(ei,es){var ef=this,eu=this._readableState;switch(eu.pipesCount){case 0:eu.pipes=ei;break;case 1:eu.pipes=[eu.pipes,ei];break;default:eu.pipes.push(ei)}eu.pipesCount+=1,eH("pipe count=%d opts=%j",eu.pipesCount,es);var em=es&&!1===es.end||ei===ed.stdout||ei===ed.stderr?eN:eV;function ez(ei,es){eH("onunpipe"),ei===ef&&es&&!1===es.hasUnpiped&&(es.hasUnpiped=!0,eb())}function eV(){eH("onend"),ei.end()}eu.endEmitted?ed.nextTick(em):ef.once("end",em),ei.on("unpipe",ez);var eM=eQ(ef);ei.on("drain",eM);var eL=!1;function eb(){eH("cleanup"),ei.removeListener("close",ex),ei.removeListener("finish",ew),ei.removeListener("drain",eM),ei.removeListener("error",eC),ei.removeListener("unpipe",ez),ef.removeListener("end",eV),ef.removeListener("end",eN),ef.removeListener("data",ey),eL=!0,eu.awaitDrain&&(!ei._writableState||ei._writableState.needDrain)&&eM()}function ey(es){eH("ondata");var ed=ei.write(es);eH("dest.write",ed),!1===ed&&((1===eu.pipesCount&&eu.pipes===ei||eu.pipesCount>1&&-1!==e7(eu.pipes,ei))&&!eL&&(eH("false write response, pause",eu.awaitDrain),eu.awaitDrain++),ef.pause())}function eC(es){eH("onerror",es),eN(),ei.removeListener("error",eC),0===eg(ei,"error")&&eI(ei,es)}function ex(){ei.removeListener("finish",ew),eN()}function ew(){eH("onfinish"),ei.removeListener("close",ex),eN()}function eN(){eH("unpipe"),ef.unpipe(ei)}return ef.on("data",ey),eO(ei,"error",eC),ei.once("close",ex),ei.once("finish",ew),ei.emit("pipe",ef),eu.flowing||(eH("pipe resume"),ef.resume()),ei},eD.prototype.unpipe=function(ei){var es=this._readableState,ef={hasUnpiped:!1};if(0===es.pipesCount)return this;if(1===es.pipesCount)return ei&&ei!==es.pipes||(ei||(ei=es.pipes),es.pipes=null,es.pipesCount=0,es.flowing=!1,ei&&ei.emit("unpipe",this,ef)),this;if(!ei){var eu=es.pipes,ed=es.pipesCount;es.pipes=null,es.pipesCount=0,es.flowing=!1;for(var em=0;em0,!1!==eu.flowing&&this.resume()):"readable"!==ei||eu.endEmitted||eu.readableListening||(eu.readableListening=eu.needReadable=!0,eu.flowing=!1,eu.emittedReadable=!1,eH("on readable",eu.length,eu.reading),eu.length?e$(this):eu.reading||ed.nextTick(e2,this)),ef},eD.prototype.addListener=eD.prototype.on,eD.prototype.removeListener=function(ei,es){var ef=eL.prototype.removeListener.call(this,ei,es);return"readable"===ei&&ed.nextTick(e1,this),ef},eD.prototype.removeAllListeners=function(ei){var es=eL.prototype.removeAllListeners.apply(this,arguments);return("readable"===ei||void 0===ei)&&ed.nextTick(e1,this),es},eD.prototype.resume=function(){var ei=this._readableState;return ei.flowing||(eH("resume"),ei.flowing=!ei.readableListening,e4(this,ei)),ei.paused=!1,this},eD.prototype.pause=function(){return eH("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(eH("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},eD.prototype.wrap=function(ei){var es=this,ef=this._readableState,eu=!1;for(var ed in ei.on("end",function(){if(eH("wrapped end"),ef.decoder&&!ef.ended){var ei=ef.decoder.end();ei&&ei.length&&es.push(ei)}es.push(null)}),ei.on("data",function(ed){eH("wrapped data"),ef.decoder&&(ed=ef.decoder.write(ed)),(!ef.objectMode||null!=ed)&&(ef.objectMode||ed&&ed.length)&&(es.push(ed)||(eu=!0,ei.pause()))}),ei)void 0===this[ed]&&"function"==typeof ei[ed]&&(this[ed]=function(es){return function(){return ei[es].apply(ei,arguments)}}(ed));for(var em=0;em-1))throw new eT(ei);return this._writableState.defaultEncoding=ei,this},Object.defineProperty(ej.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(ej.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),ej.prototype._write=function(ei,es,ef){ef(new eS("_write()"))},ej.prototype._writev=null,ej.prototype.end=function(ei,es,ef){var eu=this._writableState;return"function"==typeof ei?(ef=ei,ei=null,es=null):"function"==typeof es&&(ef=es,es=null),null!=ei&&this.write(ei,es),eu.corked&&(eu.corked=1,this.uncork()),eu.ending||e4(this,eu,ef),this},Object.defineProperty(ej.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(ej.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(ei){this._writableState&&(this._writableState.destroyed=ei)}}),ej.prototype.destroy=eC.destroy,ej.prototype._undestroy=eC.undestroy,ej.prototype._destroy=function(ei,es){es(ei)}},871:function(ei,es,ef){"use strict";function eu(ei,es,ef){return es in ei?Object.defineProperty(ei,es,{value:ef,enumerable:!0,configurable:!0,writable:!0}):ei[es]=ef,ei}var em,eH=ef(698),ez=Symbol("lastResolve"),eV=Symbol("lastReject"),eM=Symbol("error"),eg=Symbol("ended"),eL=Symbol("lastPromise"),eb=Symbol("handlePromise"),ey=Symbol("stream");function eC(ei,es){return{value:ei,done:es}}function ex(ei){var es=ei[ez];if(null!==es){var ef=ei[ey].read();null!==ef&&(ei[eL]=null,ei[ez]=null,ei[eV]=null,es(eC(ef,!1)))}}function ew(ei){ed.nextTick(ex,ei)}function eN(ei,es){return function(ef,eu){ei.then(function(){if(es[eg]){ef(eC(void 0,!0));return}es[eb](ef,eu)},eu)}}var eS=Object.getPrototypeOf(function(){}),eA=Object.setPrototypeOf((eu(em={get stream(){return this[ey]},next:function(){var ei,es=this,ef=this[eM];if(null!==ef)return Promise.reject(ef);if(this[eg])return Promise.resolve(eC(void 0,!0));if(this[ey].destroyed)return new Promise(function(ei,ef){ed.nextTick(function(){es[eM]?ef(es[eM]):ei(eC(void 0,!0))})});var eu=this[eL];if(eu)ei=new Promise(eN(eu,this));else{var em=this[ey].read();if(null!==em)return Promise.resolve(eC(em,!1));ei=new Promise(this[eb])}return this[eL]=ei,ei}},Symbol.asyncIterator,function(){return this}),eu(em,"return",function(){var ei=this;return new Promise(function(es,ef){ei[ey].destroy(null,function(ei){if(ei){ef(ei);return}es(eC(void 0,!0))})})}),em),eS),e_=function(ei){var es,ef=Object.create(eA,(eu(es={},ey,{value:ei,writable:!0}),eu(es,ez,{value:null,writable:!0}),eu(es,eV,{value:null,writable:!0}),eu(es,eM,{value:null,writable:!0}),eu(es,eg,{value:ei._readableState.endEmitted,writable:!0}),eu(es,eb,{value:function(ei,es){var eu=ef[ey].read();eu?(ef[eL]=null,ef[ez]=null,ef[eV]=null,ei(eC(eu,!1))):(ef[ez]=ei,ef[eV]=es)},writable:!0}),es));return ef[eL]=null,eH(ei,function(ei){if(ei&&"ERR_STREAM_PREMATURE_CLOSE"!==ei.code){var es=ef[eV];null!==es&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,es(ei)),ef[eM]=ei;return}var eu=ef[ez];null!==eu&&(ef[eL]=null,ef[ez]=null,ef[eV]=null,eu(eC(void 0,!0))),ef[eg]=!0}),ei.on("readable",ew.bind(null,ef)),ef};ei.exports=e_},379:function(ei,es,ef){"use strict";function eu(ei,es){var ef=Object.keys(ei);if(Object.getOwnPropertySymbols){var eu=Object.getOwnPropertySymbols(ei);es&&(eu=eu.filter(function(es){return Object.getOwnPropertyDescriptor(ei,es).enumerable})),ef.push.apply(ef,eu)}return ef}function ed(ei){for(var es=1;es0?this.tail.next=es:this.head=es,this.tail=es,++this.length}},{key:"unshift",value:function(ei){var es={data:ei,next:this.head};0===this.length&&(this.tail=es),this.head=es,++this.length}},{key:"shift",value:function(){if(0!==this.length){var ei=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ei}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(ei){if(0===this.length)return"";for(var es=this.head,ef=""+es.data;es=es.next;)ef+=ei+es.data;return ef}},{key:"concat",value:function(ei){if(0===this.length)return eM.alloc(0);for(var es=eM.allocUnsafe(ei>>>0),ef=this.head,eu=0;ef;)eb(ef.data,es,eu),eu+=ef.data.length,ef=ef.next;return es}},{key:"consume",value:function(ei,es){var ef;return eied.length?ed.length:ei;if(em===ed.length?eu+=ed:eu+=ed.slice(0,ei),0==(ei-=em)){em===ed.length?(++ef,es.next?this.head=es.next:this.head=this.tail=null):(this.head=es,es.data=ed.slice(em));break}++ef}return this.length-=ef,eu}},{key:"_getBuffer",value:function(ei){var es=eM.allocUnsafe(ei),ef=this.head,eu=1;for(ef.data.copy(es),ei-=ef.data.length;ef=ef.next;){var ed=ef.data,em=ei>ed.length?ed.length:ei;if(ed.copy(es,es.length-ei,0,em),0==(ei-=em)){em===ed.length?(++eu,ef.next?this.head=ef.next:this.head=this.tail=null):(this.head=ef,ef.data=ed.slice(em));break}++eu}return this.length-=eu,es}},{key:eL,value:function(ei,es){return eg(this,ed({},es,{depth:0,customInspect:!1}))}}]),ei}()},25:function(ei){"use strict";function es(ei,es){var em=this,ez=this._readableState&&this._readableState.destroyed,eV=this._writableState&&this._writableState.destroyed;return ez||eV?(es?es(ei):ei&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,ed.nextTick(eH,this,ei)):ed.nextTick(eH,this,ei)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ei||null,function(ei){!es&&ei?em._writableState?em._writableState.errorEmitted?ed.nextTick(eu,em):(em._writableState.errorEmitted=!0,ed.nextTick(ef,em,ei)):ed.nextTick(ef,em,ei):es?(ed.nextTick(eu,em),es(ei)):ed.nextTick(eu,em)}),this)}function ef(ei,es){eH(ei,es),eu(ei)}function eu(ei){(!ei._writableState||ei._writableState.emitClose)&&(!ei._readableState||ei._readableState.emitClose)&&ei.emit("close")}function em(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function eH(ei,es){ei.emit("error",es)}function ez(ei,es){var ef=ei._readableState,eu=ei._writableState;ef&&ef.autoDestroy||eu&&eu.autoDestroy?ei.destroy(es):ei.emit("error",es)}ei.exports={destroy:es,undestroy:em,errorOrDestroy:ez}},698:function(ei,es,ef){"use strict";var eu=ef(646).q.ERR_STREAM_PREMATURE_CLOSE;function ed(ei){var es=!1;return function(){if(!es){es=!0;for(var ef=arguments.length,eu=Array(ef),ed=0;ed0,function(es){ei||(ei=es),es&&em.forEach(eL),eH||(em.forEach(eL),ed(ei))})});return ef.reduce(eb)}ei.exports=eC},776:function(ei,es,ef){"use strict";var eu=ef(646).q.ERR_INVALID_OPT_VALUE;function ed(ei,es,ef){return null!=ei.highWaterMark?ei.highWaterMark:es?ei[ef]:null}function em(ei,es,ef,em){var eH=ed(es,em,ef);if(null!=eH){if(!(isFinite(eH)&&Math.floor(eH)===eH)||eH<0){var ez=em?ef:"highWaterMark";throw new eu(ez,eH)}return Math.floor(eH)}return ei.objectMode?16:16384}ei.exports={getHighWaterMark:em}},678:function(ei,es,ef){ei.exports=ef(781)},55:function(ei,es,ef){var eu=ef(300),ed=eu.Buffer;function em(ei,es){for(var ef in ei)es[ef]=ei[ef]}function eH(ei,es,ef){return ed(ei,es,ef)}ed.from&&ed.alloc&&ed.allocUnsafe&&ed.allocUnsafeSlow?ei.exports=eu:(em(eu,es),es.Buffer=eH),eH.prototype=Object.create(ed.prototype),em(ed,eH),eH.from=function(ei,es,ef){if("number"==typeof ei)throw TypeError("Argument must not be a number");return ed(ei,es,ef)},eH.alloc=function(ei,es,ef){if("number"!=typeof ei)throw TypeError("Argument must be a number");var eu=ed(ei);return void 0!==es?"string"==typeof ef?eu.fill(es,ef):eu.fill(es):eu.fill(0),eu},eH.allocUnsafe=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return ed(ei)},eH.allocUnsafeSlow=function(ei){if("number"!=typeof ei)throw TypeError("Argument must be a number");return eu.SlowBuffer(ei)}},173:function(ei,es,ef){ei.exports=ed;var eu=ef(361).EventEmitter;function ed(){eu.call(this)}ef(782)(ed,eu),ed.Readable=ef(709),ed.Writable=ef(337),ed.Duplex=ef(403),ed.Transform=ef(170),ed.PassThrough=ef(889),ed.finished=ef(698),ed.pipeline=ef(442),ed.Stream=ed,ed.prototype.pipe=function(ei,es){var ef=this;function ed(es){ei.writable&&!1===ei.write(es)&&ef.pause&&ef.pause()}function em(){ef.readable&&ef.resume&&ef.resume()}ef.on("data",ed),ei.on("drain",em),ei._isStdio||es&&!1===es.end||(ef.on("end",ez),ef.on("close",eV));var eH=!1;function ez(){eH||(eH=!0,ei.end())}function eV(){eH||(eH=!0,"function"==typeof ei.destroy&&ei.destroy())}function eM(ei){if(eg(),0===eu.listenerCount(this,"error"))throw ei}function eg(){ef.removeListener("data",ed),ei.removeListener("drain",em),ef.removeListener("end",ez),ef.removeListener("close",eV),ef.removeListener("error",eM),ei.removeListener("error",eM),ef.removeListener("end",eg),ef.removeListener("close",eg),ei.removeListener("close",eg)}return ef.on("error",eM),ei.on("error",eM),ef.on("end",eg),ef.on("close",eg),ei.on("close",eg),ei.emit("pipe",ef),ei}},704:function(ei,es,ef){"use strict";var eu=ef(55).Buffer,ed=eu.isEncoding||function(ei){switch((ei=""+ei)&&ei.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 em(ei){var es;if(!ei)return"utf8";for(;;)switch(ei){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 ei;default:if(es)return;ei=(""+ei).toLowerCase(),es=!0}}function eH(ei){var es=em(ei);if("string"!=typeof es&&(eu.isEncoding===ed||!ed(ei)))throw Error("Unknown encoding: "+ei);return es||ei}function ez(ei){var es;switch(this.encoding=eH(ei),this.encoding){case"utf16le":this.text=eC,this.end=ex,es=4;break;case"utf8":this.fillLast=eL,es=4;break;case"base64":this.text=ew,this.end=eN,es=3;break;default:this.write=eS,this.end=eA;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=eu.allocUnsafe(es)}function eV(ei){return ei<=127?0:ei>>5==6?2:ei>>4==14?3:ei>>3==30?4:ei>>6==2?-1:-2}function eM(ei,es,ef){var eu=es.length-1;if(eu=0?(ed>0&&(ei.lastNeed=ed-1),ed):--eu=0?(ed>0&&(ei.lastNeed=ed-2),ed):--eu=0?(ed>0&&(2===ed?ed=0:ei.lastNeed=ed-3),ed):0}function eg(ei,es,ef){if((192&es[0])!=128)return ei.lastNeed=0,"�";if(ei.lastNeed>1&&es.length>1){if((192&es[1])!=128)return ei.lastNeed=1,"�";if(ei.lastNeed>2&&es.length>2&&(192&es[2])!=128)return ei.lastNeed=2,"�"}}function eL(ei){var es=this.lastTotal-this.lastNeed,ef=eg(this,ei,es);return void 0!==ef?ef:this.lastNeed<=ei.length?(ei.copy(this.lastChar,es,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(ei.copy(this.lastChar,es,0,ei.length),this.lastNeed-=ei.length)}function eb(ei,es){var ef=eM(this,ei,es);if(!this.lastNeed)return ei.toString("utf8",es);this.lastTotal=ef;var eu=ei.length-(ef-this.lastNeed);return ei.copy(this.lastChar,0,eu),ei.toString("utf8",es,eu)}function ey(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+"�":es}function eC(ei,es){if((ei.length-es)%2==0){var ef=ei.toString("utf16le",es);if(ef){var eu=ef.charCodeAt(ef.length-1);if(eu>=55296&&eu<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1],ef.slice(0,-1)}return ef}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=ei[ei.length-1],ei.toString("utf16le",es,ei.length-1)}function ex(ei){var es=ei&&ei.length?this.write(ei):"";if(this.lastNeed){var ef=this.lastTotal-this.lastNeed;return es+this.lastChar.toString("utf16le",0,ef)}return es}function ew(ei,es){var ef=(ei.length-es)%3;return 0===ef?ei.toString("base64",es):(this.lastNeed=3-ef,this.lastTotal=3,1===ef?this.lastChar[0]=ei[ei.length-1]:(this.lastChar[0]=ei[ei.length-2],this.lastChar[1]=ei[ei.length-1]),ei.toString("base64",es,ei.length-ef))}function eN(ei){var es=ei&&ei.length?this.write(ei):"";return this.lastNeed?es+this.lastChar.toString("base64",0,3-this.lastNeed):es}function eS(ei){return ei.toString(this.encoding)}function eA(ei){return ei&&ei.length?this.write(ei):""}es.s=ez,ez.prototype.write=function(ei){var es,ef;if(0===ei.length)return"";if(this.lastNeed){if(void 0===(es=this.fillLast(ei)))return"";ef=this.lastNeed,this.lastNeed=0}else ef=0;return ef0&&!ed.call(ei,0))for(var ey=0;ey0)for(var ex=0;ex=0&&"[object Function]"===es.call(ei.callee)),eu}},92703:function(ei,es,ef){"use strict";var eu=ef(50414);function ed(){}function em(){}em.resetWarningCache=ed,ei.exports=function(){function ei(ei,es,ef,ed,em,eH){if(eH!==eu){var ez=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ez.name="Invariant Violation",ez}}function es(){return ei}ei.isRequired=ei;var ef={array:ei,bigint:ei,bool:ei,func:ei,number:ei,object:ei,string:ei,symbol:ei,any:ei,arrayOf:es,element:ei,elementType:ei,instanceOf:es,node:ei,objectOf:es,oneOf:es,oneOfType:es,shape:es,exact:es,checkPropTypes:em,resetWarningCache:ed};return ef.PropTypes=ef,ef}},45697:function(ei,es,ef){ei.exports=ef(92703)()},50414:function(ei){"use strict";var es="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ei.exports=es},61798:function(ei,es,ef){"use strict";var eu=ef(83454),ed=65536,em=4294967295;function eH(){throw Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var ez=ef(89509).Buffer,eV=ef.g.crypto||ef.g.msCrypto;function eM(ei,es){if(ei>em)throw RangeError("requested too many random bytes");var ef=ez.allocUnsafe(ei);if(ei>0){if(ei>ed)for(var eH=0;eH({...e,forwardedAs:"a",kind:"neon",variant:"text-only",color:"main0"})).withConfig({displayName:"styles__StyledExternalLinkButton",componentId:"sc-1fpmkx0-0"})([""]);function s(e){let{children:n,href:i,size:o="big",...a}=e;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(d,{href:i,size:o,...a,target:"_blank",children:[n||i,(0,t.jsx)(r,{name:"square-up-right"})]})})}var r=(0,o.ZP)(a.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-7jgrdd-0"})({marginLeft:"0.625rem"})},82475:function(e,n,i){"use strict";i.d(n,{k:function(){return o}});var t=i(36470);function o(){let[e]=(0,t.mr)(),{programManager:n}=e;return n}},11477:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ev}});var t=i(85893),o=i(19521),a=i(3837),d=i(33358),s=i(3860),r=i(36470),l=i(67294),c=i(11163),m=i(94818),p=i(87536);let g={id:m.W.Runtime1},u=[m.J[m.W.Runtime1],m.J[m.W.Runtime2],m.J[m.W.Custom]];var h=i(32523),f=i(86495),x=i(78512),y=i(10159),_=i(82475),j=i(48847),v=i(39261);let b={lang:"python",type:"text",text:'from fastapi import FastAPI\n\napp = FastAPI()\n@app.get("/")\nasync def root():\n return {"message": "Hello World"}\n',entrypoint:"main:app"};var w=i(56312);let Z={...f.y,code:{...b},runtime:{...g},specs:{...(0,h.Fk)(!1)[0]},isPersistent:!1};var P=i(38478),C=i(90215),S=i(77842),N=i(61791),T=i(57412),k=i(73751),B=i(70641),I=i(58833);let F=l.memo(e=>{let{customCtrl:n,idCtrl:i,isCustomDisabled:o,options:d}=function(e){let{name:n="runtime",control:i,defaultValue:t,options:o}=e,a=(0,p.bc)({control:i,name:"".concat(n,".id"),defaultValue:null==t?void 0:t.id,rules:{onChange(e){e.target.value!==m.W.Custom&&s.field.onChange("")}}}),d=a.field.value!==m.W.Custom,s=(0,p.bc)({control:i,name:"".concat(n,".custom"),defaultValue:null==t?void 0:t.custom});return{idCtrl:a,customCtrl:s,options:o||u,isCustomDisabled:d}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(B.Z,{children:[(0,t.jsx)(a.Ee,{...i.field,...i.fieldState,direction:"column",children:d.map(e=>(0,t.jsx)(a.Y8,{label:e.name,value:e.id},e.id))}),!o&&(0,t.jsx)(L,{children:(0,t.jsx)(a.oi,{...n.field,...n.fieldState,label:"Runtime hash",placeholder:"3335ad270a571b..."})})]}),(0,t.jsx)(R,{children:(0,t.jsx)(I.Z,{href:"https://docs.aleph.im/computing/runtimes",children:"Learn more"})})]})});F.displayName="SelectFunctionRuntime";var L=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1caqya7-0"})({marginTop:"1.25rem"}),R=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1caqya7-1"})({marginTop:"1.5rem",textAlign:"right"}),A=i(2915),E=i(31477),D=i(11912);let z=l.memo(e=>{let{langCtrl:n,typeCtrl:i,textCtrl:o,fileCtrl:d,entryPointCtrl:s}=function(e){let{name:n="code",control:i,defaultValue:t=b}=e,o=(0,p.bc)({control:i,name:"".concat(n,".lang"),defaultValue:null==t?void 0:t.lang}),a=(0,p.bc)({control:i,name:"".concat(n,".entrypoint"),defaultValue:null==t?void 0:t.entrypoint}),d=(0,p.bc)({control:i,name:"".concat(n,".type"),defaultValue:null==t?void 0:t.type}),s=(0,p.bc)({control:i,name:"".concat(n,".file"),defaultValue:null==t?void 0:t.file}),r=(0,p.bc)({control:i,name:"".concat(n,".text"),defaultValue:null==b?void 0:b.text});return{langCtrl:o,typeCtrl:d,fileCtrl:s,textCtrl:r,entryPointCtrl:a}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{children:(0,t.jsx)(a.mQ,{selected:i.field.value,align:"left",tabs:[{id:"text",name:"Write code"},{id:"file",name:"Upload code"}],onTabChange:i.field.onChange})}),(0,t.jsx)("div",{role:"tabpanel",children:"text"===i.field.value?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W,{children:"To get started you can start adding your code in the window below."}),(0,t.jsx)(O,{children:(0,t.jsx)(B.Z,{children:(0,t.jsxs)(a.Ee,{...n.field,...n.fieldState,direction:"row",children:[(0,t.jsx)(a.Y8,{label:"Python 3.9",value:"python"}),(0,t.jsx)(a.Y8,{label:"Node.js",value:"javascript",disabled:!0})]})})}),(0,t.jsx)("div",{children:(0,t.jsx)(V,{...o.field,...o.fieldState,defaultLanguage:n.field.value,language:n.field.value})}),(0,t.jsx)(Y,{children:(0,t.jsx)(D.Z,{my:"bottom-right",at:"top-right",tooltipContent:(0,t.jsxs)(J,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Write code"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Your code should have an app function that will serve as an entrypoint to the program."})]}),(0,t.jsxs)(M,{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Upload code"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Your zip file should contain a main file (ex: main.py) at its root that exposes an app function. This will serve as an entrypoint to the program."})]})]}),children:"Learn more"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{children:"To get started, compress your code into a zip or squashfs (.sqsh) file and upload it here."}),(0,t.jsx)(B.Z,{children:(0,t.jsx)(G,{children:(0,t.jsxs)(E.Z,{...d.field,...d.fieldState,accept:".zip,.sqsh",children:["Upload code ",(0,t.jsx)(H,{name:"arrow-up"})]})})}),(0,t.jsx)(Q,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{plain:!0,my:"bottom-left",at:"bottom-right",tooltipContent:(0,t.jsx)(X,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Entrypoint"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Define an entrypoint to your program. For example if you have a file called main.py and a function called app, you should enter main:app."})]})}),children:(0,t.jsx)($,{children:"Entry point"})}),(0,t.jsx)(a.oi,{...s.field,...s.fieldState,placeholder:"main:app"})]})})]})})]})});z.displayName="AddFunctionCode";var q=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1lgkru6-0"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0.75rem",paddingTop:"1.5rem"}),W=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-1lgkru6-1"})({marginBottom:"1.5rem"}),O=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1lgkru6-2"})({marginBottom:"1.5rem"}),V=(0,o.ZP)(a.pq).withConfig({displayName:"cmp___StyledCodeEditor",componentId:"sc-1lgkru6-3"})({minHeight:"415px",borderRadius:"1.5rem",padding:"1.25rem"}),Y=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1lgkru6-4"})({marginTop:"1.5rem",textAlign:"right"}),J=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1lgkru6-5"})({textAlign:"left"}),M=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1lgkru6-6"})({marginTop:"1.5rem"}),U=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-1lgkru6-7"})({marginBottom:"0.5rem"}),G=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1lgkru6-8"})({marginBottom:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",textAlign:"center"}),H=(0,o.ZP)(a.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1lgkru6-9"})({marginLeft:"1rem"}),Q=(0,o.ZP)(B.Z).withConfig({displayName:"cmp___StyledNoisyContainer",componentId:"sc-1lgkru6-10"})({marginTop:"1.5rem"}),X=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-1lgkru6-11"})({textAlign:"left"}),$=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-1lgkru6-12"})({marginTop:"0.75rem",marginBottom:"0.75rem"});let K=l.memo(e=>{let{isPersistentValue:n,isPersistentHandleChange:i,isPersistentCtrl:o}=function(e){let{name:n="isPersistent",control:i,defaultValue:t}=e,o=(0,p.bc)({control:i,name:n,defaultValue:t}),a=(0,l.useCallback)(e=>{let n="true"===e.target.value;o.field.onChange(n)},[o.field]),d=(0,l.useMemo)(()=>o.field.value+"",[o.field]);return{isPersistentCtrl:o,isPersistentValue:d,isPersistentHandleChange:a}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{children:(0,t.jsxs)(a.Ee,{...o.field,...o.fieldState,value:n,onChange:i,direction:"row",children:[(0,t.jsx)(a.Y8,{label:"Persistent",value:"true"}),(0,t.jsx)(a.Y8,{label:"On-demand",value:"false"})]})}),(0,t.jsx)(ee,{children:(0,t.jsx)(I.Z,{href:"https://docs.aleph.im/computing/persistent",children:"Learn more"})})]})});K.displayName="SelectFunctionPersistence";var ee=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1tb2omg-0"})({marginTop:"1.5rem",textAlign:"right"});let en=o.ZP.div.withConfig({displayName:"styles__BorderBox",componentId:"sc-cvbs9z-0"})(["",""],e=>{var n;let{theme:i,$color:t="main0"}=e,[a,d]=(null===(n=i.gradient[t])||void 0===n?void 0:n.colors)||[t,t];return(0,o.iv)([""," border-radius:1.5rem;backdrop-filter:blur(50px);color:","b3;&::before{content:'';position:absolute;top:0;left:0;height:100%;width:100%;border-radius:1.5rem;z-index:-1;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:exclude;mask-composite:exclude;-webkit-mask-composite:xor;background-image:linear-gradient(90deg,"," 0%,"," 100%);}"],{padding:"1.5rem"},i.color.text,a,d)});var ei=i(34853),et=i(5614),eo=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-gpssnr-0"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",paddingBottom:"0px","@media (min-width: 768px)":{paddingTop:"2rem",paddingBottom:"2rem"}}),ea=(0,o.ZP)(a.mQ).withConfig({displayName:"cmp___StyledTabs",componentId:"sc-gpssnr-1"})({overflow:"auto"}),ed=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection2",componentId:"sc-gpssnr-2"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),es=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection3",componentId:"sc-gpssnr-3"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),er=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-gpssnr-4"})({marginBottom:"1.5rem"}),el=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection4",componentId:"sc-gpssnr-5"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ec=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-gpssnr-6"})({marginBottom:"1.5rem"}),em=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection5",componentId:"sc-gpssnr-7"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ep=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP3",componentId:"sc-gpssnr-8"})({marginBottom:"1.5rem"}),eg=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection6",componentId:"sc-gpssnr-9"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eu=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP4",componentId:"sc-gpssnr-10"})({marginBottom:"1.5rem"}),eh=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection7",componentId:"sc-gpssnr-11"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ef=(0,o.ZP)(en).withConfig({displayName:"cmp___StyledBorderBox",componentId:"sc-gpssnr-12"})({marginTop:"1rem"}),ex=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection8",componentId:"sc-gpssnr-13"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ey=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP5",componentId:"sc-gpssnr-14"})({marginBottom:"1.5rem"}),e_=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection9",componentId:"sc-gpssnr-15"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ej=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP6",componentId:"sc-gpssnr-16"})({marginBottom:"1.5rem"}),ev=function(){let{address:e,accountBalance:n,isCreateButtonDisabled:i,values:o,control:m,errors:g,handleSubmit:u,handleChangeEntityTab:h}=function(){(0,x.Z)();let e=(0,c.useRouter)(),[n,i]=(0,r.mr)(),{account:t,accountBalance:o}=n,a=(0,_.k)(),d=(0,l.useCallback)(async n=>{if(!a)throw Error("Manager not ready");let t=await a.add(n);i({type:j.MF.addAccountFunction,payload:{accountFunction:t}}),e.replace("/dashboard")},[i,a,e]),{control:s,handleSubmit:m,formState:{errors:g}}=(0,y.c)({defaultValues:Z,onSubmit:d,resolver:(0,w.F)(v.L.addSchema)}),u=(0,p.qo)({control:s}),{totalCost:h}=(0,l.useMemo)(()=>v.L.getCost({specs:u.specs,isPersistent:u.isPersistent,volumes:u.volumes,capabilities:{}}),[u.isPersistent,u.specs,u.volumes]),f=(0,l.useCallback)(n=>e.push("/dashboard/".concat(n)),[e]);return{address:(null==t?void 0:t.address)||"",accountBalance:o||0,isCreateButtonDisabled:!((o||0)>h),values:u,control:s,errors:g,handleSubmit:m,handleChangeEntityTab:f}}();return(0,t.jsxs)(et.Z,{onSubmit:u,errors:g,children:[(0,t.jsx)(eo,{children:(0,t.jsx)(A.Z,{children:(0,t.jsx)(ea,{selected:"function",onTabChange:h,tabs:[{id:"function",name:"Function"},{id:"instance",name:"Instance",label:"BETA",labelPosition:"top"},{id:"confidential",name:"Confidential",disabled:!0,label:"SOON",labelPosition:"top"}]})})}),(0,t.jsx)(ed,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"1",children:"Code to execute"}),(0,t.jsx)("p",{children:"If your code has any dependencies, you can upload them separately in the volume section below to ensure a faster creation."}),(0,t.jsx)(z,{name:"code",control:m})]})}),(0,t.jsx)(es,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"2",children:"Select runtime"}),(0,t.jsx)(er,{children:"Select the optimal environment for executing your functions, tailored to your specific requirements. Below are the available options"}),(0,t.jsx)(F,{name:"runtime",control:m})]})}),(0,t.jsx)(el,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"3",children:"Type of scheduling"}),(0,t.jsx)(ec,{children:"Configure if this program should be running continuously, persistent, or only on-demand in response to a user request or an event."}),(0,t.jsx)(K,{name:"isPersistent",control:m})]})}),(0,t.jsx)(em,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"4",children:"Select an instance size"}),(0,t.jsx)(ep,{children:"Select the hardware resources allocated to your functions, ensuring optimal performance and efficient resource usage tailored to your specific needs."}),(0,t.jsx)(C.Z,{name:"specs",control:m,type:d.py.Program,isPersistent:o.isPersistent})]})}),(0,t.jsx)(eg,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"5",children:"Name and tags"}),(0,t.jsx)(eu,{children:"Organize and identify your functions more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 functions."}),(0,t.jsx)(k.Z,{control:m,entityType:d.py.Program})]})}),(0,t.jsx)(eh,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"6",children:"Add volumes"}),o.specs&&(0,t.jsxs)(ef,{$color:"main2",className:"tp-body1",children:["Good news! Your selected package already includes"," ",(0,t.jsx)("span",{className:"text-main0",children:(0,ei.Fx)(o.specs.storage,{from:"MiB",to:"GiB",displayUnit:!0})})," ","of storage at no additional cost. This has been factored into your configuration to maximize efficiency and value. Feel free to adjust as necessary."]}),(0,t.jsx)(S.Z,{name:"volumes",control:m})]})}),(0,t.jsx)(ex,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"7",children:"Add environment variables"}),(0,t.jsx)(ey,{children:"Define key-value pairs that act as configuration settings for your web3 function. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code."}),(0,t.jsx)(N.Z,{name:"envVars",control:m})]})}),(0,t.jsx)(e_,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"8",children:"Custom domain"}),(0,t.jsx)(ej,{children:"Configure a user-friendly domain name for your web3 function, providing a more accessible and professional way for users to interact with your application."}),(0,t.jsx)(T.Z,{name:"domains",control:m,entityType:d.py.Program})]})}),(0,t.jsx)(P.Z,{address:e,type:d.py.Program,isPersistent:o.isPersistent,specs:o.specs,volumes:o.volumes,domains:o.domains,unlockedAmount:n,description:(0,t.jsx)(t.Fragment,{children:"This amount needs to be present in your wallet until the function is removed. Tokens won't be locked nor consumed. The function will be garbage collected once funds are removed from the wallet."}),button:(0,t.jsx)(a.zx,{type:"submit",color:"main0",kind:"neon",size:"big",variant:"primary",disabled:i,children:"Create function"})})]})}}},function(e){e.O(0,[312,55,253,774,888,179],function(){return e(e.s=2190)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[742],{2190:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/function",function(){return i(11477)}])},58833:function(e,n,i){"use strict";i.d(n,{Z:function(){return s}});var t=i(85893),o=i(19521),a=i(3837);let d=(0,o.ZP)(a.zx).attrs(e=>({...e,forwardedAs:"a",kind:"neon",variant:"text-only",color:"main0"})).withConfig({displayName:"styles__StyledExternalLinkButton",componentId:"sc-1fpmkx0-0"})([""]);function s(e){let{children:n,href:i,size:o="big",...a}=e;return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(d,{href:i,size:o,...a,target:"_blank",children:[n||i,(0,t.jsx)(r,{name:"square-up-right"})]})})}var r=(0,o.ZP)(a.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-7jgrdd-0"})({marginLeft:"0.625rem"})},82475:function(e,n,i){"use strict";i.d(n,{k:function(){return o}});var t=i(36470);function o(){let[e]=(0,t.mr)(),{programManager:n}=e;return n}},11477:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ev}});var t=i(85893),o=i(19521),a=i(3837),d=i(33358),s=i(3860),r=i(36470),l=i(67294),c=i(11163),m=i(94818),p=i(87536);let g={id:m.W.Runtime1},u=[m.J[m.W.Runtime1],m.J[m.W.Runtime2],m.J[m.W.Custom]];var h=i(32523),f=i(86495),x=i(78512),y=i(10159),_=i(82475),j=i(48847),v=i(39261);let b={lang:"python",type:"text",text:'from fastapi import FastAPI\n\napp = FastAPI()\n@app.get("/")\nasync def root():\n return {"message": "Hello World"}\n',entrypoint:"main:app"};var w=i(56312);let Z={...f.y,code:{...b},runtime:{...g},specs:{...(0,h.Fk)(!1)[0]},isPersistent:!1};var P=i(38478),C=i(90215),S=i(77842),N=i(61791),k=i(57412),T=i(73751),B=i(70641),I=i(58833);let F=l.memo(e=>{let{customCtrl:n,idCtrl:i,isCustomDisabled:o,options:d}=function(e){let{name:n="runtime",control:i,defaultValue:t,options:o}=e,a=(0,p.bc)({control:i,name:"".concat(n,".id"),defaultValue:null==t?void 0:t.id,rules:{onChange(e){e.target.value!==m.W.Custom&&s.field.onChange("")}}}),d=a.field.value!==m.W.Custom,s=(0,p.bc)({control:i,name:"".concat(n,".custom"),defaultValue:null==t?void 0:t.custom});return{idCtrl:a,customCtrl:s,options:o||u,isCustomDisabled:d}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(B.Z,{children:[(0,t.jsx)(a.Ee,{...i.field,...i.fieldState,direction:"column",children:d.map(e=>(0,t.jsx)(a.Y8,{label:e.name,value:e.id},e.id))}),!o&&(0,t.jsx)(L,{children:(0,t.jsx)(a.oi,{...n.field,...n.fieldState,label:"Runtime hash",placeholder:"3335ad270a571b..."})})]}),(0,t.jsx)(R,{children:(0,t.jsx)(I.Z,{href:"https://docs.aleph.im/computing/runtimes",children:"Learn more"})})]})});F.displayName="SelectFunctionRuntime";var L=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1caqya7-0"})({marginTop:"1.25rem"}),R=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1caqya7-1"})({marginTop:"1.5rem",textAlign:"right"}),A=i(2915),E=i(31477),D=i(11912);let q=l.memo(e=>{let{langCtrl:n,typeCtrl:i,textCtrl:o,fileCtrl:d,entryPointCtrl:s}=function(e){let{name:n="code",control:i,defaultValue:t=b}=e,o=(0,p.bc)({control:i,name:"".concat(n,".lang"),defaultValue:null==t?void 0:t.lang}),a=(0,p.bc)({control:i,name:"".concat(n,".entrypoint"),defaultValue:null==t?void 0:t.entrypoint}),d=(0,p.bc)({control:i,name:"".concat(n,".type"),defaultValue:null==t?void 0:t.type}),s=(0,p.bc)({control:i,name:"".concat(n,".file"),defaultValue:null==t?void 0:t.file}),r=(0,p.bc)({control:i,name:"".concat(n,".text"),defaultValue:null==b?void 0:b.text});return{langCtrl:o,typeCtrl:d,fileCtrl:s,textCtrl:r,entryPointCtrl:a}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{children:(0,t.jsx)(a.mQ,{selected:i.field.value,align:"left",tabs:[{id:"text",name:"Write code"},{id:"file",name:"Upload code"}],onTabChange:i.field.onChange})}),(0,t.jsx)("div",{role:"tabpanel",children:"text"===i.field.value?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W,{children:"To get started you can start adding your code in the window below."}),(0,t.jsx)(O,{children:(0,t.jsx)(B.Z,{children:(0,t.jsxs)(a.Ee,{...n.field,...n.fieldState,direction:"row",children:[(0,t.jsx)(a.Y8,{label:"Python 3.9",value:"python"}),(0,t.jsx)(a.Y8,{label:"Node.js",value:"javascript",disabled:!0})]})})}),(0,t.jsx)("div",{children:(0,t.jsx)(V,{...o.field,...o.fieldState,defaultLanguage:n.field.value,language:n.field.value})}),(0,t.jsx)(Y,{children:(0,t.jsx)(D.Z,{my:"bottom-right",at:"top-right",tooltipContent:(0,t.jsxs)(J,{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Write code"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Your code should have an app function that will serve as an entrypoint to the program."})]}),(0,t.jsxs)(M,{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Upload code"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Your zip file should contain a main file (ex: main.py) at its root that exposes an app function. This will serve as an entrypoint to the program."})]})]}),children:"Learn more"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(U,{children:"To get started, compress your code into a zip or squashfs (.sqsh) file and upload it here."}),(0,t.jsx)(B.Z,{children:(0,t.jsx)(G,{children:(0,t.jsxs)(E.Z,{...d.field,...d.fieldState,accept:".zip,.sqsh",children:["Upload code ",(0,t.jsx)(H,{name:"arrow-up"})]})})}),(0,t.jsx)(Q,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)(D.Z,{plain:!0,my:"bottom-left",at:"bottom-right",tooltipContent:(0,t.jsx)(X,{children:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"tp-body2 fs-md",children:"Entrypoint"}),(0,t.jsx)("div",{className:"tp-body1 fs-md",children:"Define an entrypoint to your program. For example if you have a file called main.py and a function called app, you should enter main:app."})]})}),children:(0,t.jsx)($,{children:"Entry point"})}),(0,t.jsx)(a.oi,{...s.field,...s.fieldState,placeholder:"main:app"})]})})]})})]})});q.displayName="AddFunctionCode";var z=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1lgkru6-0"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"0.75rem",paddingTop:"1.5rem"}),W=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-1lgkru6-1"})({marginBottom:"1.5rem"}),O=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1lgkru6-2"})({marginBottom:"1.5rem"}),V=(0,o.ZP)(a.pq).withConfig({displayName:"cmp___StyledCodeEditor",componentId:"sc-1lgkru6-3"})({minHeight:"415px",borderRadius:"1.5rem",padding:"1.25rem"}),Y=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1lgkru6-4"})({marginTop:"1.5rem",textAlign:"right"}),J=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1lgkru6-5"})({textAlign:"left"}),M=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1lgkru6-6"})({marginTop:"1.5rem"}),U=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-1lgkru6-7"})({marginBottom:"0.5rem"}),G=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1lgkru6-8"})({marginBottom:"1.5rem",paddingTop:"1.25rem",paddingBottom:"1.25rem",textAlign:"center"}),H=(0,o.ZP)(a.JO).withConfig({displayName:"cmp___StyledIcon",componentId:"sc-1lgkru6-9"})({marginLeft:"1rem"}),Q=(0,o.ZP)(B.Z).withConfig({displayName:"cmp___StyledNoisyContainer",componentId:"sc-1lgkru6-10"})({marginTop:"1.5rem"}),X=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-1lgkru6-11"})({textAlign:"left"}),$=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-1lgkru6-12"})({marginTop:"0.75rem",marginBottom:"0.75rem"});let K=l.memo(e=>{let{isPersistentValue:n,isPersistentHandleChange:i,isPersistentCtrl:o}=function(e){let{name:n="isPersistent",control:i,defaultValue:t}=e,o=(0,p.bc)({control:i,name:n,defaultValue:t}),a=(0,l.useCallback)(e=>{let n="true"===e.target.value;o.field.onChange(n)},[o.field]),d=(0,l.useMemo)(()=>o.field.value+"",[o.field]);return{isPersistentCtrl:o,isPersistentValue:d,isPersistentHandleChange:a}}(e);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B.Z,{children:(0,t.jsxs)(a.Ee,{...o.field,...o.fieldState,value:n,onChange:i,direction:"row",children:[(0,t.jsx)(a.Y8,{label:"Persistent",value:"true"}),(0,t.jsx)(a.Y8,{label:"On-demand",value:"false"})]})}),(0,t.jsx)(ee,{children:(0,t.jsx)(I.Z,{href:"https://docs.aleph.im/computing/persistent",children:"Learn more"})})]})});K.displayName="SelectFunctionPersistence";var ee=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1tb2omg-0"})({marginTop:"1.5rem",textAlign:"right"});let en=o.ZP.div.withConfig({displayName:"styles__BorderBox",componentId:"sc-cvbs9z-0"})(["",""],e=>{var n;let{theme:i,$color:t="main0"}=e,[a,d]=(null===(n=i.gradient[t])||void 0===n?void 0:n.colors)||[t,t];return(0,o.iv)([""," border-radius:1.5rem;backdrop-filter:blur(50px);color:","b3;&::before{content:'';position:absolute;top:0;left:0;height:100%;width:100%;border-radius:1.5rem;z-index:-1;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:exclude;mask-composite:exclude;-webkit-mask-composite:xor;background-image:linear-gradient(90deg,"," 0%,"," 100%);}"],{padding:"1.5rem"},i.color.text,a,d)});var ei=i(34853),et=i(5614),eo=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-gpssnr-0"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",paddingBottom:"0px","@media (min-width: 768px)":{paddingTop:"2rem",paddingBottom:"2rem"}}),ea=(0,o.ZP)(a.mQ).withConfig({displayName:"cmp___StyledTabs",componentId:"sc-gpssnr-1"})({overflow:"auto"}),ed=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection2",componentId:"sc-gpssnr-2"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),es=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection3",componentId:"sc-gpssnr-3"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),er=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-gpssnr-4"})({marginBottom:"1.5rem"}),el=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection4",componentId:"sc-gpssnr-5"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ec=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-gpssnr-6"})({marginBottom:"1.5rem"}),em=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection5",componentId:"sc-gpssnr-7"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ep=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP3",componentId:"sc-gpssnr-8"})({marginBottom:"1.5rem"}),eg=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection6",componentId:"sc-gpssnr-9"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eu=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP4",componentId:"sc-gpssnr-10"})({marginBottom:"1.5rem"}),eh=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection7",componentId:"sc-gpssnr-11"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ef=(0,o.ZP)(en).withConfig({displayName:"cmp___StyledBorderBox",componentId:"sc-gpssnr-12"})({marginTop:"1rem"}),ex=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection8",componentId:"sc-gpssnr-13"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ey=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP5",componentId:"sc-gpssnr-14"})({marginBottom:"1.5rem"}),e_=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection9",componentId:"sc-gpssnr-15"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ej=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP6",componentId:"sc-gpssnr-16"})({marginBottom:"1.5rem"}),ev=function(){let{address:e,accountBalance:n,isCreateButtonDisabled:i,values:o,control:m,errors:g,handleSubmit:u,handleChangeEntityTab:h}=function(){(0,x.Z)();let e=(0,c.useRouter)(),[n,i]=(0,r.mr)(),{account:t,accountBalance:o}=n,a=(0,_.k)(),d=(0,l.useCallback)(async n=>{if(!a)throw Error("Manager not ready");let t=await a.add(n);i({type:j.MF.addAccountFunction,payload:{accountFunction:t}}),e.replace("/dashboard")},[i,a,e]),{control:s,handleSubmit:m,formState:{errors:g}}=(0,y.c)({defaultValues:Z,onSubmit:d,resolver:(0,w.F)(v.L.addSchema)}),u=(0,p.qo)({control:s}),{totalCost:h}=(0,l.useMemo)(()=>v.L.getCost({specs:u.specs,isPersistent:u.isPersistent,volumes:u.volumes,capabilities:{}}),[u.isPersistent,u.specs,u.volumes]),f=(0,l.useCallback)(n=>e.push("/dashboard/".concat(n)),[e]);return{address:(null==t?void 0:t.address)||"",accountBalance:o||0,isCreateButtonDisabled:!((o||0)>h),values:u,control:s,errors:g,handleSubmit:m,handleChangeEntityTab:f}}();return(0,t.jsxs)(et.Z,{onSubmit:u,errors:g,children:[(0,t.jsx)(eo,{children:(0,t.jsx)(A.Z,{children:(0,t.jsx)(ea,{selected:"function",onTabChange:h,tabs:[{id:"function",name:"Function"},{id:"instance",name:"Instance",label:"BETA",labelPosition:"top"},{id:"confidential",name:"Confidential",disabled:!0,label:"SOON",labelPosition:"top"}]})})}),(0,t.jsx)(ed,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"1",children:"Code to execute"}),(0,t.jsx)("p",{children:"If your code has any dependencies, you can upload them separately in the volume section below to ensure a faster creation."}),(0,t.jsx)(q,{name:"code",control:m})]})}),(0,t.jsx)(es,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"2",children:"Select runtime"}),(0,t.jsx)(er,{children:"Select the optimal environment for executing your functions, tailored to your specific requirements. Below are the available options"}),(0,t.jsx)(F,{name:"runtime",control:m})]})}),(0,t.jsx)(el,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"3",children:"Type of scheduling"}),(0,t.jsx)(ec,{children:"Configure if this program should be running continuously, persistent, or only on-demand in response to a user request or an event."}),(0,t.jsx)(K,{name:"isPersistent",control:m})]})}),(0,t.jsx)(em,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"4",children:"Select an instance size"}),(0,t.jsx)(ep,{children:"Select the hardware resources allocated to your functions, ensuring optimal performance and efficient resource usage tailored to your specific needs."}),(0,t.jsx)(C.Z,{name:"specs",control:m,type:d.py.Program,isPersistent:o.isPersistent})]})}),(0,t.jsx)(eg,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"5",children:"Name and tags"}),(0,t.jsx)(eu,{children:"Organize and identify your functions more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 functions."}),(0,t.jsx)(T.Z,{control:m,entityType:d.py.Program})]})}),(0,t.jsx)(eh,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"6",children:"Add volumes"}),o.specs&&(0,t.jsxs)(ef,{$color:"main2",className:"tp-body1",children:["Good news! Your selected package already includes"," ",(0,t.jsx)("span",{className:"text-main0",children:(0,ei.Fx)(o.specs.storage,{from:"MiB",to:"GiB",displayUnit:!0})})," ","of storage at no additional cost. Feel free to add it here."]}),(0,t.jsx)(S.Z,{name:"volumes",control:m})]})}),(0,t.jsx)(ex,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"7",children:"Add environment variables"}),(0,t.jsx)(ey,{children:"Define key-value pairs that act as configuration settings for your web3 function. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code."}),(0,t.jsx)(N.Z,{name:"envVars",control:m})]})}),(0,t.jsx)(e_,{children:(0,t.jsxs)(A.Z,{children:[(0,t.jsx)(s.Z,{as:"h2",number:"8",children:"Custom domain"}),(0,t.jsx)(ej,{children:"Configure a user-friendly domain name for your web3 function, providing a more accessible and professional way for users to interact with your application."}),(0,t.jsx)(k.Z,{name:"domains",control:m,entityType:d.py.Program})]})}),(0,t.jsx)(P.Z,{address:e,type:d.py.Program,isPersistent:o.isPersistent,specs:o.specs,volumes:o.volumes,domains:o.domains,unlockedAmount:n,description:(0,t.jsx)(t.Fragment,{children:"This amount needs to be present in your wallet until the function is removed. Tokens won't be locked nor consumed. The function will be garbage collected once funds are removed from the wallet."}),button:(0,t.jsx)(a.zx,{type:"submit",color:"main0",kind:"neon",size:"big",variant:"primary",disabled:i,children:"Create function"})})]})}}},function(e){e.O(0,[312,55,253,774,888,179],function(){return e(e.s=2190)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/dashboard/instance-609017f39ef681ab.js b/_next/static/chunks/pages/dashboard/instance-609017f39ef681ab.js new file mode 100644 index 00000000..841f3623 --- /dev/null +++ b/_next/static/chunks/pages/dashboard/instance-609017f39ef681ab.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[655],{62269:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/instance",function(){return n(12377)}])},87969:function(e,i,n){"use strict";n.d(i,{S:function(){return c}});var t=n(36470),a=n(48847),d=n(67294),o=n(97167),s=n(67969),r=n(92670);function c(){let{triggerOnMount:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[i,n]=(0,t.mr)(),c=(0,r.p)(),l=(0,d.useCallback)(async()=>{if(!c)throw Error("Manager not ready");return await c.getAll()},[c]),m=(0,d.useCallback)(e=>{n({type:a.MF.setAccountSSHKeys,payload:{accountSSHKeys:e}})},[n]),p=(0,d.useCallback)((e,i)=>{c&&i(e)},[c]),u=(0,o.Q)({doRequest:l,onSuccess:m,onError:p,triggerOnMount:e}),g=i.accountSSHKeys;return(0,s.C)({entities:g,request:u.request,triggerOnMount:e}),[g,u]}},40223:function(e,i,n){"use strict";n.d(i,{s:function(){return a}});var t=n(11163);function a(){let{basePath:e}=(0,t.useRouter)();return e}},18585:function(e,i,n){"use strict";n.d(i,{U:function(){return a}});var t=n(36470);function a(){let[e]=(0,t.mr)(),{instanceManager:i}=e;return i}},92670:function(e,i,n){"use strict";n.d(i,{p:function(){return a}});var t=n(36470);function a(){let[e]=(0,t.mr)(),{sshKeyManager:i}=e;return i}},97167:function(e,i,n){"use strict";n.d(i,{Q:function(){return d}});var t=n(67294),a=n(47291);function d(e){let{doRequest:i,triggerOnMount:n,...d}=e,[o,{onLoad:s,onSuccess:r,onError:c}]=(0,a.g)(d),l=(0,t.useCallback)(async()=>{s();try{let e=await i();r(e);return}catch(e){c(e)}},[i,s,r,c]);return(0,t.useEffect)(()=>{n&&l()},[]),{...o,request:l}}},67969:function(e,i,n){"use strict";n.d(i,{C:function(){return a}});var t=n(67294);function a(e){let{entities:i=[],request:n,triggerOnMount:a}=e;(0,t.useEffect)(()=>{if(!a)return;let e=(Array.isArray(i)?i:[i]).filter(e=>!e.confirmed);if(!e.length)return;let t=setInterval(n,1e4);return()=>clearInterval(t)},[i,n,a])}},12377:function(e,i,n){"use strict";n.r(i),n.d(i,{default:function(){return ey}});var t,a,d=n(85893),o=n(19521),s=n(3837),r=n(3860),c=n(67294),l=n(40223);(t=a||(a={})).Debian11="887957042bb0e360da3485ed33175882ce72a70d79f1ba599400ff4802b7cee7",t.Debian12="6e30de68c6cedfa6b45240c2b51e52495ac6fb1bd4b36457b3d5ca307594d595",t.Ubuntu22="77fef271aa6ff9825efa3186ca2e715d19e7108279b817201c69c34cedc74c27";let m={[a.Debian11]:{id:a.Debian11,name:"Debian 11 “Bullseye”",dist:"debian"},[a.Debian12]:{id:a.Debian12,name:"Debian 12 “Bookworm”",dist:"debian"},[a.Ubuntu22]:{id:a.Ubuntu22,name:"Ubuntu 22.04 LTS",dist:"ubuntu"}};var p=n(87536);let u=a.Debian11,g=[m[a.Debian11],m[a.Debian12],m[a.Ubuntu22]],f=o.ZP.div.withConfig({displayName:"styles__StyledFlatCardContainer",componentId:"sc-17g2frl-0"})(["",""],{display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",gap:"1.5rem","@media (min-width: 768px)":{flexWrap:"wrap",justifyContent:"space-evenly"}}),h=o.ZP.div.withConfig({displayName:"styles__StyledFlatCard",componentId:"sc-17g2frl-1"})(["",""],e=>{let{theme:i,$selected:n,$disabled:t}=e,[a,d]=i.gradient.main0.colors;return(0,o.iv)([""," height:10.125rem;width:13.875rem;background-color:#ffffff1a;border-radius:1.5rem;"," &::after{content:'';position:absolute;top:0;left:0;height:100%;width:100%;border-radius:1.5rem;z-index:-1;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:exclude;mask-composite:exclude;-webkit-mask-composite:xor;","}&:hover{&::after{background-image:linear-gradient(90deg,"," 0%,"," 100%);}}",""],{position:"relative",display:"flex",flexShrink:"0",cursor:"pointer",flexDirection:"column",alignItems:"center",justifyContent:"center",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms"},t&&"opacity: 0.3;",n&&"background-image: linear-gradient(90deg, ".concat(a," 0%, ").concat(d," 100%);"),a,d,(0,s.gn)("md",(0,o.iv)(["width:30%;"])))}),y=(0,c.memo)((0,c.forwardRef)((e,i)=>{let{option:n,index:t,value:a,onChange:o}=e,s=a===n.id,r=(0,l.s)(),m=(0,c.useCallback)(()=>{n.disabled||o(n.id)},[n,o]),p=(0,c.useCallback)(e=>{("Space"===e.code||"Enter"===e.code)&&(e.preventDefault(),o(n.id))},[n,o]);return(0,d.jsxs)(h,{onClick:m,$selected:s,$disabled:n.disabled,ref:0===t?i:void 0,tabIndex:0,onKeyDown:p,children:[(0,d.jsx)(b,{src:"".concat("".concat(r,"/img"),"/image/").concat(n.dist,".svg"),alt:"".concat(n.name," image image logo")}),n.name]})}));y.displayName="SelectInstanceImageItem";let x=(0,c.memo)(e=>{let{imageCtrl:i,options:n}=function(e){let{name:i="image",control:n,defaultValue:t,options:a}=e,d=(0,p.bc)({control:n,name:i,defaultValue:t});return{imageCtrl:d,options:a||g}}(e);return(0,d.jsxs)(v,{children:[(0,d.jsx)(f,{children:n.map((e,n)=>(0,d.jsx)(y,{...i.field,index:n,option:e},e.id))}),i.fieldState.error&&(0,d.jsx)(s.Xq,{error:i.fieldState.error})]})});x.displayName="SelectInstanceImage";var b=(0,o.ZP)("img").withConfig({displayName:"cmp___StyledImg",componentId:"sc-gz18i0-0"})({marginBottom:"1rem"}),v=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-gz18i0-1"})({width:"100%",overflowX:"auto","@media (min-width: 768px)":{overflowX:"visible"}}),w=n(90215),_=n(77842),j=n(61791),S=n(87969);let C={key:"",isSelected:!0,isNew:!0};var Z=n(70641);let k=c.memo(e=>{let{index:i,keyCtrl:n,labelCtrl:t,isSelectedCtrl:a,allowRemove:o,isNew:r,handleRemove:l}=function(e){let{name:i="sshKeys",index:n,control:t,allowRemove:a,defaultValue:d,onRemove:o}=e,s=(0,p.bc)({control:t,name:"".concat(i,".").concat(n,".isSelected"),defaultValue:null==d?void 0:d.isSelected}),r=(0,p.bc)({control:t,name:"".concat(i,".").concat(n,".key"),defaultValue:null==d?void 0:d.key}),l=(0,p.bc)({control:t,name:"".concat(i,".").concat(n,".label"),defaultValue:null==d?void 0:d.label}),m=(null==d?void 0:d.isNew)||!1,u=(0,c.useCallback)(()=>{m&&o(n)},[n,m,o]);return{index:n,isSelectedCtrl:s,keyCtrl:r,labelCtrl:l,allowRemove:a,isNew:m,handleRemove:u}}(e);return(0,d.jsxs)(d.Fragment,{children:[a.fieldState.error&&(0,d.jsx)(s.Xq,{error:a.fieldState.error}),(0,d.jsxs)(N,{children:[(0,d.jsx)(P,{children:(0,d.jsx)(s.XZ,{...a.field,...a.fieldState,checked:!!a.field.value})}),(0,d.jsxs)(T,{children:[(0,d.jsx)(D,{children:(0,d.jsx)(s.oi,{...n.field,...n.fieldState,label:"Key #".concat(i+1),placeholder:"AAAAB3NzaC1yc2EAAAAB ... B3NzaaC1==",disabled:!r})}),(0,d.jsx)(B,{children:(0,d.jsx)(s.oi,{...t.field,...t.fieldState,label:"Label",placeholder:"cp@aleph.im",disabled:!r})}),o&&(0,d.jsx)(z,{children:r&&(0,d.jsx)(s.zx,{color:"main2",variant:"secondary",kind:"neon",size:"regular",type:"button",onClick:l,children:(0,d.jsx)(s.JO,{name:"trash"})})})]})]})]})});k.displayName="SSHKeyItem";let I=c.memo(e=>{let{name:i,control:n,fields:t,handleAdd:a,handleRemove:o,allowRemove:r}=function(e){let{name:i="sshKeys",control:n}=e,t=(0,p.Dq)({control:n,name:i}),{remove:a,append:d,replace:o,prepend:s}=t,r=t.fields,[l]=(0,S.S)(),m=(0,c.useMemo)(()=>(l||[]).map(e=>{let{key:i,label:n=""}=e;return{key:i,label:n,isSelected:!1,isNew:!1}}),[l]);(0,c.useEffect)(()=>{let e=m;if(0===e.length)return;if(0===r.length){o(e);return}let i=new Set(r.map(e=>e.key));0!==(e=m.filter(e=>!i.has(e.key))).length&&s(e)},[m,r,o,s]);let u=(0,c.useMemo)(()=>r.some(e=>e.isNew),[r]),g=(0,c.useCallback)(()=>{d({...C})},[d]);return{name:i,control:n,fields:r,handleAdd:g,handleRemove:a,allowRemove:u}}(e);return(0,d.jsxs)(d.Fragment,{children:[t.length>0&&(0,d.jsx)(Z.Z,{children:(0,d.jsx)(A,{children:t.map((e,t)=>(0,d.jsx)(k,{name:i,index:t,control:n,allowRemove:r,defaultValue:e,onRemove:o},e.id))})}),(0,d.jsx)(R,{children:(0,d.jsx)(s.zx,{type:"button",onClick:a,color:"main0",variant:"secondary",kind:"neon",size:"regular",children:"Add SSH key"})})]})});I.displayName="AddSSHKeys";var N=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1uniisg-0"})({display:"flex",gap:"1.5rem"}),P=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1uniisg-1"})({display:"flex",alignItems:"flex-start",paddingTop:"2.75rem"}),T=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1uniisg-2"})({display:"flex",flex:"1 1 auto",flexDirection:"column",gap:"1.5rem","@media (min-width: 768px)":{flexDirection:"row"}}),D=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1uniisg-3"})({flex:"1 1 auto"}),B=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1uniisg-4"})({"@media (min-width: 768px)":{width:"33.333333%"}}),z=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1uniisg-5"})({display:"flex",width:"3.5rem",alignItems:"flex-end",paddingBottom:"0.5rem","@media (min-width: 768px)":{justifyContent:"center"}}),A=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-1uniisg-6"})({display:"flex",flexDirection:"column",columnGap:"1.5rem",rowGap:"1rem"}),R=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-1uniisg-7"})({marginLeft:"1.5rem",marginRight:"1.5rem",marginTop:"1.5rem"}),L=n(57412),E=n(73751),F=n(38478),K=n(33358),M=n(2915),V=n(36470),q=n(11163),U=n(78512),X=n(10159),H=n(86495),O=n(32523),G=n(18585),Q=n(48847),W=n(49875),Y=n(56312);let $={...(0,O.Fk)(!0)[0]},J={...H.y,image:u,specs:$,volumes:[{volumeType:K.lf.Persistent,name:"System",mountPath:"/",size:$.storage,isFake:!0}]};var ee=n(5614),ei=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-a5vd7w-0"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",paddingBottom:"0px","@media (min-width: 768px)":{paddingTop:"2rem",paddingBottom:"2rem"}}),en=(0,o.ZP)(s.mQ).withConfig({displayName:"cmp___StyledTabs",componentId:"sc-a5vd7w-1"})({overflow:"auto"}),et=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection2",componentId:"sc-a5vd7w-2"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ea=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-a5vd7w-3"})({marginBottom:"1.5rem",marginTop:"3rem",paddingLeft:"0px",paddingRight:"0px"}),ed=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection3",componentId:"sc-a5vd7w-4"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eo=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-a5vd7w-5"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),es=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection4",componentId:"sc-a5vd7w-6"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),er=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-a5vd7w-7"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),ec=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection5",componentId:"sc-a5vd7w-8"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),el=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-a5vd7w-9"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),em=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection6",componentId:"sc-a5vd7w-10"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ep=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-a5vd7w-11"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),eu=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection7",componentId:"sc-a5vd7w-12"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eg=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-a5vd7w-13"})({marginBottom:"1.5rem"}),ef=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection8",componentId:"sc-a5vd7w-14"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eh=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-a5vd7w-15"})({marginBottom:"1.5rem"}),ey=function(){let{address:e,accountBalance:i,isCreateButtonDisabled:n,values:t,control:a,errors:o,handleSubmit:l,handleChangeEntityTab:m}=function(){var e;(0,U.Z)();let i=(0,q.useRouter)(),[n,t]=(0,V.mr)(),{account:a,accountBalance:d}=n,o=(0,G.U)(),s=(0,c.useCallback)(async e=>{if(!o)throw Error("Manager not ready");let n=await o.add(e);t({type:Q.MF.addAccountInstance,payload:{accountInstance:n}}),i.replace("/dashboard")},[t,o,i]),{control:r,handleSubmit:l,formState:{errors:m},setValue:u}=(0,X.c)({defaultValues:J,onSubmit:s,resolver:(0,Y.F)(W.u.addSchema)}),g=(0,p.qo)({control:r}),{storage:f}=g.specs,h=null===(e=g.volumes)||void 0===e?void 0:e.find(e=>e.isFake);(0,c.useEffect)(()=>{f&&h&&h.size!==f&&u("volumes.0.size",f)},[f,h,u]);let{totalCost:y}=(0,c.useMemo)(()=>W.u.getCost({specs:g.specs,volumes:g.volumes,capabilities:{}}),[g.specs,g.volumes]),x=(0,c.useCallback)(e=>{i.push("/dashboard/".concat(e))},[i]);return{address:(null==a?void 0:a.address)||"",accountBalance:d||0,isCreateButtonDisabled:!((d||0)>y),values:g,control:r,errors:m,handleSubmit:l,handleChangeEntityTab:x}}();return(0,d.jsxs)(ee.Z,{onSubmit:l,errors:o,children:[(0,d.jsx)(ei,{children:(0,d.jsx)(M.Z,{children:(0,d.jsx)(en,{selected:"instance",onTabChange:m,tabs:[{id:"function",name:"Function"},{id:"instance",name:"Instance",label:"BETA",labelPosition:"top"},{id:"confidential",name:"Confidential",disabled:!0,label:"SOON",labelPosition:"top"}]})})}),(0,d.jsx)(et,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"1",children:"Choose an image"}),(0,d.jsx)("p",{children:"Chose a base image for your VM. It’s the base system that you will be able to customize."}),(0,d.jsx)(ea,{children:(0,d.jsx)(x,{name:"image",control:a})})]})}),(0,d.jsx)(ed,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"2",children:"Select an instance size"}),(0,d.jsx)("p",{children:"Please select one of the available instance size as a base for your VM. You will be able to customize the volumes later."}),(0,d.jsx)(eo,{children:(0,d.jsx)(w.Z,{name:"specs",control:a,type:K.py.Instance,isPersistent:!0})})]})}),(0,d.jsx)(es,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"3",children:"Add volumes"}),(0,d.jsx)(er,{children:(0,d.jsx)(_.Z,{name:"volumes",control:a})})]})}),(0,d.jsx)(ec,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"4",children:"Configure SSH Key"}),(0,d.jsx)("p",{children:"Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist."}),(0,d.jsx)(el,{children:(0,d.jsx)(I,{name:"sshKeys",control:a})})]})}),(0,d.jsx)(em,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"5",children:"Add environment variables"}),(0,d.jsx)("p",{children:"Define key-value pairs that act as configuration settings for your web3 instance. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code."}),(0,d.jsx)(ep,{children:(0,d.jsx)(j.Z,{name:"envVars",control:a})})]})}),(0,d.jsx)(eu,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"6",children:"Custom domain"}),(0,d.jsx)(eg,{children:"You have the ability to configure a domain name to access your cloud instances. By setting up a user-friendly custom domain, accessing your instances becomes easier and more intuitive. It&s another way we&re making web3 cloud management as straightforward as possible."}),(0,d.jsx)(L.Z,{name:"domains",control:a,entityType:K.py.Instance})]})}),(0,d.jsx)(ef,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"7",children:"Name and tags"}),(0,d.jsx)(eh,{children:"Organize and identify your instances more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 instances."}),(0,d.jsx)(E.Z,{control:a,entityType:K.py.Instance})]})}),(0,d.jsx)(F.Z,{address:e,type:K.py.Instance,isPersistent:!0,specs:t.specs,volumes:t.volumes,domains:t.domains,unlockedAmount:i,description:(0,d.jsx)(d.Fragment,{children:"This amount needs to be present in your wallet until the instance is removed. Tokens won't be locked nor consumed. The instance will be garbage collected once funds are removed from the wallet."}),button:(0,d.jsx)(s.zx,{type:"submit",color:"main0",kind:"neon",size:"big",variant:"primary",disabled:n,children:"Create instance"})})]})}}},function(e){e.O(0,[312,55,253,774,888,179],function(){return e(e.s=62269)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/dashboard/instance-e14b5838edf01203.js b/_next/static/chunks/pages/dashboard/instance-e14b5838edf01203.js deleted file mode 100644 index 200585de..00000000 --- a/_next/static/chunks/pages/dashboard/instance-e14b5838edf01203.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[655],{62269:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/instance",function(){return i(12377)}])},87969:function(e,n,i){"use strict";i.d(n,{S:function(){return c}});var t=i(36470),a=i(48847),d=i(67294),o=i(97167),s=i(67969),r=i(92670);function c(){let{triggerOnMount:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[n,i]=(0,t.mr)(),c=(0,r.p)(),l=(0,d.useCallback)(async()=>{if(!c)throw Error("Manager not ready");return await c.getAll()},[c]),m=(0,d.useCallback)(e=>{i({type:a.MF.setAccountSSHKeys,payload:{accountSSHKeys:e}})},[i]),p=(0,d.useCallback)((e,n)=>{c&&n(e)},[c]),u=(0,o.Q)({doRequest:l,onSuccess:m,onError:p,triggerOnMount:e}),g=n.accountSSHKeys;return(0,s.C)({entities:g,request:u.request,triggerOnMount:e}),[g,u]}},40223:function(e,n,i){"use strict";i.d(n,{s:function(){return a}});var t=i(11163);function a(){let{basePath:e}=(0,t.useRouter)();return e}},18585:function(e,n,i){"use strict";i.d(n,{U:function(){return a}});var t=i(36470);function a(){let[e]=(0,t.mr)(),{instanceManager:n}=e;return n}},92670:function(e,n,i){"use strict";i.d(n,{p:function(){return a}});var t=i(36470);function a(){let[e]=(0,t.mr)(),{sshKeyManager:n}=e;return n}},97167:function(e,n,i){"use strict";i.d(n,{Q:function(){return d}});var t=i(67294),a=i(47291);function d(e){let{doRequest:n,triggerOnMount:i,...d}=e,[o,{onLoad:s,onSuccess:r,onError:c}]=(0,a.g)(d),l=(0,t.useCallback)(async()=>{s();try{let e=await n();r(e);return}catch(e){c(e)}},[n,s,r,c]);return(0,t.useEffect)(()=>{i&&l()},[]),{...o,request:l}}},67969:function(e,n,i){"use strict";i.d(n,{C:function(){return a}});var t=i(67294);function a(e){let{entities:n=[],request:i,triggerOnMount:a}=e;(0,t.useEffect)(()=>{if(!a)return;let e=(Array.isArray(n)?n:[n]).filter(e=>!e.confirmed);if(!e.length)return;let t=setInterval(i,1e4);return()=>clearInterval(t)},[n,i,a])}},12377:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return eh}});var t,a,d=i(85893),o=i(19521),s=i(3837),r=i(3860),c=i(67294),l=i(40223);(t=a||(a={})).Debian11="887957042bb0e360da3485ed33175882ce72a70d79f1ba599400ff4802b7cee7",t.Debian12="6e30de68c6cedfa6b45240c2b51e52495ac6fb1bd4b36457b3d5ca307594d595",t.Ubuntu22="77fef271aa6ff9825efa3186ca2e715d19e7108279b817201c69c34cedc74c27";let m={[a.Debian11]:{id:a.Debian11,name:"Debian 11 “Bullseye”",dist:"debian"},[a.Debian12]:{id:a.Debian12,name:"Debian 12 “Bookworm”",dist:"debian"},[a.Ubuntu22]:{id:a.Ubuntu22,name:"Ubuntu 22.04 LTS",dist:"ubuntu"}};var p=i(87536);let u=a.Debian11,g=[m[a.Debian11],m[a.Debian12],m[a.Ubuntu22]],f=o.ZP.div.withConfig({displayName:"styles__StyledFlatCardContainer",componentId:"sc-17g2frl-0"})(["",""],{display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",gap:"1.5rem","@media (min-width: 768px)":{flexWrap:"wrap",justifyContent:"space-evenly"}}),h=o.ZP.div.withConfig({displayName:"styles__StyledFlatCard",componentId:"sc-17g2frl-1"})(["",""],e=>{let{theme:n,$selected:i,$disabled:t}=e,[a,d]=n.gradient.main0.colors;return(0,o.iv)([""," height:10.125rem;width:13.875rem;background-color:#ffffff1a;border-radius:1.5rem;"," &::after{content:'';position:absolute;top:0;left:0;height:100%;width:100%;border-radius:1.5rem;z-index:-1;padding:1px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:exclude;mask-composite:exclude;-webkit-mask-composite:xor;","}&:hover{&::after{background-image:linear-gradient(90deg,"," 0%,"," 100%);}}",""],{position:"relative",display:"flex",flexShrink:"0",cursor:"pointer",flexDirection:"column",alignItems:"center",justifyContent:"center",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms"},t&&"opacity: 0.3;",i&&"background-image: linear-gradient(90deg, ".concat(a," 0%, ").concat(d," 100%);"),a,d,(0,s.gn)("md",(0,o.iv)(["width:30%;"])))}),y=(0,c.memo)((0,c.forwardRef)((e,n)=>{let{option:i,index:t,value:a,onChange:o}=e,s=a===i.id,r=(0,l.s)(),m=(0,c.useCallback)(()=>{i.disabled||o(i.id)},[i,o]),p=(0,c.useCallback)(e=>{("Space"===e.code||"Enter"===e.code)&&(e.preventDefault(),o(i.id))},[i,o]);return(0,d.jsxs)(h,{onClick:m,$selected:s,$disabled:i.disabled,ref:0===t?n:void 0,tabIndex:0,onKeyDown:p,children:[(0,d.jsx)(b,{src:"".concat("".concat(r,"/img"),"/image/").concat(i.dist,".svg"),alt:"".concat(i.name," image image logo")}),i.name]})}));y.displayName="SelectInstanceImageItem";let x=(0,c.memo)(e=>{let{imageCtrl:n,options:i}=function(e){let{name:n="image",control:i,defaultValue:t,options:a}=e,d=(0,p.bc)({control:i,name:n,defaultValue:t});return{imageCtrl:d,options:a||g}}(e);return(0,d.jsxs)(v,{children:[(0,d.jsx)(f,{children:i.map((e,i)=>(0,d.jsx)(y,{...n.field,index:i,option:e},e.id))}),n.fieldState.error&&(0,d.jsx)(s.Xq,{error:n.fieldState.error})]})});x.displayName="SelectInstanceImage";var b=(0,o.ZP)("img").withConfig({displayName:"cmp___StyledImg",componentId:"sc-gz18i0-0"})({marginBottom:"1rem"}),v=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-gz18i0-1"})({width:"100%",overflowX:"auto","@media (min-width: 768px)":{overflowX:"visible"}}),w=i(90215),_=i(77842),j=i(61791),S=i(87969);let C={key:"",isSelected:!0,isNew:!0};var Z=i(70641);let I=c.memo(e=>{let{index:n,keyCtrl:i,labelCtrl:t,isSelectedCtrl:a,allowRemove:o,isNew:r,handleRemove:l}=function(e){let{name:n="sshKeys",index:i,control:t,allowRemove:a,defaultValue:d,onRemove:o}=e,s=(0,p.bc)({control:t,name:"".concat(n,".").concat(i,".isSelected"),defaultValue:null==d?void 0:d.isSelected}),r=(0,p.bc)({control:t,name:"".concat(n,".").concat(i,".key"),defaultValue:null==d?void 0:d.key}),l=(0,p.bc)({control:t,name:"".concat(n,".").concat(i,".label"),defaultValue:null==d?void 0:d.label}),m=(null==d?void 0:d.isNew)||!1,u=(0,c.useCallback)(()=>{m&&o(i)},[i,m,o]);return{index:i,isSelectedCtrl:s,keyCtrl:r,labelCtrl:l,allowRemove:a,isNew:m,handleRemove:u}}(e);return(0,d.jsxs)(d.Fragment,{children:[a.fieldState.error&&(0,d.jsx)(s.Xq,{error:a.fieldState.error}),(0,d.jsxs)(N,{children:[(0,d.jsx)(P,{children:(0,d.jsx)(s.XZ,{...a.field,...a.fieldState,checked:!!a.field.value})}),(0,d.jsxs)(T,{children:[(0,d.jsx)(D,{children:(0,d.jsx)(s.oi,{...i.field,...i.fieldState,label:"Key #".concat(n+1),placeholder:"AAAAB3NzaC1yc2EAAAAB ... B3NzaaC1==",disabled:!r})}),(0,d.jsx)(B,{children:(0,d.jsx)(s.oi,{...t.field,...t.fieldState,label:"Label",placeholder:"cp@aleph.im",disabled:!r})}),o&&(0,d.jsx)(A,{children:r&&(0,d.jsx)(s.zx,{color:"main2",variant:"secondary",kind:"neon",size:"regular",type:"button",onClick:l,children:(0,d.jsx)(s.JO,{name:"trash"})})})]})]})]})});I.displayName="SSHKeyItem";let k=c.memo(e=>{let{name:n,control:i,fields:t,handleAdd:a,handleRemove:o,allowRemove:r}=function(e){let{name:n="sshKeys",control:i}=e,t=(0,p.Dq)({control:i,name:n}),{remove:a,append:d,replace:o,prepend:s}=t,r=t.fields,[l]=(0,S.S)(),m=(0,c.useMemo)(()=>(l||[]).map(e=>{let{key:n,label:i=""}=e;return{key:n,label:i,isSelected:!1,isNew:!1}}),[l]);(0,c.useEffect)(()=>{let e=m;if(0===e.length)return;if(0===r.length){o(e);return}let n=new Set(r.map(e=>e.key));0!==(e=m.filter(e=>!n.has(e.key))).length&&s(e)},[m,r,o,s]);let u=(0,c.useMemo)(()=>r.some(e=>e.isNew),[r]),g=(0,c.useCallback)(()=>{d({...C})},[d]);return{name:n,control:i,fields:r,handleAdd:g,handleRemove:a,allowRemove:u}}(e);return(0,d.jsxs)(d.Fragment,{children:[t.length>0&&(0,d.jsx)(Z.Z,{children:(0,d.jsx)(R,{children:t.map((e,t)=>(0,d.jsx)(I,{name:n,index:t,control:i,allowRemove:r,defaultValue:e,onRemove:o},e.id))})}),(0,d.jsx)(z,{children:(0,d.jsx)(s.zx,{type:"button",onClick:a,color:"main0",variant:"secondary",kind:"neon",size:"regular",children:"Add SSH key"})})]})});k.displayName="AddSSHKeys";var N=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-1uniisg-0"})({display:"flex",gap:"1.5rem"}),P=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-1uniisg-1"})({display:"flex",alignItems:"flex-start",paddingTop:"2.75rem"}),T=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-1uniisg-2"})({display:"flex",flex:"1 1 auto",flexDirection:"column",gap:"1.5rem","@media (min-width: 768px)":{flexDirection:"row"}}),D=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-1uniisg-3"})({flex:"1 1 auto"}),B=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-1uniisg-4"})({"@media (min-width: 768px)":{width:"33.333333%"}}),A=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv6",componentId:"sc-1uniisg-5"})({display:"flex",width:"3.5rem",alignItems:"flex-end",paddingBottom:"0.5rem","@media (min-width: 768px)":{justifyContent:"center"}}),R=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv7",componentId:"sc-1uniisg-6"})({display:"flex",flexDirection:"column",columnGap:"1.5rem",rowGap:"1rem"}),z=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv8",componentId:"sc-1uniisg-7"})({marginLeft:"1.5rem",marginRight:"1.5rem",marginTop:"1.5rem"}),L=i(57412),E=i(73751),F=i(38478),K=i(33358),M=i(2915),V=i(36470),q=i(11163),U=i(78512),X=i(10159),H=i(86495),O=i(32523),G=i(18585),Q=i(48847),W=i(49875),Y=i(56312);let $={...H.y,image:u,specs:{...(0,O.Fk)(!0)[0]}};var J=i(5614),ee=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection",componentId:"sc-a5vd7w-0"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",paddingBottom:"0px","@media (min-width: 768px)":{paddingTop:"2rem",paddingBottom:"2rem"}}),en=(0,o.ZP)(s.mQ).withConfig({displayName:"cmp___StyledTabs",componentId:"sc-a5vd7w-1"})({overflow:"auto"}),ei=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection2",componentId:"sc-a5vd7w-2"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),et=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv",componentId:"sc-a5vd7w-3"})({marginBottom:"1.5rem",marginTop:"3rem",paddingLeft:"0px",paddingRight:"0px"}),ea=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection3",componentId:"sc-a5vd7w-4"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ed=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv2",componentId:"sc-a5vd7w-5"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),eo=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection4",componentId:"sc-a5vd7w-6"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),es=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv3",componentId:"sc-a5vd7w-7"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),er=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection5",componentId:"sc-a5vd7w-8"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ec=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv4",componentId:"sc-a5vd7w-9"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),el=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection6",componentId:"sc-a5vd7w-10"})({paddingLeft:"0px",paddingRight:"0px",paddingBottom:"1.5rem",paddingTop:"5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),em=(0,o.ZP)("div").withConfig({displayName:"cmp___StyledDiv5",componentId:"sc-a5vd7w-11"})({marginTop:"1.5rem",marginBottom:"1.5rem",paddingLeft:"0px",paddingRight:"0px"}),ep=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection7",componentId:"sc-a5vd7w-12"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),eu=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP",componentId:"sc-a5vd7w-13"})({marginBottom:"1.5rem"}),eg=(0,o.ZP)("section").withConfig({displayName:"cmp___StyledSection8",componentId:"sc-a5vd7w-14"})({paddingLeft:"0px",paddingRight:"0px",paddingTop:"1.5rem",paddingBottom:"1.5rem","@media (min-width: 768px)":{paddingTop:"2.5rem",paddingBottom:"2.5rem"}}),ef=(0,o.ZP)("p").withConfig({displayName:"cmp___StyledP2",componentId:"sc-a5vd7w-15"})({marginBottom:"1.5rem"}),eh=function(){let{address:e,accountBalance:n,isCreateButtonDisabled:i,values:t,control:a,errors:o,handleSubmit:l,handleChangeEntityTab:m}=function(){(0,U.Z)();let e=(0,q.useRouter)(),[n,i]=(0,V.mr)(),{account:t,accountBalance:a}=n,d=(0,G.U)(),o=(0,c.useCallback)(async n=>{if(!d)throw Error("Manager not ready");let t=await d.add(n);i({type:Q.MF.addAccountInstance,payload:{accountInstance:t}}),e.replace("/dashboard")},[i,d,e]),{control:s,handleSubmit:r,formState:{errors:l}}=(0,X.c)({defaultValues:$,onSubmit:o,resolver:(0,Y.F)(W.u.addSchema)}),m=(0,p.qo)({control:s}),{totalCost:u}=(0,c.useMemo)(()=>W.u.getCost({specs:m.specs,volumes:m.volumes,capabilities:{}}),[m.specs,m.volumes]),g=(0,c.useCallback)(n=>{e.push("/dashboard/".concat(n))},[e]);return{address:(null==t?void 0:t.address)||"",accountBalance:a||0,isCreateButtonDisabled:!((a||0)>u),values:m,control:s,errors:l,handleSubmit:r,handleChangeEntityTab:g}}();return(0,d.jsxs)(J.Z,{onSubmit:l,errors:o,children:[(0,d.jsx)(ee,{children:(0,d.jsx)(M.Z,{children:(0,d.jsx)(en,{selected:"instance",onTabChange:m,tabs:[{id:"function",name:"Function"},{id:"instance",name:"Instance",label:"BETA",labelPosition:"top"},{id:"confidential",name:"Confidential",disabled:!0,label:"SOON",labelPosition:"top"}]})})}),(0,d.jsx)(ei,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"1",children:"Choose an image"}),(0,d.jsx)("p",{children:"Chose a base image for your VM. It’s the base system that you will be able to customize."}),(0,d.jsx)(et,{children:(0,d.jsx)(x,{name:"image",control:a})})]})}),(0,d.jsx)(ea,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"2",children:"Select an instance size"}),(0,d.jsx)("p",{children:"Please select one of the available instance size as a base for your VM. You will be able to customize the volumes later."}),(0,d.jsx)(ed,{children:(0,d.jsx)(w.Z,{name:"specs",control:a,type:K.py.Instance,isPersistent:!0})})]})}),(0,d.jsx)(eo,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"3",children:"Add volumes"}),(0,d.jsx)(es,{children:(0,d.jsx)(_.Z,{name:"volumes",control:a})})]})}),(0,d.jsx)(er,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"4",children:"Configure SSH Key"}),(0,d.jsx)("p",{children:"Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist."}),(0,d.jsx)(ec,{children:(0,d.jsx)(k,{name:"sshKeys",control:a})})]})}),(0,d.jsx)(el,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"5",children:"Add environment variables"}),(0,d.jsx)("p",{children:"Define key-value pairs that act as configuration settings for your web3 instance. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code."}),(0,d.jsx)(em,{children:(0,d.jsx)(j.Z,{name:"envVars",control:a})})]})}),(0,d.jsx)(ep,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"6",children:"Custom domain"}),(0,d.jsx)(eu,{children:"You have the ability to configure a domain name to access your cloud instances. By setting up a user-friendly custom domain, accessing your instances becomes easier and more intuitive. It&s another way we&re making web3 cloud management as straightforward as possible."}),(0,d.jsx)(L.Z,{name:"domains",control:a,entityType:K.py.Instance})]})}),(0,d.jsx)(eg,{children:(0,d.jsxs)(M.Z,{children:[(0,d.jsx)(r.Z,{as:"h2",number:"7",children:"Name and tags"}),(0,d.jsx)(ef,{children:"Organize and identify your instances more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 instances."}),(0,d.jsx)(E.Z,{control:a,entityType:K.py.Instance})]})}),(0,d.jsx)(F.Z,{address:e,type:K.py.Instance,isPersistent:!0,specs:t.specs,volumes:t.volumes,domains:t.domains,unlockedAmount:n,description:(0,d.jsx)(d.Fragment,{children:"This amount needs to be present in your wallet until the instance is removed. Tokens won't be locked nor consumed. The instance will be garbage collected once funds are removed from the wallet."}),button:(0,d.jsx)(s.zx,{type:"submit",color:"main0",kind:"neon",size:"big",variant:"primary",disabled:i,children:"Create instance"})})]})}}},function(e){e.O(0,[312,55,253,774,888,179],function(){return e(e.s=62269)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dashboard/domain/index.html b/dashboard/domain/index.html index 7e55060a..4a6cb78a 100644 --- a/dashboard/domain/index.html +++ b/dashboard/domain/index.html @@ -1,4 +1,4 @@ -

A domain should be linked to an existing resource. Try to create an instance or function first

\ No newline at end of file +

A domain should be linked to an existing resource. Try to create an instance or function first

\ No newline at end of file diff --git a/dashboard/function/index.html b/dashboard/function/index.html index afc3a1de..67eadf0e 100644 --- a/dashboard/function/index.html +++ b/dashboard/function/index.html @@ -1,4 +1,4 @@ -

01Code to execute

If your code has any dependencies, you can upload them separately in the volume section below to ensure a faster creation.

To get started you can start adding your code in the window below.

Loading...
Learn more

02Select runtime

Select the optimal environment for executing your functions, tailored to your specific requirements. Below are the available options

03Type of scheduling

Configure if this program should be running continuously, persistent, or only on-demand in response to a user request or an event.

04Select an instance size

Select the hardware resources allocated to your functions, ensuring optimal performance and efficient resource usage tailored to your specific needs.

Cores
Memory
Hold
1 x86 64bit2.00 GB200 ALEPH
2 x86 64bit4.00 GB400 ALEPH
4 x86 64bit8.00 GB800 ALEPH
6 x86 64bit12.00 GB1200 ALEPH
8 x86 64bit16.00 GB1600 ALEPH
12 x86 64bit24.00 GB2400 ALEPH

05Name and tags

Organize and identify your functions more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 functions.

Function name
Tags

06Add volumes

Good news! Your selected package already includes 2.00 GB of storage at no additional cost. This has been factored into your configuration to maximize efficiency and value. Feel free to adjust as necessary.
Learn more

07Add environment variables

Define key-value pairs that act as configuration settings for your web3 function. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code.

08Custom domain

Configure a user-friendly domain name for your web3 function, providing a more accessible and professional way for users to interact with your application.

Estimated holding requirements

This amount needs to be present in your wallet until the function is removed. Tokens won't be locked nor consumed. The function will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
FUNCTION
1x86-64bit.2GB-RAM
200.0 ALEPH
TYPE
on-demand
-
Total
200.0 ALEPH
\ No newline at end of file +

01Code to execute

If your code has any dependencies, you can upload them separately in the volume section below to ensure a faster creation.

To get started you can start adding your code in the window below.

Loading...
Learn more

02Select runtime

Select the optimal environment for executing your functions, tailored to your specific requirements. Below are the available options

03Type of scheduling

Configure if this program should be running continuously, persistent, or only on-demand in response to a user request or an event.

04Select an instance size

Select the hardware resources allocated to your functions, ensuring optimal performance and efficient resource usage tailored to your specific needs.

Cores
Memory
Hold
1 x86 64bit2.00 GB200 ALEPH
2 x86 64bit4.00 GB400 ALEPH
4 x86 64bit8.00 GB800 ALEPH
6 x86 64bit12.00 GB1200 ALEPH
8 x86 64bit16.00 GB1600 ALEPH
12 x86 64bit24.00 GB2400 ALEPH

05Name and tags

Organize and identify your functions more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 functions.

Function name
Tags

06Add volumes

Good news! Your selected package already includes 2.00 GB of storage at no additional cost. Feel free to add it here.
Learn more

07Add environment variables

Define key-value pairs that act as configuration settings for your web3 function. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code.

08Custom domain

Configure a user-friendly domain name for your web3 function, providing a more accessible and professional way for users to interact with your application.

Estimated holding requirements

This amount needs to be present in your wallet until the function is removed. Tokens won't be locked nor consumed. The function will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
FUNCTION
1x86-64bit.2GB-RAM
200.0 ALEPH
TYPE
on-demand
-
Total
200.0 ALEPH
\ No newline at end of file diff --git a/dashboard/index.html b/dashboard/index.html index 5054a7f7..5f5c2feb 100644 --- a/dashboard/index.html +++ b/dashboard/index.html @@ -1,4 +1,4 @@ -

Acquire aleph.im tokens for versatile access to resources within a defined duration. These tokens remain in your wallet without being locked or consumed, providing you with flexibility in utilizing aleph.im's infrastructure. If you choose to remove the tokens from your wallet, the allocated resources will be efficiently reclaimed. Feel free to use or hold the tokens according to your needs, even when not actively using Aleph.im's resources.

\ No newline at end of file +

Acquire aleph.im tokens for versatile access to resources within a defined duration. These tokens remain in your wallet without being locked or consumed, providing you with flexibility in utilizing aleph.im's infrastructure. If you choose to remove the tokens from your wallet, the allocated resources will be efficiently reclaimed. Feel free to use or hold the tokens according to your needs, even when not actively using Aleph.im's resources.

\ No newline at end of file diff --git a/dashboard/instance/index.html b/dashboard/instance/index.html index f86a7d52..06cad81f 100644 --- a/dashboard/instance/index.html +++ b/dashboard/instance/index.html @@ -1,4 +1,4 @@ -

01Choose an image

Chose a base image for your VM. It’s the base system that you will be able to customize.

Debian 11 “Bullseye” image image logoDebian 11 “Bullseye”
Debian 12 “Bookworm” image image logoDebian 12 “Bookworm”
Ubuntu 22.04 LTS image image logoUbuntu 22.04 LTS

02Select an instance size

Please select one of the available instance size as a base for your VM. You will be able to customize the volumes later.

Cores
Memory
Storage
Hold
1 x86 64bit2.00 GB20.00 GB2000 ALEPH
2 x86 64bit4.00 GB40.00 GB4000 ALEPH
4 x86 64bit8.00 GB80.00 GB8000 ALEPH
6 x86 64bit12.00 GB120.00 GB12000 ALEPH
8 x86 64bit16.00 GB160.00 GB16000 ALEPH
12 x86 64bit24.00 GB240.00 GB24000 ALEPH

03Add volumes

Learn more

04Configure SSH Key

Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist.

05Add environment variables

Define key-value pairs that act as configuration settings for your web3 instance. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code.

06Custom domain

You have the ability to configure a domain name to access your cloud instances. By setting up a user-friendly custom domain, accessing your instances becomes easier and more intuitive. It&s another way we&re making web3 cloud management as straightforward as possible.

07Name and tags

Organize and identify your instances more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 instances.

Instance name
Tags

Estimated holding requirements

This amount needs to be present in your wallet until the instance is removed. Tokens won't be locked nor consumed. The instance will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
INSTANCE
1x86-64bit.2GB-RAM.20GB-HDD
2.0K ALEPH
Total
2.0K ALEPH
\ No newline at end of file +data-styled.g226[id="cmp___StyledP2-sc-a5vd7w-15"]{content:"iGJVci,"}/*!sc*/ +

01Choose an image

Chose a base image for your VM. It’s the base system that you will be able to customize.

Debian 11 “Bullseye” image image logoDebian 11 “Bullseye”
Debian 12 “Bookworm” image image logoDebian 12 “Bookworm”
Ubuntu 22.04 LTS image image logoUbuntu 22.04 LTS

02Select an instance size

Please select one of the available instance size as a base for your VM. You will be able to customize the volumes later.

Cores
Memory
Storage
Hold
1 x86 64bit2.00 GB20.00 GB2000 ALEPH
2 x86 64bit4.00 GB40.00 GB4000 ALEPH
4 x86 64bit8.00 GB80.00 GB8000 ALEPH
6 x86 64bit12.00 GB120.00 GB12000 ALEPH
8 x86 64bit16.00 GB160.00 GB16000 ALEPH
12 x86 64bit24.00 GB240.00 GB24000 ALEPH

03Add volumes

Create and configure persistent storage for your web3 functions, enabling your application to maintain data across multiple invocations or sessions. You can set up a customized storage solution tailored to your application's requirements.

Volume name
Mount
Size (GB)
Learn more

04Configure SSH Key

Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist.

05Add environment variables

Define key-value pairs that act as configuration settings for your web3 instance. Environment variables offer a convenient way to store information, manage configurations, and modify your application's behaviour without altering the source code.

06Custom domain

You have the ability to configure a domain name to access your cloud instances. By setting up a user-friendly custom domain, accessing your instances becomes easier and more intuitive. It&s another way we&re making web3 cloud management as straightforward as possible.

07Name and tags

Organize and identify your instances more effectively by assigning a unique name, obtaining a hash reference, and defining multiple tags. This helps streamline your development process and makes it easier to manage your web3 instances.

Instance name
Tags

Estimated holding requirements

This amount needs to be present in your wallet until the instance is removed. Tokens won't be locked nor consumed. The instance will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
INSTANCE
1x86-64bit.2GB-RAM.20GB-HDD
2.0K ALEPH
Total
2.0K ALEPH
\ No newline at end of file diff --git a/dashboard/manage/index.html b/dashboard/manage/index.html index 766c164c..a546c96d 100644 --- a/dashboard/manage/index.html +++ b/dashboard/manage/index.html @@ -1,4 +1,4 @@ - \ No newline at end of file +data-styled.g279[id="cmp___StyledNoisyContainer-sc-u79f6i-0"]{content:"gXbaSo,"}/*!sc*/ + \ No newline at end of file diff --git a/dashboard/ssh/index.html b/dashboard/ssh/index.html index ec990843..2e046a60 100644 --- a/dashboard/ssh/index.html +++ b/dashboard/ssh/index.html @@ -1,4 +1,4 @@ -

01Configure SSH Key

Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist.

SSH Public Key
Label
\ No newline at end of file +data-styled.g231[id="cmp___StyledDiv2-sc-16fsdtu-4"]{content:"bYUixU,"}/*!sc*/ +

01Configure SSH Key

Access your cloud instances securely. Give existing key’s below access to this instance or add new keys. Remember, storing private keys safely is crucial for security. If you need help, our support team is always ready to assist.

SSH Public Key
Label
\ No newline at end of file diff --git a/dashboard/volume/index.html b/dashboard/volume/index.html index b56b9adb..2c1e127e 100644 --- a/dashboard/volume/index.html +++ b/dashboard/volume/index.html @@ -1,4 +1,4 @@ -

01Add volume

Create and configure new volumes for your web3 function by either uploading a dependency file or a squashfs volume. Volumes play a crucial role in managing dependencies and providing a volume within your application.

Estimated holding requirements

This amount needs to be present in your wallet until the volume is removed. Tokens won 't be locked nor consumed. The volume will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
STORAGEVOLUME
-
0 ALEPH
Total
0 ALEPH
\ No newline at end of file +data-styled.g232[id="cmp___StyledSection-sc-1jshimy-0"]{content:"iZTXZy,"}/*!sc*/ +

01Add volume

Create and configure new volumes for your web3 function by either uploading a dependency file or a squashfs volume. Volumes play a crucial role in managing dependencies and providing a volume within your application.

Estimated holding requirements

This amount needs to be present in your wallet until the volume is removed. Tokens won 't be locked nor consumed. The volume will be garbage collected once funds are removed from the wallet.

UNLOCKED
current wallet
0 ALEPH
STORAGEVOLUME
-
0 ALEPH
Total
0 ALEPH
\ No newline at end of file diff --git a/index.html b/index.html index 06066fe3..7daf43c2 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ -Aleph.im | Cloud Solutions

Infrastructure solutions

Aleph.im offers cutting-edge computing and storage solutions for your web3 needs. Our unique payment model supports the holder tier, allowing you to use our services simply by holding ALEPH tokens in your wallet. The longer you hold the tokens, the longer you can enjoy our services without any additional payment. Discover the power of Aleph.im’s solutions today and experience cost-effective and reliable web3 cloud services like never before.

ComputingSolutions

With Aleph.im's computing services, you can process data quickly and securely using on-demand and persistent functions, virtual machine instances, and confidential VMs.

Function

An isolated environment created for a function to execute in response to an event and can run in two modes: on-demand or persistent.

Instance

A virtual machine that runs on a Aleph.im's infrastructure and can be configured with CPUs, memory, storage, and networking.

Confidential VM

A virtual machine running for an extended period with their memory, storage, and execution fully encrypted and isolated from the host.

Indexing illustration
SOLANA - ETHEREUM - BINANCE SMART CHAIN

Indexing framework

Consider using the Aleph Indexer Framework for indexing blockchain data. It's open-source, multi-chain, and provides an easy-to-use solution for building high-performance, decentralized indexers on Aleph.im's infrastructure.

Get in touch with us

StorageSolutions

With support for immutable, temporary, and persistent volumes, as well as databases using key-value pairs, Aleph.im provides a flexible and powerful storage solution for a wide range of use cases.

Immutable volume

Immutable volumes store unchangeable data on IPFS, pinned to multiple nodes for reliable access and reproducible execution.

Dependencies volume

Package your dependencies to an immutable volume upfront to reference it easily and speed up creation time of an instance or function.

IPFS pinning

Avoid data being removed or garbage collected using the decentralized pinning solution, and ensure your data stay persistent.

Temporarily volume

A volume that is created temporarily to hold data or files for a short period of time. After this time the volume is deleted.

\ No newline at end of file +data-styled.g262[id="cmp___StyledTextGradient2-sc-1g24l22-21"]{content:"OPLDI,"}/*!sc*/ +

Infrastructure solutions

Aleph.im offers cutting-edge computing and storage solutions for your web3 needs. Our unique payment model supports the holder tier, allowing you to use our services simply by holding ALEPH tokens in your wallet. The longer you hold the tokens, the longer you can enjoy our services without any additional payment. Discover the power of Aleph.im’s solutions today and experience cost-effective and reliable web3 cloud services like never before.

ComputingSolutions

With Aleph.im's computing services, you can process data quickly and securely using on-demand and persistent functions, virtual machine instances, and confidential VMs.

Function

An isolated environment created for a function to execute in response to an event and can run in two modes: on-demand or persistent.

Instance

A virtual machine that runs on a Aleph.im's infrastructure and can be configured with CPUs, memory, storage, and networking.

Confidential VM

A virtual machine running for an extended period with their memory, storage, and execution fully encrypted and isolated from the host.

Indexing illustration
SOLANA - ETHEREUM - BINANCE SMART CHAIN

Indexing framework

Consider using the Aleph Indexer Framework for indexing blockchain data. It's open-source, multi-chain, and provides an easy-to-use solution for building high-performance, decentralized indexers on Aleph.im's infrastructure.

Get in touch with us

StorageSolutions

With support for immutable, temporary, and persistent volumes, as well as databases using key-value pairs, Aleph.im provides a flexible and powerful storage solution for a wide range of use cases.

Immutable volume

Immutable volumes store unchangeable data on IPFS, pinned to multiple nodes for reliable access and reproducible execution.

Dependencies volume

Package your dependencies to an immutable volume upfront to reference it easily and speed up creation time of an instance or function.

IPFS pinning

Avoid data being removed or garbage collected using the decentralized pinning solution, and ensure your data stay persistent.

Temporarily volume

A volume that is created temporarily to hold data or files for a short period of time. After this time the volume is deleted.

\ No newline at end of file