nfets 0.0.23 → 0.0.25

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.
@@ -99,7 +99,7 @@ ${e.join(`
99
99
  `):this.result.push("?>"))}WriteElementNode(e){let t=this.state;this.state===hi.BeforeDocElement&&(this.state=hi.InsideDocElement),this.result.push("<"),this.result.push(e.nodeName);let n=this.WriteNamespacesAxis(e);this.WriteAttributesAxis(e),this.result.push(">");for(let s=e.firstChild;s!=null;s=s.nextSibling)this.WriteNode(s);for(this.result.push("</"),this.result.push(e.nodeName),this.result.push(">"),t===hi.BeforeDocElement&&(this.state=hi.AfterDocElement);n--;)this.visibleNamespaces.Pop()}WriteNamespacesAxis(e){let t=[],n=0;for(let i=0;i<e.attributes.length;i++){let a=e.attributes[i];if(!FD(a)){if(a.prefix&&!this.IsNamespaceRendered(a.prefix,a.namespaceURI)){let h={prefix:a.prefix,namespace:a.namespaceURI};t.push(h),this.visibleNamespaces.Add(h),n++}continue}if(a.localName==="xmlns"&&!a.prefix&&!a.nodeValue){let h={prefix:a.prefix,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}let u=null,c;(c=/xmlns:([\w.-]+)/.exec(a.nodeName))&&(u=c[1]);let f=!0;if(this.exclusive&&!this.IsNamespaceInclusive(e,u)){let h=B9(e,u);if(h>1)f=!1;else if(h===0)continue}if(!this.IsNamespaceRendered(u,a.nodeValue)&&f){let h={prefix:u,namespace:a.nodeValue};t.push(h),this.visibleNamespaces.Add(h),n++}}if(!this.IsNamespaceRendered(e.prefix,e.namespaceURI)&&e.namespaceURI!=="http://www.w3.org/2000/xmlns/"){let i={prefix:e.prefix,namespace:e.namespaceURI};t.push(i),this.visibleNamespaces.Add(i),n++}t.sort(lhe);let s=null;return t.forEach(i=>{i.prefix!==s&&(s=i.prefix,this.result.push(" xmlns"),i.prefix&&this.result.push(":"+i.prefix),this.result.push('="'),this.result.push(i.namespace||""),this.result.push('"'))}),n}WriteAttributesAxis(e){let t=[];for(let n=0;n<e.attributes.length;n++){let s=e.attributes[n];FD(s)||t.push(s)}t.sort(fhe),t.forEach(n=>{n!=null&&(this.result.push(" "),this.result.push(n.nodeName),this.result.push('="'),this.result.push(this.NormalizeString(n.nodeValue,Ut.Attribute)),this.result.push('"'))})}NormalizeString(e,t){let n=[];if(e)for(let s=0;s<e.length;s++){let i=e[s];i==="<"&&(t===Ut.Attribute||this.IsTextNode(t))?n.push("&lt;"):i===">"&&this.IsTextNode(t)?n.push("&gt;"):i==="&"&&(t===Ut.Attribute||this.IsTextNode(t))?n.push("&amp;"):i==='"'&&t===Ut.Attribute?n.push("&quot;"):i===" "&&t===Ut.Attribute?n.push("&#x9;"):i===`
100
100
  `&&t===Ut.Attribute?n.push("&#xA;"):i==="\r"?n.push("&#xD;"):n.push(i)}return n.join("")}IsTextNode(e){switch(e){case Ut.Text:case Ut.CDATA:case Ut.SignificantWhitespace:case Ut.Whitespace:return!0}return!1}IsNamespaceInclusive(e,t){let n=t||null;return e.prefix===n?!1:this.inclusiveNamespacesPrefixList.indexOf(n||"")!==-1}IsNamespaceRendered(e,t){if(e=e||"",t=t||"",!e&&!t||e==="xml"&&t==="http://www.w3.org/XML/1998/namespace")return!0;let n=this.visibleNamespaces.GetPrefix(e);return n?n.namespace===t:!1}};function lhe(r,e){return r==e?0:r?e?r.prefix?e.prefix?r.prefix<e.prefix?-1:r.prefix>e.prefix?1:0:1:-1:1:-1}o(lhe,"XmlDsigC14NTransformNamespacesComparer");function fhe(r,e){if(!r.namespaceURI&&e.namespaceURI)return-1;if(!e.namespaceURI&&r.namespaceURI)return 1;let t=(r.namespaceURI||"")+r.localName,n=(e.namespaceURI||"")+e.localName;return t===n?0:t<n?-1:1}o(fhe,"XmlDsigC14NTransformAttributesComparer");function B9(r,e,t=0){let n=e||null;if(r.prefix===n)return++t;if(r.attributes)for(let s=0;s<r.attributes.length;s++){let i=r.attributes[s];if(!FD(i)&&e&&r.attributes[s].prefix===e)return++t}for(let s=r.firstChild;s;s=s.nextSibling)if(s.nodeType===Ut.Element){let a=B9(s,e,t);if(s.nodeType===Ut.Element&&a)return++t+a}return t}o(B9,"IsNamespaceUsed");function FD(r){let e=/xmlns:/;return!!(r!==null&&r.nodeType===Ut.Attribute&&(r.nodeName==="xmlns"||e.test(r.nodeName)))}o(FD,"IsNamespaceNode");var uC=class extends $i{static{o(this,"SignatureMethodOther")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==Ut.Element||n.nodeName===me.ElementNames.HMACOutputLength)continue;let s;switch(n.localName){case me.ElementNames.RSAPSSParams:s=xa;break;default:break}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};uC=He([jt({localName:"Other"})],uC);var uo=class extends Kr{static{o(this,"SignatureMethod")}};He([Or({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:""}),ht("design:type",String)],uo.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.HMACOutputLength,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:Jg}),ht("design:type",Number)],uo.prototype,"HMACOutputLength",void 0);He([Gt({parser:uC,noRoot:!0,minOccurs:0}),ht("design:type",uC)],uo.prototype,"Any",void 0);uo=He([jt({localName:me.ElementNames.SignatureMethod})],uo);var h0=class extends Kr{static{o(this,"CanonicalizationMethod")}};He([Or({localName:me.AttributeNames.Algorithm,required:!0,defaultValue:me.DefaultCanonMethod}),ht("design:type",String)],h0.prototype,"Algorithm",void 0);h0=He([jt({localName:me.ElementNames.CanonicalizationMethod})],h0);var p0=class extends Kr{static{o(this,"DataObject")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],p0.prototype,"Id",void 0);He([Or({localName:me.AttributeNames.MimeType,defaultValue:""}),ht("design:type",String)],p0.prototype,"MimeType",void 0);He([Or({localName:me.AttributeNames.Encoding,defaultValue:""}),ht("design:type",String)],p0.prototype,"Encoding",void 0);p0=He([jt({localName:me.ElementNames.Object})],p0);var ax=class extends $i{static{o(this,"DataObjects")}};ax=He([jt({localName:"xmldsig_objects",parser:p0})],ax);var ls=class extends Kr{static{o(this,"Transform")}constructor(){super(...arguments),this.innerXml=null}GetOutput(){throw new Fe(Te.METHOD_NOT_IMPLEMENTED)}LoadInnerXml(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"node");this.innerXml=e}GetInnerXml(){return this.innerXml}};He([Or({localName:me.AttributeNames.Algorithm,defaultValue:""}),ht("design:type",String)],ls.prototype,"Algorithm",void 0);He([Gt({localName:me.ElementNames.XPath,defaultValue:""}),ht("design:type",String)],ls.prototype,"XPath",void 0);ls=He([jt({localName:me.ElementNames.Transform})],ls);var fu=class extends ls{static{o(this,"XmlDsigBase64Transform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigBase64Transform}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return wr.FromString(this.innerXml.textContent||"","base64")}};var co=class extends ls{static{o(this,"XmlDsigC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315",this.xmlCanonicalizer=new oo(!1,!1)}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}},lo=class extends co{static{o(this,"XmlDsigC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",this.xmlCanonicalizer=new oo(!0,!1)}};var hu=class extends ls{static{o(this,"XmlDsigEnvelopedSignatureTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");let e=this.innerXml.firstChild,t=[];for(;e;)oi(e)&&e.localName===me.ElementNames.Signature&&e.namespaceURI===me.NamespaceURI&&t.push(e),e=e.nextSibling;for(let n of t)n.parentNode?.removeChild(n);return this.innerXml}};var fo=class extends ls{static{o(this,"XmlDsigExcC14NTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#",this.xmlCanonicalizer=new oo(!1,!0)}get InclusiveNamespacesPrefixList(){return this.xmlCanonicalizer.InclusiveNamespacesPrefixList}set InclusiveNamespacesPrefixList(e){this.xmlCanonicalizer.InclusiveNamespacesPrefixList=e}LoadXml(e){if(super.LoadXml(e),this.Element&&this.Element.childNodes)for(let t=0;t<this.Element.childNodes.length;t++){let n=this.Element.childNodes[t];if(n&&n.nodeType===1)switch(n.localName){case"InclusiveNamespaces":this.setInclusiveNamespacesElement(n);break}}}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");return this.xmlCanonicalizer.Canonicalize(this.innerXml)}setInclusiveNamespacesElement(e){let t=e.getAttribute("PrefixList");t&&t.length>0&&(this.xmlCanonicalizer.InclusiveNamespacesPrefixList=t)}},ho=class extends fo{static{o(this,"XmlDsigExcC14NWithCommentsTransform")}constructor(){super(...arguments),this.Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments",this.xmlCanonicalizer=new oo(!0,!0)}};function D9(r){return r.parentNode?D9(r.parentNode):r}o(D9,"lookupParentNode");var d0=class extends ls{static{o(this,"XmlDsigXPathTransform")}constructor(){super(...arguments),this.Algorithm=me.AlgorithmNamespaces.XmlDsigXPathTransform}GetOutput(){if(!this.innerXml)throw new Fe(Te.PARAM_REQUIRED,"innerXml");this.Filter(D9(this.innerXml),this.XPath)}Filter(e,t){let n=e.childNodes,s=[];for(let i=0;n&&i<n.length;i++){let a=n.item(i);s.push(a)}s.forEach(i=>{this.Evaluate(i,t)?i.parentNode&&i.parentNode.removeChild(i):this.Filter(i,t)})}GetEvaluator(e){return typeof self<"u"?e.ownerDocument==null?e:e.ownerDocument:Yp("xpath")}Evaluate(e,t){try{let n=this.GetEvaluator(e),s=this.GetXml();if(!s||!s.firstChild)throw new Error("XML element or firstChild is not defined");let i=s.firstChild,a=`boolean(${t})`,u=typeof self>"u"?Yp("xpath"):self;return!n.evaluate(a,e,{lookupNamespaceURI:o(f=>i.lookupNamespaceURI(f),"lookupNamespaceURI")},u.XPathResult.ANY_TYPE,null).booleanValue}catch{return!1}}};He([Gt({localName:me.ElementNames.XPath,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],d0.prototype,"XPath",void 0);var m0=class extends $i{static{o(this,"Transforms")}OnLoadXml(e){super.OnLoadXml(e),this.items=this.GetIterator().map(t=>{switch(t.Algorithm){case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:return Rh(t,hu);case me.AlgorithmNamespaces.XmlDsigC14NTransform:return Rh(t,co);case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:return Rh(t,lo);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:return Rh(t,fo);case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:return Rh(t,ho);case me.AlgorithmNamespaces.XmlDsigBase64Transform:return Rh(t,fu);case me.AlgorithmNamespaces.XmlDsigXPathTransform:return Rh(t,d0);default:try{let n=ox.CreateFromName(t.Algorithm);if(!t.Element)throw new Error("Transform element is not defined");return n.LoadXml(t.Element),n}catch{throw new Fe(Te.CRYPTOGRAPHIC_UNKNOWN_TRANSFORM,t.Algorithm)}}})}};m0=He([jt({localName:me.ElementNames.Transforms,parser:ls})],m0);function Rh(r,e){let t=new e;if(!r.Element)throw new Error("Transform element is not defined");return t.LoadXml(r.Element),t}o(Rh,"ChangeTransform");var po=class extends Kr{static{o(this,"Reference")}constructor(e){super(),this.DigestMethod=new Gi,e&&(this.Uri=e)}};He([Or({defaultValue:""}),ht("design:type",String)],po.prototype,"Id",void 0);He([Or({localName:me.AttributeNames.URI}),ht("design:type",String)],po.prototype,"Uri",void 0);He([Or({localName:me.AttributeNames.Type,defaultValue:""}),ht("design:type",String)],po.prototype,"Type",void 0);He([Gt({parser:m0}),ht("design:type",m0)],po.prototype,"Transforms",void 0);He([Gt({required:!0,parser:Gi}),ht("design:type",Gi)],po.prototype,"DigestMethod",void 0);He([Gt({required:!0,localName:me.ElementNames.DigestValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,converter:Vi}),ht("design:type",Uint8Array)],po.prototype,"DigestValue",void 0);po=He([jt({localName:me.ElementNames.Reference}),ht("design:paramtypes",[String])],po);var g0=class extends $i{static{o(this,"References")}};g0=He([jt({localName:"References",parser:po})],g0);var pu=class extends Kr{static{o(this,"SignedInfo")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],pu.prototype,"Id",void 0);He([Gt({parser:h0,required:!0}),ht("design:type",h0)],pu.prototype,"CanonicalizationMethod",void 0);He([Gt({parser:uo,required:!0}),ht("design:type",uo)],pu.prototype,"SignatureMethod",void 0);He([Gt({parser:g0,minOccurs:1,noRoot:!0}),ht("design:type",g0)],pu.prototype,"References",void 0);pu=He([jt({localName:me.ElementNames.SignedInfo})],pu);var w0="http://www.w3.org/2001/04/xmldsig-more#",S0="ecdsa",Ph=class extends Ms{static{o(this,"EcdsaPublicKey")}};He([Gt({localName:me.ElementNames.X,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Ph.prototype,"X",void 0);He([Gt({localName:me.ElementNames.Y,namespaceURI:w0,prefix:S0,required:!0,converter:Vi}),ht("design:type",Uint8Array)],Ph.prototype,"Y",void 0);Ph=He([jt({localName:me.ElementNames.PublicKey,namespaceURI:w0,prefix:S0})],Ph);var v0=class extends Ms{static{o(this,"NamedCurve")}};He([Or({localName:me.AttributeNames.URI,required:!0}),ht("design:type",String)],v0.prototype,"Uri",void 0);v0=He([jt({localName:me.ElementNames.NamedCurve,namespaceURI:w0,prefix:S0})],v0);var y0=class extends Ms{static{o(this,"DomainParameters")}};He([Gt({parser:v0}),ht("design:type",v0)],y0.prototype,"NamedCurve",void 0);y0=He([jt({localName:me.ElementNames.DomainParameters,namespaceURI:w0,prefix:S0})],y0);var x0=class extends fi{static{o(this,"EcdsaKeyValue")}constructor(){super(...arguments),this.name=me.ElementNames.ECDSAKeyValue,this.key=null,this.jwk=null,this.keyUsage=null}static canImportCryptoKey(e){return e.algorithm.name.toUpperCase()===cu.toUpperCase()}get NamedCurve(){return P9(this.DomainParameters.NamedCurve.Uri)}async importKey(e){if(!e.algorithm.name||e.algorithm.name.toUpperCase()!=="ECDSA")throw new Fe(Te.ALGORITHM_WRONG_NAME,e.algorithm.name);let t=await vn.crypto.subtle.exportKey("jwk",e);return this.key=e,this.jwk=t,this.PublicKey=new Ph,this.PublicKey.X=wr.FromString(t.x||"","base64url"),this.PublicKey.Y=wr.FromString(t.y||"","base64url"),this.DomainParameters||(this.DomainParameters=new y0),this.DomainParameters.NamedCurve||(this.DomainParameters.NamedCurve=new v0),this.DomainParameters.NamedCurve.Uri=P9(t.crv||""),this.keyUsage=e.usages,this}async exportKey(e){if(this.key)return this.key;let t=wr.ToBase64Url(this.PublicKey.X),n=wr.ToBase64Url(this.PublicKey.Y),s=hhe(this.DomainParameters.NamedCurve.Uri),i={kty:"EC",crv:s,x:t,y:n,ext:!0};this.keyUsage=["verify"];let a=await vn.crypto.subtle.importKey("jwk",i,{name:"ECDSA",namedCurve:s},!0,this.keyUsage);return this.key=a,this.key}};He([Gt({parser:y0}),ht("design:type",y0)],x0.prototype,"DomainParameters",void 0);He([Gt({parser:Ph,required:!0}),ht("design:type",Ph)],x0.prototype,"PublicKey",void 0);x0=He([jt({localName:me.ElementNames.ECDSAKeyValue,namespaceURI:w0,prefix:S0})],x0);function P9(r){switch(r){case"P-256":return"urn:oid:1.2.840.10045.3.1.7";case"P-384":return"urn:oid:1.3.132.0.34";case"P-521":return"urn:oid:1.3.132.0.35"}throw new Fe(Te.CRYPTOGRAPHIC,"Unknown NamedCurve")}o(P9,"GetNamedCurveOid");function hhe(r){switch(r){case"urn:oid:1.2.840.10045.3.1.7":return"P-256";case"urn:oid:1.3.132.0.34":return"P-384";case"urn:oid:1.3.132.0.35":return"P-521"}throw new Fe(Te.CRYPTOGRAPHIC,"Unknown NamedCurve OID")}o(hhe,"GetNamedCurveFromOid");var phe=class extends Map{static{o(this,"KeyInfoClauseRegistry")}},gl=new phe;gl.set(me.ElementNames.RSAKeyValue,l0);gl.set(me.ElementNames.ECDSAKeyValue,x0);var cC=class{static{o(this,"KeyInfoClauseFactory")}static create(e){let t=gl.get(e);if(!t)throw new Fe(Te.KEY_INFO_CLAUSE_NOT_SUPPORTED,e);return new t}};var ux=class extends fi{static{o(this,"KeyValue")}set Value(e){this.element=null,this.value=e}get Value(){return this.value}constructor(e){super(),e&&(this.Value=e)}async importKey(e){for(let[,t]of gl)if(t.canImportCryptoKey(e)){let n=new t;return await n.importKey(e),this.Value=n,this}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.algorithm.name)}async exportKey(e){if(!this.Value)throw new Fe(Te.NULL_REFERENCE);return this.Value.exportKey(e)}OnGetXml(e){if(!this.Value)throw new Fe(Te.CRYPTOGRAPHIC,"KeyValue has empty value");let t=this.Value.GetXml();t&&e.appendChild(t)}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(oi(n))try{let s=n.localName,i=cC.create(s);i.LoadXml(n),this.value=i;return}catch{}}throw new Fe(Te.CRYPTOGRAPHIC,"Unsupported KeyValue in use")}};ux=He([jt({localName:me.ElementNames.KeyValue}),ht("design:paramtypes",[fi])],ux);var dhe={"2.5.4.3":{short:"CN",long:"CommonName"},"2.5.4.6":{short:"C",long:"Country"},"2.5.4.5":{long:"DeviceSerialNumber"},"0.9.2342.19200300.100.1.25":{short:"DC",long:"DomainComponent"},"1.2.840.113549.1.9.1":{short:"E",long:"EMail"},"2.5.4.42":{short:"G",long:"GivenName"},"2.5.4.43":{short:"I",long:"Initials"},"2.5.4.7":{short:"L",long:"Locality"},"2.5.4.10":{short:"O",long:"Organization"},"2.5.4.11":{short:"OU",long:"OrganizationUnit"},"2.5.4.8":{short:"ST",long:"State"},"2.5.4.9":{short:"Street",long:"StreetAddress"},"2.5.4.4":{short:"SN",long:"SurName"},"2.5.4.12":{short:"T",long:"Title"},"1.2.840.113549.1.9.8":{long:"UnstructuredAddress"},"1.2.840.113549.1.9.2":{long:"UnstructuredName"}},b0=class{static{o(this,"X509Certificate")}constructor(e){if(this.publicKey=null,e){let t=new Uint8Array(e);this.LoadRaw(t),this.raw=t}}get SerialNumber(){return this.simpl.serialNumber.valueBlock.toString()}get Issuer(){return this.NameToString(this.simpl.issuer)}get Subject(){return this.NameToString(this.simpl.subject)}async Thumbprint(e="SHA-1"){return vn.crypto.subtle.digest(e,this.raw)}get PublicKey(){return this.publicKey}GetRaw(){return this.raw}async exportKey(e){if(e){let t={algorithm:e,usages:["verify"]};if(t.algorithm.name.toUpperCase()===cu){let s=this.simpl.subjectPublicKeyInfo.toJSON();if("crv"in s&&s.crv)t.algorithm.namedCurve=s.crv;else throw new Error("Cannot get Curved name from the ECDSA public key")}this.isHashedAlgorithm(t.algorithm)&&typeof t.algorithm.hash=="string"&&(t.algorithm.hash={name:t.algorithm.hash});let n=await this.simpl.getPublicKey({algorithm:t});return this.publicKey=n,n}return this.simpl.subjectPublicKeyInfo.algorithm.algorithmId==="1.2.840.113549.1.1.1"?this.publicKey=await this.simpl.getPublicKey({algorithm:{algorithm:{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},usages:["verify"]}}):this.publicKey=await this.simpl.getPublicKey(),this.publicKey}NameToString(e,t=","){let n=[];return e.typesAndValues.forEach(s=>{let i=s.type,a=dhe[i.toString()],u=a?a.short:null;n.push(`${u||i}=${s.value.valueBlock.value}`)}),n.join(t+" ")}LoadRaw(e){this.raw=new Uint8Array(e);let t=Gr(this.raw.buffer);this.simpl=new cs({schema:t.result})}isHashedAlgorithm(e){return!!e.hash}};var lC=class extends Kr{static{o(this,"X509IssuerSerial")}};He([Gt({localName:me.ElementNames.X509IssuerName,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],lC.prototype,"X509IssuerName",void 0);He([Gt({localName:me.ElementNames.X509SerialNumber,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0}),ht("design:type",String)],lC.prototype,"X509SerialNumber",void 0);lC=He([jt({localName:me.ElementNames.X509IssuerSerial})],lC);var Oh;(function(r){r[r.None=0]="None",r[r.EndCertOnly=1]="EndCertOnly",r[r.ExcludeRoot=2]="ExcludeRoot",r[r.WholeChain=3]="WholeChain"})(Oh||(Oh={}));var E0=class extends fi{static{o(this,"KeyInfoX509Data")}constructor(e,t=Oh.None){if(super(),this.x509crl=null,this.SubjectKeyIdList=[],e){if(e instanceof Uint8Array)this.AddCertificate(new b0(e));else if(e instanceof b0)switch(t){case Oh.None:case Oh.EndCertOnly:this.AddCertificate(e);break;case Oh.ExcludeRoot:this.AddCertificatesChainFrom(e,!1);break;case Oh.WholeChain:this.AddCertificatesChainFrom(e,!0);break}}}async importKey(e){throw new Fe(Te.METHOD_NOT_SUPPORTED)}async exportKey(e){if(!this.Certificates.length)throw new Fe(Te.NULL_REFERENCE);return this.Key=await this.Certificates[0].exportKey(e),this.Key}get Certificates(){return this.X509CertificateList}get CRL(){return this.x509crl}set CRL(e){this.x509crl=e}get IssuerSerials(){return this.IssuerSerialList}get SubjectKeyIds(){return this.SubjectKeyIdList}get SubjectNames(){return this.SubjectNameList}AddCertificate(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"certificate");this.X509CertificateList||(this.X509CertificateList=[]),this.X509CertificateList.push(e)}AddIssuerSerial(e,t){if(e==null)throw new Fe(Te.PARAM_REQUIRED,"issuerName");this.IssuerSerialList==null&&(this.IssuerSerialList=[]);let n={issuerName:e,serialNumber:t};this.IssuerSerialList.push(n)}AddSubjectKeyId(e){if(this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),typeof e=="string"){if(e!=null){let t=wr.FromBase64(e);this.SubjectKeyIdList.push(t)}}else this.SubjectKeyIdList.push(e)}AddSubjectName(e){this.SubjectNameList==null&&(this.SubjectNameList=[]),this.SubjectNameList.push(e)}GetXml(){let e=this.CreateDocument(),t=this.CreateElement(e),n=this.GetPrefix();if(this.IssuerSerialList!=null&&this.IssuerSerialList.length>0&&this.IssuerSerialList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerSerial),a=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509IssuerName);a.textContent=s.issuerName,i.appendChild(a);let u=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SerialNumber);u.textContent=s.serialNumber,i.appendChild(u),t.appendChild(i)}),this.SubjectKeyIdList!=null&&this.SubjectKeyIdList.length>0&&this.SubjectKeyIdList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SKI);i.textContent=wr.ToBase64(s),t.appendChild(i)}),this.SubjectNameList!=null&&this.SubjectNameList.length>0&&this.SubjectNameList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509SubjectName);i.textContent=s,t.appendChild(i)}),this.X509CertificateList!=null&&this.X509CertificateList.length>0&&this.X509CertificateList.forEach(s=>{let i=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509Certificate);i.textContent=wr.ToBase64(s.GetRaw()),t.appendChild(i)}),this.x509crl!=null){let s=e.createElementNS(me.NamespaceURI,n+me.ElementNames.X509CRL);s.textContent=wr.ToBase64(this.x509crl),t.appendChild(s)}return t}LoadXml(e){super.LoadXml(e),this.IssuerSerialList&&(this.IssuerSerialList=[]),this.SubjectKeyIdList&&(this.SubjectKeyIdList=[]),this.SubjectNameList&&(this.SubjectNameList=[]),this.X509CertificateList&&(this.X509CertificateList=[]),this.x509crl=null;let t=this.GetChildren(me.ElementNames.X509IssuerSerial);t&&t.forEach(s=>{let i=Kr.GetChild(s,me.ElementNames.X509IssuerName,me.NamespaceURI,!0),a=Kr.GetChild(s,me.ElementNames.X509SerialNumber,me.NamespaceURI,!0);i&&i.textContent&&a&&a.textContent&&this.AddIssuerSerial(i.textContent,a.textContent)}),t=this.GetChildren(me.ElementNames.X509SKI),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddSubjectKeyId(i)}}),t=this.GetChildren(me.ElementNames.X509SubjectName),t?.forEach(s=>{s.textContent&&this.AddSubjectName(s.textContent)}),t=this.GetChildren(me.ElementNames.X509Certificate),t&&t.forEach(s=>{if(s.textContent){let i=wr.FromBase64(s.textContent);this.AddCertificate(new b0(i))}});let n=this.GetChild(me.ElementNames.X509CRL,!1);n&&n.textContent&&(this.x509crl=wr.FromBase64(n.textContent))}AddCertificatesChainFrom(e,t){}};E0=He([jt({localName:me.ElementNames.X509Data}),ht("design:paramtypes",[Object,Object])],E0);var cx=class extends fi{static{o(this,"SPKIData")}async importKey(e){let t=await vn.crypto.subtle.exportKey("spki",e);return this.SPKIexp=new Uint8Array(t),this.Key=e,this}async exportKey(e){if(!this.SPKIexp)throw new Error("SPKI data is not defined");let t=await vn.crypto.subtle.importKey("spki",this.SPKIexp,e,!0,["verify"]);return this.Key=t,t}};He([Gt({localName:me.ElementNames.SPKIexp,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:Vi}),ht("design:type",Object)],cx.prototype,"SPKIexp",void 0);cx=He([jt({localName:me.ElementNames.SPKIData})],cx);var kh=class extends $i{static{o(this,"KeyInfo")}OnLoadXml(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes.item(t);if(n.nodeType!==Ut.Element)continue;let s=null;switch(n.localName){case me.ElementNames.KeyValue:s=ux;break;case me.ElementNames.X509Data:s=E0;break;case me.ElementNames.SPKIData:s=cx;break;case me.ElementNames.KeyName:case me.ElementNames.RetrievalMethod:case me.ElementNames.PGPData:case me.ElementNames.MgmtData:}if(s){let i=new s;i.LoadXml(n),this.Add(i)}}}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],kh.prototype,"Id",void 0);kh=He([jt({localName:me.ElementNames.KeyInfo})],kh);var vl=class extends Kr{static{o(this,"Signature")}};He([Or({localName:me.AttributeNames.Id,defaultValue:""}),ht("design:type",String)],vl.prototype,"Id",void 0);He([Gt({parser:pu,required:!0}),ht("design:type",pu)],vl.prototype,"SignedInfo",void 0);He([Gt({localName:me.ElementNames.SignatureValue,namespaceURI:me.NamespaceURI,prefix:me.DefaultPrefix,required:!0,converter:Vi,defaultValue:null}),ht("design:type",Object)],vl.prototype,"SignatureValue",void 0);He([Gt({parser:kh}),ht("design:type",kh)],vl.prototype,"KeyInfo",void 0);He([Gt({parser:ax,noRoot:!0}),ht("design:type",ax)],vl.prototype,"ObjectList",void 0);vl=He([jt({localName:me.ElementNames.Signature})],vl);var ghe=class extends Map{static{o(this,"AlgorithmRegistry")}},dr=new ghe;dr.set(rC,{type:"signature",algorithm:a0});dr.set(nC,{type:"signature",algorithm:o0});dr.set(sC,{type:"signature",algorithm:u0});dr.set(iC,{type:"signature",algorithm:c0});dr.set(rC,{type:"signature",algorithm:a0});dr.set(nC,{type:"signature",algorithm:o0});dr.set(sC,{type:"signature",algorithm:u0});dr.set(iC,{type:"signature",algorithm:c0});dr.set(MD,{type:"signature",algorithm:oC});dr.set(JA,{type:"signature",algorithm:t0});dr.set(YA,{type:"signature",algorithm:r0});dr.set(QA,{type:"signature",algorithm:n0});dr.set(ZA,{type:"signature",algorithm:s0});dr.set(JA.toUpperCase(),{type:"signature",algorithm:t0});dr.set(YA.toUpperCase(),{type:"signature",algorithm:r0});dr.set(QA.toUpperCase(),{type:"signature",algorithm:n0});dr.set(ZA.toUpperCase(),{type:"signature",algorithm:s0});dr.set(OD,{type:"signature",algorithm:rx});dr.set(kD,{type:"signature",algorithm:nx});dr.set(LD,{type:"signature",algorithm:sx});dr.set(VD,{type:"signature",algorithm:ix});dr.set(Ym,{type:"hash",algorithm:XA});dr.set(Qm,{type:"hash",algorithm:tx});dr.set(Zm,{type:"hash",algorithm:WA});dr.set(e0,{type:"hash",algorithm:zA});var Lh=class{static{o(this,"AlgorithmFactory")}static createHashAlgorithmFromNamespace(e){for(let[t,{type:n,algorithm:s}]of dr)if(n==="hash"&&t===e)return new s;throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e)}static createSignatureAlgorithmFromMethod(e){for(let[t,{type:n,algorithm:s}]of dr)if(n==="signature"&&e.Algorithm===t){let i=new s;return i.fromMethod&&i.fromMethod(e),i}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.Algorithm)}static createHashAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of dr)if(t==="hash"){let s=new n;if(s.algorithm.name.toUpperCase()===e.name.toUpperCase())return s}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.name)}static createSignatureAlgorithmFromAlgorithm(e){for(let[,{type:t,algorithm:n}]of dr)if(t==="signature"){let s=n.fromAlgorithm(e);if(s)return s}throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e.name)}};var vhe=class extends Map{static{o(this,"TransformRegistry")}},du=new vhe;du.set(me.AlgorithmNamespaces.XmlDsigBase64Transform,fu);du.set(me.AlgorithmNamespaces.XmlDsigC14NTransform,co);du.set(me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform,lo);du.set(me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform,hu);du.set(me.AlgorithmNamespaces.XmlDsigExcC14NTransform,fo);du.set(me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform,ho);var ox=class{static{o(this,"CryptoConfig")}static CreateFromName(e){if(!e)throw new Fe(Te.PARAM_REQUIRED,"name");let t=du.get(e);if(t)return new t;let n;switch(e){case me.AlgorithmNamespaces.XmlDsigBase64Transform:n=new fu;break;case me.AlgorithmNamespaces.XmlDsigC14NTransform:n=new co;break;case me.AlgorithmNamespaces.XmlDsigC14NWithCommentsTransform:n=new lo;break;case me.AlgorithmNamespaces.XmlDsigEnvelopedSignatureTransform:n=new hu;break;case me.AlgorithmNamespaces.XmlDsigXPathTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigXsltTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);case me.AlgorithmNamespaces.XmlDsigExcC14NTransform:n=new fo;break;case me.AlgorithmNamespaces.XmlDsigExcC14NWithCommentsTransform:n=new ho;break;case me.AlgorithmNamespaces.XmlDecryptionTransform:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e);default:throw new Fe(Te.ALGORITHM_NOT_SUPPORTED,e)}return n}static CreateSignatureAlgorithm(e){return Lh.createSignatureAlgorithmFromMethod(e)}static CreateHashAlgorithm(e){return Lh.createHashAlgorithmFromNamespace(e)}static GetHashAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return Lh.createHashAlgorithmFromAlgorithm(t)}static GetSignatureAlgorithm(e){let t=typeof e=="string"?{name:e}:e;return"hash"in t&&typeof t.hash=="string"&&(t.hash={name:t.hash}),Lh.createSignatureAlgorithmFromAlgorithm(t)}static CreateSignatureMethod(e){let t=new uo;return t.Algorithm=e.namespaceURI,e.toMethod&&e.toMethod(t),t}static RegisterSignatureAlgorithm(e,t){dr.set(e,{type:"signature",algorithm:t})}static RegisterHashAlgorithm(e,t){dr.set(e,{type:"hash",algorithm:t})}static RegisterKeyInfoClause(e,t){gl.set(e,t)}static RegisterTransform(e,t){du.set(e,t)}};var fC=Zx(BI(),1);var O9={xmldec:{version:"1.0",encoding:"UTF-8",standalone:void 0}};var k9={explicitArray:!1,explicitRoot:!1,preserveChildrenOrder:!0};var L9=class{static{o(this,"Xml2JsToolkit")}xml2js;constructor(e=whe){this.xml2js=e,Qj({XMLSerializer:fC.default.XMLSerializer,DOMParser:fC.default.DOMParser,DOMImplementation:fC.default.DOMImplementation})}async validate(e,t){try{return await CU.validate(e,t),ri()}catch(n){return Bu(n)}}parse(e,t){return new Promise((n,s)=>new this.xml2js.Parser({...k9,...t}).parseString(e,(i,a)=>i?s(i):n(a)))}build(e,t){return Promise.resolve(new this.xml2js.Builder({...O9,...t}).buildObject(e))}digest(e,t,n=K0){return this.hash(this.canonicalize(e,n),t)}canonicalize(e,t=K0){let n=Li(this.clear(e));return new oo(t.includeComments,t.exclusive).Canonicalize(n)}getNode(e,t){let s=Li(e).documentElement.getElementsByTagName(t).item(0);return s?this.clear(Qa(s)):null}getFirstNode(e){let n=Li(e).documentElement.firstChild;return n?this.clear(Qa(n)):null}getAttribute(e,t){return Li(e).documentElement.getAttribute(t)}appendNode(e,t){let n=Li(e),{documentElement:s}=Li(t);return n.documentElement.appendChild(s),this.clear(Qa(n))}hash(e,t){return xhe.createHash(t).update(e,"utf8").digest().toString("base64")}clear(e){return['xmlns:default="http://www.w3.org/2000/09/xmldsig#"',' standalone="no"',"default:",":default",`
101
101
  `,"\r"," "].reduce((n,s)=>n.replace(s,""),e.replace(/(>)\s*(<)/gm,"$1$2"))}};import{registerDecorator as She}from"class-validator";var V9=o(r=>(e,t)=>{She({name:"isDecimal",target:e.constructor,propertyName:t,options:r,validator:{validate(n){return n instanceof np?!0:typeof n=="string"||typeof n=="number"||typeof n=="bigint"},defaultMessage(n){return`${n.property} is not a valid Decimal value`}}})},"IsDecimal");import"reflect-metadata";import{registerDecorator as U9}from"class-validator";var A0=Symbol("choice"),C0=o(r=>r==null||r==="","isEmpty"),TTe=o(r=>e=>{let{properties:t,required:n=!1,...s}=r,i=Reflect.getMetadata(A0,e)??[],a={properties:t,required:n};i.push(a),Reflect.defineMetadata(A0,i,e);for(let u of t)U9({name:"choice",target:e,propertyName:u,options:s,validator:{validate(c,f){let h=f.object,m=f.property,g=Reflect.getMetadata(A0,e);if(!g)return!0;let x=g.find(v=>v.properties.includes(m));if(!x||C0(c))return!0;for(let v of x.properties){if(v===m)continue;let w=h[v];if(!C0(w))return!1}for(let v of g)if(v!==x)for(let w of v.properties){let S=h[w];if(!C0(S))return!1}return!0},defaultMessage(c){let f=Reflect.getMetadata(A0,e);if(!f)return`${c.property} validation error`;let h=f.find(g=>g.properties.includes(c.property));if(!h)return`${c.property} validation error`;let m=c.object;for(let g of h.properties){let x=m[g];if(!C0(x)&&g!==c.property)return`${c.property} cannot be set because ${g} is already set. Only one property from this choice group is allowed.`}for(let g of f)if(g!==h)for(let x of g.properties){let v=m[x];if(!C0(v))return`${c.property} cannot be set because ${x} from a different choice group is already set.`}return`${c.property} validation error`}}});if(n)for(let u of t)U9({name:"choiceGroupRequired",target:e,propertyName:u,options:{...s,always:!0},validator:{validate(c,f){let h=f.object,m=Reflect.getMetadata(A0,e);if(!m)return!0;let g=m.find(x=>x.properties.includes(f.property));if(!g?.required)return!0;for(let x of g.properties){let v=h[x];if(!C0(v))return!0}return f.property!==g.properties[0]},defaultMessage(c){let f=Reflect.getMetadata(A0,e);if(!f)return"At least one property from a choice group must be provided";let h=f.find(m=>m.properties.includes(c.property));return h?`You must provide a value for one of the following properties: ${h.properties.join(", ")}`:"At least one property from a choice group must be provided"}}})},"Choice");import"reflect-metadata";import{Transform as bhe}from"class-transformer";var OTe=o(({fixed:r,...e}={fixed:2})=>(t,n)=>{V9(e)(t,n),bhe(({value:s})=>np.newOrUndefined(s)?.toFixed(r))(t,n)},"TransformDecimal");import{Transform as Che}from"class-transformer";import{IsDateString as Nhe}from"class-validator";import qD from"dayjs";import Ehe from"dayjs/plugin/utc.js";import Ahe from"dayjs/plugin/timezone.js";qD.extend(Ehe);qD.extend(Ahe);var j9=qD;var KTe=o((r={})=>(e,t)=>{Che(({value:n})=>{let s=n instanceof Date?n.toISOString():n;return s?j9(s).tz("America/Sao_Paulo").format(r.format):void 0})(e,t),Nhe()(e,t)},"TransformDateString");var M9=class{static{o(this,"StateCodeAcValidator")}execute(e){if(e=e.replace(/\D/g,""),!/^01\d{11}$/.test(e))return!1;let t=e.split("").map(Number),n=t.slice(0,11),s=t[11],i=t[12],a=[4,3,2,9,8,7,6,5,4,3,2],c=n.reduce((v,w,S)=>v+w*a[S],0)%11,f=c===0||c===1?0:11-c,h=[5,4,3,2,9,8,7,6,5,4,3,2],g=[...n,f].reduce((v,w,S)=>v+w*h[S],0)%11,x=g===0||g===1?0:11-g;return s===f&&i===x}};var F9=class{static{o(this,"StateCodeAlValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let a=s*10%11;return(a===10?0:a)===parseInt(t[8],10)}};var q9=class{static{o(this,"StateCodeAmValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let a=0;a<8;a++)s+=parseInt(t[a],10)*n[a];let i;if(s<11)i=11-s;else{let a=s%11;i=a<=1?0:11-a}return i===parseInt(t[8],10)}};var H9=class{static{o(this,"StateCodeApValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("03"))return!1;let n=t.substring(0,8),s=parseInt(n,10),i,a;s>=3017001&&s<=3019022?(i=9,a=1):s>=3000001&&s<=3017e3?(i=5,a=0):(i=0,a=0);let u=[9,8,7,6,5,4,3,2],c=i;for(let m=0;m<8;m++)c+=parseInt(t[m],10)*u[m];let h=11-c%11;return h===10?h=0:h===11&&(h=a),h===parseInt(t[8],10)}};var K9=class{static{o(this,"StateCodeBaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8&&t.length!==9)return!1;let n=t.split("").map(w=>parseInt(w,10)),s=(t.length===8?n[0]:n[1])<=5||n[0]===8?10:11,i=t.length===8?[7,6,5,4,3,2]:[8,7,6,5,4,3,2],a=0;for(let w=0;w<i.length;w++)a+=n[w]*i[w];let u=a%s,c=s-u;(s===11&&u<=1||s===10&&u===0)&&(c=0);let h=(t.slice(0,t.length-2)+c.toString()).split("").map(w=>parseInt(w,10)),m=t.length===8?[8,7,6,5,4,3,2]:[9,8,7,6,5,4,3,2],g=0;for(let w=0;w<m.length;w++)g+=h[w]*m[w];let x=g%s,v=s-x;return(s===11&&x<=1||s===10&&x===0)&&(v=0),v===n[t.length-2]&&c===n[t.length-1]}};var $9=class{static{o(this,"StateCodeCeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var G9=class{static{o(this,"StateCodeDfValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13||!t.startsWith("07"))return!1;let n=t.slice(0,11).split("").map(Number),s=t.slice(11).split("").map(Number),i=[2,3,4,5,6,7,8,9],a=0;for(let m=10,g=0;m>=0;m--,g=(g+1)%i.length)a+=n[m]*i[g];let u=11-a%11;(u===10||u===11)&&(u=0);let c=n.concat([u]),f=0;for(let m=11,g=0;m>=0;m--,g=(g+1)%i.length)f+=c[m]*i[g];let h=11-f%11;return(h===10||h===11)&&(h=0),u===s[0]&&h===s[1]}};var X9=class{static{o(this,"StateCodeEsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<2?0:11-i)===parseInt(t[8],10)}};var W9=class{static{o(this,"StateCodeGoValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=parseInt(t.substring(0,2));if(!(n===10||n===11||n>=20&&n<=29))return!1;let s=[9,8,7,6,5,4,3,2],i=0;for(let c=0;c<8;c++)i+=parseInt(t[c],10)*s[c];let a=i%11;return(a===0||a===1?0:11-a)===parseInt(t[8],10)}};var z9=class{static{o(this,"StateCodeMaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("12"))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8],10)}};var J9=class{static{o(this,"StateCodeMgValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==13)return!1;let n=t.slice(0,11),s=n.slice(0,3)+"0"+n.slice(3),i=0;for(let x=0;x<12;x++){let v=x%2===0?1:2,w=(parseInt(s[x])*v).toString();i+=w.split("").reduce((S,A)=>S+parseInt(A),0)}let u=Math.ceil(i/10)*10-i,c=n+u.toString(),f=[3,2,11,10,9,8,7,6,5,4,3,2],h=0;for(let x=0;x<12;x++)h+=parseInt(c[x])*f[x];let m=h%11,g=m<2?0:11-m;return parseInt(t[11])===u&&parseInt(t[12])===g}};var Y9=class{static{o(this,"StateCodeMsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!(t.startsWith("28")||t.startsWith("50")))return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let c=0;c<8;c++)s+=parseInt(t[c],10)*n[c];let i=s%11,a=11-i;return(i===0||a>9?0:a)===parseInt(t[8],10)}};var Q9=class{static{o(this,"StateCodeMtValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=[3,2,9,8,7,6,5,4,3,2],s=0;for(let u=0;u<10;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[10],10)}};var Z9=class{static{o(this,"StateCodePaValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let i=s%11;return(i===0||i===1?0:11-i)===parseInt(t[8])}};var eq=class{static{o(this,"StateCodePbValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8])}};var tq=class{static{o(this,"StateCodePeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=t.slice(0,7).split("").map(Number),s=[8,7,6,5,4,3,2],i=0;for(let x=0;x<7;x++)i+=n[x]*s[x];let a=i%11,u=a===0||a===1?0:11-a,c=[...n,u],f=[9,8,7,6,5,4,3,2],h=0;for(let x=0;x<8;x++)h+=c[x]*f[x];let m=h%11,g=m===0||m===1?0:11-m;return u===parseInt(t[7])&&g===parseInt(t[8])}};var rq=class{static{o(this,"StateCodePiValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var nq=class{static{o(this,"StateCodePrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=t.slice(0,8).split("").map(Number),s=[3,2,7,6,5,4,3,2],i=[4,3,2,7,6,5,4,3,2],a=0;for(let m=0;m<8;m++)a+=n[m]*s[m];let u=11-a%11;u>=10&&(u=0);let c=[...n,u],f=0;for(let m=0;m<9;m++)f+=c[m]*i[m];let h=11-f%11;return h>=10&&(h=0),u===parseInt(t[8])&&h===parseInt(t[9])}};var sq=class{static{o(this,"StateCodeRjValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==8)return!1;let n=[2,7,6,5,4,3,2],s=0;for(let u=0;u<7;u++)s+=parseInt(t[u],10)*n[u];let i=s%11;return(i<=1?0:11-i)===parseInt(t[7],10)}};var iq=class{static{o(this,"StateCodeRnValidator")}execute(e){let t=e.replace(/\D/g,"");if(!(t.length===9||t.length===10)||!t.startsWith("20"))return!1;let n=t.length===9?[9,8,7,6,5,4,3,2]:[10,9,8,7,6,5,4,3,2],s=t.slice(0,n.length).split("").map(Number),i=0;for(let f=0;f<n.length;f++)i+=s[f]*n[f];let u=i*10%11;return(u===10?0:u)===parseInt(t[t.length-1])}};var aq=class{static{o(this,"StateCodeRoValidator")}execute(e){let t=e.replace(/\D/g,""),n,s;if(t.length===9)n=t.slice(3,8).split("").map(Number),s=[6,5,4,3,2];else if(t.length===14)n=t.slice(0,13).split("").map(Number),s=[6,5,4,3,2,9,8,7,6,5,4,3,2];else return!1;let i=0;for(let c=0;c<s.length;c++)i+=n[c]*s[c];let u=11-i%11;return(u===10||u===11)&&(u-=10),u===parseInt(t[t.length-1])}};var oq=class{static{o(this,"StateCodeRrValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9||!t.startsWith("24"))return!1;let n=0;for(let i=0;i<8;i++)n+=(i+1)*parseInt(t[i],10);return n%9===parseInt(t[8],10)}};var uq=class{static{o(this,"StateCodeRsValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==10)return!1;let n=[2,9,8,7,6,5,4,3,2],s=0;for(let a=0;a<9;a++)s+=parseInt(t[a],10)*n[a];let i=11-s%11;return(i===10||i===11)&&(i=0),i===parseInt(t[9],10)}};var cq=class{static{o(this,"StateCodeScValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u],10)*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var lq=class{static{o(this,"StateCodeSeValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==9)return!1;let n=[9,8,7,6,5,4,3,2],s=0;for(let u=0;u<8;u++)s+=parseInt(t[u])*n[u];let a=11-s%11;return(a===10||a===11)&&(a=0),a===parseInt(t[8],10)}};var fq=class{static{o(this,"StateCodeSpValidator")}execute(e){let t=e;if(t.length!==12)return!1;let n=t.split("").map(Number),s=[1,3,4,5,6,7,8,10],i=0;for(let h=0;h<8;h++)i+=n[h]*s[h];let a=i%11%10,u=[3,2,10,9,8,7,6,5,4,3,2],c=0;for(let h=0;h<11;h++)c+=n[h]*u[h];let f=c%11%10;return a===n[8]&&f===n[11]}};var hq=class{static{o(this,"StateCodeToValidator")}execute(e){let t=e.replace(/\D/g,"");if(t.length!==11)return!1;let n=t.split(""),s=n.slice(0,2).concat(n.slice(4,10)).map(Number),i=[9,8,7,6,5,4,3,2],a=0;for(let f=0;f<i.length;f++)a+=s[f]*i[f];let u=a%11;return(u<2?0:11-u)===parseInt(t[10])}};var hC=class{static{o(this,"ASN1")}extractCertificateInfo(e){let n=e.subject.split(`
102
- `).reduce((i,a)=>{let[u,c]=a.split("=").map(f=>f.trim());return!u||!c?i:i.set(u,c)},new Map),s=this.oid("2.16.76.1.3.1",e.raw);return{CNPJ:this.oid("2.16.76.1.3.3",e.raw),CPF:s,CN:n.get("CN")?.replace(/:.*$/g,""),O:n.get("O"),OU:n.get("OU"),ST:n.get("ST"),L:n.get("L"),C:n.get("C")}}oid(e,t){let n=this.marker(e),s=t.indexOf(n);if(s===-1)return;let i=[t.subarray(0,s),t.subarray(s)];if(i.length<=1)return;let u=i[0].subarray(-4),c=u.subarray(-2);u[0]===48?c=u:u[1]===48&&(c=u.subarray(-3));let f=Buffer.concat([c,n,i[1]]),h=this.length(f),m=n.length,g=f.subarray(2+m,2+m+h),x=g.length-c.length-2;if(x<=0||x>g.length)return;let w=g.subarray(-x).toString("utf8");return w.substring(Buffer.from(w).findIndex((S,A)=>w.charCodeAt(A)>=32&&w.charCodeAt(A)<=126))}length(e){return e.length<2?0:e[1]<=127?e[1]:Buffer.from([e[1]&15]).reduce((t,n)=>t<<8|n,0)}marker(e){let t=e.split("."),n=t.slice(2).reduce((s,i)=>{let a=this.base128(s,Number.parseInt(i,10),!0);return s.length=0,s.push(...a),s},[]);return Buffer.from([6,n.length+1,40*Number.parseInt(t[0],10)+Number.parseInt(t[1],10),...n])}base128(e,t,n){let s=[...e];if(t>127){let a=this.base128(e,Math.floor(t/128),!1);a.length=0,s.push(...a)}let i=t%128;return n?s.push(i):s.push(128|i),s}};var dq=class{static{o(this,"NativeCertificateRepository")}httpClient;cache;constructor(e,t=new lw){this.httpClient=e,this.cache=t}async read(e){try{let{password:t}=e,n=await this.getPfxBuffer(e);if(n.isLeft())return n;let s=Vh.default.asn1.fromDer(n.value.toString("binary")),i=Vh.default.pkcs12.pkcs12FromAsn1(s,t),{certBag:a,pkcs8ShroudedKeyBag:u}=Vh.default.pki.oids,c=i.getBags({bagType:a}),f=i.getBags({bagType:u}),h=c[a];if(!h?.length)return ti(new pn("Cannot read certificate"));let[{cert:m},...g]=h;if(!m)return ti(new pn("Issuer Certificate not found"));let x=f[u]?.[0].key;if(!x)return ti(new pn("Certificate Private Key not found"));let v=g.reduce((b,{cert:E})=>(E&&b.push(new N0.X509Certificate(Vh.default.pki.certificateToPem(E))),b),[]),w=Vh.default.pki.privateKeyToPem(x),S=Vh.default.pki.certificateToPem(m),A=N0.createPrivateKey(w),T=new N0.X509Certificate(S);return ri({ca:v,password:t,privateKey:A,certificate:T})}catch(t){return Bu(t)}}async sign(e,t,n=Cu.SHA1){try{let i=N0.sign(n,Buffer.from(e),{key:t,padding:N0.constants.RSA_PKCS1_PADDING}).toString("base64");return await Promise.resolve(ri(i))}catch(s){return Promise.resolve(Bu(s))}}getCertificateInfo(e){return new hC().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"}).toString()}catch{throw new pn("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 ri(i);if(The.isAbsolute(t)||pq.existsSync(t))return this.hitBufferOnCache(s,pq.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 Bu(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return N0.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),ri(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var J_e={[br.AC]:"America/Rio_Branco",[br.AL]:"America/Maceio",[br.AM]:"America/Manaus",[br.AP]:"America/Belem",[br.BA]:"America/Bahia",[br.CE]:"America/Fortaleza",[br.DF]:"America/Sao_Paulo",[br.ES]:"America/Sao_Paulo",[br.GO]:"America/Sao_Paulo",[br.MA]:"America/Fortaleza",[br.MG]:"America/Sao_Paulo",[br.MS]:"America/Campo_Grande",[br.MT]:"America/Cuiaba",[br.PA]:"America/Belem",[br.PB]:"America/Fortaleza",[br.PE]:"America/Recife",[br.PI]:"America/Fortaleza",[br.PR]:"America/Sao_Paulo",[br.RJ]:"America/Sao_Paulo",[br.RN]:"America/Fortaleza",[br.RO]:"America/Porto_Velho",[br.RR]:"America/Boa_Vista",[br.RS]:"America/Sao_Paulo",[br.SC]:"America/Sao_Paulo",[br.SE]:"America/Maceio",[br.SP]:"America/Sao_Paulo",[br.TO]:"America/Araguaina"};export{I2 as a,dO as b,_2 as c,Cu as d,B2 as e,br as f,_he as g,Dhe as h,pn as i,mO as j,D2 as k,Zh as l,R2 as m,ew as n,ti as o,ri as p,gO as q,vO as r,$0 as s,ape as t,ope as u,tw as v,yO as w,xO as x,wO as y,vpe as z,np as A,kO as B,Bu as C,lw as D,dq as E,m8 as F,v8 as G,A8 as H,vU as I,L9 as J,V9 as K,TTe as L,OTe as M,KTe as N,M9 as O,F9 as P,q9 as Q,H9 as R,K9 as S,$9 as T,G9 as U,X9 as V,W9 as W,z9 as X,J9 as Y,Y9 as Z,Q9 as _,Z9 as $,eq as aa,tq as ba,rq as ca,nq as da,sq as ea,iq as fa,aq as ga,oq as ha,uq as ia,cq as ja,lq as ka,fq as la,hq as ma,hC as na};
102
+ `).reduce((i,a)=>{let[u,c]=a.split("=").map(f=>f.trim());return!u||!c?i:i.set(u,c)},new Map),s=this.oid("2.16.76.1.3.1",e.raw);return{CNPJ:this.oid("2.16.76.1.3.3",e.raw),CPF:s,CN:n.get("CN")?.replace(/:.*$/g,""),O:n.get("O"),OU:n.get("OU"),ST:n.get("ST"),L:n.get("L"),C:n.get("C")}}oid(e,t){let n=this.marker(e),s=t.indexOf(n);if(s===-1)return;let i=[t.subarray(0,s),t.subarray(s)];if(i.length<=1)return;let u=i[0].subarray(-4),c=u.subarray(-2);u[0]===48?c=u:u[1]===48&&(c=u.subarray(-3));let f=Buffer.concat([c,n,i[1]]),h=this.length(f),m=n.length,g=f.subarray(2+m,2+m+h),x=g.length-c.length-2;if(x<=0||x>g.length)return;let w=g.subarray(-x).toString("utf8");return w.substring(Buffer.from(w).findIndex((S,A)=>w.charCodeAt(A)>=32&&w.charCodeAt(A)<=126))}length(e){return e.length<2?0:e[1]<=127?e[1]:Buffer.from([e[1]&15]).reduce((t,n)=>t<<8|n,0)}marker(e){let t=e.split("."),n=t.slice(2).reduce((s,i)=>{let a=this.base128(s,Number.parseInt(i,10),!0);return s.length=0,s.push(...a),s},[]);return Buffer.from([6,n.length+1,40*Number.parseInt(t[0],10)+Number.parseInt(t[1],10),...n])}base128(e,t,n){let s=[...e];if(t>127){let a=this.base128(e,Math.floor(t/128),!1);a.length=0,s.push(...a)}let i=t%128;return n?s.push(i):s.push(128|i),s}};var dq=class{static{o(this,"NativeCertificateRepository")}httpClient;cache;constructor(e,t=new lw){this.httpClient=e,this.cache=t}async read(e){try{let{password:t}=e,n=await this.getPfxBuffer(e);if(n.isLeft())return n;let s=Vh.default.asn1.fromDer(n.value.toString("binary")),i=Vh.default.pkcs12.pkcs12FromAsn1(s,t),{certBag:a,pkcs8ShroudedKeyBag:u}=Vh.default.pki.oids,c=i.getBags({bagType:a}),f=i.getBags({bagType:u}),h=c[a];if(!h?.length)return ti(new pn("Cannot read certificate"));let[{cert:m},...g]=h;if(!m)return ti(new pn("Issuer Certificate not found"));let x=f[u]?.[0].key;if(!x)return ti(new pn("Certificate Private Key not found"));let v=g.reduce((b,{cert:E})=>(E&&b.push(new N0.X509Certificate(Vh.default.pki.certificateToPem(E))),b),[]),w=Vh.default.pki.privateKeyToPem(x),S=Vh.default.pki.certificateToPem(m),A=N0.createPrivateKey(w),T=new N0.X509Certificate(S);return ri({ca:v,password:t,privateKey:A,certificate:T})}catch(t){return Bu(t)}}async sign(e,t,n=Cu.SHA1){try{let i=N0.sign(n,Buffer.from(e),{key:t,padding:N0.constants.RSA_PKCS1_PADDING}).toString("base64");return await Promise.resolve(ri(i))}catch(s){return Promise.resolve(Bu(s))}}getCertificateInfo(e){return new hC().extractCertificateInfo(e)}getStringCertificate(e){return e.raw.toString("base64")}getStringPrivateKey(e){try{return e.export({type:"pkcs8",format:"pem"}).toString()}catch{throw new pn("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 ri(i);if(The.isAbsolute(t)||pq.existsSync(t))return this.hitBufferOnCache(s,pq.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 Bu(a)}return this.hitBufferOnCache(s,Buffer.from(t,"base64"))}getCacheKey(e,t){return N0.createHash("sha256").update(`${e}.${t}`).digest("hex")}async hitBufferOnCache(e,t){return await this.cache.set(e,t),ri(t)}isValidRemoteUrl(e){try{return new URL(e),!0}catch{return!1}}};var J_e={[br.AC]:"America/Rio_Branco",[br.AL]:"America/Maceio",[br.AM]:"America/Manaus",[br.AP]:"America/Belem",[br.BA]:"America/Bahia",[br.CE]:"America/Fortaleza",[br.DF]:"America/Sao_Paulo",[br.ES]:"America/Sao_Paulo",[br.GO]:"America/Sao_Paulo",[br.MA]:"America/Fortaleza",[br.MG]:"America/Sao_Paulo",[br.MS]:"America/Campo_Grande",[br.MT]:"America/Cuiaba",[br.PA]:"America/Belem",[br.PB]:"America/Fortaleza",[br.PE]:"America/Recife",[br.PI]:"America/Fortaleza",[br.PR]:"America/Sao_Paulo",[br.RJ]:"America/Sao_Paulo",[br.RN]:"America/Fortaleza",[br.RO]:"America/Porto_Velho",[br.RR]:"America/Boa_Vista",[br.RS]:"America/Sao_Paulo",[br.SC]:"America/Sao_Paulo",[br.SE]:"America/Maceio",[br.SP]:"America/Sao_Paulo",[br.TO]:"America/Araguaina"};export{I2 as a,dO as b,_2 as c,Cu as d,B2 as e,br as f,_he as g,Dhe as h,pn as i,mO as j,D2 as k,Zh as l,R2 as m,ew as n,ti as o,ri as p,gO as q,vO as r,$0 as s,ape as t,ope as u,tw as v,yO as w,xO as x,wO as y,vpe as z,np as A,kO as B,Bu as C,lw as D,dq as E,bp as F,m8 as G,v8 as H,vU as I,L9 as J,V9 as K,TTe as L,OTe as M,KTe as N,M9 as O,F9 as P,q9 as Q,H9 as R,K9 as S,$9 as T,G9 as U,X9 as V,W9 as W,z9 as X,J9 as Y,Y9 as Z,Q9 as _,Z9 as $,eq as aa,tq as ba,rq as ca,nq as da,sq as ea,iq as fa,aq as ga,oq as ha,uq as ia,cq as ja,lq as ka,fq as la,hq as ma,hC as na};
103
103
  /*! Bundled license information:
104
104
 
105
105
  lodash/lodash.js:
@@ -1,2 +1,2 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import"../chunk-I4KZJHBR.mjs";import{$ as Y,A,B,C,D,E,I as F,J as G,K as H,L as I,M as J,N as K,O as L,P as M,Q as N,R as O,S as P,T as Q,U as R,V as S,W as T,X as U,Y as V,Z as W,_ as X,a,aa as Z,b,ba as _,c,ca as $,d,da as aa,e,ea as ba,f,fa as ca,g,ga as da,h,ha as ea,i,ia as fa,j,ja as ga,k,ka as ha,l,la as ia,m,ma as ja,n,na as ka,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-FLRSOUV5.mjs";import"../chunk-W6MRGYXP.mjs";export{ka as ASN1,b as CanonicalizationMethod,I as Choice,A as Decimal,e as DigestAlgorithm,q as EntitySigner,h as Environment,H as IsDecimal,m as Left,B as MemoryCacheAdapter,i as NFeTsError,E as NativeCertificateRepository,D as NullCacheAdapter,n as Right,d as SignatureAlgorithm,c as SignatureMethod,a as SignatureNamespace,l as Signer,u as SkipAllValidations,t as SkipValidation,s as SkipValidationMetadata,F as SoapRemoteTransmissionRepository,g as StateAcronyms,L as StateCodeAcValidator,M as StateCodeAlValidator,N as StateCodeAmValidator,O as StateCodeApValidator,P as StateCodeBaValidator,Q as StateCodeCeValidator,R as StateCodeDfValidator,S as StateCodeEsValidator,T as StateCodeGoValidator,U as StateCodeMaValidator,V as StateCodeMgValidator,W as StateCodeMsValidator,X as StateCodeMtValidator,Y as StateCodePaValidator,Z as StateCodePbValidator,_ as StateCodePeValidator,$ as StateCodePiValidator,aa as StateCodePrValidator,ba as StateCodeRjValidator,ca as StateCodeRnValidator,da as StateCodeRoValidator,ea as StateCodeRrValidator,fa as StateCodeRsValidator,ga as StateCodeScValidator,ha as StateCodeSeValidator,ia as StateCodeSpValidator,ja as StateCodeToValidator,f as StateCodes,K as TransformDateString,J as TransformDecimal,x as ValidateErrorsMetadata,z as Validates,j as ValidationError,G as Xml2JsToolkit,r as XmlSigner,v as clearEmptyValues,o as left,C as leftFromError,y as mapConstraintsToErrors,w as plainToInstance,p as right,k as unreachable};
2
+ import"../chunk-I4KZJHBR.mjs";import{$ as Y,A,B,C,D,E,I as F,J as G,K as H,L as I,M as J,N as K,O as L,P as M,Q as N,R as O,S as P,T as Q,U as R,V as S,W as T,X as U,Y as V,Z as W,_ as X,a,aa as Z,b,ba as _,c,ca as $,d,da as aa,e,ea as ba,f,fa as ca,g,ga as da,h,ha as ea,i,ia as fa,j,ja as ga,k,ka as ha,l,la as ia,m,ma as ja,n,na as ka,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-G42HFBUE.mjs";import"../chunk-W6MRGYXP.mjs";export{ka as ASN1,b as CanonicalizationMethod,I as Choice,A as Decimal,e as DigestAlgorithm,q as EntitySigner,h as Environment,H as IsDecimal,m as Left,B as MemoryCacheAdapter,i as NFeTsError,E as NativeCertificateRepository,D as NullCacheAdapter,n as Right,d as SignatureAlgorithm,c as SignatureMethod,a as SignatureNamespace,l as Signer,u as SkipAllValidations,t as SkipValidation,s as SkipValidationMetadata,F as SoapRemoteTransmissionRepository,g as StateAcronyms,L as StateCodeAcValidator,M as StateCodeAlValidator,N as StateCodeAmValidator,O as StateCodeApValidator,P as StateCodeBaValidator,Q as StateCodeCeValidator,R as StateCodeDfValidator,S as StateCodeEsValidator,T as StateCodeGoValidator,U as StateCodeMaValidator,V as StateCodeMgValidator,W as StateCodeMsValidator,X as StateCodeMtValidator,Y as StateCodePaValidator,Z as StateCodePbValidator,_ as StateCodePeValidator,$ as StateCodePiValidator,aa as StateCodePrValidator,ba as StateCodeRjValidator,ca as StateCodeRnValidator,da as StateCodeRoValidator,ea as StateCodeRrValidator,fa as StateCodeRsValidator,ga as StateCodeScValidator,ha as StateCodeSeValidator,ia as StateCodeSpValidator,ja as StateCodeToValidator,f as StateCodes,K as TransformDateString,J as TransformDecimal,x as ValidateErrorsMetadata,z as Validates,j as ValidationError,G as Xml2JsToolkit,r as XmlSigner,v as clearEmptyValues,o as left,C as leftFromError,y as mapConstraintsToErrors,w as plainToInstance,p as right,k as unreachable};