UNPKG

@nocobase/plugin-verification

Version:

User identity verification management, including SMS, TOTP authenticator, with extensibility.

1 lines 860 kB
(()=>{var e={4812:(e,a,p)=>{e.exports={parallel:p(8210),serial:p(445),serialOrdered:p(3578)}},1700:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},2794:(e,a,p)=>{var i=p(5295);e.exports=async;function async(e){var a=false;i((function(){a=true}));return function async_callback(p,t){if(a){e(p,t)}else{i((function nextTick_callback(){e(p,t)}))}}}},5295:e=>{e.exports=defer;function defer(e){var a=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(a){a(e)}else{setTimeout(e,0)}}},9023:(e,a,p)=>{var i=p(2794),t=p(1700);e.exports=iterate;function iterate(e,a,p,i){var o=p["keyedList"]?p["keyedList"][p.index]:p.index;p.jobs[o]=runJob(a,o,e[o],(function(e,a){if(!(o in p.jobs)){return}delete p.jobs[o];if(e){t(p)}else{p.results[o]=a}i(e,p.results)}))}function runJob(e,a,p,t){var o;if(e.length==2){o=e(p,i(t))}else{o=e(p,a,i(t))}return o}},2474:e=>{e.exports=state;function state(e,a){var p=!Array.isArray(e),i={index:0,keyedList:p||a?Object.keys(e):null,jobs:{},results:p?{}:[],size:p?Object.keys(e).length:e.length};if(a){i.keyedList.sort(p?a:function(p,i){return a(e[p],e[i])})}return i}},7942:(e,a,p)=>{var i=p(1700),t=p(2794);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;i(this);t(e)(null,this.results)}},8210:(e,a,p)=>{var i=p(9023),t=p(2474),o=p(7942);e.exports=parallel;function parallel(e,a,p){var n=t(e);while(n.index<(n["keyedList"]||e).length){i(e,a,n,(function(e,a){if(e){p(e,a);return}if(Object.keys(n.jobs).length===0){p(null,n.results);return}}));n.index++}return o.bind(n,p)}},445:(e,a,p)=>{var i=p(3578);e.exports=serial;function serial(e,a,p){return i(e,a,null,p)}},3578:(e,a,p)=>{var i=p(9023),t=p(2474),o=p(7942);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,a,p,n){var s=t(e,p);i(e,a,s,(function iteratorHandler(p,t){if(p){n(p,t);return}s.index++;if(s.index<(s["keyedList"]||e).length){i(e,a,s,iteratorHandler);return}n(null,s.results)}));return o.bind(s,n)}function ascending(e,a){return e<a?-1:e>a?1:0}function descending(e,a){return-1*ascending(e,a)}},7558:function(e){(function(a){"use strict";var p,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,t=Math.ceil,o=Math.floor,n="[BigNumber Error] ",s=n+"Number primitive has more than 15 significant digits: ",r=1e14,d=14,l=9007199254740991,c=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,u=1e9;function clone(e){var a,p,v,h=BigNumber.prototype={constructor:BigNumber,toString:null,valueOf:null},b=new BigNumber(1),x=20,g=4,w=-7,y=21,_=-1e7,S=1e7,D=false,N=1,C=0,T={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",A=true;function BigNumber(e,a){var t,n,r,c,m,u,h,b,w=this;if(!(w instanceof BigNumber))return new BigNumber(e,a);if(a==null){if(e&&e._isBigNumber===true){w.s=e.s;if(!e.c||e.e>S){w.c=w.e=null}else if(e.e<_){w.c=[w.e=0]}else{w.e=e.e;w.c=e.c.slice()}return}if((u=typeof e=="number")&&e*0==0){w.s=1/e<0?(e=-e,-1):1;if(e===~~e){for(c=0,m=e;m>=10;m/=10,c++);if(c>S){w.c=w.e=null}else{w.e=c;w.c=[e]}return}b=String(e)}else{if(!i.test(b=String(e)))return v(w,b,u);w.s=b.charCodeAt(0)==45?(b=b.slice(1),-1):1}if((c=b.indexOf("."))>-1)b=b.replace(".","");if((m=b.search(/e/i))>0){if(c<0)c=m;c+=+b.slice(m+1);b=b.substring(0,m)}else if(c<0){c=b.length}}else{intCheck(a,2,E.length,"Base");if(a==10&&A){w=new BigNumber(e);return round(w,x+w.e+1,g)}b=String(e);if(u=typeof e=="number"){if(e*0!=0)return v(w,b,u,a);w.s=1/e<0?(b=b.slice(1),-1):1;if(BigNumber.DEBUG&&b.replace(/^0\.0*|\./,"").length>15){throw Error(s+e)}}else{w.s=b.charCodeAt(0)===45?(b=b.slice(1),-1):1}t=E.slice(0,a);c=m=0;for(h=b.length;m<h;m++){if(t.indexOf(n=b.charAt(m))<0){if(n=="."){if(m>c){c=h;continue}}else if(!r){if(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase())){r=true;m=-1;c=0;continue}}return v(w,String(e),u,a)}}u=false;b=p(b,a,10,w.s);if((c=b.indexOf("."))>-1)b=b.replace(".","");else c=b.length}for(m=0;b.charCodeAt(m)===48;m++);for(h=b.length;b.charCodeAt(--h)===48;);if(b=b.slice(m,++h)){h-=m;if(u&&BigNumber.DEBUG&&h>15&&(e>l||e!==o(e))){throw Error(s+w.s*e)}if((c=c-m-1)>S){w.c=w.e=null}else if(c<_){w.c=[w.e=0]}else{w.e=c;w.c=[];m=(c+1)%d;if(c<0)m+=d;if(m<h){if(m)w.c.push(+b.slice(0,m));for(h-=d;m<h;){w.c.push(+b.slice(m,m+=d))}m=d-(b=b.slice(m)).length}else{m-=h}for(;m--;b+="0");w.c.push(+b)}}else{w.c=[w.e=0]}}BigNumber.clone=clone;BigNumber.ROUND_UP=0;BigNumber.ROUND_DOWN=1;BigNumber.ROUND_CEIL=2;BigNumber.ROUND_FLOOR=3;BigNumber.ROUND_HALF_UP=4;BigNumber.ROUND_HALF_DOWN=5;BigNumber.ROUND_HALF_EVEN=6;BigNumber.ROUND_HALF_CEIL=7;BigNumber.ROUND_HALF_FLOOR=8;BigNumber.EUCLID=9;BigNumber.config=BigNumber.set=function(e){var a,p;if(e!=null){if(typeof e=="object"){if(e.hasOwnProperty(a="DECIMAL_PLACES")){p=e[a];intCheck(p,0,u,a);x=p}if(e.hasOwnProperty(a="ROUNDING_MODE")){p=e[a];intCheck(p,0,8,a);g=p}if(e.hasOwnProperty(a="EXPONENTIAL_AT")){p=e[a];if(p&&p.pop){intCheck(p[0],-u,0,a);intCheck(p[1],0,u,a);w=p[0];y=p[1]}else{intCheck(p,-u,u,a);w=-(y=p<0?-p:p)}}if(e.hasOwnProperty(a="RANGE")){p=e[a];if(p&&p.pop){intCheck(p[0],-u,-1,a);intCheck(p[1],1,u,a);_=p[0];S=p[1]}else{intCheck(p,-u,u,a);if(p){_=-(S=p<0?-p:p)}else{throw Error(n+a+" cannot be zero: "+p)}}}if(e.hasOwnProperty(a="CRYPTO")){p=e[a];if(p===!!p){if(p){if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes)){D=p}else{D=!p;throw Error(n+"crypto unavailable")}}else{D=p}}else{throw Error(n+a+" not true or false: "+p)}}if(e.hasOwnProperty(a="MODULO_MODE")){p=e[a];intCheck(p,0,9,a);N=p}if(e.hasOwnProperty(a="POW_PRECISION")){p=e[a];intCheck(p,0,u,a);C=p}if(e.hasOwnProperty(a="FORMAT")){p=e[a];if(typeof p=="object")T=p;else throw Error(n+a+" not an object: "+p)}if(e.hasOwnProperty(a="ALPHABET")){p=e[a];if(typeof p=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(p)){A=p.slice(0,10)=="0123456789";E=p}else{throw Error(n+a+" invalid: "+p)}}}else{throw Error(n+"Object expected: "+e)}}return{DECIMAL_PLACES:x,ROUNDING_MODE:g,EXPONENTIAL_AT:[w,y],RANGE:[_,S],CRYPTO:D,MODULO_MODE:N,POW_PRECISION:C,FORMAT:T,ALPHABET:E}};BigNumber.isBigNumber=function(e){if(!e||e._isBigNumber!==true)return false;if(!BigNumber.DEBUG)return true;var a,p,i=e.c,t=e.e,s=e.s;e:if({}.toString.call(i)=="[object Array]"){if((s===1||s===-1)&&t>=-u&&t<=u&&t===o(t)){if(i[0]===0){if(t===0&&i.length===1)return true;break e}a=(t+1)%d;if(a<1)a+=d;if(String(i[0]).length==a){for(a=0;a<i.length;a++){p=i[a];if(p<0||p>=r||p!==o(p))break e}if(p!==0)return true}}}else if(i===null&&t===null&&(s===null||s===1||s===-1)){return true}throw Error(n+"Invalid BigNumber: "+e)};BigNumber.maximum=BigNumber.max=function(){return maxOrMin(arguments,-1)};BigNumber.minimum=BigNumber.min=function(){return maxOrMin(arguments,1)};BigNumber.random=function(){var e=9007199254740992;var a=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(e){var p,i,s,r,l,m=0,v=[],h=new BigNumber(b);if(e==null)e=x;else intCheck(e,0,u);r=t(e/d);if(D){if(crypto.getRandomValues){p=crypto.getRandomValues(new Uint32Array(r*=2));for(;m<r;){l=p[m]*131072+(p[m+1]>>>11);if(l>=9e15){i=crypto.getRandomValues(new Uint32Array(2));p[m]=i[0];p[m+1]=i[1]}else{v.push(l%1e14);m+=2}}m=r/2}else if(crypto.randomBytes){p=crypto.randomBytes(r*=7);for(;m<r;){l=(p[m]&31)*281474976710656+p[m+1]*1099511627776+p[m+2]*4294967296+p[m+3]*16777216+(p[m+4]<<16)+(p[m+5]<<8)+p[m+6];if(l>=9e15){crypto.randomBytes(7).copy(p,m)}else{v.push(l%1e14);m+=7}}m=r/7}else{D=false;throw Error(n+"crypto unavailable")}}if(!D){for(;m<r;){l=a();if(l<9e15)v[m++]=l%1e14}}r=v[--m];e%=d;if(r&&e){l=c[d-e];v[m]=o(r/l)*l}for(;v[m]===0;v.pop(),m--);if(m<0){v=[s=0]}else{for(s=-1;v[0]===0;v.splice(0,1),s-=d);for(m=1,l=v[0];l>=10;l/=10,m++);if(m<d)s-=d-m}h.e=s;h.c=v;return h}}();BigNumber.sum=function(){var e=1,a=arguments,p=new BigNumber(a[0]);for(;e<a.length;)p=p.plus(a[e++]);return p};p=function(){var e="0123456789";function toBaseOut(e,a,p,i){var t,o=[0],n,s=0,r=e.length;for(;s<r;){for(n=o.length;n--;o[n]*=a);o[0]+=i.indexOf(e.charAt(s++));for(t=0;t<o.length;t++){if(o[t]>p-1){if(o[t+1]==null)o[t+1]=0;o[t+1]+=o[t]/p|0;o[t]%=p}}}return o.reverse()}return function(p,i,t,o,n){var s,r,d,l,c,m,u,v,h=p.indexOf("."),b=x,w=g;if(h>=0){l=C;C=0;p=p.replace(".","");v=new BigNumber(i);m=v.pow(p.length-h);C=l;v.c=toBaseOut(toFixedPoint(coeffToString(m.c),m.e,"0"),10,t,e);v.e=v.c.length}u=toBaseOut(p,i,t,n?(s=E,e):(s=e,E));d=l=u.length;for(;u[--l]==0;u.pop());if(!u[0])return s.charAt(0);if(h<0){--d}else{m.c=u;m.e=d;m.s=o;m=a(m,v,b,w,t);u=m.c;c=m.r;d=m.e}r=d+b+1;h=u[r];l=t/2;c=c||r<0||u[r+1]!=null;c=w<4?(h!=null||c)&&(w==0||w==(m.s<0?3:2)):h>l||h==l&&(w==4||c||w==6&&u[r-1]&1||w==(m.s<0?8:7));if(r<1||!u[0]){p=c?toFixedPoint(s.charAt(1),-b,s.charAt(0)):s.charAt(0)}else{u.length=r;if(c){for(--t;++u[--r]>t;){u[r]=0;if(!r){++d;u=[1].concat(u)}}}for(l=u.length;!u[--l];);for(h=0,p="";h<=l;p+=s.charAt(u[h++]));p=toFixedPoint(p,d,s.charAt(0))}return p}}();a=function(){function multiply(e,a,p){var i,t,o,n,s=0,r=e.length,d=a%m,l=a/m|0;for(e=e.slice();r--;){o=e[r]%m;n=e[r]/m|0;i=l*o+n*d;t=d*o+i%m*m+s;s=(t/p|0)+(i/m|0)+l*n;e[r]=t%p}if(s)e=[s].concat(e);return e}function compare(e,a,p,i){var t,o;if(p!=i){o=p>i?1:-1}else{for(t=o=0;t<p;t++){if(e[t]!=a[t]){o=e[t]>a[t]?1:-1;break}}}return o}function subtract(e,a,p,i){var t=0;for(;p--;){e[p]-=t;t=e[p]<a[p]?1:0;e[p]=t*i+e[p]-a[p]}for(;!e[0]&&e.length>1;e.splice(0,1));}return function(e,a,p,i,t){var n,s,l,c,m,u,v,h,b,x,g,w,y,_,S,D,N,C=e.s==a.s?1:-1,T=e.c,E=a.c;if(!T||!T[0]||!E||!E[0]){return new BigNumber(!e.s||!a.s||(T?E&&T[0]==E[0]:!E)?NaN:T&&T[0]==0||!E?C*0:C/0)}h=new BigNumber(C);b=h.c=[];s=e.e-a.e;C=p+s+1;if(!t){t=r;s=bitFloor(e.e/d)-bitFloor(a.e/d);C=C/d|0}for(l=0;E[l]==(T[l]||0);l++);if(E[l]>(T[l]||0))s--;if(C<0){b.push(1);c=true}else{_=T.length;D=E.length;l=0;C+=2;m=o(t/(E[0]+1));if(m>1){E=multiply(E,m,t);T=multiply(T,m,t);D=E.length;_=T.length}y=D;x=T.slice(0,D);g=x.length;for(;g<D;x[g++]=0);N=E.slice();N=[0].concat(N);S=E[0];if(E[1]>=t/2)S++;do{m=0;n=compare(E,x,D,g);if(n<0){w=x[0];if(D!=g)w=w*t+(x[1]||0);m=o(w/S);if(m>1){if(m>=t)m=t-1;u=multiply(E,m,t);v=u.length;g=x.length;while(compare(u,x,v,g)==1){m--;subtract(u,D<v?N:E,v,t);v=u.length;n=1}}else{if(m==0){n=m=1}u=E.slice();v=u.length}if(v<g)u=[0].concat(u);subtract(x,u,g,t);g=x.length;if(n==-1){while(compare(E,x,D,g)<1){m++;subtract(x,D<g?N:E,g,t);g=x.length}}}else if(n===0){m++;x=[0]}b[l++]=m;if(x[0]){x[g++]=T[y]||0}else{x=[T[y]];g=1}}while((y++<_||x[0]!=null)&&C--);c=x[0]!=null;if(!b[0])b.splice(0,1)}if(t==r){for(l=1,C=b[0];C>=10;C/=10,l++);round(h,p+(h.e=l+s*d-1)+1,i,c)}else{h.e=s;h.r=+c}return h}}();function format(e,a,p,i){var t,o,n,s,r;if(p==null)p=g;else intCheck(p,0,8);if(!e.c)return e.toString();t=e.c[0];n=e.e;if(a==null){r=coeffToString(e.c);r=i==1||i==2&&(n<=w||n>=y)?toExponential(r,n):toFixedPoint(r,n,"0")}else{e=round(new BigNumber(e),a,p);o=e.e;r=coeffToString(e.c);s=r.length;if(i==1||i==2&&(a<=o||o<=w)){for(;s<a;r+="0",s++);r=toExponential(r,o)}else{a-=n;r=toFixedPoint(r,o,"0");if(o+1>s){if(--a>0)for(r+=".";a--;r+="0");}else{a+=o-s;if(a>0){if(o+1==s)r+=".";for(;a--;r+="0");}}}}return e.s<0&&t?"-"+r:r}function maxOrMin(e,a){var p,i,t=1,o=new BigNumber(e[0]);for(;t<e.length;t++){i=new BigNumber(e[t]);if(!i.s||(p=compare(o,i))===a||p===0&&o.s===a){o=i}}return o}function normalise(e,a,p){var i=1,t=a.length;for(;!a[--t];a.pop());for(t=a[0];t>=10;t/=10,i++);if((p=i+p*d-1)>S){e.c=e.e=null}else if(p<_){e.c=[e.e=0]}else{e.e=p;e.c=a}return e}v=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,a=/^([^.]+)\.$/,p=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,t=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,r,d){var l,c=r?s:s.replace(t,"");if(i.test(c)){o.s=isNaN(c)?null:c<0?-1:1}else{if(!r){c=c.replace(e,(function(e,a,p){l=(p=p.toLowerCase())=="x"?16:p=="b"?2:8;return!d||d==l?a:e}));if(d){l=d;c=c.replace(a,"$1").replace(p,"0.$1")}if(s!=c)return new BigNumber(c,l)}if(BigNumber.DEBUG){throw Error(n+"Not a"+(d?" base "+d:"")+" number: "+s)}o.s=null}o.c=o.e=null}}();function round(e,a,p,i){var n,s,l,m,u,v,h,b=e.c,x=c;if(b){e:{for(n=1,m=b[0];m>=10;m/=10,n++);s=a-n;if(s<0){s+=d;l=a;u=b[v=0];h=o(u/x[n-l-1]%10)}else{v=t((s+1)/d);if(v>=b.length){if(i){for(;b.length<=v;b.push(0));u=h=0;n=1;s%=d;l=s-d+1}else{break e}}else{u=m=b[v];for(n=1;m>=10;m/=10,n++);s%=d;l=s-d+n;h=l<0?0:o(u/x[n-l-1]%10)}}i=i||a<0||b[v+1]!=null||(l<0?u:u%x[n-l-1]);i=p<4?(h||i)&&(p==0||p==(e.s<0?3:2)):h>5||h==5&&(p==4||i||p==6&&(s>0?l>0?u/x[n-l]:0:b[v-1])%10&1||p==(e.s<0?8:7));if(a<1||!b[0]){b.length=0;if(i){a-=e.e+1;b[0]=x[(d-a%d)%d];e.e=-a||0}else{b[0]=e.e=0}return e}if(s==0){b.length=v;m=1;v--}else{b.length=v+1;m=x[d-s];b[v]=l>0?o(u/x[n-l]%x[l])*m:0}if(i){for(;;){if(v==0){for(s=1,l=b[0];l>=10;l/=10,s++);l=b[0]+=m;for(m=1;l>=10;l/=10,m++);if(s!=m){e.e++;if(b[0]==r)b[0]=1}break}else{b[v]+=m;if(b[v]!=r)break;b[v--]=0;m=1}}}for(s=b.length;b[--s]===0;b.pop());}if(e.e>S){e.c=e.e=null}else if(e.e<_){e.c=[e.e=0]}}return e}function valueOf(e){var a,p=e.e;if(p===null)return e.toString();a=coeffToString(e.c);a=p<=w||p>=y?toExponential(a,p):toFixedPoint(a,p,"0");return e.s<0?"-"+a:a}h.absoluteValue=h.abs=function(){var e=new BigNumber(this);if(e.s<0)e.s=1;return e};h.comparedTo=function(e,a){return compare(this,new BigNumber(e,a))};h.decimalPlaces=h.dp=function(e,a){var p,i,t,o=this;if(e!=null){intCheck(e,0,u);if(a==null)a=g;else intCheck(a,0,8);return round(new BigNumber(o),e+o.e+1,a)}if(!(p=o.c))return null;i=((t=p.length-1)-bitFloor(this.e/d))*d;if(t=p[t])for(;t%10==0;t/=10,i--);if(i<0)i=0;return i};h.dividedBy=h.div=function(e,p){return a(this,new BigNumber(e,p),x,g)};h.dividedToIntegerBy=h.idiv=function(e,p){return a(this,new BigNumber(e,p),0,1)};h.exponentiatedBy=h.pow=function(e,a){var p,i,s,r,l,c,m,u,v,h=this;e=new BigNumber(e);if(e.c&&!e.isInteger()){throw Error(n+"Exponent not an integer: "+valueOf(e))}if(a!=null)a=new BigNumber(a);c=e.e>14;if(!h.c||!h.c[0]||h.c[0]==1&&!h.e&&h.c.length==1||!e.c||!e.c[0]){v=new BigNumber(Math.pow(+valueOf(h),c?e.s*(2-isOdd(e)):+valueOf(e)));return a?v.mod(a):v}m=e.s<0;if(a){if(a.c?!a.c[0]:!a.s)return new BigNumber(NaN);i=!m&&h.isInteger()&&a.isInteger();if(i)h=h.mod(a)}else if(e.e>9&&(h.e>0||h.e<-1||(h.e==0?h.c[0]>1||c&&h.c[1]>=24e7:h.c[0]<8e13||c&&h.c[0]<=9999975e7))){r=h.s<0&&isOdd(e)?-0:0;if(h.e>-1)r=1/r;return new BigNumber(m?1/r:r)}else if(C){r=t(C/d+2)}if(c){p=new BigNumber(.5);if(m)e.s=1;u=isOdd(e)}else{s=Math.abs(+valueOf(e));u=s%2}v=new BigNumber(b);for(;;){if(u){v=v.times(h);if(!v.c)break;if(r){if(v.c.length>r)v.c.length=r}else if(i){v=v.mod(a)}}if(s){s=o(s/2);if(s===0)break;u=s%2}else{e=e.times(p);round(e,e.e+1,1);if(e.e>14){u=isOdd(e)}else{s=+valueOf(e);if(s===0)break;u=s%2}}h=h.times(h);if(r){if(h.c&&h.c.length>r)h.c.length=r}else if(i){h=h.mod(a)}}if(i)return v;if(m)v=b.div(v);return a?v.mod(a):r?round(v,C,g,l):v};h.integerValue=function(e){var a=new BigNumber(this);if(e==null)e=g;else intCheck(e,0,8);return round(a,a.e+1,e)};h.isEqualTo=h.eq=function(e,a){return compare(this,new BigNumber(e,a))===0};h.isFinite=function(){return!!this.c};h.isGreaterThan=h.gt=function(e,a){return compare(this,new BigNumber(e,a))>0};h.isGreaterThanOrEqualTo=h.gte=function(e,a){return(a=compare(this,new BigNumber(e,a)))===1||a===0};h.isInteger=function(){return!!this.c&&bitFloor(this.e/d)>this.c.length-2};h.isLessThan=h.lt=function(e,a){return compare(this,new BigNumber(e,a))<0};h.isLessThanOrEqualTo=h.lte=function(e,a){return(a=compare(this,new BigNumber(e,a)))===-1||a===0};h.isNaN=function(){return!this.s};h.isNegative=function(){return this.s<0};h.isPositive=function(){return this.s>0};h.isZero=function(){return!!this.c&&this.c[0]==0};h.minus=function(e,a){var p,i,t,o,n=this,s=n.s;e=new BigNumber(e,a);a=e.s;if(!s||!a)return new BigNumber(NaN);if(s!=a){e.s=-a;return n.plus(e)}var l=n.e/d,c=e.e/d,m=n.c,u=e.c;if(!l||!c){if(!m||!u)return m?(e.s=-a,e):new BigNumber(u?n:NaN);if(!m[0]||!u[0]){return u[0]?(e.s=-a,e):new BigNumber(m[0]?n:g==3?-0:0)}}l=bitFloor(l);c=bitFloor(c);m=m.slice();if(s=l-c){if(o=s<0){s=-s;t=m}else{c=l;t=u}t.reverse();for(a=s;a--;t.push(0));t.reverse()}else{i=(o=(s=m.length)<(a=u.length))?s:a;for(s=a=0;a<i;a++){if(m[a]!=u[a]){o=m[a]<u[a];break}}}if(o){t=m;m=u;u=t;e.s=-e.s}a=(i=u.length)-(p=m.length);if(a>0)for(;a--;m[p++]=0);a=r-1;for(;i>s;){if(m[--i]<u[i]){for(p=i;p&&!m[--p];m[p]=a);--m[p];m[i]+=r}m[i]-=u[i]}for(;m[0]==0;m.splice(0,1),--c);if(!m[0]){e.s=g==3?-1:1;e.c=[e.e=0];return e}return normalise(e,m,c)};h.modulo=h.mod=function(e,p){var i,t,o=this;e=new BigNumber(e,p);if(!o.c||!e.s||e.c&&!e.c[0]){return new BigNumber(NaN)}else if(!e.c||o.c&&!o.c[0]){return new BigNumber(o)}if(N==9){t=e.s;e.s=1;i=a(o,e,0,3);e.s=t;i.s*=t}else{i=a(o,e,0,N)}e=o.minus(i.times(e));if(!e.c[0]&&N==1)e.s=o.s;return e};h.multipliedBy=h.times=function(e,a){var p,i,t,o,n,s,l,c,u,v,h,b,x,g,w,y=this,_=y.c,S=(e=new BigNumber(e,a)).c;if(!_||!S||!_[0]||!S[0]){if(!y.s||!e.s||_&&!_[0]&&!S||S&&!S[0]&&!_){e.c=e.e=e.s=null}else{e.s*=y.s;if(!_||!S){e.c=e.e=null}else{e.c=[0];e.e=0}}return e}i=bitFloor(y.e/d)+bitFloor(e.e/d);e.s*=y.s;l=_.length;v=S.length;if(l<v){x=_;_=S;S=x;t=l;l=v;v=t}for(t=l+v,x=[];t--;x.push(0));g=r;w=m;for(t=v;--t>=0;){p=0;h=S[t]%w;b=S[t]/w|0;for(n=l,o=t+n;o>t;){c=_[--n]%w;u=_[n]/w|0;s=b*c+u*h;c=h*c+s%w*w+x[o]+p;p=(c/g|0)+(s/w|0)+b*u;x[o--]=c%g}x[o]=p}if(p){++i}else{x.splice(0,1)}return normalise(e,x,i)};h.negated=function(){var e=new BigNumber(this);e.s=-e.s||null;return e};h.plus=function(e,a){var p,i=this,t=i.s;e=new BigNumber(e,a);a=e.s;if(!t||!a)return new BigNumber(NaN);if(t!=a){e.s=-a;return i.minus(e)}var o=i.e/d,n=e.e/d,s=i.c,l=e.c;if(!o||!n){if(!s||!l)return new BigNumber(t/0);if(!s[0]||!l[0])return l[0]?e:new BigNumber(s[0]?i:t*0)}o=bitFloor(o);n=bitFloor(n);s=s.slice();if(t=o-n){if(t>0){n=o;p=l}else{t=-t;p=s}p.reverse();for(;t--;p.push(0));p.reverse()}t=s.length;a=l.length;if(t-a<0){p=l;l=s;s=p;a=t}for(t=0;a;){t=(s[--a]=s[a]+l[a]+t)/r|0;s[a]=r===s[a]?0:s[a]%r}if(t){s=[t].concat(s);++n}return normalise(e,s,n)};h.precision=h.sd=function(e,a){var p,i,t,o=this;if(e!=null&&e!==!!e){intCheck(e,1,u);if(a==null)a=g;else intCheck(a,0,8);return round(new BigNumber(o),e,a)}if(!(p=o.c))return null;t=p.length-1;i=t*d+1;if(t=p[t]){for(;t%10==0;t/=10,i--);for(t=p[0];t>=10;t/=10,i++);}if(e&&o.e+1>i)i=o.e+1;return i};h.shiftedBy=function(e){intCheck(e,-l,l);return this.times("1e"+e)};h.squareRoot=h.sqrt=function(){var e,p,i,t,o,n=this,s=n.c,r=n.s,d=n.e,l=x+4,c=new BigNumber("0.5");if(r!==1||!s||!s[0]){return new BigNumber(!r||r<0&&(!s||s[0])?NaN:s?n:1/0)}r=Math.sqrt(+valueOf(n));if(r==0||r==1/0){p=coeffToString(s);if((p.length+d)%2==0)p+="0";r=Math.sqrt(+p);d=bitFloor((d+1)/2)-(d<0||d%2);if(r==1/0){p="5e"+d}else{p=r.toExponential();p=p.slice(0,p.indexOf("e")+1)+d}i=new BigNumber(p)}else{i=new BigNumber(r+"")}if(i.c[0]){d=i.e;r=d+l;if(r<3)r=0;for(;;){o=i;i=c.times(o.plus(a(n,o,l,1)));if(coeffToString(o.c).slice(0,r)===(p=coeffToString(i.c)).slice(0,r)){if(i.e<d)--r;p=p.slice(r-3,r+1);if(p=="9999"||!t&&p=="4999"){if(!t){round(o,o.e+x+2,0);if(o.times(o).eq(n)){i=o;break}}l+=4;r+=4;t=1}else{if(!+p||!+p.slice(1)&&p.charAt(0)=="5"){round(i,i.e+x+2,1);e=!i.times(i).eq(n)}break}}}}return round(i,i.e+x+1,g,e)};h.toExponential=function(e,a){if(e!=null){intCheck(e,0,u);e++}return format(this,e,a,1)};h.toFixed=function(e,a){if(e!=null){intCheck(e,0,u);e=e+this.e+1}return format(this,e,a)};h.toFormat=function(e,a,p){var i,t=this;if(p==null){if(e!=null&&a&&typeof a=="object"){p=a;a=null}else if(e&&typeof e=="object"){p=e;e=a=null}else{p=T}}else if(typeof p!="object"){throw Error(n+"Argument not an object: "+p)}i=t.toFixed(e,a);if(t.c){var o,s=i.split("."),r=+p.groupSize,d=+p.secondaryGroupSize,l=p.groupSeparator||"",c=s[0],m=s[1],u=t.s<0,v=u?c.slice(1):c,h=v.length;if(d){o=r;r=d;d=o;h-=o}if(r>0&&h>0){o=h%r||r;c=v.substr(0,o);for(;o<h;o+=r)c+=l+v.substr(o,r);if(d>0)c+=l+v.slice(o);if(u)c="-"+c}i=m?c+(p.decimalSeparator||"")+((d=+p.fractionGroupSize)?m.replace(new RegExp("\\d{"+d+"}\\B","g"),"$&"+(p.fractionGroupSeparator||"")):m):c}return(p.prefix||"")+i+(p.suffix||"")};h.toFraction=function(e){var p,i,t,o,s,r,l,m,u,v,h,x,w=this,y=w.c;if(e!=null){l=new BigNumber(e);if(!l.isInteger()&&(l.c||l.s!==1)||l.lt(b)){throw Error(n+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+valueOf(l))}}if(!y)return new BigNumber(w);p=new BigNumber(b);u=i=new BigNumber(b);t=m=new BigNumber(b);x=coeffToString(y);s=p.e=x.length-w.e-1;p.c[0]=c[(r=s%d)<0?d+r:r];e=!e||l.comparedTo(p)>0?s>0?p:u:l;r=S;S=1/0;l=new BigNumber(x);m.c[0]=0;for(;;){v=a(l,p,0,1);o=i.plus(v.times(t));if(o.comparedTo(e)==1)break;i=t;t=o;u=m.plus(v.times(o=u));m=o;p=l.minus(v.times(o=p));l=o}o=a(e.minus(i),t,0,1);m=m.plus(o.times(u));i=i.plus(o.times(t));m.s=u.s=w.s;s=s*2;h=a(u,t,s,g).minus(w).abs().comparedTo(a(m,i,s,g).minus(w).abs())<1?[u,t]:[m,i];S=r;return h};h.toNumber=function(){return+valueOf(this)};h.toPrecision=function(e,a){if(e!=null)intCheck(e,1,u);return format(this,e,a,2)};h.toString=function(e){var a,i=this,t=i.s,o=i.e;if(o===null){if(t){a="Infinity";if(t<0)a="-"+a}else{a="NaN"}}else{if(e==null){a=o<=w||o>=y?toExponential(coeffToString(i.c),o):toFixedPoint(coeffToString(i.c),o,"0")}else if(e===10&&A){i=round(new BigNumber(i),x+o+1,g);a=toFixedPoint(coeffToString(i.c),i.e,"0")}else{intCheck(e,2,E.length,"Base");a=p(toFixedPoint(coeffToString(i.c),o,"0"),10,e,t,true)}if(t<0&&i.c[0])a="-"+a}return a};h.valueOf=h.toJSON=function(){return valueOf(this)};h._isBigNumber=true;if(e!=null)BigNumber.set(e);return BigNumber}function bitFloor(e){var a=e|0;return e>0||e===a?a:a-1}function coeffToString(e){var a,p,i=1,t=e.length,o=e[0]+"";for(;i<t;){a=e[i++]+"";p=d-a.length;for(;p--;a="0"+a);o+=a}for(t=o.length;o.charCodeAt(--t)===48;);return o.slice(0,t+1||1)}function compare(e,a){var p,i,t=e.c,o=a.c,n=e.s,s=a.s,r=e.e,d=a.e;if(!n||!s)return null;p=t&&!t[0];i=o&&!o[0];if(p||i)return p?i?0:-s:n;if(n!=s)return n;p=n<0;i=r==d;if(!t||!o)return i?0:!t^p?1:-1;if(!i)return r>d^p?1:-1;s=(r=t.length)<(d=o.length)?r:d;for(n=0;n<s;n++)if(t[n]!=o[n])return t[n]>o[n]^p?1:-1;return r==d?0:r>d^p?1:-1}function intCheck(e,a,p,i){if(e<a||e>p||e!==o(e)){throw Error(n+(i||"Argument")+(typeof e=="number"?e<a||e>p?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}}function isOdd(e){var a=e.c.length-1;return bitFloor(e.e/d)==a&&e.c[a]%2!=0}function toExponential(e,a){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(a<0?"e":"e+")+a}function toFixedPoint(e,a,p){var i,t;if(a<0){for(t=p+".";++a;t+=p);e=t+e}else{i=e.length;if(++a>i){for(t=p,a-=i;--a;t+=p);e+=t}else if(a<i){e=e.slice(0,a)+"."+e.slice(a)}}return e}p=clone();p["default"]=p.BigNumber=p;if(typeof define=="function"&&define.amd){define((function(){return p}))}else if(true&&e.exports){e.exports=p}else{if(!a){a=typeof self!="undefined"&&self?self:window}a.BigNumber=p}})(this)},9227:(e,a,p)=>{"use strict";var i=p(8334);var t=p(4177);var o=p(2808);var n=p(8309);e.exports=n||i.call(o,t)},4177:e=>{"use strict";e.exports=Function.prototype.apply},2808:e=>{"use strict";e.exports=Function.prototype.call},6815:(e,a,p)=>{"use strict";var i=p(8334);var t=p(6361);var o=p(2808);var n=p(9227);e.exports=function callBindBasic(e){if(e.length<1||typeof e[0]!=="function"){throw new t("a function is required")}return n(i,o,e)}},8309:e=>{"use strict";e.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply},5443:(e,a,p)=>{var i=p(3837);var t=p(2781).Stream;var o=p(8611);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}i.inherits(CombinedStream,t);CombinedStream.create=function(e){var a=new this;e=e||{};for(var p in e){a[p]=e[p]}return a};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var a=CombinedStream.isStreamLike(e);if(a){if(!(e instanceof o)){var p=o.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=p}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,a){t.prototype.pipe.call(this,e,a);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var a=e;a(function(e){var a=CombinedStream.isStreamLike(e);if(a){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var a=CombinedStream.isStreamLike(e);if(a){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var p=e;this.write(p);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var a=this;e.on("error",(function(e){a._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};CombinedStream.prototype.end=function(){this._reset();this.emit("end")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(a){if(!a.dataSize){return}e.dataSize+=a.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},4697:e=>{var a=1e3;var p=a*60;var i=p*60;var t=i*24;var o=t*7;var n=t*365.25;e.exports=function(e,a){a=a||{};var p=typeof e;if(p==="string"&&e.length>0){return parse(e)}else if(p==="number"&&isFinite(e)){return a.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s){return}var r=parseFloat(s[1]);var d=(s[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return r*n;case"weeks":case"week":case"w":return r*o;case"days":case"day":case"d":return r*t;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*p;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return undefined}}function fmtShort(e){var o=Math.abs(e);if(o>=t){return Math.round(e/t)+"d"}if(o>=i){return Math.round(e/i)+"h"}if(o>=p){return Math.round(e/p)+"m"}if(o>=a){return Math.round(e/a)+"s"}return e+"ms"}function fmtLong(e){var o=Math.abs(e);if(o>=t){return plural(e,o,t,"day")}if(o>=i){return plural(e,o,i,"hour")}if(o>=p){return plural(e,o,p,"minute")}if(o>=a){return plural(e,o,a,"second")}return e+" ms"}function plural(e,a,p,i){var t=a>=p*1.5;return Math.round(e/p)+" "+i+(t?"s":"")}},8222:(e,a,p)=>{a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.storage=localstorage();a.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let e;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(a){a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const p="color: "+this.color;a.splice(1,0,p,"color: inherit");let i=0;let t=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}i++;if(e==="%c"){t=i}}));a.splice(t,0,p)}a.log=console.debug||console.log||(()=>{});function save(e){try{if(e){a.storage.setItem("debug",e)}else{a.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=a.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=p(6243)(a);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},6243:(e,a,p)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=p(4697);createDebug.destroy=destroy;Object.keys(e).forEach((a=>{createDebug[a]=e[a]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let a=0;for(let p=0;p<e.length;p++){a=(a<<5)-a+e.charCodeAt(p);a|=0}return createDebug.colors[Math.abs(a)%createDebug.colors.length]}createDebug.selectColor=selectColor;function createDebug(e){let a;let p=null;let i;let t;function debug(...e){if(!debug.enabled){return}const p=debug;const i=Number(new Date);const t=i-(a||i);p.diff=t;p.prev=a;p.curr=i;a=i;e[0]=createDebug.coerce(e[0]);if(typeof e[0]!=="string"){e.unshift("%O")}let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((a,i)=>{if(a==="%%"){return"%"}o++;const t=createDebug.formatters[i];if(typeof t==="function"){const i=e[o];a=t.call(p,i);e.splice(o,1);o--}return a}));createDebug.formatArgs.call(p,e);const n=p.log||createDebug.log;n.apply(p,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(p!==null){return p}if(i!==createDebug.namespaces){i=createDebug.namespaces;t=createDebug.enabled(e)}return t},set:e=>{p=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,a){const p=createDebug(this.namespace+(typeof a==="undefined"?":":a)+e);p.log=this.log;return p}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let a;const p=(typeof e==="string"?e:"").split(/[\s,]+/);const i=p.length;for(a=0;a<i;a++){if(!p[a]){continue}e=p[a].replace(/\*/g,".*?");if(e[0]==="-"){createDebug.skips.push(new RegExp("^"+e.slice(1)+"$"))}else{createDebug.names.push(new RegExp("^"+e+"$"))}}}function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let a;let p;for(a=0,p=createDebug.skips.length;a<p;a++){if(createDebug.skips[a].test(e)){return false}}for(a=0,p=createDebug.names.length;a<p;a++){if(createDebug.names[a].test(e)){return true}}return false}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},8237:(e,a,p)=>{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=p(8222)}else{e.exports=p(5332)}},5332:(e,a,p)=>{const i=p(6224);const t=p(3837);a.init=init;a.log=log;a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.destroy=t.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");a.colors=[6,2,3,4,5,1];try{const e=p(9318);if(e&&(e.stderr||e).level>=2){a.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}a.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,a)=>{const p=a.substring(6).toLowerCase().replace(/_([a-z])/g,((e,a)=>a.toUpperCase()));let i=process.env[a];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[p]=i;return e}),{});function useColors(){return"colors"in a.inspectOpts?Boolean(a.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(a){const{namespace:p,useColors:i}=this;if(i){const i=this.color;const t="[3"+(i<8?i:"8;5;"+i);const o=` ${t};1m${p} `;a[0]=o+a[0].split("\n").join("\n"+o);a.push(t+"m+"+e.exports.humanize(this.diff)+"")}else{a[0]=getDate()+p+" "+a[0]}}function getDate(){if(a.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(t.formatWithOptions(a.inspectOpts,...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const p=Object.keys(a.inspectOpts);for(let i=0;i<p.length;i++){e.inspectOpts[p[i]]=a.inspectOpts[p[i]]}}e.exports=p(6243)(a);const{formatters:o}=e.exports;o.o=function(e){this.inspectOpts.colors=this.useColors;return t.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")};o.O=function(e){this.inspectOpts.colors=this.useColors;return t.inspect(e,this.inspectOpts)}},8611:(e,a,p)=>{var i=p(2781).Stream;var t=p(3837);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}t.inherits(DelayedStream,i);DelayedStream.create=function(e,a){var p=new this;a=a||{};for(var i in a){p[i]=a[i]}p.source=e;var t=e.emit;e.emit=function(){p._handleEmit(arguments);return t.apply(e,arguments)};e.on("error",(function(){}));if(p.pauseStream){e.pause()}return p};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=i.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},2693:(e,a,p)=>{"use strict";var i=p(6815);var t=p(4709);var o;try{o=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS"){throw e}}var n=!!o&&t&&t(Object.prototype,"__proto__");var s=Object;var r=s.getPrototypeOf;e.exports=n&&typeof n.get==="function"?i([n.get]):typeof r==="function"?function getDunder(e){return r(e==null?e:s(e))}:false},9185:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},4709:(e,a,p)=>{"use strict";var i=p(9185);if(i){try{i([],"length")}catch(e){i=null}}e.exports=i},8685:(e,a,p)=>{"use strict";var i=p(7813);e.exports.O=convert;function convert(e,a,p){p=checkEncoding(p||"UTF-8");a=checkEncoding(a||"UTF-8");e=e||"";var i;if(p!=="UTF-8"&&typeof e==="string"){e=Buffer.from(e,"binary")}if(p===a){if(typeof e==="string"){i=Buffer.from(e)}else{i=e}}else{try{i=convertIconvLite(e,a,p)}catch(a){console.error(a);i=e}}if(typeof i==="string"){i=Buffer.from(i,"utf-8")}return i}function convertIconvLite(e,a,p){if(a==="UTF-8"){return i.decode(e,p)}else if(p==="UTF-8"){return i.encode(e,a)}else{return i.encode(i.decode(e,p),a)}}function checkEncoding(e){return(e||"").toString().trim().replace(/^latin[\-_]?(\d+)$/i,"ISO-8859-$1").replace(/^win(?:dows)?[\-_]?(\d+)$/i,"WINDOWS-$1").replace(/^utf[\-_]?(\d+)$/i,"UTF-$1").replace(/^ks_c_5601\-1987$/i,"CP949").replace(/^us[\-_]?ascii$/i,"ASCII").toUpperCase()}},8810:(e,a,p)=>{"use strict";var i=p(5118).Buffer;a._dbcs=DBCSCodec;var t=-1,o=-2,n=-10,s=-1e3,r=new Array(256),d=-1;for(var l=0;l<256;l++)r[l]=t;function DBCSCodec(e,a){this.encodingName=e.encodingName;if(!e)throw new Error("DBCS codec is called without the data.");if(!e.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var p=e.table();this.decodeTables=[];this.decodeTables[0]=r.slice(0);this.decodeTableSeq=[];for(var i=0;i<p.length;i++)this._addDecodeChunk(p[i]);if(typeof e.gb18030==="function"){this.gb18030=e.gb18030();var n=this.decodeTables.length;this.decodeTables.push(r.slice(0));var d=this.decodeTables.length;this.decodeTables.push(r.slice(0));var l=this.decodeTables[0];for(var i=129;i<=254;i++){var c=this.decodeTables[s-l[i]];for(var m=48;m<=57;m++){if(c[m]===t){c[m]=s-n}else if(c[m]>s){throw new Error("gb18030 decode tables conflict at byte 2")}var u=this.decodeTables[s-c[m]];for(var v=129;v<=254;v++){if(u[v]===t){u[v]=s-d}else if(u[v]===s-d){continue}else if(u[v]>s){throw new Error("gb18030 decode tables conflict at byte 3")}var h=this.decodeTables[s-u[v]];for(var b=48;b<=57;b++){if(h[b]===t)h[b]=o}}}}}this.defaultCharUnicode=a.defaultCharUnicode;this.encodeTable=[];this.encodeTableSeq=[];var x={};if(e.encodeSkipVals)for(var i=0;i<e.encodeSkipVals.length;i++){var g=e.encodeSkipVals[i];if(typeof g==="number")x[g]=true;else for(var m=g.from;m<=g.to;m++)x[m]=true}this._fillEncodeTable(0,0,x);if(e.encodeAdd){for(var w in e.encodeAdd)if(Object.prototype.hasOwnProperty.call(e.encodeAdd,w))this._setEncodeChar(w.charCodeAt(0),e.encodeAdd[w])}this.defCharSB=this.encodeTable[0][a.defaultCharSingleByte.charCodeAt(0)];if(this.defCharSB===t)this.defCharSB=this.encodeTable[0]["?"];if(this.defCharSB===t)this.defCharSB="?".charCodeAt(0)}DBCSCodec.prototype.encoder=DBCSEncoder;DBCSCodec.prototype.decoder=DBCSDecoder;DBCSCodec.prototype._getDecodeTrieNode=function(e){var a=[];for(;e>0;e>>>=8)a.push(e&255);if(a.length==0)a.push(0);var p=this.decodeTables[0];for(var i=a.length-1;i>0;i--){var o=p[a[i]];if(o==t){p[a[i]]=s-this.decodeTables.length;this.decodeTables.push(p=r.slice(0))}else if(o<=s){p=this.decodeTables[s-o]}else throw new Error("Overwrite byte in "+this.encodingName+", addr: "+e.toString(16))}return p};DBCSCodec.prototype._addDecodeChunk=function(e){var a=parseInt(e[0],16);var p=this._getDecodeTrieNode(a);a=a&255;for(var i=1;i<e.length;i++){var t=e[i];if(typeof t==="string"){for(var o=0;o<t.length;){var s=t.charCodeAt(o++);if(55296<=s&&s<56320){var r=t.charCodeAt(o++);if(56320<=r&&r<57344)p[a++]=65536+(s-55296)*1024+(r-56320);else throw new Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+e[0])}else if(4080<s&&s<=4095){var d=4095-s+2;var l=[];for(var c=0;c<d;c++)l.push(t.charCodeAt(o++));p[a++]=n-this.decodeTableSeq.length;this.decodeTableSeq.push(l)}else p[a++]=s}}else if(typeof t==="number"){var m=p[a-1]+1;for(var o=0;o<t;o++)p[a++]=m++}else throw new Error("Incorrect type '"+typeof t+"' given in "+this.encodingName+" at chunk "+e[0])}if(a>255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+e[0]+": too long"+a)};DBCSCodec.prototype._getEncodeBucket=function(e){var a=e>>8;if(this.encodeTable[a]===undefined)this.encodeTable[a]=r.slice(0);return this.encodeTable[a]};DBCSCodec.prototype._setEncodeChar=function(e,a){var p=this._getEncodeBucket(e);var i=e&255;if(p[i]<=n)this.encodeTableSeq[n-p[i]][d]=a;else if(p[i]==t)p[i]=a};DBCSCodec.prototype._setEncodeSequence=function(e,a){var p=e[0];var i=this._getEncodeBucket(p);var o=p&255;var s;if(i[o]<=n){s=this.encodeTableSeq[n-i[o]]}else{s={};if(i[o]!==t)s[d]=i[o];i[o]=n-this.encodeTableSeq.length;this.encodeTableSeq.push(s)}for(var r=1;r<e.length-1;r++){var l=s[p];if(typeof l==="object")s=l;else{s=s[p]={};if(l!==undefined)s[d]=l}}p=e[e.length-1];s[p]=a};DBCSCodec.prototype._fillEncodeTable=function(e,a,p){var i=this.decodeTables[e];var t=false;var o={};for(var r=0;r<256;r++){var d=i[r];var l=a+r;if(p[l])continue;if(d>=0){this._setEncodeChar(d,l);t=true}else if(d<=s){var c=s-d;if(!o[c]){var m=l<<8>>>0;if(this._fillEncodeTable(c,m,p))t=true;else o[c]=true}}else if(d<=n){this._setEncodeSequence(this.decodeTableSeq[n-d],l);t=true}}return t};function DBCSEncoder(e,a){this.leadSurrogate=-1;this.seqObj=undefined;this.encodeTable=a.encodeTable;this.encodeTableSeq=a.encodeTableSeq;this.defaultCharSingleByte=a.defCharSB;this.gb18030=a.gb18030}DBCSEncoder.prototype.write=function(e){var a=i.alloc(e.length*(this.gb18030?4:3)),p=this.leadSurrogate,o=this.seqObj,s=-1,r=0,l=0;while(true){if(s===-1){if(r==e.length)break;var c=e.charCodeAt(r++)}else{var c=s;s=-1}if(55296<=c&&c<57344){if(c<56320){if(p===-1){p=c;continue}else{p=c;c=t}}else{if(p!==-1){c=65536+(p-55296)*1024+(c-56320);p=-1}else{c=t}}}else if(p!==-1){s=c;c=t;p=-1}var m=t;if(o!==undefined&&c!=t){var u=o[c];if(typeof u==="object"){o=u;continue}else if(typeof u=="number"){m=u}else if(u==undefined){u=o[d];if(u!==undefined){m=u;s=c}else{}}o=undefined}else if(c>=0){var v=this.encodeTable[c>>8];if(v!==undefined)m=v[c&255];if(m<=n){o=this.encodeTableSeq[n-m];continue}if(m==t&&this.gb18030){var h=findIdx(this.gb18030.uChars,c);if(h!=-1){var m=this.gb18030.gbChars[h]+(c-this.gb18030.uChars[h]);a[l++]=129+Math.floor(m/12600);m=m%12600;a[l++]=48+Math.floor(m/1260);m=m%1260;a[l++]=129+Math.floor(m/10);m=m%10;a[l++]=48+m;continue}}}if(m===t)m=this.defaultCharSingleByte;if(m<256){a[l++]=m}else if(m<65536){a[l++]=m>>8;a[l++]=m&255}else if(m<16777216){a[l++]=m>>16;a[l++]=m>>8&255;a[l++]=m&255}else{a[l++]=m>>>24;a[l++]=m>>>16&255;a[l++]=m>>>8&255;a[l++]=m&255}}this.seqObj=o;this.leadSurrogate=p;return a.slice(0,l)};DBCSEncoder.prototype.end=function(){if(this.leadSurrogate===-1&&this.seqObj===undefined)return;var e=i.alloc(10),a=0;if(this.seqObj){var p=this.seqObj[d];if(p!==undefined){if(p<256){e[a++]=p}else{e[a++]=p>>8;e[a++]=p&255}}else{}this.seqObj=undefined}if(this.leadSurrogate!==-1){e[a++]=this.defaultCharSingleByte;this.leadSurrogate=-1}return e.slice(0,a)};DBCSEncoder.prototype.findIdx=findIdx;function DBCSDecoder(e,a){this.nodeIdx=0;this.prevBytes=[];this.decodeTables=a.decodeTables;this.decodeTableSeq=a.decodeTableSeq;this.defaultCharUnicode=a.defaultCharUnicode;this.gb18030=a.gb18030}DBCSDecoder.prototype.write=function(e){var a=i.alloc(e.length*2),p=this.nodeIdx,r=this.prevBytes,d=this.prevBytes.length,l=-this.prevBytes.length,c;for(var m=0,u=0;m<e.length;m++){var v=m>=0?e[m]:r[m+d];var c=this.decodeTables[p][v];if(c>=0){}else if(c===t){c=this.defaultCharUnicode.charCodeAt(0);m=l}else if(c===o){if(m>=3){var h=(e[m-3]-129)*12600+(e[m-2]-48)*1260+(e[m-1]-129)*10+(v-48)}else{var h=(r[m-3+d]-129)*12600+((m-2>=0?e[m-2]:r[m-2+d])-48)*1260+((m-1>=0?e[m-1]:r[m-1+d])-129)*10+(v-48)}var b=findIdx(this.gb18030.gbChars,h);c=this.gb18030.uChars[b]+h-this.gb18030.gbChars[b]}else if(c<=s){p=s-c;continue}else if(c<=n){var x=this.decodeTableSeq[n-c];for(var g=0;g<x.length-1;g++){c=x[g];a[u++]=c&255;a[u++]=c>>8}c=x[x.length-1]}else throw new Error("iconv-lite internal error: invalid decoding table value "+c+" at "+p+"/"+v);if(c>=65536){c-=65536;var w=55296|c>>10;a[u++]=w&255;a[u++]=w>>8;c=56320|c&1023}a[u++]=c&255;a[u++]=c>>8;p=0;l=m+1}this.nodeIdx=p;this.prevBytes=l>=0?Array.prototype.slice.call(e,l):r.slice(l+d).concat(Array.prototype.slice.call(e));return a.slice(0,u).toString("ucs2")};DBCSDecoder.prototype.end=function(){var e="";while(this.prevBytes.length>0){e+=this.defaultCharUnicode;var a=this.prevBytes.slice(1);this.prevBytes=[];this.nodeIdx=0;if(a.length>0)e+=this.write(a)}this.prevBytes=[];this.nodeIdx=0;return e};function findIdx(e,a){if(e[0]>a)return-1;var p=0,i=e.length;while(p<i-1){var t=p+(i-p+1>>1);if(e[t]<=a)p=t;else i=t}return p}},6:(e,a,p)=>{"use strict";e.exports={shiftjis:{type:"_dbcs",table:function(){return p(4965)},encodeAdd:{"¥":92,"‾":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return p(9750)},encodeAdd:{"¥":92,"‾":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return p(4904)}},gbk:{type:"_dbcs",table:function(){return p(4904).concat(p(9429))}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return p(4904).concat(p(9429))},gb18030:function(){return p(5893)},encodeSkipVals:[128],encodeAdd:{"€":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return p(3940)}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return p(7507)}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return p(7507).concat(p(3768))},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}},9541:(e,a,p)=>{"use strict";var i=[p(934),p(4927),p(8787),p(6208),p(4899),p(7132),p(1664),p(8810),p(6)];for(var t=0;t<i.length;t++){var o=i[t];for(var n in o)if(Object.prototype.hasOwnProperty.call(o,n))a[n]=o[n]}},934:(e,a,p)=>{"use strict";var i=p(5118).Buffer;e.exports={utf8:{type:"_internal",bomAware:true},cesu8:{type:"_internal",bomAware:true},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:true},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:InternalCodec};function InternalCodec(e,a){this.enc=e.encodingName;this.bomAware=e.bomAware;if(this.enc==="base64")this.encoder=InternalEncoderBase64;else if(this.enc==="cesu8"){this.enc="utf8";this.encoder=InternalEncoderCesu8;if(i.from("eda0bdedb2a9","hex").toString()!=="💩"){this.decoder=InternalDecoderCesu8;this.defaultCharUnicode=a.defaultCharUnicode}}}InternalCodec.prototype.encoder=Intern