96?Kr:qr},Gr=function(t,e,r){var n;if(e){var i=e.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!==typeof n&&r&&(n=t.__emotion_forwardProp),n},Wr=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return zr(e,r,n),Ge((function(){return function(t,e,r){zr(t,e,r);var n=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}}(e,r,n)})),null},Yr=function t(e,r){var i,o,a=e.__emotion_real===e,s=a&&e.__emotion_base||e;void 0!==r&&(i=r.label,o=r.target);var u=Gr(e,r,a),c=u||Vr(s),f=!c("as");return function(){var l=arguments,h=a&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==i&&h.push("label:"+i+";"),null==l[0]||void 0===l[0].raw)h.push.apply(h,l);else{0,h.push(l[0][0]);for(var p=l.length,m=1;m0&&void 0!==arguments[0]?arguments[0]:{},e=t.themeId,r=t.defaultTheme,n=void 0===r?en:r,i=t.rootShouldForwardProp,o=void 0===i?tn:i,a=t.slotShouldForwardProp,s=void 0===a?tn:a,u=function(t){return Ot(d({},t,{theme:rn(d({},t,{defaultTheme:n,themeId:e}))}))};return u.__mui_systemSx=!0,function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}(t,(function(t){return t.filter((function(t){return!(null!=t&&t.__mui_systemSx)}))}));var i=r.name,a=r.slot,c=r.skipVariantsResolver,f=r.skipSx,l=r.overridesResolver,m=p(r,Qr),g=void 0!==c?c:a&&"Root"!==a||!1,v=f||!1;var y=tn;"Root"===a?y=o:a?y=s:function(t){return"string"===typeof t&&t.charCodeAt(0)>96}(t)&&(y=void 0);var b=$r(t,d({shouldForwardProp:y,label:undefined},m)),w=function(r){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s0){var m=new Array(p).fill("");(f=[].concat(Fr(r),Fr(m))).raw=[].concat(Fr(r.raw),Fr(m))}else"function"===typeof r&&r.__emotion_real!==r&&(f=function(t){return r(d({},t,{theme:rn(d({},t,{defaultTheme:n,themeId:e}))}))});var y=b.apply(void 0,[f].concat(Fr(c)));return t.muiName&&(y.muiName=t.muiName),y};return b.withConfig&&(w.withConfig=b.withConfig),w}}var on=function(t){return tn(t)&&"classes"!==t},an=nn({themeId:Dr,defaultTheme:Lr,rootShouldForwardProp:on}),sn=function(t){return t},un=function(){var t=sn;return{configure:function(e){t=e},generate:function(e){return t(e)},reset:function(){t=sn}}}(),cn={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function fn(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui",n=cn[e];return n?"".concat(r,"-").concat(n):"".concat(un.generate(t),"-").concat(e)}function ln(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui",n={};return e.forEach((function(e){n[e]=fn(t,e,r)})),n}function hn(t){return fn("MuiTableContainer",t)}ln("MuiTableContainer",["root"]);var dn=r(80184),pn=["className","component"],mn=an("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:function(t,e){return e.root}})({width:"100%",overflowX:"auto"}),gn=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTableContainer"}),n=r.className,i=r.component,o=void 0===i?"div":i,a=p(r,pn),s=d({},r,{component:o}),u=function(t){return v({root:["root"]},hn,t.classes)}(s);return(0,dn.jsx)(mn,d({ref:e,as:o,className:g(u.root,n),ownerState:s},a))})),vn=function(t){return((t<1?5.11916*Math.pow(t,2):4.5*Math.log(t+1)+2)/100).toFixed(2)};function yn(t){return fn("MuiPaper",t)}ln("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var bn=["className","component","elevation","square","variant"],wn=an("div",{name:"MuiPaper",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e[r.variant],!r.square&&e.rounded,"elevation"===r.variant&&e["elevation".concat(r.elevation)]]}})((function(t){var e,r=t.theme,n=t.ownerState;return d({backgroundColor:(r.vars||r).palette.background.paper,color:(r.vars||r).palette.text.primary,transition:r.transitions.create("box-shadow")},!n.square&&{borderRadius:r.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((r.vars||r).palette.divider)},"elevation"===n.variant&&d({boxShadow:(r.vars||r).shadows[n.elevation]},!r.vars&&"dark"===r.palette.mode&&{backgroundImage:"linear-gradient(".concat(or("#fff",vn(n.elevation)),", ").concat(or("#fff",vn(n.elevation)),")")},r.vars&&{backgroundImage:null==(e=r.vars.overlays)?void 0:e[n.elevation]}))})),_n=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiPaper"}),n=r.className,i=r.component,o=void 0===i?"div":i,a=r.elevation,s=void 0===a?1:a,u=r.square,c=void 0!==u&&u,f=r.variant,l=void 0===f?"elevation":f,h=p(r,bn),m=d({},r,{component:o,elevation:s,square:c,variant:l}),y=function(t){var e=t.square,r=t.elevation,n=t.variant,i=t.classes;return v({root:["root",n,!e&&"rounded","elevation"===n&&"elevation".concat(r)]},yn,i)}(m);return(0,dn.jsx)(wn,d({as:o,ownerState:m,className:g(y.root,n),ref:e},h))}));var Sn=n.createContext();function Mn(t){return fn("MuiTable",t)}ln("MuiTable",["root","stickyHeader"]);var kn=["className","component","padding","size","stickyHeader"],xn=an("table",{name:"MuiTable",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,r.stickyHeader&&e.stickyHeader]}})((function(t){var e=t.theme,r=t.ownerState;return d({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":d({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},r.stickyHeader&&{borderCollapse:"separate"})})),En="table",An=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTable"}),i=r.className,o=r.component,a=void 0===o?En:o,s=r.padding,u=void 0===s?"normal":s,c=r.size,f=void 0===c?"medium":c,l=r.stickyHeader,h=void 0!==l&&l,m=p(r,kn),y=d({},r,{component:a,padding:u,size:f,stickyHeader:h}),b=function(t){var e=t.classes;return v({root:["root",t.stickyHeader&&"stickyHeader"]},Mn,e)}(y),w=n.useMemo((function(){return{padding:u,size:f,stickyHeader:h}}),[u,f,h]);return(0,dn.jsx)(Sn.Provider,{value:w,children:(0,dn.jsx)(xn,d({as:a,role:a===En?null:"table",ref:e,className:g(b.root,i),ownerState:y},m))})})),On=An;var Tn=n.createContext();function Pn(t){return fn("MuiTableHead",t)}ln("MuiTableHead",["root"]);var In=["className","component"],Rn=an("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:function(t,e){return e.root}})({display:"table-header-group"}),Cn={variant:"head"},Nn="thead",Bn=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTableHead"}),n=r.className,i=r.component,o=void 0===i?Nn:i,a=p(r,In),s=d({},r,{component:o}),u=function(t){return v({root:["root"]},Pn,t.classes)}(s);return(0,dn.jsx)(Tn.Provider,{value:Cn,children:(0,dn.jsx)(Rn,d({as:o,className:g(u.root,n),ref:e,role:o===Nn?null:"rowgroup",ownerState:s},a))})}));function jn(t){return fn("MuiTableRow",t)}var Ln=ln("MuiTableRow",["root","selected","hover","head","footer"]),Dn=["className","component","hover","selected"],Un=an("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,r.head&&e.head,r.footer&&e.footer]}})((function(t){var e,r=t.theme;return b(e={color:"inherit",display:"table-row",verticalAlign:"middle",outline:0},"&.".concat(Ln.hover,":hover"),{backgroundColor:(r.vars||r).palette.action.hover}),b(e,"&.".concat(Ln.selected),{backgroundColor:r.vars?"rgba(".concat(r.vars.palette.primary.mainChannel," / ").concat(r.vars.palette.action.selectedOpacity,")"):or(r.palette.primary.main,r.palette.action.selectedOpacity),"&:hover":{backgroundColor:r.vars?"rgba(".concat(r.vars.palette.primary.mainChannel," / calc(").concat(r.vars.palette.action.selectedOpacity," + ").concat(r.vars.palette.action.hoverOpacity,"))"):or(r.palette.primary.main,r.palette.action.selectedOpacity+r.palette.action.hoverOpacity)}}),e})),Fn=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTableRow"}),i=r.className,o=r.component,a=void 0===o?"tr":o,s=r.hover,u=void 0!==s&&s,c=r.selected,f=void 0!==c&&c,l=p(r,Dn),h=n.useContext(Tn),m=d({},r,{component:a,hover:u,selected:f,head:h&&"head"===h.variant,footer:h&&"footer"===h.variant}),y=function(t){var e=t.classes;return v({root:["root",t.selected&&"selected",t.hover&&"hover",t.head&&"head",t.footer&&"footer"]},jn,e)}(m);return(0,dn.jsx)(Un,d({as:a,ref:e,className:g(y.root,i),role:"tr"===a?null:"row",ownerState:m},l))})),Hn=Fn,zn=j;function Kn(t){return fn("MuiTableCell",t)}var qn=ln("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),Vn=["align","className","component","padding","scope","size","sortDirection","variant"],Gn=an("td",{name:"MuiTableCell",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e[r.variant],e["size".concat(zn(r.size))],"normal"!==r.padding&&e["padding".concat(zn(r.padding))],"inherit"!==r.align&&e["align".concat(zn(r.align))],r.stickyHeader&&e.stickyHeader]}})((function(t){var e=t.theme,r=t.ownerState;return d({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?"1px solid ".concat(e.vars.palette.TableCell.border):"1px solid\n ".concat("light"===e.palette.mode?sr(or(e.palette.divider,1),.88):ar(or(e.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===r.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===r.variant&&{color:(e.vars||e).palette.text.primary},"footer"===r.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===r.size&&b({padding:"6px 16px"},"&.".concat(qn.paddingCheckbox),{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}),"checkbox"===r.padding&&{width:48,padding:"0 0 0 4px"},"none"===r.padding&&{padding:0},"left"===r.align&&{textAlign:"left"},"center"===r.align&&{textAlign:"center"},"right"===r.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===r.align&&{textAlign:"justify"},r.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})})),Wn=n.forwardRef((function(t,e){var r,i=Ur({props:t,name:"MuiTableCell"}),o=i.align,a=void 0===o?"inherit":o,s=i.className,u=i.component,c=i.padding,f=i.scope,l=i.size,h=i.sortDirection,m=i.variant,y=p(i,Vn),b=n.useContext(Sn),w=n.useContext(Tn),_=w&&"head"===w.variant,S=f;"td"===(r=u||(_?"th":"td"))?S=void 0:!S&&_&&(S="col");var M=m||w&&w.variant,k=d({},i,{align:a,component:r,padding:c||(b&&b.padding?b.padding:"normal"),size:l||(b&&b.size?b.size:"medium"),sortDirection:h,stickyHeader:"head"===M&&b&&b.stickyHeader,variant:M}),x=function(t){var e=t.classes,r=t.variant,n=t.align,i=t.padding,o=t.size;return v({root:["root",r,t.stickyHeader&&"stickyHeader","inherit"!==n&&"align".concat(zn(n)),"normal"!==i&&"padding".concat(zn(i)),"size".concat(zn(o))]},Kn,e)}(k),E=null;return h&&(E="asc"===h?"ascending":"descending"),(0,dn.jsx)(Gn,d({as:r,ref:e,className:g(x.root,s),"aria-sort":E,scope:S,ownerState:k},y))})),Yn=Wn;function $n(t){return fn("MuiTableBody",t)}ln("MuiTableBody",["root"]);var Zn=["className","component"],Xn=an("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:function(t,e){return e.root}})({display:"table-row-group"}),Jn={variant:"body"},Qn="tbody",ti=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTableBody"}),n=r.className,i=r.component,o=void 0===i?Qn:i,a=p(r,Zn),s=d({},r,{component:o}),u=function(t){return v({root:["root"]},$n,t.classes)}(s);return(0,dn.jsx)(Tn.Provider,{value:Jn,children:(0,dn.jsx)(Xn,d({className:g(u.root,n),as:o,ref:e,role:o===Qn?null:"rowgroup",ownerState:s},a))})})),ei=["sx"],ri=function(t){var e,r,n={systemProps:{},otherProps:{}},i=null!=(e=null==t||null==(r=t.theme)?void 0:r.unstable_sxConfig)?e:Et;return Object.keys(t).forEach((function(e){i[e]?n.systemProps[e]=t[e]:n.otherProps[e]=t[e]})),n};function ni(t){var e,r=t.sx,n=p(t,ei),i=ri(n),o=i.systemProps,a=i.otherProps;return e=Array.isArray(r)?[o].concat(Fr(r)):"function"===typeof r?function(){var t=r.apply(void 0,arguments);return M(t)?d({},o,t):o}:d({},o,r),d({},a,{sx:e})}var ii=["className","component"];var oi=jr(),ai=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.themeId,r=t.defaultTheme,i=t.defaultClassName,o=void 0===i?"MuiBox-root":i,a=t.generateClassName,s=$r("div",{shouldForwardProp:function(t){return"theme"!==t&&"sx"!==t&&"as"!==t}})(Ot);return n.forwardRef((function(t,n){var i=Je(r),u=ni(t),c=u.className,f=u.component,l=void 0===f?"div":f,h=p(u,ii);return(0,dn.jsx)(s,d({as:l,ref:n,className:g(c,a?a(o):o),theme:e&&i[e]||i},h))}))}({themeId:Dr,defaultTheme:oi,defaultClassName:"MuiBox-root",generateClassName:un.generate}),si=ai;function ui(t){return fn("MuiTypography",t)}ln("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var ci=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],fi=an("span",{name:"MuiTypography",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,r.variant&&e[r.variant],"inherit"!==r.align&&e["align".concat(zn(r.align))],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})((function(t){var e=t.theme,r=t.ownerState;return d({margin:0},r.variant&&e.typography[r.variant],"inherit"!==r.align&&{textAlign:r.align},r.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r.gutterBottom&&{marginBottom:"0.35em"},r.paragraph&&{marginBottom:16})})),li={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},hi={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},di=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiTypography"}),n=function(t){return hi[t]||t}(r.color),i=ni(d({},r,{color:n})),o=i.align,a=void 0===o?"inherit":o,s=i.className,u=i.component,c=i.gutterBottom,f=void 0!==c&&c,l=i.noWrap,h=void 0!==l&&l,m=i.paragraph,y=void 0!==m&&m,b=i.variant,w=void 0===b?"body1":b,_=i.variantMapping,S=void 0===_?li:_,M=p(i,ci),k=d({},i,{align:a,color:n,className:s,component:u,gutterBottom:f,noWrap:h,paragraph:y,variant:w,variantMapping:S}),x=u||(y?"p":S[w]||li[w])||"span",E=function(t){var e=t.align,r=t.gutterBottom,n=t.noWrap,i=t.paragraph,o=t.variant,a=t.classes;return v({root:["root",o,"inherit"!==t.align&&"align".concat(zn(e)),r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]},ui,a)}(k);return(0,dn.jsx)(fi,d({as:x,ref:e,ownerState:k,className:g(E.root,s)},M))})),pi=di;function mi(){for(var t=arguments.length,e=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=e.pulsate,i=void 0!==n&&n,a=e.center,s=void 0===a?o||e.pulsate:a,u=e.fakeElement,c=void 0!==u&&u;if("mousedown"===(null==t?void 0:t.type)&&b.current)b.current=!1;else{"touchstart"===(null==t?void 0:t.type)&&(b.current=!0);var f,l,h,d=c?null:S.current,p=d?d.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||void 0===t||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)f=Math.round(p.width/2),l=Math.round(p.height/2);else{var m=t.touches&&t.touches.length>0?t.touches[0]:t,g=m.clientX,v=m.clientY;f=Math.round(g-p.left),l=Math.round(v-p.top)}if(s)(h=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(h+=1);else{var y=2*Math.max(Math.abs((d?d.clientWidth:0)-f),f)+2,k=2*Math.max(Math.abs((d?d.clientHeight:0)-l),l)+2;h=Math.sqrt(Math.pow(y,2)+Math.pow(k,2))}null!=t&&t.touches?null===_.current&&(_.current=function(){M({pulsate:i,rippleX:f,rippleY:l,rippleSize:h,cb:r})},w.current=setTimeout((function(){_.current&&(_.current(),_.current=null)}),80)):M({pulsate:i,rippleX:f,rippleY:l,rippleSize:h,cb:r})}}),[o,M]),x=n.useCallback((function(){k({},{pulsate:!0})}),[k]),E=n.useCallback((function(t,e){if(clearTimeout(w.current),"touchend"===(null==t?void 0:t.type)&&_.current)return _.current(),_.current=null,void(w.current=setTimeout((function(){E(t,e)})));_.current=null,m((function(t){return t.length>0?t.slice(1):t})),y.current=e}),[]);return n.useImperativeHandle(e,(function(){return{pulsate:x,start:k,stop:E}}),[x,k,E]),(0,dn.jsx)(ro,d({className:g(Xi.root,s.root,u),ref:S},c,{children:(0,dn.jsx)(Ui,{component:null,exit:!0,children:l})}))})),oo=io;function ao(t){return fn("MuiButtonBase",t)}var so,uo=ln("MuiButtonBase",["root","disabled","focusVisible"]),co=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],fo=an("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:function(t,e){return e.root}})((b(so={display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"}},"&.".concat(uo.disabled),{pointerEvents:"none",cursor:"default"}),b(so,"@media print",{colorAdjust:"exact"}),so)),lo=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiButtonBase"}),i=r.action,o=r.centerRipple,a=void 0!==o&&o,s=r.children,u=r.className,c=r.component,f=void 0===c?"button":c,l=r.disabled,m=void 0!==l&&l,y=r.disableRipple,b=void 0!==y&&y,w=r.disableTouchRipple,_=void 0!==w&&w,S=r.focusRipple,M=void 0!==S&&S,k=r.LinkComponent,x=void 0===k?"a":k,E=r.onBlur,A=r.onClick,O=r.onContextMenu,T=r.onDragLeave,P=r.onFocus,I=r.onFocusVisible,R=r.onKeyDown,C=r.onKeyUp,N=r.onMouseDown,B=r.onMouseLeave,j=r.onMouseUp,L=r.onTouchEnd,D=r.onTouchMove,U=r.onTouchStart,F=r.tabIndex,H=void 0===F?0:F,z=r.TouchRippleProps,K=r.touchRippleRef,q=r.type,V=p(r,co),G=n.useRef(null),W=n.useRef(null),Y=gi(W,K),$=Oi(),Z=$.isFocusVisibleRef,X=$.onFocus,J=$.onBlur,Q=$.ref,tt=h(n.useState(!1),2),et=tt[0],rt=tt[1];m&&et&&rt(!1),n.useImperativeHandle(i,(function(){return{focusVisible:function(){rt(!0),G.current.focus()}}}),[]);var nt=h(n.useState(!1),2),it=nt[0],ot=nt[1];n.useEffect((function(){ot(!0)}),[]);var at=it&&!b&&!m;function st(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;return wi((function(n){return e&&e(n),!r&&W.current&&W.current[t](n),!0}))}n.useEffect((function(){et&&M&&!b&&it&&W.current.pulsate()}),[b,M,et,it]);var ut=st("start",N),ct=st("stop",O),ft=st("stop",T),lt=st("stop",j),ht=st("stop",(function(t){et&&t.preventDefault(),B&&B(t)})),dt=st("start",U),pt=st("stop",L),mt=st("stop",D),gt=st("stop",(function(t){J(t),!1===Z.current&&rt(!1),E&&E(t)}),!1),vt=wi((function(t){G.current||(G.current=t.currentTarget),X(t),!0===Z.current&&(rt(!0),I&&I(t)),P&&P(t)})),yt=function(){var t=G.current;return f&&"button"!==f&&!("A"===t.tagName&&t.href)},bt=n.useRef(!1),wt=wi((function(t){M&&!bt.current&&et&&W.current&&" "===t.key&&(bt.current=!0,W.current.stop(t,(function(){W.current.start(t)}))),t.target===t.currentTarget&&yt()&&" "===t.key&&t.preventDefault(),R&&R(t),t.target===t.currentTarget&&yt()&&"Enter"===t.key&&!m&&(t.preventDefault(),A&&A(t))})),_t=wi((function(t){M&&" "===t.key&&W.current&&et&&!t.defaultPrevented&&(bt.current=!1,W.current.stop(t,(function(){W.current.pulsate(t)}))),C&&C(t),A&&t.target===t.currentTarget&&yt()&&" "===t.key&&!t.defaultPrevented&&A(t)})),St=f;"button"===St&&(V.href||V.to)&&(St=x);var Mt={};"button"===St?(Mt.type=void 0===q?"button":q,Mt.disabled=m):(V.href||V.to||(Mt.role="button"),m&&(Mt["aria-disabled"]=m));var kt=gi(e,Q,G);var xt=d({},r,{centerRipple:a,component:f,disabled:m,disableRipple:b,disableTouchRipple:_,focusRipple:M,tabIndex:H,focusVisible:et}),Et=function(t){var e=t.disabled,r=t.focusVisible,n=t.focusVisibleClassName,i=v({root:["root",e&&"disabled",r&&"focusVisible"]},ao,t.classes);return r&&n&&(i.root+=" ".concat(n)),i}(xt);return(0,dn.jsxs)(fo,d({as:St,className:g(Et.root,u),ownerState:xt,onBlur:gt,onClick:A,onContextMenu:ct,onFocus:vt,onKeyDown:wt,onKeyUp:_t,onMouseDown:ut,onMouseLeave:ht,onMouseUp:lt,onDragLeave:ft,onTouchEnd:pt,onTouchMove:mt,onTouchStart:dt,ref:kt,tabIndex:m?-1:H,type:q},Mt,V,{children:[s,at?(0,dn.jsx)(oo,d({ref:Y,center:a},z)):null]}))})),ho=lo;function po(t){return fn("MuiButton",t)}var mo=ln("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var go=n.createContext({}),vo=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],yo=function(t){return d({},"small"===t.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===t.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===t.size&&{"& > *:nth-of-type(1)":{fontSize:22}})},bo=an(ho,{shouldForwardProp:function(t){return on(t)||"classes"===t},name:"MuiButton",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e[r.variant],e["".concat(r.variant).concat(zn(r.color))],e["size".concat(zn(r.size))],e["".concat(r.variant,"Size").concat(zn(r.size))],"inherit"===r.color&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth]}})((function(t){var e,r,n,i=t.theme,o=t.ownerState,a="light"===i.palette.mode?i.palette.grey[300]:i.palette.grey[800],s="light"===i.palette.mode?i.palette.grey.A100:i.palette.grey[700];return d({},i.typography.button,(b(e={minWidth:64,padding:"6px 16px",borderRadius:(i.vars||i).shape.borderRadius,transition:i.transitions.create(["background-color","box-shadow","border-color","color"],{duration:i.transitions.duration.short}),"&:hover":d({textDecoration:"none",backgroundColor:i.vars?"rgba(".concat(i.vars.palette.text.primaryChannel," / ").concat(i.vars.palette.action.hoverOpacity,")"):or(i.palette.text.primary,i.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===o.variant&&"inherit"!==o.color&&{backgroundColor:i.vars?"rgba(".concat(i.vars.palette[o.color].mainChannel," / ").concat(i.vars.palette.action.hoverOpacity,")"):or(i.palette[o.color].main,i.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===o.variant&&"inherit"!==o.color&&{border:"1px solid ".concat((i.vars||i).palette[o.color].main),backgroundColor:i.vars?"rgba(".concat(i.vars.palette[o.color].mainChannel," / ").concat(i.vars.palette.action.hoverOpacity,")"):or(i.palette[o.color].main,i.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===o.variant&&{backgroundColor:i.vars?i.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(i.vars||i).shadows[4],"@media (hover: none)":{boxShadow:(i.vars||i).shadows[2],backgroundColor:(i.vars||i).palette.grey[300]}},"contained"===o.variant&&"inherit"!==o.color&&{backgroundColor:(i.vars||i).palette[o.color].dark,"@media (hover: none)":{backgroundColor:(i.vars||i).palette[o.color].main}}),"&:active":d({},"contained"===o.variant&&{boxShadow:(i.vars||i).shadows[8]})},"&.".concat(mo.focusVisible),d({},"contained"===o.variant&&{boxShadow:(i.vars||i).shadows[6]})),b(e,"&.".concat(mo.disabled),d({color:(i.vars||i).palette.action.disabled},"outlined"===o.variant&&{border:"1px solid ".concat((i.vars||i).palette.action.disabledBackground)},"contained"===o.variant&&{color:(i.vars||i).palette.action.disabled,boxShadow:(i.vars||i).shadows[0],backgroundColor:(i.vars||i).palette.action.disabledBackground})),e),"text"===o.variant&&{padding:"6px 8px"},"text"===o.variant&&"inherit"!==o.color&&{color:(i.vars||i).palette[o.color].main},"outlined"===o.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===o.variant&&"inherit"!==o.color&&{color:(i.vars||i).palette[o.color].main,border:i.vars?"1px solid rgba(".concat(i.vars.palette[o.color].mainChannel," / 0.5)"):"1px solid ".concat(or(i.palette[o.color].main,.5))},"contained"===o.variant&&{color:i.vars?i.vars.palette.text.primary:null==(r=(n=i.palette).getContrastText)?void 0:r.call(n,i.palette.grey[300]),backgroundColor:i.vars?i.vars.palette.Button.inheritContainedBg:a,boxShadow:(i.vars||i).shadows[2]},"contained"===o.variant&&"inherit"!==o.color&&{color:(i.vars||i).palette[o.color].contrastText,backgroundColor:(i.vars||i).palette[o.color].main},"inherit"===o.color&&{color:"inherit",borderColor:"currentColor"},"small"===o.size&&"text"===o.variant&&{padding:"4px 5px",fontSize:i.typography.pxToRem(13)},"large"===o.size&&"text"===o.variant&&{padding:"8px 11px",fontSize:i.typography.pxToRem(15)},"small"===o.size&&"outlined"===o.variant&&{padding:"3px 9px",fontSize:i.typography.pxToRem(13)},"large"===o.size&&"outlined"===o.variant&&{padding:"7px 21px",fontSize:i.typography.pxToRem(15)},"small"===o.size&&"contained"===o.variant&&{padding:"4px 10px",fontSize:i.typography.pxToRem(13)},"large"===o.size&&"contained"===o.variant&&{padding:"8px 22px",fontSize:i.typography.pxToRem(15)},o.fullWidth&&{width:"100%"})}),(function(t){var e;return t.ownerState.disableElevation&&(b(e={boxShadow:"none","&:hover":{boxShadow:"none"}},"&.".concat(mo.focusVisible),{boxShadow:"none"}),b(e,"&:active",{boxShadow:"none"}),b(e,"&.".concat(mo.disabled),{boxShadow:"none"}),e)})),wo=an("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:function(t,e){var r=t.ownerState;return[e.startIcon,e["iconSize".concat(zn(r.size))]]}})((function(t){var e=t.ownerState;return d({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},yo(e))})),_o=an("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:function(t,e){var r=t.ownerState;return[e.endIcon,e["iconSize".concat(zn(r.size))]]}})((function(t){var e=t.ownerState;return d({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},yo(e))})),So=n.forwardRef((function(t,e){var r=n.useContext(go),i=Ur({props:S(r,t),name:"MuiButton"}),o=i.children,a=i.color,s=void 0===a?"primary":a,u=i.component,c=void 0===u?"button":u,f=i.className,l=i.disabled,h=void 0!==l&&l,m=i.disableElevation,y=void 0!==m&&m,b=i.disableFocusRipple,w=void 0!==b&&b,_=i.endIcon,M=i.focusVisibleClassName,k=i.fullWidth,x=void 0!==k&&k,E=i.size,A=void 0===E?"medium":E,O=i.startIcon,T=i.type,P=i.variant,I=void 0===P?"text":P,R=p(i,vo),C=d({},i,{color:s,component:c,disabled:h,disableElevation:y,disableFocusRipple:w,fullWidth:x,size:A,type:T,variant:I}),N=function(t){var e=t.color,r=t.disableElevation,n=t.fullWidth,i=t.size,o=t.variant,a=t.classes;return d({},a,v({root:["root",o,"".concat(o).concat(zn(e)),"size".concat(zn(i)),"".concat(o,"Size").concat(zn(i)),"inherit"===e&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon","iconSize".concat(zn(i))],endIcon:["endIcon","iconSize".concat(zn(i))]},po,a))}(C),B=O&&(0,dn.jsx)(wo,{className:N.startIcon,ownerState:C,children:O}),j=_&&(0,dn.jsx)(_o,{className:N.endIcon,ownerState:C,children:_});return(0,dn.jsxs)(bo,d({ownerState:C,className:g(r.className,N.root,f),component:c,disabled:h,focusRipple:!w,focusVisibleClassName:g(N.focusVisible,M),ref:e,type:T},R,{classes:N,children:[B,o,j]}))})),Mo=So;function ko(t){return fn("MuiDivider",t)}ln("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);var xo=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],Eo=an("div",{name:"MuiDivider",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,r.absolute&&e.absolute,e[r.variant],r.light&&e.light,"vertical"===r.orientation&&e.vertical,r.flexItem&&e.flexItem,r.children&&e.withChildren,r.children&&"vertical"===r.orientation&&e.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&e.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&e.textAlignLeft]}})((function(t){var e=t.theme,r=t.ownerState;return d({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},r.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},r.light&&{borderColor:e.vars?"rgba(".concat(e.vars.palette.dividerChannel," / 0.08)"):or(e.palette.divider,.08)},"inset"===r.variant&&{marginLeft:72},"middle"===r.variant&&"horizontal"===r.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===r.variant&&"vertical"===r.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===r.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},r.flexItem&&{alignSelf:"stretch",height:"auto"})}),(function(t){return d({},t.ownerState.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})}),(function(t){var e=t.theme,r=t.ownerState;return d({},r.children&&"vertical"!==r.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((e.vars||e).palette.divider)}})}),(function(t){var e=t.theme,r=t.ownerState;return d({},r.children&&"vertical"===r.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((e.vars||e).palette.divider)}})}),(function(t){var e=t.ownerState;return d({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})})),Ao=an("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:function(t,e){var r=t.ownerState;return[e.wrapper,"vertical"===r.orientation&&e.wrapperVertical]}})((function(t){var e=t.theme,r=t.ownerState;return d({display:"inline-block",paddingLeft:"calc(".concat(e.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(e.spacing(1)," * 1.2)")},"vertical"===r.orientation&&{paddingTop:"calc(".concat(e.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(e.spacing(1)," * 1.2)")})})),Oo=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiDivider"}),n=r.absolute,i=void 0!==n&&n,o=r.children,a=r.className,s=r.component,u=void 0===s?o?"div":"hr":s,c=r.flexItem,f=void 0!==c&&c,l=r.light,h=void 0!==l&&l,m=r.orientation,y=void 0===m?"horizontal":m,b=r.role,w=void 0===b?"hr"!==u?"separator":void 0:b,_=r.textAlign,S=void 0===_?"center":_,M=r.variant,k=void 0===M?"fullWidth":M,x=p(r,xo),E=d({},r,{absolute:i,component:u,flexItem:f,light:h,orientation:y,role:w,textAlign:S,variant:k}),A=function(t){var e=t.absolute,r=t.children,n=t.classes,i=t.flexItem,o=t.light,a=t.orientation,s=t.textAlign;return v({root:["root",e&&"absolute",t.variant,o&&"light","vertical"===a&&"vertical",i&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},ko,n)}(E);return(0,dn.jsx)(Eo,d({as:u,className:g(A.root,a),role:w,ref:e,ownerState:E},x,{children:o?(0,dn.jsx)(Ao,{className:A.wrapper,ownerState:E,children:o}):null}))})),To=Oo;function Po(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===t)return{};var r={};return Object.keys(t).filter((function(r){return r.match(/^on[A-Z]/)&&"function"===typeof t[r]&&!e.includes(r)})).forEach((function(e){r[e]=t[e]})),r}function Io(t){if(void 0===t)return{};var e={};return Object.keys(t).filter((function(e){return!(e.match(/^on[A-Z]/)&&"function"===typeof t[e])})).forEach((function(r){e[r]=t[r]})),e}var Ro=["elementType","externalSlotProps","ownerState"];function Co(t){var e,r=t.elementType,n=t.externalSlotProps,i=t.ownerState,o=p(t,Ro),a=function(t,e){return"function"===typeof t?t(e):t}(n,i),s=function(t){var e=t.getSlotProps,r=t.additionalProps,n=t.externalSlotProps,i=t.externalForwardedProps,o=t.className;if(!e){var a=g(null==i?void 0:i.className,null==n?void 0:n.className,o,null==r?void 0:r.className),s=d({},null==r?void 0:r.style,null==i?void 0:i.style,null==n?void 0:n.style),u=d({},r,i,n);return a.length>0&&(u.className=a),Object.keys(s).length>0&&(u.style=s),{props:u,internalRef:void 0}}var c=Po(d({},i,n)),f=Io(n),l=Io(i),h=e(c),p=g(null==h?void 0:h.className,null==r?void 0:r.className,o,null==i?void 0:i.className,null==n?void 0:n.className),m=d({},null==h?void 0:h.style,null==r?void 0:r.style,null==i?void 0:i.style,null==n?void 0:n.style),v=d({},h,r,l,f);return p.length>0&&(v.className=p),Object.keys(m).length>0&&(v.style=m),{props:v,internalRef:h.ref}}(d({},o,{externalSlotProps:a})),u=function(t,e,r){return void 0===t||"string"===typeof t?e:d({},e,{ownerState:d({},e.ownerState,r)})}(r,d({},s.props,{ref:mi(s.internalRef,null==a?void 0:a.ref,null==(e=t.additionalProps)?void 0:e.ref)}),i);return u}function No(t){return t&&t.ownerDocument||document}function Bo(t){return t.substring(2).toLowerCase()}var jo=function(t){var e=t.children,r=t.disableReactTree,i=void 0!==r&&r,o=t.mouseEvent,a=void 0===o?"onClick":o,s=t.onClickAway,u=t.touchEvent,c=void 0===u?"onTouchEnd":u,f=n.useRef(!1),l=n.useRef(null),h=n.useRef(!1),d=n.useRef(!1);n.useEffect((function(){return setTimeout((function(){h.current=!0}),0),function(){h.current=!1}}),[]);var p=mi(e.ref,l),m=yi((function(t){var e=d.current;d.current=!1;var r=No(l.current);!h.current||!l.current||"clientX"in t&&function(t,e){return e.documentElement.clientWidth-1:!r.documentElement.contains(t.target)||l.current.contains(t.target))||!i&&e||s(t))})),g=function(t){return function(r){d.current=!0;var n=e.props[t];n&&n(r)}},v={ref:p};return!1!==c&&(v[c]=g(c)),n.useEffect((function(){if(!1!==c){var t=Bo(c),e=No(l.current),r=function(){f.current=!0};return e.addEventListener(t,m),e.addEventListener("touchmove",r),function(){e.removeEventListener(t,m),e.removeEventListener("touchmove",r)}}}),[m,c]),!1!==a&&(v[a]=g(a)),n.useEffect((function(){if(!1!==a){var t=Bo(a),e=No(l.current);return e.addEventListener(t,m),function(){e.removeEventListener(t,m)}}}),[m,a]),(0,dn.jsx)(n.Fragment,{children:n.cloneElement(e,v)})};function Lo(){var t=Je(Lr);return t[Dr]||t}var Do=r(54164),Uo=!1,Fo="unmounted",Ho="exited",zo="entering",Ko="entered",qo="exiting",Vo=function(t){function e(e,r){var n;n=t.call(this,e,r)||this;var i,o=r&&!r.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?o?(i=Ho,n.appearStatus=zo):i=Ko:i=e.unmountOnExit||e.mountOnEnter?Fo:Ho,n.state={status:i},n.nextCallback=null,n}Ri(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&e.status===Fo?{status:Ho}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(t){var e=null;if(t!==this.props){var r=this.state.status;this.props.in?r!==zo&&r!==Ko&&(e=zo):r!==zo&&r!==Ko||(e=qo)}this.updateStatus(!1,e)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var t,e,r,n=this.props.timeout;return t=e=r=n,null!=n&&"number"!==typeof n&&(t=n.exit,e=n.enter,r=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:r}},r.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e)if(this.cancelNextCallback(),e===zo){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:Do.findDOMNode(this);r&&function(t){t.scrollTop}(r)}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ho&&this.setState({status:Fo})},r.performEnter=function(t){var e=this,r=this.props.enter,n=this.context?this.context.isMounting:t,i=this.props.nodeRef?[n]:[Do.findDOMNode(this),n],o=i[0],a=i[1],s=this.getTimeouts(),u=n?s.appear:s.enter;!t&&!r||Uo?this.safeSetState({status:Ko},(function(){e.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:zo},(function(){e.props.onEntering(o,a),e.onTransitionEnd(u,(function(){e.safeSetState({status:Ko},(function(){e.props.onEntered(o,a)}))}))})))},r.performExit=function(){var t=this,e=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:Do.findDOMNode(this);e&&!Uo?(this.props.onExit(n),this.safeSetState({status:qo},(function(){t.props.onExiting(n),t.onTransitionEnd(r.exit,(function(){t.safeSetState({status:Ho},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:Ho},(function(){t.props.onExited(n)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},r.setNextCallback=function(t){var e=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},r.onTransitionEnd=function(t,e){this.setNextCallback(e);var r=this.props.nodeRef?this.props.nodeRef.current:Do.findDOMNode(this),n=null==t&&!this.props.addEndListener;if(r&&!n){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},r.render=function(){var t=this.state.status;if(t===Fo)return null;var e=this.props,r=e.children,i=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,p(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return n.createElement(Ci.Provider,{value:null},"function"===typeof r?r(t,i):n.cloneElement(n.Children.only(r),i))},e}(n.Component);function Go(){}Vo.contextType=Ci,Vo.propTypes={},Vo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go},Vo.UNMOUNTED=Fo,Vo.EXITED=Ho,Vo.ENTERING=zo,Vo.ENTERED=Ko,Vo.EXITING=qo;var Wo=Vo;function Yo(t,e){var r,n,i=t.timeout,o=t.easing,a=t.style,s=void 0===a?{}:a;return{duration:null!=(r=s.transitionDuration)?r:"number"===typeof i?i:i[e.mode]||0,easing:null!=(n=s.transitionTimingFunction)?n:"object"===typeof o?o[e.mode]:o,delay:s.transitionDelay}}var $o=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Zo(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var Xo={entering:{opacity:1,transform:Zo(1)},entered:{opacity:1,transform:"none"}},Jo="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Qo=n.forwardRef((function(t,e){var r=t.addEndListener,i=t.appear,o=void 0===i||i,a=t.children,s=t.easing,u=t.in,c=t.onEnter,f=t.onEntered,l=t.onEntering,h=t.onExit,m=t.onExited,g=t.onExiting,v=t.style,y=t.timeout,b=void 0===y?"auto":y,w=t.TransitionComponent,_=void 0===w?Wo:w,S=p(t,$o),M=n.useRef(),k=n.useRef(),x=Lo(),E=n.useRef(null),A=gi(E,a.ref,e),O=function(t){return function(e){if(t){var r=E.current;void 0===e?t(r):t(r,e)}}},T=O(l),P=O((function(t,e){!function(t){t.scrollTop}(t);var r,n=Yo({style:v,timeout:b,easing:s},{mode:"enter"}),i=n.duration,o=n.delay,a=n.easing;"auto"===b?(r=x.transitions.getAutoHeightDuration(t.clientHeight),k.current=r):r=i,t.style.transition=[x.transitions.create("opacity",{duration:r,delay:o}),x.transitions.create("transform",{duration:Jo?r:.666*r,delay:o,easing:a})].join(","),c&&c(t,e)})),I=O(f),R=O(g),C=O((function(t){var e,r=Yo({style:v,timeout:b,easing:s},{mode:"exit"}),n=r.duration,i=r.delay,o=r.easing;"auto"===b?(e=x.transitions.getAutoHeightDuration(t.clientHeight),k.current=e):e=n,t.style.transition=[x.transitions.create("opacity",{duration:e,delay:i}),x.transitions.create("transform",{duration:Jo?e:.666*e,delay:Jo?i:i||.333*e,easing:o})].join(","),t.style.opacity=0,t.style.transform=Zo(.75),h&&h(t)})),N=O(m);return n.useEffect((function(){return function(){clearTimeout(M.current)}}),[]),(0,dn.jsx)(_,d({appear:o,in:u,nodeRef:E,onEnter:P,onEntered:I,onEntering:T,onExit:C,onExited:N,onExiting:R,addEndListener:function(t){"auto"===b&&(M.current=setTimeout(t,k.current||0)),r&&r(E.current,t)},timeout:"auto"===b?null:b},S,{children:function(t,e){return n.cloneElement(a,d({style:d({opacity:0,transform:Zo(.75),visibility:"exited"!==t||u?void 0:"hidden"},Xo[t],v,a.props.style),ref:A},e))}}))}));Qo.muiSupportAuto=!0;var ta=Qo;function ea(t){return fn("MuiSnackbarContent",t)}ln("MuiSnackbarContent",["root","message","action"]);var ra=["action","className","message","role"],na=an(_n,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:function(t,e){return e.root}})((function(t){var e=t.theme,r="light"===e.palette.mode?.8:.98,n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return ir(t)>.5?ar(t,e):sr(t,e)}(e.palette.background.default,r);return d({},e.typography.body2,b({color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}))})),ia=an("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:function(t,e){return e.message}})({padding:"8px 0"}),oa=an("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:function(t,e){return e.action}})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),aa=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiSnackbarContent"}),n=r.action,i=r.className,o=r.message,a=r.role,s=void 0===a?"alert":a,u=p(r,ra),c=r,f=function(t){return v({root:["root"],action:["action"],message:["message"]},ea,t.classes)}(c);return(0,dn.jsxs)(na,d({role:s,square:!0,elevation:6,className:g(f.root,i),ownerState:c,ref:e},u,{children:[(0,dn.jsx)(ia,{className:f.message,ownerState:c,children:o}),n?(0,dn.jsx)(oa,{className:f.action,ownerState:c,children:n}):null]}))}));function sa(t){return fn("MuiSnackbar",t)}ln("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);var ua=["onEnter","onExited"],ca=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],fa=an("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e["anchorOrigin".concat(zn(r.anchorOrigin.vertical)).concat(zn(r.anchorOrigin.horizontal))]]}})((function(t){var e=t.theme,r=t.ownerState;return d({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===r.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===r.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===r.anchorOrigin.horizontal&&{justifyContent:"flex-end"},b({},e.breakpoints.up("sm"),d({},"top"===r.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===r.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===r.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===r.anchorOrigin.horizontal&&{right:24,left:"auto"})))})),la=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiSnackbar"}),i=Lo(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},a=r.action,s=r.anchorOrigin,u=void 0===s?{vertical:"bottom",horizontal:"left"}:s,c=u.vertical,f=u.horizontal,l=r.autoHideDuration,m=void 0===l?null:l,g=r.children,y=r.className,b=r.ClickAwayListenerProps,w=r.ContentProps,_=r.disableWindowBlurListener,S=void 0!==_&&_,M=r.message,k=r.open,x=r.TransitionComponent,E=void 0===x?ta:x,A=r.transitionDuration,O=void 0===A?o:A,T=r.TransitionProps,P=void 0===T?{}:T,I=P.onEnter,R=P.onExited,C=p(r.TransitionProps,ua),N=p(r,ca),B=d({},r,{anchorOrigin:{vertical:c,horizontal:f},autoHideDuration:m,disableWindowBlurListener:S,TransitionComponent:E,transitionDuration:O}),j=function(t){var e=t.classes,r=t.anchorOrigin;return v({root:["root","anchorOrigin".concat(zn(r.vertical)).concat(zn(r.horizontal))]},sa,e)}(B),L=function(t){var e=t.autoHideDuration,r=void 0===e?null:e,i=t.disableWindowBlurListener,o=void 0!==i&&i,a=t.onClose,s=t.open,u=t.resumeHideDuration,c=n.useRef();n.useEffect((function(){if(s)return document.addEventListener("keydown",t),function(){document.removeEventListener("keydown",t)};function t(t){t.defaultPrevented||"Escape"!==t.key&&"Esc"!==t.key||null==a||a(t,"escapeKeyDown")}}),[s,a]);var f=yi((function(t,e){null==a||a(t,e)})),l=yi((function(t){a&&null!=t&&(clearTimeout(c.current),c.current=setTimeout((function(){f(null,"timeout")}),t))}));n.useEffect((function(){return s&&l(r),function(){clearTimeout(c.current)}}),[s,r,l]);var h=function(){clearTimeout(c.current)},p=n.useCallback((function(){null!=r&&l(null!=u?u:.5*r)}),[r,u,l]),m=function(t){return function(e){var r=t.onBlur;null==r||r(e),p()}},g=function(t){return function(e){var r=t.onFocus;null==r||r(e),h()}},v=function(t){return function(e){var r=t.onMouseEnter;null==r||r(e),h()}},y=function(t){return function(e){var r=t.onMouseLeave;null==r||r(e),p()}};return n.useEffect((function(){if(!o&&s)return window.addEventListener("focus",p),window.addEventListener("blur",h),function(){window.removeEventListener("focus",p),window.removeEventListener("blur",h)}}),[o,p,s]),{getRootProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=d({},Po(t),e);return d({role:"presentation"},r,{onBlur:m(r),onFocus:g(r),onMouseEnter:v(r),onMouseLeave:y(r)})},onClickAway:function(t){null==a||a(t,"clickaway")}}}(d({},B)),D=L.getRootProps,U=L.onClickAway,F=h(n.useState(!0),2),H=F[0],z=F[1],K=Co({elementType:fa,getSlotProps:D,externalForwardedProps:N,ownerState:B,additionalProps:{ref:e},className:[j.root,y]});return!k&&H?null:(0,dn.jsx)(jo,d({onClickAway:U},b,{children:(0,dn.jsx)(fa,d({},K,{children:(0,dn.jsx)(E,d({appear:!0,in:k,timeout:O,direction:"top"===c?"down":"up",onEnter:function(t,e){z(!1),I&&I(t,e)},onExited:function(t){z(!0),R&&R(t)}},C,{children:g||(0,dn.jsx)(aa,d({message:M,action:a},w))}))}))}))})),ha=la;function da(t){return fn("MuiAlert",t)}var pa=ln("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function ma(t){return fn("MuiIconButton",t)}var ga=ln("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),va=["edge","children","className","color","disabled","disableFocusRipple","size"],ya=an(ho,{name:"MuiIconButton",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,"default"!==r.color&&e["color".concat(zn(r.color))],r.edge&&e["edge".concat(zn(r.edge))],e["size".concat(zn(r.size))]]}})((function(t){var e=t.theme,r=t.ownerState;return d({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!r.disableRipple&&{"&:hover":{backgroundColor:e.vars?"rgba(".concat(e.vars.palette.action.activeChannel," / ").concat(e.vars.palette.action.hoverOpacity,")"):or(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===r.edge&&{marginLeft:"small"===r.size?-3:-12},"end"===r.edge&&{marginRight:"small"===r.size?-3:-12})}),(function(t){var e,r=t.theme,n=t.ownerState,i=null==(e=(r.vars||r).palette)?void 0:e[n.color];return d({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&d({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":d({},i&&{backgroundColor:r.vars?"rgba(".concat(i.mainChannel," / ").concat(r.vars.palette.action.hoverOpacity,")"):or(i.main,r.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:r.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:r.typography.pxToRem(28)},b({},"&.".concat(ga.disabled),{backgroundColor:"transparent",color:(r.vars||r).palette.action.disabled}))})),ba=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiIconButton"}),n=r.edge,i=void 0!==n&&n,o=r.children,a=r.className,s=r.color,u=void 0===s?"default":s,c=r.disabled,f=void 0!==c&&c,l=r.disableFocusRipple,h=void 0!==l&&l,m=r.size,y=void 0===m?"medium":m,b=p(r,va),w=d({},r,{edge:i,color:u,disabled:f,disableFocusRipple:h,size:y}),_=function(t){var e=t.classes,r=t.disabled,n=t.color,i=t.edge,o=t.size;return v({root:["root",r&&"disabled","default"!==n&&"color".concat(zn(n)),i&&"edge".concat(zn(i)),"size".concat(zn(o))]},ma,e)}(w);return(0,dn.jsx)(ya,d({className:g(_.root,a),centerRipple:!0,focusRipple:!h,disabled:f,ref:e,ownerState:w},b,{children:o}))})),wa=ba;function _a(t){return fn("MuiSvgIcon",t)}ln("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var Sa=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],Ma=an("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,"inherit"!==r.color&&e["color".concat(zn(r.color))],e["fontSize".concat(zn(r.fontSize))]]}})((function(t){var e,r,n,i,o,a,s,u,c,f,l,h,d,p,m,g,v,y=t.theme,b=t.ownerState;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:null==(e=y.transitions)||null==(r=e.create)?void 0:r.call(e,"fill",{duration:null==(n=y.transitions)||null==(i=n.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(o=y.typography)||null==(a=o.pxToRem)?void 0:a.call(o,20))||"1.25rem",medium:(null==(s=y.typography)||null==(u=s.pxToRem)?void 0:u.call(s,24))||"1.5rem",large:(null==(c=y.typography)||null==(f=c.pxToRem)?void 0:f.call(c,35))||"2.1875rem"}[b.fontSize],color:null!=(l=null==(h=(y.vars||y).palette)||null==(d=h[b.color])?void 0:d.main)?l:{action:null==(p=(y.vars||y).palette)||null==(m=p.action)?void 0:m.active,disabled:null==(g=(y.vars||y).palette)||null==(v=g.action)?void 0:v.disabled,inherit:void 0}[b.color]}})),ka=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiSvgIcon"}),n=r.children,i=r.className,o=r.color,a=void 0===o?"inherit":o,s=r.component,u=void 0===s?"svg":s,c=r.fontSize,f=void 0===c?"medium":c,l=r.htmlColor,h=r.inheritViewBox,m=void 0!==h&&h,y=r.titleAccess,b=r.viewBox,w=void 0===b?"0 0 24 24":b,_=p(r,Sa),S=d({},r,{color:a,component:u,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:w}),M={};m||(M.viewBox=w);var k=function(t){var e=t.color,r=t.fontSize,n=t.classes;return v({root:["root","inherit"!==e&&"color".concat(zn(e)),"fontSize".concat(zn(r))]},_a,n)}(S);return(0,dn.jsxs)(Ma,d({as:u,className:g(k.root,i),focusable:"false",color:l,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:e},M,_,{ownerState:S,children:[n,y?(0,dn.jsx)("title",{children:y}):null]}))}));ka.muiName="SvgIcon";var xa=ka;function Ea(t,e){function r(r,n){return(0,dn.jsx)(xa,d({"data-testid":"".concat(e,"Icon"),ref:n},r,{children:t}))}return r.muiName=xa.muiName,n.memo(n.forwardRef(r))}var Aa=Ea((0,dn.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Oa=Ea((0,dn.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Ta=Ea((0,dn.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Pa=Ea((0,dn.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Ia=Ea((0,dn.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Ra=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Ca=an(_n,{name:"MuiAlert",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e[r.variant],e["".concat(r.variant).concat(zn(r.color||r.severity))]]}})((function(t){var e=t.theme,r=t.ownerState,n="light"===e.palette.mode?ar:sr,i="light"===e.palette.mode?sr:ar,o=r.color||r.severity;return d({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},o&&"standard"===r.variant&&b({color:e.vars?e.vars.palette.Alert["".concat(o,"Color")]:n(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert["".concat(o,"StandardBg")]:i(e.palette[o].light,.9)},"& .".concat(pa.icon),e.vars?{color:e.vars.palette.Alert["".concat(o,"IconColor")]}:{color:e.palette[o].main}),o&&"outlined"===r.variant&&b({color:e.vars?e.vars.palette.Alert["".concat(o,"Color")]:n(e.palette[o].light,.6),border:"1px solid ".concat((e.vars||e).palette[o].light)},"& .".concat(pa.icon),e.vars?{color:e.vars.palette.Alert["".concat(o,"IconColor")]}:{color:e.palette[o].main}),o&&"filled"===r.variant&&d({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert["".concat(o,"FilledColor")],backgroundColor:e.vars.palette.Alert["".concat(o,"FilledBg")]}:{backgroundColor:"dark"===e.palette.mode?e.palette[o].dark:e.palette[o].main,color:e.palette.getContrastText(e.palette[o].main)}))})),Na=an("div",{name:"MuiAlert",slot:"Icon",overridesResolver:function(t,e){return e.icon}})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Ba=an("div",{name:"MuiAlert",slot:"Message",overridesResolver:function(t,e){return e.message}})({padding:"8px 0",minWidth:0,overflow:"auto"}),ja=an("div",{name:"MuiAlert",slot:"Action",overridesResolver:function(t,e){return e.action}})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),La={success:(0,dn.jsx)(Aa,{fontSize:"inherit"}),warning:(0,dn.jsx)(Oa,{fontSize:"inherit"}),error:(0,dn.jsx)(Ta,{fontSize:"inherit"}),info:(0,dn.jsx)(Pa,{fontSize:"inherit"})},Da=n.forwardRef((function(t,e){var r,n,i,o,a,s,u=Ur({props:t,name:"MuiAlert"}),c=u.action,f=u.children,l=u.className,h=u.closeText,m=void 0===h?"Close":h,y=u.color,b=u.components,w=void 0===b?{}:b,_=u.componentsProps,S=void 0===_?{}:_,M=u.icon,k=u.iconMapping,x=void 0===k?La:k,E=u.onClose,A=u.role,O=void 0===A?"alert":A,T=u.severity,P=void 0===T?"success":T,I=u.slotProps,R=void 0===I?{}:I,C=u.slots,N=void 0===C?{}:C,B=u.variant,j=void 0===B?"standard":B,L=p(u,Ra),D=d({},u,{color:y,severity:P,variant:j}),U=function(t){var e=t.variant,r=t.color,n=t.severity,i=t.classes;return v({root:["root","".concat(e).concat(zn(r||n)),"".concat(e)],icon:["icon"],message:["message"],action:["action"]},da,i)}(D),F=null!=(r=null!=(n=N.closeButton)?n:w.CloseButton)?r:wa,H=null!=(i=null!=(o=N.closeIcon)?o:w.CloseIcon)?i:Ia,z=null!=(a=R.closeButton)?a:S.closeButton,K=null!=(s=R.closeIcon)?s:S.closeIcon;return(0,dn.jsxs)(Ca,d({role:O,elevation:0,ownerState:D,className:g(U.root,l),ref:e},L,{children:[!1!==M?(0,dn.jsx)(Na,{ownerState:D,className:U.icon,children:M||x[P]||La[P]}):null,(0,dn.jsx)(Ba,{ownerState:D,className:U.message,children:f}),null!=c?(0,dn.jsx)(ja,{ownerState:D,className:U.action,children:c}):null,null==c&&E?(0,dn.jsx)(ja,{ownerState:D,className:U.action,children:(0,dn.jsx)(F,d({size:"small","aria-label":m,title:m,color:"inherit",onClick:E},z,{children:(0,dn.jsx)(H,d({fontSize:"small"},K))}))}):null]}))})),Ua=Da;function Fa(t){return fn("MuiLink",t)}var Ha,za,Ka,qa,Va,Ga=ln("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Wa={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Ya=function(t){var e=t.theme,r=t.ownerState,n=function(t){return Wa[t]||t}(r.color),i=L(e,"palette.".concat(n),!1)||r.color,o=L(e,"palette.".concat(n,"Channel"));return"vars"in e&&o?"rgba(".concat(o," / 0.4)"):or(i,.4)},$a=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Za=an(pi,{name:"MuiLink",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e["underline".concat(zn(r.underline))],"button"===r.component&&e.button]}})((function(t){var e=t.theme,r=t.ownerState;return d({},"none"===r.underline&&{textDecoration:"none"},"hover"===r.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===r.underline&&d({textDecoration:"underline"},"inherit"!==r.color&&{textDecorationColor:Ya({theme:e,ownerState:r})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===r.component&&b({position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"}},"&.".concat(Ga.focusVisible),{outline:"auto"}))})),Xa=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiLink"}),i=r.className,o=r.color,a=void 0===o?"primary":o,s=r.component,u=void 0===s?"a":s,c=r.onBlur,f=r.onFocus,l=r.TypographyClasses,m=r.underline,y=void 0===m?"always":m,b=r.variant,w=void 0===b?"inherit":b,_=r.sx,S=p(r,$a),M=Oi(),k=M.isFocusVisibleRef,x=M.onBlur,E=M.onFocus,A=M.ref,O=h(n.useState(!1),2),T=O[0],P=O[1],I=gi(e,A),R=d({},r,{color:a,component:u,focusVisible:T,underline:y,variant:w}),C=function(t){var e=t.classes,r=t.component,n=t.focusVisible,i=t.underline;return v({root:["root","underline".concat(zn(i)),"button"===r&&"button",n&&"focusVisible"]},Fa,e)}(R);return(0,dn.jsx)(Za,d({color:a,className:g(C.root,i),classes:l,component:u,onBlur:function(t){x(t),!1===k.current&&P(!1),c&&c(t)},onFocus:function(t){E(t),!0===k.current&&P(!0),f&&f(t)},ref:I,ownerState:R,variant:w,sx:[].concat(Fr(Object.keys(Wa).includes(a)?[]:[{color:a}]),Fr(Array.isArray(_)?_:[_]))},S))})),Ja=Xa,Qa=r(49933);function ts(t,e){for(var r=0;r0n&&(e+=this.buildChangeOutput()),(0,Qa.assert)(this.ctx.hashOutputs===(0,Qa.hash256)(e),"hashOutputs mismatch")}},{key:"increaseVotesReceived",value:function(t){for(var e=0;e<2;e++)this.candidates[e].name===t&&this.candidates[e].votesReceived++}}])&&ts(e.prototype,r),n&&ts(e,n),Object.defineProperty(e,"prototype",{writable:!1}),o}(Qa.SmartContract),Va=ns(qa.prototype,"candidates",[Ha],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ns(qa.prototype,"vote",[za],Object.getOwnPropertyDescriptor(qa.prototype,"vote"),qa.prototype),ns(qa.prototype,"increaseVotesReceived",[Ka],Object.getOwnPropertyDescriptor(qa.prototype,"increaseVotesReceived"),qa.prototype),qa),os=nn(),as=["className","component","disableGutters","fixed","maxWidth","classes"],ss=Pt(),us=os("div",{name:"MuiContainer",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e["maxWidth".concat(j(String(r.maxWidth)))],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),cs=function(t){return Qe({props:t,name:"MuiContainer",defaultTheme:ss})};var fs=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.createStyledComponent,r=void 0===e?us:e,i=t.useThemeProps,o=void 0===i?cs:i,a=t.componentName,s=void 0===a?"MuiContainer":a,u=r((function(t){var e=t.theme;return d({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.ownerState.disableGutters&&b({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}))}),(function(t){var e=t.theme;return t.ownerState.fixed&&Object.keys(e.breakpoints.values).reduce((function(t,r){var n=r,i=e.breakpoints.values[n];return 0!==i&&(t[e.breakpoints.up(n)]={maxWidth:"".concat(i).concat(e.breakpoints.unit)}),t}),{})}),(function(t){var e=t.theme,r=t.ownerState;return d({},"xs"===r.maxWidth&&b({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),r.maxWidth&&"xs"!==r.maxWidth&&b({},e.breakpoints.up(r.maxWidth),{maxWidth:"".concat(e.breakpoints.values[r.maxWidth]).concat(e.breakpoints.unit)}))})),c=n.forwardRef((function(t,e){var r=o(t),n=r.className,i=r.component,a=void 0===i?"div":i,c=r.disableGutters,f=void 0!==c&&c,l=r.fixed,h=void 0!==l&&l,m=r.maxWidth,y=void 0===m?"lg":m,b=p(r,as),w=d({},r,{component:a,disableGutters:f,fixed:h,maxWidth:y}),_=function(t,e){var r=t.classes,n=t.fixed,i=t.disableGutters,o=t.maxWidth;return v({root:["root",o&&"maxWidth".concat(j(String(o))),n&&"fixed",i&&"disableGutters"]},(function(t){return fn(e,t)}),r)}(w,s);return(0,dn.jsx)(u,d({as:a,ownerState:w,className:g(_.root,n),ref:e},b))}));return c}({createStyledComponent:an("div",{name:"MuiContainer",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState;return[e.root,e["maxWidth".concat(zn(String(r.maxWidth)))],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:function(t){return Ur({props:t,name:"MuiContainer"})}}),ls=fs;var hs=n.createContext();function ds(t){return fn("MuiGrid",t)}var ps=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],ms=ln("MuiGrid",["root","container","item","zeroMinWidth"].concat(Fr([0,1,2,3,4,5,6,7,8,9,10].map((function(t){return"spacing-xs-".concat(t)}))),Fr(["column-reverse","column","row-reverse","row"].map((function(t){return"direction-xs-".concat(t)}))),Fr(["nowrap","wrap-reverse","wrap"].map((function(t){return"wrap-xs-".concat(t)}))),Fr(ps.map((function(t){return"grid-xs-".concat(t)}))),Fr(ps.map((function(t){return"grid-sm-".concat(t)}))),Fr(ps.map((function(t){return"grid-md-".concat(t)}))),Fr(ps.map((function(t){return"grid-lg-".concat(t)}))),Fr(ps.map((function(t){return"grid-xl-".concat(t)}))))),gs=ms,vs=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function ys(t){var e=parseFloat(t);return"".concat(e).concat(String(t).replace(String(e),"")||"px")}function bs(t){var e=t.breakpoints,r=t.values,n="";Object.keys(r).forEach((function(t){""===n&&0!==r[t]&&(n=t)}));var i=Object.keys(e).sort((function(t,r){return e[t]-e[r]}));return i.slice(0,i.indexOf(n))}var ws=an("div",{name:"MuiGrid",slot:"Root",overridesResolver:function(t,e){var r=t.ownerState,n=r.container,i=r.direction,o=r.item,a=r.spacing,s=r.wrap,u=r.zeroMinWidth,c=r.breakpoints,f=[];n&&(f=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t||t<=0)return[];if("string"===typeof t&&!Number.isNaN(Number(t))||"number"===typeof t)return[r["spacing-xs-".concat(String(t))]];var n=[];return e.forEach((function(e){var i=t[e];Number(i)>0&&n.push(r["spacing-".concat(e,"-").concat(String(i))])})),n}(a,c,e));var l=[];return c.forEach((function(t){var n=r[t];n&&l.push(e["grid-".concat(t,"-").concat(String(n))])})),[e.root,n&&e.container,o&&e.item,u&&e.zeroMinWidth].concat(Fr(f),["row"!==i&&e["direction-xs-".concat(String(i))],"wrap"!==s&&e["wrap-xs-".concat(String(s))]],l)}})((function(t){var e=t.ownerState;return d({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})}),(function(t){var e=t.theme;return I({theme:e},N({values:t.ownerState.direction,breakpoints:e.breakpoints.values}),(function(t){var e={flexDirection:t};return 0===t.indexOf("column")&&(e["& > .".concat(gs.item)]={maxWidth:"none"}),e}))}),(function(t){var e=t.theme,r=t.ownerState,n=r.container,i=r.rowSpacing,o={};if(n&&0!==i){var a,s=N({values:i,breakpoints:e.breakpoints.values});"object"===typeof s&&(a=bs({breakpoints:e.breakpoints.values,values:s})),o=I({theme:e},s,(function(t,r){var n,i=e.spacing(t);return"0px"!==i?b({marginTop:"-".concat(ys(i))},"& > .".concat(gs.item),{paddingTop:ys(i)}):null!=(n=a)&&n.includes(r)?{}:b({marginTop:0},"& > .".concat(gs.item),{paddingTop:0})}))}return o}),(function(t){var e=t.theme,r=t.ownerState,n=r.container,i=r.columnSpacing,o={};if(n&&0!==i){var a,s=N({values:i,breakpoints:e.breakpoints.values});"object"===typeof s&&(a=bs({breakpoints:e.breakpoints.values,values:s})),o=I({theme:e},s,(function(t,r){var n,i=e.spacing(t);return"0px"!==i?b({width:"calc(100% + ".concat(ys(i),")"),marginLeft:"-".concat(ys(i))},"& > .".concat(gs.item),{paddingLeft:ys(i)}):null!=(n=a)&&n.includes(r)?{}:b({width:"100%",marginLeft:0},"& > .".concat(gs.item),{paddingLeft:0})}))}return o}),(function(t){var e,r=t.theme,n=t.ownerState;return r.breakpoints.keys.reduce((function(t,i){var o={};if(n[i]&&(e=n[i]),!e)return t;if(!0===e)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===e)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{var a=N({values:n.columns,breakpoints:r.breakpoints.values}),s="object"===typeof a?a[i]:a;if(void 0===s||null===s)return t;var u="".concat(Math.round(e/s*1e8)/1e6,"%"),c={};if(n.container&&n.item&&0!==n.columnSpacing){var f=r.spacing(n.columnSpacing);if("0px"!==f){var l="calc(".concat(u," + ").concat(ys(f),")");c={flexBasis:l,maxWidth:l}}}o=d({flexBasis:u,flexGrow:0,maxWidth:u},c)}return 0===r.breakpoints.values[i]?Object.assign(t,o):t[r.breakpoints.up(i)]=o,t}),{})}));var _s=function(t){var e=t.classes,r=t.container,n=t.direction,i=t.item,o=t.spacing,a=t.wrap,s=t.zeroMinWidth,u=t.breakpoints,c=[];r&&(c=function(t,e){if(!t||t<=0)return[];if("string"===typeof t&&!Number.isNaN(Number(t))||"number"===typeof t)return["spacing-xs-".concat(String(t))];var r=[];return e.forEach((function(e){var n=t[e];if(Number(n)>0){var i="spacing-".concat(e,"-").concat(String(n));r.push(i)}})),r}(o,u));var f=[];return u.forEach((function(e){var r=t[e];r&&f.push("grid-".concat(e,"-").concat(String(r)))})),v({root:["root",r&&"container",i&&"item",s&&"zeroMinWidth"].concat(Fr(c),["row"!==n&&"direction-xs-".concat(String(n)),"wrap"!==a&&"wrap-xs-".concat(String(a))],f)},ds,e)},Ss=n.forwardRef((function(t,e){var r=Ur({props:t,name:"MuiGrid"}),i=Lo().breakpoints,o=ni(r),a=o.className,s=o.columns,u=o.columnSpacing,c=o.component,f=void 0===c?"div":c,l=o.container,h=void 0!==l&&l,m=o.direction,v=void 0===m?"row":m,y=o.item,b=void 0!==y&&y,w=o.rowSpacing,_=o.spacing,S=void 0===_?0:_,M=o.wrap,k=void 0===M?"wrap":M,x=o.zeroMinWidth,E=void 0!==x&&x,A=p(o,vs),O=w||S,T=u||S,P=n.useContext(hs),I=h?s||12:P,R={},C=d({},A);i.keys.forEach((function(t){null!=A[t]&&(R[t]=A[t],delete C[t])}));var N=d({},o,{columns:I,container:h,direction:v,item:b,rowSpacing:O,columnSpacing:T,wrap:k,zeroMinWidth:E,spacing:S},R,{breakpoints:i.keys}),B=_s(N);return(0,dn.jsx)(hs.Provider,{value:I,children:(0,dn.jsx)(ws,d({ownerState:N,className:g(B.root,a),as:f,ref:e},C))})})),Ms=Ss,ks=function(){return(0,dn.jsx)(si,{sx:{width:"100%",height:"auto",paddingTop:"1rem",paddingBottom:"1rem"},children:(0,dn.jsx)(ls,{maxWidth:"lg",children:(0,dn.jsxs)(Ms,{container:!0,direction:"column",alignItems:"center",children:[(0,dn.jsx)(Ms,{item:!0,xs:12,children:(0,dn.jsx)(pi,{color:"black",variant:"h5",children:"sCrypt, Inc."})}),(0,dn.jsx)(Ms,{item:!0,xs:12,children:(0,dn.jsx)(Ja,{href:"https://github.com/sCrypt-Inc/voting",target:"_blank",variant:"subtitle1",children:"Github Repo"})})]})})})},xs=r(19778).Buffer,Es={txId:"107ef6132f3c06305baa0202d1d73c670368ff209338e820f60864f3cc8344e8",outputIndex:0};var As=function(){var t=h((0,n.useState)(),2),e=t[0],r=t[1],i=(0,n.useRef)(),o=h(n.useState(""),2),a=o[0],u=o[1],f=h(n.useState({txId:"",candidate:""}),2),l=f[0],d=f[1];function p(){return m.apply(this,arguments)}function m(){return(m=c(s().mark((function t(){var e;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Qa.Scrypt.contractApi.getLatestInstance(is,Es);case 3:e=t.sent,r(e),t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.error("fetchContract error: ",t.t0),u(t.t0.message);case 11:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}(0,n.useEffect)((function(){var t=new Qa.ScryptProvider,e=new Qa.SensiletSigner(t);i.current=e,p();var n=Qa.Scrypt.contractApi.subscribe({clazz:is,id:Es},(function(t){d({txId:t.tx.id,candidate:t.args[0]}),r(t.nexts[0])}));return function(){n.unsubscribe()}}),[]);var g,v=function(t,e){"clickaway"!==e&&d({txId:"",candidate:""})};function y(t){return b.apply(this,arguments)}function b(){return(b=c(s().mark((function t(r){var n,o,a,c,f,l;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(v(r),n=i.current,!e||!n){t.next=16;break}return t.next=5,n.requestAuth();case 5:if(o=t.sent,a=o.isAuthenticated,c=o.error,a){t.next=10;break}throw new Error(c);case 10:return t.next=12,e.connect(n);case 12:f=e.next(),l=r.target.name,f.increaseVotesReceived(l),e.methods.vote(l,{next:{instance:f,balance:e.balance}}).then((function(t){console.log("Voting call tx: ".concat(t.tx.id))})).catch((function(t){u(t.message),p(),console.error("call error: ",t)}));case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,dn.jsxs)("div",{className:"App",children:[(0,dn.jsx)("header",{className:"App-header",children:(0,dn.jsx)("h2",{children:"What's your favorite phone?"})}),(0,dn.jsx)(gn,{component:_n,variant:"outlined",style:{width:1200,height:"80vh",margin:"auto"},children:(0,dn.jsxs)(On,{children:[(0,dn.jsx)(Bn,{children:(0,dn.jsxs)(Hn,{children:[(0,dn.jsx)(Yn,{align:"center",children:"iPhone"}),(0,dn.jsx)(Yn,{align:"center",children:"Android"})]})}),(0,dn.jsxs)(ti,{children:[(0,dn.jsxs)(Hn,{children:[(0,dn.jsx)(Yn,{align:"center",children:(0,dn.jsx)(si,{children:(0,dn.jsx)(si,{sx:{height:200},component:"img",alt:"iphone",src:"".concat("/voting","/","iphone",".png")})})}),(0,dn.jsx)(Yn,{align:"center",children:(0,dn.jsx)(si,{children:(0,dn.jsx)(si,{sx:{height:200},component:"img",alt:"android",src:"".concat("/voting","/","android",".png")})})})]}),(0,dn.jsxs)(Hn,{children:[(0,dn.jsx)(Yn,{align:"center",children:(0,dn.jsxs)(si,{children:[(0,dn.jsx)(pi,{variant:"h1",children:null===e||void 0===e?void 0:e.candidates[0].votesReceived.toString()}),(0,dn.jsx)(Mo,{variant:"text",onClick:y,name:null===e||void 0===e?void 0:e.candidates[0].name,children:"\ud83d\udc4d"})]})}),(0,dn.jsxs)(Yn,{align:"center",children:[(0,dn.jsx)(To,{orientation:"vertical",flexItem:!0}),(0,dn.jsxs)(si,{children:[(0,dn.jsx)(pi,{variant:"h1",children:null===e||void 0===e?void 0:e.candidates[1].votesReceived.toString()}),(0,dn.jsx)(Mo,{variant:"text",onClick:y,name:null===e||void 0===e?void 0:e.candidates[1].name,children:"\ud83d\udc4d"})]})]})]})]})]})}),(0,dn.jsx)(ks,{}),(0,dn.jsx)(ha,{open:""!==a,autoHideDuration:6e3,onClose:function(t,e){"clickaway"!==e&&u("")},children:(0,dn.jsx)(Ua,{severity:"error",children:a})}),(0,dn.jsx)(ha,{open:""!==l.candidate&&""!==l.txId,autoHideDuration:6e3,onClose:v,children:(0,dn.jsxs)(Ua,{severity:"success",children:[" ",(0,dn.jsx)(Ja,{href:"https://test.whatsonchain.com/tx/".concat(l.txId),target:"_blank",rel:"noreferrer",children:'"'.concat((g=l.candidate,xs.from(g,"hex").toString("utf8")),'" got one vote, tx: ').concat(l.txId)})]})})]})},Os=function(t){t&&t instanceof Function&&r.e(787).then(r.bind(r,787)).then((function(e){var r=e.getCLS,n=e.getFID,i=e.getFCP,o=e.getLCP,a=e.getTTFB;r(t),n(t),i(t),o(t),a(t)}))},Ts=JSON.parse('{"version":9,"compilerVersion":"1.19.0+commit.72eaeba","contract":"Voting","md5":"6c5beea576bcec5ca25ac590d9209ece","structs":[{"name":"Candidate","params":[{"name":"name","type":"bytes"},{"name":"votesReceived","type":"int"}],"genericTypes":[]}],"library":[],"alias":[],"abi":[{"type":"function","name":"vote","index":0,"params":[{"name":"name","type":"bytes"},{"name":"__scrypt_ts_txPreimage","type":"SigHashPreimage"},{"name":"__scrypt_ts_changeAmount","type":"int"},{"name":"__scrypt_ts_changeAddress","type":"Ripemd160"}]},{"type":"constructor","params":[{"name":"names","type":"bytes[2]"}]}],"stateProps":[{"name":"candidates","type":"Candidate[2]"}],"buildType":"debug","file":"file:///Users/aaron67/WebstormProjects/voting/artifacts/voting.scrypt","hex":"0176018801a901ac2097dfd76851bf465e8f715593b217714858bbe9570ff3bd5e33840a34e20ff0262102ba79df5f8ae7604a9830f03c7933028186aede0675a16f025dc4f8be8eec0382201008ce7480da41702918d1ec8e6849ba32b4d65b1e40dc669c31a1e6306b266c0000000000610000517951795a7a5a7a5a7a5a7a75757575567a567a567a6151007600a26976529f695195946b6c766b796c7500587a587a7575567a567a567a567a567a6151517600a26976529f695195946b6c766b796c7500567a567a7575547a547a547a7575615e7961007901687f776100005279517f75007f77007901fd87635379537f75517f7761007901007e81517a7561537a75527a527a5379535479937f75537f77527a75517a67007901fe87635379557f75517f7761007901007e81517a7561537a75527a527a5379555479937f75557f77527a75517a67007901ff87635379597f75517f7761007901007e81517a7561537a75527a527a5379595479937f75597f77527a75517a675379517f75007f7761007901007e81517a7561537a75527a527a5379515479937f75517f77527a75517a6868685179517a75517a75517a75517a7561517a7561007961007982775179517951947f755179549451947f77007981527951799454945194517a75517a75517a75517a7561517951797f75537a75527a527a0000537953797f77610079537a75527a527a00527a75517a7561615179517951937f7551797f775179768b537a75527a527a75010051798791517a75610079916361005379005179557951937f7555797f77815579768b577a75567a567a567a567a567a567a750079014c9f630079547a75537a537a537a527956795579937f7556797f77527a75517a670079014c9c635279567951937f7556797f7761007901007e81517a7561547a75537a537a537a55795193567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014d9c635279567952937f7556797f7761007901007e81517a7561547a75537a537a537a55795293567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014e9c635279567954937f7556797f7761007901007e81517a7561547a75537a537a537a55795493567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670069686868685579547993567a75557a557a557a557a557a5579755179517a75517a75517a75517a75615a7a75597a597a597a597a597a597a597a597a597a6161005379005179557951937f7555797f77815579768b577a75567a567a567a567a567a567a750079014c9f630079547a75537a537a537a527956795579937f7556797f77527a75517a670079014c9c635279567951937f7556797f7761007901007e81517a7561547a75537a537a537a55795193567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014d9c635279567952937f7556797f7761007901007e81517a7561547a75537a537a537a55795293567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014e9c635279567954937f7556797f7761007901007e81517a7561547a75537a537a537a55795493567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670069686868685579547993567a75557a557a557a557a557a5579755179517a75517a75517a75517a75618161597a75587a587a587a587a587a587a587a587a61005379005179557951937f7555797f77815579768b577a75567a567a567a567a567a567a750079014c9f630079547a75537a537a537a527956795579937f7556797f77527a75517a670079014c9c635279567951937f7556797f7761007901007e81517a7561547a75537a537a537a55795193567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014d9c635279567952937f7556797f7761007901007e81517a7561547a75537a537a537a55795293567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014e9c635279567954937f7556797f7761007901007e81517a7561547a75537a537a537a55795493567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670069686868685579547993567a75557a557a557a557a557a5579755179517a75517a75517a75517a7561587a75577a577a577a577a577a577a577a6161005379005179557951937f7555797f77815579768b577a75567a567a567a567a567a567a750079014c9f630079547a75537a537a537a527956795579937f7556797f77527a75517a670079014c9c635279567951937f7556797f7761007901007e81517a7561547a75537a537a537a55795193567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014d9c635279567952937f7556797f7761007901007e81517a7561547a75537a537a537a55795293567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670079014e9c635279567954937f7556797f7761007901007e81517a7561547a75537a537a537a55795493567a75557a557a557a557a557a557975527956795579937f7556797f77527a75517a670069686868685579547993567a75557a557a557a557a557a5579755179517a75517a75517a75517a75618161577a75567a567a567a567a567a567a6801137901416151795f795f79210ac407f0e4bd44bfc207355a778b046225a7068fc59ee7eda43ad905aadbffc800206c266b30e6a1319c66dc401e5bd6b432ba49688eecd118297041da8074ce08100111795679615679aa0079610079517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01007e81517a75615779567956795679567961537956795479577995939521414136d08c5ed2bf3ba048afe6dcaebafeffffffffffffffffffffffffffffff00517951796151795179970079009f63007952799367007968517a75517a75517a7561527a75517a517951795296a0630079527994527a75517a6853798277527982775379012080517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f517f7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e7c7e01205279947f7754537993527993013051797e527e54797e58797e527e53797e52797e57797e0079517a75517a75517a75517a75517a75517a75517a75517a75517a75517a75517a75517a75517a756100795779ac517a75517a75517a75517a75517a75517a75517a75517a75517a7561517a75517a75616901147961615a795a795a795a7952007600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c517a517a75517987635a795a795a795a7952007600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c007a517a75768b5b7a755a7a5a7a5a7a5a7a5a7a5a7a5a7a5a7a5a7a5a7a7568615a795a795a795a7952517600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c517a517a75517987635a795a795a795a7952517600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c007a517a75768b597a75587a587a587a587a587a587a587a587a756851517a756175011379610079610079827751795179012c947f7551790134947f77517a75517a756161007901007e81517a7561517a7561616100610079635167010068517a75615b795b795b795b7952007600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c517a517a756100798277005179014c9f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a756751790200019f63014c527951615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179030000019f63014d527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f63014e527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7567006968686868007953797e517a75517a75517a75617e5b795b795b795b7952007600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c007a517a75610079009c630100670079686100798277005179014c9f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a756751790200019f63014c527951615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179030000019f63014d527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f63014e527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7567006968686868007953797e517a75517a75517a7561517a75617e5b795b795b795b7952517600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c517a517a756100798277005179014c9f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a756751790200019f63014c527951615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179030000019f63014d527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f63014e527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7567006968686868007953797e517a75517a75517a75617e5b795b795b795b7952517600a26976529f699452958c6b6c766b796c766b796c756b6b757575756c6c007a517a75610079009c630100670079686100798277005179014c9f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a756751790200019f63014c527951615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179030000019f63014d527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f63014e527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7567006968686868007953797e517a75517a75517a7561517a75617e5779517961007982775480517951797e0051807e517a75517a75617e517a75610079527961007958805279610079827700517902fd009f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a75675179030000019f6301fd527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f6301fe527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179090000000000000000019f6301ff527958615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7568686868007953797e517a75517a75517a75617e517a75517a7561517a75517a756101137900a063007901147900a063011379610113790112797e01147e51797e0113797e0111797e517a756101157961007958805279610079827700517902fd009f63517951615179517951938000795179827751947f75007f77517a75517a75517a7561517a75675179030000019f6301fd527952615179517951938000795179827751947f75007f77517a75517a75517a75617e517a756751790500000000019f6301fe527954615179517951938000795179827751947f75007f77517a75517a75517a75617e517a75675179090000000000000000019f6301ff527958615179517951938000795179827751947f75007f77517a75517a75517a75617e517a7568686868007953797e517a75517a75517a75617e517a75517a75616700687e517a750079756801147961007982775179517958947f7551790128947f77517a75517a75615179aa8777777777777777777777777777777777777777777777","sourceMapFile":""}');is.loadArtifact(Ts),Qa.Scrypt.init({apiKey:"testnet_3OJHoUTWnhTtVGck0T6ZpV2Cx3lcLw0UchOfl4aPtfA8D10Kf",network:Qa.bsv.Networks.testnet}),o.createRoot(document.getElementById("root")).render((0,dn.jsx)(n.StrictMode,{children:(0,dn.jsx)(As,{})})),Os()},6338:function(t){t.exports="0.5.7"},36218:function(t,e,r){t.exports={version:r(6338),stringifyInfo:r(96517),stringifyStream:r(18105),parseChunked:r(61419)}},61419:function(t,e,r){var n=r(56690).default,i=r(89728).default,o=r(17061).default,a=r(17156).default,s=r(18237).default,u=r(58443).isReadableStream,c=r(29926),f=new c;function l(t){return null!==t&&"object"===typeof t}function h(t,e){return"SyntaxError"===t.name&&e.jsonParseOffset&&(t.message=t.message.replace(/at position (\d+)/,(function(t,r){return"at position "+(Number(r)+e.jsonParseOffset)}))),t}t.exports=function(t){var e=new d;if(l(t)&&u(t))return new Promise((function(r,n){t.on("data",(function(t){try{e.push(t)}catch(r){n(h(r,e)),e=null}})).on("error",(function(t){e=null,n(t)})).on("end",(function(){try{r(e.finish())}catch(t){n(h(t,e))}finally{e=null}}))}));if("function"===typeof t){var r=t();if(l(r)&&(Symbol.iterator in r||Symbol.asyncIterator in r))return new Promise(function(){var t=a(o().mark((function t(n,i){var a,u,c,f,l,d;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,a=!1,u=!1,t.prev=3,f=s(r);case 5:return t.next=7,f.next();case 7:if(!(a=!(l=t.sent).done)){t.next=13;break}d=l.value,e.push(d);case 10:a=!1,t.next=5;break;case 13:t.next=19;break;case 15:t.prev=15,t.t0=t.catch(3),u=!0,c=t.t0;case 19:if(t.prev=19,t.prev=20,!a||null==f.return){t.next=24;break}return t.next=24,f.return();case 24:if(t.prev=24,!u){t.next=27;break}throw c;case 27:return t.finish(24);case 28:return t.finish(19);case 29:n(e.finish()),t.next=35;break;case 32:t.prev=32,t.t1=t.catch(0),i(h(t.t1,e));case 35:return t.prev=35,e=null,t.finish(35);case 38:case"end":return t.stop()}}),t,null,[[0,32,35,38],[3,15,19,29],[20,,24,28]])})));return function(e,r){return t.apply(this,arguments)}}())}throw new Error("Chunk emitter should be readable stream, generator, async generator or function returning an iterable object")};var d=function(){"use strict";function t(){n(this,t),this.value=void 0,this.valueStack=null,this.stack=new Array(100),this.lastFlushDepth=0,this.flushDepth=0,this.stateString=!1,this.stateStringEscape=!1,this.pendingByteSeq=null,this.pendingChunk=null,this.chunkOffset=0,this.jsonParseOffset=0}return i(t,[{key:"parseAndAppend",value:function(t,e){1===this.stack[this.lastFlushDepth-1]?(e&&(this.jsonParseOffset--,t="{"+t+"}"),Object.assign(this.valueStack.value,JSON.parse(t))):(e&&(this.jsonParseOffset--,t="["+t+"]"),function(t,e){var r=t.length;t.length+=e.length;for(var n=0;n0?this.parseAndAppend(this.prepareAddition(n),!0):(this.value=JSON.parse(n),this.valueStack={value:this.value,prev:null});else if(this.flushDepth>this.lastFlushDepth){for(var i=this.flushDepth-1;i>=this.lastFlushDepth;i--)n+=1===this.stack[i]?"}":"]";0===this.lastFlushDepth?(this.value=JSON.parse(n),this.valueStack={value:this.value,prev:null}):this.parseAndAppend(this.prepareAddition(n),!0);for(var o=this.lastFlushDepth||1;o=this.flushDepth;u--)this.jsonParseOffset--,n=(1===this.stack[u]?"{":"[")+n;this.parseAndAppend(n,!1);for(var c=this.lastFlushDepth-1;c>=this.flushDepth;c--)this.valueStack=this.valueStack.prev}this.lastFlushDepth=this.flushDepth}},{key:"push",value:function(t){if("string"!==typeof t){if(null!==this.pendingByteSeq){var e=t;(t=new Uint8Array(this.pendingByteSeq.length+e.length)).set(this.pendingByteSeq),t.set(e,this.pendingByteSeq.length),this.pendingByteSeq=null}if(t[t.length-1]>127)for(var r=0;r>6===3){(4!==++r&&n>>3===30||3!==r&&n>>4===14||2!==r&&n>>5===6)&&(this.pendingByteSeq=t.slice(t.length-r),t=t.slice(0,-r));break}}t=f.decode(t)}var i=t.length,o=0,a=0;t:for(var s=0;so&&this.flush(t,o,a),a1&&(E+=A-1),h.delete(a),r>0&&A>0&&(E+=(1+(h.size+1)*r+1)*A,E+=1+h.size*r),l.set(a,E-c);break;case g:if(l.has(a)){d.add(a),E+=l.get(a);break}var P=E;E+=2,h.add(a);for(var I=0;I1&&(E+=a.length-1),h.delete(a),r>0&&a.length>0&&(E+=(1+(h.size+1)*r)*a.length,E+=1+h.size*r),l.set(a,E-P);break;case v:case y:S.add(a);break;case b:E+=2,S.add(a)}}}(k,"",t),{minLength:isNaN(E)?1/0:E,circular:n(w),duplicate:n(d),async:n(S)}}},18105:function(t){t.exports=function(){throw new Error("Method is not supported")}},29926:function(t){t.exports=TextDecoder},58443:function(t,e,r){var n=r(861).default;function i(t){return"function"===typeof t.pipe&&"function"===typeof t._read&&"object"===typeof t._readableState&&null!==t._readableState}t.exports={escapableCharCodeSubstitution:{8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"},isLeadingSurrogate:function(t){return t>=55296&&t<=56319},isTrailingSurrogate:function(t){return t>=56320&&t<=57343},type:{PRIMITIVE:1,PROMISE:4,ARRAY:3,OBJECT:2,STRING_STREAM:5,OBJECT_STREAM:6},isReadableStream:i,replaceValue:function(t,e,r,n){switch(r&&"function"===typeof r.toJSON&&(r=r.toJSON()),null!==n&&(r=n.call(t,String(e),r)),typeof r){case"function":case"symbol":r=void 0;break;case"object":if(null!==r){var i=r.constructor;i!==String&&i!==Number&&i!==Boolean||(r=r.valueOf())}}return r},getTypeNative:function(t){return null===t||"object"!==typeof t?1:Array.isArray(t)?3:2},getTypeAsync:function(t){return null===t||"object"!==typeof t?1:"function"===typeof t.then?4:i(t)?t._readableState.objectMode?6:5:Array.isArray(t)?3:2},normalizeReplacer:function(t){if("function"===typeof t)return t;if(Array.isArray(t)){var e=new Set(t.map((function(t){var e=t&&t.constructor;return e===String||e===Number?String(t):null})).filter((function(t){return"string"===typeof t})));return n(e)}return null},normalizeSpace:function(t){return"number"===typeof t?!(!Number.isFinite(t)||t<1)&&" ".repeat(Math.min(t,10)):"string"===typeof t&&t.slice(0,10)||!1}}},97829:function(t,e,r){var n=r(19778).Buffer;!function(t){"use strict";for(var e=",".charCodeAt(0),r=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(64),a=new Uint8Array(128),s=0;s>>=1,c&&(i=-2147483648|-i),r[n]+=i,e}function d(t,r,n){return!(r>=n)&&t.charCodeAt(r)!==e}function p(t){t.sort(m)}function m(t,e){return t[0]-e[0]}function g(t){for(var n=new Int32Array(5),i=16384,o=i-36,a=new Uint8Array(i),s=a.subarray(0,o),u=0,f="",l=0;l0&&(u===i&&(f+=c.decode(a),u=0),a[u++]=r),0!==h.length){n[0]=0;for(var d=0;do&&(f+=c.decode(s),a.copyWithin(0,o,u),u-=o),d>0&&(a[u++]=e),u=v(a,u,n,p,0),1!==p.length&&(u=v(a,u,n,p,1),u=v(a,u,n,p,2),u=v(a,u,n,p,3),4!==p.length&&(u=v(a,u,n,p,4)))}}}return f+c.decode(a.subarray(0,u))}function v(t,e,r,n,i){var a=n[i],s=a-r[i];r[i]=a,s=s<0?-s<<1|1:s<<1;do{var u=31&s;(s>>>=5)>0&&(u|=32),t[e++]=o[u]}while(s>0);return e}t.decode=f,t.encode=g,Object.defineProperty(t,"__esModule",{value:!0})}(e)},67822:function(t,e,r){"use strict";t=r.nmd(t);var n,i=r(27424).default,o=function(t,e){return function(){var r=t.apply(void 0,arguments);return"\x1b[".concat(r+e,"m")}},a=function(t,e){return function(){var r=t.apply(void 0,arguments);return"\x1b[".concat(38+e,";5;").concat(r,"m")}},s=function(t,e){return function(){var r=t.apply(void 0,arguments);return"\x1b[".concat(38+e,";2;").concat(r[0],";").concat(r[1],";").concat(r[2],"m")}},u=function(t){return t},c=function(t,e,r){return[t,e,r]},f=function(t,e,r){Object.defineProperty(t,e,{get:function(){var n=r();return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})},l=function(t,e,o,a){void 0===n&&(n=r(87287));for(var s=a?10:0,u={},c=0,f=Object.entries(n);c>6],i=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6,i}(t,e,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var f=i.alloc(2+u);f[0]=o,f[1]=128|u;for(var l=1+u,h=n.length;h>0;l--,h>>=8)f[l]=255&h;return this._createEncoderBuffer([f,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=i.alloc(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),f=c.length-1,l=t.length-1;l>=0;l--){var h=t[l];for(c[f--]=127&h;(h>>=7)>0;)c[f--]=128|127&h}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=i.from(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=i.alloc(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var a=1,s=t;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&t,t>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=l[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,x=0|a[5],E=8191&x,A=x>>>13,O=0|a[6],T=8191&O,P=O>>>13,I=0|a[7],R=8191&I,C=I>>>13,N=0|a[8],B=8191&N,j=N>>>13,L=0|a[9],D=8191&L,U=L>>>13,F=0|s[0],H=8191&F,z=F>>>13,K=0|s[1],q=8191&K,V=K>>>13,G=0|s[2],W=8191&G,Y=G>>>13,$=0|s[3],Z=8191&$,X=$>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(l,H))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(m,H)|0,o=Math.imul(m,z);var vt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,H),i=(i=Math.imul(v,z))+Math.imul(y,H)|0,o=Math.imul(y,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var yt=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,W)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(_,H)|0,o=Math.imul(_,z),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var bt=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(k,H)|0,o=Math.imul(k,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,H),i=(i=Math.imul(T,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var St=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(R,H),i=(i=Math.imul(R,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(U,q)|0,o=Math.imul(U,V),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var Et=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,X))+Math.imul(U,Z)|0,o=Math.imul(U,X),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ot=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(U,ot)|0,o=Math.imul(U,at),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var It=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,ht)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(U,lt)|0,o=Math.imul(U,ht);var Ct=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=xt,u[10]=Et,u[11]=At,u[12]=Ot,u[13]=Tt,u[14]=Pt,u[15]=It,u[16]=Rt,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return v[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},88093:function(t,e,r){"use strict";var n=r(1426);function i(t){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o,a,s=r(53372).codes,u=s.ERR_AMBIGUOUS_ARGUMENT,c=s.ERR_INVALID_ARG_TYPE,f=s.ERR_INVALID_ARG_VALUE,l=s.ERR_INVALID_RETURN_VALUE,h=s.ERR_MISSING_ARGS,d=r(24945),p=r(49639).inspect,m=r(49639).types,g=m.isPromise,v=m.isRegExp,y=Object.assign?Object.assign:r(50887).assign,b=Object.is?Object.is:r(33454);new Map;function w(){var t=r(46912);o=t.isDeepEqual,a=t.isDeepStrictEqual}var _=!1,S=t.exports=E,M={};function k(t){if(t.message instanceof Error)throw t.message;throw new d(t)}function x(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new d({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function E(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;it.length)&&(r=t.length),t.substring(r-e.length,r)===e}var g="",v="",y="",b="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function S(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(t,e,r){var i="",o="",a=0,s="",u=!1,c=S(t),f=c.split("\n"),l=S(e).split("\n"),d=0,p="";if("strictEqual"===r&&"object"===h(t)&&"object"===h(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===l.length&&f[0]!==l[0]){var _=f[0].length+l[0].length;if(_<=10){if(("object"!==h(t)||null===t)&&("object"!==h(e)||null===e)&&(0!==t||0!==e))return"".concat(w[r],"\n\n")+"".concat(f[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r){if(_<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][d]===l[0][d];)d++;d>2&&(p="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",d),"^"),d=0)}}}for(var M=f[f.length-1],k=l[l.length-1];M===k&&(d++<2?s="\n ".concat(M).concat(s):i=M,f.pop(),l.pop(),0!==f.length&&0!==l.length);)M=f[f.length-1],k=l[l.length-1];var x=Math.max(f.length,l.length);if(0===x){var E=c.split("\n");if(E.length>30)for(E[26]="".concat(g,"...").concat(b);E.length>27;)E.pop();return"".concat(w.notIdentical,"\n\n").concat(E.join("\n"),"\n")}d>3&&(s="\n".concat(g,"...").concat(b).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var A=0,O=w[r]+"\n".concat(v,"+ actual").concat(b," ").concat(y,"- expected").concat(b),T=" ".concat(g,"...").concat(b," Lines skipped");for(d=0;d1&&d>2&&(P>4?(o+="\n".concat(g,"...").concat(b),u=!0):P>3&&(o+="\n ".concat(l[d-2]),A++),o+="\n ".concat(l[d-1]),A++),a=d,i+="\n".concat(y,"-").concat(b," ").concat(l[d]),A++;else if(l.length1&&d>2&&(P>4?(o+="\n".concat(g,"...").concat(b),u=!0):P>3&&(o+="\n ".concat(f[d-2]),A++),o+="\n ".concat(f[d-1]),A++),a=d,o+="\n".concat(v,"+").concat(b," ").concat(f[d]),A++;else{var I=l[d],R=f[d],C=R!==I&&(!m(R,",")||R.slice(0,-1)!==I);C&&m(I,",")&&I.slice(0,-1)===R&&(C=!1,R+=","),C?(P>1&&d>2&&(P>4?(o+="\n".concat(g,"...").concat(b),u=!0):P>3&&(o+="\n ".concat(f[d-2]),A++),o+="\n ".concat(f[d-1]),A++),a=d,o+="\n".concat(v,"+").concat(b," ").concat(R),i+="\n".concat(y,"-").concat(b," ").concat(I),A+=2):(o+=i,i="",1!==P&&0!==d||(o+="\n ".concat(R),A++))}if(A>20&&d30)for(k[26]="".concat(g,"...").concat(b);k.length>27;)k.pop();r=1===k.length?a(this,l(e).call(this,"".concat(m," ").concat(k[0]))):a(this,l(e).call(this,"".concat(m,"\n\n").concat(k.join("\n"),"\n")))}else{var x=S(c),E="",A=w[o];"notDeepEqual"===o||"notEqual"===o?(x="".concat(w[o],"\n\n").concat(x)).length>1024&&(x="".concat(x.slice(0,1021),"...")):(E="".concat(S(f)),x.length>512&&(x="".concat(x.slice(0,509),"...")),E.length>512&&(E="".concat(E.slice(0,509),"...")),"deepEqual"===o||"equal"===o?x="".concat(A,"\n\n").concat(x,"\n\nshould equal\n\n"):E=" ".concat(o," ").concat(E)),r=a(this,l(e).call(this,"".concat(x).concat(E)))}return Error.stackTraceLimit=d,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=f,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),u),r.stack,r.name="AssertionError",a(r)}var r,u,c;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,t),r=e,u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(t,e){return d(this,function(t){for(var e=1;e2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,a,u,c;if(void 0===s&&(s=r(88093)),s("string"===typeof t,"'name' must be a string"),"string"===typeof e&&(a="not ",e.substr(!u||u<0?0:+u,a.length)===a)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))c="The ".concat(t," ").concat(o," ").concat(l(e,"type"));else{var f=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";c='The "'.concat(t,'" ').concat(f," ").concat(o," ").concat(l(e,"type"))}return c+=". Received type ".concat(n(i))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=r(49639));var i=u.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=c},46912:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o=void 0!==/a/g.flags,a=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(33454),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(6188);function l(t){return t.call.bind(t)}var h=l(Object.prototype.hasOwnProperty),d=l(Object.prototype.propertyIsEnumerable),p=l(Object.prototype.toString),m=r(49639).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,y=m.isDate,b=m.isMap,w=m.isRegExp,_=m.isSet,S=m.isNativeError,M=m.isBoxedPrimitive,k=m.isNumberObject,x=m.isStringObject,E=m.isBooleanObject,A=m.isBigIntObject,O=m.isSymbolObject,T=m.isFloat32Array,P=m.isFloat64Array;function I(t){if(0===t.length||t.length>10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function R(t){return Object.keys(t).filter(I).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function C(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0&&c>0){if(t===e)return[u,c];for(n=[],o=r.length;f>=0&&!s;)f==u?(n.push(f),u=r.indexOf(t,f+1)):1==n.length?s=[n.pop(),c]:((i=n.pop())=0?u:c;n.length&&(s=[o,a])}return s}t.exports=e,e.range=n},12307:function(t,e,r){"use strict";var n=r(82543).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r>>0,f=new Uint8Array(a);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var h=0,d=a-1;(0!==l||h>>0,f[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");o=h,r++}for(var p=a-o;p!==a&&0===f[p];)p++;var m=n.allocUnsafe(i+(a-p));m.fill(0,0,i);for(var g=i;p!==a;)m[g++]=f[p++];return m}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,a=e.length;o!==a&&0===e[o];)o++,r++;for(var c=(a-o)*f+1>>>0,l=new Uint8Array(c);o!==a;){for(var h=e[o],d=0,p=c-1;(0!==h||d>>0,l[p]=h%s>>>0,h=h/s>>>0;if(0!==h)throw new Error("Non-zero carry");i=d,o++}for(var m=c-i;m!==c&&0===l[m];)m++;for(var g=u.repeat(r);m0?a-4:a;for(r=0;r>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e);1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,c=n-i;sc?c:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,o,a=[],s=e;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},17144:function(t,e,r){var n;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function v(t){var e=0|t;return t>0||t===e?e:e-1}function y(t){for(var e,r,n=1,i=t.length,o=t[0]+"";nc^r?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(t,e,r,n){if(tr||t!==u(t))throw Error(c+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function _(t){var e=t.c.length-1;return v(t.e/h)==e&&t.c[e]%2!=0}function S(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function M(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else eP?v.c=v.e=null:t.e=10;l/=10,c++);return void(c>P?v.c=v.e=null:(v.e=c,v.c=[t]))}g=String(t)}else{if(!a.test(g=String(t)))return i(v,g,p);v.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(l=g.search(/e/i))>0?(c<0&&(c=l),c+=+g.slice(l+1),g=g.substring(0,l)):c<0&&(c=g.length)}else{if(w(e,2,B.length,"Base"),10==e&&j)return H(v=new L(t),x+v.e+1,E);if(g=String(t),p="number"==typeof t){if(0*t!=0)return i(v,g,p,e);if(v.s=1/t<0?(g=g.slice(1),-1):1,L.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else v.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=B.slice(0,e),c=l=0,m=g.length;lc){c=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,l=-1,c=0;continue}return i(v,String(t),p,e)}p=!1,(c=(g=n(g,e,10,v.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(l=0;48===g.charCodeAt(l);l++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(l,++m)){if(m-=l,p&&L.DEBUG&&m>15&&(t>d||t!==u(t)))throw Error(f+v.s*t);if((c=c-l-1)>P)v.c=v.e=null;else if(c=O)?S(u,a):M(u,a,"0");else if(o=(t=H(new L(t),e,r)).e,s=(u=y(t.c)).length,1==n||2==n&&(e<=o||o<=A)){for(;ss){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=o-s)>0)for(o+1==s&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function U(t,e){for(var r,n=1,i=new L(t[0]);n=10;i/=10,n++);return(r=n+r*h-1)>P?t.c=t.e=null:r=10;c/=10,i++);if((o=e-i)<0)o+=h,a=e,m=(f=g[d=0])/v[i-a-1]%10|0;else if((d=s((o+1)/h))>=g.length){if(!n)break t;for(;g.length<=d;g.push(0));f=m=0,i=1,a=(o%=h)-h+1}else{for(f=c=g[d],i=1;c>=10;c/=10,i++);m=(a=(o%=h)-h+i)<0?0:f/v[i-a-1]%10|0}if(n=n||e<0||null!=g[d+1]||(a<0?f:f%v[i-a-1]),n=r<4?(m||n)&&(0==r||r==(t.s<0?3:2)):m>5||5==m&&(4==r||n||6==r&&(o>0?a>0?f/v[i-a]:0:g[d-1])%10&1||r==(t.s<0?8:7)),e<1||!g[0])return g.length=0,n?(e-=t.e+1,g[0]=v[(h-e%h)%h],t.e=-e||0):g[0]=t.e=0,t;if(0==o?(g.length=d,c=1,d--):(g.length=d+1,c=v[h-o],g[d]=a>0?u(f/v[i-a]%v[a])*c:0),n)for(;;){if(0==d){for(o=1,a=g[0];a>=10;a/=10,o++);for(a=g[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,g[0]==l&&(g[0]=1));break}if(g[d]+=c,g[d]!=l)break;g[d--]=0,c=1}for(o=g.length;0===g[--o];g.pop());}t.e>P?t.c=t.e=null:t.e=O?S(e,r):M(e,r,"0"),t.s<0?"-"+e:e)}return L.clone=t,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(c+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(r=t[e],0,g,e),x=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(r=t[e],0,8,e),E=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(w(r[0],-g,0,e),w(r[1],0,g,e),A=r[0],O=r[1]):(w(r,-g,g,e),A=-(O=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)w(r[0],-g,-1,e),w(r[1],1,g,e),T=r[0],P=r[1];else{if(w(r,-g,g,e),!r)throw Error(c+e+" cannot be zero: "+r);T=-(P=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(c+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw I=!r,Error(c+"crypto unavailable");I=r}else I=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(r=t[e],0,9,e),R=r),t.hasOwnProperty(e="POW_PRECISION")&&(w(r=t[e],0,g,e),C=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(c+e+" not an object: "+r);N=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+e+" invalid: "+r);j="0123456789"==r.slice(0,10),B=r}}return{DECIMAL_PLACES:x,ROUNDING_MODE:E,EXPONENTIAL_AT:[A,O],RANGE:[T,P],CRYPTO:I,MODULO_MODE:R,POW_PRECISION:C,FORMAT:N,ALPHABET:B}},L.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!L.DEBUG)return!0;var e,r,n=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-g&&i<=g&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%h)<1&&(e+=h),String(n[0]).length==e){for(e=0;e=l||r!==u(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+t)},L.maximum=L.max=function(){return U(arguments,o.lt)},L.minimum=L.min=function(){return U(arguments,o.gt)},L.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return u(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,n,i,o,a,f=0,l=[],d=new L(k);if(null==t?t=x:w(t,0,g),o=s(t/h),I)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),r[f]=n[0],r[f+1]=n[1]):(l.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw I=!1,Error(c+"crypto unavailable");for(r=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(r,f):(l.push(a%1e14),f+=7);f=o/7}if(!I)for(;f=10;a/=10,f++);fr-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(n,i,o,a,s){var u,c,f,l,h,d,p,m,g=n.indexOf("."),v=x,b=E;for(g>=0&&(l=C,C=0,n=n.replace(".",""),d=(m=new L(i)).pow(n.length-g),C=l,m.c=e(M(y(d.c),d.e,"0"),10,o,t),m.e=m.c.length),f=l=(p=e(n,i,o,s?(u=B,t):(u=t,B))).length;0==p[--l];p.pop());if(!p[0])return u.charAt(0);if(g<0?--f:(d.c=p,d.e=f,d.s=a,p=(d=r(d,m,v,b,o)).c,h=d.r,f=d.e),g=p[c=f+v+1],l=o/2,h=h||c<0||null!=p[c+1],h=b<4?(null!=g||h)&&(0==b||b==(d.s<0?3:2)):g>l||g==l&&(4==b||h||6==b&&1&p[c-1]||b==(d.s<0?8:7)),c<1||!p[0])n=h?M(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(p.length=c,h)for(--o;++p[--c]>o;)p[c]=0,c||(++f,p=[1].concat(p));for(l=p.length;!p[--l];);for(g=0,n="";g<=l;n+=u.charAt(p[g++]));n=M(n,f,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,o,a,s=0,u=t.length,c=e%m,f=e/m|0;for(t=t.slice();u--;)s=((i=c*(o=t[u]%m)+(n=f*o+(a=t[u]/m|0)*c)%m*m+s)/r|0)+(n/m|0)+f*a,t[u]=i%r;return s&&(t=[s].concat(t)),t}function e(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,o,a,s){var c,f,d,p,m,g,y,b,w,_,S,M,k,x,E,A,O,T=n.s==i.s?1:-1,P=n.c,I=i.c;if(!P||!P[0]||!I||!I[0])return new L(n.s&&i.s&&(P?!I||P[0]!=I[0]:I)?P&&0==P[0]||!I?0*T:T/0:NaN);for(w=(b=new L(T)).c=[],T=o+(f=n.e-i.e)+1,s||(s=l,f=v(n.e/h)-v(i.e/h),T=T/h|0),d=0;I[d]==(P[d]||0);d++);if(I[d]>(P[d]||0)&&f--,T<0)w.push(1),p=!0;else{for(x=P.length,A=I.length,d=0,T+=2,(m=u(s/(I[0]+1)))>1&&(I=t(I,m,s),P=t(P,m,s),A=I.length,x=P.length),k=A,S=(_=P.slice(0,A)).length;S=s/2&&E++;do{if(m=0,(c=e(I,_,A,S))<0){if(M=_[0],A!=S&&(M=M*s+(_[1]||0)),(m=u(M/E))>1)for(m>=s&&(m=s-1),y=(g=t(I,m,s)).length,S=_.length;1==e(g,_,y,S);)m--,r(g,A=10;T/=10,d++);H(b,o+(b.e=d+f*h-1)+1,a,p)}else b.e=f,b.r=+p;return b}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,r=/^\.([^.]+)$/,n=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var f,l=s?a:a.replace(i,"");if(n.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!s&&(l=l.replace(t,(function(t,e,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?t:e})),u&&(f=u,l=l.replace(e,"$1").replace(r,"0.$1")),a!=l))return new L(l,f);if(L.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new L(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return b(this,new L(t,e))},o.decimalPlaces=o.dp=function(t,e){var r,n,i,o=this;if(null!=t)return w(t,0,g),null==e?e=E:w(e,0,8),H(new L(o),t+o.e+1,e);if(!(r=o.c))return null;if(n=((i=r.length-1)-v(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},o.dividedBy=o.div=function(t,e){return r(this,new L(t,e),x,E)},o.dividedToIntegerBy=o.idiv=function(t,e){return r(this,new L(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var r,n,i,o,a,f,l,d,p=this;if((t=new L(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+z(t));if(null!=e&&(e=new L(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new L(Math.pow(+z(p),a?t.s*(2-_(t)):+z(t))),e?d.mod(e):d;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new L(NaN);(n=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&_(t)?-0:0,p.e>-1&&(o=1/o),new L(f?1/o:o);C&&(o=s(C/h+2))}for(a?(r=new L(.5),f&&(t.s=1),l=_(t)):l=(i=Math.abs(+z(t)))%2,d=new L(k);;){if(l){if(!(d=d.times(p)).c)break;o?d.c.length>o&&(d.c.length=o):n&&(d=d.mod(e))}if(i){if(0===(i=u(i/2)))break;l=i%2}else if(H(t=t.times(r),t.e+1,1),t.e>14)l=_(t);else{if(0===(i=+z(t)))break;l=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?d:(f&&(d=k.div(d)),e?d.mod(e):o?H(d,C,E,undefined):d)},o.integerValue=function(t){var e=new L(this);return null==t?t=E:w(t,0,8),H(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===b(this,new L(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return b(this,new L(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=b(this,new L(t,e)))||0===e},o.isInteger=function(){return!!this.c&&v(this.e/h)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return b(this,new L(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=b(this,new L(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var r,n,i,o,a=this,s=a.s;if(e=(t=new L(t,e)).s,!s||!e)return new L(NaN);if(s!=e)return t.s=-e,a.plus(t);var u=a.e/h,c=t.e/h,f=a.c,d=t.c;if(!u||!c){if(!f||!d)return f?(t.s=-e,t):new L(d?a:NaN);if(!f[0]||!d[0])return d[0]?(t.s=-e,t):new L(f[0]?a:3==E?-0:0)}if(u=v(u),c=v(c),f=f.slice(),s=u-c){for((o=s<0)?(s=-s,i=f):(c=u,i=d),i.reverse(),e=s;e--;i.push(0));i.reverse()}else for(n=(o=(s=f.length)<(e=d.length))?s:e,s=e=0;e0)for(;e--;f[r++]=0);for(e=l-1;n>s;){if(f[--n]=0;){for(r=0,p=M[i]%w,g=M[i]/w|0,o=i+(a=u);o>i;)r=((c=p*(c=S[--a]%w)+(s=g*c+(f=S[a]/w|0)*p)%w*w+y[o]+r)/b|0)+(s/w|0)+g*f,y[o--]=c%b;y[o]=r}return r?++n:y.splice(0,1),F(t,y,n)},o.negated=function(){var t=new L(this);return t.s=-t.s||null,t},o.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new L(t,e)).s,!i||!e)return new L(NaN);if(i!=e)return t.s=-e,n.minus(t);var o=n.e/h,a=t.e/h,s=n.c,u=t.c;if(!o||!a){if(!s||!u)return new L(i/0);if(!s[0]||!u[0])return u[0]?t:new L(s[0]?n:0*i)}if(o=v(o),a=v(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(e=u.length)<0&&(r=u,u=s,s=r,e=i),i=0;e;)i=(s[--e]=s[e]+u[e]+i)/l|0,s[e]=l===s[e]?0:s[e]%l;return i&&(s=[i].concat(s),++a),F(t,s,a)},o.precision=o.sd=function(t,e){var r,n,i,o=this;if(null!=t&&t!==!!t)return w(t,1,g),null==e?e=E:w(e,0,8),H(new L(o),t,e);if(!(r=o.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&o.e+1>n&&(n=o.e+1),n},o.shiftedBy=function(t){return w(t,-9007199254740991,d),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,n,i,o,a=this,s=a.c,u=a.s,c=a.e,f=x+4,l=new L("0.5");if(1!==u||!s||!s[0])return new L(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+z(a)))||u==1/0?(((e=y(s)).length+c)%2==0&&(e+="0"),u=Math.sqrt(+e),c=v((c+1)/2)-(c<0||c%2),n=new L(e=u==1/0?"5e"+c:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+c)):n=new L(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=l.times(o.plus(r(a,o,f,1))),y(o.c).slice(0,u)===(e=y(n.c)).slice(0,u)){if(n.e0&&m>0){for(o=m%s||s,l=p.substr(0,o);o0&&(l+=f+p.slice(o)),d&&(l="-"+l)}n=h?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):l}return(r.prefix||"")+n+(r.suffix||"")},o.toFraction=function(t){var e,n,i,o,a,s,u,f,l,d,m,g,v=this,b=v.c;if(null!=t&&(!(u=new L(t)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+z(u));if(!b)return new L(v);for(e=new L(k),l=n=new L(k),i=f=new L(k),g=y(b),a=e.e=g.length-v.e-1,e.c[0]=p[(s=a%h)<0?h+s:s],t=!t||u.comparedTo(e)>0?a>0?e:l:u,s=P,P=1/0,u=new L(g),f.c[0]=0;d=r(u,e,0,1),1!=(o=n.plus(d.times(i))).comparedTo(t);)n=i,i=o,l=f.plus(d.times(o=l)),f=o,e=u.minus(d.times(o=e)),u=o;return o=r(t.minus(n),i,0,1),f=f.plus(o.times(l)),n=n.plus(o.times(i)),f.s=l.s=v.s,m=r(l,i,a*=2,E).minus(v).abs().comparedTo(r(f,n,a,E).minus(v).abs())<1?[l,i]:[f,n],P=s,m},o.toNumber=function(){return+z(this)},o.toPrecision=function(t,e){return null!=t&&w(t,1,g),D(this,t,e,2)},o.toString=function(t){var e,r=this,i=r.s,o=r.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=A||o>=O?S(y(r.c),o):M(y(r.c),o,"0"):10===t&&j?e=M(y((r=H(new L(r),x+o+1,E)).c),r.e,"0"):(w(t,2,B.length,"Base"),e=n(M(y(r.c),o,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return z(this)},o._isBigNumber=!0,null!=e&&L.set(e),L}(),o.default=o.BigNumber=o,void 0===(n=function(){return o}.call(e,r,e,t))||(t.exports=n)}()},80518:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:r(46601).Buffer}catch(O){}function s(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(t.length-e)%2===0?e+1:e;n=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(O){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?""}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?m+r:h[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,x=0|a[5],E=8191&x,A=x>>>13,O=0|a[6],T=8191&O,P=O>>>13,I=0|a[7],R=8191&I,C=I>>>13,N=0|a[8],B=8191&N,j=N>>>13,L=0|a[9],D=8191&L,U=L>>>13,F=0|s[0],H=8191&F,z=F>>>13,K=0|s[1],q=8191&K,V=K>>>13,G=0|s[2],W=8191&G,Y=G>>>13,$=0|s[3],Z=8191&$,X=$>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(l,H))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(m,H)|0,o=Math.imul(m,z);var vt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,H),i=(i=Math.imul(v,z))+Math.imul(y,H)|0,o=Math.imul(y,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var yt=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,W)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(_,H)|0,o=Math.imul(_,z),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var bt=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(k,H)|0,o=Math.imul(k,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,H),i=(i=Math.imul(T,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var St=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(R,H),i=(i=Math.imul(R,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(U,q)|0,o=Math.imul(U,V),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var Et=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,X))+Math.imul(U,Z)|0,o=Math.imul(U,X),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ot=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(U,ot)|0,o=Math.imul(U,at),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var It=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,ht)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(U,lt)|0,o=Math.imul(U,ht);var Ct=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=xt,u[10]=Et,u[11]=At,u[12]=Ot,u[13]=Tt,u[14]=Pt,u[15]=It,u[16]=Rt,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function v(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function y(t,e,r){return v(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):r<63?m(this,t,e):r<1024?v(this,t,e):y(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0===(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0===(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(S,_),S.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new M;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return w[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,E),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},33740:function(t,e,r){var n=r(88770),i=r(14249);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return v(function(t){return t.split("\\\\").join(o).split("\\{").join(a).split("\\}").join(s).split("\\,").join(u).split("\\.").join(c)}(t),!0).map(l)};var o="\0SLASH"+Math.random()+"\0",a="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function f(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(o).join("\\").split(a).join("{").split(s).join("}").split(u).join(",").split(c).join(".")}function h(t){if(!t)return[""];var e=[],r=i("{","}",t);if(!r)return t.split(",");var n=r.pre,o=r.body,a=r.post,s=n.split(",");s[s.length-1]+="{"+o+"}";var u=h(a);return a.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),e.push.apply(e,s),e}function d(t){return"{"+t+"}"}function p(t){return/^-?0\d/.test(t)}function m(t,e){return t<=e}function g(t,e){return t>=e}function v(t,e){var r=[],o=i("{","}",t);if(!o||/\$$/.test(o.pre))return[t];var a,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),l=u||c,y=o.body.indexOf(",")>=0;if(!l&&!y)return o.post.match(/,.*\}/)?v(t=o.pre+"{"+o.body+s+o.post):[t];if(l)a=o.body.split(/\.\./);else if(1===(a=h(o.body)).length&&1===(a=v(a[0],!1).map(d)).length)return(_=o.post.length?v(o.post,!1):[""]).map((function(t){return o.pre+a[0]+t}));var b,w=o.pre,_=o.post.length?v(o.post,!1):[""];if(l){var S=f(a[0]),M=f(a[1]),k=Math.max(a[0].length,a[1].length),x=3==a.length?Math.abs(f(a[2])):1,E=m;M0){var I=new Array(P+1).join("0");T=O<0?"-"+I+T.slice(1):I+T}}b.push(T)}}else b=n(a,(function(t){return v(t,!1)}));for(var R=0;R>>24]^f[p>>>16&255]^l[m>>>8&255]^h[255&g]^e[v++],a=c[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^h[255&d]^e[v++],s=c[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^h[255&p]^e[v++],u=c[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&m]^e[v++],d=o,p=a,m=s,g=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^e[v++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^e[v++],s=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[v++],u=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[v++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=t[a],l=t[f],h=t[l],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^t[t[t[h^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},3560:function(t,e,r){var n=r(59915),i=r(82543).Buffer,o=r(92221),a=r(12534),s=r(15283),u=r(35865),c=r(8387);function f(t,e,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new s(r),o=e.length,a=o%16;n.update(e),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),t._finID=n.state;var l=i.from(t._finID);return c(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},e.createDecipheriv=h},25270:function(t,e,r){var n=r(88172),i=r(3560),o=r(82543).Buffer,a=r(12776),s=r(92221),u=r(59915),c=r(48462);function f(t,e,r){s.call(this),this._cache=new h,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(12534)(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var s=n[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"===typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,e,r):"auth"===s.type?new i(s.module,e,r):new f(s.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},8387:function(t){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},10694:function(t,e,r){var n=r(35865);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},33492:function(t,e,r){var n=r(82543).Buffer,i=r(35865);function o(t,e,r){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:a]),a}e.encrypt=function(t,e,r){for(var i,a=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){a=n.concat([a,o(t,e,r)]);break}i=t._cache.length,a=n.concat([a,o(t,e.slice(0,i),r)]),e=e.slice(i)}return a}},61400:function(t,e,r){var n=r(82543).Buffer;function i(t,e,r){for(var n,i,a=-1,s=0;++a<8;)n=e&1<<7-a?128:0,s+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>a%8,t._prev=o(t._prev,r?n:i);return s}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function s(t,e){var r=function(t){var e=a(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),s=new i(t).mul(r.blinder).umod(e.modulus),u=s.toRed(i.mont(e.prime1)),c=s.toRed(i.mont(e.prime2)),f=e.coefficient,l=e.prime1,h=e.prime2,d=u.redPow(e.exponent1).fromRed(),p=c.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(h);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(n,"be",o)}s.getr=a,t.exports=s},77050:function(t,e,r){t.exports=r(75207)},87834:function(t,e,r){var n=r(82543).Buffer,i=r(83569),o=r(4704),a=r(12534),s=r(45908),u=r(71666),c=r(75207);function f(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new f(t)}function d(t){return new l(t)}Object.keys(c).forEach((function(t){c[t].id=n.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),a(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"===typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},a(l,o.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return"string"===typeof t&&(t=n.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,r){"string"===typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},45908:function(t,e,r){var n=r(82543).Buffer,i=r(57651),o=r(81330),a=r(6289).ec,s=r(80518),u=r(37510),c=r(1308);function f(t,e,r,o){if((t=n.from(t.toArray())).length0&&r.ishrn(n),r}function h(t,e,r){var o,a;do{for(o=n.alloc(0);8*o.length=e)throw new Error("invalid sig")}t.exports=function(t,e,r,c,f){var l=a(r);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(e,t,a)}(t,e,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(t,"der"),l=f.s,h=f.r;u(l,o),u(h,o);var d=i.mont(n),p=l.invm(o),m=s.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o);return 0===m.cmp(h)}(t,e,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=n.concat([f,e]);for(var h=l.modulus.byteLength(),d=[1],p=0;e.length+d.length+22?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,a,s;if("string"===typeof e&&(o="not ",e.substr(!a||a<0?0:+a,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},23771:function(t,e,r){"use strict";var n=r(1426),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(49059),a=r(62354);r(12534)(f,o);for(var s=i(a.prototype),u=0;u0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)a.endEmitted?S(t,new _):A(t,a,e,!0);else if(a.ended)S(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):R(t,a)):A(t,a,e,!1)}else n||(a.reading=!1,R(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=O?t=O:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function P(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function R(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(C,t,e))}function C(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function B(t){c("readable nexttick read 0"),t.read(0)}function j(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function U(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function H(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):P(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&U(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?D(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&U(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(t){S(this,new w("_read()"))},x.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,c("pipe count=%d opts=%j",n.pipesCount,e);var a=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:g;function s(e,i){c("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){c("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",f);var l=!1;function h(e){c("ondata");var i=t.write(e);c("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==H(n.pipes,t))&&!l&&(c("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&S(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),n.flowing||(c("pipe resume"),r.resume()),t},x.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c("on readable",n.length,n.reading),n.length?P(this):n.reading||i.nextTick(B,this))),r},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(N,this),r},x.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(N,this),e},x.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(j,t,e))}(this,t)),t.paused=!1,this},x.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(t,e,r){r(new m("_write()"))},x.prototype._writev=null,x.prototype.end=function(t,e,r){var n=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,I(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),x.prototype.destroy=l.destroy,x.prototype._undestroy=l.undestroy,x.prototype._destroy=function(t,e){e(t)}},55515:function(t,e,r){"use strict";var n,i=r(1426);function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(45830),s=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function m(t){var e=t[s];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[s]=null,t[u]=null,e(p(r,!1)))}}function g(t){i.nextTick(m,t)}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(p(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(p(void 0,!0)):e[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[d].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),v);t.exports=function(t){var e,r=Object.create(y,(o(e={},d,{value:t,writable:!0}),o(e,s,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,h,{value:function(t,e){var n=r[d].read();n?(r[l]=null,r[s]=null,r[u]=null,t(p(n,!1))):(r[s]=t,r[u]=e)},writable:!0}),e));return r[l]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[l]=null,r[s]=null,r[u]=null,e(t)),void(r[c]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[f]=!0})),t.on("readable",g.bind(null,r)),r}},81042:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return u.alloc(0);for(var e,r,n,i=u.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,u.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=u.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:f,value:function(t,e){return c(this,i(i({},e),{},{depth:0,customInspect:!1}))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},53789:function(t,e,r){"use strict";var n=r(1426);function i(t,e){a(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function a(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(a,this,t)):n.nextTick(a,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},45830:function(t,e,r){"use strict";var n=r(27109).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"===typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0,(function(t){f||(f=t),t&&h.forEach(u),o||(h.forEach(u),l(f))}))}));return e.reduce(c)}},94072:function(t,e,r){"use strict";var n=r(27109).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},86872:function(t,e,r){t.exports=r(47465).EventEmitter},4704:function(t,e,r){(e=t.exports=r(49059)).Stream=e,e.Readable=e,e.Writable=r(62354),e.Duplex=r(23771),e.Transform=r(37454),e.PassThrough=r(82344),e.finished=r(45830),e.pipeline=r(55202)},66315:function(t,e,r){var n=r(12307);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},33325:function(t,e,r){"use strict";var n=r(19778).Buffer,i=t.exports;i.version="v"+r(53723).i8,i.versionGuard=function(t){if(void 0!==t){console.warn("\n More than one instance of bsv found.\n Please make sure to require bsv and check that submodules do\n not also include their own bsv dependency.")}},i.versionGuard(r.g._bsv),r.g._bsv=i.version,i.crypto={},i.crypto.BN=r(81016),i.crypto.ECDSA=r(58909),i.crypto.Hash=r(15935),i.crypto.Random=r(12396),i.crypto.Point=r(4067),i.crypto.Signature=r(34108),i.encoding={},i.encoding.Base58=r(36615),i.encoding.Base58Check=r(38856),i.encoding.BufferReader=r(84958),i.encoding.BufferWriter=r(74690),i.encoding.Varint=r(10129),i.util={},i.util.js=r(53604),i.util.preconditions=r(99281),i.errors=r(67690),i.Address=r(81386),i.Block=r(45132),i.MerkleBlock=r(89713),i.BlockHeader=r(95266),i.HDPrivateKey=r(98299),i.HDPublicKey=r(81415),i.Networks=r(47192),i.Opcode=r(3464),i.PrivateKey=r(52539),i.PublicKey=r(29730),i.Script=r(66154),i.Transaction=r(75277),i.deps={},i.deps.bnjs=r(41264),i.deps.bs58=r(66315),i.deps.Buffer=n,i.deps.elliptic=r(6289),i.deps._=r(61504),i.Transaction.sighash=r(41132)},81386:function(t,e,r){"use strict";var n=r(19778).Buffer,i=r(61504),o=r(99281),a=r(67690),s=r(38856),u=r(47192),c=r(15935),f=r(53604),l=r(29730);function h(t,e,r){if(!(this instanceof h))return new h(t,e,r);if(i.isArray(t)&&i.isNumber(e))return h.createMultisig(t,e,r);if(t instanceof h)return t;if(o.checkArgument(t,"First argument is required, please include address data.","guide/address.html"),e&&!u.get(e))throw new TypeError('Second argument must be "livenet", "testnet", or "regtest".');if(r&&r!==h.PayToPublicKeyHash&&r!==h.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var n=this._classifyArguments(t,e,r);return n.network=n.network||u.get(e)||u.defaultNetwork,n.type=n.type||r||h.PayToPublicKeyHash,f.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}h.prototype._classifyArguments=function(t,e,o){var a=r(66154);if((t instanceof n||t instanceof Uint8Array)&&20===t.length)return h._transformHash(t);if((t instanceof n||t instanceof Uint8Array)&&21===t.length)return h._transformBuffer(t,e,o);if(t instanceof l)return h._transformPublicKey(t);if(t instanceof a)return h._transformScript(t,e);if("string"===typeof t)return h._transformString(t,e,o);if(i.isObject(t))return h._transformObject(t);throw new TypeError("First argument is an unrecognized data format.")},h.PayToPublicKeyHash="pubkeyhash",h.PayToScriptHash="scripthash",h._transformHash=function(t){var e={};if(!(t instanceof n)&&!(t instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(20!==t.length)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return e.hashBuffer=t,e},h._transformObject=function(t){return o.checkArgument(t.hash||t.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),o.checkArgument(t.type,"Must provide a `type` property"),{hashBuffer:t.hash?n.from(t.hash,"hex"):t.hashBuffer,network:u.get(t.network)||u.defaultNetwork,type:t.type}},h._classifyFromVersion=function(t){var e={},r=u.get(t[0],"pubkeyhash"),n=u.get(t[0],"scripthash");return r?(e.network=r,e.type=h.PayToPublicKeyHash):n&&(e.network=n,e.type=h.PayToScriptHash),e},h._transformBuffer=function(t,e,r){var i={};if(!(t instanceof n)&&!(t instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(21!==t.length)throw new TypeError("Address buffers must be exactly 21 bytes.");var o=u.get(e),a=h._classifyFromVersion(t);if(e&&!o)throw new TypeError("Unknown network");if(!a.network||o&&o!==a.network)throw new TypeError("Address has mismatched network type.");if(!a.type||r&&r!==a.type)throw new TypeError("Address has mismatched type.");return i.hashBuffer=t.slice(1),i.network=a.network,i.type=a.type,i},h._transformPublicKey=function(t){var e={};if(!(t instanceof l))throw new TypeError("Address must be an instance of PublicKey.");return e.hashBuffer=c.sha256ripemd160(t.toBuffer()),e.type=h.PayToPublicKeyHash,e},h._transformScript=function(t,e){var n=r(66154);o.checkArgument(t instanceof n,"script must be a Script instance");var i=t.getAddressInfo(e);if(!i)throw new a.Script.CantDeriveAddress(t);return i},h.createMultisig=function(t,e,n){var i=r(66154);return n=n||t[0].network||u.defaultNetwork,h.payingTo(i.buildMultisigOut(t,e),n)},h._transformString=function(t,e,r){if("string"!==typeof t)throw new TypeError("data parameter supplied is not a string.");if(t.length<27)throw new Error("Invalid Address string provided");t=t.trim();var n=u.get(e);if(e&&!n)throw new TypeError("Unknown network");var i=s.decode(t);return h._transformBuffer(i,e,r)},h.fromPublicKey=function(t,e){var r=h._transformPublicKey(t);return e=e||u.defaultNetwork,new h(r.hashBuffer,e,r.type)},h.fromPrivateKey=function(t,e){var r=l.fromPrivateKey(t);return e=e||t.network||u.defaultNetwork,h.fromPublicKey(r,e)},h.fromPublicKeyHash=function(t,e){var r=h._transformHash(t);return new h(r.hashBuffer,e,h.PayToPublicKeyHash)},h.fromScriptHash=function(t,e){o.checkArgument(t,"hash parameter is required");var r=h._transformHash(t);return new h(r.hashBuffer,e,h.PayToScriptHash)},h.payingTo=function(t,e){var n=r(66154);return o.checkArgument(t,"script is required"),o.checkArgument(t instanceof n,"script must be instance of Script"),h.fromScriptHash(c.sha256ripemd160(t.toBuffer()),e)},h.fromScript=function(t,e){var n=r(66154);o.checkArgument(t instanceof n,"script must be a Script instance");var i=h._transformScript(t,e);return new h(i.hashBuffer,e,i.type)},h.fromBuffer=function(t,e,r){var n=h._transformBuffer(t,e,r);return new h(n.hashBuffer,n.network,n.type)},h.fromHex=function(t,e,r){return h.fromBuffer(n.from(t,"hex"),e,r)},h.fromString=function(t,e,r){var n=h._transformString(t,e,r);return new h(n.hashBuffer,n.network,n.type)},h.fromObject=function(t){return o.checkState(f.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.'),new h(n.from(t.hash,"hex"),t.network,t.type)},h.getValidationError=function(t,e,r){var n;try{new h(t,e,r)}catch(i){n=i}return n},h.isValid=function(t,e,r){return!h.getValidationError(t,e,r)},h.prototype.isPayToPublicKeyHash=function(){return this.type===h.PayToPublicKeyHash},h.prototype.isPayToScriptHash=function(){return this.type===h.PayToScriptHash},h.prototype.toBuffer=function(){var t=n.from([this.network[this.type]]);return n.concat([t,this.hashBuffer])},h.prototype.toHex=function(){return this.toBuffer().toString("hex")},h.prototype.toObject=h.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},h.prototype.inspect=function(){return""},h.prototype.toString=function(){return s.encode(this.toBuffer())},t.exports=h;r(66154)},25304:function(t,e,r){"use strict";var n=r(19778).Buffer,i=r(61504),o=r(95266),a=r(81016),s=r(84958),u=r(74690),c=r(15935),f=r(75277),l=r(99281);function h(t){return this instanceof h?(i.extend(this,h._from(t)),this):new h(t)}h.MAX_BLOCK_SIZE=128e6,h._from=function(t){var e={};if(n.isBuffer(t))e=h._fromBufferReader(s(t));else{if(!i.isObject(t))throw new TypeError("Unrecognized argument for Block");e=h._fromObject(t)}return e},h._fromObject=function(t){var e=[];return t.transactions.forEach((function(t){t instanceof f?e.push(t):e.push(f().fromObject(t))})),{header:o.fromObject(t.header),transactions:e}},h.fromObject=function(t){var e=h._fromObject(t);return new h(e)},h._fromBufferReader=function(t){var e={};l.checkState(!t.finished(),"No block data received"),e.header=o.fromBufferReader(t);var r=t.readVarintNum();e.transactions=[];for(var n=0;n1;r=Math.floor((r+1)/2)){for(var i=0;i"},h.Values={START_OF_BLOCK:8,NULL_HASH:n.from("0000000000000000000000000000000000000000000000000000000000000000","hex")},t.exports=h},95266:function(t,e,r){"use strict";var n=r(19778).Buffer,i=r(61504),o=r(81016),a=r(84958),s=r(74690),u=r(15935),c=r(99281),f=function t(e){if(!(this instanceof t))return new t(e);var r=t._from(e);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&c.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};f._from=function(t){var e={};if(n.isBuffer(t))e=f._fromBufferReader(a(t));else{if(!i.isObject(t))throw new TypeError("Unrecognized argument for BlockHeader");e=f._fromObject(t)}return e},f._fromObject=function(t){c.checkArgument(t,"data is required");var e=t.prevHash,r=t.merkleRoot;return i.isString(t.prevHash)&&(e=n.from(t.prevHash,"hex").reverse()),i.isString(t.merkleRoot)&&(r=n.from(t.merkleRoot,"hex").reverse()),{hash:t.hash,version:t.version,prevHash:e,merkleRoot:r,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce}},f.fromObject=function(t){var e=f._fromObject(t);return new f(e)},f.fromRawBlock=function(t){n.isBuffer(t)||(t=n.from(t,"binary"));var e=a(t);e.pos=f.Constants.START_OF_HEADER;var r=f._fromBufferReader(e);return new f(r)},f.fromBuffer=function(t){var e=f._fromBufferReader(a(t));return new f(e)},f.fromString=function(t){var e=n.from(t,"hex");return f.fromBuffer(e)},f._fromBufferReader=function(t){var e={};return e.version=t.readInt32LE(),e.prevHash=t.read(32),e.merkleRoot=t.read(32),e.time=t.readUInt32LE(),e.bits=t.readUInt32LE(),e.nonce=t.readUInt32LE(),e},f.fromBufferReader=function(t){var e=f._fromBufferReader(t);return new f(e)},f.prototype.toObject=f.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:n.from(this.prevHash).reverse().toString("hex"),merkleRoot:n.from(this.merkleRoot).reverse().toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}},f.prototype.toBuffer=function(){return this.toBufferWriter().concat()},f.prototype.toString=function(){return this.toBuffer().toString("hex")},f.prototype.toBufferWriter=function(t){return t||(t=new s),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t},f.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var e=new o(16777215&t),r=8*((t>>>24)-3);r-- >0;)e=e.mul(new o(2));return e},f.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(486604799).mul(new o(Math.pow(10,8))),e=this.getTargetDifficulty(),r=t.div(e).toString(10),n=r.length-8;return r=r.slice(0,n)+"."+r.slice(n),parseFloat(r)},f.prototype._getHash=function(){var t=this.toBuffer();return u.sha256sha256(t)};var l={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=a(this._getHash()).readReverse().toString("hex")),this._id},set:i.noop};Object.defineProperty(f.prototype,"id",l),Object.defineProperty(f.prototype,"hash",l),f.prototype.validTimestamp=function(){var t=Math.round((new Date).getTime()/1e3);return!(this.time>t+f.Constants.MAX_TIME_OFFSET)},f.prototype.validProofOfWork=function(){var t=new o(this.id,"hex"),e=this.getTargetDifficulty();return!(t.cmp(e)>0)},f.prototype.inspect=function(){return""},f.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new o("10000000000000000000000000000000000000000000000000000000000000000","hex")},t.exports=f},45132:function(t,e,r){t.exports=r(25304),t.exports.BlockHeader=r(95266),t.exports.MerkleBlock=r(89713)},89713:function(t,e,r){"use strict";var n=r(19778).Buffer,i=r(61504),o=r(95266),a=r(84958),s=r(74690),u=r(15935),c=r(75277),f=r(67690),l=r(99281);function h(t){if(!(this instanceof h))return new h(t);var e={};if(n.isBuffer(t))e=h._fromBufferReader(a(t));else{if(!i.isObject(t))throw new TypeError("Unrecognized argument for MerkleBlock");e={header:t.header instanceof o?t.header:o.fromObject(t.header),numTransactions:t.numTransactions,hashes:t.hashes,flags:t.flags}}return i.extend(this,e),this._flagBitsUsed=0,this._hashesUsed=0,this}h.fromBuffer=function(t){return h.fromBufferReader(a(t))},h.fromBufferReader=function(t){return new h(h._fromBufferReader(t))},h.prototype.toBuffer=function(){return this.toBufferWriter().concat()},h.prototype.toBufferWriter=function(t){t||(t=new s),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var e=0;ethis.numTransactions)return!1;if(8*this.flags.lengththis.numTransactions)throw new f.MerkleBlock.InvalidMerkleTree;if(8*this.flags.length8*this.flags.length)return null;var o=this.flags[r.flagBitsUsed>>3]>>>(7&r.flagBitsUsed++)&1;if(0!==t&&o){var a=this._traverseMerkleTree(t-1,2*e,r),s=a;return 2*e+1=this.hashes.length)return null;var c=this.hashes[r.hashesUsed++];return 0===t&&o&&r.txs.push(c),n.from(c,"hex")},h.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<>t},h.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t},h.prototype.hasTransaction=function(t){l.checkArgument(!i.isUndefined(t),"tx cannot be undefined"),l.checkArgument(t instanceof c||"string"===typeof t,'Invalid tx given, tx must be a "string" or "Transaction"');var e=t;t instanceof c&&(e=n.from(t.id,"hex").reverse().toString("hex"));var r=[],o=this._calcTreeHeight();return this._traverseMerkleTree(o,0,{txs:r}),-1!==r.indexOf(e)},h._fromBufferReader=function(t){l.checkState(!t.finished(),"No merkleblock data received");var e={};e.header=o.fromBufferReader(t),e.numTransactions=t.readUInt32LE();var r=t.readVarintNum();e.hashes=[];for(var n=0;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),r=0!==o||a!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:c[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,x=0|a[5],E=8191&x,A=x>>>13,O=0|a[6],T=8191&O,P=O>>>13,I=0|a[7],R=8191&I,C=I>>>13,N=0|a[8],B=8191&N,j=N>>>13,L=0|a[9],D=8191&L,U=L>>>13,F=0|s[0],H=8191&F,z=F>>>13,K=0|s[1],q=8191&K,V=K>>>13,G=0|s[2],W=8191&G,Y=G>>>13,$=0|s[3],Z=8191&$,X=$>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(l,H))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(m,H)|0,o=Math.imul(m,z);var vt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,H),i=(i=Math.imul(v,z))+Math.imul(y,H)|0,o=Math.imul(y,z),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0;var yt=(c+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(h,W)|0))<<13)|0;c=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(_,H)|0,o=Math.imul(_,z),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var bt=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(k,H)|0,o=Math.imul(k,z),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,Y)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,X)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(E,H),i=(i=Math.imul(E,z))+Math.imul(A,H)|0,o=Math.imul(A,z),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,H),i=(i=Math.imul(T,z))+Math.imul(P,H)|0,o=Math.imul(P,z),n=n+Math.imul(E,q)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var St=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(R,H),i=(i=Math.imul(R,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,V)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(D,H),i=(i=Math.imul(D,z))+Math.imul(U,H)|0,o=Math.imul(U,z),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,V)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,Y)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var xt=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(U,q)|0,o=Math.imul(U,V),n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(j,W)|0,o=o+Math.imul(j,Y)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(C,Z)|0,o=o+Math.imul(C,X)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var Et=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(D,W),i=(i=Math.imul(D,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(P,rt)|0,o=o+Math.imul(P,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(D,Z),i=(i=Math.imul(D,X))+Math.imul(U,Z)|0,o=Math.imul(U,X),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ot=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(D,Q),i=(i=Math.imul(D,tt))+Math.imul(U,Q)|0,o=Math.imul(U,tt),n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,rt),i=(i=Math.imul(D,nt))+Math.imul(U,rt)|0,o=Math.imul(U,nt),n=n+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,ht)|0;var Pt=(c+(n=n+Math.imul(E,pt)|0)|0)+((8191&(i=(i=i+Math.imul(E,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(D,ot),i=(i=Math.imul(D,at))+Math.imul(U,ot)|0,o=Math.imul(U,at),n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ct)|0)+Math.imul(j,ut)|0,o=o+Math.imul(j,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var It=(c+(n=n+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(D,ut),i=(i=Math.imul(D,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,ht)|0;var Rt=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(D,lt),i=(i=Math.imul(D,ht))+Math.imul(U,lt)|0,o=Math.imul(U,ht);var Ct=(c+(n=n+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863;var Nt=(c+(n=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,mt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,mt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=xt,u[10]=Et,u[11]=At,u[12]=Ot,u[13]=Tt,u[14]=Pt,u[15]=It,u[16]=Rt,u[17]=Ct,u[18]=Nt,0!==c&&(u[19]=c,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c