nfets 0.0.94 → 0.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -96,7 +96,7 @@ Char: `+N.c),S=new Error(S),N.error=S,K(N,"onerror",S),N}o(pe,"error");function
96
96
  Actual: `+N.attribValue);else if(P==="xmlns"&&N.attribValue!==v)Y(N,"xmlns: prefix must be bound to "+v+`
97
97
  Actual: `+N.attribValue);else{var Ee=N.tag,Ce=N.tags[N.tags.length-1]||N;Ee.ns===Ce.ns&&(Ee.ns=Object.create(Ce.ns)),Ee.ns[P]=N.attribValue}N.attribList.push([N.attribName,N.attribValue])}else N.tag.attributes[N.attribName]=N.attribValue,q(N,"onattribute",{name:N.attribName,value:N.attribValue});N.attribName=N.attribValue=""}o(ze,"attrib");function ne(N,S){if(N.opt.xmlns){var G=N.tag,P=Oe(N.tagName);G.prefix=P.prefix,G.local=P.local,G.uri=G.ns[P.prefix]||"",G.prefix&&!G.uri&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(N.tagName)),G.uri=P.prefix);var Ee=N.tags[N.tags.length-1]||N;G.ns&&Ee.ns!==G.ns&&Object.keys(G.ns).forEach(function(Bn){q(N,"onopennamespace",{prefix:Bn,uri:G.ns[Bn]})});for(var Ce=0,Ae=N.attribList.length;Ce<Ae;Ce++){var Je=N.attribList[Ce],Tt=Je[0],Me=Je[1],Et=Oe(Tt,!0),tn=Et.prefix,Ye=Et.local,Or=tn===""?"":G.ns[tn]||"",Yr={name:Tt,value:Me,prefix:tn,local:Ye,uri:Or};tn&&tn!=="xmlns"&&!Or&&(Y(N,"Unbound namespace prefix: "+JSON.stringify(tn)),Yr.uri=tn),N.tag.attributes[Tt]=Yr,q(N,"onattribute",Yr)}N.attribList.length=0}N.tag.isSelfClosing=!!S,N.sawRoot=!0,N.tags.push(N.tag),q(N,"onopentag",N.tag),S||(!N.noscript&&N.tagName.toLowerCase()==="script"?N.state=I.SCRIPT:N.state=I.TEXT,N.tag=null,N.tagName=""),N.attribName=N.attribValue="",N.attribList.length=0}o(ne,"openTag");function Z(N){if(!N.tagName){Y(N,"Weird empty close tag."),N.textNode+="</>",N.state=I.TEXT;return}if(N.script){if(N.tagName!=="script"){N.script+="</"+N.tagName+">",N.tagName="",N.state=I.SCRIPT;return}q(N,"onscript",N.script),N.script=""}var S=N.tags.length,G=N.tagName;N.strict||(G=G[N.looseCase]());for(var P=G;S--;){var Ee=N.tags[S];if(Ee.name!==P)Y(N,"Unexpected close tag");else break}if(S<0){Y(N,"Unmatched closing tag: "+N.tagName),N.textNode+="</"+N.tagName+">",N.state=I.TEXT;return}N.tagName=G;for(var Ce=N.tags.length;Ce-- >S;){var Ae=N.tag=N.tags.pop();N.tagName=N.tag.name,q(N,"onclosetag",N.tagName);var Je={};for(var Tt in Ae.ns)Je[Tt]=Ae.ns[Tt];var Me=N.tags[N.tags.length-1]||N;N.opt.xmlns&&Ae.ns!==Me.ns&&Object.keys(Ae.ns).forEach(function(Et){var tn=Ae.ns[Et];q(N,"onclosenamespace",{prefix:Et,uri:tn})})}S===0&&(N.closedRoot=!0),N.tagName=N.attribValue=N.attribName="",N.attribList.length=0,N.state=I.TEXT}o(Z,"closeTag");function Se(N){var S=N.entity,G=S.toLowerCase(),P,Ee="";return N.ENTITIES[S]?N.ENTITIES[S]:N.ENTITIES[G]?N.ENTITIES[G]:(S=G,S.charAt(0)==="#"&&(S.charAt(1)==="x"?(S=S.slice(2),P=parseInt(S,16),Ee=P.toString(16)):(S=S.slice(1),P=parseInt(S,10),Ee=P.toString(10))),S=S.replace(/^0+/,""),isNaN(P)||Ee.toLowerCase()!==S?(Y(N,"Invalid character entity"),"&"+N.entity+";"):String.fromCodePoint(P))}o(Se,"parseEntity");function He(N,S){S==="<"?(N.state=I.OPEN_WAKA,N.startTagPosition=N.position):b(S)||(Y(N,"Non-whitespace before first tag."),N.textNode=S,N.state=I.TEXT)}o(He,"beginWhiteSpace");function Le(N,S){var G="";return S<N.length&&(G=N.charAt(S)),G}o(Le,"charAt");function tt(N){var S=this;if(this.error)throw this.error;if(S.closed)return pe(S,"Cannot write after close. Assign an onready handler.");if(N===null)return ue(S);typeof N=="object"&&(N=N.toString());for(var G=0,P="";P=Le(N,G++),S.c=P,!!P;)switch(S.trackPosition&&(S.position++,P===`
98
98
  `?(S.line++,S.column=0):S.column++),S.state){case I.BEGIN:if(S.state=I.BEGIN_WHITESPACE,P==="\uFEFF")continue;He(S,P);continue;case I.BEGIN_WHITESPACE:He(S,P);continue;case I.TEXT:if(S.sawRoot&&!S.closedRoot){for(var Ee=G-1;P&&P!=="<"&&P!=="&";)P=Le(N,G++),P&&S.trackPosition&&(S.position++,P===`
99
- `?(S.line++,S.column=0):S.column++);S.textNode+=N.substring(Ee,G-1)}P==="<"&&!(S.sawRoot&&S.closedRoot&&!S.strict)?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):(!b(P)&&(!S.sawRoot||S.closedRoot)&&Y(S,"Text data outside of root node."),P==="&"?S.state=I.TEXT_ENTITY:S.textNode+=P);continue;case I.SCRIPT:P==="<"?S.state=I.SCRIPT_ENDING:S.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?S.state=I.CLOSE_TAG:(S.script+="<"+P,S.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")S.state=I.SGML_DECL,S.sgmlDecl="";else if(!b(P))if(B(E,P))S.state=I.OPEN_TAG,S.tagName=P;else if(P==="/")S.state=I.CLOSE_TAG,S.tagName="";else if(P==="?")S.state=I.PROC_INST,S.procInstName=S.procInstBody="";else{if(Y(S,"Unencoded <"),S.startTagPosition+1<S.position){var Ce=S.position-S.startTagPosition;P=new Array(Ce).join(" ")+P}S.textNode+="<"+P,S.state=I.TEXT}continue;case I.SGML_DECL:if(S.sgmlDecl+P==="--"){S.state=I.COMMENT,S.comment="",S.sgmlDecl="";continue}S.doctype&&S.doctype!==!0&&S.sgmlDecl?(S.state=I.DOCTYPE_DTD,S.doctype+="<!"+S.sgmlDecl+P,S.sgmlDecl=""):(S.sgmlDecl+P).toUpperCase()===h?(q(S,"onopencdata"),S.state=I.CDATA,S.sgmlDecl="",S.cdata=""):(S.sgmlDecl+P).toUpperCase()===m?(S.state=I.DOCTYPE,(S.doctype||S.sawRoot)&&Y(S,"Inappropriately located doctype declaration"),S.doctype="",S.sgmlDecl=""):P===">"?(q(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=I.TEXT):(A(P)&&(S.state=I.SGML_DECL_QUOTED),S.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===S.q&&(S.state=I.SGML_DECL,S.q=""),S.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(S.state=I.TEXT,q(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=P,P==="["?S.state=I.DOCTYPE_DTD:A(P)&&(S.state=I.DOCTYPE_QUOTED,S.q=P));continue;case I.DOCTYPE_QUOTED:S.doctype+=P,P===S.q&&(S.q="",S.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(S.doctype+=P,S.state=I.DOCTYPE):P==="<"?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):A(P)?(S.doctype+=P,S.state=I.DOCTYPE_DTD_QUOTED,S.q=P):S.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:S.doctype+=P,P===S.q&&(S.state=I.DOCTYPE_DTD,S.q="");continue;case I.COMMENT:P==="-"?S.state=I.COMMENT_ENDING:S.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(S.state=I.COMMENT_ENDED,S.comment=he(S.opt,S.comment),S.comment&&q(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+P,S.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(S,"Malformed comment"),S.comment+="--"+P,S.state=I.COMMENT):S.doctype&&S.doctype!==!0?S.state=I.DOCTYPE_DTD:S.state=I.TEXT;continue;case I.CDATA:P==="]"?S.state=I.CDATA_ENDING:S.cdata+=P;continue;case I.CDATA_ENDING:P==="]"?S.state=I.CDATA_ENDING_2:(S.cdata+="]"+P,S.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(S.cdata&&q(S,"oncdata",S.cdata),q(S,"onclosecdata"),S.cdata="",S.state=I.TEXT):P==="]"?S.cdata+="]":(S.cdata+="]]"+P,S.state=I.CDATA);continue;case I.PROC_INST:P==="?"?S.state=I.PROC_INST_ENDING:b(P)?S.state=I.PROC_INST_BODY:S.procInstName+=P;continue;case I.PROC_INST_BODY:if(!S.procInstBody&&b(P))continue;P==="?"?S.state=I.PROC_INST_ENDING:S.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=I.TEXT):(S.procInstBody+="?"+P,S.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(x,P)?S.tagName+=P:(ye(S),P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:(b(P)||Y(S,"Invalid character in tag name"),S.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(S,!0),Z(S)):(Y(S,"Forward-slash in opening tag not followed by >"),S.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?S.state=I.ATTRIB_VALUE:P===">"?(Y(S,"Attribute without value"),S.attribValue=S.attribName,ze(S),ne(S)):b(P)?S.state=I.ATTRIB_NAME_SAW_WHITE:B(x,P)?S.attribName+=P:Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")S.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",q(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",P===">"?ne(S):B(E,P)?(S.attribName=P,S.state=I.ATTRIB_NAME):(Y(S,"Invalid attribute name"),S.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(S.q=P,S.state=I.ATTRIB_VALUE_QUOTED):(S.opt.unquotedAttributeValues||pe(S,"Unquoted attribute value"),S.state=I.ATTRIB_VALUE_UNQUOTED,S.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==S.q){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=P;continue}ze(S),S.q="",S.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?S.state=I.ATTRIB:P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(Y(S,"No whitespace between attributes"),S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_U:S.attribValue+=P;continue}ze(S),P===">"?ne(S):S.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(S.tagName)P===">"?Z(S):B(x,P)?S.tagName+=P:S.script?(S.script+="</"+S.tagName,S.tagName="",S.state=I.SCRIPT):(b(P)||Y(S,"Invalid tagname in closing tag"),S.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(E,P)?S.script?(S.script+="</"+P,S.state=I.SCRIPT):Y(S,"Invalid tagname in closing tag."):S.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(S):Y(S,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Ae,Je;switch(S.state){case I.TEXT_ENTITY:Ae=I.TEXT,Je="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Ae=I.ATTRIB_VALUE_QUOTED,Je="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Ae=I.ATTRIB_VALUE_UNQUOTED,Je="attribValue";break}if(P===";"){var Tt=Se(S);S.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(S.entity="",S.state=Ae,S.write(Tt)):(S[Je]+=Tt,S.entity="",S.state=Ae)}else B(S.entity.length?_:C,P)?S.entity+=P:(Y(S,"Invalid character in entity name"),S[Je]+="&"+S.entity+P,S.entity="",S.state=Ae);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&n(S),S}o(tt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,S=Math.floor,G=o(function(){var P=16384,Ee=[],Ce,Ae,Je=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Je<Tt;){var Et=Number(arguments[Je]);if(!isFinite(Et)||Et<0||Et>1114111||S(Et)!==Et)throw RangeError("Invalid code point: "+Et);Et<=65535?Ee.push(Et):(Et-=65536,Ce=(Et>>10)+55296,Ae=Et%1024+56320,Ee.push(Ce,Ae)),(Je+1===Tt||Ee.length>P)&&(Me+=N.apply(null,Ee),Ee.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof CA>"u"?CA.sax={}:CA)});var YK=te(JR=>{"use strict";(function(){"use strict";JR.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(JR)});var YR=te(Kf=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),Kf.normalize=function(e){return e.toLowerCase()},Kf.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Kf.stripPrefix=function(e){return e.replace(r,"")},Kf.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},Kf.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(Kf)});var QK=te(pu=>{"use strict";(function(){"use strict";var r,e,t,n,s,i,a,u,c,l=o(function(g,v){return function(){return g.apply(v,arguments)}},"bind"),h=o(function(g,v){for(var y in v)m.call(v,y)&&(g[y]=v[y]);function E(){this.constructor=g}return o(E,"ctor"),E.prototype=v.prototype,g.prototype=new E,g.__super__=v.prototype,g},"extend"),m={}.hasOwnProperty;u=JK(),n=require("events"),r=YK(),a=YR(),c=require("timers").setImmediate,e=lA().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,v,y){var E,x,C;for(E=0,x=g.length;E<x;E++)C=g[E],v=C(v,y);return v},"processItem"),t=o(function(g,v,y){var E;return E=Object.create(null),E.value=y,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(g,v,E)},"defineProperty"),pu.Parser=(function(g){h(v,g);function v(y){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var E,x,C;if(!(this instanceof pu.Parser))return new pu.Parser(y);this.options={},x=e["0.2"];for(E in x)m.call(x,E)&&(C=x[E],this.options[E]=C);for(E in y)m.call(y,E)&&(C=y[E],this.options[E]=C);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return o(v,"Parser"),v.prototype.processAsync=function(){var y,E;try{return this.remaining.length<=this.options.chunkSize?(y=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(y),this.saxParser.close()):(y=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(y),c(this.processAsync))}catch(x){if(E=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},v.prototype.assignOrPush=function(y,E,x){return E in y?(y[E]instanceof Array||t(y,E,[y[E]]),y[E].push(x)):this.options.explicitArray?t(y,E,[x]):t(y,E,x)},v.prototype.reset=function(){var y,E,x,C;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(_){return function(b){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",b)}})(this),this.saxParser.onend=(function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],y=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=(function(_){return function(b){var A,T,B,M,I;if(B={},B[E]="",!_.options.ignoreAttrs){I=b.attributes;for(A in I)m.call(I,A)&&(!(y in B)&&!_.options.mergeAttrs&&(B[y]={}),T=_.options.attrValueProcessors?i(_.options.attrValueProcessors,b.attributes[A],A):b.attributes[A],M=_.options.attrNameProcessors?i(_.options.attrNameProcessors,A):A,_.options.mergeAttrs?_.assignOrPush(B,M,T):t(B[y],M,T))}return B["#name"]=_.options.tagNameProcessors?i(_.options.tagNameProcessors,b.name):b.name,_.options.xmlns&&(B[_.options.xmlnskey]={uri:b.uri,local:b.local}),C.push(B)}})(this),this.saxParser.onclosetag=(function(_){return function(){var b,A,T,B,M,I,H,K,q,W;if(I=C.pop(),M=I["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(b=I.cdata,delete I.cdata),q=C[C.length-1],I[E].match(/^\s*$/)&&!b?(A=I[E],delete I[E]):(_.options.trim&&(I[E]=I[E].trim()),_.options.normalize&&(I[E]=I[E].replace(/\s{2,}/g," ").trim()),I[E]=_.options.valueProcessors?i(_.options.valueProcessors,I[E],M):I[E],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])),s(I)&&(typeof _.options.emptyTag=="function"?I=_.options.emptyTag():I=_.options.emptyTag!==""?_.options.emptyTag:A),_.options.validator!=null&&(W="/"+(function(){var he,pe,ue;for(ue=[],he=0,pe=C.length;he<pe;he++)B=C[he],ue.push(B["#name"]);return ue})().concat(M).join("/"),(function(){var he;try{return I=_.options.validator(W,q&&q[M],I)}catch(pe){return he=pe,_.emit("error",he)}})()),_.options.explicitChildren&&!_.options.mergeAttrs&&typeof I=="object"){if(!_.options.preserveChildrenOrder)B={},_.options.attrkey in I&&(B[_.options.attrkey]=I[_.options.attrkey],delete I[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in I&&(B[_.options.charkey]=I[_.options.charkey],delete I[_.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(B[_.options.childkey]=I),I=B;else if(q){q[_.options.childkey]=q[_.options.childkey]||[],H={};for(T in I)m.call(I,T)&&t(H,T,I[T]);q[_.options.childkey].push(H),delete I["#name"],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])}}return C.length>0?_.assignOrPush(q,M,I):(_.options.explicitRoot&&(K=I,I={},t(I,M,K)),_.resultObject=I,_.saxParser.ended=!0,_.emit("end",_.resultObject))}})(this),x=(function(_){return function(b){var A,T;if(T=C[C.length-1],T)return T[E]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(T[_.options.childkey]=T[_.options.childkey]||[],A={"#name":"__text__"},A[E]=b,_.options.normalize&&(A[E]=A[E].replace(/\s{2,}/g," ").trim()),T[_.options.childkey].push(A)),T}})(this),this.saxParser.ontext=x,this.saxParser.oncdata=(function(_){return function(b){var A;if(A=x(b),A)return A.cdata=!0}})(this)},v.prototype.parseString=function(y,E){var x;E!=null&&typeof E=="function"&&(this.on("end",function(C){return this.reset(),E(null,C)}),this.on("error",function(C){return this.reset(),E(C)}));try{return y=y.toString(),y.trim()===""?(this.emit("end",null),!0):(y=r.stripBOM(y),this.options.async?(this.remaining=y,c(this.processAsync),this.saxParser):this.saxParser.write(y).close())}catch(C){if(x=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw x}else return this.emit("error",x),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(y){return new Promise((function(E){return function(x,C){return E.parseString(y,function(_,b){return _?C(_):x(b)})}})(this))},v})(n),pu.parseString=function(g,v,y){var E,x,C;return y!=null?(typeof y=="function"&&(E=y),typeof v=="object"&&(x=v)):(typeof v=="function"&&(E=v),x={}),C=new pu.Parser(x),C.parseString(g,E)},pu.parseStringPromise=function(g,v){var y,E;return typeof v=="object"&&(y=v),E=new pu.Parser(y),E.parseStringPromise(g)}}).call(pu)});var ZK=te(du=>{"use strict";(function(){"use strict";var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;e=lA(),r=zK(),t=QK(),n=YR(),du.defaults=e.defaults,du.processors=n,du.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),du.Builder=r.Builder,du.Parser=t.Parser,du.parseString=t.parseString,du.parseStringPromise=t.parseStringPromise}).call(du)});var Nwe={};AE(Nwe,{ASN1:()=>Af,CanonicalizationMethod:()=>OT,Choice:()=>bwe,Decimal:()=>pf,DigestAlgorithm:()=>TE,EntitySigner:()=>VT,Environment:()=>gte,IsDecimal:()=>I3,MemoryCacheAdapter:()=>WT,NFeTsError:()=>Xr,NativeCertificateRepository:()=>ZI,NullCacheAdapter:()=>cy,PdfkitPdfBuilder:()=>XT,SignatureAlgorithm:()=>Jo,SignatureMethod:()=>NE,SignatureNamespace:()=>CE,Signer:()=>hf,SkipAllValidations:()=>vte,SkipValidation:()=>yte,SkipValidationMetadata:()=>Gp,SoapRemoteTransmissionRepository:()=>MR,StateAcronyms:()=>mte,StateCodeAcValidator:()=>D3,StateCodeAlValidator:()=>B3,StateCodeAmValidator:()=>R3,StateCodeApValidator:()=>O3,StateCodeBaValidator:()=>P3,StateCodeCeValidator:()=>k3,StateCodeDfValidator:()=>L3,StateCodeEsValidator:()=>V3,StateCodeGoValidator:()=>U3,StateCodeMaValidator:()=>F3,StateCodeMgValidator:()=>j3,StateCodeMsValidator:()=>M3,StateCodeMtValidator:()=>q3,StateCodePaValidator:()=>H3,StateCodePbValidator:()=>K3,StateCodePeValidator:()=>$3,StateCodePiValidator:()=>G3,StateCodePrValidator:()=>X3,StateCodeRjValidator:()=>W3,StateCodeRnValidator:()=>z3,StateCodeRoValidator:()=>J3,StateCodeRrValidator:()=>Y3,StateCodeRsValidator:()=>Q3,StateCodeScValidator:()=>Z3,StateCodeSeValidator:()=>ek,StateCodeSpValidator:()=>tk,StateCodeToValidator:()=>rk,StateCodes:()=>Nr,TransformDateString:()=>Cwe,TransformDecimal:()=>Awe,ValidateErrorsMetadata:()=>jT,Validates:()=>xte,ValidationError:()=>PT,Xml2JsToolkit:()=>T3,XmlSigner:()=>UT,clearEmptyValues:()=>Gg,mapConstraintsToErrors:()=>MT,plainToInstance:()=>FT});module.exports=dte(Nwe);var CE="http://www.w3.org/2000/09/xmldsig#",OT="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",NE=(function(r){return r.RSA_SHA1="http://www.w3.org/2000/09/xmldsig#rsa-sha1",r.RSA_SHA256="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",r})({}),Jo=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),TE=(function(r){return r.SHA1="http://www.w3.org/2000/09/xmldsig#sha1",r.SHA256="http://www.w3.org/2001/04/xmlenc#sha256",r})({});var Nr={AC:"12",AL:"27",AM:"13",AP:"16",BA:"29",CE:"23",DF:"53",ES:"32",GO:"52",MA:"21",MG:"31",MS:"50",MT:"51",PA:"15",PB:"25",PE:"26",PI:"22",PR:"41",RJ:"33",RN:"24",RO:"11",RR:"14",RS:"43",SC:"42",SE:"28",SP:"35",TO:"17"},mte=Object.keys(Nr);var gte={Production:"1",Homolog:"2"};var Rwe={[Nr.AC]:"America/Rio_Branco",[Nr.AL]:"America/Maceio",[Nr.AM]:"America/Manaus",[Nr.AP]:"America/Belem",[Nr.BA]:"America/Bahia",[Nr.CE]:"America/Fortaleza",[Nr.DF]:"America/Sao_Paulo",[Nr.ES]:"America/Sao_Paulo",[Nr.GO]:"America/Sao_Paulo",[Nr.MA]:"America/Fortaleza",[Nr.MG]:"America/Sao_Paulo",[Nr.MS]:"America/Campo_Grande",[Nr.MT]:"America/Cuiaba",[Nr.PA]:"America/Belem",[Nr.PB]:"America/Fortaleza",[Nr.PE]:"America/Recife",[Nr.PI]:"America/Fortaleza",[Nr.PR]:"America/Sao_Paulo",[Nr.RJ]:"America/Sao_Paulo",[Nr.RN]:"America/Fortaleza",[Nr.RO]:"America/Porto_Velho",[Nr.RR]:"America/Boa_Vista",[Nr.RS]:"America/Sao_Paulo",[Nr.SC]:"America/Sao_Paulo",[Nr.SE]:"America/Maceio",[Nr.SP]:"America/Sao_Paulo",[Nr.TO]:"America/Araguaina"};var Xr=class extends Error{static{o(this,"NFeTsError")}};var PT=class extends Xr{static{o(this,"ValidationError")}};var $g={includeComments:!1,exclusive:!0};var kT=o(r=>{throw new Xr("Didn't expect to get here")},"unreachable");var hf=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Jo.SHA1,s=$g){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:CE},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:OT}},SignatureMethod:{$:{Algorithm:this.signatureMethod}},Reference:{$:{URI:`#${this.toolkit.getAttribute(e,t)}`},Transforms:this.transforms,DigestMethod:{$:{Algorithm:this.digestAlgorithm}},DigestValue:this.digest(e)}}}digest(e){return this.toolkit.digest(e,this.algorithm,this.canonical)}async signOrLeft(e,t){let n=this.toolkit.canonicalize(await this.toolkit.build({$:{xmlns:CE},...e},{rootName:"SignedInfo"}),this.canonical);return this.certificateRepository.sign(n,t,this.algorithm)}get transforms(){return{Transform:[{$:{Algorithm:"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}},{$:{Algorithm:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}}]}}get digestAlgorithm(){switch(this.algorithm){case Jo.SHA256:return TE.SHA256;case Jo.SHA1:return TE.SHA1;default:return kT(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Jo.SHA256:return NE.RSA_SHA256;case Jo.SHA1:return NE.RSA_SHA1;default:return kT(this.algorithm)}}};var LT=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},IE=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},gs=o(r=>new LT(r),"left"),ji=o(r=>r===void 0?new IE(void 0):new IE(r),"right");var VT=class extends hf{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n;if(!e[s])return gs(new Xr(`Node ${String(s)} not found`));let u=await this.toolkit.build(this.ns(e,s),{headless:!0,rootName:String(s),renderOpts:{pretty:!1}}),c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=e;return h.Signature=this.assemble(c,l.value,a),ji(h)}ns(e,t){let n=e.$?.xmlns,{$:s,...i}=e[t],{xmlns:a,...u}=s??{};return{$:{xmlns:n,...u},...i}}};var UT=class extends hf{static{o(this,"XmlSigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n,u=this.toolkit.getNode(e,s);if(!u)return gs(new Xr(`Node ${s} not found`));let c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=await this.toolkit.build(this.assemble(c,l.value,a),{rootName:"Signature"});return ji(this.toolkit.appendNode(e,h))}};var NEe=require("reflect-metadata"),D4=require("class-validator");var EEe=require("reflect-metadata");var Gp="__SkipValidation__",yte=o(()=>(r,e)=>{Reflect.defineMetadata(Gp,!0,r,e.toString())},"SkipValidation"),vte=o(()=>r=>{Reflect.defineMetadata(Gp,!0,r)},"SkipAllValidations");var _4=require("class-transformer");var Gg=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&Gg(t)},"clearEmptyValues"),FT=o((r,e,t={})=>{let n=(0,_4.plainToInstance)(e,r);return t.clearEmptyValues&&Gg(n),n},"plainToInstance");var jT="__ValidateErrors__",MT=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(MT(n.children,e?`${e}.${n.property}`:n.property));let s=Object.values(n.constraints??{}).map(i=>e?`${e}.${i}`:i).join(", ");return s?t.concat(s):t},[]),"mapConstraintsToErrors"),xte=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata(Gp,this.constructor);if(Reflect.getMetadata(Gp,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...l]=i,h=FT(c,r),m=(0,D4.validateSync)(h,{whitelist:!0});if(Gg(h),m.length){let g=Reflect.getMetadata(jT,this)??[];Reflect.defineMetadata(jT,g.concat(MT(m,s?.name)),this)}return s?.apply(this,[h,...l])}},"Validates");var gFe=require("reflect-metadata");var Xp=9e15,ic=1e9,qT="0123456789abcdef",BE="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",RE="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",HT={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xp,maxE:Xp,crypto:!1},P4,Yo,Ot=!0,PE="[DecimalError] ",sc=PE+"Invalid argument: ",k4=PE+"Precision limit exceeded",L4=PE+"crypto unavailable",V4="[object Decimal]",ys=Math.floor,Pn=Math.pow,wte=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ete=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ste=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,U4=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ya=1e7,At=7,bte=9007199254740991,Ate=BE.length-1,KT=RE.length-1,Ve={toStringTag:V4};Ve.absoluteValue=Ve.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),yt(r)};Ve.ceil=function(){return yt(new this.constructor(this),this.e+1,2)};Ve.clampedTo=Ve.clamp=function(r,e){var t,n=this,s=n.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(sc+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new s(n)};Ve.comparedTo=Ve.cmp=function(r){var e,t,n,s,i=this,a=i.d,u=(r=new i.constructor(r)).d,c=i.s,l=r.s;if(!a||!u)return!c||!l?NaN:c!==l?c:a===u?0:!a^c<0?1:-1;if(!a[0]||!u[0])return a[0]?c:u[0]?-l:0;if(c!==l)return c;if(i.e!==r.e)return i.e>r.e^c<0?1:-1;for(n=a.length,s=u.length,e=0,t=n<s?n:s;e<t;++e)if(a[e]!==u[e])return a[e]>u[e]^c<0?1:-1;return n===s?0:n>s^c<0?1:-1};Ve.cosine=Ve.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+At,n.rounding=1,t=Cte(n,H4(n,t)),n.precision=r,n.rounding=e,yt(Yo==2||Yo==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};Ve.cubeRoot=Ve.cbrt=function(){var r,e,t,n,s,i,a,u,c,l,h=this,m=h.constructor;if(!h.isFinite()||h.isZero())return new m(h);for(Ot=!1,i=h.s*Pn(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=es(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Pn(t,1/3),r=ys((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new m(t),n.s=h.s):n=new m(i.toString()),a=(r=m.precision)+3;;)if(u=n,c=u.times(u).times(u),l=c.plus(h),n=kr(l.plus(h).times(u),l.plus(c),a+2,1),es(u.d).slice(0,a)===(t=es(n.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(yt(u,r+1,0),u.times(u).times(u).eq(h))){n=u;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(yt(n,r+1,1),e=!n.times(n).times(n).eq(h));break}return Ot=!0,yt(n,r,m.rounding,e)};Ve.decimalPlaces=Ve.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-ys(this.e/At))*At,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};Ve.dividedBy=Ve.div=function(r){return kr(this,new this.constructor(r))};Ve.dividedToIntegerBy=Ve.divToInt=function(r){var e=this,t=e.constructor;return yt(kr(e,new t(r),0,1,1),t.precision,t.rounding)};Ve.equals=Ve.eq=function(r){return this.cmp(r)===0};Ve.floor=function(){return yt(new this.constructor(this),this.e+1,3)};Ve.greaterThan=Ve.gt=function(r){return this.cmp(r)>0};Ve.greaterThanOrEqualTo=Ve.gte=function(r){var e=this.cmp(r);return e==1||e===0};Ve.hyperbolicCosine=Ve.cosh=function(){var r,e,t,n,s,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,s=i.d.length,s<32?(r=Math.ceil(s/3),e=(1/LE(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=Wp(a,1,i.times(e),new a(1),!0);for(var c,l=r,h=new a(8);l--;)c=i.times(i),i=u.minus(c.times(h.minus(c.times(h))));return yt(i,a.precision=t,a.rounding=n,!0)};Ve.hyperbolicSine=Ve.sinh=function(){var r,e,t,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(s.e,s.sd())+4,i.rounding=1,n=s.d.length,n<3)s=Wp(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/LE(5,r)),s=Wp(i,2,s,s,!0);for(var a,u=new i(5),c=new i(16),l=new i(20);r--;)a=s.times(s),s=s.times(u.plus(a.times(c.times(a).plus(l))))}return i.precision=e,i.rounding=t,yt(s,e,t,!0)};Ve.hyperbolicTangent=Ve.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,kr(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};Ve.inverseCosine=Ve.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,s=e.rounding;return t!==-1?t===0?r.isNeg()?Wa(e,n,s):new e(0):new e(NaN):r.isZero()?Wa(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,r.times(2))};Ve.inverseHyperbolicCosine=Ve.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Ot=!1,t=t.times(t).minus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};Ve.inverseHyperbolicSine=Ve.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Ot=!1,t=t.times(t).plus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln())};Ve.inverseHyperbolicTangent=Ve.atanh=function(){var r,e,t,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=i.precision,e=i.rounding,n=s.sd(),Math.max(n,r)<2*-s.e-1?yt(new i(s),r,e,!0):(i.precision=t=n-s.e,s=kr(s.plus(1),new i(1).minus(s),t+r,1),i.precision=r+4,i.rounding=1,s=s.ln(),i.precision=r,i.rounding=e,s.times(.5))):new i(NaN)};Ve.inverseSine=Ve.asin=function(){var r,e,t,n,s=this,i=s.constructor;return s.isZero()?new i(s):(e=s.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=Wa(i,t+4,n).times(.5),r.s=s.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,s.times(2)))};Ve.inverseTangent=Ve.atan=function(){var r,e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding;if(l.isFinite()){if(l.isZero())return new h(l);if(l.abs().eq(1)&&m+4<=KT)return a=Wa(h,m+4,g).times(.25),a.s=l.s,a}else{if(!l.s)return new h(NaN);if(m+4<=KT)return a=Wa(h,m+4,g).times(.5),a.s=l.s,a}for(h.precision=u=m+10,h.rounding=1,t=Math.min(28,u/At+2|0),r=t;r;--r)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ot=!1,e=Math.ceil(u/At),n=1,c=l.times(l),a=new h(l),s=l;r!==-1;)if(s=s.times(c),i=a.minus(s.div(n+=2)),s=s.times(c),a=i.plus(s.div(n+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===i.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),Ot=!0,yt(a,h.precision=m,h.rounding=g,!0)};Ve.isFinite=function(){return!!this.d};Ve.isInteger=Ve.isInt=function(){return!!this.d&&ys(this.e/At)>this.d.length-2};Ve.isNaN=function(){return!this.s};Ve.isNegative=Ve.isNeg=function(){return this.s<0};Ve.isPositive=Ve.isPos=function(){return this.s>0};Ve.isZero=function(){return!!this.d&&this.d[0]===0};Ve.lessThan=Ve.lt=function(r){return this.cmp(r)<0};Ve.lessThanOrEqualTo=Ve.lte=function(r){return this.cmp(r)<1};Ve.logarithm=Ve.log=function(r){var e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding,v=5;if(r==null)r=new h(10),e=!0;else{if(r=new h(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new h(NaN);e=r.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new h(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(s=t[0];s%10===0;)s/=10;i=s!==1}if(Ot=!1,u=m+v,a=nc(l,u),n=e?OE(h,u+10):nc(r,u),c=kr(a,n,u,1),Xg(c.d,s=m,g))do if(u+=10,a=nc(l,u),n=e?OE(h,u+10):nc(r,u),c=kr(a,n,u,1),!i){+es(c.d).slice(s+1,s+15)+1==1e14&&(c=yt(c,m+1,0));break}while(Xg(c.d,s+=10,g));return Ot=!0,yt(c,m,g)};Ve.minus=Ve.sub=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,v=this,y=v.constructor;if(r=new y(r),!v.d||!r.d)return!v.s||!r.s?r=new y(NaN):v.d?r.s=-r.s:r=new y(r.d||v.s!==r.s?v:NaN),r;if(v.s!=r.s)return r.s=-r.s,v.plus(r);if(l=v.d,g=r.d,u=y.precision,c=y.rounding,!l[0]||!g[0]){if(g[0])r.s=-r.s;else if(l[0])r=new y(v);else return new y(c===3?-0:0);return Ot?yt(r,u,c):r}if(t=ys(r.e/At),h=ys(v.e/At),l=l.slice(),i=h-t,i){for(m=i<0,m?(e=l,i=-i,a=g.length):(e=g,t=h,a=l.length),n=Math.max(Math.ceil(u/At),a)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=l.length,a=g.length,m=n<a,m&&(a=n),n=0;n<a;n++)if(l[n]!=g[n]){m=l[n]<g[n];break}i=0}for(m&&(e=l,l=g,g=e,r.s=-r.s),a=l.length,n=g.length-a;n>0;--n)l[a++]=0;for(n=g.length;n>i;){if(l[--n]<g[n]){for(s=n;s&&l[--s]===0;)l[s]=ya-1;--l[s],l[n]+=ya}l[n]-=g[n]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(r.d=l,r.e=kE(l,t),Ot?yt(r,u,c):r):new y(c===3?-0:0)};Ve.modulo=Ve.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?yt(new n(t),n.precision,n.rounding):(Ot=!1,n.modulo==9?(e=kr(t,r.abs(),0,3,1),e.s*=r.s):e=kr(t,r,0,n.modulo,1),e=e.times(r),Ot=!0,t.minus(e))};Ve.naturalExponential=Ve.exp=function(){return $T(this)};Ve.naturalLogarithm=Ve.ln=function(){return nc(this)};Ve.negated=Ve.neg=function(){var r=new this.constructor(this);return r.s=-r.s,yt(r)};Ve.plus=Ve.add=function(r){var e,t,n,s,i,a,u,c,l,h,m=this,g=m.constructor;if(r=new g(r),!m.d||!r.d)return!m.s||!r.s?r=new g(NaN):m.d||(r=new g(r.d||m.s===r.s?m:NaN)),r;if(m.s!=r.s)return r.s=-r.s,m.minus(r);if(l=m.d,h=r.d,u=g.precision,c=g.rounding,!l[0]||!h[0])return h[0]||(r=new g(m)),Ot?yt(r,u,c):r;if(i=ys(m.e/At),n=ys(r.e/At),l=l.slice(),s=i-n,s){for(s<0?(t=l,s=-s,a=h.length):(t=h,n=i,a=l.length),i=Math.ceil(u/At),a=i>a?i+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=l.length,s=h.length,a-s<0&&(s=a,t=h,h=l,l=t),e=0;s;)e=(l[--s]=l[s]+h[s]+e)/ya|0,l[s]%=ya;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=kE(l,n),Ot?yt(r,u,c):r};Ve.precision=Ve.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(sc+r);return t.d?(e=F4(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};Ve.round=function(){var r=this,e=r.constructor;return yt(new e(r),r.e+1,e.rounding)};Ve.sine=Ve.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+At,n.rounding=1,t=Tte(n,H4(n,t)),n.precision=r,n.rounding=e,yt(Yo>2?t.neg():t,r,e,!0)):new n(NaN)};Ve.squareRoot=Ve.sqrt=function(){var r,e,t,n,s,i,a=this,u=a.d,c=a.e,l=a.s,h=a.constructor;if(l!==1||!u||!u[0])return new h(!l||l<0&&(!u||u[0])?NaN:u?a:1/0);for(Ot=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=es(u),(e.length+c)%2==0&&(e+="0"),l=Math.sqrt(e),c=ys((c+1)/2)-(c<0||c%2),l==1/0?e="5e"+c:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new h(e)):n=new h(l.toString()),t=(c=h.precision)+3;;)if(i=n,n=i.plus(kr(a,i,t+2,1)).times(.5),es(i.d).slice(0,t)===(e=es(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(yt(i,c+1,0),i.times(i).eq(a))){n=i;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(yt(n,c+1,1),r=!n.times(n).eq(a));break}return Ot=!0,yt(n,c,h.rounding,r)};Ve.tangent=Ve.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=kr(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,yt(Yo==2||Yo==4?t.neg():t,r,e,!0)):new n(NaN)};Ve.times=Ve.mul=function(r){var e,t,n,s,i,a,u,c,l,h=this,m=h.constructor,g=h.d,v=(r=new m(r)).d;if(r.s*=h.s,!g||!g[0]||!v||!v[0])return new m(!r.s||g&&!g[0]&&!v||v&&!v[0]&&!g?NaN:!g||!v?r.s/0:r.s*0);for(t=ys(h.e/At)+ys(r.e/At),c=g.length,l=v.length,c<l&&(i=g,g=v,v=i,a=c,c=l,l=a),i=[],a=c+l,n=a;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,s=c+n;s>n;)u=i[s]+v[n]*g[s-n-1]+e,i[s--]=u%ya|0,e=u/ya|0;i[s]=(i[s]+e)%ya|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=kE(i,t),Ot?yt(r,m.precision,m.rounding):r};Ve.toBinary=function(r,e){return GT(this,2,r,e)};Ve.toDecimalPlaces=Ve.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(Hs(r,0,ic),e===void 0?e=n.rounding:Hs(e,0,8),yt(t,r+t.e+1,e))};Ve.toExponential=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=za(n,!0):(Hs(r,0,ic),e===void 0?e=s.rounding:Hs(e,0,8),n=yt(new s(n),r+1,e),t=za(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toFixed=function(r,e){var t,n,s=this,i=s.constructor;return r===void 0?t=za(s):(Hs(r,0,ic),e===void 0?e=i.rounding:Hs(e,0,8),n=yt(new i(s),r+s.e+1,e),t=za(n,!1,r+n.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};Ve.toFraction=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,v=this,y=v.d,E=v.constructor;if(!y)return new E(v);if(l=t=new E(1),n=c=new E(0),e=new E(n),i=e.e=F4(y)-v.e-1,a=i%At,e.d[0]=Pn(10,a<0?At+a:a),r==null)r=i>0?e:l;else{if(u=new E(r),!u.isInt()||u.lt(l))throw Error(sc+u);r=u.gt(e)?i>0?e:l:u}for(Ot=!1,u=new E(es(y)),h=E.precision,E.precision=i=y.length*At*2;m=kr(u,e,0,1,1),s=t.plus(m.times(n)),s.cmp(r)!=1;)t=n,n=s,s=l,l=c.plus(m.times(s)),c=s,s=e,e=u.minus(m.times(s)),u=s;return s=kr(r.minus(t),n,0,1,1),c=c.plus(s.times(l)),t=t.plus(s.times(n)),c.s=l.s=v.s,g=kr(l,n,i,1).minus(v).abs().cmp(kr(c,t,i,1).minus(v).abs())<1?[l,n]:[c,t],E.precision=h,Ot=!0,g};Ve.toHexadecimal=Ve.toHex=function(r,e){return GT(this,16,r,e)};Ve.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:Hs(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(Ot=!1,t=kr(t,r,0,e,1).times(r),Ot=!0,yt(t)):(r.s=t.s,t=r),t};Ve.toNumber=function(){return+this};Ve.toOctal=function(r,e){return GT(this,8,r,e)};Ve.toPower=Ve.pow=function(r){var e,t,n,s,i,a,u=this,c=u.constructor,l=+(r=new c(r));if(!u.d||!r.d||!u.d[0]||!r.d[0])return new c(Pn(+u,l));if(u=new c(u),u.eq(1))return u;if(n=c.precision,i=c.rounding,r.eq(1))return yt(u,n,i);if(e=ys(r.e/At),e>=r.d.length-1&&(t=l<0?-l:l)<=bte)return s=j4(c,u,t,n),r.s<0?new c(1).div(s):yt(s,n,i);if(a=u.s,a<0){if(e<r.d.length-1)return new c(NaN);if((r.d[e]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return t=Pn(+u,l),e=t==0||!isFinite(t)?ys(l*(Math.log("0."+es(u.d))/Math.LN10+u.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(Ot=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=$T(r.times(nc(u,n+t)),n),s.d&&(s=yt(s,n+5,1),Xg(s.d,n,i)&&(e=n+10,s=yt($T(r.times(nc(u,e+t)),e),e+5,1),+es(s.d).slice(n+1,n+15)+1==1e14&&(s=yt(s,n+1,0)))),s.s=a,Ot=!0,c.rounding=i,yt(s,n,i))};Ve.toPrecision=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=za(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(Hs(r,1,ic),e===void 0?e=s.rounding:Hs(e,0,8),n=yt(new s(n),r,e),t=za(n,r<=n.e||n.e<=s.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toSignificantDigits=Ve.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(Hs(r,1,ic),e===void 0?e=n.rounding:Hs(e,0,8)),yt(new n(t),r,e)};Ve.toString=function(){var r=this,e=r.constructor,t=za(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};Ve.truncated=Ve.trunc=function(){return yt(new this.constructor(this),this.e+1,1)};Ve.valueOf=Ve.toJSON=function(){var r=this,e=r.constructor,t=za(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function es(r){var e,t,n,s=r.length-1,i="",a=r[0];if(s>0){for(i+=a,e=1;e<s;e++)n=r[e]+"",t=At-n.length,t&&(i+=rc(t)),i+=n;a=r[e],n=a+"",t=At-n.length,t&&(i+=rc(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(es,"digitsToString");function Hs(r,e,t){if(r!==~~r||r<e||r>t)throw Error(sc+r)}o(Hs,"checkInt32");function Xg(r,e,t,n){var s,i,a,u;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=At,s=0):(s=Math.ceil((e+1)/At),e%=At),i=Pn(10,At-e),u=r[s]%i|0,n==null?e<3?(e==0?u=u/100|0:e==1&&(u=u/10|0),a=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):a=(t<4&&u+1==i||t>3&&u+1==i/2)&&(r[s+1]/i/100|0)==Pn(10,e-2)-1||(u==i/2||u==0)&&(r[s+1]/i/100|0)==0:e<4?(e==0?u=u/1e3|0:e==1?u=u/100|0:e==2&&(u=u/10|0),a=(n||t<4)&&u==9999||!n&&t>3&&u==4999):a=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(r[s+1]/i/1e3|0)==Pn(10,e-3)-1,a}o(Xg,"checkRoundingDigits");function _E(r,e,t){for(var n,s=[0],i,a=0,u=r.length;a<u;){for(i=s.length;i--;)s[i]*=e;for(s[0]+=qT.indexOf(r.charAt(a++)),n=0;n<s.length;n++)s[n]>t-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/t|0,s[n]%=t)}return s.reverse()}o(_E,"convertBase");function Cte(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/LE(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=Wp(r,1,e.times(s),new r(1));for(var i=t;i--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}o(Cte,"cosine");var kr=(function(){function r(n,s,i){var a,u=0,c=n.length;for(n=n.slice();c--;)a=n[c]*s+u,n[c]=a%i|0,u=a/i|0;return u&&n.unshift(u),n}o(r,"multiplyInteger");function e(n,s,i,a){var u,c;if(i!=a)c=i>a?1:-1;else for(u=c=0;u<i;u++)if(n[u]!=s[u]){c=n[u]>s[u]?1:-1;break}return c}o(e,"compare");function t(n,s,i,a){for(var u=0;i--;)n[i]-=u,u=n[i]<s[i]?1:0,n[i]=u*a+n[i]-s[i];for(;!n[0]&&n.length>1;)n.shift()}return o(t,"subtract"),function(n,s,i,a,u,c){var l,h,m,g,v,y,E,x,C,_,b,A,T,B,M,I,H,K,q,W,he=n.constructor,pe=n.s==s.s?1:-1,ue=n.d,Y=s.d;if(!ue||!ue[0]||!Y||!Y[0])return new he(!n.s||!s.s||(ue?Y&&ue[0]==Y[0]:!Y)?NaN:ue&&ue[0]==0||!Y?pe*0:pe/0);for(c?(v=1,h=n.e-s.e):(c=ya,v=At,h=ys(n.e/v)-ys(s.e/v)),q=Y.length,H=ue.length,C=new he(pe),_=C.d=[],m=0;Y[m]==(ue[m]||0);m++);if(Y[m]>(ue[m]||0)&&h--,i==null?(B=i=he.precision,a=he.rounding):u?B=i+(n.e-s.e)+1:B=i,B<0)_.push(1),y=!0;else{if(B=B/v+2|0,m=0,q==1){for(g=0,Y=Y[0],B++;(m<H||g)&&B--;m++)M=g*c+(ue[m]||0),_[m]=M/Y|0,g=M%Y|0;y=g||m<H}else{for(g=c/(Y[0]+1)|0,g>1&&(Y=r(Y,g,c),ue=r(ue,g,c),q=Y.length,H=ue.length),I=q,b=ue.slice(0,q),A=b.length;A<q;)b[A++]=0;W=Y.slice(),W.unshift(0),K=Y[0],Y[1]>=c/2&&++K;do g=0,l=e(Y,b,q,A),l<0?(T=b[0],q!=A&&(T=T*c+(b[1]||0)),g=T/K|0,g>1?(g>=c&&(g=c-1),E=r(Y,g,c),x=E.length,A=b.length,l=e(E,b,x,A),l==1&&(g--,t(E,q<x?W:Y,x,c))):(g==0&&(l=g=1),E=Y.slice()),x=E.length,x<A&&E.unshift(0),t(b,E,A,c),l==-1&&(A=b.length,l=e(Y,b,q,A),l<1&&(g++,t(b,q<A?W:Y,A,c))),A=b.length):l===0&&(g++,b=[0]),_[m++]=g,l&&b[0]?b[A++]=ue[I]||0:(b=[ue[I]],A=1);while((I++<H||b[0]!==void 0)&&B--);y=b[0]!==void 0}_[0]||_.shift()}if(v==1)C.e=h,P4=y;else{for(m=1,g=_[0];g>=10;g/=10)m++;C.e=m+h*v-1,yt(C,u?i+C.e+1:i,a,y)}return C}})();function yt(r,e,t,n){var s,i,a,u,c,l,h,m,g,v=r.constructor;e:if(e!=null){if(m=r.d,!m)return r;for(s=1,u=m[0];u>=10;u/=10)s++;if(i=e-s,i<0)i+=At,a=e,h=m[g=0],c=h/Pn(10,s-a-1)%10|0;else if(g=Math.ceil((i+1)/At),u=m.length,g>=u)if(n){for(;u++<=g;)m.push(0);h=c=0,s=1,i%=At,a=i-At+1}else break e;else{for(h=u=m[g],s=1;u>=10;u/=10)s++;i%=At,a=i-At+s,c=a<0?0:h/Pn(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%Pn(10,s-a-1)),l=t<4?(c||n)&&(t==0||t==(r.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(i>0?a>0?h/Pn(10,s-a):0:m[g-1])%10&1||t==(r.s<0?8:7)),e<1||!m[0])return m.length=0,l?(e-=r.e+1,m[0]=Pn(10,(At-e%At)%At),r.e=-e||0):m[0]=r.e=0,r;if(i==0?(m.length=g,u=1,g--):(m.length=g+1,u=Pn(10,At-i),m[g]=a>0?(h/Pn(10,s-a)%Pn(10,a)|0)*u:0),l)for(;;)if(g==0){for(i=1,a=m[0];a>=10;a/=10)i++;for(a=m[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(r.e++,m[0]==ya&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=ya)break;m[g--]=0,u=1}for(i=m.length;m[--i]===0;)m.pop()}return Ot&&(r.e>v.maxE?(r.d=null,r.e=NaN):r.e<v.minE&&(r.e=0,r.d=[0])),r}o(yt,"finalise");function za(r,e,t){if(!r.isFinite())return q4(r);var n,s=r.e,i=es(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+rc(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+rc(-s-1)+i,t&&(n=t-a)>0&&(i+=rc(n))):s>=a?(i+=rc(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+rc(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=rc(n))),i}o(za,"finiteToString");function kE(r,e){var t=r[0];for(e*=At;t>=10;t/=10)e++;return e}o(kE,"getBase10Exponent");function OE(r,e,t){if(e>Ate)throw Ot=!0,t&&(r.precision=t),Error(k4);return yt(new r(BE),e,1,!0)}o(OE,"getLn10");function Wa(r,e,t){if(e>KT)throw Error(k4);return yt(new r(RE),e,t,!0)}o(Wa,"getPi");function F4(r){var e=r.length-1,t=e*At+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}o(F4,"getPrecision");function rc(r){for(var e="";r--;)e+="0";return e}o(rc,"getZeroString");function j4(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/At+4);for(Ot=!1;;){if(t%2&&(i=i.times(e),R4(i.d,a)&&(s=!0)),t=ys(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),R4(e.d,a)}return Ot=!0,i}o(j4,"intPow");function B4(r){return r.d[r.d.length-1]&1}o(B4,"isOdd");function M4(r,e,t){for(var n,s,i=new r(e[0]),a=0;++a<e.length;){if(s=new r(e[a]),!s.s){i=s;break}n=i.cmp(s),(n===t||n===0&&i.s===t)&&(i=s)}return i}o(M4,"maxOrMin");function $T(r,e){var t,n,s,i,a,u,c,l=0,h=0,m=0,g=r.constructor,v=g.rounding,y=g.precision;if(!r.d||!r.d[0]||r.e>17)return new g(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(Ot=!1,c=y):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(Pn(2,m))/Math.LN10*2+5|0,c+=n,t=i=a=new g(1),g.precision=c;;){if(i=yt(i.times(r),c,1),t=t.times(++h),u=a.plus(kr(i,t,c,1)),es(u.d).slice(0,c)===es(a.d).slice(0,c)){for(s=m;s--;)a=yt(a.times(a),c,1);if(e==null)if(l<3&&Xg(a.d,c-n,v,l))g.precision=c+=10,t=i=u=new g(1),h=0,l++;else return yt(a,g.precision=y,v,Ot=!0);else return g.precision=y,a}a=u}}o($T,"naturalExponential");function nc(r,e){var t,n,s,i,a,u,c,l,h,m,g,v=1,y=10,E=r,x=E.d,C=E.constructor,_=C.rounding,b=C.precision;if(E.s<0||!x||!x[0]||!E.e&&x[0]==1&&x.length==1)return new C(x&&!x[0]?-1/0:E.s!=1?NaN:x?0:E);if(e==null?(Ot=!1,h=b):h=e,C.precision=h+=y,t=es(x),n=t.charAt(0),Math.abs(i=E.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)E=E.times(r),t=es(E.d),n=t.charAt(0),v++;i=E.e,n>1?(E=new C("0."+t),i++):E=new C(n+"."+t.slice(1))}else return l=OE(C,h+2,b).times(i+""),E=nc(new C(n+"."+t.slice(1)),h-y).plus(l),C.precision=b,e==null?yt(E,b,_,Ot=!0):E;for(m=E,c=a=E=kr(E.minus(1),E.plus(1),h,1),g=yt(E.times(E),h,1),s=3;;){if(a=yt(a.times(g),h,1),l=c.plus(kr(a,new C(s),h,1)),es(l.d).slice(0,h)===es(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(OE(C,h+2,b).times(i+""))),c=kr(c,new C(v),h,1),e==null)if(Xg(c.d,h-y,_,u))C.precision=h+=y,l=a=E=kr(m.minus(1),m.plus(1),h,1),g=yt(E.times(E),h,1),s=u=1;else return yt(c,C.precision=b,_,Ot=!0);else return C.precision=b,c;c=l,s+=2}}o(nc,"naturalLogarithm");function q4(r){return String(r.s*r.s/0)}o(q4,"nonFiniteToString");function DE(r,e){var t,n,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%At,t<0&&(n+=At),n<s){for(n&&r.d.push(+e.slice(0,n)),s-=At;n<s;)r.d.push(+e.slice(n,n+=At));e=e.slice(n),n=At-e.length}else n-=s;for(;n--;)e+="0";r.d.push(+e),Ot&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}o(DE,"parseDecimal");function Nte(r,e){var t,n,s,i,a,u,c,l,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),U4.test(e))return DE(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(Ete.test(e))t=16,e=e.toLowerCase();else if(wte.test(e))t=2;else if(Ste.test(e))t=8;else throw Error(sc+e);for(i=e.search(/p/i),i>0?(c=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),a=i>=0,n=r.constructor,a&&(e=e.replace(".",""),u=e.length,i=u-i,s=j4(n,new n(t),i,i*2)),l=_E(e,t,ya),h=l.length-1,i=h;l[i]===0;--i)l.pop();return i<0?new n(r.s*0):(r.e=kE(l,h),r.d=l,Ot=!1,a&&(r=kr(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?Pn(2,c):zp.pow(2,c))),Ot=!0,r)}o(Nte,"parseOther");function Tte(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:Wp(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/LE(5,t)),e=Wp(r,2,e,e);for(var s,i=new r(5),a=new r(16),u=new r(20);t--;)s=e.times(e),e=e.times(i.plus(s.times(a.times(s).minus(u))));return e}o(Tte,"sine");function Wp(r,e,t,n,s){var i,a,u,c,l=1,h=r.precision,m=Math.ceil(h/At);for(Ot=!1,c=t.times(t),u=new r(n);;){if(a=kr(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=kr(a.times(c),new r(e++*e++),h,1),a=u.plus(n),a.d[m]!==void 0){for(i=m;a.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=a,a=i,l++}return Ot=!0,a.d.length=m+1,a}o(Wp,"taylorSeries");function LE(r,e){for(var t=r;--e;)t*=r;return t}o(LE,"tinyPow");function H4(r,e){var t,n=e.s<0,s=Wa(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Yo=n?4:1,e;if(t=e.divToInt(s),t.isZero())Yo=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Yo=B4(t)?n?2:3:n?4:1,e;Yo=B4(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(H4,"toLessThanHalfPi");function GT(r,e,t,n){var s,i,a,u,c,l,h,m,g,v=r.constructor,y=t!==void 0;if(y?(Hs(t,1,ic),n===void 0?n=v.rounding:Hs(n,0,8)):(t=v.precision,n=v.rounding),!r.isFinite())h=q4(r);else{for(h=za(r),a=h.indexOf("."),y?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(h=h.replace(".",""),g=new v(1),g.e=h.length-a,g.d=_E(za(g),10,s),g.e=g.d.length),m=_E(h,10,s),i=c=m.length;m[--c]==0;)m.pop();if(!m[0])h=y?"0p+0":"0";else{if(a<0?i--:(r=new v(r),r.d=m,r.e=i,r=kr(r,g,t,n,0,s),m=r.d,i=r.e,l=P4),a=m[t],u=s/2,l=l||m[t+1]!==void 0,l=n<4?(a!==void 0||l)&&(n===0||n===(r.s<0?3:2)):a>u||a===u&&(n===4||l||n===6&&m[t-1]&1||n===(r.s<0?8:7)),m.length=t,l)for(;++m[--t]>s-1;)m[t]=0,t||(++i,m.unshift(1));for(c=m.length;!m[c-1];--c);for(a=0,h="";a<c;a++)h+=qT.charAt(m[a]);if(y){if(c>1)if(e==16||e==8){for(a=e==16?4:3,--c;c%a;c++)h+="0";for(m=_E(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=qT.charAt(m[a])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>c)for(i-=c;i--;)h+="0";else i<c&&(h=h.slice(0,i)+"."+h.slice(i))}h=(e==16?"0x":e==2?"0b":e==8?"0o":"")+h}return r.s<0?"-"+h:h}o(GT,"toStringBinary");function R4(r,e){if(r.length>e)return r.length=e,!0}o(R4,"truncate");function Ite(r){return new this(r).abs()}o(Ite,"abs");function _te(r){return new this(r).acos()}o(_te,"acos");function Dte(r){return new this(r).acosh()}o(Dte,"acosh");function Bte(r,e){return new this(r).plus(e)}o(Bte,"add");function Rte(r){return new this(r).asin()}o(Rte,"asin");function Ote(r){return new this(r).asinh()}o(Ote,"asinh");function Pte(r){return new this(r).atan()}o(Pte,"atan");function kte(r){return new this(r).atanh()}o(kte,"atanh");function Lte(r,e){r=new this(r),e=new this(e);var t,n=this.precision,s=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Wa(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Wa(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Wa(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(kr(r,e,i,1)),e=Wa(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(kr(r,e,i,1)),t}o(Lte,"atan2");function Vte(r){return new this(r).cbrt()}o(Vte,"cbrt");function Ute(r){return yt(r=new this(r),r.e+1,2)}o(Ute,"ceil");function Fte(r,e,t){return new this(r).clamp(e,t)}o(Fte,"clamp");function jte(r){if(!r||typeof r!="object")throw Error(PE+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,ic,"rounding",0,8,"toExpNeg",-Xp,0,"toExpPos",0,Xp,"maxE",0,Xp,"minE",-Xp,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=HT[t]),(n=r[t])!==void 0)if(ys(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(sc+t+": "+n);if(t="crypto",s&&(this[t]=HT[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(L4);else this[t]=!1;else throw Error(sc+t+": "+n);return this}o(jte,"config");function Mte(r){return new this(r).cos()}o(Mte,"cos");function qte(r){return new this(r).cosh()}o(qte,"cosh");function K4(r){var e,t,n;function s(i){var a,u,c,l=this;if(!(l instanceof s))return new s(i);if(l.constructor=s,O4(i)){l.s=i.s,Ot?!i.d||i.e>s.maxE?(l.e=NaN,l.d=null):i.e<s.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(a=0,u=i;u>=10;u/=10)a++;Ot?a>s.maxE?(l.e=NaN,l.d=null):a<s.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[i]):(l.e=a,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return DE(l,i.toString())}if(c==="string")return(u=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(u===43&&(i=i.slice(1)),l.s=1),U4.test(i)?DE(l,i):Nte(l,i);if(c==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,DE(l,i.toString());throw Error(sc+i)}if(o(s,"Decimal"),s.prototype=Ve,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=jte,s.clone=K4,s.isDecimal=O4,s.abs=Ite,s.acos=_te,s.acosh=Dte,s.add=Bte,s.asin=Rte,s.asinh=Ote,s.atan=Pte,s.atanh=kte,s.atan2=Lte,s.cbrt=Vte,s.ceil=Ute,s.clamp=Fte,s.cos=Mte,s.cosh=qte,s.div=Hte,s.exp=Kte,s.floor=$te,s.hypot=Gte,s.ln=Xte,s.log=Wte,s.log10=Jte,s.log2=zte,s.max=Yte,s.min=Qte,s.mod=Zte,s.mul=ere,s.pow=tre,s.random=rre,s.round=nre,s.sign=sre,s.sin=ire,s.sinh=are,s.sqrt=ore,s.sub=ure,s.sum=cre,s.tan=lre,s.tanh=fre,s.trunc=hre,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return s.config(r),s}o(K4,"clone");function Hte(r,e){return new this(r).div(e)}o(Hte,"div");function Kte(r){return new this(r).exp()}o(Kte,"exp");function $te(r){return yt(r=new this(r),r.e+1,3)}o($te,"floor");function Gte(){var r,e,t=new this(0);for(Ot=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return Ot=!0,new this(1/0);t=e}return Ot=!0,t.sqrt()}o(Gte,"hypot");function O4(r){return r instanceof zp||r&&r.toStringTag===V4||!1}o(O4,"isDecimalInstance");function Xte(r){return new this(r).ln()}o(Xte,"ln");function Wte(r,e){return new this(r).log(e)}o(Wte,"log");function zte(r){return new this(r).log(2)}o(zte,"log2");function Jte(r){return new this(r).log(10)}o(Jte,"log10");function Yte(){return M4(this,arguments,-1)}o(Yte,"max");function Qte(){return M4(this,arguments,1)}o(Qte,"min");function Zte(r,e){return new this(r).mod(e)}o(Zte,"mod");function ere(r,e){return new this(r).mul(e)}o(ere,"mul");function tre(r,e){return new this(r).pow(e)}o(tre,"pow");function rre(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:Hs(r,1,ic),n=Math.ceil(r/At),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)s=e[i],s>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,i):(u.push(s%1e7),i+=4);i=n/4}else throw Error(L4);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=At,n&&r&&(s=Pn(10,At-r),u[i]=(n/s|0)*s);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=At)u.shift();for(n=1,s=u[0];s>=10;s/=10)n++;n<At&&(t-=At-n)}return a.e=t,a.d=u,a}o(rre,"random");function nre(r){return yt(r=new this(r),r.e+1,this.rounding)}o(nre,"round");function sre(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(sre,"sign");function ire(r){return new this(r).sin()}o(ire,"sin");function are(r){return new this(r).sinh()}o(are,"sinh");function ore(r){return new this(r).sqrt()}o(ore,"sqrt");function ure(r,e){return new this(r).sub(e)}o(ure,"sub");function cre(){var r=0,e=arguments,t=new this(e[r]);for(Ot=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return Ot=!0,yt(t,this.precision,this.rounding)}o(cre,"sum");function lre(r){return new this(r).tan()}o(lre,"tan");function fre(r){return new this(r).tanh()}o(fre,"tanh");function hre(r){return yt(r=new this(r),r.e+1,1)}o(hre,"trunc");Ve[Symbol.for("nodejs.util.inspect.custom")]=Ve.toString;Ve[Symbol.toStringTag]="Decimal";var zp=Ve.constructor=K4(HT);BE=new zp(BE);RE=new zp(RE);var pf=class r extends zp{static{o(this,"Decimal")}static from(e){return new r(e)}static newOrZero(e){return e===void 0?r.from(0):r.from(e)}static newOrUndefined(e){if(e!==void 0)return r.from(e)}};var $4=or(require("pdfkit"),1);var XT=class r{static{o(this,"PdfkitPdfBuilder")}defaults={autoFirstPage:!1};doc=new $4.default(this.defaults);constructor(e){e&&this.configure(e)}static new(e){return new r(e)}configure(e){return this.doc.options={...this.doc.options,...e},this}pipe(e){return this.doc.pipe(e),this}end(){return this.doc.end()}restore(){return this.doc.restore(),this}save(){return this.doc.save(),this}stroke(e){return this.doc.stroke(e),this}page(e){return this.doc.addPage(e),this}table(e){return this.doc.table(e),this}text(e,t){let{x:n,y:s,...i}=t??{};return n||s?(this.doc.text(e,n,s,i),this):(this.doc.text(e,t),this)}fontSize(e){return this.doc.fontSize(e),this}font(e,t,n){return typeof t=="string"?(this.doc.font(e,t,n),this):typeof t=="number"?(this.doc.font(e,t),this):(this.doc.font(e),this)}image(e,t,n,s){return typeof t=="number"&&typeof n=="number"?(this.doc.image(e,t,n,s),this):(this.doc.image(e,t),this)}rect(e,t,n,s){return this.doc.rect(e,t,n,s),this}path(e){return this.doc.path(e),this}translate(e,t){return this.doc.translate(e,t),this}scale(e,t){return this.doc.scale(e,t),this}fill(e,t){return this.doc.fill(e,t),this}pageWidth(){return this.doc.page.width}pageHeight(){return this.doc.page.height}heightOfString(e,t){return this.doc.heightOfString(e,t)}widthOfString(e,t){return this.doc.widthOfString(e,t)}pageMargins(){return this.doc.page.margins}currentLineHeight(e){return this.doc.currentLineHeight(e)}x(){return this.doc.x}y(){return this.doc.y}moveDown(e){return this.doc.moveDown(e),this}row(e,...t){let n,s;typeof e=="function"?(n={},s=[e,...t]):(n=e??{},s=t),n.columns??=1;let i=this.y(),a=n.right??0,u=n.left??0,c=n.gap??0,l=this.pageWidth(),h=l-u-a-c*(n.columns-1);n.size??=Array(n.columns).fill(12/n.columns);let m=[];for(let g=0;g<n.columns;g++){let v=n.size[g]/12;m[g]=h*v}for(let g=0,v=u;g<n.columns;g++){let y=g===n.columns-1,E=m[g];if(y&&n.columns>1){let _=l-a-v;_>0&&Math.abs(_-E)>.01&&(E=_)}let x={y:i,x:v,width:E};s[g](x),v+=E,c>0&&!y&&(v+=c)}return this}};var WT=class{static{o(this,"MemoryCacheAdapter")}cache=new Map;async get(e){return Promise.resolve(this.cache.get(e)??null)}has(e){return Promise.resolve(this.cache.has(e))}set(e,t){return this.cache.set(e,t),Promise.resolve(!0)}};var QI=or(require("fs"),1),uV=or(require("path"),1),ly=or(require("crypto"),1),yc=or(oV(),1);var zie=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),bf=o(r=>typeof r=="string"?gs(new Xr(r)):r instanceof Error?gs(new Xr(r.message,{cause:r.cause})):zie(r)?gs(new Xr(r.message)):gs(new Xr("unexpected error")),"leftFromError");var cy=class{static{o(this,"NullCacheAdapter")}async get(e){return Promise.resolve(null)}has(e){return Promise.resolve(!1)}set(e,t){return Promise.resolve(!0)}};var ZI=class{static{o(this,"NativeCertificateRepository")}httpClient;signer;cache;constructor(e,t,n=new cy){this.httpClient=e,this.signer=t,this.cache=n}async read(e){try{let{password:t,pfxPathOrBase64:n}=e;if(!n)return gs(new Xr("Certificate path is required"));let s=await this.getPfxBuffer(e);if(s.isLeft())return s;let i=yc.default.asn1.fromDer(s.value.toString("binary")),a=yc.default.pkcs12.pkcs12FromAsn1(i,t),{certBag:u}=yc.default.pki.oids,l=a.getBags({bagType:u})[u];if(!l?.length)return gs(new Xr("Cannot read certificate"));let[{cert:h},...m]=l;if(!h)return gs(new Xr("Issuer Certificate not found"));let g=m.reduce((y,{cert:E})=>(E&&y.push(new ly.default.X509Certificate(yc.default.pki.certificateToPem(E))),y),[]),v=new ly.default.X509Certificate(yc.default.pki.certificateToPem(h));return ji({ca:g,password:t,certificate:v,privateKey:this.getPrivateKey(a)})}catch(t){return bf(t)}}getPrivateKey(e){let{pkcs8ShroudedKeyBag:t}=yc.default.pki.oids,s=e.getBags({bagType:t})[t]?.[0]?.key;if(s)return ly.default.createPrivateKey(yc.default.pki.privateKeyToPem(s))}async sign(e,t,n=Jo.SHA1){return this.signer.sign(e,t,n)}getCertificateInfo(e){return new Af().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"})}catch{throw new Xr("Cannot extract private key")}}async getPfxBuffer(e){let{pfxPathOrBase64:t,password:n}=e,s=this.getCacheKey(t,n),i=await this.cache.get(s);if(i)return ji(i);if(uV.default.isAbsolute(t)||QI.default.existsSync(t))return this.hitBufferOnCache(s,QI.default.readFileSync(t));if(this.isValidRemoteUrl(t))try{let a=await this.httpClient.get(t,{responseType:"arraybuffer"});return await this.hitBufferOnCache(s,Buffer.from(a.data))}catch(a){return bf(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return ly.default.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),ji(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var T7=or(require("os"),1),I7=require("crypto"),cA=require("https"),_7=or(lH(),1);function iv(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(iv,"bind");var{toString:T0e}=Object.prototype,{getPrototypeOf:uR}=Object,{iterator:$b,toStringTag:hH}=Symbol,Gb=(r=>e=>{let t=T0e.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Na=o(r=>(r=r.toLowerCase(),e=>Gb(e)===r),"kindOfTest"),Xb=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:Xd}=Array,Gd=Xb("undefined");function av(r){return r!==null&&!Gd(r)&&r.constructor!==null&&!Gd(r.constructor)&&ti(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(av,"isBuffer");var pH=Na("ArrayBuffer");function I0e(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&pH(r.buffer),e}o(I0e,"isArrayBufferView");var _0e=Xb("string"),ti=Xb("function"),dH=Xb("number"),ov=o(r=>r!==null&&typeof r=="object","isObject"),D0e=o(r=>r===!0||r===!1,"isBoolean"),Kb=o(r=>{if(Gb(r)!=="object")return!1;let e=uR(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hH in r)&&!($b in r)},"isPlainObject"),B0e=o(r=>{if(!ov(r)||av(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),R0e=Na("Date"),O0e=Na("File"),P0e=Na("Blob"),k0e=Na("FileList"),L0e=o(r=>ov(r)&&ti(r.pipe),"isStream"),V0e=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ti(r.append)&&((e=Gb(r))==="formdata"||e==="object"&&ti(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),U0e=Na("URLSearchParams"),[F0e,j0e,M0e,q0e]=["ReadableStream","Request","Response","Headers"].map(Na),H0e=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function uv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),Xd(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(av(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(uv,"forEach");function mH(r,e){if(av(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(mH,"findKey");var Uf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gH=o(r=>!Gd(r)&&r!==Uf,"isContextDefined");function oR(){let{caseless:r,skipUndefined:e}=gH(this)&&this||{},t={},n=o((s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let a=r&&mH(t,i)||i;Kb(t[a])&&Kb(s)?t[a]=oR(t[a],s):Kb(s)?t[a]=oR({},s):Xd(s)?t[a]=s.slice():(!e||!Gd(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&uv(arguments[s],n);return t}o(oR,"merge");var K0e=o((r,e,t,{allOwnKeys:n}={})=>(uv(e,(s,i)=>{t&&ti(s)?Object.defineProperty(r,i,{value:iv(s,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),r),"extend"),$0e=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),G0e=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),X0e=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&uR(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),W0e=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),z0e=o(r=>{if(!r)return null;if(Xd(r))return r;let e=r.length;if(!dH(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),J0e=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&uR(Uint8Array)),Y0e=o((r,e)=>{let n=(r&&r[$b]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),Q0e=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Z0e=Na("HTMLFormElement"),ege=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),fH=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),tge=Na("RegExp"),yH=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};uv(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),rge=o(r=>{yH(r,(e,t)=>{if(ti(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(ti(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),nge=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return Xd(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),sge=o(()=>{},"noop"),ige=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function age(r){return!!(r&&ti(r.append)&&r[hH]==="FormData"&&r[$b])}o(age,"isSpecCompliantForm");var oge=o(r=>{let e=new Array(10),t=o((n,s)=>{if(ov(n)){if(e.indexOf(n)>=0)return;if(av(n))return n;if(!("toJSON"in n)){e[s]=n;let i=Xd(n)?[]:{};return uv(n,(a,u)=>{let c=t(a,s+1);!Gd(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),uge=Na("AsyncFunction"),cge=o(r=>r&&(ov(r)||ti(r))&&ti(r.then)&&ti(r.catch),"isThenable"),vH=((r,e)=>r?setImmediate:e?((t,n)=>(Uf.addEventListener("message",({source:s,data:i})=>{s===Uf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),Uf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ti(Uf.postMessage)),lge=typeof queueMicrotask<"u"?queueMicrotask.bind(Uf):typeof process<"u"&&process.nextTick||vH,fge=o(r=>r!=null&&ti(r[$b]),"isIterable"),ie={isArray:Xd,isArrayBuffer:pH,isBuffer:av,isFormData:V0e,isArrayBufferView:I0e,isString:_0e,isNumber:dH,isBoolean:D0e,isObject:ov,isPlainObject:Kb,isEmptyObject:B0e,isReadableStream:F0e,isRequest:j0e,isResponse:M0e,isHeaders:q0e,isUndefined:Gd,isDate:R0e,isFile:O0e,isBlob:P0e,isRegExp:tge,isFunction:ti,isStream:L0e,isURLSearchParams:U0e,isTypedArray:J0e,isFileList:k0e,forEach:uv,merge:oR,extend:K0e,trim:H0e,stripBOM:$0e,inherits:G0e,toFlatObject:X0e,kindOf:Gb,kindOfTest:Na,endsWith:W0e,toArray:z0e,forEachEntry:Y0e,matchAll:Q0e,isHTMLForm:Z0e,hasOwnProperty:fH,hasOwnProp:fH,reduceDescriptors:yH,freezeMethods:rge,toObjectSet:nge,toCamelCase:ege,noop:sge,toFiniteNumber:ige,findKey:mH,global:Uf,isContextDefined:gH,isSpecCompliantForm:age,toJSONObject:oge,isAsyncFn:uge,isThenable:cge,setImmediate:vH,asap:lge,isIterable:fge};var Ei=class xH extends Error{static{o(this,"AxiosError")}static from(e,t,n,s,i,a){let u=new xH(e.message,t||e.code,n,s,i);return u.cause=e,u.name=e.name,a&&Object.assign(u,a),u}constructor(e,t,n,s,i){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}};Ei.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ei.ERR_BAD_OPTION="ERR_BAD_OPTION";Ei.ECONNABORTED="ECONNABORTED";Ei.ETIMEDOUT="ETIMEDOUT";Ei.ERR_NETWORK="ERR_NETWORK";Ei.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ei.ERR_DEPRECATED="ERR_DEPRECATED";Ei.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ei.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ei.ERR_CANCELED="ERR_CANCELED";Ei.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ei.ERR_INVALID_URL="ERR_INVALID_URL";var Qe=Ei;var AH=or(bH(),1),Wb=AH.default;function pR(r){return ie.isPlainObject(r)||ie.isArray(r)}o(pR,"isVisitable");function NH(r){return ie.endsWith(r,"[]")?r.slice(0,-2):r}o(NH,"removeBrackets");function CH(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=NH(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(CH,"renderKey");function Ege(r){return ie.isArray(r)&&!r.some(pR)}o(Ege,"isFlatArray");var Sge=ie.toFlatObject(ie,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function bge(r,e,t){if(!ie.isObject(r))throw new TypeError("target must be an object");e=e||new(Wb||FormData),t=ie.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(E,x){return!ie.isUndefined(x[E])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(e);if(!ie.isFunction(s))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(ie.isDate(y))return y.toISOString();if(ie.isBoolean(y))return y.toString();if(!c&&ie.isBlob(y))throw new Qe("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(y)||ie.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}o(l,"convertValue");function h(y,E,x){let C=y;if(y&&!x&&typeof y=="object"){if(ie.endsWith(E,"{}"))E=n?E:E.slice(0,-2),y=JSON.stringify(y);else if(ie.isArray(y)&&Ege(y)||(ie.isFileList(y)||ie.endsWith(E,"[]"))&&(C=ie.toArray(y)))return E=NH(E),C.forEach(o(function(b,A){!(ie.isUndefined(b)||b===null)&&e.append(a===!0?CH([E],A,i):a===null?E:E+"[]",l(b))},"each")),!1}return pR(y)?!0:(e.append(CH(x,E,i),l(y)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(Sge,{defaultVisitor:h,convertValue:l,isVisitable:pR});function v(y,E){if(!ie.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(y),ie.forEach(y,o(function(C,_){(!(ie.isUndefined(C)||C===null)&&s.call(e,C,ie.isString(_)?_.trim():_,E,g))===!0&&v(C,E?E.concat(_):[_])},"each")),m.pop()}}if(o(v,"build"),!ie.isObject(r))throw new TypeError("data must be an object");return v(r),e}o(bge,"toFormData");var Hc=bge;function TH(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(TH,"encode");function IH(r,e){this._pairs=[],r&&Hc(r,this,e)}o(IH,"AxiosURLSearchParams");var _H=IH.prototype;_H.append=o(function(e,t){this._pairs.push([e,t])},"append");_H.toString=o(function(e){let t=e?function(n){return e.call(this,n,TH)}:TH;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");var DH=IH;function Age(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(Age,"encode");function Ff(r,e,t){if(!e)return r;let n=t&&t.encode||Age,s=ie.isFunction(t)?{serialize:t}:t,i=s&&s.serialize,a;if(i?a=i(e,s):a=ie.isURLSearchParams(e)?e.toString():new DH(e,s).toString(n),a){let u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}o(Ff,"buildURL");var Cge=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ie.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},dR=Cge;var Kc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var PH=or(require("crypto"),1);var BH=or(require("url"),1),RH=BH.default.URLSearchParams;var mR="abcdefghijklmnopqrstuvwxyz",OH="0123456789",kH={DIGIT:OH,ALPHA:mR,ALPHA_DIGIT:mR+mR.toUpperCase()+OH},Nge=o((r=16,e=kH.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);PH.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),LH={isNode:!0,classes:{URLSearchParams:RH,FormData:Wb,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:kH,generateString:Nge,protocols:["http","https","file","data"]};var vR={};AE(vR,{hasBrowserEnv:()=>yR,hasStandardBrowserEnv:()=>Tge,hasStandardBrowserWebWorkerEnv:()=>Ige,navigator:()=>gR,origin:()=>_ge});var yR=typeof window<"u"&&typeof document<"u",gR=typeof navigator=="object"&&navigator||void 0,Tge=yR&&(!gR||["ReactNative","NativeScript","NS"].indexOf(gR.product)<0),Ige=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_ge=yR&&window.location.href||"http://localhost";var br={...vR,...LH};function xR(r,e){return Hc(r,new br.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return br.isNode&&ie.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(xR,"toURLEncodedForm");function Dge(r){return ie.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Dge,"parsePropPath");function Bge(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(Bge,"arrayToObject");function Rge(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&ie.isArray(s)?s.length:a,c?(ie.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!ie.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&ie.isArray(s[a])&&(s[a]=Bge(s[a])),!u)}if(o(e,"buildPath"),ie.isFormData(r)&&ie.isFunction(r.entries)){let t={};return ie.forEachEntry(r,(n,s)=>{e(Dge(n),s,t,0)}),t}return null}o(Rge,"formDataToJSON");var zb=Rge;function Oge(r,e,t){if(ie.isString(r))try{return(e||JSON.parse)(r),ie.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Oge,"stringifySafely");var wR={transitional:Kc,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=ie.isObject(e);if(i&&ie.isHTMLForm(e)&&(e=new FormData(e)),ie.isFormData(e))return s?JSON.stringify(zb(e)):e;if(ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e)||ie.isReadableStream(e))return e;if(ie.isArrayBufferView(e))return e.buffer;if(ie.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return xR(e,this.formSerializer).toString();if((u=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Hc(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Oge(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||wR.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ie.isResponse(e)||ie.isReadableStream(e))return e;if(e&&ie.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?Qe.from(u,Qe.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:br.classes.FormData,Blob:br.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],r=>{wR.headers[r]={}});var Wd=wR;var Pge=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),VH=o((r=>{let e={},t,n,s;return r&&r.split(`
99
+ `?(S.line++,S.column=0):S.column++);S.textNode+=N.substring(Ee,G-1)}P==="<"&&!(S.sawRoot&&S.closedRoot&&!S.strict)?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):(!b(P)&&(!S.sawRoot||S.closedRoot)&&Y(S,"Text data outside of root node."),P==="&"?S.state=I.TEXT_ENTITY:S.textNode+=P);continue;case I.SCRIPT:P==="<"?S.state=I.SCRIPT_ENDING:S.script+=P;continue;case I.SCRIPT_ENDING:P==="/"?S.state=I.CLOSE_TAG:(S.script+="<"+P,S.state=I.SCRIPT);continue;case I.OPEN_WAKA:if(P==="!")S.state=I.SGML_DECL,S.sgmlDecl="";else if(!b(P))if(B(E,P))S.state=I.OPEN_TAG,S.tagName=P;else if(P==="/")S.state=I.CLOSE_TAG,S.tagName="";else if(P==="?")S.state=I.PROC_INST,S.procInstName=S.procInstBody="";else{if(Y(S,"Unencoded <"),S.startTagPosition+1<S.position){var Ce=S.position-S.startTagPosition;P=new Array(Ce).join(" ")+P}S.textNode+="<"+P,S.state=I.TEXT}continue;case I.SGML_DECL:if(S.sgmlDecl+P==="--"){S.state=I.COMMENT,S.comment="",S.sgmlDecl="";continue}S.doctype&&S.doctype!==!0&&S.sgmlDecl?(S.state=I.DOCTYPE_DTD,S.doctype+="<!"+S.sgmlDecl+P,S.sgmlDecl=""):(S.sgmlDecl+P).toUpperCase()===h?(q(S,"onopencdata"),S.state=I.CDATA,S.sgmlDecl="",S.cdata=""):(S.sgmlDecl+P).toUpperCase()===m?(S.state=I.DOCTYPE,(S.doctype||S.sawRoot)&&Y(S,"Inappropriately located doctype declaration"),S.doctype="",S.sgmlDecl=""):P===">"?(q(S,"onsgmldeclaration",S.sgmlDecl),S.sgmlDecl="",S.state=I.TEXT):(A(P)&&(S.state=I.SGML_DECL_QUOTED),S.sgmlDecl+=P);continue;case I.SGML_DECL_QUOTED:P===S.q&&(S.state=I.SGML_DECL,S.q=""),S.sgmlDecl+=P;continue;case I.DOCTYPE:P===">"?(S.state=I.TEXT,q(S,"ondoctype",S.doctype),S.doctype=!0):(S.doctype+=P,P==="["?S.state=I.DOCTYPE_DTD:A(P)&&(S.state=I.DOCTYPE_QUOTED,S.q=P));continue;case I.DOCTYPE_QUOTED:S.doctype+=P,P===S.q&&(S.q="",S.state=I.DOCTYPE);continue;case I.DOCTYPE_DTD:P==="]"?(S.doctype+=P,S.state=I.DOCTYPE):P==="<"?(S.state=I.OPEN_WAKA,S.startTagPosition=S.position):A(P)?(S.doctype+=P,S.state=I.DOCTYPE_DTD_QUOTED,S.q=P):S.doctype+=P;continue;case I.DOCTYPE_DTD_QUOTED:S.doctype+=P,P===S.q&&(S.state=I.DOCTYPE_DTD,S.q="");continue;case I.COMMENT:P==="-"?S.state=I.COMMENT_ENDING:S.comment+=P;continue;case I.COMMENT_ENDING:P==="-"?(S.state=I.COMMENT_ENDED,S.comment=he(S.opt,S.comment),S.comment&&q(S,"oncomment",S.comment),S.comment=""):(S.comment+="-"+P,S.state=I.COMMENT);continue;case I.COMMENT_ENDED:P!==">"?(Y(S,"Malformed comment"),S.comment+="--"+P,S.state=I.COMMENT):S.doctype&&S.doctype!==!0?S.state=I.DOCTYPE_DTD:S.state=I.TEXT;continue;case I.CDATA:P==="]"?S.state=I.CDATA_ENDING:S.cdata+=P;continue;case I.CDATA_ENDING:P==="]"?S.state=I.CDATA_ENDING_2:(S.cdata+="]"+P,S.state=I.CDATA);continue;case I.CDATA_ENDING_2:P===">"?(S.cdata&&q(S,"oncdata",S.cdata),q(S,"onclosecdata"),S.cdata="",S.state=I.TEXT):P==="]"?S.cdata+="]":(S.cdata+="]]"+P,S.state=I.CDATA);continue;case I.PROC_INST:P==="?"?S.state=I.PROC_INST_ENDING:b(P)?S.state=I.PROC_INST_BODY:S.procInstName+=P;continue;case I.PROC_INST_BODY:if(!S.procInstBody&&b(P))continue;P==="?"?S.state=I.PROC_INST_ENDING:S.procInstBody+=P;continue;case I.PROC_INST_ENDING:P===">"?(q(S,"onprocessinginstruction",{name:S.procInstName,body:S.procInstBody}),S.procInstName=S.procInstBody="",S.state=I.TEXT):(S.procInstBody+="?"+P,S.state=I.PROC_INST_BODY);continue;case I.OPEN_TAG:B(x,P)?S.tagName+=P:(ye(S),P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:(b(P)||Y(S,"Invalid character in tag name"),S.state=I.ATTRIB));continue;case I.OPEN_TAG_SLASH:P===">"?(ne(S,!0),Z(S)):(Y(S,"Forward-slash in opening tag not followed by >"),S.state=I.ATTRIB);continue;case I.ATTRIB:if(b(P))continue;P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME:P==="="?S.state=I.ATTRIB_VALUE:P===">"?(Y(S,"Attribute without value"),S.attribValue=S.attribName,ze(S),ne(S)):b(P)?S.state=I.ATTRIB_NAME_SAW_WHITE:B(x,P)?S.attribName+=P:Y(S,"Invalid attribute name");continue;case I.ATTRIB_NAME_SAW_WHITE:if(P==="=")S.state=I.ATTRIB_VALUE;else{if(b(P))continue;Y(S,"Attribute without value"),S.tag.attributes[S.attribName]="",S.attribValue="",q(S,"onattribute",{name:S.attribName,value:""}),S.attribName="",P===">"?ne(S):B(E,P)?(S.attribName=P,S.state=I.ATTRIB_NAME):(Y(S,"Invalid attribute name"),S.state=I.ATTRIB)}continue;case I.ATTRIB_VALUE:if(b(P))continue;A(P)?(S.q=P,S.state=I.ATTRIB_VALUE_QUOTED):(S.opt.unquotedAttributeValues||pe(S,"Unquoted attribute value"),S.state=I.ATTRIB_VALUE_UNQUOTED,S.attribValue=P);continue;case I.ATTRIB_VALUE_QUOTED:if(P!==S.q){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_Q:S.attribValue+=P;continue}ze(S),S.q="",S.state=I.ATTRIB_VALUE_CLOSED;continue;case I.ATTRIB_VALUE_CLOSED:b(P)?S.state=I.ATTRIB:P===">"?ne(S):P==="/"?S.state=I.OPEN_TAG_SLASH:B(E,P)?(Y(S,"No whitespace between attributes"),S.attribName=P,S.attribValue="",S.state=I.ATTRIB_NAME):Y(S,"Invalid attribute name");continue;case I.ATTRIB_VALUE_UNQUOTED:if(!T(P)){P==="&"?S.state=I.ATTRIB_VALUE_ENTITY_U:S.attribValue+=P;continue}ze(S),P===">"?ne(S):S.state=I.ATTRIB;continue;case I.CLOSE_TAG:if(S.tagName)P===">"?Z(S):B(x,P)?S.tagName+=P:S.script?(S.script+="</"+S.tagName,S.tagName="",S.state=I.SCRIPT):(b(P)||Y(S,"Invalid tagname in closing tag"),S.state=I.CLOSE_TAG_SAW_WHITE);else{if(b(P))continue;M(E,P)?S.script?(S.script+="</"+P,S.state=I.SCRIPT):Y(S,"Invalid tagname in closing tag."):S.tagName=P}continue;case I.CLOSE_TAG_SAW_WHITE:if(b(P))continue;P===">"?Z(S):Y(S,"Invalid characters in closing tag");continue;case I.TEXT_ENTITY:case I.ATTRIB_VALUE_ENTITY_Q:case I.ATTRIB_VALUE_ENTITY_U:var Ae,Je;switch(S.state){case I.TEXT_ENTITY:Ae=I.TEXT,Je="textNode";break;case I.ATTRIB_VALUE_ENTITY_Q:Ae=I.ATTRIB_VALUE_QUOTED,Je="attribValue";break;case I.ATTRIB_VALUE_ENTITY_U:Ae=I.ATTRIB_VALUE_UNQUOTED,Je="attribValue";break}if(P===";"){var Tt=Se(S);S.opt.unparsedEntities&&!Object.values(r.XML_ENTITIES).includes(Tt)?(S.entity="",S.state=Ae,S.write(Tt)):(S[Je]+=Tt,S.entity="",S.state=Ae)}else B(S.entity.length?_:C,P)?S.entity+=P:(Y(S,"Invalid character in entity name"),S[Je]+="&"+S.entity+P,S.entity="",S.state=Ae);continue;default:throw new Error(S,"Unknown state: "+S.state)}return S.position>=S.bufferCheckPosition&&n(S),S}o(tt,"write");String.fromCodePoint||(function(){var N=String.fromCharCode,S=Math.floor,G=o(function(){var P=16384,Ee=[],Ce,Ae,Je=-1,Tt=arguments.length;if(!Tt)return"";for(var Me="";++Je<Tt;){var Et=Number(arguments[Je]);if(!isFinite(Et)||Et<0||Et>1114111||S(Et)!==Et)throw RangeError("Invalid code point: "+Et);Et<=65535?Ee.push(Et):(Et-=65536,Ce=(Et>>10)+55296,Ae=Et%1024+56320,Ee.push(Ce,Ae)),(Je+1===Tt||Ee.length>P)&&(Me+=N.apply(null,Ee),Ee.length=0)}return Me},"fromCodePoint");Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:G,configurable:!0,writable:!0}):String.fromCodePoint=G})()})(typeof CA>"u"?CA.sax={}:CA)});var YK=te(JR=>{"use strict";(function(){"use strict";JR.stripBOM=function(r){return r[0]==="\uFEFF"?r.substring(1):r}}).call(JR)});var YR=te(Kf=>{"use strict";(function(){"use strict";var r;r=new RegExp(/(?!xmlns)^.*:/),Kf.normalize=function(e){return e.toLowerCase()},Kf.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},Kf.stripPrefix=function(e){return e.replace(r,"")},Kf.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},Kf.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(Kf)});var QK=te(pu=>{"use strict";(function(){"use strict";var r,e,t,n,s,i,a,u,c,l=o(function(g,v){return function(){return g.apply(v,arguments)}},"bind"),h=o(function(g,v){for(var y in v)m.call(v,y)&&(g[y]=v[y]);function E(){this.constructor=g}return o(E,"ctor"),E.prototype=v.prototype,g.prototype=new E,g.__super__=v.prototype,g},"extend"),m={}.hasOwnProperty;u=JK(),n=require("events"),r=YK(),a=YR(),c=require("timers").setImmediate,e=lA().defaults,s=o(function(g){return typeof g=="object"&&g!=null&&Object.keys(g).length===0},"isEmpty"),i=o(function(g,v,y){var E,x,C;for(E=0,x=g.length;E<x;E++)C=g[E],v=C(v,y);return v},"processItem"),t=o(function(g,v,y){var E;return E=Object.create(null),E.value=y,E.writable=!0,E.enumerable=!0,E.configurable=!0,Object.defineProperty(g,v,E)},"defineProperty"),pu.Parser=(function(g){h(v,g);function v(y){this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var E,x,C;if(!(this instanceof pu.Parser))return new pu.Parser(y);this.options={},x=e["0.2"];for(E in x)m.call(x,E)&&(C=x[E],this.options[E]=C);for(E in y)m.call(y,E)&&(C=y[E],this.options[E]=C);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(a.normalize)),this.reset()}return o(v,"Parser"),v.prototype.processAsync=function(){var y,E;try{return this.remaining.length<=this.options.chunkSize?(y=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(y),this.saxParser.close()):(y=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(y),c(this.processAsync))}catch(x){if(E=x,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(E)}},v.prototype.assignOrPush=function(y,E,x){return E in y?(y[E]instanceof Array||t(y,E,[y[E]]),y[E].push(x)):this.options.explicitArray?t(y,E,[x]):t(y,E,x)},v.prototype.reset=function(){var y,E,x,C;return this.removeAllListeners(),this.saxParser=u.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(function(_){return function(b){if(_.saxParser.resume(),!_.saxParser.errThrown)return _.saxParser.errThrown=!0,_.emit("error",b)}})(this),this.saxParser.onend=(function(_){return function(){if(!_.saxParser.ended)return _.saxParser.ended=!0,_.emit("end",_.resultObject)}})(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],y=this.options.attrkey,E=this.options.charkey,this.saxParser.onopentag=(function(_){return function(b){var A,T,B,M,I;if(B={},B[E]="",!_.options.ignoreAttrs){I=b.attributes;for(A in I)m.call(I,A)&&(!(y in B)&&!_.options.mergeAttrs&&(B[y]={}),T=_.options.attrValueProcessors?i(_.options.attrValueProcessors,b.attributes[A],A):b.attributes[A],M=_.options.attrNameProcessors?i(_.options.attrNameProcessors,A):A,_.options.mergeAttrs?_.assignOrPush(B,M,T):t(B[y],M,T))}return B["#name"]=_.options.tagNameProcessors?i(_.options.tagNameProcessors,b.name):b.name,_.options.xmlns&&(B[_.options.xmlnskey]={uri:b.uri,local:b.local}),C.push(B)}})(this),this.saxParser.onclosetag=(function(_){return function(){var b,A,T,B,M,I,H,K,q,W;if(I=C.pop(),M=I["#name"],(!_.options.explicitChildren||!_.options.preserveChildrenOrder)&&delete I["#name"],I.cdata===!0&&(b=I.cdata,delete I.cdata),q=C[C.length-1],I[E].match(/^\s*$/)&&!b?(A=I[E],delete I[E]):(_.options.trim&&(I[E]=I[E].trim()),_.options.normalize&&(I[E]=I[E].replace(/\s{2,}/g," ").trim()),I[E]=_.options.valueProcessors?i(_.options.valueProcessors,I[E],M):I[E],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])),s(I)&&(typeof _.options.emptyTag=="function"?I=_.options.emptyTag():I=_.options.emptyTag!==""?_.options.emptyTag:A),_.options.validator!=null&&(W="/"+(function(){var he,pe,ue;for(ue=[],he=0,pe=C.length;he<pe;he++)B=C[he],ue.push(B["#name"]);return ue})().concat(M).join("/"),(function(){var he;try{return I=_.options.validator(W,q&&q[M],I)}catch(pe){return he=pe,_.emit("error",he)}})()),_.options.explicitChildren&&!_.options.mergeAttrs&&typeof I=="object"){if(!_.options.preserveChildrenOrder)B={},_.options.attrkey in I&&(B[_.options.attrkey]=I[_.options.attrkey],delete I[_.options.attrkey]),!_.options.charsAsChildren&&_.options.charkey in I&&(B[_.options.charkey]=I[_.options.charkey],delete I[_.options.charkey]),Object.getOwnPropertyNames(I).length>0&&(B[_.options.childkey]=I),I=B;else if(q){q[_.options.childkey]=q[_.options.childkey]||[],H={};for(T in I)m.call(I,T)&&t(H,T,I[T]);q[_.options.childkey].push(H),delete I["#name"],Object.keys(I).length===1&&E in I&&!_.EXPLICIT_CHARKEY&&(I=I[E])}}return C.length>0?_.assignOrPush(q,M,I):(_.options.explicitRoot&&(K=I,I={},t(I,M,K)),_.resultObject=I,_.saxParser.ended=!0,_.emit("end",_.resultObject))}})(this),x=(function(_){return function(b){var A,T;if(T=C[C.length-1],T)return T[E]+=b,_.options.explicitChildren&&_.options.preserveChildrenOrder&&_.options.charsAsChildren&&(_.options.includeWhiteChars||b.replace(/\\n/g,"").trim()!=="")&&(T[_.options.childkey]=T[_.options.childkey]||[],A={"#name":"__text__"},A[E]=b,_.options.normalize&&(A[E]=A[E].replace(/\s{2,}/g," ").trim()),T[_.options.childkey].push(A)),T}})(this),this.saxParser.ontext=x,this.saxParser.oncdata=(function(_){return function(b){var A;if(A=x(b),A)return A.cdata=!0}})(this)},v.prototype.parseString=function(y,E){var x;E!=null&&typeof E=="function"&&(this.on("end",function(C){return this.reset(),E(null,C)}),this.on("error",function(C){return this.reset(),E(C)}));try{return y=y.toString(),y.trim()===""?(this.emit("end",null),!0):(y=r.stripBOM(y),this.options.async?(this.remaining=y,c(this.processAsync),this.saxParser):this.saxParser.write(y).close())}catch(C){if(x=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw x}else return this.emit("error",x),this.saxParser.errThrown=!0}},v.prototype.parseStringPromise=function(y){return new Promise((function(E){return function(x,C){return E.parseString(y,function(_,b){return _?C(_):x(b)})}})(this))},v})(n),pu.parseString=function(g,v,y){var E,x,C;return y!=null?(typeof y=="function"&&(E=y),typeof v=="object"&&(x=v)):(typeof v=="function"&&(E=v),x={}),C=new pu.Parser(x),C.parseString(g,E)},pu.parseStringPromise=function(g,v){var y,E;return typeof v=="object"&&(y=v),E=new pu.Parser(y),E.parseStringPromise(g)}}).call(pu)});var ZK=te(du=>{"use strict";(function(){"use strict";var r,e,t,n,s=o(function(a,u){for(var c in u)i.call(u,c)&&(a[c]=u[c]);function l(){this.constructor=a}return o(l,"ctor"),l.prototype=u.prototype,a.prototype=new l,a.__super__=u.prototype,a},"extend"),i={}.hasOwnProperty;e=lA(),r=zK(),t=QK(),n=YR(),du.defaults=e.defaults,du.processors=n,du.ValidationError=(function(a){s(u,a);function u(c){this.message=c}return o(u,"ValidationError"),u})(Error),du.Builder=r.Builder,du.Parser=t.Parser,du.parseString=t.parseString,du.parseStringPromise=t.parseStringPromise}).call(du)});var Nwe={};AE(Nwe,{ASN1:()=>Af,CanonicalizationMethod:()=>OT,Choice:()=>bwe,Decimal:()=>pf,DigestAlgorithm:()=>TE,EntitySigner:()=>VT,Environment:()=>gte,IsDecimal:()=>I3,MemoryCacheAdapter:()=>WT,NFeTsError:()=>Xr,NativeCertificateRepository:()=>ZI,NullCacheAdapter:()=>cy,PdfkitPdfBuilder:()=>XT,SignatureAlgorithm:()=>Jo,SignatureMethod:()=>NE,SignatureNamespace:()=>CE,Signer:()=>hf,SkipAllValidations:()=>vte,SkipValidation:()=>yte,SkipValidationMetadata:()=>Gp,SoapRemoteTransmissionRepository:()=>MR,StateAcronyms:()=>mte,StateCodeAcValidator:()=>D3,StateCodeAlValidator:()=>B3,StateCodeAmValidator:()=>R3,StateCodeApValidator:()=>O3,StateCodeBaValidator:()=>P3,StateCodeCeValidator:()=>k3,StateCodeDfValidator:()=>L3,StateCodeEsValidator:()=>V3,StateCodeGoValidator:()=>U3,StateCodeMaValidator:()=>F3,StateCodeMgValidator:()=>j3,StateCodeMsValidator:()=>M3,StateCodeMtValidator:()=>q3,StateCodePaValidator:()=>H3,StateCodePbValidator:()=>K3,StateCodePeValidator:()=>$3,StateCodePiValidator:()=>G3,StateCodePrValidator:()=>X3,StateCodeRjValidator:()=>W3,StateCodeRnValidator:()=>z3,StateCodeRoValidator:()=>J3,StateCodeRrValidator:()=>Y3,StateCodeRsValidator:()=>Q3,StateCodeScValidator:()=>Z3,StateCodeSeValidator:()=>ek,StateCodeSpValidator:()=>tk,StateCodeToValidator:()=>rk,StateCodes:()=>Nr,TransformDateString:()=>Cwe,TransformDecimal:()=>Awe,ValidateErrorsMetadata:()=>jT,Validates:()=>xte,ValidationError:()=>PT,Xml2JsToolkit:()=>T3,XmlSigner:()=>UT,clearEmptyValues:()=>Gg,mapConstraintsToErrors:()=>MT,plainToInstance:()=>FT});module.exports=dte(Nwe);var CE="http://www.w3.org/2000/09/xmldsig#",OT="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",NE=(function(r){return r.RSA_SHA1="http://www.w3.org/2000/09/xmldsig#rsa-sha1",r.RSA_SHA256="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",r})({}),Jo=(function(r){return r.SHA1="sha1",r.SHA256="sha256",r})({}),TE=(function(r){return r.SHA1="http://www.w3.org/2000/09/xmldsig#sha1",r.SHA256="http://www.w3.org/2001/04/xmlenc#sha256",r})({});var Nr={AC:"12",AL:"27",AM:"13",AP:"16",BA:"29",CE:"23",DF:"53",ES:"32",GO:"52",MA:"21",MG:"31",MS:"50",MT:"51",PA:"15",PB:"25",PE:"26",PI:"22",PR:"41",RJ:"33",RN:"24",RO:"11",RR:"14",RS:"43",SC:"42",SE:"28",SP:"35",TO:"17"},mte=Object.keys(Nr);var gte={Production:"1",Homolog:"2"};var Rwe={[Nr.AC]:"America/Rio_Branco",[Nr.AL]:"America/Maceio",[Nr.AM]:"America/Manaus",[Nr.AP]:"America/Belem",[Nr.BA]:"America/Bahia",[Nr.CE]:"America/Fortaleza",[Nr.DF]:"America/Sao_Paulo",[Nr.ES]:"America/Sao_Paulo",[Nr.GO]:"America/Sao_Paulo",[Nr.MA]:"America/Fortaleza",[Nr.MG]:"America/Sao_Paulo",[Nr.MS]:"America/Campo_Grande",[Nr.MT]:"America/Cuiaba",[Nr.PA]:"America/Belem",[Nr.PB]:"America/Fortaleza",[Nr.PE]:"America/Recife",[Nr.PI]:"America/Fortaleza",[Nr.PR]:"America/Sao_Paulo",[Nr.RJ]:"America/Sao_Paulo",[Nr.RN]:"America/Fortaleza",[Nr.RO]:"America/Porto_Velho",[Nr.RR]:"America/Boa_Vista",[Nr.RS]:"America/Sao_Paulo",[Nr.SC]:"America/Sao_Paulo",[Nr.SE]:"America/Maceio",[Nr.SP]:"America/Sao_Paulo",[Nr.TO]:"America/Araguaina"};var Xr=class extends Error{static{o(this,"NFeTsError")}};var PT=class extends Xr{static{o(this,"ValidationError")}};var $g={includeComments:!1,exclusive:!0};var kT=o(r=>{throw new Xr("Didn't expect to get here")},"unreachable");var hf=class{static{o(this,"Signer")}toolkit;certificateRepository;algorithm;canonical;constructor(e,t,n=Jo.SHA1,s=$g){this.toolkit=e,this.certificateRepository=t,this.algorithm=n,this.canonical=s}assemble(e,t,n){let s=this.certificateRepository.getStringCertificate(n);return{$:{xmlns:CE},SignedInfo:e,SignatureValue:t,KeyInfo:{X509Data:{X509Certificate:s}}}}signedInfo(e,t){return{CanonicalizationMethod:{$:{Algorithm:OT}},SignatureMethod:{$:{Algorithm:this.signatureMethod}},Reference:{$:{URI:`#${this.toolkit.getAttribute(e,t)}`},Transforms:this.transforms,DigestMethod:{$:{Algorithm:this.digestAlgorithm}},DigestValue:this.digest(e)}}}digest(e){return this.toolkit.digest(e,this.algorithm,this.canonical)}async signOrLeft(e,t){let n=this.toolkit.canonicalize(await this.toolkit.build({$:{xmlns:CE},...e},{rootName:"SignedInfo"}),this.canonical);return this.certificateRepository.sign(n,t,this.algorithm)}get transforms(){return{Transform:[{$:{Algorithm:"http://www.w3.org/2000/09/xmldsig#enveloped-signature"}},{$:{Algorithm:"http://www.w3.org/TR/2001/REC-xml-c14n-20010315"}}]}}get digestAlgorithm(){switch(this.algorithm){case Jo.SHA256:return TE.SHA256;case Jo.SHA1:return TE.SHA1;default:return kT(this.algorithm)}}get signatureMethod(){switch(this.algorithm){case Jo.SHA256:return NE.RSA_SHA256;case Jo.SHA1:return NE.RSA_SHA1;default:return kT(this.algorithm)}}};var LT=class{static{o(this,"Left")}value;constructor(e){this.value=e}isLeft(){return!0}isRight(){return!1}},IE=class{static{o(this,"Right")}value;constructor(e){this.value=e}isLeft(){return!1}isRight(){return!0}},gs=o(r=>new LT(r),"left"),ji=o(r=>r===void 0?new IE(void 0):new IE(r),"right");var VT=class extends hf{static{o(this,"EntitySigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n;if(!e[s])return gs(new Xr(`Node ${String(s)} not found`));let u=await this.toolkit.build(this.ns(e,s),{headless:!0,rootName:String(s),renderOpts:{pretty:!1}}),c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=e;return h.Signature=this.assemble(c,l.value,a),ji(h)}ns(e,t){let n=e.$?.xmlns,{$:s,...i}=e[t],{xmlns:a,...u}=s??{};return{$:{xmlns:n,...u},...i}}};var UT=class extends hf{static{o(this,"XmlSigner")}async sign(e,t,n){let{tag:s,mark:i}=t,{certificate:a}=n,u=this.toolkit.getNode(e,s);if(!u)return gs(new Xr(`Node ${s} not found`));let c=this.signedInfo(u,i),l=await this.signOrLeft(c,n);if(l.isLeft())return l;let h=await this.toolkit.build(this.assemble(c,l.value,a),{rootName:"Signature"});return ji(this.toolkit.appendNode(e,h))}};var NEe=require("reflect-metadata"),D4=require("class-validator");var EEe=require("reflect-metadata");var Gp="__SkipValidation__",yte=o(()=>(r,e)=>{Reflect.defineMetadata(Gp,!0,r,e.toString())},"SkipValidation"),vte=o(()=>r=>{Reflect.defineMetadata(Gp,!0,r)},"SkipAllValidations");var _4=require("class-transformer");var Gg=o(r=>{for(let[e,t]of Object.entries(r))typeof t>"u"&&delete r[e],t===""&&delete r[e],t&&typeof t=="object"&&Gg(t)},"clearEmptyValues"),FT=o((r,e,t={})=>{let n=(0,_4.plainToInstance)(e,r);return t.clearEmptyValues&&Gg(n),n},"plainToInstance");var jT="__ValidateErrors__",MT=o((r,e)=>r.reduce((t,n)=>{if(n.children?.length)return t.concat(MT(n.children,e?`${e}.${n.property}`:n.property));let s=Object.values(n.constraints??{}).map(i=>e?`${e}.${i}`:i).join(", ");return s?t.concat(s):t},[]),"mapConstraintsToErrors"),xte=o(r=>(e,t,n)=>{let s=n.value;n.value=function(...i){let a=Reflect.getMetadata(Gp,this.constructor);if(Reflect.getMetadata(Gp,this.constructor.prototype,t.toString())===!0||a===!0)return s?.apply(this,i);let[c,...l]=i;if(!c)return s?.apply(this,i);let h=FT(c,r),m=(0,D4.validateSync)(h,{whitelist:!0});if(Gg(h),m.length){let g=Reflect.getMetadata(jT,this)??[];Reflect.defineMetadata(jT,g.concat(MT(m,s?.name)),this)}return s?.apply(this,[h,...l])}},"Validates");var gFe=require("reflect-metadata");var Xp=9e15,ic=1e9,qT="0123456789abcdef",BE="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",RE="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",HT={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xp,maxE:Xp,crypto:!1},P4,Yo,Ot=!0,PE="[DecimalError] ",sc=PE+"Invalid argument: ",k4=PE+"Precision limit exceeded",L4=PE+"crypto unavailable",V4="[object Decimal]",ys=Math.floor,Pn=Math.pow,wte=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ete=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ste=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,U4=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ya=1e7,At=7,bte=9007199254740991,Ate=BE.length-1,KT=RE.length-1,Ve={toStringTag:V4};Ve.absoluteValue=Ve.abs=function(){var r=new this.constructor(this);return r.s<0&&(r.s=1),yt(r)};Ve.ceil=function(){return yt(new this.constructor(this),this.e+1,2)};Ve.clampedTo=Ve.clamp=function(r,e){var t,n=this,s=n.constructor;if(r=new s(r),e=new s(e),!r.s||!e.s)return new s(NaN);if(r.gt(e))throw Error(sc+e);return t=n.cmp(r),t<0?r:n.cmp(e)>0?e:new s(n)};Ve.comparedTo=Ve.cmp=function(r){var e,t,n,s,i=this,a=i.d,u=(r=new i.constructor(r)).d,c=i.s,l=r.s;if(!a||!u)return!c||!l?NaN:c!==l?c:a===u?0:!a^c<0?1:-1;if(!a[0]||!u[0])return a[0]?c:u[0]?-l:0;if(c!==l)return c;if(i.e!==r.e)return i.e>r.e^c<0?1:-1;for(n=a.length,s=u.length,e=0,t=n<s?n:s;e<t;++e)if(a[e]!==u[e])return a[e]>u[e]^c<0?1:-1;return n===s?0:n>s^c<0?1:-1};Ve.cosine=Ve.cos=function(){var r,e,t=this,n=t.constructor;return t.d?t.d[0]?(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+At,n.rounding=1,t=Cte(n,H4(n,t)),n.precision=r,n.rounding=e,yt(Yo==2||Yo==3?t.neg():t,r,e,!0)):new n(1):new n(NaN)};Ve.cubeRoot=Ve.cbrt=function(){var r,e,t,n,s,i,a,u,c,l,h=this,m=h.constructor;if(!h.isFinite()||h.isZero())return new m(h);for(Ot=!1,i=h.s*Pn(h.s*h,1/3),!i||Math.abs(i)==1/0?(t=es(h.d),r=h.e,(i=(r-t.length+1)%3)&&(t+=i==1||i==-2?"0":"00"),i=Pn(t,1/3),r=ys((r+1)/3)-(r%3==(r<0?-1:2)),i==1/0?t="5e"+r:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+r),n=new m(t),n.s=h.s):n=new m(i.toString()),a=(r=m.precision)+3;;)if(u=n,c=u.times(u).times(u),l=c.plus(h),n=kr(l.plus(h).times(u),l.plus(c),a+2,1),es(u.d).slice(0,a)===(t=es(n.d)).slice(0,a))if(t=t.slice(a-3,a+1),t=="9999"||!s&&t=="4999"){if(!s&&(yt(u,r+1,0),u.times(u).times(u).eq(h))){n=u;break}a+=4,s=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(yt(n,r+1,1),e=!n.times(n).times(n).eq(h));break}return Ot=!0,yt(n,r,m.rounding,e)};Ve.decimalPlaces=Ve.dp=function(){var r,e=this.d,t=NaN;if(e){if(r=e.length-1,t=(r-ys(this.e/At))*At,r=e[r],r)for(;r%10==0;r/=10)t--;t<0&&(t=0)}return t};Ve.dividedBy=Ve.div=function(r){return kr(this,new this.constructor(r))};Ve.dividedToIntegerBy=Ve.divToInt=function(r){var e=this,t=e.constructor;return yt(kr(e,new t(r),0,1,1),t.precision,t.rounding)};Ve.equals=Ve.eq=function(r){return this.cmp(r)===0};Ve.floor=function(){return yt(new this.constructor(this),this.e+1,3)};Ve.greaterThan=Ve.gt=function(r){return this.cmp(r)>0};Ve.greaterThanOrEqualTo=Ve.gte=function(r){var e=this.cmp(r);return e==1||e===0};Ve.hyperbolicCosine=Ve.cosh=function(){var r,e,t,n,s,i=this,a=i.constructor,u=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return u;t=a.precision,n=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,s=i.d.length,s<32?(r=Math.ceil(s/3),e=(1/LE(4,r)).toString()):(r=16,e="2.3283064365386962890625e-10"),i=Wp(a,1,i.times(e),new a(1),!0);for(var c,l=r,h=new a(8);l--;)c=i.times(i),i=u.minus(c.times(h.minus(c.times(h))));return yt(i,a.precision=t,a.rounding=n,!0)};Ve.hyperbolicSine=Ve.sinh=function(){var r,e,t,n,s=this,i=s.constructor;if(!s.isFinite()||s.isZero())return new i(s);if(e=i.precision,t=i.rounding,i.precision=e+Math.max(s.e,s.sd())+4,i.rounding=1,n=s.d.length,n<3)s=Wp(i,2,s,s,!0);else{r=1.4*Math.sqrt(n),r=r>16?16:r|0,s=s.times(1/LE(5,r)),s=Wp(i,2,s,s,!0);for(var a,u=new i(5),c=new i(16),l=new i(20);r--;)a=s.times(s),s=s.times(u.plus(a.times(c.times(a).plus(l))))}return i.precision=e,i.rounding=t,yt(s,e,t,!0)};Ve.hyperbolicTangent=Ve.tanh=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+7,n.rounding=1,kr(t.sinh(),t.cosh(),n.precision=r,n.rounding=e)):new n(t.s)};Ve.inverseCosine=Ve.acos=function(){var r=this,e=r.constructor,t=r.abs().cmp(1),n=e.precision,s=e.rounding;return t!==-1?t===0?r.isNeg()?Wa(e,n,s):new e(0):new e(NaN):r.isZero()?Wa(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,r=new e(1).minus(r).div(r.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,r.times(2))};Ve.inverseHyperbolicCosine=Ve.acosh=function(){var r,e,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(r=n.precision,e=n.rounding,n.precision=r+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,Ot=!1,t=t.times(t).minus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln()):new n(t)};Ve.inverseHyperbolicSine=Ve.asinh=function(){var r,e,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,Ot=!1,t=t.times(t).plus(1).sqrt().plus(t),Ot=!0,n.precision=r,n.rounding=e,t.ln())};Ve.inverseHyperbolicTangent=Ve.atanh=function(){var r,e,t,n,s=this,i=s.constructor;return s.isFinite()?s.e>=0?new i(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(r=i.precision,e=i.rounding,n=s.sd(),Math.max(n,r)<2*-s.e-1?yt(new i(s),r,e,!0):(i.precision=t=n-s.e,s=kr(s.plus(1),new i(1).minus(s),t+r,1),i.precision=r+4,i.rounding=1,s=s.ln(),i.precision=r,i.rounding=e,s.times(.5))):new i(NaN)};Ve.inverseSine=Ve.asin=function(){var r,e,t,n,s=this,i=s.constructor;return s.isZero()?new i(s):(e=s.abs().cmp(1),t=i.precision,n=i.rounding,e!==-1?e===0?(r=Wa(i,t+4,n).times(.5),r.s=s.s,r):new i(NaN):(i.precision=t+6,i.rounding=1,s=s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,s.times(2)))};Ve.inverseTangent=Ve.atan=function(){var r,e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding;if(l.isFinite()){if(l.isZero())return new h(l);if(l.abs().eq(1)&&m+4<=KT)return a=Wa(h,m+4,g).times(.25),a.s=l.s,a}else{if(!l.s)return new h(NaN);if(m+4<=KT)return a=Wa(h,m+4,g).times(.5),a.s=l.s,a}for(h.precision=u=m+10,h.rounding=1,t=Math.min(28,u/At+2|0),r=t;r;--r)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ot=!1,e=Math.ceil(u/At),n=1,c=l.times(l),a=new h(l),s=l;r!==-1;)if(s=s.times(c),i=a.minus(s.div(n+=2)),s=s.times(c),a=i.plus(s.div(n+=2)),a.d[e]!==void 0)for(r=e;a.d[r]===i.d[r]&&r--;);return t&&(a=a.times(2<<t-1)),Ot=!0,yt(a,h.precision=m,h.rounding=g,!0)};Ve.isFinite=function(){return!!this.d};Ve.isInteger=Ve.isInt=function(){return!!this.d&&ys(this.e/At)>this.d.length-2};Ve.isNaN=function(){return!this.s};Ve.isNegative=Ve.isNeg=function(){return this.s<0};Ve.isPositive=Ve.isPos=function(){return this.s>0};Ve.isZero=function(){return!!this.d&&this.d[0]===0};Ve.lessThan=Ve.lt=function(r){return this.cmp(r)<0};Ve.lessThanOrEqualTo=Ve.lte=function(r){return this.cmp(r)<1};Ve.logarithm=Ve.log=function(r){var e,t,n,s,i,a,u,c,l=this,h=l.constructor,m=h.precision,g=h.rounding,v=5;if(r==null)r=new h(10),e=!0;else{if(r=new h(r),t=r.d,r.s<0||!t||!t[0]||r.eq(1))return new h(NaN);e=r.eq(10)}if(t=l.d,l.s<0||!t||!t[0]||l.eq(1))return new h(t&&!t[0]?-1/0:l.s!=1?NaN:t?0:1/0);if(e)if(t.length>1)i=!0;else{for(s=t[0];s%10===0;)s/=10;i=s!==1}if(Ot=!1,u=m+v,a=nc(l,u),n=e?OE(h,u+10):nc(r,u),c=kr(a,n,u,1),Xg(c.d,s=m,g))do if(u+=10,a=nc(l,u),n=e?OE(h,u+10):nc(r,u),c=kr(a,n,u,1),!i){+es(c.d).slice(s+1,s+15)+1==1e14&&(c=yt(c,m+1,0));break}while(Xg(c.d,s+=10,g));return Ot=!0,yt(c,m,g)};Ve.minus=Ve.sub=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,v=this,y=v.constructor;if(r=new y(r),!v.d||!r.d)return!v.s||!r.s?r=new y(NaN):v.d?r.s=-r.s:r=new y(r.d||v.s!==r.s?v:NaN),r;if(v.s!=r.s)return r.s=-r.s,v.plus(r);if(l=v.d,g=r.d,u=y.precision,c=y.rounding,!l[0]||!g[0]){if(g[0])r.s=-r.s;else if(l[0])r=new y(v);else return new y(c===3?-0:0);return Ot?yt(r,u,c):r}if(t=ys(r.e/At),h=ys(v.e/At),l=l.slice(),i=h-t,i){for(m=i<0,m?(e=l,i=-i,a=g.length):(e=g,t=h,a=l.length),n=Math.max(Math.ceil(u/At),a)+2,i>n&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for(n=l.length,a=g.length,m=n<a,m&&(a=n),n=0;n<a;n++)if(l[n]!=g[n]){m=l[n]<g[n];break}i=0}for(m&&(e=l,l=g,g=e,r.s=-r.s),a=l.length,n=g.length-a;n>0;--n)l[a++]=0;for(n=g.length;n>i;){if(l[--n]<g[n]){for(s=n;s&&l[--s]===0;)l[s]=ya-1;--l[s],l[n]+=ya}l[n]-=g[n]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--t;return l[0]?(r.d=l,r.e=kE(l,t),Ot?yt(r,u,c):r):new y(c===3?-0:0)};Ve.modulo=Ve.mod=function(r){var e,t=this,n=t.constructor;return r=new n(r),!t.d||!r.s||r.d&&!r.d[0]?new n(NaN):!r.d||t.d&&!t.d[0]?yt(new n(t),n.precision,n.rounding):(Ot=!1,n.modulo==9?(e=kr(t,r.abs(),0,3,1),e.s*=r.s):e=kr(t,r,0,n.modulo,1),e=e.times(r),Ot=!0,t.minus(e))};Ve.naturalExponential=Ve.exp=function(){return $T(this)};Ve.naturalLogarithm=Ve.ln=function(){return nc(this)};Ve.negated=Ve.neg=function(){var r=new this.constructor(this);return r.s=-r.s,yt(r)};Ve.plus=Ve.add=function(r){var e,t,n,s,i,a,u,c,l,h,m=this,g=m.constructor;if(r=new g(r),!m.d||!r.d)return!m.s||!r.s?r=new g(NaN):m.d||(r=new g(r.d||m.s===r.s?m:NaN)),r;if(m.s!=r.s)return r.s=-r.s,m.minus(r);if(l=m.d,h=r.d,u=g.precision,c=g.rounding,!l[0]||!h[0])return h[0]||(r=new g(m)),Ot?yt(r,u,c):r;if(i=ys(m.e/At),n=ys(r.e/At),l=l.slice(),s=i-n,s){for(s<0?(t=l,s=-s,a=h.length):(t=h,n=i,a=l.length),i=Math.ceil(u/At),a=i>a?i+1:a+1,s>a&&(s=a,t.length=1),t.reverse();s--;)t.push(0);t.reverse()}for(a=l.length,s=h.length,a-s<0&&(s=a,t=h,h=l,l=t),e=0;s;)e=(l[--s]=l[s]+h[s]+e)/ya|0,l[s]%=ya;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return r.d=l,r.e=kE(l,n),Ot?yt(r,u,c):r};Ve.precision=Ve.sd=function(r){var e,t=this;if(r!==void 0&&r!==!!r&&r!==1&&r!==0)throw Error(sc+r);return t.d?(e=F4(t.d),r&&t.e+1>e&&(e=t.e+1)):e=NaN,e};Ve.round=function(){var r=this,e=r.constructor;return yt(new e(r),r.e+1,e.rounding)};Ve.sine=Ve.sin=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+Math.max(t.e,t.sd())+At,n.rounding=1,t=Tte(n,H4(n,t)),n.precision=r,n.rounding=e,yt(Yo>2?t.neg():t,r,e,!0)):new n(NaN)};Ve.squareRoot=Ve.sqrt=function(){var r,e,t,n,s,i,a=this,u=a.d,c=a.e,l=a.s,h=a.constructor;if(l!==1||!u||!u[0])return new h(!l||l<0&&(!u||u[0])?NaN:u?a:1/0);for(Ot=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=es(u),(e.length+c)%2==0&&(e+="0"),l=Math.sqrt(e),c=ys((c+1)/2)-(c<0||c%2),l==1/0?e="5e"+c:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+c),n=new h(e)):n=new h(l.toString()),t=(c=h.precision)+3;;)if(i=n,n=i.plus(kr(a,i,t+2,1)).times(.5),es(i.d).slice(0,t)===(e=es(n.d)).slice(0,t))if(e=e.slice(t-3,t+1),e=="9999"||!s&&e=="4999"){if(!s&&(yt(i,c+1,0),i.times(i).eq(a))){n=i;break}t+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(yt(n,c+1,1),r=!n.times(n).eq(a));break}return Ot=!0,yt(n,c,h.rounding,r)};Ve.tangent=Ve.tan=function(){var r,e,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(r=n.precision,e=n.rounding,n.precision=r+10,n.rounding=1,t=t.sin(),t.s=1,t=kr(t,new n(1).minus(t.times(t)).sqrt(),r+10,0),n.precision=r,n.rounding=e,yt(Yo==2||Yo==4?t.neg():t,r,e,!0)):new n(NaN)};Ve.times=Ve.mul=function(r){var e,t,n,s,i,a,u,c,l,h=this,m=h.constructor,g=h.d,v=(r=new m(r)).d;if(r.s*=h.s,!g||!g[0]||!v||!v[0])return new m(!r.s||g&&!g[0]&&!v||v&&!v[0]&&!g?NaN:!g||!v?r.s/0:r.s*0);for(t=ys(h.e/At)+ys(r.e/At),c=g.length,l=v.length,c<l&&(i=g,g=v,v=i,a=c,c=l,l=a),i=[],a=c+l,n=a;n--;)i.push(0);for(n=l;--n>=0;){for(e=0,s=c+n;s>n;)u=i[s]+v[n]*g[s-n-1]+e,i[s--]=u%ya|0,e=u/ya|0;i[s]=(i[s]+e)%ya|0}for(;!i[--a];)i.pop();return e?++t:i.shift(),r.d=i,r.e=kE(i,t),Ot?yt(r,m.precision,m.rounding):r};Ve.toBinary=function(r,e){return GT(this,2,r,e)};Ve.toDecimalPlaces=Ve.toDP=function(r,e){var t=this,n=t.constructor;return t=new n(t),r===void 0?t:(Hs(r,0,ic),e===void 0?e=n.rounding:Hs(e,0,8),yt(t,r+t.e+1,e))};Ve.toExponential=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=za(n,!0):(Hs(r,0,ic),e===void 0?e=s.rounding:Hs(e,0,8),n=yt(new s(n),r+1,e),t=za(n,!0,r+1)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toFixed=function(r,e){var t,n,s=this,i=s.constructor;return r===void 0?t=za(s):(Hs(r,0,ic),e===void 0?e=i.rounding:Hs(e,0,8),n=yt(new i(s),r+s.e+1,e),t=za(n,!1,r+n.e+1)),s.isNeg()&&!s.isZero()?"-"+t:t};Ve.toFraction=function(r){var e,t,n,s,i,a,u,c,l,h,m,g,v=this,y=v.d,E=v.constructor;if(!y)return new E(v);if(l=t=new E(1),n=c=new E(0),e=new E(n),i=e.e=F4(y)-v.e-1,a=i%At,e.d[0]=Pn(10,a<0?At+a:a),r==null)r=i>0?e:l;else{if(u=new E(r),!u.isInt()||u.lt(l))throw Error(sc+u);r=u.gt(e)?i>0?e:l:u}for(Ot=!1,u=new E(es(y)),h=E.precision,E.precision=i=y.length*At*2;m=kr(u,e,0,1,1),s=t.plus(m.times(n)),s.cmp(r)!=1;)t=n,n=s,s=l,l=c.plus(m.times(s)),c=s,s=e,e=u.minus(m.times(s)),u=s;return s=kr(r.minus(t),n,0,1,1),c=c.plus(s.times(l)),t=t.plus(s.times(n)),c.s=l.s=v.s,g=kr(l,n,i,1).minus(v).abs().cmp(kr(c,t,i,1).minus(v).abs())<1?[l,n]:[c,t],E.precision=h,Ot=!0,g};Ve.toHexadecimal=Ve.toHex=function(r,e){return GT(this,16,r,e)};Ve.toNearest=function(r,e){var t=this,n=t.constructor;if(t=new n(t),r==null){if(!t.d)return t;r=new n(1),e=n.rounding}else{if(r=new n(r),e===void 0?e=n.rounding:Hs(e,0,8),!t.d)return r.s?t:r;if(!r.d)return r.s&&(r.s=t.s),r}return r.d[0]?(Ot=!1,t=kr(t,r,0,e,1).times(r),Ot=!0,yt(t)):(r.s=t.s,t=r),t};Ve.toNumber=function(){return+this};Ve.toOctal=function(r,e){return GT(this,8,r,e)};Ve.toPower=Ve.pow=function(r){var e,t,n,s,i,a,u=this,c=u.constructor,l=+(r=new c(r));if(!u.d||!r.d||!u.d[0]||!r.d[0])return new c(Pn(+u,l));if(u=new c(u),u.eq(1))return u;if(n=c.precision,i=c.rounding,r.eq(1))return yt(u,n,i);if(e=ys(r.e/At),e>=r.d.length-1&&(t=l<0?-l:l)<=bte)return s=j4(c,u,t,n),r.s<0?new c(1).div(s):yt(s,n,i);if(a=u.s,a<0){if(e<r.d.length-1)return new c(NaN);if((r.d[e]&1)==0&&(a=1),u.e==0&&u.d[0]==1&&u.d.length==1)return u.s=a,u}return t=Pn(+u,l),e=t==0||!isFinite(t)?ys(l*(Math.log("0."+es(u.d))/Math.LN10+u.e+1)):new c(t+"").e,e>c.maxE+1||e<c.minE-1?new c(e>0?a/0:0):(Ot=!1,c.rounding=u.s=1,t=Math.min(12,(e+"").length),s=$T(r.times(nc(u,n+t)),n),s.d&&(s=yt(s,n+5,1),Xg(s.d,n,i)&&(e=n+10,s=yt($T(r.times(nc(u,e+t)),e),e+5,1),+es(s.d).slice(n+1,n+15)+1==1e14&&(s=yt(s,n+1,0)))),s.s=a,Ot=!0,c.rounding=i,yt(s,n,i))};Ve.toPrecision=function(r,e){var t,n=this,s=n.constructor;return r===void 0?t=za(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(Hs(r,1,ic),e===void 0?e=s.rounding:Hs(e,0,8),n=yt(new s(n),r,e),t=za(n,r<=n.e||n.e<=s.toExpNeg,r)),n.isNeg()&&!n.isZero()?"-"+t:t};Ve.toSignificantDigits=Ve.toSD=function(r,e){var t=this,n=t.constructor;return r===void 0?(r=n.precision,e=n.rounding):(Hs(r,1,ic),e===void 0?e=n.rounding:Hs(e,0,8)),yt(new n(t),r,e)};Ve.toString=function(){var r=this,e=r.constructor,t=za(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()&&!r.isZero()?"-"+t:t};Ve.truncated=Ve.trunc=function(){return yt(new this.constructor(this),this.e+1,1)};Ve.valueOf=Ve.toJSON=function(){var r=this,e=r.constructor,t=za(r,r.e<=e.toExpNeg||r.e>=e.toExpPos);return r.isNeg()?"-"+t:t};function es(r){var e,t,n,s=r.length-1,i="",a=r[0];if(s>0){for(i+=a,e=1;e<s;e++)n=r[e]+"",t=At-n.length,t&&(i+=rc(t)),i+=n;a=r[e],n=a+"",t=At-n.length,t&&(i+=rc(t))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}o(es,"digitsToString");function Hs(r,e,t){if(r!==~~r||r<e||r>t)throw Error(sc+r)}o(Hs,"checkInt32");function Xg(r,e,t,n){var s,i,a,u;for(i=r[0];i>=10;i/=10)--e;return--e<0?(e+=At,s=0):(s=Math.ceil((e+1)/At),e%=At),i=Pn(10,At-e),u=r[s]%i|0,n==null?e<3?(e==0?u=u/100|0:e==1&&(u=u/10|0),a=t<4&&u==99999||t>3&&u==49999||u==5e4||u==0):a=(t<4&&u+1==i||t>3&&u+1==i/2)&&(r[s+1]/i/100|0)==Pn(10,e-2)-1||(u==i/2||u==0)&&(r[s+1]/i/100|0)==0:e<4?(e==0?u=u/1e3|0:e==1?u=u/100|0:e==2&&(u=u/10|0),a=(n||t<4)&&u==9999||!n&&t>3&&u==4999):a=((n||t<4)&&u+1==i||!n&&t>3&&u+1==i/2)&&(r[s+1]/i/1e3|0)==Pn(10,e-3)-1,a}o(Xg,"checkRoundingDigits");function _E(r,e,t){for(var n,s=[0],i,a=0,u=r.length;a<u;){for(i=s.length;i--;)s[i]*=e;for(s[0]+=qT.indexOf(r.charAt(a++)),n=0;n<s.length;n++)s[n]>t-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/t|0,s[n]%=t)}return s.reverse()}o(_E,"convertBase");function Cte(r,e){var t,n,s;if(e.isZero())return e;n=e.d.length,n<32?(t=Math.ceil(n/3),s=(1/LE(4,t)).toString()):(t=16,s="2.3283064365386962890625e-10"),r.precision+=t,e=Wp(r,1,e.times(s),new r(1));for(var i=t;i--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return r.precision-=t,e}o(Cte,"cosine");var kr=(function(){function r(n,s,i){var a,u=0,c=n.length;for(n=n.slice();c--;)a=n[c]*s+u,n[c]=a%i|0,u=a/i|0;return u&&n.unshift(u),n}o(r,"multiplyInteger");function e(n,s,i,a){var u,c;if(i!=a)c=i>a?1:-1;else for(u=c=0;u<i;u++)if(n[u]!=s[u]){c=n[u]>s[u]?1:-1;break}return c}o(e,"compare");function t(n,s,i,a){for(var u=0;i--;)n[i]-=u,u=n[i]<s[i]?1:0,n[i]=u*a+n[i]-s[i];for(;!n[0]&&n.length>1;)n.shift()}return o(t,"subtract"),function(n,s,i,a,u,c){var l,h,m,g,v,y,E,x,C,_,b,A,T,B,M,I,H,K,q,W,he=n.constructor,pe=n.s==s.s?1:-1,ue=n.d,Y=s.d;if(!ue||!ue[0]||!Y||!Y[0])return new he(!n.s||!s.s||(ue?Y&&ue[0]==Y[0]:!Y)?NaN:ue&&ue[0]==0||!Y?pe*0:pe/0);for(c?(v=1,h=n.e-s.e):(c=ya,v=At,h=ys(n.e/v)-ys(s.e/v)),q=Y.length,H=ue.length,C=new he(pe),_=C.d=[],m=0;Y[m]==(ue[m]||0);m++);if(Y[m]>(ue[m]||0)&&h--,i==null?(B=i=he.precision,a=he.rounding):u?B=i+(n.e-s.e)+1:B=i,B<0)_.push(1),y=!0;else{if(B=B/v+2|0,m=0,q==1){for(g=0,Y=Y[0],B++;(m<H||g)&&B--;m++)M=g*c+(ue[m]||0),_[m]=M/Y|0,g=M%Y|0;y=g||m<H}else{for(g=c/(Y[0]+1)|0,g>1&&(Y=r(Y,g,c),ue=r(ue,g,c),q=Y.length,H=ue.length),I=q,b=ue.slice(0,q),A=b.length;A<q;)b[A++]=0;W=Y.slice(),W.unshift(0),K=Y[0],Y[1]>=c/2&&++K;do g=0,l=e(Y,b,q,A),l<0?(T=b[0],q!=A&&(T=T*c+(b[1]||0)),g=T/K|0,g>1?(g>=c&&(g=c-1),E=r(Y,g,c),x=E.length,A=b.length,l=e(E,b,x,A),l==1&&(g--,t(E,q<x?W:Y,x,c))):(g==0&&(l=g=1),E=Y.slice()),x=E.length,x<A&&E.unshift(0),t(b,E,A,c),l==-1&&(A=b.length,l=e(Y,b,q,A),l<1&&(g++,t(b,q<A?W:Y,A,c))),A=b.length):l===0&&(g++,b=[0]),_[m++]=g,l&&b[0]?b[A++]=ue[I]||0:(b=[ue[I]],A=1);while((I++<H||b[0]!==void 0)&&B--);y=b[0]!==void 0}_[0]||_.shift()}if(v==1)C.e=h,P4=y;else{for(m=1,g=_[0];g>=10;g/=10)m++;C.e=m+h*v-1,yt(C,u?i+C.e+1:i,a,y)}return C}})();function yt(r,e,t,n){var s,i,a,u,c,l,h,m,g,v=r.constructor;e:if(e!=null){if(m=r.d,!m)return r;for(s=1,u=m[0];u>=10;u/=10)s++;if(i=e-s,i<0)i+=At,a=e,h=m[g=0],c=h/Pn(10,s-a-1)%10|0;else if(g=Math.ceil((i+1)/At),u=m.length,g>=u)if(n){for(;u++<=g;)m.push(0);h=c=0,s=1,i%=At,a=i-At+1}else break e;else{for(h=u=m[g],s=1;u>=10;u/=10)s++;i%=At,a=i-At+s,c=a<0?0:h/Pn(10,s-a-1)%10|0}if(n=n||e<0||m[g+1]!==void 0||(a<0?h:h%Pn(10,s-a-1)),l=t<4?(c||n)&&(t==0||t==(r.s<0?3:2)):c>5||c==5&&(t==4||n||t==6&&(i>0?a>0?h/Pn(10,s-a):0:m[g-1])%10&1||t==(r.s<0?8:7)),e<1||!m[0])return m.length=0,l?(e-=r.e+1,m[0]=Pn(10,(At-e%At)%At),r.e=-e||0):m[0]=r.e=0,r;if(i==0?(m.length=g,u=1,g--):(m.length=g+1,u=Pn(10,At-i),m[g]=a>0?(h/Pn(10,s-a)%Pn(10,a)|0)*u:0),l)for(;;)if(g==0){for(i=1,a=m[0];a>=10;a/=10)i++;for(a=m[0]+=u,u=1;a>=10;a/=10)u++;i!=u&&(r.e++,m[0]==ya&&(m[0]=1));break}else{if(m[g]+=u,m[g]!=ya)break;m[g--]=0,u=1}for(i=m.length;m[--i]===0;)m.pop()}return Ot&&(r.e>v.maxE?(r.d=null,r.e=NaN):r.e<v.minE&&(r.e=0,r.d=[0])),r}o(yt,"finalise");function za(r,e,t){if(!r.isFinite())return q4(r);var n,s=r.e,i=es(r.d),a=i.length;return e?(t&&(n=t-a)>0?i=i.charAt(0)+"."+i.slice(1)+rc(n):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r.e<0?"e":"e+")+r.e):s<0?(i="0."+rc(-s-1)+i,t&&(n=t-a)>0&&(i+=rc(n))):s>=a?(i+=rc(s+1-a),t&&(n=t-s-1)>0&&(i=i+"."+rc(n))):((n=s+1)<a&&(i=i.slice(0,n)+"."+i.slice(n)),t&&(n=t-a)>0&&(s+1===a&&(i+="."),i+=rc(n))),i}o(za,"finiteToString");function kE(r,e){var t=r[0];for(e*=At;t>=10;t/=10)e++;return e}o(kE,"getBase10Exponent");function OE(r,e,t){if(e>Ate)throw Ot=!0,t&&(r.precision=t),Error(k4);return yt(new r(BE),e,1,!0)}o(OE,"getLn10");function Wa(r,e,t){if(e>KT)throw Error(k4);return yt(new r(RE),e,t,!0)}o(Wa,"getPi");function F4(r){var e=r.length-1,t=e*At+1;if(e=r[e],e){for(;e%10==0;e/=10)t--;for(e=r[0];e>=10;e/=10)t++}return t}o(F4,"getPrecision");function rc(r){for(var e="";r--;)e+="0";return e}o(rc,"getZeroString");function j4(r,e,t,n){var s,i=new r(1),a=Math.ceil(n/At+4);for(Ot=!1;;){if(t%2&&(i=i.times(e),R4(i.d,a)&&(s=!0)),t=ys(t/2),t===0){t=i.d.length-1,s&&i.d[t]===0&&++i.d[t];break}e=e.times(e),R4(e.d,a)}return Ot=!0,i}o(j4,"intPow");function B4(r){return r.d[r.d.length-1]&1}o(B4,"isOdd");function M4(r,e,t){for(var n,s,i=new r(e[0]),a=0;++a<e.length;){if(s=new r(e[a]),!s.s){i=s;break}n=i.cmp(s),(n===t||n===0&&i.s===t)&&(i=s)}return i}o(M4,"maxOrMin");function $T(r,e){var t,n,s,i,a,u,c,l=0,h=0,m=0,g=r.constructor,v=g.rounding,y=g.precision;if(!r.d||!r.d[0]||r.e>17)return new g(r.d?r.d[0]?r.s<0?0:1/0:1:r.s?r.s<0?0:r:NaN);for(e==null?(Ot=!1,c=y):c=e,u=new g(.03125);r.e>-2;)r=r.times(u),m+=5;for(n=Math.log(Pn(2,m))/Math.LN10*2+5|0,c+=n,t=i=a=new g(1),g.precision=c;;){if(i=yt(i.times(r),c,1),t=t.times(++h),u=a.plus(kr(i,t,c,1)),es(u.d).slice(0,c)===es(a.d).slice(0,c)){for(s=m;s--;)a=yt(a.times(a),c,1);if(e==null)if(l<3&&Xg(a.d,c-n,v,l))g.precision=c+=10,t=i=u=new g(1),h=0,l++;else return yt(a,g.precision=y,v,Ot=!0);else return g.precision=y,a}a=u}}o($T,"naturalExponential");function nc(r,e){var t,n,s,i,a,u,c,l,h,m,g,v=1,y=10,E=r,x=E.d,C=E.constructor,_=C.rounding,b=C.precision;if(E.s<0||!x||!x[0]||!E.e&&x[0]==1&&x.length==1)return new C(x&&!x[0]?-1/0:E.s!=1?NaN:x?0:E);if(e==null?(Ot=!1,h=b):h=e,C.precision=h+=y,t=es(x),n=t.charAt(0),Math.abs(i=E.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)E=E.times(r),t=es(E.d),n=t.charAt(0),v++;i=E.e,n>1?(E=new C("0."+t),i++):E=new C(n+"."+t.slice(1))}else return l=OE(C,h+2,b).times(i+""),E=nc(new C(n+"."+t.slice(1)),h-y).plus(l),C.precision=b,e==null?yt(E,b,_,Ot=!0):E;for(m=E,c=a=E=kr(E.minus(1),E.plus(1),h,1),g=yt(E.times(E),h,1),s=3;;){if(a=yt(a.times(g),h,1),l=c.plus(kr(a,new C(s),h,1)),es(l.d).slice(0,h)===es(c.d).slice(0,h))if(c=c.times(2),i!==0&&(c=c.plus(OE(C,h+2,b).times(i+""))),c=kr(c,new C(v),h,1),e==null)if(Xg(c.d,h-y,_,u))C.precision=h+=y,l=a=E=kr(m.minus(1),m.plus(1),h,1),g=yt(E.times(E),h,1),s=u=1;else return yt(c,C.precision=b,_,Ot=!0);else return C.precision=b,c;c=l,s+=2}}o(nc,"naturalLogarithm");function q4(r){return String(r.s*r.s/0)}o(q4,"nonFiniteToString");function DE(r,e){var t,n,s;for((t=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(t<0&&(t=n),t+=+e.slice(n+1),e=e.substring(0,n)):t<0&&(t=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,r.e=t=t-n-1,r.d=[],n=(t+1)%At,t<0&&(n+=At),n<s){for(n&&r.d.push(+e.slice(0,n)),s-=At;n<s;)r.d.push(+e.slice(n,n+=At));e=e.slice(n),n=At-e.length}else n-=s;for(;n--;)e+="0";r.d.push(+e),Ot&&(r.e>r.constructor.maxE?(r.d=null,r.e=NaN):r.e<r.constructor.minE&&(r.e=0,r.d=[0]))}else r.e=0,r.d=[0];return r}o(DE,"parseDecimal");function Nte(r,e){var t,n,s,i,a,u,c,l,h;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),U4.test(e))return DE(r,e)}else if(e==="Infinity"||e==="NaN")return+e||(r.s=NaN),r.e=NaN,r.d=null,r;if(Ete.test(e))t=16,e=e.toLowerCase();else if(wte.test(e))t=2;else if(Ste.test(e))t=8;else throw Error(sc+e);for(i=e.search(/p/i),i>0?(c=+e.slice(i+1),e=e.substring(2,i)):e=e.slice(2),i=e.indexOf("."),a=i>=0,n=r.constructor,a&&(e=e.replace(".",""),u=e.length,i=u-i,s=j4(n,new n(t),i,i*2)),l=_E(e,t,ya),h=l.length-1,i=h;l[i]===0;--i)l.pop();return i<0?new n(r.s*0):(r.e=kE(l,h),r.d=l,Ot=!1,a&&(r=kr(r,s,u*4)),c&&(r=r.times(Math.abs(c)<54?Pn(2,c):zp.pow(2,c))),Ot=!0,r)}o(Nte,"parseOther");function Tte(r,e){var t,n=e.d.length;if(n<3)return e.isZero()?e:Wp(r,2,e,e);t=1.4*Math.sqrt(n),t=t>16?16:t|0,e=e.times(1/LE(5,t)),e=Wp(r,2,e,e);for(var s,i=new r(5),a=new r(16),u=new r(20);t--;)s=e.times(e),e=e.times(i.plus(s.times(a.times(s).minus(u))));return e}o(Tte,"sine");function Wp(r,e,t,n,s){var i,a,u,c,l=1,h=r.precision,m=Math.ceil(h/At);for(Ot=!1,c=t.times(t),u=new r(n);;){if(a=kr(u.times(c),new r(e++*e++),h,1),u=s?n.plus(a):n.minus(a),n=kr(a.times(c),new r(e++*e++),h,1),a=u.plus(n),a.d[m]!==void 0){for(i=m;a.d[i]===u.d[i]&&i--;);if(i==-1)break}i=u,u=n,n=a,a=i,l++}return Ot=!0,a.d.length=m+1,a}o(Wp,"taylorSeries");function LE(r,e){for(var t=r;--e;)t*=r;return t}o(LE,"tinyPow");function H4(r,e){var t,n=e.s<0,s=Wa(r,r.precision,1),i=s.times(.5);if(e=e.abs(),e.lte(i))return Yo=n?4:1,e;if(t=e.divToInt(s),t.isZero())Yo=n?3:2;else{if(e=e.minus(t.times(s)),e.lte(i))return Yo=B4(t)?n?2:3:n?4:1,e;Yo=B4(t)?n?1:4:n?3:2}return e.minus(s).abs()}o(H4,"toLessThanHalfPi");function GT(r,e,t,n){var s,i,a,u,c,l,h,m,g,v=r.constructor,y=t!==void 0;if(y?(Hs(t,1,ic),n===void 0?n=v.rounding:Hs(n,0,8)):(t=v.precision,n=v.rounding),!r.isFinite())h=q4(r);else{for(h=za(r),a=h.indexOf("."),y?(s=2,e==16?t=t*4-3:e==8&&(t=t*3-2)):s=e,a>=0&&(h=h.replace(".",""),g=new v(1),g.e=h.length-a,g.d=_E(za(g),10,s),g.e=g.d.length),m=_E(h,10,s),i=c=m.length;m[--c]==0;)m.pop();if(!m[0])h=y?"0p+0":"0";else{if(a<0?i--:(r=new v(r),r.d=m,r.e=i,r=kr(r,g,t,n,0,s),m=r.d,i=r.e,l=P4),a=m[t],u=s/2,l=l||m[t+1]!==void 0,l=n<4?(a!==void 0||l)&&(n===0||n===(r.s<0?3:2)):a>u||a===u&&(n===4||l||n===6&&m[t-1]&1||n===(r.s<0?8:7)),m.length=t,l)for(;++m[--t]>s-1;)m[t]=0,t||(++i,m.unshift(1));for(c=m.length;!m[c-1];--c);for(a=0,h="";a<c;a++)h+=qT.charAt(m[a]);if(y){if(c>1)if(e==16||e==8){for(a=e==16?4:3,--c;c%a;c++)h+="0";for(m=_E(h,s,e),c=m.length;!m[c-1];--c);for(a=1,h="1.";a<c;a++)h+=qT.charAt(m[a])}else h=h.charAt(0)+"."+h.slice(1);h=h+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)h="0"+h;h="0."+h}else if(++i>c)for(i-=c;i--;)h+="0";else i<c&&(h=h.slice(0,i)+"."+h.slice(i))}h=(e==16?"0x":e==2?"0b":e==8?"0o":"")+h}return r.s<0?"-"+h:h}o(GT,"toStringBinary");function R4(r,e){if(r.length>e)return r.length=e,!0}o(R4,"truncate");function Ite(r){return new this(r).abs()}o(Ite,"abs");function _te(r){return new this(r).acos()}o(_te,"acos");function Dte(r){return new this(r).acosh()}o(Dte,"acosh");function Bte(r,e){return new this(r).plus(e)}o(Bte,"add");function Rte(r){return new this(r).asin()}o(Rte,"asin");function Ote(r){return new this(r).asinh()}o(Ote,"asinh");function Pte(r){return new this(r).atan()}o(Pte,"atan");function kte(r){return new this(r).atanh()}o(kte,"atanh");function Lte(r,e){r=new this(r),e=new this(e);var t,n=this.precision,s=this.rounding,i=n+4;return!r.s||!e.s?t=new this(NaN):!r.d&&!e.d?(t=Wa(this,i,1).times(e.s>0?.25:.75),t.s=r.s):!e.d||r.isZero()?(t=e.s<0?Wa(this,n,s):new this(0),t.s=r.s):!r.d||e.isZero()?(t=Wa(this,i,1).times(.5),t.s=r.s):e.s<0?(this.precision=i,this.rounding=1,t=this.atan(kr(r,e,i,1)),e=Wa(this,i,1),this.precision=n,this.rounding=s,t=r.s<0?t.minus(e):t.plus(e)):t=this.atan(kr(r,e,i,1)),t}o(Lte,"atan2");function Vte(r){return new this(r).cbrt()}o(Vte,"cbrt");function Ute(r){return yt(r=new this(r),r.e+1,2)}o(Ute,"ceil");function Fte(r,e,t){return new this(r).clamp(e,t)}o(Fte,"clamp");function jte(r){if(!r||typeof r!="object")throw Error(PE+"Object expected");var e,t,n,s=r.defaults===!0,i=["precision",1,ic,"rounding",0,8,"toExpNeg",-Xp,0,"toExpPos",0,Xp,"maxE",0,Xp,"minE",-Xp,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(t=i[e],s&&(this[t]=HT[t]),(n=r[t])!==void 0)if(ys(n)===n&&n>=i[e+1]&&n<=i[e+2])this[t]=n;else throw Error(sc+t+": "+n);if(t="crypto",s&&(this[t]=HT[t]),(n=r[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(L4);else this[t]=!1;else throw Error(sc+t+": "+n);return this}o(jte,"config");function Mte(r){return new this(r).cos()}o(Mte,"cos");function qte(r){return new this(r).cosh()}o(qte,"cosh");function K4(r){var e,t,n;function s(i){var a,u,c,l=this;if(!(l instanceof s))return new s(i);if(l.constructor=s,O4(i)){l.s=i.s,Ot?!i.d||i.e>s.maxE?(l.e=NaN,l.d=null):i.e<s.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(a=0,u=i;u>=10;u/=10)a++;Ot?a>s.maxE?(l.e=NaN,l.d=null):a<s.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[i]):(l.e=a,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return DE(l,i.toString())}if(c==="string")return(u=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(u===43&&(i=i.slice(1)),l.s=1),U4.test(i)?DE(l,i):Nte(l,i);if(c==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,DE(l,i.toString());throw Error(sc+i)}if(o(s,"Decimal"),s.prototype=Ve,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=jte,s.clone=K4,s.isDecimal=O4,s.abs=Ite,s.acos=_te,s.acosh=Dte,s.add=Bte,s.asin=Rte,s.asinh=Ote,s.atan=Pte,s.atanh=kte,s.atan2=Lte,s.cbrt=Vte,s.ceil=Ute,s.clamp=Fte,s.cos=Mte,s.cosh=qte,s.div=Hte,s.exp=Kte,s.floor=$te,s.hypot=Gte,s.ln=Xte,s.log=Wte,s.log10=Jte,s.log2=zte,s.max=Yte,s.min=Qte,s.mod=Zte,s.mul=ere,s.pow=tre,s.random=rre,s.round=nre,s.sign=sre,s.sin=ire,s.sinh=are,s.sqrt=ore,s.sub=ure,s.sum=cre,s.tan=lre,s.tanh=fre,s.trunc=hre,r===void 0&&(r={}),r&&r.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)r.hasOwnProperty(t=n[e++])||(r[t]=this[t]);return s.config(r),s}o(K4,"clone");function Hte(r,e){return new this(r).div(e)}o(Hte,"div");function Kte(r){return new this(r).exp()}o(Kte,"exp");function $te(r){return yt(r=new this(r),r.e+1,3)}o($te,"floor");function Gte(){var r,e,t=new this(0);for(Ot=!1,r=0;r<arguments.length;)if(e=new this(arguments[r++]),e.d)t.d&&(t=t.plus(e.times(e)));else{if(e.s)return Ot=!0,new this(1/0);t=e}return Ot=!0,t.sqrt()}o(Gte,"hypot");function O4(r){return r instanceof zp||r&&r.toStringTag===V4||!1}o(O4,"isDecimalInstance");function Xte(r){return new this(r).ln()}o(Xte,"ln");function Wte(r,e){return new this(r).log(e)}o(Wte,"log");function zte(r){return new this(r).log(2)}o(zte,"log2");function Jte(r){return new this(r).log(10)}o(Jte,"log10");function Yte(){return M4(this,arguments,-1)}o(Yte,"max");function Qte(){return M4(this,arguments,1)}o(Qte,"min");function Zte(r,e){return new this(r).mod(e)}o(Zte,"mod");function ere(r,e){return new this(r).mul(e)}o(ere,"mul");function tre(r,e){return new this(r).pow(e)}o(tre,"pow");function rre(r){var e,t,n,s,i=0,a=new this(1),u=[];if(r===void 0?r=this.precision:Hs(r,1,ic),n=Math.ceil(r/At),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)s=e[i],s>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:u[i++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);i<n;)s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((e[i+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,i):(u.push(s%1e7),i+=4);i=n/4}else throw Error(L4);else for(;i<n;)u[i++]=Math.random()*1e7|0;for(n=u[--i],r%=At,n&&r&&(s=Pn(10,At-r),u[i]=(n/s|0)*s);u[i]===0;i--)u.pop();if(i<0)t=0,u=[0];else{for(t=-1;u[0]===0;t-=At)u.shift();for(n=1,s=u[0];s>=10;s/=10)n++;n<At&&(t-=At-n)}return a.e=t,a.d=u,a}o(rre,"random");function nre(r){return yt(r=new this(r),r.e+1,this.rounding)}o(nre,"round");function sre(r){return r=new this(r),r.d?r.d[0]?r.s:0*r.s:r.s||NaN}o(sre,"sign");function ire(r){return new this(r).sin()}o(ire,"sin");function are(r){return new this(r).sinh()}o(are,"sinh");function ore(r){return new this(r).sqrt()}o(ore,"sqrt");function ure(r,e){return new this(r).sub(e)}o(ure,"sub");function cre(){var r=0,e=arguments,t=new this(e[r]);for(Ot=!1;t.s&&++r<e.length;)t=t.plus(e[r]);return Ot=!0,yt(t,this.precision,this.rounding)}o(cre,"sum");function lre(r){return new this(r).tan()}o(lre,"tan");function fre(r){return new this(r).tanh()}o(fre,"tanh");function hre(r){return yt(r=new this(r),r.e+1,1)}o(hre,"trunc");Ve[Symbol.for("nodejs.util.inspect.custom")]=Ve.toString;Ve[Symbol.toStringTag]="Decimal";var zp=Ve.constructor=K4(HT);BE=new zp(BE);RE=new zp(RE);var pf=class r extends zp{static{o(this,"Decimal")}static from(e){return new r(e)}static newOrZero(e){return e===void 0?r.from(0):r.from(e)}static newOrUndefined(e){if(e!==void 0)return r.from(e)}};var $4=or(require("pdfkit"),1);var XT=class r{static{o(this,"PdfkitPdfBuilder")}defaults={autoFirstPage:!1};doc=new $4.default(this.defaults);constructor(e){e&&this.configure(e)}static new(e){return new r(e)}configure(e){return this.doc.options={...this.doc.options,...e},this}pipe(e){return this.doc.pipe(e),this}end(){return this.doc.end()}restore(){return this.doc.restore(),this}save(){return this.doc.save(),this}stroke(e){return this.doc.stroke(e),this}page(e){return this.doc.addPage(e),this}table(e){return this.doc.table(e),this}text(e,t){let{x:n,y:s,...i}=t??{};return n||s?(this.doc.text(e,n,s,i),this):(this.doc.text(e,t),this)}fontSize(e){return this.doc.fontSize(e),this}font(e,t,n){return typeof t=="string"?(this.doc.font(e,t,n),this):typeof t=="number"?(this.doc.font(e,t),this):(this.doc.font(e),this)}image(e,t,n,s){return typeof t=="number"&&typeof n=="number"?(this.doc.image(e,t,n,s),this):(this.doc.image(e,t),this)}rect(e,t,n,s){return this.doc.rect(e,t,n,s),this}path(e){return this.doc.path(e),this}translate(e,t){return this.doc.translate(e,t),this}scale(e,t){return this.doc.scale(e,t),this}fill(e,t){return this.doc.fill(e,t),this}pageWidth(){return this.doc.page.width}pageHeight(){return this.doc.page.height}heightOfString(e,t){return this.doc.heightOfString(e,t)}widthOfString(e,t){return this.doc.widthOfString(e,t)}pageMargins(){return this.doc.page.margins}currentLineHeight(e){return this.doc.currentLineHeight(e)}x(){return this.doc.x}y(){return this.doc.y}moveDown(e){return this.doc.moveDown(e),this}row(e,...t){let n,s;typeof e=="function"?(n={},s=[e,...t]):(n=e??{},s=t),n.columns??=1;let i=this.y(),a=n.right??0,u=n.left??0,c=n.gap??0,l=this.pageWidth(),h=l-u-a-c*(n.columns-1);n.size??=Array(n.columns).fill(12/n.columns);let m=[];for(let g=0;g<n.columns;g++){let v=n.size[g]/12;m[g]=h*v}for(let g=0,v=u;g<n.columns;g++){let y=g===n.columns-1,E=m[g];if(y&&n.columns>1){let _=l-a-v;_>0&&Math.abs(_-E)>.01&&(E=_)}let x={y:i,x:v,width:E};s[g](x),v+=E,c>0&&!y&&(v+=c)}return this}};var WT=class{static{o(this,"MemoryCacheAdapter")}cache=new Map;async get(e){return Promise.resolve(this.cache.get(e)??null)}has(e){return Promise.resolve(this.cache.has(e))}set(e,t){return this.cache.set(e,t),Promise.resolve(!0)}};var QI=or(require("fs"),1),uV=or(require("path"),1),ly=or(require("crypto"),1),yc=or(oV(),1);var zie=o(r=>!!r&&typeof r=="object"&&"message"in r,"hasMessageInRecord"),bf=o(r=>typeof r=="string"?gs(new Xr(r)):r instanceof Error?gs(new Xr(r.message,{cause:r.cause})):zie(r)?gs(new Xr(r.message)):gs(new Xr("unexpected error")),"leftFromError");var cy=class{static{o(this,"NullCacheAdapter")}async get(e){return Promise.resolve(null)}has(e){return Promise.resolve(!1)}set(e,t){return Promise.resolve(!0)}};var ZI=class{static{o(this,"NativeCertificateRepository")}httpClient;signer;cache;constructor(e,t,n=new cy){this.httpClient=e,this.signer=t,this.cache=n}async read(e){try{let{password:t,pfxPathOrBase64:n}=e;if(!n)return gs(new Xr("Certificate path is required"));let s=await this.getPfxBuffer(e);if(s.isLeft())return s;let i=yc.default.asn1.fromDer(s.value.toString("binary")),a=yc.default.pkcs12.pkcs12FromAsn1(i,t),{certBag:u}=yc.default.pki.oids,l=a.getBags({bagType:u})[u];if(!l?.length)return gs(new Xr("Cannot read certificate"));let[{cert:h},...m]=l;if(!h)return gs(new Xr("Issuer Certificate not found"));let g=m.reduce((y,{cert:E})=>(E&&y.push(new ly.default.X509Certificate(yc.default.pki.certificateToPem(E))),y),[]),v=new ly.default.X509Certificate(yc.default.pki.certificateToPem(h));return ji({ca:g,password:t,certificate:v,privateKey:this.getPrivateKey(a)})}catch(t){return bf(t)}}getPrivateKey(e){let{pkcs8ShroudedKeyBag:t}=yc.default.pki.oids,s=e.getBags({bagType:t})[t]?.[0]?.key;if(s)return ly.default.createPrivateKey(yc.default.pki.privateKeyToPem(s))}async sign(e,t,n=Jo.SHA1){return this.signer.sign(e,t,n)}getCertificateInfo(e){return new Af().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"})}catch{throw new Xr("Cannot extract private key")}}async getPfxBuffer(e){let{pfxPathOrBase64:t,password:n}=e,s=this.getCacheKey(t,n),i=await this.cache.get(s);if(i)return ji(i);if(uV.default.isAbsolute(t)||QI.default.existsSync(t))return this.hitBufferOnCache(s,QI.default.readFileSync(t));if(this.isValidRemoteUrl(t))try{let a=await this.httpClient.get(t,{responseType:"arraybuffer"});return await this.hitBufferOnCache(s,Buffer.from(a.data))}catch(a){return bf(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return ly.default.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),ji(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var T7=or(require("os"),1),I7=require("crypto"),cA=require("https"),_7=or(lH(),1);function iv(r,e){return o(function(){return r.apply(e,arguments)},"wrap")}o(iv,"bind");var{toString:T0e}=Object.prototype,{getPrototypeOf:uR}=Object,{iterator:$b,toStringTag:hH}=Symbol,Gb=(r=>e=>{let t=T0e.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Na=o(r=>(r=r.toLowerCase(),e=>Gb(e)===r),"kindOfTest"),Xb=o(r=>e=>typeof e===r,"typeOfTest"),{isArray:Xd}=Array,Gd=Xb("undefined");function av(r){return r!==null&&!Gd(r)&&r.constructor!==null&&!Gd(r.constructor)&&ti(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}o(av,"isBuffer");var pH=Na("ArrayBuffer");function I0e(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&pH(r.buffer),e}o(I0e,"isArrayBufferView");var _0e=Xb("string"),ti=Xb("function"),dH=Xb("number"),ov=o(r=>r!==null&&typeof r=="object","isObject"),D0e=o(r=>r===!0||r===!1,"isBoolean"),Kb=o(r=>{if(Gb(r)!=="object")return!1;let e=uR(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(hH in r)&&!($b in r)},"isPlainObject"),B0e=o(r=>{if(!ov(r)||av(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},"isEmptyObject"),R0e=Na("Date"),O0e=Na("File"),P0e=Na("Blob"),k0e=Na("FileList"),L0e=o(r=>ov(r)&&ti(r.pipe),"isStream"),V0e=o(r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||ti(r.append)&&((e=Gb(r))==="formdata"||e==="object"&&ti(r.toString)&&r.toString()==="[object FormData]"))},"isFormData"),U0e=Na("URLSearchParams"),[F0e,j0e,M0e,q0e]=["ReadableStream","Request","Response","Headers"].map(Na),H0e=o(r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function uv(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,s;if(typeof r!="object"&&(r=[r]),Xd(r))for(n=0,s=r.length;n<s;n++)e.call(null,r[n],n,r);else{if(av(r))return;let i=t?Object.getOwnPropertyNames(r):Object.keys(r),a=i.length,u;for(n=0;n<a;n++)u=i[n],e.call(null,r[u],u,r)}}o(uv,"forEach");function mH(r,e){if(av(r))return null;e=e.toLowerCase();let t=Object.keys(r),n=t.length,s;for(;n-- >0;)if(s=t[n],e===s.toLowerCase())return s;return null}o(mH,"findKey");var Uf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gH=o(r=>!Gd(r)&&r!==Uf,"isContextDefined");function oR(){let{caseless:r,skipUndefined:e}=gH(this)&&this||{},t={},n=o((s,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;let a=r&&mH(t,i)||i;Kb(t[a])&&Kb(s)?t[a]=oR(t[a],s):Kb(s)?t[a]=oR({},s):Xd(s)?t[a]=s.slice():(!e||!Gd(s))&&(t[a]=s)},"assignValue");for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&uv(arguments[s],n);return t}o(oR,"merge");var K0e=o((r,e,t,{allOwnKeys:n}={})=>(uv(e,(s,i)=>{t&&ti(s)?Object.defineProperty(r,i,{value:iv(s,t),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),r),"extend"),$0e=o(r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),"stripBOM"),G0e=o((r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},"inherits"),X0e=o((r,e,t,n)=>{let s,i,a,u={};if(e=e||{},r==null)return e;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)a=s[i],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&uR(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},"toFlatObject"),W0e=o((r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;let n=r.indexOf(e,t);return n!==-1&&n===t},"endsWith"),z0e=o(r=>{if(!r)return null;if(Xd(r))return r;let e=r.length;if(!dH(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},"toArray"),J0e=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&uR(Uint8Array)),Y0e=o((r,e)=>{let n=(r&&r[$b]).call(r),s;for(;(s=n.next())&&!s.done;){let i=s.value;e.call(r,i[0],i[1])}},"forEachEntry"),Q0e=o((r,e)=>{let t,n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},"matchAll"),Z0e=Na("HTMLFormElement"),ege=o(r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,o(function(t,n,s){return n.toUpperCase()+s},"replacer")),"toCamelCase"),fH=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),tge=Na("RegExp"),yH=o((r,e)=>{let t=Object.getOwnPropertyDescriptors(r),n={};uv(t,(s,i)=>{let a;(a=e(s,i,r))!==!1&&(n[i]=a||s)}),Object.defineProperties(r,n)},"reduceDescriptors"),rge=o(r=>{yH(r,(e,t)=>{if(ti(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let n=r[t];if(ti(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),nge=o((r,e)=>{let t={},n=o(s=>{s.forEach(i=>{t[i]=!0})},"define");return Xd(r)?n(r):n(String(r).split(e)),t},"toObjectSet"),sge=o(()=>{},"noop"),ige=o((r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,"toFiniteNumber");function age(r){return!!(r&&ti(r.append)&&r[hH]==="FormData"&&r[$b])}o(age,"isSpecCompliantForm");var oge=o(r=>{let e=new Array(10),t=o((n,s)=>{if(ov(n)){if(e.indexOf(n)>=0)return;if(av(n))return n;if(!("toJSON"in n)){e[s]=n;let i=Xd(n)?[]:{};return uv(n,(a,u)=>{let c=t(a,s+1);!Gd(c)&&(i[u]=c)}),e[s]=void 0,i}}return n},"visit");return t(r,0)},"toJSONObject"),uge=Na("AsyncFunction"),cge=o(r=>r&&(ov(r)||ti(r))&&ti(r.then)&&ti(r.catch),"isThenable"),vH=((r,e)=>r?setImmediate:e?((t,n)=>(Uf.addEventListener("message",({source:s,data:i})=>{s===Uf&&i===t&&n.length&&n.shift()()},!1),s=>{n.push(s),Uf.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",ti(Uf.postMessage)),lge=typeof queueMicrotask<"u"?queueMicrotask.bind(Uf):typeof process<"u"&&process.nextTick||vH,fge=o(r=>r!=null&&ti(r[$b]),"isIterable"),ie={isArray:Xd,isArrayBuffer:pH,isBuffer:av,isFormData:V0e,isArrayBufferView:I0e,isString:_0e,isNumber:dH,isBoolean:D0e,isObject:ov,isPlainObject:Kb,isEmptyObject:B0e,isReadableStream:F0e,isRequest:j0e,isResponse:M0e,isHeaders:q0e,isUndefined:Gd,isDate:R0e,isFile:O0e,isBlob:P0e,isRegExp:tge,isFunction:ti,isStream:L0e,isURLSearchParams:U0e,isTypedArray:J0e,isFileList:k0e,forEach:uv,merge:oR,extend:K0e,trim:H0e,stripBOM:$0e,inherits:G0e,toFlatObject:X0e,kindOf:Gb,kindOfTest:Na,endsWith:W0e,toArray:z0e,forEachEntry:Y0e,matchAll:Q0e,isHTMLForm:Z0e,hasOwnProperty:fH,hasOwnProp:fH,reduceDescriptors:yH,freezeMethods:rge,toObjectSet:nge,toCamelCase:ege,noop:sge,toFiniteNumber:ige,findKey:mH,global:Uf,isContextDefined:gH,isSpecCompliantForm:age,toJSONObject:oge,isAsyncFn:uge,isThenable:cge,setImmediate:vH,asap:lge,isIterable:fge};var Ei=class xH extends Error{static{o(this,"AxiosError")}static from(e,t,n,s,i,a){let u=new xH(e.message,t||e.code,n,s,i);return u.cause=e,u.name=e.name,a&&Object.assign(u,a),u}constructor(e,t,n,s,i){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}};Ei.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ei.ERR_BAD_OPTION="ERR_BAD_OPTION";Ei.ECONNABORTED="ECONNABORTED";Ei.ETIMEDOUT="ETIMEDOUT";Ei.ERR_NETWORK="ERR_NETWORK";Ei.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ei.ERR_DEPRECATED="ERR_DEPRECATED";Ei.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ei.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ei.ERR_CANCELED="ERR_CANCELED";Ei.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ei.ERR_INVALID_URL="ERR_INVALID_URL";var Qe=Ei;var AH=or(bH(),1),Wb=AH.default;function pR(r){return ie.isPlainObject(r)||ie.isArray(r)}o(pR,"isVisitable");function NH(r){return ie.endsWith(r,"[]")?r.slice(0,-2):r}o(NH,"removeBrackets");function CH(r,e,t){return r?r.concat(e).map(o(function(s,i){return s=NH(s),!t&&i?"["+s+"]":s},"each")).join(t?".":""):e}o(CH,"renderKey");function Ege(r){return ie.isArray(r)&&!r.some(pR)}o(Ege,"isFlatArray");var Sge=ie.toFlatObject(ie,{},null,o(function(e){return/^is[A-Z]/.test(e)},"filter"));function bge(r,e,t){if(!ie.isObject(r))throw new TypeError("target must be an object");e=e||new(Wb||FormData),t=ie.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,o(function(E,x){return!ie.isUndefined(x[E])},"defined"));let n=t.metaTokens,s=t.visitor||h,i=t.dots,a=t.indexes,c=(t.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(e);if(!ie.isFunction(s))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(ie.isDate(y))return y.toISOString();if(ie.isBoolean(y))return y.toString();if(!c&&ie.isBlob(y))throw new Qe("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(y)||ie.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}o(l,"convertValue");function h(y,E,x){let C=y;if(y&&!x&&typeof y=="object"){if(ie.endsWith(E,"{}"))E=n?E:E.slice(0,-2),y=JSON.stringify(y);else if(ie.isArray(y)&&Ege(y)||(ie.isFileList(y)||ie.endsWith(E,"[]"))&&(C=ie.toArray(y)))return E=NH(E),C.forEach(o(function(b,A){!(ie.isUndefined(b)||b===null)&&e.append(a===!0?CH([E],A,i):a===null?E:E+"[]",l(b))},"each")),!1}return pR(y)?!0:(e.append(CH(x,E,i),l(y)),!1)}o(h,"defaultVisitor");let m=[],g=Object.assign(Sge,{defaultVisitor:h,convertValue:l,isVisitable:pR});function v(y,E){if(!ie.isUndefined(y)){if(m.indexOf(y)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(y),ie.forEach(y,o(function(C,_){(!(ie.isUndefined(C)||C===null)&&s.call(e,C,ie.isString(_)?_.trim():_,E,g))===!0&&v(C,E?E.concat(_):[_])},"each")),m.pop()}}if(o(v,"build"),!ie.isObject(r))throw new TypeError("data must be an object");return v(r),e}o(bge,"toFormData");var Hc=bge;function TH(r){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,o(function(n){return e[n]},"replacer"))}o(TH,"encode");function IH(r,e){this._pairs=[],r&&Hc(r,this,e)}o(IH,"AxiosURLSearchParams");var _H=IH.prototype;_H.append=o(function(e,t){this._pairs.push([e,t])},"append");_H.toString=o(function(e){let t=e?function(n){return e.call(this,n,TH)}:TH;return this._pairs.map(o(function(s){return t(s[0])+"="+t(s[1])},"each"),"").join("&")},"toString");var DH=IH;function Age(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}o(Age,"encode");function Ff(r,e,t){if(!e)return r;let n=t&&t.encode||Age,s=ie.isFunction(t)?{serialize:t}:t,i=s&&s.serialize,a;if(i?a=i(e,s):a=ie.isURLSearchParams(e)?e.toString():new DH(e,s).toString(n),a){let u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+a}return r}o(Ff,"buildURL");var Cge=class{static{o(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ie.forEach(this.handlers,o(function(n){n!==null&&e(n)},"forEachHandler"))}},dR=Cge;var Kc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var PH=or(require("crypto"),1);var BH=or(require("url"),1),RH=BH.default.URLSearchParams;var mR="abcdefghijklmnopqrstuvwxyz",OH="0123456789",kH={DIGIT:OH,ALPHA:mR,ALPHA_DIGIT:mR+mR.toUpperCase()+OH},Nge=o((r=16,e=kH.ALPHA_DIGIT)=>{let t="",{length:n}=e,s=new Uint32Array(r);PH.default.randomFillSync(s);for(let i=0;i<r;i++)t+=e[s[i]%n];return t},"generateString"),LH={isNode:!0,classes:{URLSearchParams:RH,FormData:Wb,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:kH,generateString:Nge,protocols:["http","https","file","data"]};var vR={};AE(vR,{hasBrowserEnv:()=>yR,hasStandardBrowserEnv:()=>Tge,hasStandardBrowserWebWorkerEnv:()=>Ige,navigator:()=>gR,origin:()=>_ge});var yR=typeof window<"u"&&typeof document<"u",gR=typeof navigator=="object"&&navigator||void 0,Tge=yR&&(!gR||["ReactNative","NativeScript","NS"].indexOf(gR.product)<0),Ige=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_ge=yR&&window.location.href||"http://localhost";var br={...vR,...LH};function xR(r,e){return Hc(r,new br.classes.URLSearchParams,{visitor:o(function(t,n,s,i){return br.isNode&&ie.isBuffer(t)?(this.append(n,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},"visitor"),...e})}o(xR,"toURLEncodedForm");function Dge(r){return ie.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}o(Dge,"parsePropPath");function Bge(r){let e={},t=Object.keys(r),n,s=t.length,i;for(n=0;n<s;n++)i=t[n],e[i]=r[i];return e}o(Bge,"arrayToObject");function Rge(r){function e(t,n,s,i){let a=t[i++];if(a==="__proto__")return!0;let u=Number.isFinite(+a),c=i>=t.length;return a=!a&&ie.isArray(s)?s.length:a,c?(ie.hasOwnProp(s,a)?s[a]=[s[a],n]:s[a]=n,!u):((!s[a]||!ie.isObject(s[a]))&&(s[a]=[]),e(t,n,s[a],i)&&ie.isArray(s[a])&&(s[a]=Bge(s[a])),!u)}if(o(e,"buildPath"),ie.isFormData(r)&&ie.isFunction(r.entries)){let t={};return ie.forEachEntry(r,(n,s)=>{e(Dge(n),s,t,0)}),t}return null}o(Rge,"formDataToJSON");var zb=Rge;function Oge(r,e,t){if(ie.isString(r))try{return(e||JSON.parse)(r),ie.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}o(Oge,"stringifySafely");var wR={transitional:Kc,adapter:["xhr","http","fetch"],transformRequest:[o(function(e,t){let n=t.getContentType()||"",s=n.indexOf("application/json")>-1,i=ie.isObject(e);if(i&&ie.isHTMLForm(e)&&(e=new FormData(e)),ie.isFormData(e))return s?JSON.stringify(zb(e)):e;if(ie.isArrayBuffer(e)||ie.isBuffer(e)||ie.isStream(e)||ie.isFile(e)||ie.isBlob(e)||ie.isReadableStream(e))return e;if(ie.isArrayBufferView(e))return e.buffer;if(ie.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return xR(e,this.formSerializer).toString();if((u=ie.isFileList(e))||n.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Hc(u?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(t.setContentType("application/json",!1),Oge(e)):e},"transformRequest")],transformResponse:[o(function(e){let t=this.transitional||wR.transitional,n=t&&t.forcedJSONParsing,s=this.responseType==="json";if(ie.isResponse(e)||ie.isReadableStream(e))return e;if(e&&ie.isString(e)&&(n&&!this.responseType||s)){let a=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(u){if(a)throw u.name==="SyntaxError"?Qe.from(u,Qe.ERR_BAD_RESPONSE,this,null,this.response):u}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:br.classes.FormData,Blob:br.classes.Blob},validateStatus:o(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],r=>{wR.headers[r]={}});var Wd=wR;var Pge=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),VH=o((r=>{let e={},t,n,s;return r&&r.split(`
100
100
  `).forEach(o(function(a){s=a.indexOf(":"),t=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!t||e[t]&&Pge[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)},"parser")),e}),"default");var UH=Symbol("internals");function cv(r){return r&&String(r).trim().toLowerCase()}o(cv,"normalizeHeader");function Jb(r){return r===!1||r==null?r:ie.isArray(r)?r.map(Jb):String(r)}o(Jb,"normalizeValue");function kge(r){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}o(kge,"parseTokens");var Lge=o(r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim()),"isValidHeaderName");function ER(r,e,t,n,s){if(ie.isFunction(n))return n.call(this,e,t);if(s&&(e=t),!!ie.isString(e)){if(ie.isString(n))return e.indexOf(n)!==-1;if(ie.isRegExp(n))return n.test(e)}}o(ER,"matchHeaderValue");function Vge(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}o(Vge,"formatHeader");function Uge(r,e){let t=ie.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:o(function(s,i,a){return this[n].call(this,e,s,i,a)},"value"),configurable:!0})})}o(Uge,"buildAccessors");var Yb=class{static{o(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,n){let s=this;function i(u,c,l){let h=cv(c);if(!h)throw new Error("header name must be a non-empty string");let m=ie.findKey(s,h);(!m||s[m]===void 0||l===!0||l===void 0&&s[m]!==!1)&&(s[m||c]=Jb(u))}o(i,"setHeader");let a=o((u,c)=>ie.forEach(u,(l,h)=>i(l,h,c)),"setHeaders");if(ie.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ie.isString(e)&&(e=e.trim())&&!Lge(e))a(VH(e),t);else if(ie.isObject(e)&&ie.isIterable(e)){let u={},c,l;for(let h of e){if(!ie.isArray(h))throw TypeError("Object iterator must return a key-value pair");u[l=h[0]]=(c=u[l])?ie.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}a(u,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=cv(e),e){let n=ie.findKey(this,e);if(n){let s=this[n];if(!t)return s;if(t===!0)return kge(s);if(ie.isFunction(t))return t.call(this,s,n);if(ie.isRegExp(t))return t.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=cv(e),e){let n=ie.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||ER(this,this[n],n,t)))}return!1}delete(e,t){let n=this,s=!1;function i(a){if(a=cv(a),a){let u=ie.findKey(n,a);u&&(!t||ER(n,n[u],u,t))&&(delete n[u],s=!0)}}return o(i,"deleteHeader"),ie.isArray(e)?e.forEach(i):i(e),s}clear(e){let t=Object.keys(this),n=t.length,s=!1;for(;n--;){let i=t[n];(!e||ER(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){let t=this,n={};return ie.forEach(this,(s,i)=>{let a=ie.findKey(n,i);if(a){t[a]=Jb(s),delete t[i];return}let u=e?Vge(i):String(i).trim();u!==i&&delete t[i],t[u]=Jb(s),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return ie.forEach(this,(n,s)=>{n!=null&&n!==!1&&(t[s]=e&&ie.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
101
101
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(s=>n.set(s)),n}static accessor(e){let n=(this[UH]=this[UH]={accessors:{}}).accessors,s=this.prototype;function i(a){let u=cv(a);n[u]||(Uge(s,a),n[u]=!0)}return o(i,"defineAccessor"),ie.isArray(e)?e.forEach(i):i(e),this}};Yb.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(Yb.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:o(()=>r,"get"),set(n){this[t]=n}}});ie.freezeMethods(Yb);var sn=Yb;function lv(r,e){let t=this||Wd,n=e||t,s=sn.from(n.headers),i=n.data;return ie.forEach(r,o(function(u){i=u.call(t,i,s.normalize(),e?e.status:void 0)},"transform")),s.normalize(),i}o(lv,"transformData");function fv(r){return!!(r&&r.__CANCEL__)}o(fv,"isCancel");var Fge=class extends Qe{static{o(this,"CanceledError")}constructor(e,t,n){super(e??"canceled",Qe.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}},Si=Fge;function So(r,e,t){let n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new Qe("Request failed with status code "+t.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}o(So,"settle");function SR(r){return typeof r!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}o(SR,"isAbsoluteURL");function bR(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}o(bR,"combineURLs");function jf(r,e,t){let n=!SR(e);return r&&(n||t==!1)?bR(r,e):e}o(jf,"buildFullPath");var e7=or(I_(),1),t7=or(require("http"),1),r7=or(require("https"),1),IR=or(require("http2"),1),_R=or(require("util"),1),n7=or(M_(),1),hu=or(require("zlib"),1);var Mf="1.13.5";function hv(r){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}o(hv,"parseProtocol");var jge=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function AR(r,e,t){let n=t&&t.Blob||br.classes.Blob,s=hv(r);if(e===void 0&&n&&(e=!0),s==="data"){r=s.length?r.slice(s.length+1):r;let i=jge.exec(r);if(!i)throw new Qe("Invalid URL",Qe.ERR_INVALID_URL);let a=i[1],u=i[2],c=i[3],l=Buffer.from(decodeURIComponent(c),u?"base64":"utf8");if(e){if(!n)throw new Qe("Blob is not supported",Qe.ERR_NOT_SUPPORT);return new n([l],{type:a})}return l}throw new Qe("Unsupported protocol "+s,Qe.ERR_NOT_SUPPORT)}o(AR,"fromDataURI");var fu=or(require("stream"),1);var FH=or(require("stream"),1);var CR=Symbol("internals"),Mge=class extends FH.default.Transform{static{o(this,"AxiosTransformStream")}constructor(e){e=ie.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,s)=>!ie.isUndefined(s[n])),super({readableHighWaterMark:e.chunkSize});let t=this[CR]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(t.isCaptured||(t.isCaptured=!0))})}_read(e){let t=this[CR];return t.onReadCallback&&t.onReadCallback(),super._read(e)}_transform(e,t,n){let s=this[CR],i=s.maxRate,a=this.readableHighWaterMark,u=s.timeWindow,c=1e3/u,l=i/c,h=s.minChunkSize!==!1?Math.max(s.minChunkSize,l*.01):0,m=o((v,y)=>{let E=Buffer.byteLength(v);s.bytesSeen+=E,s.bytes+=E,s.isCaptured&&this.emit("progress",s.bytesSeen),this.push(v)?process.nextTick(y):s.onReadCallback=()=>{s.onReadCallback=null,process.nextTick(y)}},"pushChunk"),g=o((v,y)=>{let E=Buffer.byteLength(v),x=null,C=a,_,b=0;if(i){let A=Date.now();(!s.ts||(b=A-s.ts)>=u)&&(s.ts=A,_=l-s.bytes,s.bytes=_<0?-_:0,b=0),_=l-s.bytes}if(i){if(_<=0)return setTimeout(()=>{y(null,v)},u-b);_<C&&(C=_)}C&&E>C&&E-C>h&&(x=v.subarray(C),v=v.subarray(0,C)),m(v,x?()=>{process.nextTick(y,null,x)}:y)},"transformChunk");g(e,o(function v(y,E){if(y)return n(y);E?g(E,v):n(null)},"transformNextChunk"))}},NR=Mge;var s7=require("events");var MH=or(require("util"),1),qH=require("stream");var{asyncIterator:jH}=Symbol,qge=o(async function*(r){r.stream?yield*r.stream():r.arrayBuffer?yield await r.arrayBuffer():r[jH]?yield*r[jH]():yield r},"readBlob"),Qb=qge;var Hge=br.ALPHABET.ALPHA_DIGIT+"-_",pv=typeof TextEncoder=="function"?new TextEncoder:new MH.default.TextEncoder,qf=`\r
102
102
  `,Kge=pv.encode(qf),$ge=2,Gge=class{static{o(this,"FormDataPart")}constructor(e,t){let{escapeName:n}=this.constructor,s=ie.isString(t),i=`Content-Disposition: form-data; name="${n(e)}"${!s&&t.name?`; filename="${n(t.name)}"`:""}${qf}`;s?t=pv.encode(String(t).replace(/\r?\n|\r\n?/g,qf)):i+=`Content-Type: ${t.type||"application/octet-stream"}${qf}`,this.headers=pv.encode(i+qf),this.contentLength=s?t.byteLength:t.size,this.size=this.headers.byteLength+this.contentLength+$ge,this.name=e,this.value=t}async*encode(){yield this.headers;let{value:e}=this;ie.isTypedArray(e)?yield e:yield*Qb(e),yield Kge}static escapeName(e){return String(e).replace(/[\r\n"]/g,t=>({"\r":"%0D","\n":"%0A",'"':"%22"})[t])}},Xge=o((r,e,t)=>{let{tag:n="form-data-boundary",size:s=25,boundary:i=n+"-"+br.generateString(s,Hge)}=t||{};if(!ie.isFormData(r))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let a=pv.encode("--"+i+qf),u=pv.encode("--"+i+"--"+qf),c=u.byteLength,l=Array.from(r.entries()).map(([m,g])=>{let v=new Gge(m,g);return c+=v.size,v});c+=a.byteLength*l.length,c=ie.toFiniteNumber(c);let h={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(h["Content-Length"]=c),e&&e(h),qH.Readable.from((async function*(){for(let m of l)yield a,yield*m.encode();yield u})())},"formDataToStream"),HH=Xge;var KH=or(require("stream"),1);var Wge=class extends KH.default.Transform{static{o(this,"ZlibHeaderTransformStream")}__transform(e,t,n){this.push(e),n()}_transform(e,t,n){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let s=Buffer.alloc(2);s[0]=120,s[1]=156,this.push(s,t)}this.__transform(e,t,n)}},$H=Wge;var zge=o((r,e)=>ie.isAsyncFn(r)?function(...t){let n=t.pop();r.apply(this,t).then(s=>{try{e?n(null,...e(s)):n(null,s)}catch(i){n(i)}},n)}:r,"callbackify"),GH=zge;function Jge(r,e){r=r||10;let t=new Array(r),n=new Array(r),s=0,i=0,a;return e=e!==void 0?e:1e3,o(function(c){let l=Date.now(),h=n[i];a||(a=l),t[s]=c,n[s]=l;let m=i,g=0;for(;m!==s;)g+=t[m++],m=m%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),l-a<e)return;let v=h&&l-h;return v?Math.round(g*1e3/v):void 0},"push")}o(Jge,"speedometer");var XH=Jge;function Yge(r,e){let t=0,n=1e3/e,s,i,a=o((l,h=Date.now())=>{t=h,s=null,i&&(clearTimeout(i),i=null),r(...l)},"invoke");return[o((...l)=>{let h=Date.now(),m=h-t;m>=n?a(l,h):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},n-m)))},"throttled"),o(()=>s&&a(s),"flush")]}o(Yge,"throttle");var WH=Yge;var lu=o((r,e,t=3)=>{let n=0,s=XH(50,250);return WH(i=>{let a=i.loaded,u=i.lengthComputable?i.total:void 0,c=a-n,l=s(c),h=a<=u;n=a;let m={loaded:a,total:u,progress:u?a/u:void 0,bytes:c,rate:l||void 0,estimated:l&&u&&h?(u-a)/l:void 0,event:i,lengthComputable:u!=null,[e?"download":"upload"]:!0};r(m)},t)},"progressEventReducer"),zd=o((r,e)=>{let t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},"progressEventDecorator"),Jd=o(r=>(...e)=>ie.asap(()=>r(...e)),"asyncDecorator");function TR(r){if(!r||typeof r!="string"||!r.startsWith("data:"))return 0;let e=r.indexOf(",");if(e<0)return 0;let t=r.slice(5,e),n=r.slice(e+1);if(/;base64/i.test(t)){let i=n.length,a=n.length;for(let g=0;g<a;g++)if(n.charCodeAt(g)===37&&g+2<a){let v=n.charCodeAt(g+1),y=n.charCodeAt(g+2);(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(i-=2,g+=2)}let u=0,c=a-1,l=o(g=>g>=2&&n.charCodeAt(g-2)===37&&n.charCodeAt(g-1)===51&&(n.charCodeAt(g)===68||n.charCodeAt(g)===100),"tailIsPct3D");c>=0&&(n.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&u++;let m=Math.floor(i/4)*3-(u||0);return m>0?m:0}return Buffer.byteLength(n,"utf8")}o(TR,"estimateDataURLDecodedBytes");var zH={flush:hu.default.constants.Z_SYNC_FLUSH,finishFlush:hu.default.constants.Z_SYNC_FLUSH},Qge={flush:hu.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:hu.default.constants.BROTLI_OPERATION_FLUSH},JH=ie.isFunction(hu.default.createBrotliDecompress),{http:Zge,https:eye}=n7.default,tye=/https:?/,YH=br.protocols.map(r=>r+":"),QH=o((r,[e,t])=>(r.on("end",t).on("error",t),e),"flushOnFinish"),rye=class{static{o(this,"Http2Sessions")}constructor(){this.sessions=Object.create(null)}getSession(e,t){t=Object.assign({sessionTimeout:1e3},t);let n=this.sessions[e];if(n){let h=n.length;for(let m=0;m<h;m++){let[g,v]=n[m];if(!g.destroyed&&!g.closed&&_R.default.isDeepStrictEqual(v,t))return g}}let s=IR.default.connect(e,t),i,a=o(()=>{if(i)return;i=!0;let h=n,m=h.length,g=m;for(;g--;)if(h[g][0]===s){m===1?delete this.sessions[e]:h.splice(g,1);return}},"removeSession"),u=s.request,{sessionTimeout:c}=t;if(c!=null){let h,m=0;s.request=function(){let g=u.apply(this,arguments);return m++,h&&(clearTimeout(h),h=null),g.once("close",()=>{--m||(h=setTimeout(()=>{h=null,a()},c))}),g}}s.once("close",a);let l=[s,t];return n?n.push(l):n=this.sessions[e]=[l],s}},nye=new rye;function sye(r,e){r.beforeRedirects.proxy&&r.beforeRedirects.proxy(r),r.beforeRedirects.config&&r.beforeRedirects.config(r,e)}o(sye,"dispatchBeforeRedirect");function i7(r,e,t){let n=e;if(!n&&n!==!1){let s=e7.default.getProxyForUrl(t);s&&(n=new URL(s))}if(n){if(n.username&&(n.auth=(n.username||"")+":"+(n.password||"")),n.auth){if(!!(n.auth.username||n.auth.password))n.auth=(n.auth.username||"")+":"+(n.auth.password||"");else if(typeof n.auth=="object")throw new Qe("Invalid proxy authorization",Qe.ERR_BAD_OPTION,{proxy:n});let a=Buffer.from(n.auth,"utf8").toString("base64");r.headers["Proxy-Authorization"]="Basic "+a}r.headers.host=r.hostname+(r.port?":"+r.port:"");let s=n.hostname||n.host;r.hostname=s,r.host=s,r.port=n.port,r.path=t,n.protocol&&(r.protocol=n.protocol.includes(":")?n.protocol:`${n.protocol}:`)}r.beforeRedirects.proxy=o(function(i){i7(i,e,i.href)},"beforeRedirect")}o(i7,"setProxy");var iye=typeof process<"u"&&ie.kindOf(process)==="process",aye=o(r=>new Promise((e,t)=>{let n,s,i=o((c,l)=>{s||(s=!0,n&&n(c,l))},"done"),a=o(c=>{i(c),e(c)},"_resolve"),u=o(c=>{i(c,!0),t(c)},"_reject");r(a,u,c=>n=c).catch(u)}),"wrapAsync"),oye=o(({address:r,family:e})=>{if(!ie.isString(r))throw TypeError("address must be a string");return{address:r,family:e||(r.indexOf(".")<0?6:4)}},"resolveFamily"),ZH=o((r,e)=>oye(ie.isObject(r)?r:{address:r,family:e}),"buildAddressEntry"),uye={request(r,e){let t=r.protocol+"//"+r.hostname+":"+(r.port||(r.protocol==="https:"?443:80)),{http2Options:n,headers:s}=r,i=nye.getSession(t,n),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:u,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=IR.default.constants,h={[a]:r.protocol.replace(":",""),[u]:r.method,[c]:r.path};ie.forEach(s,(g,v)=>{v.charAt(0)!==":"&&(h[v]=g)});let m=i.request(h);return m.once("response",g=>{let v=m;g=Object.assign({},g);let y=g[l];delete g[l],v.headers=g,v.statusCode=+y,e(v)}),m}},a7=iye&&o(function(e){return aye(o(async function(n,s,i){let{data:a,lookup:u,family:c,httpVersion:l=1,http2Options:h}=e,{responseType:m,responseEncoding:g}=e,v=e.method.toUpperCase(),y,E=!1,x;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let C=l===2;if(u){let ne=GH(u,Z=>ie.isArray(Z)?Z:[Z]);u=o((Z,Se,He)=>{ne(Z,Se,(Le,tt,N)=>{if(Le)return He(Le);let S=ie.isArray(tt)?tt.map(G=>ZH(G)):[ZH(tt,N)];Se.all?He(Le,S):He(Le,S[0].address,S[0].family)})},"lookup")}let _=new s7.EventEmitter;function b(ne){try{_.emit("abort",!ne||ne.type?new Si(null,e,x):ne)}catch(Z){console.warn("emit error",Z)}}o(b,"abort"),_.once("abort",s);let A=o(()=>{e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b),_.removeAllListeners()},"onFinished");(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),i((ne,Z)=>{if(y=!0,Z){E=!0,A();return}let{data:Se}=ne;if(Se instanceof fu.default.Readable||Se instanceof fu.default.Duplex){let He=fu.default.finished(Se,()=>{He(),A()})}else A()});let T=jf(e.baseURL,e.url,e.allowAbsoluteUrls),B=new URL(T,br.hasBrowserEnv?br.origin:void 0),M=B.protocol||YH[0];if(M==="data:"){if(e.maxContentLength>-1){let Z=String(e.url||T||"");if(TR(Z)>e.maxContentLength)return s(new Qe("maxContentLength size of "+e.maxContentLength+" exceeded",Qe.ERR_BAD_RESPONSE,e))}let ne;if(v!=="GET")return So(n,s,{status:405,statusText:"method not allowed",headers:{},config:e});try{ne=AR(e.url,m==="blob",{Blob:e.env&&e.env.Blob})}catch(Z){throw Qe.from(Z,Qe.ERR_BAD_REQUEST,e)}return m==="text"?(ne=ne.toString(g),(!g||g==="utf8")&&(ne=ie.stripBOM(ne))):m==="stream"&&(ne=fu.default.Readable.from(ne)),So(n,s,{data:ne,status:200,statusText:"OK",headers:new sn,config:e})}if(YH.indexOf(M)===-1)return s(new Qe("Unsupported protocol "+M,Qe.ERR_BAD_REQUEST,e));let I=sn.from(e.headers).normalize();I.set("User-Agent","axios/"+Mf,!1);let{onUploadProgress:H,onDownloadProgress:K}=e,q=e.maxRate,W,he;if(ie.isSpecCompliantForm(a)){let ne=I.getContentType(/boundary=([-_\w\d]{10,70})/i);a=HH(a,Z=>{I.set(Z)},{tag:`axios-${Mf}-boundary`,boundary:ne&&ne[1]||void 0})}else if(ie.isFormData(a)&&ie.isFunction(a.getHeaders)){if(I.set(a.getHeaders()),!I.hasContentLength())try{let ne=await _R.default.promisify(a.getLength).call(a);Number.isFinite(ne)&&ne>=0&&I.setContentLength(ne)}catch{}}else if(ie.isBlob(a)||ie.isFile(a))a.size&&I.setContentType(a.type||"application/octet-stream"),I.setContentLength(a.size||0),a=fu.default.Readable.from(Qb(a));else if(a&&!ie.isStream(a)){if(!Buffer.isBuffer(a))if(ie.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(ie.isString(a))a=Buffer.from(a,"utf-8");else return s(new Qe("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Qe.ERR_BAD_REQUEST,e));if(I.setContentLength(a.length,!1),e.maxBodyLength>-1&&a.length>e.maxBodyLength)return s(new Qe("Request body larger than maxBodyLength limit",Qe.ERR_BAD_REQUEST,e))}let pe=ie.toFiniteNumber(I.getContentLength());ie.isArray(q)?(W=q[0],he=q[1]):W=he=q,a&&(H||W)&&(ie.isStream(a)||(a=fu.default.Readable.from(a,{objectMode:!1})),a=fu.default.pipeline([a,new NR({maxRate:ie.toFiniteNumber(W)})],ie.noop),H&&a.on("progress",QH(a,zd(pe,lu(Jd(H),!1,3)))));let ue;if(e.auth){let ne=e.auth.username||"",Z=e.auth.password||"";ue=ne+":"+Z}if(!ue&&B.username){let ne=B.username,Z=B.password;ue=ne+":"+Z}ue&&I.delete("authorization");let Y;try{Y=Ff(B.pathname+B.search,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(ne){let Z=new Error(ne.message);return Z.config=e,Z.url=e.url,Z.exists=!0,s(Z)}I.set("Accept-Encoding","gzip, compress, deflate"+(JH?", br":""),!1);let ye={path:Y,method:v,headers:I.toJSON(),agents:{http:e.httpAgent,https:e.httpsAgent},auth:ue,protocol:M,family:c,beforeRedirect:sye,beforeRedirects:{},http2Options:h};!ie.isUndefined(u)&&(ye.lookup=u),e.socketPath?ye.socketPath=e.socketPath:(ye.hostname=B.hostname.startsWith("[")?B.hostname.slice(1,-1):B.hostname,ye.port=B.port,i7(ye,e.proxy,M+"//"+B.hostname+(B.port?":"+B.port:"")+ye.path));let Oe,ze=tye.test(ye.protocol);if(ye.agent=ze?e.httpsAgent:e.httpAgent,C?Oe=uye:e.transport?Oe=e.transport:e.maxRedirects===0?Oe=ze?r7.default:t7.default:(e.maxRedirects&&(ye.maxRedirects=e.maxRedirects),e.beforeRedirect&&(ye.beforeRedirects.config=e.beforeRedirect),Oe=ze?eye:Zge),e.maxBodyLength>-1?ye.maxBodyLength=e.maxBodyLength:ye.maxBodyLength=1/0,e.insecureHTTPParser&&(ye.insecureHTTPParser=e.insecureHTTPParser),x=Oe.request(ye,o(function(Z){if(x.destroyed)return;let Se=[Z],He=ie.toFiniteNumber(Z.headers["content-length"]);if(K||he){let S=new NR({maxRate:ie.toFiniteNumber(he)});K&&S.on("progress",QH(S,zd(He,lu(Jd(K),!0,3)))),Se.push(S)}let Le=Z,tt=Z.req||x;if(e.decompress!==!1&&Z.headers["content-encoding"])switch((v==="HEAD"||Z.statusCode===204)&&delete Z.headers["content-encoding"],(Z.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":Se.push(hu.default.createUnzip(zH)),delete Z.headers["content-encoding"];break;case"deflate":Se.push(new $H),Se.push(hu.default.createUnzip(zH)),delete Z.headers["content-encoding"];break;case"br":JH&&(Se.push(hu.default.createBrotliDecompress(Qge)),delete Z.headers["content-encoding"])}Le=Se.length>1?fu.default.pipeline(Se,ie.noop):Se[0];let N={status:Z.statusCode,statusText:Z.statusMessage,headers:new sn(Z.headers),config:e,request:tt};if(m==="stream")N.data=Le,So(n,s,N);else{let S=[],G=0;Le.on("data",o(function(Ee){S.push(Ee),G+=Ee.length,e.maxContentLength>-1&&G>e.maxContentLength&&(E=!0,Le.destroy(),b(new Qe("maxContentLength size of "+e.maxContentLength+" exceeded",Qe.ERR_BAD_RESPONSE,e,tt)))},"handleStreamData")),Le.on("aborted",o(function(){if(E)return;let Ee=new Qe("stream has been aborted",Qe.ERR_BAD_RESPONSE,e,tt);Le.destroy(Ee),s(Ee)},"handlerStreamAborted")),Le.on("error",o(function(Ee){x.destroyed||s(Qe.from(Ee,null,e,tt))},"handleStreamError")),Le.on("end",o(function(){try{let Ee=S.length===1?S[0]:Buffer.concat(S);m!=="arraybuffer"&&(Ee=Ee.toString(g),(!g||g==="utf8")&&(Ee=ie.stripBOM(Ee))),N.data=Ee}catch(Ee){return s(Qe.from(Ee,null,e,N.request,N))}So(n,s,N)},"handleStreamEnd"))}_.once("abort",S=>{Le.destroyed||(Le.emit("error",S),Le.destroy())})},"handleResponse")),_.once("abort",ne=>{x.close?x.close():x.destroy(ne)}),x.on("error",o(function(Z){s(Qe.from(Z,null,e,x))},"handleRequestError")),x.on("socket",o(function(Z){Z.setKeepAlive(!0,1e3*60)},"handleRequestSocket")),e.timeout){let ne=parseInt(e.timeout,10);if(Number.isNaN(ne)){b(new Qe("error trying to parse `config.timeout` to int",Qe.ERR_BAD_OPTION_VALUE,e,x));return}x.setTimeout(ne,o(function(){if(y)return;let Se=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",He=e.transitional||Kc;e.timeoutErrorMessage&&(Se=e.timeoutErrorMessage),b(new Qe(Se,He.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,e,x))},"handleRequestTimeout"))}else x.setTimeout(0);if(ie.isStream(a)){let ne=!1,Z=!1;a.on("end",()=>{ne=!0}),a.once("error",Se=>{Z=!0,x.destroy(Se)}),a.on("close",()=>{!ne&&!Z&&b(new Si("Request stream has been aborted",e,x))}),a.pipe(x)}else a&&x.write(a),x.end()},"dispatchHttpRequest"))},"httpAdapter");var o7=br.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,br.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(br.origin),br.navigator&&/(msie|trident)/i.test(br.navigator.userAgent)):()=>!0;var u7=br.hasStandardBrowserEnv?{write(r,e,t,n,s,i,a){if(typeof document>"u")return;let u=[`${r}=${encodeURIComponent(e)}`];ie.isNumber(t)&&u.push(`expires=${new Date(t).toUTCString()}`),ie.isString(n)&&u.push(`path=${n}`),ie.isString(s)&&u.push(`domain=${s}`),i===!0&&u.push("secure"),ie.isString(a)&&u.push(`SameSite=${a}`),document.cookie=u.join("; ")},read(r){if(typeof document>"u")return null;let e=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var c7=o(r=>r instanceof sn?{...r}:r,"headersToObject");function Ta(r,e){e=e||{};let t={};function n(l,h,m,g){return ie.isPlainObject(l)&&ie.isPlainObject(h)?ie.merge.call({caseless:g},l,h):ie.isPlainObject(h)?ie.merge({},h):ie.isArray(h)?h.slice():h}o(n,"getMergedValue");function s(l,h,m,g){if(ie.isUndefined(h)){if(!ie.isUndefined(l))return n(void 0,l,m,g)}else return n(l,h,m,g)}o(s,"mergeDeepProperties");function i(l,h){if(!ie.isUndefined(h))return n(void 0,h)}o(i,"valueFromConfig2");function a(l,h){if(ie.isUndefined(h)){if(!ie.isUndefined(l))return n(void 0,l)}else return n(void 0,h)}o(a,"defaultToConfig2");function u(l,h,m){if(m in e)return n(l,h);if(m in r)return n(void 0,l)}o(u,"mergeDirectKeys");let c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u,headers:o((l,h,m)=>s(c7(l),c7(h),m,!0),"headers")};return ie.forEach(Object.keys({...r,...e}),o(function(h){if(h==="__proto__"||h==="constructor"||h==="prototype")return;let m=ie.hasOwnProp(c,h)?c[h]:s,g=m(r[h],e[h],h);ie.isUndefined(g)&&m!==u||(t[h]=g)},"computeConfigValue")),t}o(Ta,"mergeConfig");var Zb=o((r=>{let e=Ta({},r),{data:t,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=e;if(e.headers=a=sn.from(a),e.url=Ff(jf(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ie.isFormData(t)){if(br.hasStandardBrowserEnv||br.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(ie.isFunction(t.getHeaders)){let c=t.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([h,m])=>{l.includes(h.toLowerCase())&&a.set(h,m)})}}if(br.hasStandardBrowserEnv&&(n&&ie.isFunction(n)&&(n=n(e)),n||n!==!1&&o7(e.url))){let c=s&&i&&u7.read(i);c&&a.set(s,c)}return e}),"default");var cye=typeof XMLHttpRequest<"u",l7=cye&&function(r){return new Promise(o(function(t,n){let s=Zb(r),i=s.data,a=sn.from(s.headers).normalize(),{responseType:u,onUploadProgress:c,onDownloadProgress:l}=s,h,m,g,v,y;function E(){v&&v(),y&&y(),s.cancelToken&&s.cancelToken.unsubscribe(h),s.signal&&s.signal.removeEventListener("abort",h)}o(E,"done");let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function C(){if(!x)return;let b=sn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),T={data:!u||u==="text"||u==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:b,config:r,request:x};So(o(function(M){t(M),E()},"_resolve"),o(function(M){n(M),E()},"_reject"),T),x=null}o(C,"onloadend"),"onloadend"in x?x.onloadend=C:x.onreadystatechange=o(function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(C)},"handleLoad"),x.onabort=o(function(){x&&(n(new Qe("Request aborted",Qe.ECONNABORTED,r,x)),x=null)},"handleAbort"),x.onerror=o(function(A){let T=A&&A.message?A.message:"Network Error",B=new Qe(T,Qe.ERR_NETWORK,r,x);B.event=A||null,n(B),x=null},"handleError"),x.ontimeout=o(function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded",T=s.transitional||Kc;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new Qe(A,T.clarifyTimeoutError?Qe.ETIMEDOUT:Qe.ECONNABORTED,r,x)),x=null},"handleTimeout"),i===void 0&&a.setContentType(null),"setRequestHeader"in x&&ie.forEach(a.toJSON(),o(function(A,T){x.setRequestHeader(T,A)},"setRequestHeader")),ie.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),u&&u!=="json"&&(x.responseType=s.responseType),l&&([g,y]=lu(l,!0),x.addEventListener("progress",g)),c&&x.upload&&([m,v]=lu(c),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",v)),(s.cancelToken||s.signal)&&(h=o(b=>{x&&(n(!b||b.type?new Si(null,r,x):b),x.abort(),x=null)},"onCanceled"),s.cancelToken&&s.cancelToken.subscribe(h),s.signal&&(s.signal.aborted?h():s.signal.addEventListener("abort",h)));let _=hv(s.url);if(_&&br.protocols.indexOf(_)===-1){n(new Qe("Unsupported protocol "+_+":",Qe.ERR_BAD_REQUEST,r));return}x.send(i||null)},"dispatchXhrRequest"))};var lye=o((r,e)=>{let{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,s,i=o(function(l){if(!s){s=!0,u();let h=l instanceof Error?l:this.reason;n.abort(h instanceof Qe?h:new Si(h instanceof Error?h.message:h))}},"onabort"),a=e&&setTimeout(()=>{a=null,i(new Qe(`timeout of ${e}ms exceeded`,Qe.ETIMEDOUT))},e),u=o(()=>{r&&(a&&clearTimeout(a),a=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),r=null)},"unsubscribe");r.forEach(l=>l.addEventListener("abort",i));let{signal:c}=n;return c.unsubscribe=()=>ie.asap(u),c}},"composeSignals"),f7=lye;var fye=o(function*(r,e){let t=r.byteLength;if(!e||t<e){yield r;return}let n=0,s;for(;n<t;)s=n+e,yield r.slice(n,s),n=s},"streamChunk"),hye=o(async function*(r,e){for await(let t of pye(r))yield*fye(t,e)},"readBytes"),pye=o(async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}let e=r.getReader();try{for(;;){let{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},"readStream"),DR=o((r,e,t,n)=>{let s=hye(r,e),i=0,a,u=o(c=>{a||(a=!0,n&&n(c))},"_onFinish");return new ReadableStream({async pull(c){try{let{done:l,value:h}=await s.next();if(l){u(),c.close();return}let m=h.byteLength;if(t){let g=i+=m;t(g)}c.enqueue(new Uint8Array(h))}catch(l){throw u(l),l}},cancel(c){return u(c),s.return()}},{highWaterMark:2})},"trackStream");var h7=64*1024,{isFunction:eA}=ie,dye=(({Request:r,Response:e})=>({Request:r,Response:e}))(ie.global),{ReadableStream:p7,TextEncoder:d7}=ie.global,m7=o((r,...e)=>{try{return!!r(...e)}catch{return!1}},"test"),mye=o(r=>{r=ie.merge.call({skipUndefined:!0},dye,r);let{fetch:e,Request:t,Response:n}=r,s=e?eA(e):typeof fetch=="function",i=eA(t),a=eA(n);if(!s)return!1;let u=s&&eA(p7),c=s&&(typeof d7=="function"?(y=>E=>y.encode(E))(new d7):async y=>new Uint8Array(await new t(y).arrayBuffer())),l=i&&u&&m7(()=>{let y=!1,E=new t(br.origin,{body:new p7,method:"POST",get duplex(){return y=!0,"half"}}).headers.has("Content-Type");return y&&!E}),h=a&&u&&m7(()=>ie.isReadableStream(new n("").body)),m={stream:h&&(y=>y.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!m[y]&&(m[y]=(E,x)=>{let C=E&&E[y];if(C)return C.call(E);throw new Qe(`Response type '${y}' is not supported`,Qe.ERR_NOT_SUPPORT,x)})});let g=o(async y=>{if(y==null)return 0;if(ie.isBlob(y))return y.size;if(ie.isSpecCompliantForm(y))return(await new t(br.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(y)||ie.isArrayBuffer(y))return y.byteLength;if(ie.isURLSearchParams(y)&&(y=y+""),ie.isString(y))return(await c(y)).byteLength},"getBodyLength"),v=o(async(y,E)=>{let x=ie.toFiniteNumber(y.getContentLength());return x??g(E)},"resolveBodyLength");return async y=>{let{url:E,method:x,data:C,signal:_,cancelToken:b,timeout:A,onDownloadProgress:T,onUploadProgress:B,responseType:M,headers:I,withCredentials:H="same-origin",fetchOptions:K}=Zb(y),q=e||fetch;M=M?(M+"").toLowerCase():"text";let W=f7([_,b&&b.toAbortSignal()],A),he=null,pe=W&&W.unsubscribe&&(()=>{W.unsubscribe()}),ue;try{if(B&&l&&x!=="get"&&x!=="head"&&(ue=await v(I,C))!==0){let Z=new t(E,{method:"POST",body:C,duplex:"half"}),Se;if(ie.isFormData(C)&&(Se=Z.headers.get("content-type"))&&I.setContentType(Se),Z.body){let[He,Le]=zd(ue,lu(Jd(B)));C=DR(Z.body,h7,He,Le)}}ie.isString(H)||(H=H?"include":"omit");let Y=i&&"credentials"in t.prototype,ye={...K,signal:W,method:x.toUpperCase(),headers:I.normalize().toJSON(),body:C,duplex:"half",credentials:Y?H:void 0};he=i&&new t(E,ye);let Oe=await(i?q(he,K):q(E,ye)),ze=h&&(M==="stream"||M==="response");if(h&&(T||ze&&pe)){let Z={};["status","statusText","headers"].forEach(tt=>{Z[tt]=Oe[tt]});let Se=ie.toFiniteNumber(Oe.headers.get("content-length")),[He,Le]=T&&zd(Se,lu(Jd(T),!0))||[];Oe=new n(DR(Oe.body,h7,He,()=>{Le&&Le(),pe&&pe()}),Z)}M=M||"text";let ne=await m[ie.findKey(m,M)||"text"](Oe,y);return!ze&&pe&&pe(),await new Promise((Z,Se)=>{So(Z,Se,{data:ne,headers:sn.from(Oe.headers),status:Oe.status,statusText:Oe.statusText,config:y,request:he})})}catch(Y){throw pe&&pe(),Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)?Object.assign(new Qe("Network Error",Qe.ERR_NETWORK,y,he,Y&&Y.response),{cause:Y.cause||Y}):Qe.from(Y,Y&&Y.code,y,he,Y&&Y.response)}}},"factory"),gye=new Map,BR=o(r=>{let e=r&&r.env||{},{fetch:t,Request:n,Response:s}=e,i=[n,s,t],a=i.length,u=a,c,l,h=gye;for(;u--;)c=i[u],l=h.get(c),l===void 0&&h.set(c,l=u?new Map:mye(e)),h=l;return l},"getFetch"),NRe=BR();var RR={http:a7,xhr:l7,fetch:{get:BR}};ie.forEach(RR,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});var g7=o(r=>`- ${r}`,"renderReason"),vye=o(r=>ie.isFunction(r)||r===null||r===!1,"isResolvedHandle");function xye(r,e){r=ie.isArray(r)?r:[r];let{length:t}=r,n,s,i={};for(let a=0;a<t;a++){n=r[a];let u;if(s=n,!vye(n)&&(s=RR[(u=String(n)).toLowerCase()],s===void 0))throw new Qe(`Unknown adapter '${u}'`);if(s&&(ie.isFunction(s)||(s=s.get(e))))break;i[u||"#"+a]=s}if(!s){let a=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import"../chunk-23RWB4QQ.mjs";import{$ as T,A as w,B as x,D as y,E as z,H as A,I as B,J as C,K as D,L as E,N as F,O as G,P as H,Q as I,R as J,S as K,T as L,U as M,V as N,W as O,X as P,Y as Q,Z as R,_ as S,a,aa as U,b,ba as V,c,ca as W,d,da as X,e,ea as Y,f,fa as Z,g,ga as _,h,ha as $,ia as aa,j as i,ja as ba,k as j,ka as ca,la as da,m as k,ma as ea,na as fa,p as l,q as m,r as n,s as o,t as p,u as q,v as r,w as s,x as t,y as u,z as v}from"../chunk-POAIEFMR.mjs";import"../chunk-W6MRGYXP.mjs";export{fa as ASN1,b as CanonicalizationMethod,D as Choice,v as Decimal,e as DigestAlgorithm,l as EntitySigner,h as Environment,C as IsDecimal,x as MemoryCacheAdapter,i as NFeTsError,z as NativeCertificateRepository,y as NullCacheAdapter,w as PdfkitPdfBuilder,d as SignatureAlgorithm,c as SignatureMethod,a as SignatureNamespace,k as Signer,p as SkipAllValidations,o as SkipValidation,n as SkipValidationMetadata,A as SoapRemoteTransmissionRepository,g as StateAcronyms,G as StateCodeAcValidator,H as StateCodeAlValidator,I as StateCodeAmValidator,J as StateCodeApValidator,K as StateCodeBaValidator,L as StateCodeCeValidator,M as StateCodeDfValidator,N as StateCodeEsValidator,O as StateCodeGoValidator,P as StateCodeMaValidator,Q as StateCodeMgValidator,R as StateCodeMsValidator,S as StateCodeMtValidator,T as StateCodePaValidator,U as StateCodePbValidator,V as StateCodePeValidator,W as StateCodePiValidator,X as StateCodePrValidator,Y as StateCodeRjValidator,Z as StateCodeRnValidator,_ as StateCodeRoValidator,$ as StateCodeRrValidator,aa as StateCodeRsValidator,ba as StateCodeScValidator,ca as StateCodeSeValidator,da as StateCodeSpValidator,ea as StateCodeToValidator,f as StateCodes,F as TransformDateString,E as TransformDecimal,s as ValidateErrorsMetadata,u as Validates,j as ValidationError,B as Xml2JsToolkit,m as XmlSigner,q as clearEmptyValues,t as mapConstraintsToErrors,r as plainToInstance};
2
+ import"../chunk-23RWB4QQ.mjs";import{$ as T,A as w,B as x,D as y,E as z,H as A,I as B,J as C,K as D,L as E,N as F,O as G,P as H,Q as I,R as J,S as K,T as L,U as M,V as N,W as O,X as P,Y as Q,Z as R,_ as S,a,aa as U,b,ba as V,c,ca as W,d,da as X,e,ea as Y,f,fa as Z,g,ga as _,h,ha as $,ia as aa,j as i,ja as ba,k as j,ka as ca,la as da,m as k,ma as ea,na as fa,p as l,q as m,r as n,s as o,t as p,u as q,v as r,w as s,x as t,y as u,z as v}from"../chunk-IJON6HO5.mjs";import"../chunk-W6MRGYXP.mjs";export{fa as ASN1,b as CanonicalizationMethod,D as Choice,v as Decimal,e as DigestAlgorithm,l as EntitySigner,h as Environment,C as IsDecimal,x as MemoryCacheAdapter,i as NFeTsError,z as NativeCertificateRepository,y as NullCacheAdapter,w as PdfkitPdfBuilder,d as SignatureAlgorithm,c as SignatureMethod,a as SignatureNamespace,k as Signer,p as SkipAllValidations,o as SkipValidation,n as SkipValidationMetadata,A as SoapRemoteTransmissionRepository,g as StateAcronyms,G as StateCodeAcValidator,H as StateCodeAlValidator,I as StateCodeAmValidator,J as StateCodeApValidator,K as StateCodeBaValidator,L as StateCodeCeValidator,M as StateCodeDfValidator,N as StateCodeEsValidator,O as StateCodeGoValidator,P as StateCodeMaValidator,Q as StateCodeMgValidator,R as StateCodeMsValidator,S as StateCodeMtValidator,T as StateCodePaValidator,U as StateCodePbValidator,V as StateCodePeValidator,W as StateCodePiValidator,X as StateCodePrValidator,Y as StateCodeRjValidator,Z as StateCodeRnValidator,_ as StateCodeRoValidator,$ as StateCodeRrValidator,aa as StateCodeRsValidator,ba as StateCodeScValidator,ca as StateCodeSeValidator,da as StateCodeSpValidator,ea as StateCodeToValidator,f as StateCodes,F as TransformDateString,E as TransformDecimal,s as ValidateErrorsMetadata,u as Validates,j as ValidationError,B as Xml2JsToolkit,m as XmlSigner,q as clearEmptyValues,t as mapConstraintsToErrors,r as plainToInstance};